-
Notifications
You must be signed in to change notification settings - Fork 81
/
Creature.as
executable file
·17960 lines (17229 loc) · 643 KB
/
Creature.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
package classes {
import classes.Characters.PlayerCharacter;
import classes.Characters.PregnancyPlaceholder;
import classes.Characters.Emmy;
import classes.CockClass;
import classes.DataManager.Errors.VersionUpgraderError;
import classes.Engine.Combat.DamageTypes.TypeCollection;
import classes.GameData.SingleCombatAttack;
import classes.Items.Accessories.*;
import classes.Items.Armor.GooArmor;
import classes.Items.Armor.InsulatedCoat;
import classes.Items.Armor.Unique.Omnisuit;
import classes.Items.Guns.MyrBow;
import classes.Items.Melee.Fists;
import classes.Items.Melee.Rock;
import classes.Items.Miscellaneous.*;
import classes.Items.Transformatives.*;
import classes.VaginaClass;
import classes.BreastRowClass;
import classes.StorageClass;
import classes.ItemSlotClass;
import classes.DataManager.Serialization.ISaveable;
import classes.DataManager.Serialization.VersionedSaveable;
import flash.utils.describeType;
import flash.utils.Dictionary;
import flash.utils.getQualifiedClassName;
import flash.utils.getDefinitionByName;
import classes.GameData.StatTracking;
import classes.Engine.Utility.num2Text;
import classes.Engine.Utility.num2Ordinal;
import flash.utils.ByteArray;
import classes.GLOBAL;
import classes.GameData.Pregnancy.PregnancyManager;
import classes.Util.RandomInCollection;
import classes.Util.InCollection;
import classes.Engine.Combat.DamageTypes.DamageFlag;
import classes.Engine.Utility.plural;
import classes.Engine.Utility.possessive;
import classes.Engine.Combat.DamageTypes.DamageType;
import classes.Engine.Utility.weightedRand;
import classes.Engine.Interfaces.ParseText;
import classes.Engine.Utility.indefiniteArticle;
import classes.Engine.Utility.stripRace;
import classes.GameData.CodexManager;
import classes.Engine.Interfaces.AddLogEvent;
import classes.Engine.Interfaces.ExtendLogEvent;
import classes.Engine.Utility.MathUtil;
/**
* I cannot yet implement "smart" detection of which characters (or furthermore, what *properties* of which characters)
* actually need to be serialized, because the raw storage types used throughout the Creature class (f.ex Cocks Array) are
* not aware of their parent class. One of the next goals will be to replace the raw storage containers with some form of
* interface container that can be aware of it's parent, and tie back into the serialization state.
* This needs to be done ti chain the getSaveObject()/loadSaveObject() to completion anyway, but we can then also hook back
* into a property on the parent container to detect changes-over-default. This would enable "deltasaves" in effect, where
* the only values stored are values that differ from compile-time values for each creature.
* Note to self: mx.utils has some describeType caching which may be a thing to look at. It also has some handy-dandy features
* for checking class properties (isDynamic etc, mx.utils.ObjectUtil)
*/
public class Creature extends VersionedSaveable {
/**
* NeverSerialize is a seperate flag that can be applied on a creature-by-creature basis. Any creature with the
* NeverSerialize flag set will be omitted from the save/load process. There are probably many Creatures that will
* never actually need persistent storage throughout the lifetime of the game, so storing their state in player saves
* seems much overkill.
*/
protected var _neverSerialize: Boolean = false;
public function get neverSerialize(): Boolean {
return _neverSerialize;
}
private static const STAT_CLAMP_VALUE:Number = 0;
//Constructor
public function Creature() {
_ignoredFields.push(
"neverSerialize",
"droneTarget",
"concentratedFireTarget",
"uniqueName",
"flags",
"bustDisplay",
"buttonText",
"btnTargetText",
"alreadyDefeated",
"shieldDisplayName",
"skipIntercept",
"skipTurn",
"_skipRound",
"OnTakeDamageOutput",
"isUniqueInFight",
"_long"
);
cocks = new Array();
vaginas = new Array();
breastRows = new Array();
breastRows[0] = new BreastRowClass();
perks = new Array();
statusEffects = new Array();
keyItems = new Array();
inventory = new Array();
sexualPreferences = new SexualPreferences();
pregnancyData = new Array();
for (var i:int = 0; i < 4; i++)
{
pregnancyData.push(new PregnancyData());
}
}
//For enemies
public var short: String = "";
public var originalRace: String = "human";
public var a: String = "a ";
// Tired of playing silly bastard games with long
private var _long:String = "You scrawny, yo."
public function get long():String { return _long; }
public function set long(v:String):void { _long = v; }
public var capitalA: String = "A ";
//Is a creature a 'pluralize' encounter - mob, etc.
public var isPlural:Boolean = false;
public var fluidSimulate:Boolean = false;
public var statusSimulate:Boolean = false;
public var customDodge: String = "";
public var customBlock: String = "";
//Clothing/Armor
public var meleeWeapon: ItemSlotClass = new EmptySlot();
public var rangedWeapon: ItemSlotClass = new EmptySlot();
public var armor: ItemSlotClass = new EmptySlot();
public var upperUndergarment: ItemSlotClass = new EmptySlot();
public var lowerUndergarment: ItemSlotClass = new EmptySlot();
public var accessory: ItemSlotClass = new EmptySlot();
public var shield: ItemSlotClass = new EmptySlot();
public var inventory: Array = new Array();
public var typesBought: Array = new Array();
public var sellMarkup: Number = 1;
public var buyMarkdown: Number = 1;
public var keeperGreeting: String = "<i>“Hello and welcome to my shop. Take a gander and let me know if you see anything you like,”</i> " + a + short + " says with a smile.";
public var keeperBuy: String = "What would you like to buy?\n";
public var keeperSell: String = "What would you like to sell?\n";
//Primary stats
private var _physiqueRaw: Number = 3;
public function get physiqueRaw():Number
{
return _physiqueRaw;
}
public function set physiqueRaw(v:Number):void
{
if (v < Creature.STAT_CLAMP_VALUE)
{
_physiqueRaw = Creature.STAT_CLAMP_VALUE;
}
else
{
_physiqueRaw = v;
}
}
private var _reflexesRaw: Number = 3;
public function get reflexesRaw():Number
{
return _reflexesRaw;
}
public function set reflexesRaw(v:Number):void
{
if (v < Creature.STAT_CLAMP_VALUE)
{
_reflexesRaw = Creature.STAT_CLAMP_VALUE;
}
else
{
_reflexesRaw = v;
}
}
private var _aimRaw: Number = 3;
public function get aimRaw():Number
{
return _aimRaw;
}
public function set aimRaw(v:Number):void
{
if (v < Creature.STAT_CLAMP_VALUE)
{
_aimRaw = Creature.STAT_CLAMP_VALUE;
}
else
{
_aimRaw = v;
}
}
private var _intelligenceRaw: Number = 3;
public function get intelligenceRaw():Number
{
return _intelligenceRaw;
}
public function set intelligenceRaw(v:Number):void
{
if (v < Creature.STAT_CLAMP_VALUE)
{
_intelligenceRaw = Creature.STAT_CLAMP_VALUE;
}
else
{
_intelligenceRaw = v;
}
}
private var _willpowerRaw: Number = 3;
public function get willpowerRaw():Number
{
return _willpowerRaw;
}
public function set willpowerRaw(v:Number):void
{
if (v < Creature.STAT_CLAMP_VALUE)
{
_willpowerRaw = Creature.STAT_CLAMP_VALUE;
}
else
{
_willpowerRaw = v;
}
}
private var _libidoRaw: Number = 3;
public function get libidoRaw():Number
{
return _libidoRaw;
}
public function set libidoRaw(v:Number):void
{
if (v < Creature.STAT_CLAMP_VALUE)
{
_libidoRaw = Creature.STAT_CLAMP_VALUE;
}
else
{
_libidoRaw = v;
}
}
public var physiqueMod: Number = 0;
public var reflexesMod: Number = 0;
public var aimMod: Number = 0;
public var intelligenceMod: Number = 0;
public var willpowerMod: Number = 0;
public var libidoMod: Number = 0;
public var affinity: String = "intelligence";
public var characterClass: int = GLOBAL.CLASS_SMUGGLER;
public var personality: int = 50;
public var exhibitionismRaw: Number = 0;
//Combat Stats
// I think some of my UI work has highlighted some areas where stats are doing things that aren't intended, or otherwise possibly broken.
// The safest way I can think of fixing these issues, is to clamp the potential possible values given to the raw vars.
// HP should probably never go BELOW 0, as it has implications on rest mechanics.
private var _HPRaw: int = 0;
public function get HPRaw():int { return _HPRaw; }
public function set HPRaw(v:int):void
{
if (v < 0)
{
_HPRaw = 0;
}
else
{
_HPRaw = v;
}
}
public var HPMod: int = 0;
public var shieldsRaw: int = 0;
public var lustRaw: Number = 0;
public var lustMod: Number = 0;
public var energyRaw: Number = 100;
public var energyMod: Number = 0;
public var teaseLevel: Number = 0;
public var teaseXP: Number = 0;
//Resistances
public var baseHPResistances:TypeCollection = new TypeCollection();
public var baseShieldResistances:TypeCollection = new TypeCollection();
public function getShieldResistances():TypeCollection
{
var r:TypeCollection = baseShieldResistances.makeCopy();
if (!(shield is EmptySlot)) r.combineResistances(shield.resistances);
if (hasPerk("Enhanced Dampeners"))
{
for (var i:uint = 0; i < DamageType.NUMTYPES; i++)
{
var type:DamageType = r.getType(i);
if (type.resistanceValue < 0) type.resistanceValue /= 2;
}
}
return r;
}
public function getHPResistances():TypeCollection
{
var r:TypeCollection = baseHPResistances.makeCopy();
if (!(armor is EmptySlot)) r.combineResistances(armor.resistances);
if (!(lowerUndergarment is EmptySlot)) r.combineResistances(lowerUndergarment.resistances);
if (!(upperUndergarment is EmptySlot)) r.combineResistances(upperUndergarment.resistances);
if (!(accessory is EmptySlot)) r.combineResistances(accessory.resistances);
// Effect: Boosts max HP and poison resistance by 10% for 24 hours
if (hasStatusEffect("Heart Tea")) r.poison.damageValue = r.poison.damageValue * 1.1;
// Effect: Adds +10% Electric, -10% Burning, +10% Kinetic, +10% Corrosive
// Fen Nerf: -35% Burning
if (hasStatusEffect("Resin"))
{
r.electric.damageValue += 10;
r.burning.damageValue -= 35;
r.kinetic.damageValue += 10;
r.corrosive.damageValue += 10;
}
if (hasStatusEffect("Oil Warmed"))
{
r.freezing.damageValue += Math.ceil(MathUtil.LinearInterpolate(5, 15, getStatusMinutes("Oil Warmed") / 1440));
}
return r;
}
public function getLustResistances():TypeCollection
{
var r:TypeCollection = new TypeCollection();
if (shieldsRaw > 0) r.combineResistances(getShieldResistances());
r.combineResistances(getHPResistances());
return r;
}
public var isLustImmune:Boolean = false;
//Level Caps
public function levelMin():int
{
return 1;
}
public function levelMax():int
{
return levelEnd();
}
public function levelEnd():int
{
return 20;
}
//Level Stats
public var XPRaw: Number = 0;
public var level: Number = 1;
public var credits: Number = 500;
//Perks used to store 'queued' perk buys
public var perkPoints: Number = 0;
//Appearance Variables
public var femininity: Number = 50;
public function femininityUnlocked(newFem:Number):Boolean
{
if(newFem < femininityMin() || newFem > femininityMax()) return false;
return true;
}
public function femininityLockedMessage():String
{
return "Your [pc.face] warms, but nothing happens.";
}
public var eyeType: Number = 0;
public function eyeTypeUnlocked(newEyeType:int):Boolean
{
if (eyeType == GLOBAL.TYPE_SYNTHETIC) return false;
return true;
}
public function eyeTypeLockedMessage():String
{
return "Your [pc.eye] twitches, resisting a change.";
}
public var eyeColor: String = "";
public function eyeColorUnlocked(newEyeColor:String):Boolean
{
if (eyeType == GLOBAL.TYPE_SYNTHETIC) return false;
return true;
}
public function eyeColorLockedMessage():String
{
return "Your [pc.eye] twitches, resisting a change.";
}
public var tallness: Number = 0;
public function tallnessUnlocked(newTallness:Number):Boolean
{
return true;
}
public function tallnessLockedMessage():String
{
return "You feel momentarily drawn out, stretched even. The sensation passes as soon as it came.";
}
public var thickness: Number = 0;
public function thicknessMin():Number
{
return 0;
}
public function thicknessMax():Number
{
return 100;
}
public function thicknessUnlocked(newThickness:Number):Boolean
{
return true;
}
public function thicknessLockedMessage():String
{
return "You feel momentarily bloated. It passes without incident.";
}
public var tone: Number = 0;
public function toneMin():Number
{
return 0;
}
public function toneMax():Number
{
if(hasSkinFlag(GLOBAL.FLAG_SQUISHY))
{
if (this is PlayerCharacter && flags["AMBER_SEED_USED"] != undefined && (flags["AMBER_SEED_USED"] & AmberSeed.FLAG_GOO_TONE) == AmberSeed.FLAG_GOO_TONE) return 70;
return 30;
}
return 100;
}
public function toneUnlocked(newTone:Number):Boolean
{
if(hasSkinFlag(GLOBAL.FLAG_SQUISHY) && newTone > tone && newTone >= toneMax()) return false;
return true;
}
public function toneLockedMessage():String
{
if(hasSkinFlag(GLOBAL.FLAG_SQUISHY)) return "You feel a slight soreness but nothing seems to come of it. Your squishy body makes it apparent that you can’t get any more tone than you are now!";
return "You twitch, feeling momentarily sore. Nothing seems to come of it.";
}
public var hairColor: String = "no";
public function hairColorUnlocked(newHairColor:String):Boolean
{
return true;
}
public function hairColorLockedMessage():String
{
return "Your scalp briefly tingles, but your [pc.hair] remains unchanged.";
}
public var beardColor: String = hairColor;
public function beardColorUnlocked(newBeardColor:String):Boolean
{
return true;
}
public function beardColorLockedMessage():String
{
return "Your chin briefly tingles, but your [pc.beard] remains unchanged.";
}
public var scaleColor: String = "blue";
public function scaleColorUnlocked(newScaleColor:String):Boolean
{
if (hasStatusEffect("Gel Body")) return false;
return true;
}
public function scaleColorLockedMessage():String
{
return "Your scales briefly itch, but nothing happens.";
}
public var furColor: String = "brown";
public function furColorUnlocked(newFurColor:String):Boolean
{
if (hasStatusEffect("Gel Body")) return false;
return true;
}
public function furColorLockedMessage():String
{
return "Your fur briefly itches, but nothing happens.";
}
public var hairLength: Number = 0;
public var hairStyle:String = "null";
public function hairLengthUnlocked(newHairLength:Number):Boolean
{
if (hasPerk("Mane") && newHairLength <= 3 && newHairLength < hairLength) return false;
if (hairType == GLOBAL.HAIR_TYPE_GOO && (skinType == GLOBAL.SKIN_TYPE_GOO || hasStatusEffect("Goo Vent"))) return false;
return true;
}
public function hairLengthLockedMessage():String
{
if (hasPerk("Mane")) return "Your scalp briefly tingles, but your [pc.hair] refuses to change. It seems your mane can’t get any shorter!";
return "Your scalp briefly tingles, but your [pc.hair] remains unchanged.";
}
public var hairType: Number = 0;
public function hairTypeUnlocked(newHairType:Number):Boolean
{
if (hairType == GLOBAL.HAIR_TYPE_GOO && (skinType == GLOBAL.SKIN_TYPE_GOO || hasStatusEffect("Goo Vent"))) return false;
return true;
}
public function hairTypeLockedMessage():String
{
return "Your scalp briefly tingles, but your [pc.hair] remains unchanged.";
}
public var beardType: Number = hairType;
public function beardTypeUnlocked(newBeardType:Number):Boolean
{
if (beardType == GLOBAL.HAIR_TYPE_GOO && (skinType == GLOBAL.SKIN_TYPE_GOO || hasStatusEffect("Goo Vent"))) return false;
return true;
}
public function beardTypeLockedMessage():String
{
return "Your chin briefly tingles, but your [pc.beard] remains unchanged.";
}
public var beardLength: Number = 0;
public function beardLengthUnlocked(newBeardLength:Number):Boolean
{
return true;
}
public function beardLengthLockedMessage():String
{
return "Your chin briefly tingles, but your [pc.beard] remains unchanged.";
}
public var beardStyle: Number = 0;
public function beardStyleUnlocked(newBeardStyle:Number):Boolean
{
if (beardStyle == 11 && hasFaceFlag(GLOBAL.FLAG_MUZZLED)) return false; // lynx sideburns are not exactly beard
return true;
}
public function beardStyleLockedMessage():String
{
return "Your chin briefly tingles, but your [pc.beard] remains unchanged.";
}
public var skinType: Number = 0;
public function skinTypeUnlocked(newSkinType:Number):Boolean
{
if(hasPerk("Black Latex")) return false;
return true;
}
public function skinTypeLockedMessage():String
{
if(hasPerk("Black Latex")) return "Your rubbery skin briefly tingles, but stops shortly after, blocking any attempt to change it.";
return "Your [pc.skin] briefly itches, but nothing happens.";
}
public var skinTone: String = "albino";
public var skinAccent: String = "";
public function skinToneUnlocked(newSkinTone:String):Boolean
{
if (hasStatusEffect("Gel Body")) return false;
if (InCollection(skinType, [GLOBAL.SKIN_TYPE_PLANT, GLOBAL.SKIN_TYPE_BARK])) return false;
return true;
}
public function skinToneLockedMessage():String
{
return "Your [pc.skin] briefly itches, but nothing happens.";
}
public var skinFlags: Array = new Array();
public function skinFlagsUnlocked(newFlags:*):Boolean
{
return true;
}
public function skinFlagsLockedMessage():String
{
return "Your [pc.skin] briefly itches, but nothing happens.";
}
public var faceType: Number = 0;
public function faceTypeUnlocked(newFaceType:Number):Boolean
{
return true;
}
public function faceTypeLockedMessage():String
{
return "Your [pc.face] briefly itches, but nothing happens.";
}
public var faceFlags: Array = new Array();
public function faceFlagsUnlocked(newFlags:*):Boolean
{
return true;
}
public function faceFlagsLockedMessage():String
{
return "Your [pc.face] briefly itches, but nothing happens.";
}
public var tongueType: Number = 0;
public function tongueTypeUnlocked(newTongueType:Number):Boolean
{
return true;
}
public function tongueTypeLockedMessage():String
{
return "Your [pc.tongue] feels odd in your mouth but doesn’t change.";
}
public var tongueFlags: Array = new Array();
public function tongueFlagsUnlocked(newFlags:*):Boolean
{
return true;
}
public function tongueFlagsLockedMessage():String
{
return "Your [pc.tongue] feels odd in your mouth but doesn’t change.";
}
public var lipMod:Number = 0;
public function lipModUnlocked(newLipMod:Number):Boolean
{
if(hasFaceFlag(GLOBAL.FLAG_BEAK)) return false;
return true;
}
public function lipModLockedMessage():String
{
return "Your [pc.lips] feel momentarily hot, but a quick lick confirms that nothing has changed.";
}
public var lipColor:String = "peach";
public var earType: Number = 0;
public var earLength:Number = 0;
public function earTypeUnlocked(newEarType:Number):Boolean
{
return true;
}
public function earTypeLockedMessage():String
{
return "Your [pc.ears] are burning. Someone must be talking about you.";
}
public var antennae: Number = 0;
public function antennaeUnlocked(newAntennaeNumber:Number):Boolean
{
return true;
}
public function antennaeLockedMessage():String
{
if(antennae == 0) return "Your forehead is burning but nothing changes.";
if(antennae == 1) return "Your [pc.antenna] tingles for a moment. Someone must be thinking about you.";
return "Your [pc.antennae] are burning. Someone must be thinking about you.";
}
public var antennaeType: Number = 0;
public function antennaeTypeUnlocked(newAntennaeType:Number):Boolean
{
return true;
}
public function antennaeTypeLockedMessage():String
{
if(antennae == 0) return "Your forehead is burning but nothing changes.";
if(antennae == 1) return "Your [pc.antenna] tingles for a moment. Someone must be thinking about you.";
return "Your [pc.antennae] are burning. Someone must be thinking about you.";
}
public var horns:Number = 0;
public function hornsUnlocked(newHornsNumber:Number):Boolean
{
return true;
}
public function hornsLockedMessage():String
{
if(horns == 0) return "You have a brief headache. It fades as quickly as it came, changing nothing.";
return "You have a brief headache, centered around your [pc.horns]. It fades as quickly as it came, changing nothing.";
}
public var hornType: Number = 0;
public function hornTypeUnlocked(newHornType:Number):Boolean
{
return true;
}
public function hornTypeLockedMessage():String
{
if(horns == 0) return "You have a brief headache. It fades as quickly as it came, changing nothing.";
return "You have a brief headache, centered around your [pc.horns]. It fades as quickly as it came, changing nothing.";
}
public var hornLength: Number = 0;
public function hornLengthUnlocked(newHornLength:Number):Boolean
{
return true;
}
public function hornLengthLockedMessage():String
{
if(horns == 0) return "You have a brief headache. It fades as quickly as it came, changing nothing.";
return "You have a brief headache, centered around your [pc.horns]. It fades as quickly as it came, changing nothing.";
}
public var armType: Number = 0;
public function armTypeUnlocked(newArmType:Number):Boolean
{
return true;
}
public function armTypeLockedMessage():String
{
return "Your [pc.arms] twitch yet resist changing.";
}
public var armFlags: Array = new Array();
public var gills: Boolean = false;
public function gillsUnlocked(newGills:Boolean):Boolean
{
return true;
}
public function gillsLockedMessage():String
{
if(!gills) return "Your neck tingles but nothing changes.";
return "Your [pc.gills] flutter but do not change.";
}
public var wingCount:Number = 0;
public var wingType:Number = 0;
public function wingTypeUnlocked(newWingType:Number):Boolean
{
return true;
}
public function wingTypeLockedMessage():String
{
if(wingType == 0) return "There is a tickling sensation around and between your shoulder blades, but nothing changes.";
if(wingCount == 1) return "Your [pc.wing] radiates with warmth but nothing about it changes.";
if(wingType == GLOBAL.TYPE_SHARK) return "Your [pc.wings] radiate with warmth but nothing about them changes.";
return "Your [pc.wings] flutter but do not change.";
}
public var legType: Number = 0;
public function legTypeUnlocked(newLegType:Number):Boolean
{
if (!InCollection(newLegType, [GLOBAL.TYPE_HUMAN, GLOBAL.TYPE_SUCCUBUS]) && (hasStatusEffect("Mimbrane Foot Left") || hasStatusEffect("Mimbrane Foot Right"))) return false;
if (isGoo() && statusEffectv1("Gel Body") >= 1) return false;
return true;
}
public function legTypeLockedMessage():String
{
if ((hasStatusEffect("Mimbrane Foot Left") && !hasStatusEffect("Mimbrane Foot Right")) || (!hasStatusEffect("Mimbrane Foot Left") && hasStatusEffect("Mimbrane Foot Right"))) return "Suddenly your toes flex and dig, showing faint signs of your impending transformation. The appearance subsides, however, and you’re left with your " + foot() + ". With a heavy sigh, it would seem your Mimbrane refuses to give up the shape of your feet to whatever was in store for you before.";
if (hasStatusEffect("Mimbrane Foot Left") && hasStatusEffect("Mimbrane Foot Right")) return "Suddenly your toes flex and dig, showing faint signs of your impending transformation. The appearance subsides, however, and you’re left with your " + feet() + ". With a heavy sigh, it would seem your Mimbranes refuse to give up the shape of your feet to whatever was in store for you before.";
if (isGoo() && statusEffectv1("Gel Body") >= 1) return "Your gooey carriage suddenly tingles. A warmth bubbles up and quickly fizzles out, making you feel very much like a carbonated soft-drink.... It seems whatever tried to change didn’t have an effect on you.";
return "Despite the heat in your [pc.legOrLegs], nothing changes.";
}
public var legCount: Number = 2;
public function legCountUnlocked(newLegCount:Number):Boolean
{
if ((hasStatusEffect("Mimbrane Foot Left") || hasStatusEffect("Mimbrane Foot Right")) && newLegCount != 2) return false;
return true;
}
public function legCountLockedMessage():String
{
if ((hasStatusEffect("Mimbrane Foot Left") && !hasStatusEffect("Mimbrane Foot Right")) || (!hasStatusEffect("Mimbrane Foot Left") && hasStatusEffect("Mimbrane Foot Right"))) return "Your " + foot() + " clenches to an uncomfortable degree, refusing to be removed. The Mimbrane surrounding the extremity seems to counteract any attempts to remove its home.";
if (hasStatusEffect("Mimbrane Foot Left") && hasStatusEffect("Mimbrane Foot Right")) return "Your " + feet() + " clench to an uncomfortable degree, refusing to be removed. The Mimbranes surrounding the extremities seem to counteract any attempts to remove their home.";
return "Despite the heat in your [pc.legOrLegs], nothing changes.";
}
public var legFlags: Array = new Array();
public function legFlagsUnlocked(newFlags:*):Boolean
{
return true;
}
public function legFlagsLockedMessage():String
{
return "Despite the heat in your [pc.legOrLegs], nothing changes.";
}
public var cumType: Number = GLOBAL.FLUID_TYPE_CUM;
public function cumTypeUnlocked(newCumType:Number):Boolean
{
if(cumType == GLOBAL.FLUID_TYPE_SPECIAL_GOO || cumType == GLOBAL.FLUID_TYPE_SPECIAL_CUMGOO) return false;
return true;
}
public function cumTypeLockedMessage():String
{
return "Your body fights an internal change, resisting a transformation.";
}
//0 - Waist
//1 - Middle of a long tail. Defaults to waist on bipeds.
//2 - Between last legs or at end of long tail.
//3 - On underside of a tail, used for driders and the like, maybe?
public var genitalSpot: Number = 0;
public function genitalSpotUnlocked(newGenitalSpot:Number):Boolean
{
return true;
}
public function genitalSpotLockedMessage():String
{
return "Your body fights an internal change, resisting a transformation.";
}
public function genitalLocation(): Number {
if (genitalSpot == 1 && legCount == 2) return 0;
else if (genitalSpot == 3 && isDrider()) return 3;
return genitalSpot;
}
public var tailType: Number = 0;
public function tailTypeUnlocked(newTailType:Number):Boolean
{
if (hasTail(GLOBAL.TYPE_VULPINE) && tailCount == 9 && (hasPerk("Enlightened Nine-tails") || hasPerk("Nine-tails") || hasPerk("Corrupted Nine-tails"))) return false;
if (tailType == GLOBAL.TYPE_CUNTSNAKE) return false;
if (tailType == GLOBAL.TYPE_COCKVINE) return false;
return true;
}
public function tailTypeLockedMessage():String
{
var msg:String = "";
if (hasTail(GLOBAL.TYPE_VULPINE) && tailCount == 9 && (hasPerk("Enlightened Nine-tails") || hasPerk("Nine-tails") || hasPerk("Corrupted Nine-tails"))) {
msg += "You are startled by sudden burst of dazzling ";
if (hasPerk("Enlightened Nine-tails") || hasPerk("Nine-tails")) msg += "azure";
else msg += "lavender";
msg += " sparks from your [pc.tails], but nothing is changed.";
return msg;
}
if (tailType == GLOBAL.TYPE_CUNTSNAKE || tailType == GLOBAL.TYPE_COCKVINE)
{
msg = "The creature masquerading as a tail seems pretty spooked about something all of a sudden;";
if (isBiped()) msg += " it’s wrapped itself around your [pc.thigh], clinging on tightly and chirping to itself quietly...."
else msg += " it’s busy chirping away to itself and thrashing around, almost as if it were trying to seek out a predator....";
return msg;
}
return "Despite the heat at the base of your spine, nothing changes back there.";
}
public var tailCount: Number = 0;
public function tailCountUnlocked(newTailCount:Number):Boolean
{
if (hasTail(GLOBAL.TYPE_VULPINE) && tailCount == 9 && (hasPerk("Enlightened Nine-tails") || hasPerk("Nine-tails") || hasPerk("Corrupted Nine-tails"))) return false;
return true;
}
public function tailCountLockedMessage():String
{
var msg:String = "";
if (hasTail(GLOBAL.TYPE_VULPINE) && tailCount == 9 && (hasPerk("Enlightened Nine-tails") || hasPerk("Nine-tails") || hasPerk("Corrupted Nine-tails"))) {
msg += "You are startled by sudden burst of dazzling ";
if (hasPerk("Enlightened Nine-tails") || hasPerk("Nine-tails")) msg += "azure";
else msg += "purple";
msg += " sparks from your [pc.tails], but nothing is changed.";
return msg;
}
return "Despite the heat at the base of your spine, nothing changes back there.";
}
public var tailFlags: Array = new Array();
public function tailFlagsUnlocked(newFlags:*):Boolean
{
return true;
}
public function tailFlagsLockedMessage():String
{
return "Despite the heat at the base of your spine, nothing changes back there.";
}
//Used to set cunt or dick type for cunt/dick tails!
public var tailGenitalArg:Number = 0;
public function tailGenitalArgUnlocked(newTailGenitalArg:Number):Boolean
{
return true;
}
public function tailGenitalArgLockedMessage():String
{
return "Despite the heat in your [pc.tails], nothing changes back there.";
}
//tailGenital:
//0 - none.
//1 - cock
//2 - vagina
public var tailGenital: int = 0; // This one is now used to determine if tail genital is native (!=0) or parasitic (==0)
public function tailGenitalUnlocked(newTailGenital:Number):Boolean
{
return true;
}
public function tailGenitalLockedMessage():String
{
return "Despite the heat in your [pc.tails], nothing changes back there.";
}
public var tailGenitalColor:String = "pink";
public function tailGenitalColorUnlocked(newTailGenitalColor:String):Boolean
{
return true;
}
public function tailGenitalColorLockedMessage():String
{
return "Despite the heat in your [pc.tails], nothing changes back there.";
}
//Tail venom is a 0-100 slider used for tail attacks. Recharges per hour.
public var tailVenom: Number = 0;
//Tail recharge determines how fast venom/webs comes back per hour.
public var tailRecharge: Number = 5;
//hipRating
//0 - boyish
//2 - slender
//4 - average
//6 - noticable/ample
//10 - curvy//flaring
//15 - child-bearing/fertile
//20 - inhumanly wide
public var hipRatingRaw:Number = 0;
public var hipRatingMod:Number = 0;
public function hipRating(arg:Number = 0, apply:Boolean = false):Number
{
if (apply)
{
hipRatingRaw = arg;
}
else
{
hipRatingRaw += arg;
}
var bonus:Number = 0;
if(hasPerk("Fecund Figure")) bonus += perkv1("Fecund Figure");
var currHipRating:Number = hipRatingRaw + hipRatingMod + bonus;
if (currHipRating < 0)
{
return 0;
}
else
{
return currHipRating;
}
}
public function hipRatingUnlocked(newHipRating:Number):Boolean
{
return true;
}
public function hipRatingLockedMessage():String
{
return "Your [pc.hips] tremble, assaulted by sudden warmth, but it fades away without changing a thing. Your body resisted that transformation for some reason.";
}
//buttRating
//0 - buttless
//2 - tight
//4 - average
//6 - noticable
//8 - large
//10 - jiggly
//13 - expansive
//16 - huge
//20 - inconceivably large/big/huge etc
public var buttRatingRaw:Number = 0;
public var buttRatingMod:Number = 0;
public function buttRating(arg:Number = 0, apply:Boolean = false):Number
{
if (apply)
{
buttRatingRaw = arg;
}
else if (arg != 0)
{
buttRatingRaw += arg;
}
var bonus:Number = 0;
if(hasPerk("Fecund Figure")) bonus += perkv2("Fecund Figure");
var currButtRating:Number = buttRatingRaw + buttRatingMod + bonus;
if (currButtRating < 0)
{
return 0;
}
else
{
return currButtRating;
}