Browse Source

Skills and Songs shouldn't go above 6

master
Noëlle Anthony 5 years ago
parent
commit
4da90f1141
1 changed files with 10 additions and 2 deletions
  1. 10
    2
      main.go

+ 10
- 2
main.go View File

@@ -152,7 +152,11 @@ func main() {
if r < sklBrk { // it's a skill
if rand.Intn(3) == 0 && len(ply.Skills) != 0 {
key, val := util.ChoiceMap(ply.Skills)
ply.Skills[key] = val + 1
if ply.Skills[key] == 6 {
i++
} else {
ply.Skills[key] = val + 1
}
} else {
q := rand.Intn(ply.TotalForces)
skl := ""
@@ -181,7 +185,11 @@ func main() {
} else { // Songs
if rand.Intn(3) == 0 && len(ply.Songs) != 0 {
key, val := util.ChoiceMap(ply.Songs)
ply.Songs[key] = val + 1
if ply.Songs[key] == 6 {
i++
} else {
ply.Songs[key] = val + 1
}
} else {
skl := util.ChoiceStr(songList)
// fmt.Println("Selected song: ", skl)

Loading…
Cancel
Save