瀏覽代碼

Skills and Songs shouldn't go above 6

master
Noëlle Anthony 5 年之前
父節點
當前提交
4da90f1141
共有 1 個文件被更改,包括 10 次插入2 次删除
  1. 10
    2
      main.go

+ 10
- 2
main.go 查看文件

@@ -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…
取消
儲存