-
Notifications
You must be signed in to change notification settings - Fork 217
/
engineCore.as
4956 lines (4825 loc) · 181 KB
/
engineCore.as
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
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import flash.events.MouseEvent;
const DOUBLE_ATTACK_STYLE:int = 867;
const SPELLS_CAST:int = 868;
function maxHP():Number {
var max:Number = 0;
max += int(player.tou*2 + 50);
if(player.hasPerk("Tank") >= 0) max += 50;
if(player.hasPerk("Tank 2") >= 0) max += Math.round(player.tou);
if(player.level <= 20) max += player.level * 15;
else max += 20 * 15;
max = Math.round(max);
if(max > 999) max = 999;
return max;
}
function silly():Boolean {
if(flags[305] == 1) return true;
return false
}
function clearList():void {
list = new Array();
}
var list:Array = new Array();
function addToList(arg):void {
list[list.length] = arg;
}
function outputList():String {
var stuff:String = "";
for(var x:int = 0; x < list.length; x++) {
stuff += list[x];
if(list.length == 2 && x == 1) {
stuff += " and ";
}
else if(x < list.length-2) {
stuff += ", ";
}
else if(x < list.length-1) {
stuff += ", and ";
}
}
list = new Array();
return stuff;
}
function HPChange(changeNum:Number, display:Boolean) {
if(changeNum == 0) return;
if(changeNum > 0) {
//Increase by 20%!
if(player.hasPerk("History: Healer") >= 0) changeNum *= 1.2;
if(player.HP + int(changeNum) > maxHP()) {
if(player.HP >= maxHP()) {
if(display) outputText("You're as healthy as you can be.\n", false);
return;
}
if(display) outputText("Your HP maxes out at " + maxHP() + ".\n", false);
player.HP = maxHP();
}
else
{
if(display) outputText("You gain " + int(changeNum) + " HP.\n", false);
player.HP += int(changeNum);
hpUp.visible = true;
}
}
//Negative HP
else
{
if(player.HP + changeNum <= 0) {
if(display) outputText("You take " + int(changeNum*-1) + " damage, dropping your HP to 0.\n", false);
player.HP = 0;
}
else {
if(display) outputText("You take " + int(changeNum*-1) + " damage.\n", false);
player.HP += changeNum;
}
}
statScreenRefresh();
}
function clone(source:Object):* {
var copier:ByteArray = new ByteArray();
copier.writeObject(source);
copier.position = 0;
return(copier.readObject());
}
function speech(output:String, speaker:String):void {
var speech:String = "";
speech = speaker + " says, \"<i>" + output + "</i>\"\n";
outputText(speech, false);
}
function checkCondition(variable:String, op:String, test:String):Boolean
{
//Regex to check if something is a number
var isNumber:RegExp = new RegExp("[0-9]+");
//Regex to check if something is a boolean
var isBoolean:RegExp = new RegExp("[true|false]");
var result:Boolean = false;
var a, b;
if (isNumber.test(test))
{
//Number variables are handled in here
b = Number(test);
//Case/Switch for the variable name
switch(variable)
{
case "strength":
a = player.str;
break;
case "toughness":
a = player.tou;
break;
case "speed":
a = player.spe;
break;
case "intelligence":
a = player.inte;
break;
case "libido":
a = player.lib;
break;
case "sensitivity":
a = player.sens;
break;
case "corruption":
a = player.cor;
break;
case "fatigue":
a = player.fatigue;
break;
case "HP":
a = player.HP;
break;
case "hour":
a = hours;
break;
case "days":
a = days;
break;
case "tallness":
a = player.tallness;
break;
case "hairLength":
a = player.hairLength;
break;
case "femininity":
a = player.femininity;
break;
case "masculinity":
a = 100 - player.femininity;
break;
case "cocks":
a = player.cockTotal();
break;
case "breastRows":
a = player.bRows();
break;
case "biggestTitSize":
a = player.biggestTitSize();
break;
case "vagCapacity":
a = player.vaginalCapacity();
break;
case "analCapacity":
a = player.analCapacity();
break;
case "balls":
a = player.balls;
break;
case "cumQuantity":
a = player.cumQ();
break;
case "biggestTitSize":
a = player.biggestTitSize();
break;
case "milkQuantity":
a = player.lactationQ();
break;
default:
a = 0;
break;
}
//Perform check
if(op == "=")
{
result = (a == b);
}
else if(op == ">")
{
result = (a > b);
}
else if(op == "<")
{
result = (a < b);
}
else if(op == ">=")
{
result = (a >= b);
}
else if(op == "<=")
{
result = (a <= b);
}
else if(op == "!=")
{
result = (a != b);
}
else
{
result = (a != b);
}
}
else if(isBoolean.test(test))
{
//Boolean variables handled here
//test = Boolean(result[3]);
if (test == "true")
{
b = true;
}
else
{
b = false;
}
switch(variable)
{
case "hasVagina":
a = player.hasVagina();
break;
case "isTaur":
a = player.isTaur();
break;
case "isNaga":
a = player.isNaga();
break;
case "isGoo":
a = player.isGoo();
break;
case "isBiped":
a = player.isBiped();
break;
case "hasBreasts":
a = (player.biggestTitSize() >= 1);
break;
case "hasBalls":
a = (player.balls > 0);
break;
case "hasCock":
a = player.hasCock();
break;
case "isHerm":
a = (player.gender == 3);
break;
case "cumNormal":
a = (player.cumQ() <= 150);
break;
case "cumMedium":
a = (player.cumQ() > 150 && player.cumQ() <= 350);
break;
case "cumHigh":
a = (player.cumQ() > 350 && player.cumQ() <= 1000);
break;
case "cumVeryHigh":
a = (player.cumQ() > 1000 && player.cumQ() <= 2500);
break;
case "cumExtreme":
a = (player.cumQ() > 2500);
break;
case "isSquirter":
a = (player.wetness() >= 4);
break;
case "isPregnant":
a = (player.pregnancyIncubation > 0);
break;
case "isButtPregnant":
a = (player.buttPregnancyIncubation > 0);
break;
case "hasNippleCunts":
a = player.hasFuckableNipples();
break;
case "canFly":
a = player.canFly();
break;
case "isLactating":
a = (player.lactationQ() > 0);
break;
default:
a = false;
break;
}
if(op == "=")
{
result = (a == b);
}
else
{
result = (a != b);
}
}
else
{
//String variables here
switch(variable)
{
default:
a = "";
break;
}
if(op == "=")
{
result = (a == test);
}
else
{
result = (a != test);
}
}
trace("Check: " + variable + " " + op + " " + test + " = " + result);
return result;
}
function parseText(text:String):String
{
//PARSE DAT TEXT!
//Now with more awesome!
//Regex to check if something is a number
var isNumber:RegExp = new RegExp("[0-9]+");
//Regex to check if something is a boolean
var isBoolean:RegExp = new RegExp("[true|false]");
//Regex to check if a string matches the expression format
var isExp:RegExp = new RegExp("\\(([A-Za-z0-9]+)\\s(==|=|!=|<|>|<=|>=)\\s([A-Za-z0-9]+)\\)");
//Regex to match non-branch, param-free tags - Tag names can contain any letters and numbers. No spaces or special characters.
var basicTag:RegExp = new RegExp("\\[([a-zA-Z0-9]+)\\]");
//Regex to match tags with a single parameter - Tag names can contain any letters and numbers. No spaces or special characters. Yes, I felt the need to repeat this.
var paramTag:RegExp = new RegExp("\\[([a-zA-Z0-9]+)\\s(.*?)\\]");
//Regex to match branch tags - You can't nest if's, and they MUST end with a space to make recursive parsing work
//var branchTag:RegExp = new RegExp("\\[if\\s\\(([a-zA-Z]+)\\s(=|!=|>|<|<=|>=)\\s(.*?)\\)\\s\\\"(.*?)\\\"\\]");
//var branchTag:RegExp = new RegExp("\\[if\\s\\((.*?)\\)\\s\\\"(.*?)\\\"\\]");
var branchTag:RegExp = new RegExp("\\[if\\s(.*?)\\s\\\"(.*?)\\\"\\]");
var branchTagElse:RegExp = new RegExp("\\[if\\s(.*?)\\s\\\"(.*?)\\\"\\selse\\s\\\"(.*?)\\\"\\]");
var rep:String;
//We parse the tags from most complex to most basic, as the basic tag has the most "greedy" regex
//Grab the first branch tag
var result:Object = branchTagElse.exec(text);
while (result != null)
{
//result[2] is the text to be displayed. Also gets parsed for tags.
rep = parseText(result[2]);
var rep2:String = parseText(result[3]);
var expTotal:String = result[1];
var check;
var exp:Object = isExp.exec(expTotal);
while (exp != null)
{
var temp:Boolean = checkCondition(exp[1], exp[2], exp[3]);
expTotal = expTotal.replace(isExp, "");
expTotal = expTotal.replace(/^\s+|\s+$/g, "");
if (check != undefined)
{
var oi = expTotal.indexOf("||");
var ai = expTotal.indexOf("&&");
if (oi == 0)
{
check = (check || temp);
}
else if(ai == 0)
{
check = (check && temp);
}
expTotal = expTotal.slice(2, expTotal.length);
}
else
{
check = temp;
}
exp = isExp.exec(expTotal);
}
//If comparison is true, add in the text
if (check)
{
text = text.replace(branchTagElse, rep);
//9999text = text.replace(branchTagElse, rep);
}
else
{
text = text.replace(branchTagElse, rep2);
//9999text = text.replace(branchTagElse, rep2);
}
//Go to next result. If null, loop ends.
check = undefined;
result = branchTagElse.exec(text);
}
result = branchTag.exec(text);
//While there are branch tags, parse them.
while (result != null)
{
//result[2] is the text to be displayed. Also gets parsed for tags.
rep = parseText(result[2]);
expTotal = result[1];
exp = isExp.exec(expTotal);
while (exp != null)
{
var tempo:Boolean = checkCondition(exp[1], exp[2], exp[3]);
expTotal = expTotal.replace(isExp, "");
expTotal = expTotal.replace(/^\s+|\s+$/g, "");
if (check != undefined)
{
oi = expTotal.indexOf("||");
ai = expTotal.indexOf("&&");
if (oi == 0)
{
check = (check || tempo);
}
else if(ai == 0)
{
check = (check && tempo);
}
expTotal = expTotal.slice(2, expTotal.length);
}
else
{
check = tempo;
}
exp = isExp.exec(expTotal);
}
//If comparison is true, add in the text
if (check == true)
{
text = text.replace(branchTag, rep);
}
else
{
text = text.replace(branchTag, "");
}
//Go to next result. If null, loop ends.
check = undefined;
result = branchTag.exec(text);
}
//Find first single param tag
result = paramTag.exec(text);
//While we have single param tags, parse them
while (result != null)
{
//Convert param to an actual value if needed
var arg;
if (isNumber.test(result[2]))
{
arg = Number(result[2]);
}
else
{
arg = result[2];
}
//Case/Switch for the tag name
//result[1] is the tag name
//rep is the text the tag is replaced with
//The rest is pretty basic param checking
switch(result[1])
{
case "cockFit":
if(!player.hasCock()) rep = "<b>(Attempt to parse cock when none present.)</b>";
else if(isNaN(arg)) rep = "<b>(Invalid argument for cockFit)</b>";
else {
if(player.cockThatFits(arg) >= 0) rep = cockDescript(player.cockThatFits(arg));
else rep = cockDescript(player.smallestCockIndex());
}
break;
case "cockFit2":
if(!player.hasCock()) rep = "<b>(Attempt to parse cock when none present.)</b>";
else if(isNaN(arg)) rep = "<b>(Invalid argument for cockFit2)</b>";
else {
if(player.cockThatFits2(arg) >= 0) rep = cockDescript(player.cockThatFits2(arg));
else rep = cockDescript(player.smallestCockIndex());
}
break;
case "cockHeadFit":
if(!player.hasCock()) rep = "<b>(Attempt to parse cockhead when none present.)</b>";
else if(isNaN(arg)) rep = "<b>(Invalid argument for cockHeadFit)</b>";
else {
if(player.cockThatFits(arg) >= 0) rep = cockHead(player.cockThatFits(arg));
else rep = cockHead(player.smallestCockIndex());
}
break;
case "cockHeadFit2":
if(!player.hasCock()) rep = "<b>(Attempt to parse cockhead when none present.)</b>";
else if(isNaN(arg)) rep = "<b>(Invalid argument for cockHeadFit2)</b>";
else {
if(player.cockThatFits2(arg) >= 0) rep = cockHead(player.cockThatFits2(arg));
else rep = cockHead(player.smallestCockIndex());
}
break;
case "cock":
if(!player.hasCock()) rep = "<b>(Attempt to parse cock when none present.)</b>";
else if (arg == "all")
{
rep = multiCockDescriptLight();
}
else if (arg == "each")
{
rep = sMultiCockDesc();
}
else if (arg == "one")
{
rep = oMultiCockDesc();
}
else if (arg == "largest" || arg == "biggest")
{
rep = cockDescript(player.biggestCockIndex())
}
else if (arg == "smallest")
{
rep = cockDescript(player.smallestCockIndex())
}
else if (arg == "longest")
{
rep = cockDescript(player.longestCock())
}
else if (arg == "shortest")
{
rep = cockDescript(player.shortestCockIndex())
}
else
{
if(arg-1 >= 0 && arg-1 < player.cockTotal()) rep = cockDescript(arg - 1);
else rep = "<b>(Attempt To Parse CockDescript for Invalid Cock)</b>";
}
break;
case "cockHead":
if(!player.hasCock()) rep = "<b>(Attempt to parse cock when none present.)</b>";
else if (arg == "largest" || arg == "biggest")
{
rep = cockHead(player.biggestCockIndex())
}
else if (arg == "smallest")
{
rep = cockHead(player.smallestCockIndex())
}
else if (arg == "longest")
{
rep = cockHead(player.longestCock())
}
else if (arg == "shortest")
{
rep = cockHead(player.shortestCockIndex())
}
else
{
if(arg-1 >= 0 && arg-1 < player.cockTotal()) rep = cockHead(arg - 1);
else rep = "<b>(Attempt to parse cockhead when none present.)</b>";
}
break;
default:
rep = "<u><b>!Unknown tag \"" + result[1] + "\"!</b></u>";
break;
}
//Add text, try and jump to next
text = text.replace(paramTag, rep);
result = paramTag.exec(text);
}
//Find first basic tag
result = basicTag.exec(text);
//While we have basic tags
while (result != null)
{
// rep;
//Same as param tags, but without the param
switch(result[1])
{
case "armor":
case "armorName":
rep = player.armorName;
break;
case "weapon":
case "weaponName":
rep = player.weaponName;
break;
case "name":
rep = player.short;
break;
case "pg":
rep = "\n\n";
break;
case "asshole":
rep = assholeDescript();
break;
case "butthole":
rep = assholeDescript();
break;
case "cunt":
if(player.hasVagina()) rep = vaginaDescript();
else rep = "<b>(Attempt to parse vagina when none present.)</b>";
break;
case "cocks":
if(player.hasCock()) rep = multiCockDescriptLight();
else rep = "<b>(Attempt to parse cocks when none present.)</b>";
break;
case "pussy":
if(player.hasVagina()) rep = vaginaDescript();
else rep = "<b>(Attempt to parse vagina when none present.)</b>";
break;
case "vagina":
if(player.hasVagina()) rep = vaginaDescript();
else rep = "<b>(Attempt to parse vagina when none present.)</b>";
break;
case "vag":
if(player.hasVagina()) rep = vaginaDescript();
else rep = "<b>(Attempt to parse vagina when none present.)</b>";
break;
case "clit":
if(player.hasVagina()) rep = clitDescript();
else rep = "<b>(Attempt to parse clit when none present.)</b>";
break;
case "vagOrAss":
if (player.hasVagina())
{
rep = vaginaDescript();
}
else
{
rep = assholeDescript();
}
break;
case "hair":
rep = hairDescript();
break;
case "face":
rep = player.face();
break;
case "legs":
rep = player.legs();
break;
case "leg":
rep = player.leg();
break;
case "feet":
rep = player.feet();
break;
case "foot":
rep = player.foot();
break;
case "sack":
rep = sackDescript();
break;
case "balls":
rep = ballsDescriptLight();
break;
case "sheath":
rep = sheathDesc();
break;
case "chest":
rep = chestDesc();
break;
case "fullChest":
rep = allChestDesc();
break;
case "hips":
rep = hipDescript();
break;
case "butt":
rep = buttDescript();
break;
case "ass":
rep = buttDescript();
break;
case "nipple":
rep = nippleDescript(0);
break;
case "nipples":
rep = nippleDescript(0) + "s";
break;
case "tongue":
rep = tongueDescript();
break;
case "cock":
if(player.hasCock()) rep = cockDescript(0);
else rep = "<b>(Attempt to parse cock when none present.)</b>";
break;
case "eachCock":
if(player.hasCock()) rep = sMultiCockDesc();
else rep = "<b>(Attempt to parse eachCock when none present.)</b>";
break;
case "EachCock":
if(player.hasCock()) rep = SMultiCockDesc();
else rep = "<b>(Attempt to parse eachCock when none present.)</b>";
break;
case "oneCock":
if(player.hasCock()) rep = oMultiCockDesc();
else rep = "<b>(Attempt to parse eachCock when none present.)</b>";
break;
case "OneCock":
if(player.hasCock()) rep = OMultiCockDesc();
else rep = "<b>(Attempt to parse eachCock when none present.)</b>";
break;
case "cockHead":
if(player.hasCock()) rep = cockHead(0);
else rep = "<b>(Attempt to parse cockhead when none present.)</b>";
break;
case "master":
rep = player.mf("master","mistress");
break;
case "Master":
rep = player.mf("Master","Mistress");
break;
case "his":
rep = player.mf("his","her");
break;
case "His":
rep = player.mf("His","Her");
break;
case "he":
rep = player.mf("he","she");
break;
case "He":
rep = player.mf("He","She");
break;
case "him":
rep = player.mf("him","her");
break;
case "Him":
rep = player.mf("Him","Her");
break;
case "Evade":
rep = "[Evade]";
break;
case "Misdirection":
rep = "[Misdirection]";
break;
case "Agility":
rep = "[Agility]";
break;
default:
rep = "<b>!Unknown tag \"" + result[1] + "\"!</b>";
break;
}
//Standard replace & jump
text = text.replace(basicTag, rep);
result = basicTag.exec(text);
}
//Old stuff
/*output = output.split("{").join("<b>BRACE {</b>");
output = output.split("}").join("<b>} BRACE</b>");
if(player.hasCock()) {
output = output.split("[oneCock]").join(oMultiCockDesc());
output = output.split("[OneCock]").join(OMultiCockDesc());
output = output.split("[eachCock]").join(sMultiCockDesc());
output = output.split("[eachCock]").join(SMultiCockDesc());
output = output.split("[biggestCock]").join(cockDescript(player.biggestCockIndex()));
output = output.split("[smallestCock]").join(cockDescript(player.smallestCockIndex()));
output = output.split("[longestCock]").join(cockDescript(player.longestCock()));
output = output.split("[shortestCock]").join(cockDescript(player.shortestCockIndex()));
if(player.cockThatFits(monster.vaginalCapacity()) >= 0) output = output.split("[cockFitsVag]").join(cockDescript(player.cockThatFits(monster.vaginalCapacity())));
else output = output.split("[cock]").join(cockDescript(player.smallestCockIndex()));
if(player.cockThatFits2(monster.vaginalCapacity()) >= 0) output = output.split("[cockFitsVag2]").join(cockDescript(player.cockThatFits2(monster.vaginalCapacity())));
else output = output.split("[cock]").join(cockDescript(player.smallestCockIndex()));
if(player.cockThatFits(monster.analCapacity()) >= 0) output = output.split("[cockFitsAss]").join(cockDescript(player.cockThatFits(monster.analCapacity())));
else output = output.split("[cock]").join(cockDescript(player.smallestCockIndex()));
if(player.cockThatFits2(monster.analCapacity()) >= 0)output = output.split("[cockFitsAss2]").join(cockDescript(player.cockThatFits2(monster.analCapacity())));
else output = output.split("[cock]").join(cockDescript(player.smallestCockIndex()));
output = output.split("[cock]").join(cockDescript(0));
output = output.split("[cock2]").join(cockDescript(1));
output = output.split("[cock3]").join(cockDescript(2));
output = output.split("[cock4]").join(cockDescript(3));
output = output.split("[cock5]").join(cockDescript(4));
output = output.split("[cock6]").join(cockDescript(5));
output = output.split("[cock7]").join(cockDescript(6));
output = output.split("[cock8]").join(cockDescript(7));
output = output.split("[cock9]").join(cockDescript(8));
output = output.split("[cock10]").join(cockDescript(9));
output = output.split("[cockHead]").join(cockHead(0));
output = output.split("[cockHead]2").join(cockHead(1));
output = output.split("[cockHead]3").join(cockHead(2));
output = output.split("[cockHead]4").join(cockHead(3));
output = output.split("[cockHead]5").join(cockHead(4));
output = output.split("[cockHead]6").join(cockHead(5));
output = output.split("[cockHead]7").join(cockHead(6));
output = output.split("[cockHead]8").join(cockHead(7));
output = output.split("[cockHead]9").join(cockHead(8));
output = output.split("[cockHead]10").join(cockHead(9));
}
output = output.split("[hair]").join(hairDescript());
output = output.split("[face]").join(player.face());
output = output.split("[legs]").join(player.legs());
output = output.split("[leg]").join(player.leg());
output = output.split("[feet]").join(player.feet());
output = output.split("[foot]").join(player.foot());
output = output.split("[balls]").join(ballsDescriptLight());
output = output.split("[chest]").join(chestDesc());
output = output.split("[fullChest]").join(allChestDesc());
output = output.split("[hips]").join(hipDescript());
output = output.split("[butt]").join(buttDescript());
output = output.split("[ass]").join(buttDescript());
output = output.split("[asshole]").join(assholeDescript());
output = output.split("[butthole]").join(assholeDescript());
if(player.hasVagina()) {
output = output.split("[cunt]").join(vaginaDescript());
output = output.split("[pussy]").join(vaginaDescript());
output = output.split("[vagina]").join(vaginaDescript());
output = output.split("[vag]").join(vaginaDescript());
output = output.split("[vagOrAss]").join(vaginaDescript());
output = output.split("[clit]").join(clitDescript());
}
else output = output.split("[vagOrAss]").join(assholeDescript());*/
return text;
}
function clearOutput():void {
currentText = "";
mainText.htmlText = "";
scrollBar.update();
}
function outputText(output:String, purgeText:Boolean = false, parse = true) {
if(parse)
{
output = parseText(output);
}
//OUTPUT!
if(purgeText) {
//if(!debug) mainText.htmlText = output;
clearOutput();
currentText = output;
}
else {
currentText += output;
//if(!debug) mainText.htmlText = currentText;
}
if(debug) {
mainText.htmlText = currentText;
scrollBar.update();
}
}
function perkLongDescription(perkName:String = ""):String {
switch(perkName) {
case "Pretend Strength Perk":
return "Pretend I am telling you about how this works.";
case "Resistance":
return "You choose the 'Resistance' perk, reducing the rate at which your lust increases by 10%.";
case "Arousing Aura":
return "You choose the 'Arousing Aura' perk, causing you to radiate an aura of lust when your corruption is over 70.";
case "Sadist":
return "You choose the 'Sadist' perk, increasing damage by 20 percent but causing you to gain lust from dealing damage.";
case "Masochist":
return "You choose the 'Masochist' perk, reducing the damage you take but raising your lust each time! This perk only functions while your libido is at or above 60!";
case "Well Adjusted":
return "You choose the 'Well Adjusted' perk, reducing the amount of lust you naturally gain over time while in this strange land!";
case "Medicine":
return "You choose the 'Medicine' perk, giving you a chance to remove debilitating poisons automatically!";
case "Channeling":
return "You choose the 'Channeling' perk, boosting the strength of your spellcasting!";
case "Agility":
return "You choose the 'Agility' perk, increasing the effectiveness of Light/Medium armors by a portion of your speed.";
case "Speedy Recovery":
return "You choose the 'Speedy Recovery' perk, boosting your fatigue recovery rate!";
case "Regeneration 2":
return "You choose the 'Regeneration 2' perk, giving an addition 2% of max HP per turn in combat and 4% of max HP per hour.";
case "Tank 2":
return "You choose the 'Tank 2' perk, granting an extra maximum HP for each point of toughness.";
case "Weapon Mastery":
return "You choose the 'Weapon Mastery' perk, doubling the effectiveness of large weapons.";
case "Thunderous Strikes":
return "You choose the 'Thunderous Strikes' perk, increasing normal damage by 20% while your strength is over 80.";
case "Acclimation":
return "You choose the 'Acclimation' perk, making your body 15% more resistant to lust, up to a maximum of 75%.";
case "Double Attack":
return "You choose the 'Double Attack' perk. This allows you to make two attacks so long as your strength is at 60 or below. By default your effective strength will be reduced to 60 if it is too high when double attacking. <b>You can enter the perks menu at any time to toggle options as to how you will use this perk.</b>";
case "Mage":
return "You choose the 'Mage' perk. You are able to focus your magical abilities even more keenly, boosting your base spell effects by 50%.";
case "Spellpower":
return "You choose the 'Spellpower' perk. Thanks to your sizeable intellect and willpower, you are able to more effectively use magic, boosting base spell effects by 50%.";
case "Nymphomania":
return "You've chosen the 'Nymphomania' perk. Due to the incredible amount of corruption you've been exposed to, you've begun to live in a state of minor constant arousal. Your minimum lust will be increased by as much as 30 (If you already have minimum lust, the increase is 10-15).";
case "Precision":
return "You've chosen the 'Precision' perk. Thanks to your intelligence, you're now more adept at finding and striking an enemy's weak points, reducing their damage resistance from armor by 10. If your intelligence ever drops below 25 you'll no longer be smart enough to benefit from this perk.";
case "Seduction":
return "You choose the 'Seduction' perk, upgrading the 'tease' attack with a more powerful damage and a higher chance of success.";
case "Corrupted Libido":
return "You choose the 'Corrupted Libido' perk. As a result of your body's corruption, you've become a bit harder to turn on. (Lust gain reduced by 10%!)";
case "Hot Blooded":
return "You choose the 'Hot Blooded' perk. As a result of your enhanced libido, your lust no longer drops below 20! (If you already have some minimum lust, it will be increased by 10)";
case "Fertility+":
return "You choose the 'Fertility+' perk, making it easier to get pregnant. It also increases your cum volume by up to 50% (if appropriate)!";
case "Magical Fertility":
return "10% higher chance of pregnancy and increased pregnancy speed.";
case "Magical Virility":
return "200 mLs more cum per orgasm and enhanced virility.";
case "Runner":
return "You choose the 'Runner' perk, increasing your chances to escape from your foes when fleeing!";
case "Evade":
return "You choose the 'Evade' perk, allowing you to avoid enemy attacks more often!";
case "Regeneration":
return "You choose the 'Regeneration' perk, allowing you to heal 2% of max HP every hour and 1% of max HP every round of combat!";
case "Iron Man":
return "You choose the 'Iron Man' perk, reducing the fatigue cost of physical special attacks by 50%";
case "Brawler":
return "You choose the 'Brawler' perk, allowing you to make two unarmed attacks in a turn!";
case "Tank":
return "You choose the 'Tank' perk, giving you an additional 50 hp!";
case "Strong Back 2: Strong Harder":
return "You choose the 'Strong Back 2: Strong Harder' perk, enabling a fifth item slot."
case "Strong Back":
return "You choose the 'Strong Back' perk, enabling a fourth item slot.";
case "Tactician":
return "You choose the 'Tactician' perk, increasing critical hit chance by up to 10% (Intelligence-based).";
case "Archmage":
return "You choose the 'Archmage' perk, increasing base spell strength by 50%.";
case "Lunging Attacks":
return "You choose the 'Lunging Attacks' perk, granting 50% armor penetration for standard attacks.";
case "Lightning Strikes":
return "You choose the 'Lightning Strikes' perk, increasing the attack damage for non-heavy weapons.</b>";
case "Immovable Object":
return "You choose the 'Immovable Object' perk, granting 20% physical damage reduction.</b>";
case "Resolute":
return "You choose the 'Resolute' perk, granting immunity to stuns and some statuses.</b>";
case "Berzerker":
return "You choose the 'Berzerker' perk, which unlocks the 'Berzerk' magical ability. Berzerking increases attack and lust resistance but reduces physical defenses.";
case "Brutal Blows":
return "You choose the 'Brutal Blows' perk, which reduces enemy armor with each hit.";
default:
return "An error occurred when loading the long perk description. Please post a bug report on the bug report forums at forum.fenoxo.com.";
}
return "broken.";
}
function perkDescription(perkName:String = ""):String {
switch(perkName) {
case "History: Whore":
return "Seductive experience causes your tease attacks to be 15% more effective.";
break;
case "History: Slut":
return "Sexual experience has made you more able to handle large insertions and more resistant to stretching.";
case "Pure and Loving":
return "Your caring attitude towards love and romance makes you slightly more resistant to lust and corruption.";
case "Sensual Lover":
return "Your sensual attitude towards love and romance makes your tease ability slightly more effective.";