Fix hair, dick around with new game screen.
[18plus-7leafadventure.git] / src / org / sevenchan / dongs / bodyparts / Eye.as
blob5bb54c241254bf9f1d2a86ffe501b4cb64f6af15
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;
7 /**
8 * ...
9 * @author Harbinger
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")
20 _name = nam;
21 this.color = color;
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 {
29 return _value;
32 /* INTERFACE org.sevenchan.dongs.bodyparts.IBodyPart */
36 public function get category():String {
37 return "eyes";
40 public function getShortDescr(withModifier:Boolean = false):String {
41 var t:String = "eye";
42 if(withModifier)
43 t = name + " " + t;
44 return t;
48 public function get sellDesc():String { return getShortDescr(true); }
50 public function get name():String
52 return _name;
55 public function set name(value:String):void {
56 _name = value;
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
72 return false;
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_);
80 if (c != null)
81 return (c.type.obscures.indexOf(category) > -1);
82 else
83 return false;
84 });