Fix hair, dick around with new game screen.
[18plus-7leafadventure.git] / src / org / sevenchan / dongs / creature / Demon.as
blobdcdb2206c9845cfaf3bf803fe2fb6c53f38a756e
1 package org.sevenchan.dongs.creature
3 import org.sevenchan.dongs.Creature;
4 import org.sevenchan.dongs.bodyparts.*;
5 import org.sevenchan.dongs.enchantment.Corruption;
6 import org.sevenchan.dongs.screens.InfoScreen;
7 import org.sevenchan.dongs.StringTools;
8 import flash.net.registerClassAlias;
9 /**
10 * Demons are basically magically corrupted humans, so many of the features should remain the same.
11 * @author Harbinger
13 public class Demon extends Creature
15 // For serialization
16 registerClassAlias("EDemon", Demon);
18 // Body part pool
19 private static var SKIN:Skin = new Skin("demon", "red", "smooth, yet leathery");
20 private static var HAIR:Hair = new Hair("straight, long, and black hair");
22 public function Demon()
24 trace("Demon.init()");
25 super();
26 height = Math.random() * 1.5 + 5;
27 this.sexualPreference = SexualPreference.BISEXUAL; // Promiscuous.
30 this.build = Build.AVG;
31 this.hair = HAIR;
33 this.arms.push(
34 BodyPartRegistry.human_arm,
35 BodyPartRegistry.human_arm
37 this.legs.push(
38 BodyPartRegistry.human_leg,
39 BodyPartRegistry.human_leg
41 this.assholes.push(
42 BodyPartRegistry.demon_anus
44 this.clothing.push(
45 ItemRegistry.BLACK_TUNIC,
46 ItemRegistry.GRAY_PANTS
48 skin = SKIN;
49 eyes.push(BodyPartRegistry.demon_eye, BodyPartRegistry.demon_eye);
52 override public function getTypeName():String
54 return "demon";
57 override public function getHostile(subj:Creature):Boolean
59 return true;
62 override public function getInterested(subj:Creature):Boolean
64 return true;
67 override public function performConversion(oldMe:Creature):void
69 var i:int = 0;
70 for (i = 0; i < balls.length; i++) {
71 balls[i] = BodyPartRegistry.demon_testicle;
73 for (i = 0; i < dicks.length; i++) {
74 dicks[i] = getNewDick();
76 for (i = 0; i < breasts.length; i++) {
77 breasts[i] = BodyPartRegistry.demon_breast;
79 for (i = 0; i < vaginas.length; i++) {
80 vaginas[i] = BodyPartRegistry.demon_vagina;
82 for (i = 0; i < eyes.length; i++) {
83 eyes[i] = BodyPartRegistry.demon_eye;
85 for (i = 0; i < assholes.length; i++) {
86 assholes[i] = BodyPartRegistry.demon_anus;
88 InfoScreen.push("<h2>PARADIGM SHIFT</h2><p>No John, you are the demons.</p>");
91 override public function addBreast():Breast
93 var boob:Breast = BodyPartRegistry.human_breast;
94 boob.size = MathUtils.rand(0, 3);
95 breasts.push(boob);
96 return boob;
99 override public function onWin(ply:Creature):Boolean
101 if (getInterested(ply) && gender.hasDick) {
102 // Do rape
103 var enchTxt:String = "";
104 var asshole:Boolean = false;
105 var amtCum:Number = 0;
107 for (var i:int = 0; i < balls.length; i++) {
108 var t:Testicle = balls[i];
109 enchTxt += ply.addEnchantment(t.targetFX) + " ";
111 for (var idx:int = 0; idx < ply.vaginas.length; idx++) {
112 if (ply.assholes[idx].pregnantWith == null) {
113 ply.assholes[idx].impregnate(balls);
114 asshole = true;
117 var text:String = "<h2>YOU LOSE.</h2>";
118 text += "<p>The demon grins, still panting from the heat of the battle,";
119 text += " %POS% red skin glistening under the eternal glaring sun.  You slowly roll over,";
120 text += " spit out a few teeth, and look up at %OBJ% warily, feeling faint from the blood";
121 text += " loss. <i>Well, shit.</i>  You consider your options, but never get the chance";
122 text += " to use them.</p>";
124 text += "<p>\"Don't you just love how you can't die here, bitch?\"  %CSUB% gloats, giving you a kick";
125 text += " with %POS% foot, knocking you onto your side. \"I guess you and I can have a";
126 text += " little fun;  After all, I’ve got a full load.\"  The grin widens, and %POS% large,";
127 text += " rock-hard cock dribbles a dark fluid onto the ground as it throbs in the air,";
128 text += " making %POS% intentions clear.  You look at %POS% balls, and are suddenly terrified";
129 text += " to see something moving inside them, as though full of worms. They seem to";
130 text += " swell with anticipation, almost straining the skin in their need to be";
131 text += " released.  %SUB% notices your gaze, and teasingly traces a finger around %POS%";
132 text += " swollen orbs, keeping you pinned with a foot.";
134 if(ply.gender.hasDick || ply.gender.hasVag)
135 text +="  A surge of unwanted arousal surges through you, and you turn away, bile rising in the back of your throat.</p>";
137 text += "<p>You manage moan in feeble protest as %SUB% rolls your limp body onto your stomach,";
138 text += " and then hunches down, rubbing %POS% sweaty, leaky cock between your supple buns, pinning";
139 text += " you firmly to the floor. %CSUB% shudders like a crack addict anticipating a fix.";
140 text += " Then, seemingly without any effort aside from an assertive grunt, %SUB% rams %POS%";
141 text += " red, veiny dick deep into your ass.  You scream as your asshole is suddenly";
142 text += " stretched wide painfully, but no one is around to help.</p>";
144 text += "<p>Now on autopilot, the demon grips you and viciously thrusts";
145 text += " into you, the scalding-hot precum eliciting more painful screams as %POS% hot,";
146 text += " rank breath rolls over your back. One final thrust, and %SUB%’s finished, filling";
147 text += " your bowels with "+MathUtils.fmtMilliLiters(amtCum)+" of boiling-hot black semen.  %SUB% pulls out of your destroyed ass with a";
148 text += " sickeningly wet pop, %POS% burning hot, black seed spilling to the floor.";
150 if(ply.gender.hasDick || ply.gender.hasVag) {
151 text += "Unable to help yourself, you ";
152 if (ply.gender.hasDick)
153 text += ", too, spurt your cum onto the floor, forming a puddle.  ";
154 else if (ply.gender.hasVag)
155 text += "cum uncontrollably, spasming beneath the demon. ";
158 text += "You can feel the acrid smoke from %POS% jizz curling up from your asshole.</p>";
160 text += "<p><b>"+enchTxt+"</b></p>";
162 text += "<p>Satisfied, the demon stands up, squirts a last bit of hot tar onto your back, and then kicks you in the head, knocking you";
163 text += "unconscious.</p>";
165 InfoScreen.push(gender.doReplace(text));
166 return true;
167 } else {
168 return false;
172 override public function initialGenderSetup():void
174 var gi:int = MathUtils.rand(0, 5);
175 switch(gi) {
176 case 0:
177 case 1:
178 this.gender = Gender.MALE;
179 break;
180 case 2:
181 case 3:
182 this.gender = Gender.FEMALE;
183 break;
184 case 4:
185 case 5:
186 this.gender = Gender.HERM;
187 break;
189 this.balls = new Vector.<Testicle>();
190 this._dicks = new Vector.<Penis>();
191 this.breasts = new Vector.<Breast>();
192 this.vaginas = new Vector.<Vagina>();
193 if(gender.hasDick) {
194 this.balls.push(
195 BodyPartRegistry.demon_testicle,
196 BodyPartRegistry.demon_testicle
198 this.dicks.push(
199 getNewDick()
202 if (gender.hasVag) {
203 this.vaginas.push(
204 BodyPartRegistry.demon_vagina
206 this.breasts.push(
207 BodyPartRegistry.demon_breast,
208 BodyPartRegistry.demon_breast
211 // Cionflip to get mutations or not
212 if(MathUtils.rand(0,1)==0)
213 doMutations();
216 private function getNewDick():Penis {
217 var wang:Penis = BodyPartRegistry.demon_penis
218 wang.size = MathUtils.rand(4, 12, true);
219 return wang;
222 private const mutationLocations:Array = new Array(
223 "a leg",
224 "%POS% chin",
225 "", // the normal spot
226 "an arm",
227 "%POS% face"
229 private function doMutations():void {
230 var i:int = 0;
232 // Dick & Balls
233 if(gender.hasDick) {
234 for (i = 0; i < MathUtils.rand(0, 2); i++) {
235 var p:Penis = null;
236 switch(MathUtils.rand(0, 2))
238 case 0:
239 p = BodyPartRegistry.human_penis;
240 case 1:
241 p = BodyPartRegistry.arachnid_penis;
242 case 2:
243 p = BodyPartRegistry.demon_penis;
245 p._location = MathUtils.getRandomArrayEntry(mutationLocations);
246 p.size = MathUtils.rand(1, 24, false);
247 this.dicks.push(t);
249 for (i = 0; i < MathUtils.rand(0, 3); i++) {
250 var t:Testicle = null;
251 switch(MathUtils.rand(0, 3))
253 case 0:
254 t = BodyPartRegistry.human_testicle;
255 case 1:
256 t = BodyPartRegistry.demon_testicle;
257 case 2:
258 t = BodyPartRegistry.arachnid_testicle;
259 case 3:
260 t = BodyPartRegistry.manticore_testicle;
262 t._location = MathUtils.getRandomArrayEntry(mutationLocations);
263 t.normalLoad = MathUtils.rand(1, 1000, false);
264 t.loadMult = MathUtils.rand(1, 200, false);
265 this.balls.push(t);
269 // Vags & Boobs
270 if(gender.hasVag) {
271 for (i = 0; i < MathUtils.rand(0, 2); i++) {
272 var v:Vagina = null;
273 switch(MathUtils.rand(0, 2))
275 case 0:
276 v = BodyPartRegistry.human_vagina;
277 case 1:
278 v = BodyPartRegistry.demon_vagina;
279 case 2:
280 v = BodyPartRegistry.arachnid_vagina;
282 v._location = MathUtils.getRandomArrayEntry(mutationLocations);
283 this.vaginas.push(v);
285 for (i = 0; i < MathUtils.rand(0, 2); i++) {
286 this.breasts.push(BodyPartRegistry.demon_breast);