-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTest.java
980 lines (862 loc) · 20.9 KB
/
Test.java
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
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
//progression goes here.
mob
Login()
..()
spawnItem(/obj/item/gear/weapon/sword/rapier, src, null, 1)
spawnItem(/obj/item/gear/weapon/sword/falchion, src, null, 1)
spawnItem(/obj/item/gear/weapon/sword/longsword, src, null, 1)
spawnSet(src, 1)
Move(locate("Flashpoint"))
var/mob/M = new()
M.loc = locate("Flashpoint")
M.name = "Faster"
M.sp.perm(2)
var/mob/X = new()
X.loc = locate("Flashpoint")
X.name = "Fast"
X.sp.perm(1)
var/area/A = locate("Flashpoint")
var/mob/Z = new()
Z.loc = locate("Flashpoint")
Z.name = "Fastest"
Z.sp.perm(4)
new /battleAdmin(A)
var
const
single = 1
double = 2
range = 3
stat
var
value
maxValue
name
mob/container
vessel
range
New(newname, newvalue, user, rangeNumber, zeroed, booltype) //zeroed is a boolean meant to force a start at zero
..()
var/x
if(!user)
world << "[newname] deleted due to lacking a container"
del src
container = user
if(newname)
name = newname
else
newname = "Null Stat"
if(newvalue)
x = newvalue
else
x = 0
if(rangeNumber)
maxValue = rangeNumber
value = x
maxValue = x
if(booltype == "vessel")
vessel = 1
if(booltype == "range")
range = 1
proc
change(n)
value = n
maxValue = n
maxChange(n)
maxValue = n
add(n)
value += n
if(value > maxValue)
value = maxValue
container.statUpdate()
sub(n)
value -= n
if(value < 0)
value = 0
container.statUpdate()
mult(n)
value *= n
if(value > maxValue)
value = maxValue
container.statUpdate()
perm(n)
value += n
maxValue += n
container.statUpdate()
permChange(n)
value = n
maxValue = n
container.statUpdate()
display(n)
if(n == 1)
return "[value]"
if(n == 2)
return "[value]/[maxValue]"
if(n == 3)
return "[value] - [maxValue]"
restore()
value = maxValue
toPercent()
return "[round(100 * value / maxValue)]%"
mob
var
stat
level
hp
ele
shield
stam
cons
agil
str
fin
apt
res
sp
armorVal
weaponVal
weaponRange
defVal
atkVal
momentum
critChance
critDamage
critChMod
critDmgMod
baseSp
list
debuffList
statList
hidList
equipList
inventory
New()
level = new("Level", 1, src)
hp = new("Health", 50, src, null,null, "vessel")
ele = new("Element", 20, src, null, null, "vessel")
shield = new("Shield", 30, src, null, null, "vessel")
stam = new("Stamina", 20, src, null, null, "vessel")
cons = new("Constitution", 0, src)
agil = new("Agility", 0,src)
str = new("Strength", 1, src)
fin = new("Finesse", 0,src)
apt = new("Aptitude", 0,src)
res = new("Resistance", 1 ,src)
sp = new("Speed", 0,src)
defVal = new("Defense Value", 0,src)
atkVal = new("Attack Value", 3,src, null, null, "range")
armorVal = new("Armor Value", 0,src)
weaponVal = new("Weapon Value", 0,src)
weaponRange = new("Weapon Range",0,src)
momentum = new("Momentum",0,src)
critChance = new("Critical Chance", 0, src)
critDamage = new("Critical Damage", 0, src)
critChMod = new("Weapon Critical Chance", 0 ,src)
critDmgMod = new("Weapon Critical Damage", 0, src)
baseSp = new("Base Speed", 0, src)
statList = new
statList += list(level,hp,ele,shield,stam,cons,agil,str,fin,apt,res,sp,defVal,atkVal)
hidList = new
hidList += list(level, hp, ele, shield, stam, cons, agil, str, fin, apt, res, sp, armorVal, weaponVal, weaponRange, defVal, atkVal, momentum, critChance, critDamage)
equipList = new
inventory = new
statUpdate(1)
proc
statUpdate(var/x)
defVal.change(res.value*2 + armorVal.value)
atkVal.change(str.value*2 + weaponVal.value)
atkVal.maxChange(atkVal.value + weaponRange.value)
sp.change(baseSp.value + momentum.value*4)
critChance.change((-(1/(0.015*fin.value + 1)) + 1.15) * 100 + critChMod.value)
critDamage.change(max(1,(0.1*sqrt(str.value)) + 1) + critDmgMod.value)
if(x)
hp.change(cons.value*4 + level.value*10 + 50)
stam.change(str.value*2 + 20)
Stat()
for(var/stat/s in statList)
if(s.vessel)
stat("[s.name]", "[s.display(2)]")
if(s.range)
stat("[s.name]", "[s.display(3)]")
if(!s.vessel && !s.range)
stat("[s.name]", "[s.display(1)]")
statpanel("Inventory")
for(var/obj/o in inventory)
stat("[o.name]")
verb
display_hidden()
for(var/stat/s in hidList)
if(s.vessel)
src << "[s.name] [s.display(2)]"
if(s.range)
src << "[s.name] [s.display(3)]"
if(!s.vessel && !s.range)
src << "[s.name] [s.display(1)]"
proc
generate_4let()
var/a = ascii2text(rand(97, 122))
var/b = ascii2text(rand(48,57))
var/c = ascii2text(rand(65,90))
var/d = ascii2text(rand(48,57))
return "[a][b][c][d]"
generate_6let()
var/a = ascii2text(rand(97, 122))
var/b = ascii2text(rand(97, 122))
var/c = ascii2text(rand(48,57))
var/d = ascii2text(rand(65,90))
var/e = ascii2text(rand(48,57))
var/f = ascii2text(rand(65,90))
return "[a][b][c][d][e][f]"
material_gen(var/n)
if(n > 0 && n <= 4)
return "Engineered Steel"
if(n > 4 && n <= 8)
return "Carbon-Alloy"
if(n > 8 && n <= 12)
return "Kronz"
if(n > 12 && n <= 16)
return "Berlitz"
if(n > 16 && n <= 20)
return "Refined Titanium"
if(n > 20 && n <= 24)
return "Solidified Xenon"
armor_gen(var/n)
if(n > 0 && n <= 3)
return "Compressed Steel"
if(n > 3 && n <= 6)
return "Bucket Alloy"
if(n > 6 && n <= 9)
return "Reflexive Kronz"
if(n > 9 && n <= 12)
return "Hyper Berlitz"
if(n > 12 && n <= 15)
return "Refined Compressed Titanium"
if(n > 15 && n <= 18)
return "Solidified Conduction Xenon"
spawnItem(var/typePath, var/location, var/customName, var/customNum)
var/notNamed
var/mob/m
var/area/a
var/obj/o
if(!customNum)
customNum = 1
var/n = customNum
if(!customName)
notNamed = 1
if(istype(location, /mob))
m = location
if(istype(location,/area))
a = location
if(ispath(typePath, /obj/item/gear/weapon))
var/obj/item/gear/g = new typePath(n)
if(notNamed)
g.name = "[material_gen(g.numGen(n))] [g.name]"
o = g
if(ispath(typePath, /obj/item/gear/equipment))
var/obj/item/gear/equipment/e = new typePath(n)
if(notNamed)
e.name = "[armor_gen(e.numGen(n))] [e.name]"
o = e
if(m)
m.inventory += o
o.loc = m
if(a)
o.loc = a
spawnSet(var/location, var/customNum)
spawnItem(/obj/item/gear/equipment/lightArmor/head/helm, location, null, customNum)
spawnItem(/obj/item/gear/equipment/lightArmor/torso/armor, location, null, customNum)
spawnItem(/obj/item/gear/equipment/lightArmor/arms/gauntlets, location, null, customNum)
spawnItem(/obj/item/gear/equipment/lightArmor/legs/leggings, location, null, customNum)
spawnItem(/obj/item/gear/equipment/lightArmor/feet/boots, location, null, customNum)
mob
proc
equipItem()
var/list/selection = new
for(var/obj/item/gear/x in inventory)
selection += x
var/obj/item/gear/g = input("Which item to equip?") as null|anything in selection
if(!g)
return
if(g.slot == "1hand")
var/choice = input("Equip in mainhand or offhand?") as null|anything in list("mainhand","offhand")
if(!choice)
return
g.slot = choice
g.equipProc(src)
unequipItem()
var/obj/item/gear/g = input("Which item to unequip?") as null|anything in equipList
if(!g)
return
g.unequipProc(src)
verb
equip()
equipItem()
unequip()
unequipItem()
obj
item
gear
var
val
slot
proc
equipProc(var/mob/user)
for(var/obj/item/gear/g in user.equipList)
if(g.slot == src.slot)
g.unequipProc(user)
user.equipList += src
user.inventory -= src
user << "You have equipped [src]."
unequipProc(var/mob/user)
user.equipList -= src
user.inventory += src
user << "You have unequipped [src]."
if(slot == "offhand" || slot == "mainhand")
slot = "1hand"
numGen(var/n)
return n
function()
invfunction()
weapon
var
maxVal
secVal
basicSpec
proc
weaponEffect()
equipProc(var/mob/user)
..(user)
user.weaponVal.perm(val)
user.weaponRange.perm(maxVal)
function(user)
unequipProc(var/mob/user)
..(user)
user.weaponRange.perm(-maxVal)
user.weaponVal.perm(-val)
invfunction(user)
sword
slot = "1hand"
rapier
New(var/n)
name = "Rapier"
val = rand(n + 3, n + 5)
maxVal = rand(n + 8, n + 10)
secVal = rand(5, 15)
function(var/mob/user)
user.critChMod.perm(secVal)
invfunction(var/mob/user)
user.critChMod.perm(-secVal)
falchion
New(var/n)
name = "Falchion"
val = rand(n + 6, n + 15)
maxVal = rand(n + 2, n + 4)
secVal = rand(1,3) * 0.1
function(var/mob/user)
user.critDmgMod.perm(secVal)
invfunction(var/mob/user)
user.critDmgMod.perm(-secVal)
longsword
New(var/n)
name = "Longsword"
val = rand(n + 8, n + 18)
maxVal = rand(n + 2, n + 4)
pistol
slot = "1hand"
revolver
New(var/n)
name = "Revolver"
val = rand(n + 6, n + 10)
maxVal = rand(n + 3, n + 5)
beamPistol
New(var/n)
name = "Beam Pistol"
val = rand(n + 3, n + 8)
maxVal = rand(n + 5, n + 7)
function(var/mob/user)
user.critDmgMod.perm(secVal)
invfunction(var/mob/user)
user.critDmgMod.perm(-secVal)
equipment
equipProc(var/mob/user)
..(user)
user.armorVal.perm(val)
unequipProc(var/mob/user)
..(user)
user.armorVal.perm(-val)
lightArmor
head
helm
New(var/n)
name = "Helm"
val = rand(n + 4, n + 8)
torso
armor
New(var/n)
name = "Coat"
val = rand(n + 10, n + 15)
arms
gauntlets
New(var/n)
name = "Gloves"
val = rand(n + 5, n + 10)
legs
leggings
New(var/n)
name = "Leggings"
val = rand(n + 8, n + 12)
feet
boots
New(var/n)
name = "Boots"
val = rand(n + 4, n + 8)
proc
singleTargetDel(var/obj/skill/o)
if(!o.BLAST && o.BLAST != 0 && !o.WAVE)
o.user.hasMoved = 1
del o
triCollision(var/mob/first, var/mob/second)
var/obj/skill/a = first.actingSkill
var/obj/skill/b = second.actingSkill
if(a.triangle == "true")
if(b.triangle == "counter")
b.counterScene(a.user)
return second
if(a.triangle == "feint")
if(b.triangle == "counter")
a.feintScene(b.user)
return first
if(b.triangle == "true")
a.feintFailScene(b.user)
return second
return first
obj/item/gear/weapon
proc
basicAttack(var/mob/user)
var/obj/skill/s = new basicSpec()
user.knownSkills += s
obj
skill
var
isAttack = null
isDefense = null
mob/user
targetSpace
list
targets
BLAST
WAVE
triangle
special
range
obj/item/gear/weapon/spawnedSignature
New()
..()
targets = new
proc
actiMsg()
igniteSkill(var/mob/M, var/mob/target, var/trianglePlay, var/obj/item/gear/weapon/w)
var/obj/skill/s = new src.type()
M.actingSkill = s
M.actingSkill.activation(M, target)
if(s)
s.triangle = trianglePlay
if(w)
spawnedSignature = w
activation(var/mob/self, var/mob/target)
user = self
if(isAttack)
if(!BLAST && BLAST != 0 && !WAVE)
user.singleTarget(src, target)
else
if(BLAST || BLAST == 0)
user.spaceTarget(src, target)
else
user.waveTarget(src, target)
for(var/mob/M in targets)
if(M.actingSkill)
if(M.actingSkill.isDefense)
clashVsDefense(M)
continue
if(M in user.targetedBy)
clashVsOffense(M)
user.targetedBy -= M
continue
else if (M.hasMoved)
noClash(M)
continue
if(!M.targetedBy)
M.targetedBy = new
M.targetedBy += user
if(!special && !range)
if(user.client)
triangle = user.triangleAttack()
else if(isDefense)
actiMsg()
for(var/mob/M in user.targetedBy)
clashVsOffense(M)
for(var/mob/M in user.targetedBy)
if(M.actingSkill && M.actingSkill.isAttack)
M.actingSkill.noClash(user)
dmgScene()
clashVsDefense()
clashVsOffense()
noClash()
defScene()
feintScene(var/mob/target)
world << "[user] feints out [target]'s counter and moves first!"
feintFailScene(var/mob/target)
world << "[user]'s feint fails against [target]'s true attack!"
counterScene(var/mob/target)
world << "[user] successfully counters [target]'s true attack!"
strikeMsg(var/mob/target, var/damage, var/element)
if(!element)
element = "physical"
world << "[user] smacks [target] for [damage] points of [element] damage."
critMsg(var/mob/target)
world << "Critical hit on [target]!"
attack
actiMsg(var/mob/T)
world << "[user] attempts to smack [T]!"
isAttack = 1
clashVsOffense(var/mob/T)
if(!special && !range && user.client)
triangle = user.triangleCounter()
var/mob/target = T
var/obj/skill/o = T.actingSkill
var/obj/skill/oo = user.actingSkill
var/mob/first = target
var/mob/second = user
if(!o.range && !o.special && !oo.range && !oo.special)
first = triCollision(target, user)
if(user == first)
second = target
else
second = user
if(user.initiative)
first = user
second = target
if(target.initiative)
first = target
second = user
world << "[first] [second]"
first.actingSkill.dmgScene(second)
second.actingSkill.dmgScene(first)
singleTargetDel(src)
singleTargetDel(o)
clashVsDefense(var/mob/T)
T.actingSkill.defScene(user)
dmgScene(var/mob/target)
//hit effects on target
target.momentum.permChange(0)
target.initiative = null
//apply weapon element effect
var/element
if(spawnedSignature)
element = spawnedSignature.weaponEffect(target, "applied")
//inflict damage
var/damage = rand(user.atkVal.value, user.atkVal.maxValue)
world << "[damage]"
if(prob(user.critChance))
damage*=2
critMsg(target)
//combo increase acensi0n
damage *= 1 + user.momentum.value * 0.1
world << "[damage]"
damage *= 1 - KONSTANT_ArmorNegation(target.defVal.value)
damage = round(damage)
strikeMsg(target, damage, element)
if(target.shield.value && target.shield.value > 0)
var/leftover = target.shield.value
target.shield.sub(min(target.shield.value, damage))
damage = max(0,damage - leftover)
target.hp.sub(damage)
//apply user effects
if(spawnedSignature)
spawnedSignature.weaponEffect(user, "self")
user.momentum.perm(4)
user.initiative = null
noClash(var/mob/T)
var/target = T
world << "[user] smacks [target] straight up BOOM!"
basicAttack
basicBlast
BLAST = 1
defense
isDefense = 1
defScene(var/mob/target)
world << "[user] avoids [target]'s attack."
singleTargetDel(target.actingSkill)
actiMsg()
world << "[user] takes a defensive stance."
clashVsOffense(var/mob/T)
defScene(T)
world
New()
mob = /mob/player
for(var/Atype in typesof (/area)) //this would, for example, loop and name spawnpoint
var/area/A = new Atype
if(!A.tagged)
A.tag = A.name
..()
area
var
north
northEast
east
southEast
south
southWest
west
northWest
entranceMsg
tagged
Flashpoint
New()
..()
entranceMsg = "<FONT COLOR = blue>Random place to fight and stuff.</FONT>"
mob
var
busy = 0 //access switch. 0 for access, 1 for none.
Move(area/A)
if(busy)
return
..()
stam.restore()
shield.restore()
initiative = 0
src.momentum.change(0)
if(A.entranceMsg)
src << "[A.entranceMsg]"
proc
KONSTANT_ArmorNegation(var/x)
world << "[0.065*sqrt(x)] dmg reduction"
return 0.065*sqrt(x)
mob
var
allies
list
opponents
knownSkills
targetedBy
direction
spacing
initiative
obj/skill/actingSkill
hasMoved
proc
voidDisplay()
return "[src] is standing at space [spacing], facing [direction], with [hp.display(1)] Health."
skillCheck()
if(!knownSkills)
knownSkills = new
var/checkFill = 0
for(var/obj/item/gear/weapon/w in equipList)
w.basicAttack(src)
checkFill++
if(!checkFill)
knownSkills += new/obj/skill/attack/basicBlast()
knownSkills += new /obj/skill/defense()
skillz()
if(client)
var/choice = input("What to do?") as null|anything in list("Fite")
if(!choice)
skillz()
return
if(choice == "Fite")
var/obj/skill/s = input("Which attack?") as null|anything in knownSkills
if(s)
s.igniteSkill(src)
else
skillz()
return
else
botAiCalib()
botAiCalib()
var/mob/target
for(var/mob/M in opponents)
target = M
var/obj/skill/s = new/obj/skill/attack()
s.igniteSkill(src, target, "feint")
singleTarget(var/obj/skill/s, var/mob/target)
if(!target)
target = input("Who to slaughter?") as null|anything in opponents
s.targets += target
s.actiMsg(target)
spaceTarget(var/obj/skill/s, var/target)
if(!target)
target = input("Which area to blast?") as null|num
for(var/mob/M in loc)
if(M.spacing == target)
s.targets += M
s.actiMsg(target)
waveTarget(var/obj/skill/s, var/target)
if(!target)
target = input("Which direction to fire?") as null|anything in list("north","south")
for(var/mob/M in loc)
if((M.spacing > src && target == "north") || (M.spacing < src && target == "south"))
s.targets += M
s.actiMsg(target)
triangleAttack()
var/obj/skill/s = actingSkill
if(client && !s.BLAST && !s.WAVE)
var/selection = input("Feint or true?") as null|anything in list("feint","true")
return selection
triangleCounter()
var/obj/skill/s = actingSkill
if(client && !s.BLAST && !s.WAVE)
var/selection = input("Counter or true?") as null|anything in list("counter","true")
return selection
player
allies = "player"
battleAdmin
parent_type = /obj
var
list
teamA
teamB
total
New(var/area/A)
..()
loc = A
teamA = new
teamB = new
total = new
for(var/mob/M in A)
M.skillCheck()
total += M
if(!M.allies)
M.allies = "enemy"
if(M.allies == "player")
teamA += M
world << "[M] is on teamA!"
M.opponents = teamB
M.direction = "north"
M.spacing = 0
else
teamB += M
world << "[M] is on teamB!"
M.opponents = teamA
M.direction = "south"
M.spacing = 0
rotation(A)
proc
speedCycle(var/list/q) //goddamn insertion sort too strong
q = total
var/j
var/i
world << "..."
for(j = 2, j <= q.len, j++)
var/mob/tempMob = q[j]
i = j
while(i > 1)
var/mob/compareMob = q[i-1]
if(tempMob.sp.value > compareMob.sp.value)
q[i] = q[i - 1]
i--
else
break
q[i] = tempMob
for(var/mob/M in q)
world << "[M]"
total = q
rotation(var/recursionVal)
var/i = recursionVal
if(!i)
i = 0
i++
for(var/mob/M in total)
M << "Round [i]"
for(var/mob/MM in total)
M << MM.voidDisplay()
speedCycle(total)
var/grooveMeter = 1
var/dancer = 0
while(grooveMeter > 0)
for(var/mob/M in total)
if(max(1,M.sp.value/10) > grooveMeter - 1)
M.skillz()
dancer++
if(dancer == 0)
grooveMeter = -1
dancer = 0
grooveMeter++
for(var/mob/M in total) //rational check on all mobs to reset their values if needed
M.hasMoved = null
mob
var
crippled
bleeding
burning
kD
channeling
staggered
conditions
debuff
var
duration
damage
mob/targetMob
mob/inflictingMob
listingString
New(var/dur, var/mob/T, var/mob/M)
..()
duration = dur
targetMob = T
inflictingMob = M
if(!M.conditions)
M.conditions = new
M.conditions.contents += src
proc
turnPass()
duration--
afflict()
if(duration == 0)
remove()
remove()
del src
afflict()
crippled
New(var/dur, var/mob/T, var/mob/M)
..(dur, T, M)
listingString = "crippled"
damage = round(targetMob.baseSp.value*0.33)
targetMob.baseSp.sub(damage)
world << "[targetMob] has been crippled."
remove()
targetMob.baseSp.restore()
world << "[targetMob] has recovered from cripple."
..()
bleeding
New(var/dur, var/mob/T, var/mob/M, var/obj/item/gear/weapon/spawnedSignature)
..(dur, T, M)
listingString = "bleeding"
damage = round(rand(M.fin.value, M.fin.value + M.str.value))
damage = spawnedSignature.weaponEffect("bleeding", damage)
world << "[targetMob] has started bleeding."
afflict()
targetMob.hp.sub(damage)
world << "[targetMob] has taken [damage] points of bleeding damage."
remove()
world << "[targetMob] has recovered from bleeding."
..()
knockdown
New(var/mob/T)
..(null, T, null)
listingString = "knocked down"
damage = targetMob.baseSp.value
targetMob.baseSp.sub(damage)
world << "[targetMob] has been knocked down."
channeling
New(var/mob/M, var/obj/skill/primeSkill)
..(null, null, M)
listingString = "channeling"
debuffList
var
contents
proc
checkFor(var/compareString)
for(var/debuff/d in contents)
if(d.listingString == compareString)
return d
display()
//not implemented