1 package org
.sevenchan
.dongs
.bodyparts
3 import org
.sevenchan
.dongs
.Creature
;
4 import flash
.net
.registerClassAlias
;
5 import org
.sevenchan
.dongs
.weapons
.IWeapon
;
6 import org
.sevenchan
.dongs
.clothing
.Clothing
;
11 public class Eye
implements IBodyPart
13 registerClassAlias
("EEye", Eye
);
15 private var _name
:String = "";
16 public var color
:String = "";
17 public var pupilShape
:String = "";
18 public function Eye
(nam
:String="",color
:String="",pupilShape
:String="round")
22 this.pupilShape
= pupilShape
;
24 public var _location
:String = "";
25 public function get location
():String { return _location
;}
27 private var _value
:Number;
28 public function get value
():Number {
32 /* INTERFACE org.sevenchan.dongs.bodyparts.IBodyPart */
36 public function get category
():String {
40 public function getShortDescr
(withModifier
:Boolean = false):String {
48 public function get sellDesc
():String { return getShortDescr
(true); }
50 public function get name
():String
55 public function set name
(value
:String):void {
59 public function getDescr
(num
:Number, host
:Creature
):String
61 return num
+ " " + color
+ " " + pupilShape
+ "-pupiled eye" + ((num
> 1)?"s":"");
65 public function onFailedAttack
(from
:Creature
, to
:Creature
):void{}
66 public function onGoodAttack
(from
:Creature
, to
:Creature
):void{}
68 private var _weapon
:IWeapon
= null;
69 public function get weapon
():IWeapon
{ return _weapon
; }
70 public function tryEquip
(weap
:IWeapon
):Boolean
75 public function isConcealedBy
(host
:Creature
, clothing
:Vector
.<Clothing
>):Boolean
77 return clothing
.some
(function(c_
:Object, index
:int, vector
:Vector
.<Clothing
>):Boolean
79 var c
:Clothing
= Clothing
(c_
);
81 return (c
.type
.obscures
.indexOf
(category
) > -1);