Add new clothing system
[18plus-7leafadventure.git] / src / org / sevenchan / dongs / creature / Ala.as
blob146980d7ca0edcaae9354841ff93d7333237dd19
1 package org.sevenchan.dongs.creature
3 import org.sevenchan.dongs.*;
4 import org.sevenchan.dongs.ability.AbilityRegistry;
5 import org.sevenchan.dongs.bodyparts.Eye;
6 import org.sevenchan.dongs.bodyparts.Gender;
7 import org.sevenchan.dongs.enchantment.WindBlessing;
8 import org.sevenchan.dongs.screens.InfoScreen;
9 /**
10 * An ala or hala (plural: ale or hali) is a demon of bad weather recorded in
11 * the folklore of Bulgarians, Macedonians, and Serbs.
12 * (Monsterpedia)
14 * @author Harbinger
16 public class Ala extends Creature
19 public function Ala()
21 super();
22 abilities = [
23 AbilityRegistry.sandstorm,
24 AbilityRegistry.rainstorm,
25 AbilityRegistry.hailstorm,
26 AbilityRegistry.lightning,
27 AbilityRegistry.tornado
29 abilityUseProbability = 1;
30 this._eyes.push(
31 BodyPartRegistry.ghost_yellow_eye,
32 BodyPartRegistry.ghost_yellow_eye
34 this.HP = 1100;
35 mana = 100;
36 this.gold = 100;
37 this.inventory.push(
38 ItemRegistry.POTION_GOLD
40 this._gender = Gender.ASEXUAL;
44 override public function combatDescr(subj:Creature):String
46 var text:String = "<p>While bumbling about, the sky darkens as ominous clouds roll in.";
47 text += "You groan in frustration at the impending storm and begin to unpack your camp, ";
48 text += " when you remember that storms do not have gigantic, red eyes, and they generally ";
49 text += "do not form clouds at ground level, and they definately do not laugh evilly.</p>"
50 if (subj.intellect >= 35)
51 text += "<p>You remember from your studies at home that this is an Ala, a weather "
52 +"demon. This experience, however, does NOT change the fact that it is hungry for "
53 +"blood and that you are completely fucked.</p>";
54 text += "<p>You begin to appreciate the beast's great size, it fills the valley before "
55 +"you. The creature's claws, each shaped like bony scythes, are as thick as a house. "
56 +"Even if they were blunt, they would kill you with their sheer size. The rest of the "
57 +"creature is an equally grim prospect. The Ala's body is constructed from a "
58 +"combination of bony, blade-covered plates atop massive, thorny tentacles around "
59 +"its incredible skeleton. Its burning, yellow eyes (fixed on you) and mouth belch "
60 +"black clouds of smoke that join with the stormclouds.</p>";
61 text += "<p>You're scared shitless, but too stubborn to turn back.</p>";
62 text += "<p><b>You have engaged the Wind Guardian and therefore cannot run.</b></p>";
63 return gender.doReplace(text);
66 override public function canRun():Boolean { return false; }
68 override public function getTypeName():String
70 return "Ala";
73 override public function getHostile(subj:Creature):Boolean
75 return true;
78 override public function getInterested(subj:Creature):Boolean
80 return false;
83 override public function onLose(ply:Creature):Boolean
85 ply.addEnchantment(new WindBlessing());
86 ply.abilities["lightning"] = AbilityRegistry.lightning;
87 ply.gold += 100;
88 for (var i:int = 0; i < inventory.length; i++) {
89 var item:Item = inventory[i];
90 ply.addToInventory(item);
93 InfoScreen.push("<p>The rain slows to a stop as the great beast before you stumbles, its "
94 +"body disintegrating as the storm dissipates. You stand, and before you are able to "
95 +"strike the creature a deathblow, blinding white light bursts from its eyes and mouth "
96 +"and begins spreading across its body as it screams loudly, shaking the ground from the "
97 +"sheer force of its painful shout. You raise an arm to your eyes, but the light and "
98 +"sound overwhelms your senses and you pass out.</p><p>You awaken a short time later, "
99 +"and feel rested. You notice that you have 100 more gold, a flask of Gold Potion that "
100 +"you don't remember buying, and a user's manual for the new lightning ability you now "
101 +"apparently have.</p><p>A gentle gust ruffles your tattered clothing, and you swear "
102 +"that you heard it whisper, \"You may pass\".</p>");
103 return true; // Yes, we are overriding the winnings screen.