1 package org
.sevenchan
.dongs
.bodyparts
3 import org
.sevenchan
.dongs
.Creature
;
4 import org
.sevenchan
.dongs
.enchantment
.*;
5 import flash
.net
.registerClassAlias
;
6 import org
.sevenchan
.dongs
.weapons
.IWeapon
;
7 import org
.sevenchan
.dongs
.clothing
.Clothing
;
12 public class Testicle
implements IBodyPart
14 registerClassAlias
("P_Ball", Testicle
);
16 public var _name
:String;
17 public var semen
:String;
18 public var loadMult
:Number = 1; // multiplies below
19 public var normalLoad
:Number; // ml, per testicle
20 public var targetFX
:Enchantment
= null; // Enchantment to apply to the target after cumming
21 public var hostFX
:Enchantment
= null; // Enchantment to apply to the host once the balls are applied, and once every action.
22 public var host
:Creature
= null;
23 public var _location
:String = "";
25 private var _value
:Number;
26 public function get value
():Number {
30 public function get location
():String { return _location
; }
31 public function set location
(value
:String):void { _location
=value
; }
33 public var TESTICLE_SYNONYMS
:Array = [
34 "ball","nut","knocker","testicle"
37 public function get category
():String {
41 public function Testicle
(name
:String="",load
:Number=0,targetEnch
:Enchantment
=null,hostEnch
:Enchantment
=null,semenDesc
:String="")
46 targetFX
= targetEnch
;
51 public function get name
():String {
55 public function setHost
(value
:Creature
):void {
57 host
.addEnchantment
(hostFX
);
60 public function get sellDesc
():String { return getDescr
( -1, null); }
62 public function getDescr
(num
:Number, host
:Creature
):String {
63 var sizeDesc
:String="standard-issue";
65 sizeDesc
= "shrivelled ";
68 sizeDesc
= "melon-sized, ballooning ";
71 sizeDesc
= "apple-sized, greatly swollen ";
74 sizeDesc
= "large, fat and tight ";
78 sizeDesc
= "slightly swollen ";
81 sizeDesc
= "standard-issue ";
86 o
+= Utils
.pluralize
(num
, name
);
87 if (_location
.length
> 0)
88 o
= o
+ " growing out of " + _location
;
92 public function getShortDescr
(withModifier
:Boolean = false):String {
93 var t
:String = MathUtils
.getRandomArrayEntry
(TESTICLE_SYNONYMS
);
99 public function onFailedAttack
(from
:Creature
, to
:Creature
):void{}
100 public function onGoodAttack
(from
:Creature
, to
:Creature
):void{}
102 private var _weapon
:IWeapon
= null;
103 public function get weapon
():IWeapon
{ return _weapon
; }
105 public function tryEquip
(weap
:IWeapon
):Boolean
110 public function isConcealedBy
(host
:Creature
, clothing
:Vector
.<Clothing
>):Boolean
112 return clothing
.some
(function(c_
:Object, index
:int, vector
:Vector
.<Clothing
>):Boolean
114 var c
:Clothing
= Clothing
(c_
);
116 return (c
.type
.obscures
.indexOf
(category
) > -1);