1 package org
.sevenchan
.dongs
.enchantment
3 import flash
.sampler
.NewObjectSample;
4 import org
.sevenchan
.dongs
.Creature
;
5 import org
.sevenchan
.dongs
.creature
.Player
;
6 import org
.sevenchan
.dongs
.screens
.CombatScreen
;
7 import org
.sevenchan
.dongs
.screens
.InfoScreen
;
12 public class Paralyze
extends Enchantment
14 private var host
:Creature
;
15 private var turn
:int = 0;
16 public function Paralyze
()
20 public static function isParalyzed
(subj
:Creature
):Boolean {;
21 return subj
.hasEnchantment
("paralyze");
23 override public function onInit
(newHost
:Creature
):String
26 cancelAddition
= false;
27 if(newHost
is Player
) {
28 InfoScreen
.push
("<h2>Paralyzed</h2><p>You are now paralyzed.</p><p>Check your appearance screen to see your effects.</p>");
29 return "You are now paralyzed.";
31 var creatureRef
:String = newHost
.getTypeName
();
32 var story
:String = <![CDATA
[
35 You jam your hand into your pack and withdraw a small clay jar
. Judging its weight and eyeing
{the
[CREATURE
]}. %CSUB
% eyes you
36 right back
, albeit wary of the container
in your hand
, and equally wary of your darkening expression
.
39 Without warning
, you
throw the jar at
%CSUB
%, and
]]>.toString
();
40 if(newHost
.speed
> 0.25){
41 story
+= "reacting quickly, the "+creatureRef
+" rolls out of the way as the jar strikes the ground";
43 if(newHost
.arms
.length
== 0 || isParalyzed
(newHost
))
44 story
+="being unable to move";
46 story
+= "having poor reaction time";
47 story
+= ", the jar smashes into %POS% arm";
49 story
+= <![CDATA
[ and shatters
, releasing the powder into the air
in a small black explosion
.
52 %CSUB
% immediately goes limp and collapses to the ground
, paralyzed from the morel dust
's effects.
55 newHost.gender.doReplace(story);
56 return "The " + creatureRef + " is now paralyzed.";
59 override public function onMyCombatTurn(screen:CombatScreen,other:Creature):Boolean
62 trace("Paralyze.onMyCombatTurn()")
67 return super.onMyCombatTurn(screen,other);
70 override public function onCombatComplete(hostWon:Boolean, other:Creature):void
75 private function remove():void {
76 InfoScreen.push("<h2>NOT Paralyzed</h2><p>You are no longer paralyzed.</p>");
77 delete host.enchantments[getID()];
80 override public function getID():String