Fix a bunch of issues with Haara.
[18plus-7leafadventure.git] / src / org / sevenchan / dongs / towns / WildsHaaraWastes.as
blob0e08e771166b17050f568a17dfc419230358b303
1 package org.sevenchan.dongs.towns
3 import org.sevenchan.dongs.Creature;
4 import org.sevenchan.dongs.creature.*;
5 import org.sevenchan.dongs.Town;
6 import org.sevenchan.dongs.screens.encounters.HaaraRevelationEncounter;
7 /**
8 * ...
9 * @author Harbinger
11 public class WildsHaaraWastes extends Town
14 public function WildsHaaraWastes()
16 super();
17 ID = "haara";
18 name = "Haara Wastes";
20 inhabitants[CreatureRegistry.arachnid] = 0.1;
21 inhabitants[CreatureRegistry.arachnid_pregnant] = 0.1;
22 inhabitants[CreatureRegistry.witch] = 0.1;
24 isWilds = true;
25 freeRest = true;
26 connectedTowns = [
27 "banala"
32 override public function onEnter():void
34 text = "<p>The desert stretches from horizon to horizon before you, beckoning you forwards.</p>";
37 override public function onExplore(bumpedInto:Creature):void
39 text = "<p>The Haara is what you'd generally expect from deserts. Although the area nearest Banala is primarily endless sand dunes in every direction, the rest of the desert are sand-blasted rock plains, with plenty of places for the various inhabitants of the wastes to hide and lay ambush.</p>";
40 var re:Number = Math.round(MathUtils.rand(0, 2));
41 trace("HAARA EVENT #"+re);
42 switch(re) {
43 case 0:
44 text += "<p>Your trip through the desert is enlightening.</p><p>+1 INT</p>";
45 this.main.player.intellect += 1;
46 return;
47 break;
48 case 1:
49 text += "<p>You trip over a rock and scrape up your hands and face, but otherwise, nothing else happens.</p>";
50 main.player.HP -= 2;
51 return;
52 break;
53 default:
54 break;
56 text += "<p>Not much happens during your exploration";
57 if(bumpedInto!=null)
58 text += ", except for bumping into a " + bumpedInto.getTypeName();
59 text +=".</p>";
62 override public function onRevelation():Boolean
64 main.player.setExplored(this.ID);
65 main.setScreen(new HaaraRevelationEncounter(null));
66 return false; // Only way to get the screen to switch over, apparently.