Fix hair, dick around with new game screen.
[18plus-7leafadventure.git] / src / org / sevenchan / dongs / bodyparts / Skin.as
blobfb35fe1b5a22f0e2469f98a10005bc50424e0971
2 package org.sevenchan.dongs.bodyparts
4 import org.sevenchan.dongs.Creature;
5 import org.sevenchan.dongs.enchantment.*;
6 import flash.net.registerClassAlias;
7 import org.sevenchan.dongs.weapons.IWeapon;
8 import org.sevenchan.dongs.clothing.Clothing;
9 /**
10 * ...
11 * @author Harbinger
13 public class Skin implements IBodyPart
15 registerClassAlias("P_Skin", Skin);
17 public var _name:String;
18 public var color:String;
19 public var texture:String;
20 public var descrOverride:String = "";
21 public var _location:String = "";
22 public function get location():String { return _location;}
24 public function Skin(n:String = "", color:String = "light", texture:String = "silk-smooth")
26 this._name = n;
27 this.color = color;
28 this.texture = texture;
31 public function get sellDesc():String { return getShortDescr(true); }
33 private var _value:Number;
34 public function get value():Number {
35 return _value;
38 /* INTERFACE org.sevenchan.dongs.bodyparts.IBodyPart */
41 public function get category():String {
42 return "skins";
45 public function getShortDescr(withModifier:Boolean = false):String {
46 var t:String = "skin";
47 if(withModifier)
48 t = color + " " + t;
49 return t;
52 public function get name():String
54 return _name;
57 public function getDescr(num:Number, host:Creature):String {
58 var dmgDescr:Array = [
59 "throughly-decayed and corrupted", //0
60 "mostly rotten", //1
61 "vomit-inducing decaying", //2
62 "corruption-riddled, abscessed, pitted, and baggy", //3
63 "corruption-scarred and cellulous", //4
64 "heavily-pimpled", //5
65 "moderately zitty", //6
66 "blemish-sprinkled, but pretty", //7
67 "slightly damaged", //8
68 "perfect" //9
70 var damage:int = 10 - Math.min(10, Math.max(1, Math.round((Corruption.getLevelOf(host) * 0.1))))
72 // perfect light, smooth human skin.
73 return dmgDescr[damage] + " " + color + ", " + texture + " " + _name + " skin";
76 public function onFailedAttack(from:Creature, to:Creature):void{}
77 public function onGoodAttack(from:Creature, to:Creature):void{}
79 private var _weapon:IWeapon = null;
80 public function get weapon():IWeapon { return _weapon; }
81 public function tryEquip(weap:IWeapon):Boolean
83 return false;
87 public function isConcealedBy(host:Creature, clothing:Vector.<Clothing>):Boolean
89 return false;