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

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

Loading…
Cancel
Save