forked from jacobabrennan/CasualQuest-DM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
card.dm
520 lines (509 loc) · 11.3 KB
/
card.dm
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
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
/*
Knight
+ : ............
- : ......
Priest
+ : .........
- : .....
Mage
+ : .............
- : ......
Rogue
+ : ............
- : ........
*/
/*
Name
Tier
Knight Level
Priest Level
Mage Level
Rogue Level
Max Health
Max Aura
Aura Rate
Speed
Main Attack
Skill1
Skill2
Skill3
Notes
*/
proc
convert_path_to_class(path)
var
index = 0
lastSlash = 0
do
index = findtextEx(path, index+1)
if(index) lastSlash = index
while(index)
return copytext(path, lastSlash+1)
/*
var new_pos = findtext(class,"/",(pos+1))
if(new_pos>pos)
return convert_path_to_class(class,new_pos)
else if(new_pos<pos)
return copytext(class,(pos+1))
else
return copytext(class,(new_pos+1))
*/
game/hero
var
tier = 1
game/card{
parent_type = /datum
var{
description
file = 'sign.png'
option1 = "Yes (1)"
option2 = "No (2)"
list/choosers = new()
}
proc{
choose(var/game/hero/H, which){
}
transform(var/game/hero/H, knight, priest, mage, rogue){
var/level_max = H.level_knight + H.level_priest + H.level_mage + H.level_rogue;
var/level_knight = max(0, min(3, H.level_knight + knight))
var/level_priest = max(0, min(3, H.level_priest + priest))
var/level_mage = max(0, min(3, H.level_mage + mage ))
var/level_rogue = max(0, min(3, H.level_rogue + rogue ))
if(level_max >= 4){
level_knight = max(0, min(3, knight))
level_priest = max(0, min(3, priest))
level_mage = max(0, min(3, mage ))
level_rogue = max(0, min(3, rogue ))
}
var/class_level = "[level_knight][level_priest][level_mage][level_rogue]"
var/class_path
var/client/H_client = H.player
if(istype(H_client)){
var/game/hero/lich/skeleton/_skeleton = H
if(istype(_skeleton)){
class_path = _skeleton.hero_type
}
else if(H_client.subscription){
class_path = game.subscriber_archetypes[class_level]
}
else{
class_path = game.hero_archetypes[class_level]
}
if(istype(class_path, /list)){
var/list/classes = class_path
classes.Remove(H.type)
if(classes.len){
class_path = pick(classes)
}
else{
class_path = null
}
}
}
if(class_path == H.type || !class_path){
var/tier = H.level_knight + H.level_priest + H.level_mage + H.level_rogue
switch(tier){
if(0,1,4){ return}
if(2){
var/list/classes = list(
/game/hero/dragoon,
/game/hero/paladin,
/game/hero/dark_knight,
/game/hero/barbarian,
/game/hero/cleric,
/game/hero/druid,
/game/hero/bard,
/game/hero/wizard,
/game/hero/nomad,
/game/hero/pirate,
)
classes.Remove(H.type)
class_path = pick(classes)
}
}
}
if(!class_path){ return}
/*
var topic_path = convert_path_to_class("[class_path]")
if(ckey(topic_path)=="lich") { topic_path="Necromancer"}
else if(ckey(topic_path)=="rebel") { topic_path="Revolutionary"}
else if(ckey(topic_path)=="assassin") { topic_path="Ninja"}
else if(ckey(topic_path)=="blank") { topic_path="Adventurer"}
else if(ckey(topic_path)=="member") { topic_path="Member's Adventurer"}
for(var/game/hero/class_match) {
if(ckey(class_match.name) == ckey(topic_path)) { topic_path = class_match.name;break}
}
*/
var/client/switching_player = H.player
game.add_hero(switching_player, class_path)
switching_player.hero.output_class_link(world, switching_player)
}
}
card_1{
file = 'fortune_teller.png'
description = "On your way you happen upon a fortune teller. Do you stop and get your fortune told?"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 0, 0, 1, 0)
}
if(2){
transform(H, 0, 1,-1, 0)
}
}
}
}
card_2{
file = 'fortune_teller.png'
description = "On your way you happen upon a fortune teller. Do you believe in her prophesies?"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H,-1, 1, 0, 0)
}
if(2){
transform(H, 1,-1, 0, 0)
}
}
}
}
card_3{
file = 'fortune_teller.png'
description = "You find a boisterous hag rambling about treasured secrets. Do you stop and listen?"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 0, 0, 0, 1)
}
if(2){
transform(H, 0, 1, 0,-1)
}
}
}
}
card_4{
file = 'sign.png'
description = "In your way there is an ominous sign telling of danger ahead. Do you take another route?"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H,-1, 0, 0, 1)
}
if(2){
transform(H, 1, 0, 0, 0)
}
}
}
}
card_5{
weight_1{}
weight_2{}
file = 'sign.png'
description = "There is a shipwreck with a sign in front of it. It warns of death inside. Do you go in?"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 0,-1, 0, 1)
}
if(2){
transform(H, 0, 0, 1,-1)
}
}
}
}
card_6{
file = 'sign.png'
description = "You need water and there is a lake ahead. A sign tells of danger. Do you go for water or leave?"
option1 = "Water (1)"
option2 = "Leave (2)"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 0, 0, 1,-1)
}
if(2){
transform(H,-1, 0, 0, 1)
}
}
}
}
card_8{
file = 'split.png'
description = "You are tired and encounter a sign telling of lodging. It is off your route. Do you take it?"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 0, 0, 1,-1)
}
if(2){
transform(H, 0, 0,-1, 1)
}
}
}
}
card_10{
file = 'treasure.png'
description = "You find a treasure chest. Do you have your friends help disarm it and share the gold, or do you chance it and take it all?"
option1 = "Take (1)"
option2 = "Share (2)"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 0,-1, 0, 1)
}
if(2){
transform(H, 0, 1, 0,-1)
}
}
}
}
card_12{
file = 'treasure.png'
description = "On your way you find a monkey sleeping on a chest up on a ledge. Do you throw rocks?"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 0,-1, 0, 1)
}
if(2){
transform(H, 0, 1, 0,-1)
}
}
}
}
card_13{
file = 'cave.png'
description = "There is a mountain in your way with a cave at the base of it. Do you take the cave or the mountain pass?"
option1 = "Cave (1)"
option2 = "Pass (2)"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 0, 0, 1, 0)
}
if(2){
transform(H, 1, 0, 0, 0)
}
}
}
}
card_14{
file = 'cave.png'
description = "You are hungry and the cave in front of you looks as if there is wild life inside. Do you go hunting in the cave or move on?"
option1 = "Hunt (1)"
option2 = "Leave (2)"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 1, 0,-1, 0)
}
if(2){
transform(H, 0, 0, 1, 0)
}
}
}
}
card_15{
file = 'traveller.png'
description = "On the road you find a traveler. He is asking for assistance. Do you help him?"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 0, 1, 0,-1)
}
if(2){
transform(H, 0,-1, 0, 1)
}
}
}
}
card_16{
file = 'traveller.png'
description = "On the road you find a skilled traveler of this area. Do you ask for his help?"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 0, 0, 1, 0)
}
if(2){
transform(H, 1, 0, 0, 0)
}
}
}
}
card_17{
file = 'traveller.png'
description = "There is a man demanding money to use his road. Do you call him a fool or pay his toll."
option1 = "Pay (1)"
option2 = "Laugh (2)"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 1, 0, 0, 0)
}
if(2){
transform(H,-1, 0, 0, 1)
}
}
}
}
card_18{
file = 'lightning.png'
description = "A storm is forming up ahead. Do you make camp or continue on?"
option1 = "Camp (1)"
option2 = "Leave (2)"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 0, 1,-1, 0)
}
if(2){
transform(H, 0, 0, 1, 0)
}
}
}
}
card_19{
file = 'lightning.png'
description = "A storm has forced you to change your course. Do you head to the forest or into a cave?"
option1 = "Forest (1)"
option2 = "Cave (2)"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H,-1, 1, 0, 0)
}
if(2){
transform(H, 0, 0, 1,-1)
}
}
}
}
card_20{
file = 'lightning.png'
description = "There is a foreboding cloud forming above a single cottage. Do you investigate?"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H,-1, 0, 1, 0)
}
if(2){
transform(H, 0, 0,-1, 1)
}
}
}}
card_21{
file = 'camp_fire.png'
description = "You stumble upon an empty camp site. Do you use it or leave?"
option1 = "Use (1)"
option2 = "Leave (2)"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 0, 0,-1, 1)
}
if(2){
transform(H, 1, 0, 0, 0)
}
}
}
}
card_22{
file = 'camp_fire.png'
description = "You are ready to make camp. Do you make it near the road or head away to a more private spot?"
option1 = "Road (1)"
option2 = "Private (2)"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 1, 0, 0, 0)
}
if(2){
transform(H, 0, 0, 0, 1)
}
}
}
}
card_23{
file = 'camp_fire.png'
description = "There is a man offering to share his camp site with you. Do you accept?"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 1, 0, 0, 0)
}
if(2){
transform(H, 0, 0, 1, 0)
}
}
}
}
card_24{
file = 'swamp_woman.png'
description = "There is a woman being thrown into quick sand by two men. Do you help her first or deal with the two men?"
option1 = "Help (1)"
option2 = "Fight (2)"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 0, 1, 0, 0)
}
if(2){
transform(H, 1, 0, 0, 0)
}
}
}
}
card_25{
file = 'swamp_woman.png'
description = "There is a large group of people screaming and running away from a woman in a pit. Do you help her or stay away?"
option1 = "Help (1)"
option2 = "Leave (2)"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 1, 0, 0, 0)
}
if(2){
transform(H, 0, -1, 1, 0)
}
}
}
}
card_26{
file = 'swamp_woman.png'
description = "There is a statue of a woman in a sand pit. Do you touch its outreached hand or walk away?"
option1 = "Touch (1)"
option2 = "Leave (2)"
choose(var/game/hero/H, which){
switch(which){
if(1){
transform(H, 0, 0, 1, 0)
}
if(2){
transform(H, 1, 0, 0, 0)
}
}
}
}
card_gnome{
file = 'gnome.png'
description = "Gone Fishing"
option1 = "Stawberry!"
option2 = "Blueberry!"
choose(var/game/hero/H, which){
var/client/C = H.player
switch(which){
if(1){
game.add_hero(H.player, /game/hero/gnome/red)
}
if(2){
game.add_hero(H.player, /game/hero/gnome/blue)
}
}
if(istype(C)){
C << {"<img class="icon" src="\ref[C.hero.icon]" icondir="EAST" iconframe="2"><b>Attack your Friends for Fun and Profit!</b>"}
}
}
}
}