Fix hair, dick around with new game screen.
[18plus-7leafadventure.git] / src / org / sevenchan / dongs / bodyparts / arm / ManticoreArm.as
blob82d41ae5d103acd7eeb0d48154ae0d713f0f2460
1 package org.sevenchan.dongs.bodyparts.arm
3 import org.sevenchan.dongs.bodyparts.*;
4 import org.sevenchan.dongs.Creature;
5 import org.sevenchan.dongs.creature.Player;
6 import org.sevenchan.dongs.enchantment.*;
7 import flash.net.registerClassAlias;
8 import org.sevenchan.dongs.screens.InfoScreen;
9 /**
10 * ...
11 * @author Harbinger
13 public class ManticoreArm extends Arm
15 registerClassAlias("P_ManticoreArm", ManticoreArm);
17 private var _name:String;
18 public function ManticoreArm(value:Number)
20 super(value, "manticore");
23 private var _value:Number;
24 public override function get value():Number {
25 return _value;
28 public override function get name():String {
29 return _name;
32 public override function get category():String {
33 return "arms";
36 public override function get sellDesc():String { return getShortDescr(true); }
38 public override function getDescr(num:Number, host:Creature):String {
39 return num + " big, hairy "+Utils.pluralize(num,getShortDescr(true))+" (with attached inch-long claws)";
42 public override function getShortDescr(withModifier:Boolean = false):String {
43 return "manticore arm";
46 public override function onFailedAttack(from:Creature, to:Creature):void
48 if (from is Player)
49 InfoScreen.push(to.gender.doReplace(
50 "<p>You attempt to slash the " + to.getTypeName() + " with your claws, but %SUB% moves too quickly and evades the attack!</p>"));
51 else
52 InfoScreen.push(from.gender.doReplace(
53 "<p>You manage to duck just as you hear the muffled <i>swish</i> of the angry "+from.getTypeName()+"'s giant claws cutting through the air a few inches above your head.</p>"));
55 public override function onGoodAttack(from:Creature, to:Creature):void{
56 var dmg:Number = Math.max(20, from.strength - to.strength + 20);
57 if (from is Player)
58 InfoScreen.push(to.gender.doReplace("<p>You violently rake your claws over %POS% body, resulting in a devastating loss of "+dmg+" HP!</p>"));
59 else
60 InfoScreen.push(from.gender.doReplace("<p>%CSUB% cuts new furrows into your face with %POS% claws, dealing " + dmg + " damage!</p>"));
61 //trace("["+getDescr(1,from)+"] BEFORE: "+to.HP);
62 to.HP -= dmg;
63 //trace("["+getDescr(1,from)+"] AFTER: "+to.HP);