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
.screens
.InfoScreen
;
9 import org
.sevenchan
.dongs
.weapons
.IWeapon
;
14 public class Breast
implements IBodyPart
16 registerClassAlias
("P_Boob", Breast
);
18 private var _name
:String;
19 public var isHairy
:Boolean=false;
20 public var size
:int = 1;
21 public var milkMult
:Number = 1;
22 private static var breastSizes
:Array = [
31 private static var breastSynonyms
:Array = [
43 //public function Breast(value:Number,name:String="",size:int=1,milkMultiplier:Number=1)
48 //this.milkMult = milkMultiplier;
50 public function Breast
(value
:Number=0,name
:String="",furry
:Boolean=false)
57 private var _value
:Number;
58 public function get value
():Number {
61 public var _location
:String = "right where it should be";
62 public function get location
():String { return _location
;}
65 public function get sellDesc
():String { return getShortDescr
(true); }
67 public function get category
():String {
71 public function get name
():String {
75 public function bigger
():void {
76 if (breastSizes
.length
-1 == size
)
81 public function smaller
():void {
88 * How much in need of milking these tits are.
91 public function getMilkFeeling
():String {
95 if (milkMult
>= 0.5 && milkMult
< 1.5) {
98 if (milkMult
>= 1.5 && milkMult
< 2) {
101 if (milkMult
>= 2 && milkMult
< 5) {
102 return "slightly swollen";
105 return "painfully swollen";
110 public function getDescr
(num
:Number, host
:Creature
):String {
111 // 2 big{, painfully swollen} tits
112 var text
:String = num
+ " " + breastSizes
[size
];
114 text
+= ", " + getMilkFeeling
();
115 text
+= " " + Utils
.pluralize
(num
,getShortDescr
());
121 public function getShortDescr
(withModifier
:Boolean = false):String {
122 var t
:String = MathUtils
.getRandomArrayEntry
(breastSynonyms
);
130 public function onFailedAttack
(from
:Creature
, to
:Creature
):void{}
131 public function onGoodAttack
(from
:Creature
, to
:Creature
):void{}
133 public function onAdded
(atStore
:Boolean, ply
:Creature
):void
135 var text
:String = "<h2>New Breast</h2>";
138 text
+= "<p>The witch blows at your chest over her dry, spindly fingers, as though she were blowing a kiss. The creepy throught passes as you ";
144 text
+= " feel a bulge of flesh come into being on your chest, slowly expanding into " + Utils
.A
(getDescr
(1, ply
)) + " " + getDescr
(1, ply
)+"</p>";
145 InfoScreen
.push
(text
);
148 public function onRemoved
(atStore
:Boolean, ply
:Creature
):void
150 var text
:String = "<h2>Remove a Breast</h2>";
153 text
+= "<p>The old lady simply prods your unwanted flesh tumor with her wand, and it ";
155 text
+= "<p>One of your breasts ";
156 text
+= "slowly deflates, and then recedes back into your body with a warm tingling sensation.</p>";
157 InfoScreen
.push
(text
);
160 private var _weapon
:IWeapon
= null;
161 public function get weapon
():IWeapon
{ return _weapon
; }
162 public function tryEquip
(weap
:IWeapon
):Boolean
164 if (weap
.canEquipOn
(this)){
171 public function getBulgeSize
(host
:Creature
, c
:Clothing
):Number
173 if (c
.type
!= ClothingType
.TOP
)
178 public function isProducingABulge
(host
:Creature
, clothing
:Vector
.<Clothing
>):Boolean
180 for each (var c
:Clothing
in clothing
)
182 if (getBulgeSize
(host
, c
) >= 2)
188 public function isConcealedBy
(host
:Creature
, clothing
:Vector
.<Clothing
>):Boolean
190 return clothing
.some
(function(c_
:Object, index
:int, vector
:Vector
.<Clothing
>):Boolean
192 var c
:Clothing
= Clothing
(c_
);
195 return (c
.type
.obscures
.indexOf
(category
) > -1 && !(getBulgeSize
(host
, c
)>=2));