Fix cave bug; fix open/get commands

This commit is contained in:
Logen Kain 2018-03-04 00:18:16 -07:00
parent 97675ed9ec
commit ef12efb01f

View File

@ -51,7 +51,7 @@ func main() {
chestItems, chestItems,
"none", "none", "entry", "none"}, "none", "none", "entry", "none"},
"cave": {"Cave", "\nA beast of inconevialable horror dwells in this" + "cave": {"Cave", "\nA beast of inconevialable horror dwells in this" +
" cave and proceds to tear you apart.", " cave and proceds to tear you apart.\n",
caveItems, caveItems,
"none", "none", "none", "entry"}, "none", "none", "none", "entry"},
} }
@ -112,6 +112,7 @@ func main() {
"(l)ook\n" + "(l)ook\n" +
"(g)et\n" + "(g)et\n" +
"(o)pen\n" +
"(u)se\n" + "(u)se\n" +
"(i)nventory\n\n") "(i)nventory\n\n")
@ -156,7 +157,7 @@ func main() {
} }
println("") println("")
case "get": case "g", "get":
if command[1] == "" { if command[1] == "" {
println("") println("")
println("Get what? ") println("Get what? ")
@ -184,7 +185,7 @@ func main() {
} }
} }
println("\nI don't see any", command[1], "to get!") println("\nI don't see any", command[1], "to get!")
case "open": case "o", "open":
if command[1] == "" { if command[1] == "" {
println("") println("")
println("Open what? ") println("Open what? ")
@ -237,6 +238,7 @@ func main() {
delete(player.items, "steak") delete(player.items, "steak")
} }
if steak_happened == false { if steak_happened == false {
println(player.loc.description)
println("Well, it looks like you died! Good luck next time!") println("Well, it looks like you died! Good luck next time!")
quit = true quit = true
} }