1 package org
.sevenchan
.dongs
.bodyparts
4 import flash
.net
.registerClassAlias
;
5 import org
.sevenchan
.dongs
.clothing
.Clothing
;
6 import org
.sevenchan
.dongs
.clothing
.ClothingType
;
7 import org
.sevenchan
.dongs
.Creature
;
8 import org
.sevenchan
.dongs
.enchantment
.*;
9 import org
.sevenchan
.dongs
.screens
.InfoScreen
;
10 import org
.sevenchan
.dongs
.weapons
.IWeapon
;
16 public class Penis
implements IBodyPart
18 registerClassAlias
("P_Dick", Penis
);
20 public var size
:Number = 0;
21 public var sizeMult
:Number = 1;
22 public var _name
:String;
24 private var _value
:Number;
25 public var _location
:String = "";
27 public function get location
():String
32 public function get value
():Number
37 public function Penis
(name
:String = "", value
:Number = 400, sz
:Number = 1, targetEnch
:Enchantment
= null, hostEnch
:Enchantment
= null)
45 public function get name
():String
50 public function get category
():String
55 public function get sellDesc
():String
57 return getDescr
(-1, null);
60 public function getDescr
(num
:Number, host
:Creature
):String
62 var sizeDesc
:String = "average";
63 var erectDesc
:String = "flaccid";
64 var dick
:String = getShortDescr
();
68 var sz
:Number = size
* sizeMult
;
71 sizeDesc
= "bus-sized, bloated and";
73 sizeDesc
= "man-sized, bulging and";
75 sizeDesc
= "huge, pulsing and";
84 erectDesc
= "rock-hard, throbbing";
88 erectDesc
= "hardening";
90 erectDesc
= "growing";
92 // massive rock-hard, throbbing 5" dicks
93 var dm
:String = sizeDesc
+ " " + erectDesc
+ " " + MathUtils
.inchesToFootInches
(sz
) + " " + name
+ " " + dick
+ ((num
> 1) ? "s" : "");
97 dm
= "a single " + dm
;
100 if (_location
.length
> 0)
101 dm
= dm
+ " growing out of " + _location
;
105 public function getShortDescr
(withModifier
:Boolean = false):String
107 var t
:String = "dick"
113 public function onFailedAttack
(from
:Creature
, to
:Creature
):void
117 public function onGoodAttack
(from
:Creature
, to
:Creature
):void
121 public function onAdded
(atStore
:Boolean, ply
:Creature
):void
124 var text
:String = "<h2>New Penis</h2>";
127 text
+= "<p>The shopkeeper whispers a few words, and then pokes your groin with her wand. You begin ";
128 text
+= "whispering your own hushed curses as you ";
132 text
+= "<p>You groan as you ";
134 text
+= "feel your groin heat up and begin bulging outward. The bulge then slowly ";
135 text
+= "worms outward, like a meaty tenticle, until it begins to take the shape of a " + getDescr
(1, ply
) + "."
136 InfoScreen
.push
(text
);
139 public function onRemoved
(atStore
:Boolean, ply
:Creature
):void
142 var text
:String = "<h2>Remove a Penis</h2>";
145 text
+= "<p>The old woman mutters a few ancient words under her breath, and then jabs at your " + getDescr
(1, ply
) + " with her old wand, doing a twisting motion with her wrist as she does so. An accusing scowl takes over her face and she continues chanting, her voice becoming more angry. Almost like a dog running away from an angry owner with its tail tucked between its legs, your dong retreats back into your body and vanishes.</p>";
147 text
+= "<p>You groan as your " + getDescr
(1, ply
) + " retracts into your body like a hose being reeled in.</p>";
149 InfoScreen
.push
(text
);
152 public function grow
(ply
:Creature
, atStore
:Boolean, _size
:Number):String
156 var descr
:String = getDescr
(1, ply
);
157 return "You feel more weight in your trousers. Frightened, you look down and see a penis has grown to become " + Utils
.A
(descr
) + " " + descr
+ ".";
160 public function shrink
(ply
:Creature
, atStore
:Boolean, _size
:Number):String
164 return "You groan as you feel your " + getDescr
(1, ply
) + " sucked back into your body a few inches.";
167 private var _weapon
:IWeapon
= null;
169 public function get weapon
():IWeapon
174 public function tryEquip
(weap
:IWeapon
):Boolean
179 public function getBulgeSize
(host
:Creature
, c
:Clothing
):Number
181 if (c
.type
!= ClothingType
.PANTS
)
183 var horniness
:Number = Number(host
.lust
+0.0) / 100.0;
184 var realsize
:Number = Math.max
(0.1, horniness
) * (size
*sizeMult
);
185 trace
("bsize of a " + MathUtils
.inchesToFootInches
(size
* sizeMult
) + "("+(size
*sizeMult
).toString
()+", h"+horniness
.toString
()+") dick = " + realsize
.toString
());
189 public function isProducingABulge
(host
:Creature
, c
:Clothing
):Boolean
191 if (getBulgeSize
(host
, c
) > 6)
196 public function isProducingABulgeInSomething
(host
:Creature
, clothing
:Vector
.<Clothing
>):Boolean
198 for each (var c
:Clothing
in clothing
)
200 if (getBulgeSize
(host
, c
) > 6)
206 public function isConcealedBy
(host
:Creature
, clothing
:Vector
.<Clothing
>):Boolean
208 return clothing
.some
(function(c_
:Object, index
:int, vector
:Vector
.<Clothing
>):Boolean
210 var c
:Clothing
= Clothing
(c_
);
213 return (c
.type
.obscures
.indexOf
(category
) > -1 && !isProducingABulge
(host
, c
));