-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevents.go
273 lines (236 loc) · 4.74 KB
/
events.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
package main
import "fmt"
// ***SELECTION OF EVENTS***
//
// 3550
func selectionOfEvents() {
D1 = 0
restore()
R1 = 100 * rnd(-1)
for {
// 3580
D1 = D1 + 1
if D1 == 16 {
evHelpfulIndians() // 4670
return
} else {
read(&D)
if R1 <= D {
break
}
}
}
// 3620
data(6, 11, 13, 15, 17, 22, 32, 35, 37, 42, 44, 54, 64, 69, 95)
if D1 > 10 {
// 3650
on_goto(D1-10,
evPoisonousSnake, // 4220
evWagonSwamped, // 4290
evWildAnimalsAttack, // 4340
evHailStorm, // 4560
evIllness, // 4610
evHelpfulIndians, // 4670
)
} else {
// 3640
on_goto(D1,
evWagonBreaksDown, // 3660
evOxInjuresLeg, // 3700
evBadLuck, // 3740
evOxWandersOff, // 3790
evYourSonGetsLost, // 3820
evUnsafeWater, // 3850
evHeavyRains, // 3880
evBanditsAttack, // 3960
evFireInWagon, // 4130
evHeavyFog, // 4190
)
}
}
// 3660
func evWagonBreaksDown() {
fmt.Println("WAGON BREAKS DOWN--LOSE TIME AND SUPPLIES FIXING IT")
M = M - 15 - 5*rnd(-1)
M1 = M1 - 8
mountains() // 4710
}
// 3700
func evOxInjuresLeg() {
fmt.Println("OX INJURES LEG---SLOWS YOU DOWN REST OF TRIP")
M = M - 25
A = A - 20
mountains() // 4710
}
// 3740
func evBadLuck() {
fmt.Println("BAD LUCK---YOUR DAUGHTER BROKE HER ARM")
fmt.Println("YOU HAD TO STOP AND USE SUPPLIES TO MAKE A SLING")
M = M - 5 - 4*rnd(-1)
M1 = M1 - 2 - 3*rnd(-1)
mountains() // 4710
}
// 3790
func evOxWandersOff() {
fmt.Println("OX WANDERS OFF---SPEND TIME LOOKING FOR IT")
M = M - 17
mountains() // 4710
}
// 3820
func evYourSonGetsLost() {
fmt.Println("YOUR SON GETS LOST---SPEND HALF THE DAY LOOKING FOR HIM")
M = M - 10
mountains() // 4710
}
// 3850
func evUnsafeWater() {
fmt.Println("UNSAFE WATER--LOSE TIME LOOKING FOR CLEAN SPRING")
M = M - 10*rnd(-1) - 2
mountains() // 4710
}
// 3880
func evHeavyRains() {
if M > 950 {
// 4490
fmt.Print("COLD WEATHER---BRRRRRRR!---YOU ")
if C <= 22+4*rnd(-1) {
fmt.Print("DON'T ")
C1 = 1
}
fmt.Println("HAVE ENOUGH CLOTHING TO KEEP YOU WARM")
if C1 == 0 { // 4710
mountains()
} else {
illnessSubRoutine() // 6300
}
} else {
// 3890
fmt.Println("HEAVY RAINS---TIME AND SUPPLIES LOST")
F = F - 10
B = B - 500
M1 = M1 - 15
M = M - 10*rnd(-1) - 5
mountains() // 4710
}
}
// 3960
func evBanditsAttack() {
fmt.Println("BANDITS ATTACK")
shootingSubRoutine() // 6140
B = B - 20*B1
if B >= 0 { // 3980
if B1 <= 1 { // 4030
// 4100
fmt.Println("QUICKEST DRAW OUTSIDE OF DODGE CITY!!!")
fmt.Println("YOU GOT 'EM!")
mountains() // 4710
return
}
} else {
fmt.Println("YOU RAN OUT OF BULLETS---THEY GET LOTS OF CASH")
T = T / 3.0
}
// 4040
fmt.Println("YOU GOT SHOT IN THE LEG AND THEY TOOK ONE OF YOUR OXEN")
K8 = 1
fmt.Println("BETTER HAVE A DOC LOOK AT YOUR WOUND")
M1 = M1 - 5
A = A - 20
mountains() // 4710
}
// 4130
func evFireInWagon() {
fmt.Println("THERE WAS A FIRE IN YOUR WAGON--FOOD AND SUPPLIES DAMAGED")
F = F - 40
B = B - 400
M1 = M1 - rnd(-1)*8 - 3
M = M - 15
mountains() // 4710
}
// 4190
func evHeavyFog() {
fmt.Println("LOSE YOUR WAY IN HEAVY FOG---TIME IS LOST")
M = M - 10 - 5*rnd(-1)
mountains() // 4710
}
// 4220
func evPoisonousSnake() {
fmt.Println("YOU KILLED A POISONOUS SNAKE AFTER IT BIT YOU")
B = B - 10
M1 = M1 - 5
if M1 >= 0 {
// 4280
mountains() /// 4710
} else {
// 4260
fmt.Println("YOU DIE OF SNAKEBITE SINCE YOU HAVE NO MEDICINE")
dying() // 5170
}
}
// 4290
func evWagonSwamped() {
fmt.Println("WAGON GETS SWAMPED FORDING RIVER--LOSE FOOD AND CLOTHES")
F = F - 30
C = C - 20
M = M - 20 - 20*rnd(-1)
mountains() /// 4710
}
// 4340
func evWildAnimalsAttack() {
fmt.Println("WILD ANIMALS ATTACK!")
shootingSubRoutine() // 6140
if B > 39 { // 4360
if B1 > 2 { // 4410
fmt.Println("SLOW ON THE DRAW---THEY GOT AT YOUR FOOD AND CLOTHES")
} else {
fmt.Println("NICE SHOOTIN' PARDNER---THEY DIDN'T GET MUCH")
}
// 4450
B = B - 20*B1
C = C - B1*4
F = F - B1*8
mountains() // 4710
} else {
// 4370
fmt.Println("YOU WERE TOO LOW ON BULLETS--")
fmt.Println("THE WOLVES OVERPOWERED YOU")
K8 = 1
diedOf() // 5120
}
}
// 4560
func evHailStorm() {
fmt.Println("HAIL STORM---SUPPLIES DAMAGED")
M = M - 5 - rnd(-1)*10
B = B - 200
M1 = M1 - 4 - rnd(-1)*3
mountains() // 4710
}
// 4610
func evIllness() {
if E == 1 {
illnessSubRoutine() // 6300
} else {
if E == 3 {
// 4650
if rnd(-1) < .5 {
illnessSubRoutine() // 6300
} else {
mountains() // 4710
}
} else {
// 4630
if rnd(-1) > .25 {
illnessSubRoutine() // 6300
} else {
mountains() // 4710
}
}
}
}
// 4670
func evHelpfulIndians() {
fmt.Println("HELPFUL INDIANS SHOW YOU WHERE TO FIND MORE FOOD")
F = F + 14
mountains() // 4710
}