Dictionary added.

This commit is contained in:
Elliott Pardee 2015-01-04 22:09:23 -05:00
parent eb138bf59c
commit 9adf9925af
2 changed files with 29 additions and 1 deletions

View File

@ -11,7 +11,7 @@ TODO:
* ~~Stat Manipulation~~
* ~~Permission System~~
* ~~Character System~~
* Dictionary for abbreviations (hp, ap, algn, xp)
* ~~Dictionary for abbreviations (hp, ap, algn, xp)~~
* Import/Export Character
* Save Progress Midway
* Story Interaction (through PM w/ dungeon master)

28
bot.go
View File

@ -25,6 +25,21 @@ var (
monsmap = make(map[string]string)
)
var dict = map[string]string{
"hp": "health points",
"ap": "armour points",
"algn": "alignment",
"xp": "experience points",
"str": "strength",
"dex": "dexterity",
"wis": "wisdom",
"cha": "charisma",
"lvl": "level",
"hgt": "height",
"wgt": "weight",
"cls": "class",
}
func stringInSlice(a string, list []string) bool {
// thanks stackoverflow
for _, b := range list {
@ -56,6 +71,19 @@ func findArguments(msg string) []string {
return args
}
func loadSheet(file string) {
// TODO: JSON character sheets.
// http://github.com/kirbyman62/osric-character-sheet-to-json
}
func exportSheet(nick string) {
// TODO
}
func save() {
// TODO
}
func fillCharmap(nick string, cat string, item string, val string) {
// thanks jmbi
charmap = map[string]map[string]map[string]string { nick: map[string]map[string]string{ cat: map[string]string{ item: val, }, }, }