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
;
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")
28 this.texture
= texture
;
31 public function get sellDesc
():String { return getShortDescr
(true); }
33 private var _value
:Number;
34 public function get value
():Number {
38 /* INTERFACE org.sevenchan.dongs.bodyparts.IBodyPart */
41 public function get category
():String {
45 public function getShortDescr
(withModifier
:Boolean = false):String {
46 var t
:String = "skin";
52 public function get name
():String
57 public function getDescr
(num
:Number, host
:Creature
):String {
58 var dmgDescr
:Array = [
59 "throughly-decayed and corrupted", //0
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
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
87 public function isConcealedBy
(host
:Creature
, clothing
:Vector
.<Clothing
>):Boolean