mirror of
https://gitlab.com/EternalWanderer/sheet-parser.git
synced 2024-11-29 05:23:49 +01:00
Version bump
Passive perception info added to trivia command
This commit is contained in:
parent
38a75b86af
commit
c5faafb072
6
APKBUILD
6
APKBUILD
|
@ -1,8 +1,8 @@
|
||||||
# Contributor: Marty Sluijtman <marty.wanderer@disroot.org>
|
# Contributor: Marty Sluijtman <marty.wanderer@disroot.org>
|
||||||
# Maintainer: Marty Sluijtman <marty.wanderer@disroot.org>
|
# Maintainer: Marty Sluijtman <marty.wanderer@disroot.org>
|
||||||
pkgname=sheet-parser
|
pkgname=sheet-parser
|
||||||
pkgver=0.3
|
pkgver=0.4
|
||||||
pkgrel=6
|
pkgrel=0
|
||||||
pkgdesc="A little D&D character sheet parser written in go"
|
pkgdesc="A little D&D character sheet parser written in go"
|
||||||
url="https://gitlab.com/EternalWanderer/sheet-parser"
|
url="https://gitlab.com/EternalWanderer/sheet-parser"
|
||||||
arch="all"
|
arch="all"
|
||||||
|
@ -28,7 +28,7 @@ package() {
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="
|
sha512sums="
|
||||||
425236cc04fa682b62efe876e036e2d4bbc8d6b9082c72e59ad3bc0e4c04ac8062fb7155420cc9d8fcd92e2b14509fc8fead434d687d9c65295c0bddd3b999d5 sheet-parser-0.3.tar.gz
|
b4dadf3252bfb01baad65823149ec379bd50efc02ffe68dab9b9d905fb928425d66653cf33f0a672916c143e74bba2b473f1d4f215976e381f483e59620b0dae sheet-parser-0.4.tar.gz
|
||||||
c1800a72d8d229d46a7ea2dffb83f97c7edaf773a9a875a2ae10b449ae84ab854b80eac05a62002f6a686bb8b014c9b1bc8e2359286b2edccda4d90227a473e5 zsh.completion
|
c1800a72d8d229d46a7ea2dffb83f97c7edaf773a9a875a2ae10b449ae84ab854b80eac05a62002f6a686bb8b014c9b1bc8e2359286b2edccda4d90227a473e5 zsh.completion
|
||||||
b2c696f4dec885014fb39a313f0cf80798aa80ad119c9fc4d9b10b7d80d62df603852142115aa9f925fc49bc865e6fafd37c0fe143bcde406bf380ff96655591 example.json
|
b2c696f4dec885014fb39a313f0cf80798aa80ad119c9fc4d9b10b7d80d62df603852142115aa9f925fc49bc865e6fafd37c0fe143bcde406bf380ff96655591 example.json
|
||||||
"
|
"
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
||||||
VERSION = 0.3
|
VERSION = 0.4
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
MANPAGE = sheet-parser.1
|
MANPAGE = sheet-parser.1
|
||||||
MANPREFIX = $(PREFIX)/share/man
|
MANPREFIX = $(PREFIX)/share/man
|
||||||
|
|
12
main.go
12
main.go
|
@ -97,6 +97,18 @@ func main() {
|
||||||
fmt.Printf("Name: %s\tLevel: %d\tProficiency: %d\n", char.Misc.Name, char.Misc.Level, getProficiency())
|
fmt.Printf("Name: %s\tLevel: %d\tProficiency: %d\n", char.Misc.Name, char.Misc.Level, getProficiency())
|
||||||
fmt.Printf("Race: %s\tClass: %s\tBackground: %s\n", char.Misc.Race, char.Misc.Class, char.Misc.Background)
|
fmt.Printf("Race: %s\tClass: %s\tBackground: %s\n", char.Misc.Race, char.Misc.Class, char.Misc.Background)
|
||||||
|
|
||||||
|
// passive perception
|
||||||
|
var passivePerception int
|
||||||
|
switch {
|
||||||
|
case getSkill("perception").Proficient && getSkill("perception").Expertise:
|
||||||
|
passivePerception = 10 + getModifier(getStat("wisdom")) + getProficiency()*2
|
||||||
|
case getSkill("perception").Proficient:
|
||||||
|
passivePerception = 10 + getModifier(getStat("wisdom")) + getProficiency()
|
||||||
|
default:
|
||||||
|
passivePerception = 10 + getModifier(getStat("wisdom"))
|
||||||
|
}
|
||||||
|
fmt.Printf("Passive perception: %d\n", passivePerception)
|
||||||
|
|
||||||
case stat_list && skill_list:
|
case stat_list && skill_list:
|
||||||
printStatList(verbose)
|
printStatList(verbose)
|
||||||
printSkillList(verbose)
|
printSkillList(verbose)
|
||||||
|
|
Loading…
Reference in a new issue