Initial commit (r9)
[18plus-7leafadventure.git] / src / org / sevenchan / dongs / bodyparts / Build.as
blob99c1d5810dc55583bccb92afe573d34dcb4835e1
1 package org.sevenchan.dongs.bodyparts
3 import org.sevenchan.dongs.Creature;
4 import flash.net.registerClassAlias;
5 /**
6 * A nice, stupid way for creatures to have defined builds.
7 * @author N3X15
8 */
9 public class Build
11 registerClassAlias("P_Build", Build);
12 public static const AVG:Build = new Build(1, 1,"of average weight and build.");
13 public static const HIDEOUS:Build = new Build(2.5, -0.5, "hideously fat; You can practically <i>smell</i> the decaying flesh between the rolls.");
14 public static const CHUBBY:Build = new Build(1.5, -0.5,"is a bit chubby, with a slightly bulging belly and a round face.");
15 public static const MALNOURISHED:Build = new Build(-1.5, -0.5,"is terrifyingly malnourished; Bones poke out in seemingly every direction.");
16 public static const PRETTYSTRONG:Build = new Build(1, 1.5,"has lean muscles rippling across %POS% slim body.");
17 public static const EATSTRAINS:Build = new Build(1, 1.5, "is covered in a swarm of immense, car-crushing muscles that even ten bucket-fulls of steroids couldn't possibly produce.");
19 public var weightMultiplier:Number;
20 public var strengthMultiplier:Number;
21 public var bodyIsText:String;
22 public function Build(weightmult:Number=1, strmult:Number=1, descr:String="") {
23 weightMultiplier = weightmult;
24 strengthMultiplier = strmult;
25 bodyIsText = descr;
28 public function calculateWeight(height:Number, density:Number):int {
29 return (int)((height * density) * weightMultiplier * (strengthMultiplier * 0.05));
32 public function getDescription():String {
33 return bodyIsText;