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
;
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 {
28 public override function get name
():String {
32 public override function get category
():String {
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
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>"));
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);
58 InfoScreen
.push
(to
.gender
.doReplace
("<p>You violently rake your claws over %POS% body, resulting in a devastating loss of "+dmg
+" HP!</p>"));
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);
63 //trace("["+getDescr(1,from)+"] AFTER: "+to.HP);