Skip to content
Permalink
Browse files

Fixing talents, separating, adding stuff

  • Loading branch information...
Depado committed Nov 30, 2017
1 parent a541d10 commit ec6a4fbbc9290f636ee2b52fbca1ec72c50fa675
Showing with 236 additions and 53 deletions.
  1. +1 −0 .gitignore
  2. +81 −0 Gopkg.lock
  3. +42 −0 Gopkg.toml
  4. +1 −0 assets/img/talents.svg
  5. +37 −3 chars/nogaj.yml
  6. +1 −1 main.go
  7. +10 −10 models/talents.go
  8. +1 −0 templates/index.tmpl
  9. +16 −31 templates/skills.tmpl
  10. +7 −8 templates/spells.tmpl
  11. +39 −0 templates/talents.tmpl
@@ -14,3 +14,4 @@
.glide/
conf.yml
rpsheet
vendor/

Some generated files are not rendered by default. Learn more.

@@ -0,0 +1,42 @@

# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"


[[constraint]]
name = "github.com/gin-gonic/gin"
version = "1.2.0"

[[constraint]]
name = "github.com/imdario/mergo"
version = "0.2.4"

[[constraint]]
name = "github.com/pkg/errors"
version = "0.8.0"

[[constraint]]
name = "github.com/sirupsen/logrus"
version = "1.0.3"

[[constraint]]
branch = "v2"
name = "gopkg.in/yaml.v2"
@@ -0,0 +1 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="rgba(0, 0, 0, 0)"></path><g class="" style="touch-action: none;" transform="translate(0,0)"><path fill="rgba(255, 255, 255, 1)" d="M138.656 49.53l-.03 114.814 37.03-21.406-.03-11.844-.064-16.22 14.063 8.095 128.22 73.936-.033-50.53-.906.53-4.687 2.72-4.658-2.72-50.78-29.312-.094.062L138.656 49.53zm236.094 0l-99.313 57.314 36.75 21.187 10.282-5.968 14.03-8.124v16.218l.063 147.375 43.03-24.874-.5-.312-4.28-2.75v-5.125l-.032-58.626v-60.72l-.03-45.78V49.53zm-180.406 97.72V153.72l-4.688 2.718-142.97 82.593-.03-.06L20.594 254 120 311.406l.125-43.344-10.688-5.937-14.437-8 14.28-8.25 127.907-73.906-42.843-24.72zm61.53 35.5l-52.124 30.125 50.938 31.406 52.125-32.155-50.938-29.375zm137.595 13.906l.03 42.72 9.094 5.843 12.875 8.28-13.25 7.688L273 335.813l44.813 25.843v-6.468l4.687-2.688 52.28-30.188v-.156L492.814 254l-99.344-57.344zm-75.626 30.625L272.5 255.25l45.375 27.97-.03-55.94zm-141.375 1.345l-43.5 25.156 1.06.595 4.845 2.688-.03 5.53-.22 71.344.03 124.532 99.095-57.19-36.938-21.31-10.25 5.936-14.03 8.156v-16.218l-.063-149.22zm18.686.875l.03 51.47 41.72-25.72-41.75-25.75zm59.53 36.72l-49.436 30.5 49.094 28.31 49.437-28.53-49.092-30.28zm-59.5 46.28l.033 49.094.905-.53 4.656-2.69 4.69 2.688 50.968 29.407.25-.126L374.75 458.47l.03-114.595L336.5 366l.03 11.844.064 16.22-14.063-8.127L195.19 312.5z"></path></g></svg>
@@ -29,12 +29,40 @@ formations:
talents:
- name: Evangelism
description: Give some skills because of faith.
- name: Sniper
description: Remove some penalties for long-distance shooting
rank: 1
- name: Bon Tireur
rank: 3
description: |
La distance n’est plus un obstacle lorsque vous avez une arme à feu en
main, si bien que les cibles éloignées vous semblent aussi faciles à
toucher que celles qui sont tout près. Vous ne subissez plus de malus de
portée longue ou extrême.
- name: Ammo Crafting
description: Allows to craft ammunitions
- name: Decadence
description: Improved alcohol resistance
rank: 1
description: |
Que ce soit grâce à un conditionnement mental et physique ou à cause de
longues années d’abus, vous avez développé une tolérance aux substances
chimiques. Lorsque vous buvez de l’alcool et autres breuvages, vous ne
perdez connaissance qu’après avoir raté un nombre de tests d’Endurance égal
au double de votre bonus d’Endurance. De plus, vous bénéficiez d’un bonus de
+10 aux tests effectués pour continuer à faire usage de drogue pendant
24 heures.
- name: Authority Aura
test: Commandement
rank: 2
score:
throws: 1
type: 10
description: |
En réussissant un test de Commandement, vous pouvez affecter un nombre de
cibles égal à 1d10 plus votre bonus de Sociabilité.
Votre voix vous permet d’exercer une autorité telle que même ceux qui ne
vous servent pas directement prêtent attention au moindre de vos propos.
D’ailleurs, vous pouvez même donner des ordres à ce type d’individus à la
condition de réussir un test de Commandement assorti d’un malus de -10.
spells:
- name: Heal
description: Jagon heals you or someone else
@@ -44,6 +72,11 @@ spells:
throws: 1
type: 10
ranked: true
- name: Arcane Mark
description: Inscribes a personal rune (visible or invisible).
rank: 1
size: 1 sq. ft. max
test: Willpower
stats:
- name: CC
base: 26
@@ -95,6 +128,7 @@ skills:
- name: Connaissances (Cultures anciennes)
- name: Démolition
- name: Subterfuge
- name: Commandement
equipment:
weapons:
- name: Krain
@@ -4,8 +4,8 @@ import (
"fmt"
"net/http"

"github.com/Sirupsen/logrus"
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/Depado/rpsheet/conf"
"github.com/Depado/rpsheet/models"
@@ -9,21 +9,21 @@ type Formation struct {

// Talent represent a single talent and what it does
type Talent struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
Effect string `yaml:"effect"`
Name string `yaml:"name"`
Description string `yaml:"description"`
Effect string `yaml:"effect"`
Score *DiceThrow `yaml:"score"`
Test string `yaml:"test"`
Rank int `yaml:"rank"`
}

// Spell is a talent with an associated test and a score
type Spell struct {
Talent `yaml:",inline"`
Score *DiceThrow `yaml:"score"`
Test string `yaml:"test"`
Scope int `yaml:"scope"`
Rank int `yaml:"rank"`
Ingredients []string `yaml:"ingredients"`
Duration string `yaml:"duration"`
Size string `yaml:"size"`
Scope int `yaml:"scope"`
Ingredients []string `yaml:"ingredients"`
Duration string `yaml:"duration"`
Size string `yaml:"size"`
}

// Enrich adds some formatted fields
@@ -40,6 +40,7 @@
<div class="mdl-grid">
{{ template "weapons_card" . }}
{{ template "skills_card" . }}
{{ template "talents_card" . }}
{{ template "spells_card" . }}
</div>
</main>
@@ -1,40 +1,25 @@
{{ define "skills_card" }}
<div class="mdl-card mdl-shadow--4dp mdl-cell mdl-cell--6-col">
<div class="mdl-card__title mdl-color--light-blue-400 mdl-color-text--grey-100">
<h2 class="mdl-card__title-text"><img src="/assets/img/read.svg" height="30px">&nbsp;&nbsp; Skills and Talents</h2>
<h2 class="mdl-card__title-text"><img src="/assets/img/read.svg" height="30px">&nbsp;&nbsp; Skills</h2>
</div>
<div class="mdl-card__supporting-text mdl-grid">
<div class="mdl-cell mdl-cell--6-col">
<h4 style="text-align: center;">Skills</h4>
<ul class="mdl-list">
{{ range .Skills }}
<li class="mdl-list__item">
<span class="mdl-list__item-primary-content">
{{ if .Modifier }}
<span class="mdl-badge mdl-badge--no-background" data-badge="+{{ .Modifier }}">{{ .Name }}</span>
{{ else }}
<span>{{ .Name }}</span>
{{ end }}
</span>
</li>
{{ end }}
</ul>
</div>
<div class="mdl-cell mdl-cell--6-col">
<h4 style="text-align: center;">Talents</h4>
<ul class="mdl-list">
{{ range .Talents }}
<li class="mdl-list__item mdl-list__item--three-line">
<span class="mdl-list__item-primary-content">
<span>{{ .Name }}</span>
<span class="mdl-list__item-text-body">
{{ .Description }}
<div class="mdl-cell mdl-cell--12-col">
<h4 style="text-align: center;">Skills</h4>
<ul class="mdl-list">
{{ range .Skills }}
<li class="mdl-list__item">
<span class="mdl-list__item-primary-content">
{{ if .Modifier }}
<span class="mdl-badge mdl-badge--no-background" data-badge="+{{ .Modifier }}">{{ .Name }}</span>
{{ else }}
<span>{{ .Name }}</span>
{{ end }}
</span>
</span>
</li>
{{ end }}
</ul>
</div>
</li>
{{ end }}
</ul>
</div>
</div>
</div>
{{ end }}
@@ -1,11 +1,11 @@
{{ define "spells_card" }}
<div class="mdl-card mdl-shadow--4dp mdl-cell mdl-cell--6-col">
<div class="mdl-card mdl-shadow--4dp mdl-cell mdl-cell--12-col">
<div class="mdl-card__title mdl-color--light-blue-400 mdl-color-text--grey-100">
<h2 class="mdl-card__title-text"><img src="/assets/img/spellbook.svg" height="30px">&nbsp;&nbsp; Spells</h2>
</div>
<div class="mdl-card__supporting-text mdl-grid">
<div class="mdl-card__supporting-text mdl-grid" style="width: 99%;">
{{ range .Spells }}
<div class="mdl-card mdl-shadow--2dp mdl-cell mdl-cell--12-col">
<div class="mdl-card mdl-shadow--2dp mdl-cell mdl-cell--6-col mdl-cell--12-col-phone mdl-cell--12-col-tablet">
<div class="mdl-card__title" style="color:rgba(0,0,0,.54);">
<h2 class="mdl-card__title-text">{{ .Name }}</h2>
</div>
@@ -38,16 +38,15 @@
<img src="/assets/img/hourglass.svg" height="25px"> {{ .Duration }}
</p>
{{ end }}
{{ if .Description }}
<p>
<img src="/assets/img/book.svg" height="25px"> {{ .Description }}
</p>
{{ end }}
{{ range .Ingredients }}
<p>
<img src="/assets/img/black-bag.svg" height="25px"> {{ . }}
</p>
{{ end }}
{{ if .Description }}
<hr >
<p style="text-align: justify;"><i>{{ .Description }}</i></p>
{{ end }}
</div>
</div>
{{ end }}
@@ -0,0 +1,39 @@
{{ define "talents_card" }}
<div class="mdl-card mdl-shadow--4dp mdl-cell mdl-cell--12-col">
<div class="mdl-card__title mdl-color--light-blue-400 mdl-color-text--grey-100">
<h2 class="mdl-card__title-text"><img src="/assets/img/talents.svg" height="30px">&nbsp;&nbsp; Talents</h2>
</div>
<div class="mdl-card__supporting-text mdl-grid" style="width: 99%;">
{{ range .Talents }}
<div class="mdl-card mdl-shadow--2dp mdl-cell mdl-cell--6-col mdl-cell--12-col-phone mdl-cell--12-col-tablet">
<div class="mdl-card__title" style="color:rgba(0,0,0,.54);">
<h2 class="mdl-card__title-text">{{ .Name }}</h2>
</div>
<div class="mdl-card__supporting-text">
{{ if .Score }}
<p>
<img src="/assets/img/dice.svg" height="25px"> {{ .Score.Throws }}D{{ .Score.Type }}
{{ if .Score.Ranked }} per rank{{ end }}
{{ if .Score.FmtModifier}} {{ .Score.FmtModifier }}{{ end }}
</p>
{{ end }}
{{ if .Test }}
<p>
<img src="/assets/img/test.svg" height="25px"> {{ .Test }}
<span style="float:right;">{{ .Rank }} <img src="/assets/img/rank.svg" height="25px"></span>
</p>
{{ else }}
<p>
<img src="/assets/img/rank.svg" height="25px"> {{ .Rank }}
</p>
{{ end }}
{{ if .Description }}
<hr >
<p style="text-align: justify;"><i>{{ .Description }}</i></p>
{{ end }}
</div>
</div>
{{ end }}
</div>
</div>
{{ end }}

0 comments on commit ec6a4fb

Please sign in to comment.
You can’t perform that action at this time.