This repository has been archived by the owner on Aug 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathstones.go
57 lines (51 loc) · 1.45 KB
/
stones.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package main
type stone int
const (
InertStone stone = iota
TeleStone
FogStone
QueenStone
TreeStone
ObstructionStone
)
const NumStones = int(ObstructionStone) + 1
func (s stone) String() (text string) {
switch s {
case InertStone:
text = "inert stone"
case TeleStone:
text = "teleport stone"
case FogStone:
text = "fog stone"
case QueenStone:
text = "queenstone"
case TreeStone:
text = "tree stone"
case ObstructionStone:
text = "obstruction stone"
}
return text
}
func (s stone) Description() (text string) {
switch s {
case InertStone:
text = "This stone has been depleted of magical energies."
case TeleStone:
text = "Any creature standing on the teleport stone will teleport away when hit in combat."
case FogStone:
text = "Fog will appear if a creature is hurt while standing on the fog stone."
case QueenStone:
text = "If a creature is hurt while standing on queenstone, a loud boom will resonate, leaving nearby monsters in a 2-range distance confused. You know how to avoid the effect yourself."
case TreeStone:
text = "Any creature hurt while standing on a tree stone will be lignified."
case ObstructionStone:
text = "When a creature is hurt while standing on the obstruction stone, temporal walls appear around it."
}
return text
}
func (g *game) UseStone(pos position) {
g.StoryPrintf("Activated a %s.", g.MagicalStones[pos])
g.MagicalStones[pos] = InertStone
g.Stats.UsedStones++
g.Print("The stone becomes inert.")
}