STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229594
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/62106357?noj=FRM62106357-22DC" width="1" height="1"></div>

how-to-raise-a-drago-4046.swf

This is the info page for
Flash #205688

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS3]
Section 1
//BookTrigger (Interface.BookTrigger) package Interface { import Screens.*; import flash.media.*; public class BookTrigger extends Trigger { private var music:Sound; private var message:String; private var title:String; public function BookTrigger(_arg1:Array, _arg2:String, _arg3:String, _arg4:Sound=null){ this.title = _arg2; this.message = _arg3; this.music = _arg4; super(_arg1, doTrigger); } private function doTrigger():void{ Main.pushScreen(new BookScreen((Main.currScreen as PlayScreen), title, message)); if (music){ music.play(); }; } } }//package Interface
Section 2
//BreathStatus (Interface.BreathStatus) package Interface { import Screens.*; import flash.events.*; import flash.display.*; import flash.geom.*; import Util.*; public class BreathStatus extends Sprite { private var fadingOut:Boolean; public function BreathStatus(_arg1:BitmapData, _arg2:int){ var _local4:BitmapData; super(); var _local3:BitmapData = _arg1.clone(); _local3.applyFilter(_arg1, _arg1.rect, new Point(0, 0), DragonGraphics.MONOCHROME_FILTER); DragonGraphics.drawSprite(graphics, _local3, 0, 0); if (_arg2 > 0){ _local4 = _arg1.clone(); if (_arg2 == 3){ _local4.fillRect(new Rectangle(0, 0, 20, 20), 0); } else { if (_arg2 < 3){ _local4.fillRect(new Rectangle(0, 0, 20, 40), 0); if (_arg2 == 1){ _local4.fillRect(new Rectangle(20, 20, 20, 20), 0); }; }; }; DragonGraphics.drawSprite(graphics, _local4, 0, 0); }; this.alpha = 0; } public function step():void{ if (fadingOut){ this.alpha = (this.alpha - 0.03); } else { this.alpha = (this.alpha + 0.03); }; if (((fadingOut) && ((this.alpha <= 0.03)))){ PlayScreen(this.parent).clearOverlay(); dispatchEvent(new Event(Event.COMPLETE)); } else { this.x = (-(this.parent.x) + 60); this.y = (-(this.parent.y) + 20); if (this.alpha > 0.97){ fadingOut = true; }; }; } } }//package Interface
Section 3
//Slider (Interface.Slider) package Interface { import flash.events.*; import flash.display.*; import flash.geom.*; public class Slider extends Sprite { private var steps:int; private var thumb:Sprite; private var dragRect:Rectangle; private var stepWidth:Number; public function Slider(_arg1:int, _arg2:int, _arg3:int, _arg4:uint){ this.steps = _arg3; this.stepWidth = (Number(_arg1) / Number((_arg3 - 1))); thumb = new Sprite(); thumb.graphics.beginFill(_arg4); thumb.graphics.lineStyle(0.5, 0); thumb.graphics.drawRect((-(int(stepWidth)) / 2), 0, int(stepWidth), _arg2); thumb.graphics.endFill(); thumb.buttonMode = true; this.addEventListener(Event.ADDED_TO_STAGE, onAdded); dragRect = new Rectangle(0, 0, _arg1, 0); graphics.lineStyle(0.5, 0); graphics.moveTo(0, (_arg2 / 2)); graphics.lineTo(_arg1, (_arg2 / 2)); var _local5:int; while (_local5 < _arg3) { graphics.moveTo(int((_local5 * stepWidth)), 0); graphics.lineTo(int((_local5 * stepWidth)), _arg2); _local5++; }; this.addChild(thumb); } private function mouseUp(_arg1:MouseEvent):void{ thumb.stopDrag(); snapThumb(); stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMove); stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUp); } private function onAdded(_arg1:Event):void{ thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbMouseDown); } public function get position():int{ return (Math.round((thumb.x / stepWidth))); } private function thumbMouseDown(_arg1:MouseEvent):void{ thumb.startDrag(false, dragRect); stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMove); stage.addEventListener(MouseEvent.MOUSE_UP, mouseUp); } private function snapThumb():void{ thumb.x = (position * stepWidth); } private function mouseMove(_arg1:MouseEvent):void{ dispatchEvent(new Event(Event.CHANGE)); } } }//package Interface
Section 4
//SpeechBubble (Interface.SpeechBubble) package Interface { import Screens.*; import WorldObjects.*; import Util.*; import Resources.*; public class SpeechBubble extends WorldObject { public function SpeechBubble(_arg1:int, _arg2:int, _arg3:PlayScreen){ super(_arg3); this.x = _arg1; this.y = _arg2; DragonGraphics.drawSprite(graphics, Sprites.SPEECHBUBBLE_HEAL.bitmapData, 0, 0); } override public function step(_arg1:int):void{ if ((_arg1 % 32) == 0){ this.visible = !(this.visible); }; } } }//package Interface
Section 5
//Trigger (Interface.Trigger) package Interface { import flash.geom.*; import WorldObjects.*; public class Trigger { private var triggerFunction:Function; private var activated:Boolean;// = false private var rectArray:Array; public function Trigger(_arg1:Array, _arg2:Function){ rectArray = _arg1; this.triggerFunction = _arg2; } final public function activate():void{ if (!activated){ activated = true; triggerFunction(); }; } public function contains(_arg1:WorldObject):Boolean{ var _local3:Rectangle; var _local2:Rectangle = _arg1.getRect(_arg1.parent); for each (_local3 in rectArray) { if (_local3.intersects(_local2)){ return (true); }; }; return (false); } } }//package Interface
Section 6
//BitmapAsset (mx.core.BitmapAsset) package mx.core { import flash.display.*; public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject { mx_internal static const VERSION:String = "3.0.0.0"; public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } public function get measuredWidth():Number{ if (bitmapData){ return (bitmapData.width); }; return (0); } public function get measuredHeight():Number{ if (bitmapData){ return (bitmapData.height); }; return (0); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } } }//package mx.core
Section 7
//ByteArrayAsset (mx.core.ByteArrayAsset) package mx.core { import flash.utils.*; public class ByteArrayAsset extends ByteArray implements IFlexAsset { mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.core
Section 8
//EdgeMetrics (mx.core.EdgeMetrics) package mx.core { public class EdgeMetrics { public var top:Number; public var left:Number; public var bottom:Number; public var right:Number; mx_internal static const VERSION:String = "3.0.0.0"; public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0); ; public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.left = _arg1; this.top = _arg2; this.right = _arg3; this.bottom = _arg4; } public function clone():EdgeMetrics{ return (new EdgeMetrics(left, top, right, bottom)); } } }//package mx.core
Section 9
//FlexBitmap (mx.core.FlexBitmap) package mx.core { import flash.display.*; import mx.utils.*; public class FlexBitmap extends Bitmap { mx_internal static const VERSION:String = "3.0.0.0"; public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ var bitmapData = _arg1; var pixelSnapping = _arg2; var smoothing = _arg3; super(bitmapData, pixelSnapping, smoothing); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 10
//FlexMovieClip (mx.core.FlexMovieClip) package mx.core { import flash.display.*; import mx.utils.*; public class FlexMovieClip extends MovieClip { mx_internal static const VERSION:String = "3.0.0.0"; public function FlexMovieClip(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 11
//FontAsset (mx.core.FontAsset) package mx.core { import flash.text.*; public class FontAsset extends Font implements IFlexAsset { mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.core
Section 12
//IBorder (mx.core.IBorder) package mx.core { public interface IBorder { function get borderMetrics():EdgeMetrics; } }//package mx.core
Section 13
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 14
//IFlexDisplayObject (mx.core.IFlexDisplayObject) package mx.core { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.accessibility.*; public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher { function get visible():Boolean; function get rotation():Number; function localToGlobal(_arg1:Point):Point; function get name():String; function set width(_arg1:Number):void; function get measuredHeight():Number; function get blendMode():String; function get scale9Grid():Rectangle; function set name(_arg1:String):void; function set scaleX(_arg1:Number):void; function set scaleY(_arg1:Number):void; function get measuredWidth():Number; function get accessibilityProperties():AccessibilityProperties; function set scrollRect(_arg1:Rectangle):void; function get cacheAsBitmap():Boolean; function globalToLocal(_arg1:Point):Point; function get height():Number; function set blendMode(_arg1:String):void; function get parent():DisplayObjectContainer; function getBounds(_arg1:DisplayObject):Rectangle; function get opaqueBackground():Object; function set scale9Grid(_arg1:Rectangle):void; function setActualSize(_arg1:Number, _arg2:Number):void; function set alpha(_arg1:Number):void; function set accessibilityProperties(_arg1:AccessibilityProperties):void; function get width():Number; function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean; function set cacheAsBitmap(_arg1:Boolean):void; function get scaleX():Number; function get scaleY():Number; function get scrollRect():Rectangle; function get mouseX():Number; function get mouseY():Number; function set height(_arg1:Number):void; function set mask(_arg1:DisplayObject):void; function getRect(_arg1:DisplayObject):Rectangle; function get alpha():Number; function set transform(_arg1:Transform):void; function move(_arg1:Number, _arg2:Number):void; function get loaderInfo():LoaderInfo; function get root():DisplayObject; function hitTestObject(_arg1:DisplayObject):Boolean; function set opaqueBackground(_arg1:Object):void; function set visible(_arg1:Boolean):void; function get mask():DisplayObject; function set x(_arg1:Number):void; function set y(_arg1:Number):void; function get transform():Transform; function set filters(_arg1:Array):void; function get x():Number; function get y():Number; function get filters():Array; function set rotation(_arg1:Number):void; function get stage():Stage; } }//package mx.core
Section 15
//IRepeaterClient (mx.core.IRepeaterClient) package mx.core { public interface IRepeaterClient { function get instanceIndices():Array; function set instanceIndices(_arg1:Array):void; function get isDocument():Boolean; function set repeaters(_arg1:Array):void; function initializeRepeaterArrays(_arg1:IRepeaterClient):void; function get repeaters():Array; function set repeaterIndices(_arg1:Array):void; function get repeaterIndices():Array; } }//package mx.core
Section 16
//MovieClipAsset (mx.core.MovieClipAsset) package mx.core { public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder { private var _measuredHeight:Number; private var _measuredWidth:Number; mx_internal static const VERSION:String = "3.0.0.0"; public function MovieClipAsset(){ _measuredWidth = width; _measuredHeight = height; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get measuredHeight():Number{ return (_measuredHeight); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } public function get borderMetrics():EdgeMetrics{ if (scale9Grid == null){ return (EdgeMetrics.EMPTY); }; return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom)))); } } }//package mx.core
Section 17
//MovieClipLoaderAsset (mx.core.MovieClipLoaderAsset) package mx.core { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.system.*; public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject { protected var initialHeight:Number;// = 0 private var loader:Loader;// = null private var initialized:Boolean;// = false protected var initialWidth:Number;// = 0 private var requestedHeight:Number; private var requestedWidth:Number; mx_internal static const VERSION:String = "3.0.0.0"; public function MovieClipLoaderAsset(){ var _local1:LoaderContext = new LoaderContext(); _local1.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); if (("allowLoadBytesCodeExecution" in _local1)){ _local1["allowLoadBytesCodeExecution"] = true; }; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler); loader.loadBytes(movieClipData, _local1); addChild(loader); } override public function get width():Number{ if (!initialized){ return (initialWidth); }; return (super.width); } override public function set width(_arg1:Number):void{ if (!initialized){ requestedWidth = _arg1; } else { loader.width = _arg1; }; } override public function get measuredHeight():Number{ return (initialHeight); } private function completeHandler(_arg1:Event):void{ initialized = true; initialWidth = loader.width; initialHeight = loader.height; if (!isNaN(requestedWidth)){ loader.width = requestedWidth; }; if (!isNaN(requestedHeight)){ loader.height = requestedHeight; }; dispatchEvent(_arg1); } override public function set height(_arg1:Number):void{ if (!initialized){ requestedHeight = _arg1; } else { loader.height = _arg1; }; } override public function get measuredWidth():Number{ return (initialWidth); } override public function get height():Number{ if (!initialized){ return (initialHeight); }; return (super.height); } public function get movieClipData():ByteArray{ return (null); } } }//package mx.core
Section 18
//mx_internal (mx.core.mx_internal) package mx.core { public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal"; }//package mx.core
Section 19
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.core
Section 20
//NameUtil (mx.utils.NameUtil) package mx.utils { import flash.display.*; import mx.core.*; import flash.utils.*; public class NameUtil { mx_internal static const VERSION:String = "3.0.0.0"; private static var counter:int = 0; public static function displayObjectToString(_arg1:DisplayObject):String{ var _local2:String; var _local4:String; var _local5:Array; var _local3:DisplayObject = _arg1; while (_local3 != null) { if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){ break; }; _local4 = _local3.name; if ((_local3 is IRepeaterClient)){ _local5 = IRepeaterClient(_local3).instanceIndices; if (_local5){ _local4 = (_local4 + (("[" + _local5.join("][")) + "]")); }; }; _local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2); _local3 = _local3.parent; }; return (_local2); } public static function createUniqueName(_arg1:Object):String{ if (!_arg1){ return (null); }; var _local2:String = getQualifiedClassName(_arg1); var _local3:int = _local2.indexOf("::"); if (_local3 != -1){ _local2 = _local2.substr((_local3 + 2)); }; var _local4:int = _local2.charCodeAt((_local2.length - 1)); if ((((_local4 >= 48)) && ((_local4 <= 57)))){ _local2 = (_local2 + "_"); }; return ((_local2 + counter++)); } } }//package mx.utils
Section 21
//Backgrounds (Resources.Backgrounds) package Resources { import flash.display.*; public class Backgrounds { public static const ADULT_COLLIDE:Bitmap = new adult_collideClass(); public static const ENDSCREEN_DRAGON:Bitmap = new endscreen_dragonClass(); public static const ADULT_FG:Bitmap = new adult_fgClass(); public static const HATCHLING_FG:Bitmap = new hatchling_fgClass(); public static const ENDSCREEN_MOUNTAINS:Bitmap = new endscreen_mountainsClass(); public static const ADOLESCENT_FG:Bitmap = new adolescent_fgClass(); public static const ADOLESCENT_COLLIDETREE:Bitmap = new adolescent_collidetreeClass(); public static const ENDSCREEN_BG:Bitmap = new endscreen_bgClass(); public static const TITLE_BG:Bitmap = new titlebgClass(); public static const ENDSCREEN_RAMPARTS:Bitmap = new endscreen_rampartsClass(); public static const HATCHLING_BG1:Bitmap = new hatchling_bg1Class(); public static const HATCHLING_BG2:Bitmap = new hatchling_bg2Class(); public static const ADOLESCENT_BG3:Bitmap = new adolescent_bg3Class(); public static const ADULT_BG1:Bitmap = new adult_bg1Class(); public static const ADULT_BG3:Bitmap = new adult_bg3Class(); public static const ADOLESCENT_BG2:Bitmap = new adolescent_bg2Class(); public static const HATCHLING_BG3:Bitmap = new hatchling_bg3Class(); public static const ADOLESCENT_BG1:Bitmap = new adolescent_bg1Class(); public static const ADOLESCENT_COLLIDE:Bitmap = new adolescent_collideClass(); public static const ADULT_BG2:Bitmap = new adult_bg2Class(); public static const ADOLESCENT_COLLIDEHAY:Bitmap = new adolescent_collidehayClass(); public static const HATCHLING_COLLIDE:Bitmap = new hatchling_collideClass(); public static const ENDSCREEN_HERO:Bitmap = new endscreen_heroClass(); private static var endscreen_bgClass:Class = Backgrounds_endscreen_bgClass; private static var adolescent_collidetreeClass:Class = Backgrounds_adolescent_collidetreeClass; private static var endscreen_heroClass:Class = Backgrounds_endscreen_heroClass; private static var endscreen_rampartsClass:Class = Backgrounds_endscreen_rampartsClass; private static var adolescent_fgClass:Class = Backgrounds_adolescent_fgClass; private static var endscreen_dragonClass:Class = Backgrounds_endscreen_dragonClass; private static var adolescent_bg3Class:Class = Backgrounds_adolescent_bg3Class; private static var hatchling_fgClass:Class = Backgrounds_hatchling_fgClass; private static var adult_bg1Class:Class = Backgrounds_adult_bg1Class; private static var adult_fgClass:Class = Backgrounds_adult_fgClass; private static var hatchling_bg1Class:Class = Backgrounds_hatchling_bg1Class; private static var adult_collideClass:Class = Backgrounds_adult_collideClass; private static var hatchling_collideClass:Class = Backgrounds_hatchling_collideClass; private static var adult_bg2Class:Class = Backgrounds_adult_bg2Class; private static var hatchling_bg2Class:Class = Backgrounds_hatchling_bg2Class; private static var adolescent_bg1Class:Class = Backgrounds_adolescent_bg1Class; private static var endscreen_mountainsClass:Class = Backgrounds_endscreen_mountainsClass; private static var titlebgClass:Class = Backgrounds_titlebgClass; private static var adolescent_collidehayClass:Class = Backgrounds_adolescent_collidehayClass; private static var hatchling_bg3Class:Class = Backgrounds_hatchling_bg3Class; private static var adolescent_bg2Class:Class = Backgrounds_adolescent_bg2Class; private static var adult_bg3Class:Class = Backgrounds_adult_bg3Class; private static var adolescent_collideClass:Class = Backgrounds_adolescent_collideClass; } }//package Resources
Section 22
//Backgrounds_adolescent_bg1Class (Resources.Backgrounds_adolescent_bg1Class) package Resources { import mx.core.*; public class Backgrounds_adolescent_bg1Class extends BitmapAsset { } }//package Resources
Section 23
//Backgrounds_adolescent_bg2Class (Resources.Backgrounds_adolescent_bg2Class) package Resources { import mx.core.*; public class Backgrounds_adolescent_bg2Class extends BitmapAsset { } }//package Resources
Section 24
//Backgrounds_adolescent_bg3Class (Resources.Backgrounds_adolescent_bg3Class) package Resources { import mx.core.*; public class Backgrounds_adolescent_bg3Class extends BitmapAsset { } }//package Resources
Section 25
//Backgrounds_adolescent_collideClass (Resources.Backgrounds_adolescent_collideClass) package Resources { import mx.core.*; public class Backgrounds_adolescent_collideClass extends BitmapAsset { } }//package Resources
Section 26
//Backgrounds_adolescent_collidehayClass (Resources.Backgrounds_adolescent_collidehayClass) package Resources { import mx.core.*; public class Backgrounds_adolescent_collidehayClass extends BitmapAsset { } }//package Resources
Section 27
//Backgrounds_adolescent_collidetreeClass (Resources.Backgrounds_adolescent_collidetreeClass) package Resources { import mx.core.*; public class Backgrounds_adolescent_collidetreeClass extends BitmapAsset { } }//package Resources
Section 28
//Backgrounds_adolescent_fgClass (Resources.Backgrounds_adolescent_fgClass) package Resources { import mx.core.*; public class Backgrounds_adolescent_fgClass extends BitmapAsset { } }//package Resources
Section 29
//Backgrounds_adult_bg1Class (Resources.Backgrounds_adult_bg1Class) package Resources { import mx.core.*; public class Backgrounds_adult_bg1Class extends BitmapAsset { } }//package Resources
Section 30
//Backgrounds_adult_bg2Class (Resources.Backgrounds_adult_bg2Class) package Resources { import mx.core.*; public class Backgrounds_adult_bg2Class extends BitmapAsset { } }//package Resources
Section 31
//Backgrounds_adult_bg3Class (Resources.Backgrounds_adult_bg3Class) package Resources { import mx.core.*; public class Backgrounds_adult_bg3Class extends BitmapAsset { } }//package Resources
Section 32
//Backgrounds_adult_collideClass (Resources.Backgrounds_adult_collideClass) package Resources { import mx.core.*; public class Backgrounds_adult_collideClass extends BitmapAsset { } }//package Resources
Section 33
//Backgrounds_adult_fgClass (Resources.Backgrounds_adult_fgClass) package Resources { import mx.core.*; public class Backgrounds_adult_fgClass extends BitmapAsset { } }//package Resources
Section 34
//Backgrounds_endscreen_bgClass (Resources.Backgrounds_endscreen_bgClass) package Resources { import mx.core.*; public class Backgrounds_endscreen_bgClass extends BitmapAsset { } }//package Resources
Section 35
//Backgrounds_endscreen_dragonClass (Resources.Backgrounds_endscreen_dragonClass) package Resources { import mx.core.*; public class Backgrounds_endscreen_dragonClass extends BitmapAsset { } }//package Resources
Section 36
//Backgrounds_endscreen_heroClass (Resources.Backgrounds_endscreen_heroClass) package Resources { import mx.core.*; public class Backgrounds_endscreen_heroClass extends BitmapAsset { } }//package Resources
Section 37
//Backgrounds_endscreen_mountainsClass (Resources.Backgrounds_endscreen_mountainsClass) package Resources { import mx.core.*; public class Backgrounds_endscreen_mountainsClass extends BitmapAsset { } }//package Resources
Section 38
//Backgrounds_endscreen_rampartsClass (Resources.Backgrounds_endscreen_rampartsClass) package Resources { import mx.core.*; public class Backgrounds_endscreen_rampartsClass extends BitmapAsset { } }//package Resources
Section 39
//Backgrounds_hatchling_bg1Class (Resources.Backgrounds_hatchling_bg1Class) package Resources { import mx.core.*; public class Backgrounds_hatchling_bg1Class extends BitmapAsset { } }//package Resources
Section 40
//Backgrounds_hatchling_bg2Class (Resources.Backgrounds_hatchling_bg2Class) package Resources { import mx.core.*; public class Backgrounds_hatchling_bg2Class extends BitmapAsset { } }//package Resources
Section 41
//Backgrounds_hatchling_bg3Class (Resources.Backgrounds_hatchling_bg3Class) package Resources { import mx.core.*; public class Backgrounds_hatchling_bg3Class extends BitmapAsset { } }//package Resources
Section 42
//Backgrounds_hatchling_collideClass (Resources.Backgrounds_hatchling_collideClass) package Resources { import mx.core.*; public class Backgrounds_hatchling_collideClass extends BitmapAsset { } }//package Resources
Section 43
//Backgrounds_hatchling_fgClass (Resources.Backgrounds_hatchling_fgClass) package Resources { import mx.core.*; public class Backgrounds_hatchling_fgClass extends BitmapAsset { } }//package Resources
Section 44
//Backgrounds_titlebgClass (Resources.Backgrounds_titlebgClass) package Resources { import mx.core.*; public class Backgrounds_titlebgClass extends BitmapAsset { } }//package Resources
Section 45
//Fonts (Resources.Fonts) package Resources { import flash.text.*; public class Fonts { public static const REGULAR_LARGECENTERWHITE:TextFormat = new TextFormat(UNIBODY, 8, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER); public static const ITALIC_SMALL:TextFormat = new TextFormat(UNIBODY, 4, null, null, true, null, null, null, null, null, null, null, -2); private static const UNIBODY:String = "Unibody"; public static const REGULAR_SMALL:TextFormat = new TextFormat(UNIBODY, 4, null, null, null, null, null, null, null, null, null, null, -2); public static const REGULAR_LARGE:TextFormat = new TextFormat(UNIBODY, 8); private static var unibodyReg:String = "Fonts_unibodyReg"; private static var unibodyIta:String = "Fonts_unibodyIta"; } }//package Resources
Section 46
//Fonts_unibodyIta (Resources.Fonts_unibodyIta) package Resources { import mx.core.*; public class Fonts_unibodyIta extends FontAsset { } }//package Resources
Section 47
//Fonts_unibodyReg (Resources.Fonts_unibodyReg) package Resources { import mx.core.*; public class Fonts_unibodyReg extends FontAsset { } }//package Resources
Section 48
//Sounds (Resources.Sounds) package Resources { import flash.events.*; import flash.media.*; public class Sounds { public static const THUD:Sound = new thud_class(); public static const GRUNT:Sound = new grunt_class(); private static const FIREBREATH:Sound = new firebreath_class(); public static const ROAR:Sound = new roar_class(); public static const MUSIC_ADOLESCENT:Sound = new music_adolescent_class(); public static const CHOIR:Sound = new choir_class(); public static const SQUISH:Sound = new squish_class(); public static const MOAN:Sound = new moan_class(); public static const DEATH:Sound = new death_class(); public static const MUSIC_HEROEND:Sound = new music_heroend_class(); public static const WOODBREAK:Sound = new woodbreak_class(); public static const FOOM:Sound = new foom_class(); public static const MUSIC_HATCH:Sound = new music_hatch_class(); public static const BOWSHOT:Sound = new bowshot_class(); public static const CHOMP:Sound = new chomp_class(); public static const JINGLE:Sound = new jingle_class(); public static const APPEAR:Sound = new appear_class(); private static const AMBIENCE:Sound = new ambience_class(); public static const EGGCRACK:Sound = new eggcrack_class(); public static const CHEW:Sound = new chew_class(); public static const PAIN:Sound = new pain_class(); public static const MUSIC_ADULT:Sound = new music_adult_class(); public static const MUSIC_BREATH:Sound = new music_breath_class(); public static const MUSIC_HEROSTART:Sound = new music_herostart_class(); public static const MUSIC_COLORATION:Sound = new music_coloration_class(); public static const DRAGONWHEEZE:Sound = new dragonwheeze_class(); public static const GULP:Sound = new gulp_class(); private static var music_herostart_class:Class = Sounds_music_herostart_class; private static var firebreath_class:Class = Sounds_firebreath_class; private static var chew_class:Class = Sounds_chew_class; private static var breath_loop:SoundChannel; private static var roar_class:Class = Sounds_roar_class; private static var dragonwheeze_class:Class = Sounds_dragonwheeze_class; private static var thud_class:Class = Sounds_thud_class; private static var bowshot_class:Class = Sounds_bowshot_class; private static var music_coloration_class:Class = Sounds_music_coloration_class; private static var appear_class:Class = Sounds_appear_class; private static var music_adolescent_class:Class = Sounds_music_adolescent_class; private static var jingle_class:Class = Sounds_jingle_class; private static var woodbreak_class:Class = Sounds_woodbreak_class; private static var squish_class:Class = Sounds_squish_class; private static var ambience_loop:SoundChannel; private static var chomp_class:Class = Sounds_chomp_class; private static var moan_class:Class = Sounds_moan_class; private static var choir_class:Class = Sounds_choir_class; private static var eggcrack_class:Class = Sounds_eggcrack_class; private static var music_adult_class:Class = Sounds_music_adult_class; private static var music_hatch_class:Class = Sounds_music_hatch_class; private static var foom_class:Class = Sounds_foom_class; private static var grunt_class:Class = Sounds_grunt_class; private static var music_breath_class:Class = Sounds_music_breath_class; private static var ambience_class:Class = Sounds_ambience_class; private static var music_heroend_class:Class = Sounds_music_heroend_class; private static var pain_class:Class = Sounds_pain_class; private static var gulp_class:Class = Sounds_gulp_class; private static var death_class:Class = Sounds_death_class; public static function stopBreath():void{ if (breath_loop){ breath_loop.removeEventListener(Event.SOUND_COMPLETE, loopBreath); breath_loop.stop(); breath_loop = null; }; } private static function loopBreath(_arg1:Event):void{ breath_loop.removeEventListener(Event.SOUND_COMPLETE, loopBreath); breath_loop = FIREBREATH.play(); breath_loop.addEventListener(Event.SOUND_COMPLETE, loopBreath); } public static function startAmbience():void{ if (ambience_loop == null){ ambience_loop = AMBIENCE.play(); ambience_loop.addEventListener(Event.SOUND_COMPLETE, loopAmbience); }; } public static function startBreath():void{ if (breath_loop == null){ breath_loop = FIREBREATH.play(); breath_loop.addEventListener(Event.SOUND_COMPLETE, loopBreath); }; } private static function loopAmbience(_arg1:Event):void{ ambience_loop.removeEventListener(Event.SOUND_COMPLETE, loopAmbience); ambience_loop = AMBIENCE.play(); ambience_loop.addEventListener(Event.SOUND_COMPLETE, loopAmbience); } public static function stopAmbience():void{ if (ambience_loop){ ambience_loop.removeEventListener(Event.SOUND_COMPLETE, loopAmbience); ambience_loop.stop(); ambience_loop = null; }; } } }//package Resources
Section 49
//Sounds_ambience_class (Resources.Sounds_ambience_class) package Resources { import mx.core.*; public class Sounds_ambience_class extends SoundAsset { } }//package Resources
Section 50
//Sounds_appear_class (Resources.Sounds_appear_class) package Resources { import mx.core.*; public class Sounds_appear_class extends SoundAsset { } }//package Resources
Section 51
//Sounds_bowshot_class (Resources.Sounds_bowshot_class) package Resources { import mx.core.*; public class Sounds_bowshot_class extends SoundAsset { } }//package Resources
Section 52
//Sounds_chew_class (Resources.Sounds_chew_class) package Resources { import mx.core.*; public class Sounds_chew_class extends SoundAsset { } }//package Resources
Section 53
//Sounds_choir_class (Resources.Sounds_choir_class) package Resources { import mx.core.*; public class Sounds_choir_class extends SoundAsset { } }//package Resources
Section 54
//Sounds_chomp_class (Resources.Sounds_chomp_class) package Resources { import mx.core.*; public class Sounds_chomp_class extends SoundAsset { } }//package Resources
Section 55
//Sounds_death_class (Resources.Sounds_death_class) package Resources { import mx.core.*; public class Sounds_death_class extends SoundAsset { } }//package Resources
Section 56
//Sounds_dragonwheeze_class (Resources.Sounds_dragonwheeze_class) package Resources { import mx.core.*; public class Sounds_dragonwheeze_class extends SoundAsset { } }//package Resources
Section 57
//Sounds_eggcrack_class (Resources.Sounds_eggcrack_class) package Resources { import mx.core.*; public class Sounds_eggcrack_class extends SoundAsset { } }//package Resources
Section 58
//Sounds_firebreath_class (Resources.Sounds_firebreath_class) package Resources { import mx.core.*; public class Sounds_firebreath_class extends SoundAsset { } }//package Resources
Section 59
//Sounds_foom_class (Resources.Sounds_foom_class) package Resources { import mx.core.*; public class Sounds_foom_class extends SoundAsset { } }//package Resources
Section 60
//Sounds_grunt_class (Resources.Sounds_grunt_class) package Resources { import mx.core.*; public class Sounds_grunt_class extends SoundAsset { } }//package Resources
Section 61
//Sounds_gulp_class (Resources.Sounds_gulp_class) package Resources { import mx.core.*; public class Sounds_gulp_class extends SoundAsset { } }//package Resources
Section 62
//Sounds_jingle_class (Resources.Sounds_jingle_class) package Resources { import mx.core.*; public class Sounds_jingle_class extends SoundAsset { } }//package Resources
Section 63
//Sounds_moan_class (Resources.Sounds_moan_class) package Resources { import mx.core.*; public class Sounds_moan_class extends SoundAsset { } }//package Resources
Section 64
//Sounds_music_adolescent_class (Resources.Sounds_music_adolescent_class) package Resources { import mx.core.*; public class Sounds_music_adolescent_class extends SoundAsset { } }//package Resources
Section 65
//Sounds_music_adult_class (Resources.Sounds_music_adult_class) package Resources { import mx.core.*; public class Sounds_music_adult_class extends SoundAsset { } }//package Resources
Section 66
//Sounds_music_breath_class (Resources.Sounds_music_breath_class) package Resources { import mx.core.*; public class Sounds_music_breath_class extends SoundAsset { } }//package Resources
Section 67
//Sounds_music_coloration_class (Resources.Sounds_music_coloration_class) package Resources { import mx.core.*; public class Sounds_music_coloration_class extends SoundAsset { } }//package Resources
Section 68
//Sounds_music_hatch_class (Resources.Sounds_music_hatch_class) package Resources { import mx.core.*; public class Sounds_music_hatch_class extends SoundAsset { } }//package Resources
Section 69
//Sounds_music_heroend_class (Resources.Sounds_music_heroend_class) package Resources { import mx.core.*; public class Sounds_music_heroend_class extends SoundAsset { } }//package Resources
Section 70
//Sounds_music_herostart_class (Resources.Sounds_music_herostart_class) package Resources { import mx.core.*; public class Sounds_music_herostart_class extends SoundAsset { } }//package Resources
Section 71
//Sounds_pain_class (Resources.Sounds_pain_class) package Resources { import mx.core.*; public class Sounds_pain_class extends SoundAsset { } }//package Resources
Section 72
//Sounds_roar_class (Resources.Sounds_roar_class) package Resources { import mx.core.*; public class Sounds_roar_class extends SoundAsset { } }//package Resources
Section 73
//Sounds_squish_class (Resources.Sounds_squish_class) package Resources { import mx.core.*; public class Sounds_squish_class extends SoundAsset { } }//package Resources
Section 74
//Sounds_thud_class (Resources.Sounds_thud_class) package Resources { import mx.core.*; public class Sounds_thud_class extends SoundAsset { } }//package Resources
Section 75
//Sounds_woodbreak_class (Resources.Sounds_woodbreak_class) package Resources { import mx.core.*; public class Sounds_woodbreak_class extends SoundAsset { } }//package Resources
Section 76
//Sprites (Resources.Sprites) package Resources { import flash.display.*; import Util.*; public class Sprites { public static const TARGET_WIZARDHAY:SpriteAnimation = new SpriteAnimation((new target_wizardhayClass() as Bitmap).bitmapData, 3); public static const ICON_HEALING_SMALL:Bitmap = new icon_healing_smallClass(); public static const FOOD_PLANTBUSH:SpriteAnimation = new SpriteAnimation((new food_plantbushClass() as Bitmap).bitmapData, 1); public static const ICON_NECROMANTIC:Bitmap = new icon_necromanticClass(); public static const PARTS_GROWTH:SpriteAnimation = new SpriteAnimation((new part_growthClass() as Bitmap).bitmapData, 3); public static const TARGET_VASE:SpriteAnimation = new SpriteAnimation((new target_vaseClass() as Bitmap).bitmapData, 3); public static const FOOD_HEALJAR:SpriteAnimation = new SpriteAnimation((new food_healjarClass() as Bitmap).bitmapData, 1); public static const ICON_LEAF_SMALL:Bitmap = new icon_leaf_smallClass(); public static const HATCHLING_WALK:SpriteAnimation = new SpriteAnimation((new hatchling_walkClass() as Bitmap).bitmapData, 4); public static const NPC_TOWNIE1_ZOMBIE:SpriteAnimation = new SpriteAnimation((new npc_townie1_zombieClass() as Bitmap).bitmapData, 1); public static const TITLE_HERODOLL:Bitmap = new title_herodollClass(); public static const ADULT_BITE:SpriteAnimation = new SpriteAnimation((new adult_biteClass() as Bitmap).bitmapData, 4); public static const TARGET_CROP:SpriteAnimation = new SpriteAnimation((new target_cropClass() as Bitmap).bitmapData, 3); public static const CAGE_BREAK:SpriteAnimation = new SpriteAnimation((new cage_breakClass() as Bitmap).bitmapData, 4); public static const ICON_NONE_SMALL:Bitmap = new icon_none_smallClass(); public static const HERO_EMPTY:SpriteAnimation = new SpriteAnimation((new hero_emptyClass() as Bitmap).bitmapData, 3); public static const ELDER_HEAD_DEATH:SpriteAnimation = new SpriteAnimation((new elder_head_deathClass() as Bitmap).bitmapData, 4); public static const TITLE_ADULTDRAGON:Bitmap = new title_adultdragonClass(); public static const PARTS_GREEN:SpriteAnimation = new SpriteAnimation((new part_greenClass() as Bitmap).bitmapData, 2); public static const ICON_RECLUSIVE:Bitmap = new icon_reclusiveClass(); public static const TARGET_GALLOWS:SpriteAnimation = new SpriteAnimation((new target_gallowsClass() as Bitmap).bitmapData, 3); public static const FOOD_FIREWOOD:SpriteAnimation = new SpriteAnimation((new food_firewoodClass() as Bitmap).bitmapData, 1); public static const ICON_RAMPAGING:Bitmap = new icon_rampagingClass(); public static const FOOD_FIRETORCH:SpriteAnimation = new SpriteAnimation((new food_firetorchClass() as Bitmap).bitmapData, 1); public static const NPC_TOWNIE1_HURT:SpriteAnimation = new SpriteAnimation((new npc_townie1_hurtClass() as Bitmap).bitmapData, 1); public static const ADULT_STAND:SpriteAnimation = new SpriteAnimation((new adult_standClass() as Bitmap).bitmapData, 1); public static const PARTS_WOOD:SpriteAnimation = new SpriteAnimation((new part_woodClass() as Bitmap).bitmapData, 4); public static const TITLE_CASTLE:Bitmap = new title_castleClass(); public static const NPC_SOLDIER_ZOMBIE:SpriteAnimation = new SpriteAnimation((new npc_soldier_zombieClass() as Bitmap).bitmapData, 1); public static const PARTS_HEALFOOD:SpriteAnimation = new SpriteAnimation((new part_healfoodClass() as Bitmap).bitmapData, 3); public static const PARTS_FIREBREATH:SpriteAnimation = new SpriteAnimation((new part_firebreathClass() as Bitmap).bitmapData, 3); public static const ITEM_FLOWER:SpriteAnimation = new SpriteAnimation((new item_flowerClass() as Bitmap).bitmapData, 1); public static const NPC_TOWNIE1_DEAD:SpriteAnimation = new SpriteAnimation((new npc_townie1_deadClass() as Bitmap).bitmapData, 1); public static const ADULT_WALK:SpriteAnimation = new SpriteAnimation((new adult_walkClass() as Bitmap).bitmapData, 4); public static const BOOKMASK:Bitmap = new bookmaskClass(); public static const TITLE_EGG:Bitmap = new title_eggClass(); public static const NPC_TOWNIE2_ZOMBIE:SpriteAnimation = new SpriteAnimation((new npc_townie2_zombieClass() as Bitmap).bitmapData, 1); public static const FOOD_HEALGEM:SpriteAnimation = new SpriteAnimation((new food_healgemClass() as Bitmap).bitmapData, 1); public static const FOOD_GREENSHOOT:SpriteAnimation = new SpriteAnimation((new food_greenshootClass() as Bitmap).bitmapData, 1); public static const NPC_FARMER_ZOMBIE:SpriteAnimation = new SpriteAnimation((new npc_farmer_zombieClass() as Bitmap).bitmapData, 1); public static const ELDER_TAIL:SpriteAnimation = new SpriteAnimation((new elder_tailClass() as Bitmap).bitmapData, 1); public static const HERO_DEAD:SpriteAnimation = new SpriteAnimation((new hero_deadClass() as Bitmap).bitmapData, 1); public static const NPC_TOWNIE2_HURT:SpriteAnimation = new SpriteAnimation((new npc_townie2_hurtClass() as Bitmap).bitmapData, 1); public static const NPC_SOLDIER_HURT:SpriteAnimation = new SpriteAnimation((new npc_soldier1_hurtClass() as Bitmap).bitmapData, 1); public static const NPC_TOWNIE2_DEAD:SpriteAnimation = new SpriteAnimation((new npc_townie2_deadClass() as Bitmap).bitmapData, 1); public static const NPC_ENEMYSOLDIER:SpriteAnimation = new SpriteAnimation((new npc_enemysoldierClass() as Bitmap).bitmapData, 1); public static const FOOD_PLANTTREE:SpriteAnimation = new SpriteAnimation((new food_planttreeClass() as Bitmap).bitmapData, 1); public static const NPC_SOLDIER_DEAD:SpriteAnimation = new SpriteAnimation((new npc_soldier_deadClass() as Bitmap).bitmapData, 1); public static const NPC_SOLDIER:SpriteAnimation = new SpriteAnimation((new npc_soldierClass() as Bitmap).bitmapData, 1); public static const NPC_BURNED:SpriteAnimation = new SpriteAnimation((new npc_burnedClass() as Bitmap).bitmapData, 1); public static const ICON_FLAME_SMALL:Bitmap = new icon_flame_smallClass(); public static const FOOD_PLANTFLOWER:SpriteAnimation = new SpriteAnimation((new food_plantflowerClass() as Bitmap).bitmapData, 1); public static const ELDER_HEAD_ROAR:SpriteAnimation = new SpriteAnimation((new elder_head_roarClass() as Bitmap).bitmapData, 4); public static const PARTS_FIREFOOD:SpriteAnimation = new SpriteAnimation((new part_firefoodClass() as Bitmap).bitmapData, 3); public static const ADOLESCENT_JUMP:SpriteAnimation = new SpriteAnimation((new adolescent_jumpClass() as Bitmap).bitmapData, 1); public static const HATCHLING_STAND:SpriteAnimation = new SpriteAnimation((new hatchlingClass() as Bitmap).bitmapData, 1); public static const TARGET_TOWNHOUSE_M:SpriteAnimation = new SpriteAnimation((new target_townhouse_mClass() as Bitmap).bitmapData, 3); public static const TARGET_TOWNHOUSE_S:SpriteAnimation = new SpriteAnimation((new target_townhouse_sClass() as Bitmap).bitmapData, 3); public static const NPC_ENEMYSOLDIER_HURT:SpriteAnimation = new SpriteAnimation((new npc_soldier2_hurtClass() as Bitmap).bitmapData, 1); public static const TARGET_TREE_L:SpriteAnimation = new SpriteAnimation((new target_tree_lClass() as Bitmap).bitmapData, 3); public static const TARGET_TREE_M:SpriteAnimation = new SpriteAnimation((new target_tree_mClass() as Bitmap).bitmapData, 3); public static const PARTS_HEALING:SpriteAnimation = new SpriteAnimation((new part_healingClass() as Bitmap).bitmapData, 3); public static const TARGET_TOWNHOUSE_L:SpriteAnimation = new SpriteAnimation((new target_townhouse_lClass() as Bitmap).bitmapData, 3); public static const TARGET_TREE_S:SpriteAnimation = new SpriteAnimation((new target_tree_sClass() as Bitmap).bitmapData, 3); public static const ICON_FIERY:Bitmap = new icon_fieryClass(); public static const TARGET_JOURNAL:SpriteAnimation = new SpriteAnimation((new target_journalClass() as Bitmap).bitmapData, 2); public static const PARTS_PLANTFOOD:SpriteAnimation = new SpriteAnimation((new part_plantfoodClass() as Bitmap).bitmapData, 3); public static const PARTS_RED:SpriteAnimation = new SpriteAnimation((new part_redClass() as Bitmap).bitmapData, 2); public static const ELDER_HEAD_NOD:SpriteAnimation = new SpriteAnimation((new elder_head_nodClass() as Bitmap).bitmapData, 4); public static const PARTS_BLUE:SpriteAnimation = new SpriteAnimation((new part_blueClass() as Bitmap).bitmapData, 2); public static const ITEM_BOW:SpriteAnimation = new SpriteAnimation((new item_bowClass() as Bitmap).bitmapData, 1); public static const NPC_ENEMYSOLDIER_DEAD:SpriteAnimation = new SpriteAnimation((new npc_enemysoldier_deadClass() as Bitmap).bitmapData, 1); public static const ICON_GUARDIAN:Bitmap = new icon_guardianClass(); public static const NPC_FARMER:SpriteAnimation = new SpriteAnimation((new npc_farmerClass() as Bitmap).bitmapData, 1); public static const NPC_ENEMYSOLDIER_ZOMBIE:SpriteAnimation = new SpriteAnimation((new npc_enemysoldier_zombieClass() as Bitmap).bitmapData, 1); public static const TUTORIAL_LEFTRIGHT:Bitmap = new tutorial_leftrightClass(); public static const ITEM_CHEST:SpriteAnimation = new SpriteAnimation((new item_chestClass() as Bitmap).bitmapData, 1); public static const HATCHLING_JUMP:SpriteAnimation = new SpriteAnimation((new hatchling_jumpClass() as Bitmap).bitmapData, 1); public static const PARTS_WATER:SpriteAnimation = new SpriteAnimation((new part_waterClass() as Bitmap).bitmapData, 4); public static const ICON_TYRANT:Bitmap = new icon_tyrantClass(); public static const FOOD_PLANTPOT:SpriteAnimation = new SpriteAnimation((new food_plantpotClass() as Bitmap).bitmapData, 1); public static const ADOLESCENT_STAND:SpriteAnimation = new SpriteAnimation((new adolescent_standClass() as Bitmap).bitmapData, 1); public static const FOOD_BLUEBUGCRAWL:SpriteAnimation = new SpriteAnimation((new food_bluebugcrawlClass() as Bitmap).bitmapData, 4); public static const ICON_FERTILE:Bitmap = new icon_fertileClass(); public static const TARGET_DEER:SpriteAnimation = new SpriteAnimation((new target_deerClass() as Bitmap).bitmapData, 4); public static const NPC_FARMER_HURT:SpriteAnimation = new SpriteAnimation((new npc_farmer_hurtClass() as Bitmap).bitmapData, 1); public static const ICON_SCOURGE:Bitmap = new icon_scourgeClass(); public static const ADOLESCENT_BITE:SpriteAnimation = new SpriteAnimation((new adolescent_biteClass() as Bitmap).bitmapData, 4); public static const TARGET_WIZARDTREE:SpriteAnimation = new SpriteAnimation((new target_wizardtreeClass() as Bitmap).bitmapData, 3); public static const ICON_HEALING:Bitmap = new icon_healingClass(); public static const ELDER_HEAD:SpriteAnimation = new SpriteAnimation((new elder_headClass() as Bitmap).bitmapData, 1); public static const ICON_HEALER:Bitmap = new icon_healing_behaviorClass(); public static const NPC_FARMER_DEAD:SpriteAnimation = new SpriteAnimation((new npc_farmer_deadClass() as Bitmap).bitmapData, 1); public static const FOOD_REDBUGCRAWL:SpriteAnimation = new SpriteAnimation((new food_redbugcrawlClass() as Bitmap).bitmapData, 4); public static const NPC_TOWNIE1:SpriteAnimation = new SpriteAnimation((new npc_townie1Class() as Bitmap).bitmapData, 1); public static const EGG_HATCH:SpriteAnimation = new SpriteAnimation((new egg_hatchClass() as Bitmap).bitmapData, 8); public static const FOOD_FIRECANDLE:SpriteAnimation = new SpriteAnimation((new food_firecandleClass() as Bitmap).bitmapData, 1); public static const NPC_TOWNIE2:SpriteAnimation = new SpriteAnimation((new npc_townie2Class() as Bitmap).bitmapData, 1); public static const PARTS_SICK:SpriteAnimation = new SpriteAnimation((new part_sickClass() as Bitmap).bitmapData, 3); public static const TARGET_FARMHOUSE:SpriteAnimation = new SpriteAnimation((new target_farmhouseClass() as Bitmap).bitmapData, 3); public static const ICON_LEAF:Bitmap = new icon_leafClass(); public static const HATCHLING_BITE:SpriteAnimation = new SpriteAnimation((new hatchling_biteClass() as Bitmap).bitmapData, 4); public static const SPEECHBUBBLE_HEAL:Bitmap = new speechbubble_healClass(); public static const TUTORIAL_C:Bitmap = new tutorial_CClass(); public static const TARGET_BROKENBARREL:SpriteAnimation = new SpriteAnimation((new target_brokenbarrelClass() as Bitmap).bitmapData, 3); public static const PIXELARMORLOGO:Bitmap = new pixelarmorlogoClass(); public static const ADULT_JUMP:SpriteAnimation = new SpriteAnimation((new adult_jumpClass() as Bitmap).bitmapData, 1); public static const TUTORIAL_X:Bitmap = new tutorial_XClass(); public static const TUTORIAL_Z:Bitmap = new tutorial_ZClass(); public static const ICON_HOUSE:Bitmap = new icon_houseClass(); public static const TUTORIAL_ZZ:Bitmap = new tutorial_ZZClass(); public static const ICON_FLAME:Bitmap = new icon_flameClass(); public static const FOOD_FIRELAMP:SpriteAnimation = new SpriteAnimation((new food_firelampClass() as Bitmap).bitmapData, 1); public static const ICON_WILD:Bitmap = new icon_wildClass(); public static const PARTS_SHELL:SpriteAnimation = new SpriteAnimation((new part_shellClass() as Bitmap).bitmapData, 4); public static const ADOLESCENT_WALK:SpriteAnimation = new SpriteAnimation((new adolescent_walkClass() as Bitmap).bitmapData, 4); public static const ICON_WATCHER:Bitmap = new icon_watcherClass(); public static const TUTORIAL_DOWNZ:Bitmap = new tutorial_downZClass(); public static const TARGET_WIZARD:SpriteAnimation = new SpriteAnimation((new target_wizardClass() as Bitmap).bitmapData, 4); public static const ELDER_HEAD_BITE:SpriteAnimation = new SpriteAnimation((new elder_head_biteClass() as Bitmap).bitmapData, 4); public static const ARROW:BitmapData = (new arrowClass() as Bitmap).bitmapData; public static const FOOD_HEALMUSHROOMS:SpriteAnimation = new SpriteAnimation((new food_healmushroomsClass() as Bitmap).bitmapData, 1); public static const FOOD_HEALPOTION:SpriteAnimation = new SpriteAnimation((new food_healpotionClass() as Bitmap).bitmapData, 1); private static var title_castleClass:Class = Sprites_title_castleClass; private static var tutorial_XClass:Class = Sprites_tutorial_XClass; private static var target_deerClass:Class = Sprites_target_deerClass; private static var part_greenClass:Class = Sprites_part_greenClass; private static var target_vaseClass:Class = Sprites_target_vaseClass; private static var title_adultdragonClass:Class = Sprites_title_adultdragonClass; private static var pixelarmorlogoClass:Class = Sprites_pixelarmorlogoClass; private static var icon_flame_smallClass:Class = Sprites_icon_flame_smallClass; private static var food_healjarClass:Class = Sprites_food_healjarClass; private static var icon_none_smallClass:Class = Sprites_icon_none_smallClass; private static var hatchling_walkClass:Class = Sprites_hatchling_walkClass; private static var icon_leaf_smallClass:Class = Sprites_icon_leaf_smallClass; private static var target_journalClass:Class = Sprites_target_journalClass; private static var food_planttreeClass:Class = Sprites_food_planttreeClass; private static var icon_leafClass:Class = Sprites_icon_leafClass; private static var icon_healing_behaviorClass:Class = Sprites_icon_healing_behaviorClass; private static var food_plantbushClass:Class = Sprites_food_plantbushClass; private static var title_herodollClass:Class = Sprites_title_herodollClass; private static var food_healmushroomsClass:Class = Sprites_food_healmushroomsClass; private static var food_firecandleClass:Class = Sprites_food_firecandleClass; private static var item_flowerClass:Class = Sprites_item_flowerClass; private static var icon_fieryClass:Class = Sprites_icon_fieryClass; private static var part_firebreathClass:Class = Sprites_part_firebreathClass; private static var target_wizardtreeClass:Class = Sprites_target_wizardtreeClass; private static var adolescent_walkClass:Class = Sprites_adolescent_walkClass; private static var adult_walkClass:Class = Sprites_adult_walkClass; private static var part_shellClass:Class = Sprites_part_shellClass; private static var npc_townie2_hurtClass:Class = Sprites_npc_townie2_hurtClass; private static var npc_townie1Class:Class = Sprites_npc_townie1Class; private static var target_wizardClass:Class = Sprites_target_wizardClass; private static var icon_guardianClass:Class = Sprites_icon_guardianClass; private static var bookmaskClass:Class = Sprites_bookmaskClass; private static var npc_townie1_zombieClass:Class = Sprites_npc_townie1_zombieClass; private static var hatchling_jumpClass:Class = Sprites_hatchling_jumpClass; private static var tutorial_ZClass:Class = Sprites_tutorial_ZClass; private static var speechbubble_healClass:Class = Sprites_speechbubble_healClass; private static var food_plantpotClass:Class = Sprites_food_plantpotClass; private static var hero_deadClass:Class = Sprites_hero_deadClass; private static var part_healingClass:Class = Sprites_part_healingClass; private static var item_bowClass:Class = Sprites_item_bowClass; private static var part_woodClass:Class = Sprites_part_woodClass; private static var adolescent_jumpClass:Class = Sprites_adolescent_jumpClass; private static var icon_flameClass:Class = Sprites_icon_flameClass; private static var npc_enemysoldier_deadClass:Class = Sprites_npc_enemysoldier_deadClass; private static var part_sickClass:Class = Sprites_part_sickClass; private static var hero_emptyClass:Class = Sprites_hero_emptyClass; private static var target_wizardhayClass:Class = Sprites_target_wizardhayClass; private static var egg_hatchClass:Class = Sprites_egg_hatchClass; private static var npc_soldier_zombieClass:Class = Sprites_npc_soldier_zombieClass; private static var adult_jumpClass:Class = Sprites_adult_jumpClass; private static var part_growthClass:Class = Sprites_part_growthClass; private static var npc_townie2Class:Class = Sprites_npc_townie2Class; private static var npc_soldierClass:Class = Sprites_npc_soldierClass; private static var icon_houseClass:Class = Sprites_icon_houseClass; private static var npc_townie2_deadClass:Class = Sprites_npc_townie2_deadClass; private static var food_greenshootClass:Class = Sprites_food_greenshootClass; private static var cage_breakClass:Class = Sprites_cage_breakClass; private static var elder_head_roarClass:Class = Sprites_elder_head_roarClass; private static var part_redClass:Class = Sprites_part_redClass; private static var npc_farmer_zombieClass:Class = Sprites_npc_farmer_zombieClass; private static var tutorial_ZZClass:Class = Sprites_tutorial_ZZClass; private static var npc_soldier2_hurtClass:Class = Sprites_npc_soldier2_hurtClass; private static var npc_townie1_hurtClass:Class = Sprites_npc_townie1_hurtClass; private static var food_plantflowerClass:Class = Sprites_food_plantflowerClass; private static var npc_farmer_hurtClass:Class = Sprites_npc_farmer_hurtClass; private static var part_waterClass:Class = Sprites_part_waterClass; private static var target_gallowsClass:Class = Sprites_target_gallowsClass; private static var elder_head_nodClass:Class = Sprites_elder_head_nodClass; private static var title_eggClass:Class = Sprites_title_eggClass; private static var adolescent_standClass:Class = Sprites_adolescent_standClass; private static var target_tree_lClass:Class = Sprites_target_tree_lClass; private static var elder_head_biteClass:Class = Sprites_elder_head_biteClass; private static var icon_tyrantClass:Class = Sprites_icon_tyrantClass; private static var icon_healing_smallClass:Class = Sprites_icon_healing_smallClass; private static var hatchling_biteClass:Class = Sprites_hatchling_biteClass; private static var icon_healingClass:Class = Sprites_icon_healingClass; private static var icon_scourgeClass:Class = Sprites_icon_scourgeClass; private static var npc_enemysoldierClass:Class = Sprites_npc_enemysoldierClass; private static var npc_enemysoldier_zombieClass:Class = Sprites_npc_enemysoldier_zombieClass; private static var target_tree_sClass:Class = Sprites_target_tree_sClass; private static var food_healpotionClass:Class = Sprites_food_healpotionClass; private static var hatchlingClass:Class = Sprites_hatchlingClass; private static var adult_standClass:Class = Sprites_adult_standClass; private static var food_firelampClass:Class = Sprites_food_firelampClass; private static var target_townhouse_lClass:Class = Sprites_target_townhouse_lClass; private static var elder_head_deathClass:Class = Sprites_elder_head_deathClass; private static var arrowClass:Class = Sprites_arrowClass; private static var tutorial_CClass:Class = Sprites_tutorial_CClass; private static var adolescent_biteClass:Class = Sprites_adolescent_biteClass; private static var part_firefoodClass:Class = Sprites_part_firefoodClass; private static var icon_rampagingClass:Class = Sprites_icon_rampagingClass; private static var tutorial_leftrightClass:Class = Sprites_tutorial_leftrightClass; private static var elder_tailClass:Class = Sprites_elder_tailClass; private static var npc_soldier_deadClass:Class = Sprites_npc_soldier_deadClass; private static var npc_townie1_deadClass:Class = Sprites_npc_townie1_deadClass; private static var target_tree_mClass:Class = Sprites_target_tree_mClass; private static var icon_watcherClass:Class = Sprites_icon_watcherClass; private static var adult_biteClass:Class = Sprites_adult_biteClass; private static var npc_burnedClass:Class = Sprites_npc_burnedClass; private static var food_firewoodClass:Class = Sprites_food_firewoodClass; private static var npc_farmer_deadClass:Class = Sprites_npc_farmer_deadClass; private static var icon_fertileClass:Class = Sprites_icon_fertileClass; private static var target_brokenbarrelClass:Class = Sprites_target_brokenbarrelClass; private static var target_townhouse_sClass:Class = Sprites_target_townhouse_sClass; private static var food_bluebugcrawlClass:Class = Sprites_food_bluebugcrawlClass; private static var target_farmhouseClass:Class = Sprites_target_farmhouseClass; private static var npc_farmerClass:Class = Sprites_npc_farmerClass; private static var part_plantfoodClass:Class = Sprites_part_plantfoodClass; private static var npc_soldier1_hurtClass:Class = Sprites_npc_soldier1_hurtClass; private static var icon_reclusiveClass:Class = Sprites_icon_reclusiveClass; private static var icon_necromanticClass:Class = Sprites_icon_necromanticClass; private static var elder_headClass:Class = Sprites_elder_headClass; private static var part_healfoodClass:Class = Sprites_part_healfoodClass; private static var icon_wildClass:Class = Sprites_icon_wildClass; private static var target_townhouse_mClass:Class = Sprites_target_townhouse_mClass; private static var food_healgemClass:Class = Sprites_food_healgemClass; private static var food_firetorchClass:Class = Sprites_food_firetorchClass; private static var target_cropClass:Class = Sprites_target_cropClass; private static var item_chestClass:Class = Sprites_item_chestClass; private static var npc_townie2_zombieClass:Class = Sprites_npc_townie2_zombieClass; private static var food_redbugcrawlClass:Class = Sprites_food_redbugcrawlClass; private static var tutorial_downZClass:Class = Sprites_tutorial_downZClass; private static var part_blueClass:Class = Sprites_part_blueClass; } }//package Resources
Section 77
//Sprites_adolescent_biteClass (Resources.Sprites_adolescent_biteClass) package Resources { import mx.core.*; public class Sprites_adolescent_biteClass extends BitmapAsset { } }//package Resources
Section 78
//Sprites_adolescent_jumpClass (Resources.Sprites_adolescent_jumpClass) package Resources { import mx.core.*; public class Sprites_adolescent_jumpClass extends BitmapAsset { } }//package Resources
Section 79
//Sprites_adolescent_standClass (Resources.Sprites_adolescent_standClass) package Resources { import mx.core.*; public class Sprites_adolescent_standClass extends BitmapAsset { } }//package Resources
Section 80
//Sprites_adolescent_walkClass (Resources.Sprites_adolescent_walkClass) package Resources { import mx.core.*; public class Sprites_adolescent_walkClass extends BitmapAsset { } }//package Resources
Section 81
//Sprites_adult_biteClass (Resources.Sprites_adult_biteClass) package Resources { import mx.core.*; public class Sprites_adult_biteClass extends BitmapAsset { } }//package Resources
Section 82
//Sprites_adult_jumpClass (Resources.Sprites_adult_jumpClass) package Resources { import mx.core.*; public class Sprites_adult_jumpClass extends BitmapAsset { } }//package Resources
Section 83
//Sprites_adult_standClass (Resources.Sprites_adult_standClass) package Resources { import mx.core.*; public class Sprites_adult_standClass extends BitmapAsset { } }//package Resources
Section 84
//Sprites_adult_walkClass (Resources.Sprites_adult_walkClass) package Resources { import mx.core.*; public class Sprites_adult_walkClass extends BitmapAsset { } }//package Resources
Section 85
//Sprites_arrowClass (Resources.Sprites_arrowClass) package Resources { import mx.core.*; public class Sprites_arrowClass extends BitmapAsset { } }//package Resources
Section 86
//Sprites_bookmaskClass (Resources.Sprites_bookmaskClass) package Resources { import mx.core.*; public class Sprites_bookmaskClass extends BitmapAsset { } }//package Resources
Section 87
//Sprites_cage_breakClass (Resources.Sprites_cage_breakClass) package Resources { import mx.core.*; public class Sprites_cage_breakClass extends BitmapAsset { } }//package Resources
Section 88
//Sprites_egg_hatchClass (Resources.Sprites_egg_hatchClass) package Resources { import mx.core.*; public class Sprites_egg_hatchClass extends BitmapAsset { } }//package Resources
Section 89
//Sprites_elder_head_biteClass (Resources.Sprites_elder_head_biteClass) package Resources { import mx.core.*; public class Sprites_elder_head_biteClass extends BitmapAsset { } }//package Resources
Section 90
//Sprites_elder_head_deathClass (Resources.Sprites_elder_head_deathClass) package Resources { import mx.core.*; public class Sprites_elder_head_deathClass extends BitmapAsset { } }//package Resources
Section 91
//Sprites_elder_head_nodClass (Resources.Sprites_elder_head_nodClass) package Resources { import mx.core.*; public class Sprites_elder_head_nodClass extends BitmapAsset { } }//package Resources
Section 92
//Sprites_elder_head_roarClass (Resources.Sprites_elder_head_roarClass) package Resources { import mx.core.*; public class Sprites_elder_head_roarClass extends BitmapAsset { } }//package Resources
Section 93
//Sprites_elder_headClass (Resources.Sprites_elder_headClass) package Resources { import mx.core.*; public class Sprites_elder_headClass extends BitmapAsset { } }//package Resources
Section 94
//Sprites_elder_tailClass (Resources.Sprites_elder_tailClass) package Resources { import mx.core.*; public class Sprites_elder_tailClass extends BitmapAsset { } }//package Resources
Section 95
//Sprites_food_bluebugcrawlClass (Resources.Sprites_food_bluebugcrawlClass) package Resources { import mx.core.*; public class Sprites_food_bluebugcrawlClass extends BitmapAsset { } }//package Resources
Section 96
//Sprites_food_firecandleClass (Resources.Sprites_food_firecandleClass) package Resources { import mx.core.*; public class Sprites_food_firecandleClass extends BitmapAsset { } }//package Resources
Section 97
//Sprites_food_firelampClass (Resources.Sprites_food_firelampClass) package Resources { import mx.core.*; public class Sprites_food_firelampClass extends BitmapAsset { } }//package Resources
Section 98
//Sprites_food_firetorchClass (Resources.Sprites_food_firetorchClass) package Resources { import mx.core.*; public class Sprites_food_firetorchClass extends BitmapAsset { } }//package Resources
Section 99
//Sprites_food_firewoodClass (Resources.Sprites_food_firewoodClass) package Resources { import mx.core.*; public class Sprites_food_firewoodClass extends BitmapAsset { } }//package Resources
Section 100
//Sprites_food_greenshootClass (Resources.Sprites_food_greenshootClass) package Resources { import mx.core.*; public class Sprites_food_greenshootClass extends BitmapAsset { } }//package Resources
Section 101
//Sprites_food_healgemClass (Resources.Sprites_food_healgemClass) package Resources { import mx.core.*; public class Sprites_food_healgemClass extends BitmapAsset { } }//package Resources
Section 102
//Sprites_food_healjarClass (Resources.Sprites_food_healjarClass) package Resources { import mx.core.*; public class Sprites_food_healjarClass extends BitmapAsset { } }//package Resources
Section 103
//Sprites_food_healmushroomsClass (Resources.Sprites_food_healmushroomsClass) package Resources { import mx.core.*; public class Sprites_food_healmushroomsClass extends BitmapAsset { } }//package Resources
Section 104
//Sprites_food_healpotionClass (Resources.Sprites_food_healpotionClass) package Resources { import mx.core.*; public class Sprites_food_healpotionClass extends BitmapAsset { } }//package Resources
Section 105
//Sprites_food_plantbushClass (Resources.Sprites_food_plantbushClass) package Resources { import mx.core.*; public class Sprites_food_plantbushClass extends BitmapAsset { } }//package Resources
Section 106
//Sprites_food_plantflowerClass (Resources.Sprites_food_plantflowerClass) package Resources { import mx.core.*; public class Sprites_food_plantflowerClass extends BitmapAsset { } }//package Resources
Section 107
//Sprites_food_plantpotClass (Resources.Sprites_food_plantpotClass) package Resources { import mx.core.*; public class Sprites_food_plantpotClass extends BitmapAsset { } }//package Resources
Section 108
//Sprites_food_planttreeClass (Resources.Sprites_food_planttreeClass) package Resources { import mx.core.*; public class Sprites_food_planttreeClass extends BitmapAsset { } }//package Resources
Section 109
//Sprites_food_redbugcrawlClass (Resources.Sprites_food_redbugcrawlClass) package Resources { import mx.core.*; public class Sprites_food_redbugcrawlClass extends BitmapAsset { } }//package Resources
Section 110
//Sprites_hatchling_biteClass (Resources.Sprites_hatchling_biteClass) package Resources { import mx.core.*; public class Sprites_hatchling_biteClass extends BitmapAsset { } }//package Resources
Section 111
//Sprites_hatchling_jumpClass (Resources.Sprites_hatchling_jumpClass) package Resources { import mx.core.*; public class Sprites_hatchling_jumpClass extends BitmapAsset { } }//package Resources
Section 112
//Sprites_hatchling_walkClass (Resources.Sprites_hatchling_walkClass) package Resources { import mx.core.*; public class Sprites_hatchling_walkClass extends BitmapAsset { } }//package Resources
Section 113
//Sprites_hatchlingClass (Resources.Sprites_hatchlingClass) package Resources { import mx.core.*; public class Sprites_hatchlingClass extends BitmapAsset { } }//package Resources
Section 114
//Sprites_hero_deadClass (Resources.Sprites_hero_deadClass) package Resources { import mx.core.*; public class Sprites_hero_deadClass extends BitmapAsset { } }//package Resources
Section 115
//Sprites_hero_emptyClass (Resources.Sprites_hero_emptyClass) package Resources { import mx.core.*; public class Sprites_hero_emptyClass extends BitmapAsset { } }//package Resources
Section 116
//Sprites_icon_fertileClass (Resources.Sprites_icon_fertileClass) package Resources { import mx.core.*; public class Sprites_icon_fertileClass extends BitmapAsset { } }//package Resources
Section 117
//Sprites_icon_fieryClass (Resources.Sprites_icon_fieryClass) package Resources { import mx.core.*; public class Sprites_icon_fieryClass extends BitmapAsset { } }//package Resources
Section 118
//Sprites_icon_flame_smallClass (Resources.Sprites_icon_flame_smallClass) package Resources { import mx.core.*; public class Sprites_icon_flame_smallClass extends BitmapAsset { } }//package Resources
Section 119
//Sprites_icon_flameClass (Resources.Sprites_icon_flameClass) package Resources { import mx.core.*; public class Sprites_icon_flameClass extends BitmapAsset { } }//package Resources
Section 120
//Sprites_icon_guardianClass (Resources.Sprites_icon_guardianClass) package Resources { import mx.core.*; public class Sprites_icon_guardianClass extends BitmapAsset { } }//package Resources
Section 121
//Sprites_icon_healing_behaviorClass (Resources.Sprites_icon_healing_behaviorClass) package Resources { import mx.core.*; public class Sprites_icon_healing_behaviorClass extends BitmapAsset { } }//package Resources
Section 122
//Sprites_icon_healing_smallClass (Resources.Sprites_icon_healing_smallClass) package Resources { import mx.core.*; public class Sprites_icon_healing_smallClass extends BitmapAsset { } }//package Resources
Section 123
//Sprites_icon_healingClass (Resources.Sprites_icon_healingClass) package Resources { import mx.core.*; public class Sprites_icon_healingClass extends BitmapAsset { } }//package Resources
Section 124
//Sprites_icon_houseClass (Resources.Sprites_icon_houseClass) package Resources { import mx.core.*; public class Sprites_icon_houseClass extends BitmapAsset { } }//package Resources
Section 125
//Sprites_icon_leaf_smallClass (Resources.Sprites_icon_leaf_smallClass) package Resources { import mx.core.*; public class Sprites_icon_leaf_smallClass extends BitmapAsset { } }//package Resources
Section 126
//Sprites_icon_leafClass (Resources.Sprites_icon_leafClass) package Resources { import mx.core.*; public class Sprites_icon_leafClass extends BitmapAsset { } }//package Resources
Section 127
//Sprites_icon_necromanticClass (Resources.Sprites_icon_necromanticClass) package Resources { import mx.core.*; public class Sprites_icon_necromanticClass extends BitmapAsset { } }//package Resources
Section 128
//Sprites_icon_none_smallClass (Resources.Sprites_icon_none_smallClass) package Resources { import mx.core.*; public class Sprites_icon_none_smallClass extends BitmapAsset { } }//package Resources
Section 129
//Sprites_icon_rampagingClass (Resources.Sprites_icon_rampagingClass) package Resources { import mx.core.*; public class Sprites_icon_rampagingClass extends BitmapAsset { } }//package Resources
Section 130
//Sprites_icon_reclusiveClass (Resources.Sprites_icon_reclusiveClass) package Resources { import mx.core.*; public class Sprites_icon_reclusiveClass extends BitmapAsset { } }//package Resources
Section 131
//Sprites_icon_scourgeClass (Resources.Sprites_icon_scourgeClass) package Resources { import mx.core.*; public class Sprites_icon_scourgeClass extends BitmapAsset { } }//package Resources
Section 132
//Sprites_icon_tyrantClass (Resources.Sprites_icon_tyrantClass) package Resources { import mx.core.*; public class Sprites_icon_tyrantClass extends BitmapAsset { } }//package Resources
Section 133
//Sprites_icon_watcherClass (Resources.Sprites_icon_watcherClass) package Resources { import mx.core.*; public class Sprites_icon_watcherClass extends BitmapAsset { } }//package Resources
Section 134
//Sprites_icon_wildClass (Resources.Sprites_icon_wildClass) package Resources { import mx.core.*; public class Sprites_icon_wildClass extends BitmapAsset { } }//package Resources
Section 135
//Sprites_item_bowClass (Resources.Sprites_item_bowClass) package Resources { import mx.core.*; public class Sprites_item_bowClass extends BitmapAsset { } }//package Resources
Section 136
//Sprites_item_chestClass (Resources.Sprites_item_chestClass) package Resources { import mx.core.*; public class Sprites_item_chestClass extends BitmapAsset { } }//package Resources
Section 137
//Sprites_item_flowerClass (Resources.Sprites_item_flowerClass) package Resources { import mx.core.*; public class Sprites_item_flowerClass extends BitmapAsset { } }//package Resources
Section 138
//Sprites_npc_burnedClass (Resources.Sprites_npc_burnedClass) package Resources { import mx.core.*; public class Sprites_npc_burnedClass extends BitmapAsset { } }//package Resources
Section 139
//Sprites_npc_enemysoldier_deadClass (Resources.Sprites_npc_enemysoldier_deadClass) package Resources { import mx.core.*; public class Sprites_npc_enemysoldier_deadClass extends BitmapAsset { } }//package Resources
Section 140
//Sprites_npc_enemysoldier_zombieClass (Resources.Sprites_npc_enemysoldier_zombieClass) package Resources { import mx.core.*; public class Sprites_npc_enemysoldier_zombieClass extends BitmapAsset { } }//package Resources
Section 141
//Sprites_npc_enemysoldierClass (Resources.Sprites_npc_enemysoldierClass) package Resources { import mx.core.*; public class Sprites_npc_enemysoldierClass extends BitmapAsset { } }//package Resources
Section 142
//Sprites_npc_farmer_deadClass (Resources.Sprites_npc_farmer_deadClass) package Resources { import mx.core.*; public class Sprites_npc_farmer_deadClass extends BitmapAsset { } }//package Resources
Section 143
//Sprites_npc_farmer_hurtClass (Resources.Sprites_npc_farmer_hurtClass) package Resources { import mx.core.*; public class Sprites_npc_farmer_hurtClass extends BitmapAsset { } }//package Resources
Section 144
//Sprites_npc_farmer_zombieClass (Resources.Sprites_npc_farmer_zombieClass) package Resources { import mx.core.*; public class Sprites_npc_farmer_zombieClass extends BitmapAsset { } }//package Resources
Section 145
//Sprites_npc_farmerClass (Resources.Sprites_npc_farmerClass) package Resources { import mx.core.*; public class Sprites_npc_farmerClass extends BitmapAsset { } }//package Resources
Section 146
//Sprites_npc_soldier_deadClass (Resources.Sprites_npc_soldier_deadClass) package Resources { import mx.core.*; public class Sprites_npc_soldier_deadClass extends BitmapAsset { } }//package Resources
Section 147
//Sprites_npc_soldier_zombieClass (Resources.Sprites_npc_soldier_zombieClass) package Resources { import mx.core.*; public class Sprites_npc_soldier_zombieClass extends BitmapAsset { } }//package Resources
Section 148
//Sprites_npc_soldier1_hurtClass (Resources.Sprites_npc_soldier1_hurtClass) package Resources { import mx.core.*; public class Sprites_npc_soldier1_hurtClass extends BitmapAsset { } }//package Resources
Section 149
//Sprites_npc_soldier2_hurtClass (Resources.Sprites_npc_soldier2_hurtClass) package Resources { import mx.core.*; public class Sprites_npc_soldier2_hurtClass extends BitmapAsset { } }//package Resources
Section 150
//Sprites_npc_soldierClass (Resources.Sprites_npc_soldierClass) package Resources { import mx.core.*; public class Sprites_npc_soldierClass extends BitmapAsset { } }//package Resources
Section 151
//Sprites_npc_townie1_deadClass (Resources.Sprites_npc_townie1_deadClass) package Resources { import mx.core.*; public class Sprites_npc_townie1_deadClass extends BitmapAsset { } }//package Resources
Section 152
//Sprites_npc_townie1_hurtClass (Resources.Sprites_npc_townie1_hurtClass) package Resources { import mx.core.*; public class Sprites_npc_townie1_hurtClass extends BitmapAsset { } }//package Resources
Section 153
//Sprites_npc_townie1_zombieClass (Resources.Sprites_npc_townie1_zombieClass) package Resources { import mx.core.*; public class Sprites_npc_townie1_zombieClass extends BitmapAsset { } }//package Resources
Section 154
//Sprites_npc_townie1Class (Resources.Sprites_npc_townie1Class) package Resources { import mx.core.*; public class Sprites_npc_townie1Class extends BitmapAsset { } }//package Resources
Section 155
//Sprites_npc_townie2_deadClass (Resources.Sprites_npc_townie2_deadClass) package Resources { import mx.core.*; public class Sprites_npc_townie2_deadClass extends BitmapAsset { } }//package Resources
Section 156
//Sprites_npc_townie2_hurtClass (Resources.Sprites_npc_townie2_hurtClass) package Resources { import mx.core.*; public class Sprites_npc_townie2_hurtClass extends BitmapAsset { } }//package Resources
Section 157
//Sprites_npc_townie2_zombieClass (Resources.Sprites_npc_townie2_zombieClass) package Resources { import mx.core.*; public class Sprites_npc_townie2_zombieClass extends BitmapAsset { } }//package Resources
Section 158
//Sprites_npc_townie2Class (Resources.Sprites_npc_townie2Class) package Resources { import mx.core.*; public class Sprites_npc_townie2Class extends BitmapAsset { } }//package Resources
Section 159
//Sprites_part_blueClass (Resources.Sprites_part_blueClass) package Resources { import mx.core.*; public class Sprites_part_blueClass extends BitmapAsset { } }//package Resources
Section 160
//Sprites_part_firebreathClass (Resources.Sprites_part_firebreathClass) package Resources { import mx.core.*; public class Sprites_part_firebreathClass extends BitmapAsset { } }//package Resources
Section 161
//Sprites_part_firefoodClass (Resources.Sprites_part_firefoodClass) package Resources { import mx.core.*; public class Sprites_part_firefoodClass extends BitmapAsset { } }//package Resources
Section 162
//Sprites_part_greenClass (Resources.Sprites_part_greenClass) package Resources { import mx.core.*; public class Sprites_part_greenClass extends BitmapAsset { } }//package Resources
Section 163
//Sprites_part_growthClass (Resources.Sprites_part_growthClass) package Resources { import mx.core.*; public class Sprites_part_growthClass extends BitmapAsset { } }//package Resources
Section 164
//Sprites_part_healfoodClass (Resources.Sprites_part_healfoodClass) package Resources { import mx.core.*; public class Sprites_part_healfoodClass extends BitmapAsset { } }//package Resources
Section 165
//Sprites_part_healingClass (Resources.Sprites_part_healingClass) package Resources { import mx.core.*; public class Sprites_part_healingClass extends BitmapAsset { } }//package Resources
Section 166
//Sprites_part_plantfoodClass (Resources.Sprites_part_plantfoodClass) package Resources { import mx.core.*; public class Sprites_part_plantfoodClass extends BitmapAsset { } }//package Resources
Section 167
//Sprites_part_redClass (Resources.Sprites_part_redClass) package Resources { import mx.core.*; public class Sprites_part_redClass extends BitmapAsset { } }//package Resources
Section 168
//Sprites_part_shellClass (Resources.Sprites_part_shellClass) package Resources { import mx.core.*; public class Sprites_part_shellClass extends BitmapAsset { } }//package Resources
Section 169
//Sprites_part_sickClass (Resources.Sprites_part_sickClass) package Resources { import mx.core.*; public class Sprites_part_sickClass extends BitmapAsset { } }//package Resources
Section 170
//Sprites_part_waterClass (Resources.Sprites_part_waterClass) package Resources { import mx.core.*; public class Sprites_part_waterClass extends BitmapAsset { } }//package Resources
Section 171
//Sprites_part_woodClass (Resources.Sprites_part_woodClass) package Resources { import mx.core.*; public class Sprites_part_woodClass extends BitmapAsset { } }//package Resources
Section 172
//Sprites_pixelarmorlogoClass (Resources.Sprites_pixelarmorlogoClass) package Resources { import mx.core.*; public class Sprites_pixelarmorlogoClass extends BitmapAsset { } }//package Resources
Section 173
//Sprites_speechbubble_healClass (Resources.Sprites_speechbubble_healClass) package Resources { import mx.core.*; public class Sprites_speechbubble_healClass extends BitmapAsset { } }//package Resources
Section 174
//Sprites_target_brokenbarrelClass (Resources.Sprites_target_brokenbarrelClass) package Resources { import mx.core.*; public class Sprites_target_brokenbarrelClass extends BitmapAsset { } }//package Resources
Section 175
//Sprites_target_cropClass (Resources.Sprites_target_cropClass) package Resources { import mx.core.*; public class Sprites_target_cropClass extends BitmapAsset { } }//package Resources
Section 176
//Sprites_target_deerClass (Resources.Sprites_target_deerClass) package Resources { import mx.core.*; public class Sprites_target_deerClass extends BitmapAsset { } }//package Resources
Section 177
//Sprites_target_farmhouseClass (Resources.Sprites_target_farmhouseClass) package Resources { import mx.core.*; public class Sprites_target_farmhouseClass extends BitmapAsset { } }//package Resources
Section 178
//Sprites_target_gallowsClass (Resources.Sprites_target_gallowsClass) package Resources { import mx.core.*; public class Sprites_target_gallowsClass extends BitmapAsset { } }//package Resources
Section 179
//Sprites_target_journalClass (Resources.Sprites_target_journalClass) package Resources { import mx.core.*; public class Sprites_target_journalClass extends BitmapAsset { } }//package Resources
Section 180
//Sprites_target_townhouse_lClass (Resources.Sprites_target_townhouse_lClass) package Resources { import mx.core.*; public class Sprites_target_townhouse_lClass extends BitmapAsset { } }//package Resources
Section 181
//Sprites_target_townhouse_mClass (Resources.Sprites_target_townhouse_mClass) package Resources { import mx.core.*; public class Sprites_target_townhouse_mClass extends BitmapAsset { } }//package Resources
Section 182
//Sprites_target_townhouse_sClass (Resources.Sprites_target_townhouse_sClass) package Resources { import mx.core.*; public class Sprites_target_townhouse_sClass extends BitmapAsset { } }//package Resources
Section 183
//Sprites_target_tree_lClass (Resources.Sprites_target_tree_lClass) package Resources { import mx.core.*; public class Sprites_target_tree_lClass extends BitmapAsset { } }//package Resources
Section 184
//Sprites_target_tree_mClass (Resources.Sprites_target_tree_mClass) package Resources { import mx.core.*; public class Sprites_target_tree_mClass extends BitmapAsset { } }//package Resources
Section 185
//Sprites_target_tree_sClass (Resources.Sprites_target_tree_sClass) package Resources { import mx.core.*; public class Sprites_target_tree_sClass extends BitmapAsset { } }//package Resources
Section 186
//Sprites_target_vaseClass (Resources.Sprites_target_vaseClass) package Resources { import mx.core.*; public class Sprites_target_vaseClass extends BitmapAsset { } }//package Resources
Section 187
//Sprites_target_wizardClass (Resources.Sprites_target_wizardClass) package Resources { import mx.core.*; public class Sprites_target_wizardClass extends BitmapAsset { } }//package Resources
Section 188
//Sprites_target_wizardhayClass (Resources.Sprites_target_wizardhayClass) package Resources { import mx.core.*; public class Sprites_target_wizardhayClass extends BitmapAsset { } }//package Resources
Section 189
//Sprites_target_wizardtreeClass (Resources.Sprites_target_wizardtreeClass) package Resources { import mx.core.*; public class Sprites_target_wizardtreeClass extends BitmapAsset { } }//package Resources
Section 190
//Sprites_title_adultdragonClass (Resources.Sprites_title_adultdragonClass) package Resources { import mx.core.*; public class Sprites_title_adultdragonClass extends BitmapAsset { } }//package Resources
Section 191
//Sprites_title_castleClass (Resources.Sprites_title_castleClass) package Resources { import mx.core.*; public class Sprites_title_castleClass extends BitmapAsset { } }//package Resources
Section 192
//Sprites_title_eggClass (Resources.Sprites_title_eggClass) package Resources { import mx.core.*; public class Sprites_title_eggClass extends BitmapAsset { } }//package Resources
Section 193
//Sprites_title_herodollClass (Resources.Sprites_title_herodollClass) package Resources { import mx.core.*; public class Sprites_title_herodollClass extends BitmapAsset { } }//package Resources
Section 194
//Sprites_tutorial_CClass (Resources.Sprites_tutorial_CClass) package Resources { import mx.core.*; public class Sprites_tutorial_CClass extends BitmapAsset { } }//package Resources
Section 195
//Sprites_tutorial_downZClass (Resources.Sprites_tutorial_downZClass) package Resources { import mx.core.*; public class Sprites_tutorial_downZClass extends BitmapAsset { } }//package Resources
Section 196
//Sprites_tutorial_leftrightClass (Resources.Sprites_tutorial_leftrightClass) package Resources { import mx.core.*; public class Sprites_tutorial_leftrightClass extends BitmapAsset { } }//package Resources
Section 197
//Sprites_tutorial_XClass (Resources.Sprites_tutorial_XClass) package Resources { import mx.core.*; public class Sprites_tutorial_XClass extends BitmapAsset { } }//package Resources
Section 198
//Sprites_tutorial_ZClass (Resources.Sprites_tutorial_ZClass) package Resources { import mx.core.*; public class Sprites_tutorial_ZClass extends BitmapAsset { } }//package Resources
Section 199
//Sprites_tutorial_ZZClass (Resources.Sprites_tutorial_ZZClass) package Resources { import mx.core.*; public class Sprites_tutorial_ZZClass extends BitmapAsset { } }//package Resources
Section 200
//Text (Resources.Text) package Resources { public class Text { public static const JOURNAL_SCOURGE_TEXT:String = "The draconic scourge is a fearsome creature. These beasts cause destruction for no apparent reason. Sometimes they demand a tribute of riches or human sacrifice, but at other times they just destroy and retreat back to their distant lairs. Only the most intrepid of human heroes can approach a scourge, whether to give tribute or defeat the beast. --X. R. Quilliam, Magus"; public static const JOURNAL_DRAGONSLAYER_TEXT:String = "Death is a constant risk, even for the nigh-immortal dragon. While dragons can live millenia, one final arrow fired by a fierce heart can end the noblest of lives. The human who slays a dragon will go down in history, but the dragon will also live forever in the hero's story. It means nothing to slay a weak beast, and so the legend of a dragonslayer also serves to honor the dragon who gave its life to the hero's legacy. --X. R. Quilliam, Magus"; public static const JOURNAL_ESCAPE_TEXT:String = "There are no known cases of a captive dragon being kept past late adolescence. The dragon is too intelligent and strong-willed to be held in captivity once its body and mind develop past human levels. The luckiest captors simply awake one day to find their "pets" missing. The less fortunate receive object lessons in the consequences of crossing dragons. --X. R. Quilliam, Magus"; public static const JOURNAL_BREATH_TEXT:String = "The most distinctive ability of the dragon is the breath power. Dragons can channel magic through their mouths to cause amazing effects: searing fire, healing mist, or even a burst of water and magic that can cause plants to grow with incredible speed. Each dragon only has a single breath ability, and it seems to be determined by the dragon's diet as an adolescent. Some dragons lack any breath ability at all, perhaps due to insufficient nutrition. --X. R. Quilliam, Magus"; public static const JOURNAL_FORGIVENESS_TEXT:String = "Occasionally, a captive dragon will forgive its captor and perform an act of kindness in a time of need. The dragon is in every way a superior beast to the human: superior in mind, superior in body, and superior in heart. When a dragon shows anger, it burns brighter than any human rage, but draconic forgiveness shines even brighter. Only the most callous of captors could resist releasing such a noble beast. --X. R. Quilliam, Magus"; public static const JOURNAL_CAPTURE_TEXT:String = "When still a hatchling, a dragon can be captured with relative ease using cleverness or magic. The benefits of a captive dragon are many; as magical creatures, even their droppings are useful in magical rituals. The ethics of holding captive a sentient creature are, of course, questionable... as is the wisdom of keeping such a creature for too long. --X. R. Quilliam, Magus"; public static const JOURNAL_FRIENDSHIP_TEXT:String = "With the proper gifts and greetings, a hero can befriend a dragon. The partnership thus formed is as strong a bond as family or marriage. The hero and the dragon will fight for each other and serve as constant companions. Such a partnership between two dissimilar beings is special. The greatest deeds in history were done by heroes paired with dragons, and I would venture that there is no more powerful force on earth. --X. R. Quilliam, Magus"; public static const CREDITS_TEXT:String = "Created by Gregory Weir. Sponsored by Armor Games. Thanks to Lissa Avery. Features sounds from <a href="pdsounds.com">pdsounds.com</a> and music samples from Alex Beroza's "Guitar for Improvisation on Friday" and Klaus Neumaier's "Guitar Mood Pack," "Acoustic Guitar Changes," "12 String Acoustic Guitar Flagolet Chords," and "Jazz Flute Theme," available at <a href="ccmixter.org">ccmixter.org</a>. <a href='http://ludusnovus.net' target='_blank'>For more by Gregory Weir, visit http://ludusnovus.net</a>."; public static const JOURNAL_ADOLESCENT_TEXT:String = "After several years, the newly born dragon will have grown considerably. It will be as tall as a human being, and will have achieved a great deal of strength and intelligence. A captive adolescent is not likely to stay captive for very long. The wings of an adolescent are not developed enough for true flight, but they are able to provide some lift, allowing the dragon to extend the height and length of its jumps. --X. R. Quilliam, Magus"; public static const CONTROLS_TEXT:String = "ARROW KEYS: Move right and left. DOWN + Z: Jump down through a supporting platform. Z: Jump. Press again in the air to double-jump, once you're old enough. Press repeatedly to fly and hold down to glide when your wings are fully-grown. Also skips and closes journal screens. X: Bite. Eat things to gain abilities. C: Breathe. When you're old enough, you may gain special breath abilities. ESCAPE: Return to the title screen."; public static const JOURNAL_WATCHER_TEXT:String = "The watcher is the most mysterious of dragons. It does little harm to humans, and contents itself with staying away from all civilization. These dragons are rarely regarded as threats to civilization. They only occasionally cause damage to human settlements, and will often only hurt humans who attempt to attack them. The heroes who attempt to destroy these dragons are typically motivated by personal fame, rather than protecting civilization. --X. R. Quilliam, Magus"; public static const JOURNAL_ADULT_TEXT:String = "An adult dragon is at least half a century in age, several stories tall, and capable of eating a cow or human in a bite. Cruel dragons will often land on humans, killing them. An adult dragon can soar into the air by flapping its wings or glide by holding them out. A newly adult dragon must first find a home. Good homes are secure locations with a view of the nearby land. One can always tell when a dragon has chosen a new home: it will rest motionless in a spot for a time. --X. R. Quilliam, Magus"; public static const JOURNAL_FIREBREATH_TEXT:String = "Fire breath is, in the minds of the peasantry, the most memorable of a dragon's abilities. By producing flammable gases within its stomach and lighting them with a special gland on the roof of the mouth, a dragon can produce a flame hot enough to incinerate most anything in its path. --X. R. Quilliam, Magus"; public static const JOURNAL_HATCHLING_TEXT:String = "Dragons hatch alone; they are not brooding creatures. This is possible because of the high degree of autonomy of newly hatched dragons. Unlike human babies, hatchling dragons can fend for themselves. While their wings are still vestigial, they can chase down and consume food without assistance, and are capable of defending themselves against predators. --X. R. Quilliam, Magus"; public static const JOURNAL_SERVITUDE_TEXT:String = "Through the appropriate tribute, a hero can appease a dragon enough to temper its attitudes toward humans. The hero must bring a gift and pledge service to the dragon. In doing so, the hero becomes a tool of the dragon, to advance the creature's agenda. This provides the hero great power, but it also means that the hero's freedom is granted only at the whim of the dragon. If a dragon abandons a servant, the servant is often executed by the other humans under the dragon's control. --X. R. Quilliam, Magus"; public static const JOURNAL_HERODEATH_TEXT:String = "Some heroes are not meant to survive. Some beasts cannot be slain. A hero who falters, or who confronts a dragon too soon, or who is simply unlucky, will die. This is the risk a hero embraces when venturing out on the ultimate quest. A hero is not a hero because of bravery; a hero is one who does what must be done even though it is frightening, even though it is hard, and even though it may end in failure. --X. R. Quilliam, Magus"; public static const JOURNAL_HEALBREATH_TEXT:String = "A dragon who has ingested certain herbs and mystical substances during adolescence can produce a healing mist from its nostrils. This substance is as effective as the best man- made salves, and can cure most ailments. This ability is sometimes used selfishly, so that the dragon can amuse itself or reward loyal servants. Folk tales more often tell of those dragons who have turned the power to benevolent purposes. --X. R. Quilliam, Magus"; public static const JOURNAL_TYRANT_TEXT:String = "History is full of stories about tyrant dragons. These cruel creatures take control of human settlements by force, and rule with firm claws and quick judgement. Many of these tyrants seem motivated by the tribute they demand from their human subjects, while others appear to simply desire power. Whatever their reasons, draconic tyrants can rule for centuries before they are toppled by a human hero. --X. R. Quilliam, Magus"; public static const JOURNAL_HERO_TEXT:String = "For every dragon, there is a single human capable of posing a threat. This hero or heroine seems to have a link of destiny with the dragon. Sometimes, the hero is a warrior who sets out to destroy the dragon. Alternately, the hero may decide to befriend the dragon and work by its side. The hero may even be sent to pay tribute to a draconic tyrant. Just like dragons, heroes can be good or evil. They are recognizable only by their tremendous strength. --X. R. Quilliam, Magus"; public static const JOURNAL_COLORATION_TEXT:String = "A dragon's scales can take on almost any color in the rainbow. Contrary to popular folklore, the color of the dragon has little to do with the dragon's temperment or abilities. The color of a dragon's scales depends entirely on the foods it eats when it is still a hatchling. It is unclear what causes a dragon to prefer one food over another -- it may simply be a matter of personal preference. --X. R. Quilliam, Magus"; public static const JOURNAL_GUARDIAN_TEXT:String = "Sometimes a dragon will set itself up as a guardian of a human settlement. It may be out of true benevolence, or perhaps the same sort of condescending concern we humans have toward our pets. The motivations of dragons are inscrutable. These guardians are sometimes kind, and sometimes strict. Among humans, they can generate love or resentment. --X. R. Quilliam, Magus"; public static const JOURNAL_GROWTHBREATH_TEXT:String = "Certain dragons gain the ability to produce a stream of magically charged water from their mouths, which has a swift and dramatic affect on nearby vegetation. In an instant, a plant that seemed dead will be revived, and crops will flourish. Some dragons have been known to use this ability to avert famine in human communities. Others have chosen to become avengers of the forest, and fight for the plants against encroaching humans. --X. R. Quilliam, Magus"; public static const JOURNAL_STALEMATE_TEXT:String = "When a truly determined hero faces an equally strong dragon, there is only one way a fight can end. The dragon, in its dying throes, will strike out at the hero and deal the fragile human a fatal blow. This is a fate that both dragon and hero are prepared for. When one transcends the ordinary, one expects an extraordinary end. The hero pays the ultimate price for a legendary victory. --X. R. Quilliam, Magus"; public static const JOURNAL_HUMANINTERACTION_TEXT:String = "The history of human-dragon interactions is a complex one. Some dragons ignore humans altogether, while others cause cruel and arbitrary destruction. Occasionally, a dragon will set itself up in a position of power over humans, either as a strict overlord or a gracious protector. An adult dragon is a fearsome sight, and is effectively impervious to all but the most dedicated human attackers. --X. R. Quilliam, Magus"; } }//package Resources
Section 201
//BookScreen (Screens.BookScreen) package Screens { import flash.events.*; import flash.display.*; import flash.geom.*; import WorldObjects.*; import Util.*; import Resources.*; import flash.text.*; import flash.filters.*; import flash.ui.*; public class BookScreen extends Screen { private var titleField:TextField; private var picture:Sprite; private var initialMaskX:int; private var initialMaskY:int; private var pictureMask:Sprite; private var title:String; private var frameCount:int;// = 0 private var flashingZ:TextField; private var lastScreen:Boolean; private var text:String; private var bodyField:TextField; private var nextScreen:Screen; private static const SEPIA_MATRIX:Array = [0.3, 0.59, 0.11, 0, 52, 0.3, 0.59, 0.11, 0, 48, 0.3, 0.59, 0.11, 0, 16, 0, 0, 0, 1, 0]; private static const FINAL_PICTURE_Y:int = 8; private static const IDENT_MATRIX:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]; private static const COLOR_FADE_TIME:int = 10; private static const FINAL_PICTURE_X:int = 94; private static const POSITION_TWEEN_TIME:int = 10; public function BookScreen(_arg1:PlayScreen, _arg2:String, _arg3:String, _arg4:Screen=null, _arg5:Boolean=false){ this.title = _arg2; this.text = _arg3; scaleX = 2; scaleY = 2; this.nextScreen = _arg4; this.lastScreen = _arg5; var _local6:BitmapData = new BitmapData(Main.UNSCALED_WIDTH, Main.UNSCALED_HEIGHT); var _local7:Matrix = new Matrix(); _local7.translate(_arg1.x, _arg1.y); _local6.draw(_arg1, _local7); picture = new Sprite(); DragonGraphics.drawSprite(picture.graphics, _local6, 0, 0); picture.filters = [new ColorMatrixFilter(IDENT_MATRIX)]; this.addChild(picture); picture.cacheAsBitmap = true; pictureMask = new Sprite(); pictureMask.addChild(Sprites.BOOKMASK); if (_arg1.dragon){ switch (_arg1.dragon.age){ case Dragon.AGE_HATCHLING: pictureMask.x = ((_arg1.dragon.x - 10) + _arg1.x); pictureMask.y = ((_arg1.dragon.y - 10) + _arg1.y); break; case Dragon.AGE_ADOLESCENT: pictureMask.x = ((_arg1.dragon.x - 10) + _arg1.x); pictureMask.y = ((_arg1.dragon.y - 4) + _arg1.y); break; case Dragon.AGE_ADULT: if (_arg1.dragon.facingRight){ pictureMask.x = ((_arg1.dragon.x + 10) + _arg1.x); } else { pictureMask.x = ((_arg1.dragon.x - 5) + _arg1.x); }; pictureMask.y = (_arg1.dragon.y + _arg1.y); break; }; } else { if (_arg1.hero){ pictureMask.x = ((_arg1.hero.x - 27) + _arg1.x); pictureMask.y = ((_arg1.hero.y - 18) + _arg1.y); }; }; if (pictureMask.x < 0){ pictureMask.x = 0; }; if (pictureMask.x > (Main.UNSCALED_WIDTH - pictureMask.width)){ pictureMask.x = (Main.UNSCALED_WIDTH - pictureMask.width); }; if (pictureMask.y < 0){ pictureMask.y = 0; }; if (pictureMask.y > (Main.UNSCALED_HEIGHT - pictureMask.height)){ pictureMask.y = (Main.UNSCALED_HEIGHT - pictureMask.height); }; initialMaskX = pictureMask.x; initialMaskY = pictureMask.y; setMaskBGAlpha(1); this.addChild(pictureMask); pictureMask.cacheAsBitmap = true; picture.mask = pictureMask; graphics.beginFill(16052432); graphics.drawRect(0, 0, Main.UNSCALED_WIDTH, Main.UNSCALED_HEIGHT); graphics.endFill(); titleField = new TextField(); titleField.y = -2; titleField.width = 175; titleField.height = 16; titleField.defaultTextFormat = Fonts.REGULAR_LARGE; titleField.embedFonts = true; titleField.text = ""; titleField.selectable = false; this.addChild(titleField); bodyField = new TextField(); bodyField.y = 10; bodyField.width = Main.UNSCALED_WIDTH; bodyField.height = (Main.UNSCALED_HEIGHT - 10); bodyField.defaultTextFormat = Fonts.REGULAR_SMALL; bodyField.embedFonts = true; bodyField.text = ""; bodyField.selectable = false; this.addChild(bodyField); flashingZ = new TextField(); flashingZ.y = 72; flashingZ.x = 154; flashingZ.width = 10; flashingZ.height = 10; flashingZ.defaultTextFormat = Fonts.REGULAR_SMALL; flashingZ.embedFonts = true; flashingZ.text = "Z"; flashingZ.selectable = false; this.addChild(flashingZ); flashingZ.visible = false; this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); } override public function step(_arg1:int):void{ if (frameCount <= COLOR_FADE_TIME){ fadeInColor(); } else { if (frameCount <= (COLOR_FADE_TIME + POSITION_TWEEN_TIME)){ tweenPicturePosition(); } else { if (titleField.text.length < title.length){ titleField.appendText(title.substr(titleField.text.length, 2)); } else { if (bodyField.text.length < text.length){ bodyField.appendText(text.substr(bodyField.text.length, 16)); } else { if ((_arg1 % 16) == 0){ flashingZ.visible = !(flashingZ.visible); }; }; }; }; }; frameCount++; } private function onKeyDown(_arg1:KeyboardEvent):void{ _arg1.stopImmediatePropagation(); if ((((_arg1.keyCode == Keyboard.SPACE)) || ((_arg1.keyCode == 90)))){ if (bodyField.text.length < text.length){ frameCount = ((COLOR_FADE_TIME + POSITION_TWEEN_TIME) + 1); fadeInColor(); tweenPicturePosition(); titleField.text = title; bodyField.text = text; } else { stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); Main.popScreen(); if (nextScreen != null){ Main.popScreen(); Main.pushScreen(nextScreen); } else { if (lastScreen){ while (!((Main.currScreen is TitleScreen))) { Main.popScreen(); }; }; }; }; }; } private function tweenPicturePosition():void{ var _local1:Number; if (frameCount >= (COLOR_FADE_TIME + POSITION_TWEEN_TIME)){ picture.x = (FINAL_PICTURE_X - initialMaskX); picture.y = (FINAL_PICTURE_Y - initialMaskY); pictureMask.x = FINAL_PICTURE_X; pictureMask.y = FINAL_PICTURE_Y; } else { _local1 = (1 / ((POSITION_TWEEN_TIME - frameCount) + COLOR_FADE_TIME)); picture.x = (picture.x + int((_local1 * (FINAL_PICTURE_X - pictureMask.x)))); picture.y = (picture.y + int((_local1 * (FINAL_PICTURE_Y - pictureMask.y)))); pictureMask.x = (pictureMask.x + int((_local1 * (FINAL_PICTURE_X - pictureMask.x)))); pictureMask.y = (pictureMask.y + int((_local1 * (FINAL_PICTURE_Y - pictureMask.y)))); }; } private function setMaskBGAlpha(_arg1:Number):void{ pictureMask.graphics.clear(); pictureMask.graphics.beginFill(0, _arg1); pictureMask.graphics.drawRect(-(pictureMask.x), -(pictureMask.y), Main.UNSCALED_WIDTH, Main.UNSCALED_HEIGHT); pictureMask.graphics.endFill(); } private function onAddedToStage(_arg1:Event):void{ stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown, false, 1); } private function fadeInColor():void{ var newMatrix:Array; if (frameCount < COLOR_FADE_TIME){ var tweenColorCallback:Function = function (_arg1, _arg2:int, _arg3:Array):Number{ return ((_arg1 - ((frameCount / COLOR_FADE_TIME) * (_arg1 - SEPIA_MATRIX[_arg2])))); }; newMatrix = IDENT_MATRIX.map(tweenColorCallback); } else { newMatrix = SEPIA_MATRIX; }; picture.filters = [new ColorMatrixFilter(newMatrix)]; setMaskBGAlpha((1 - (frameCount / COLOR_FADE_TIME))); } } }//package Screens
Section 202
//ControlsScreen (Screens.ControlsScreen) package Screens { import flash.events.*; import flash.display.*; import Resources.*; import flash.text.*; public class ControlsScreen extends Screen { public function ControlsScreen(){ super(); scaleX = 2; scaleY = 2; graphics.beginFill(16052432); graphics.drawRect(0, 0, Main.UNSCALED_WIDTH, Main.UNSCALED_HEIGHT); graphics.endFill(); var titleField:TextField = new TextField(); titleField.y = -2; titleField.width = 175; titleField.height = 16; titleField.defaultTextFormat = Fonts.REGULAR_LARGE; titleField.embedFonts = true; titleField.text = "Controls"; titleField.selectable = false; this.addChild(titleField); var bodyField:TextField = new TextField(); bodyField.y = 8; bodyField.width = Main.UNSCALED_WIDTH; bodyField.height = (Main.UNSCALED_HEIGHT - 10); bodyField.defaultTextFormat = Fonts.REGULAR_SMALL; bodyField.embedFonts = true; bodyField.text = Text.CONTROLS_TEXT; bodyField.selectable = false; this.addChild(bodyField); var backButton:Sprite = new Sprite(); backButton.x = 0; backButton.y = 70; backButton.buttonMode = true; backButton.mouseChildren = false; backButton.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{ Main.popScreen(); }); this.addChild(backButton); var backField:TextField = new TextField(); backField.defaultTextFormat = Fonts.REGULAR_SMALL; backField.embedFonts = true; backField.width = 18; backField.height = 10; backField.text = "BACK"; backField.selectable = false; backButton.addChild(backField); backButton.graphics.lineStyle(0.5, 0, 1); backButton.graphics.drawRect(1, 1, (backButton.width - 2), (backButton.height - 2)); } } }//package Screens
Section 203
//CreditsScreen (Screens.CreditsScreen) package Screens { import flash.events.*; import flash.display.*; import Resources.*; import flash.text.*; public class CreditsScreen extends Screen { public function CreditsScreen(){ super(); scaleX = 2; scaleY = 2; graphics.beginFill(16052432); graphics.drawRect(0, 0, Main.UNSCALED_WIDTH, Main.UNSCALED_HEIGHT); graphics.endFill(); var titleField:TextField = new TextField(); titleField.y = -2; titleField.width = 175; titleField.height = 16; titleField.defaultTextFormat = Fonts.REGULAR_LARGE; titleField.embedFonts = true; titleField.text = "Credits"; titleField.selectable = false; this.addChild(titleField); var bodyField:TextField = new TextField(); bodyField.y = 10; bodyField.width = Main.UNSCALED_WIDTH; bodyField.height = (Main.UNSCALED_HEIGHT - 10); bodyField.defaultTextFormat = Fonts.REGULAR_SMALL; bodyField.embedFonts = true; bodyField.htmlText = Text.CREDITS_TEXT; bodyField.selectable = false; this.addChild(bodyField); var backButton:Sprite = new Sprite(); backButton.x = 5; backButton.y = 70; backButton.buttonMode = true; backButton.mouseChildren = false; backButton.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{ Main.popScreen(); }); this.addChild(backButton); var backField:TextField = new TextField(); backField.defaultTextFormat = Fonts.REGULAR_SMALL; backField.embedFonts = true; backField.width = 18; backField.height = 10; backField.text = "BACK"; backField.selectable = false; backButton.addChild(backField); backButton.graphics.lineStyle(0.5, 0, 1); backButton.graphics.drawRect(1, 1, (backButton.width - 2), (backButton.height - 2)); } } }//package Screens
Section 204
//EndScreen (Screens.EndScreen) package Screens { import flash.events.*; import flash.display.*; import Resources.*; import flash.text.*; import flash.net.*; public class EndScreen extends Screen { private var holdCount:int; private var fadingOut:Boolean; private var black:Sprite; public function EndScreen(_arg1:Boolean, _arg2:Boolean){ var heroAlive = _arg1; var dragonAlive = _arg2; super(); this.scaleX = 2; this.scaleY = 2; this.addChild(Backgrounds.ENDSCREEN_BG); if (Main.currProgress.home == Progress.HOME_CASTLE){ this.addChild(Backgrounds.ENDSCREEN_RAMPARTS); } else { this.addChild(Backgrounds.ENDSCREEN_MOUNTAINS); }; if (heroAlive){ this.addChild(Backgrounds.ENDSCREEN_HERO); }; if (dragonAlive){ this.addChild(Backgrounds.ENDSCREEN_DRAGON); }; var playMoreButton:Sprite = new Sprite(); playMoreButton.y = 71; playMoreButton.x = 110; playMoreButton.buttonMode = true; playMoreButton.mouseChildren = false; playMoreButton.cacheAsBitmap = true; this.addChild(playMoreButton); playMoreButton.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://armorgames.com"), "_blank"); }); var playMoreField:TextField = new TextField(); playMoreField.width = 54; playMoreField.defaultTextFormat = Fonts.REGULAR_SMALL; playMoreField.embedFonts = true; playMoreField.text = "Play More Games"; playMoreField.textColor = 0xFFFFFF; playMoreField.selectable = false; playMoreButton.addChild(playMoreField); black = new Sprite(); black.mouseEnabled = false; black.graphics.beginFill(0); black.graphics.drawRect(0, 0, Main.UNSCALED_WIDTH, Main.UNSCALED_HEIGHT); black.graphics.endFill(); this.addChild(black); } override public function step(_arg1:int):void{ if (((!(fadingOut)) && ((black.alpha > 0)))){ black.alpha = (black.alpha - 0.025); } else { if (holdCount < 120){ fadingOut = true; holdCount++; } else { if (black.alpha < 1){ black.alpha = (black.alpha + 0.025); } else { while (!((Main.currScreen is TitleScreen))) { Main.popScreen(); }; }; }; }; } } }//package Screens
Section 205
//NewGameScreen (Screens.NewGameScreen) package Screens { import flash.events.*; import flash.display.*; import flash.geom.*; import WorldObjects.*; import Util.*; import Interface.*; import Resources.*; import flash.text.*; public class NewGameScreen extends Screen { private var healIcon:Sprite; private var greenSlider:Slider; private var dragonTitleLabelField:TextField; private var selectedTitle:int;// = -1 private var selectedBehavior:int;// = -1 private var fireIcon:Sprite; private var noneIcon:Sprite; private var redSlider:Slider; private var behaviorValueArray:Array; private var blueSlider:Slider; private var behaviorLabelField:TextField; private var growthIcon:Sprite; private var behaviorArray:Array; private var titleArray:Array; private var selectedBreath:int;// = -1 private var titleValueArray:Array; private var portrait:Sprite; private var startAge:int; public function NewGameScreen(_arg1:int){ var breathField:TextField; var behaviorField:TextField; var dragonTitleField:TextField; var age = _arg1; super(); startAge = age; scaleX = 2; scaleY = 2; graphics.beginFill(16052432); graphics.drawRect(0, 0, Main.UNSCALED_WIDTH, Main.UNSCALED_HEIGHT); graphics.endFill(); var titleField:TextField = new TextField(); titleField.y = -2; titleField.width = 175; titleField.height = 16; titleField.defaultTextFormat = Fonts.REGULAR_LARGE; titleField.embedFonts = true; switch (age){ case Dragon.AGE_ADOLESCENT: titleField.text = "New Adolescent"; break; case Dragon.AGE_ADULT: titleField.text = "New Adult"; break; case Dragon.AGE_ELDER: titleField.text = "New Elder"; break; }; titleField.selectable = false; this.addChild(titleField); portrait = new Sprite(); DragonGraphics.drawSprite(portrait.graphics, Sprites.HATCHLING_STAND[0], 0, 0); portrait.x = 100; portrait.y = 10; portrait.transform.colorTransform = new ColorTransform(0.25, 0.25, 0.25); this.addChild(portrait); var colorField:TextField = new TextField(); colorField.y = 15; colorField.height = 11; colorField.defaultTextFormat = Fonts.REGULAR_SMALL; colorField.embedFonts = true; colorField.text = "Color:"; colorField.selectable = false; this.addChild(colorField); redSlider = new Slider(60, 4, 6, 0xFF0000); redSlider.x = 27; redSlider.y = 13; redSlider.addEventListener(Event.CHANGE, updateColor); this.addChild(redSlider); greenSlider = new Slider(60, 4, 6, 0xFF00); greenSlider.x = 27; greenSlider.y = 18; greenSlider.addEventListener(Event.CHANGE, updateColor); this.addChild(greenSlider); blueSlider = new Slider(60, 4, 6, 0xFF); blueSlider.x = 27; blueSlider.y = 23; blueSlider.addEventListener(Event.CHANGE, updateColor); this.addChild(blueSlider); if (age >= Dragon.AGE_ADULT){ breathField = new TextField(); breathField.y = 34; breathField.height = 11; breathField.defaultTextFormat = Fonts.REGULAR_SMALL; breathField.embedFonts = true; breathField.text = "Breath Power:"; breathField.selectable = false; this.addChild(breathField); fireIcon = new Sprite(); DragonGraphics.drawSprite(fireIcon.graphics, Sprites.ICON_FLAME_SMALL.bitmapData, 0, 0); fireIcon.y = 33; fireIcon.x = 50; if (SaveData.breathUnlocked(Dragon.BREATH_FIRE)){ if (selectedBreath == -1){ selectedBreath = Dragon.BREATH_FIRE; } else { fireIcon.alpha = 0.5; }; fireIcon.buttonMode = true; fireIcon.addEventListener(MouseEvent.CLICK, breathClick); } else { fireIcon.alpha = 0.05; }; this.addChild(fireIcon); healIcon = new Sprite(); DragonGraphics.drawSprite(healIcon.graphics, Sprites.ICON_HEALING_SMALL.bitmapData, 0, 0); healIcon.y = 33; healIcon.x = 70; if (SaveData.breathUnlocked(Dragon.BREATH_HEALING)){ if (selectedBreath == -1){ selectedBreath = Dragon.BREATH_HEALING; } else { healIcon.alpha = 0.5; }; healIcon.buttonMode = true; healIcon.addEventListener(MouseEvent.CLICK, breathClick); } else { healIcon.alpha = 0.05; }; this.addChild(healIcon); growthIcon = new Sprite(); DragonGraphics.drawSprite(growthIcon.graphics, Sprites.ICON_LEAF_SMALL.bitmapData, 0, 0); growthIcon.y = 33; growthIcon.x = 90; if (SaveData.breathUnlocked(Dragon.BREATH_GROWTH)){ if (selectedBreath == -1){ selectedBreath = Dragon.BREATH_GROWTH; } else { growthIcon.alpha = 0.5; }; growthIcon.buttonMode = true; growthIcon.addEventListener(MouseEvent.CLICK, breathClick); } else { growthIcon.alpha = 0.05; }; this.addChild(growthIcon); noneIcon = new Sprite(); DragonGraphics.drawSprite(noneIcon.graphics, Sprites.ICON_NONE_SMALL.bitmapData, 0, 0); noneIcon.y = 33; noneIcon.x = 110; if (SaveData.breathUnlocked(-1)){ if (selectedBreath != -1){ noneIcon.alpha = 0.5; }; noneIcon.buttonMode = true; noneIcon.addEventListener(MouseEvent.CLICK, breathClick); } else { noneIcon.alpha = 0.05; }; this.addChild(noneIcon); }; if (age >= Dragon.AGE_ELDER){ behaviorField = new TextField(); behaviorField.y = 48; behaviorField.height = 11; behaviorField.defaultTextFormat = Fonts.REGULAR_SMALL; behaviorField.embedFonts = true; behaviorField.text = "Behavior:"; behaviorField.selectable = false; this.addChild(behaviorField); behaviorArray = new Array(); behaviorValueArray = new Array(); addBehavior(Sprites.ICON_FERTILE, Progress.BEHAVIOR_FERTILE); addBehavior(Sprites.ICON_FIERY, Progress.BEHAVIOR_FIERY); addBehavior(Sprites.ICON_HEALER, Progress.BEHAVIOR_HEALER); addBehavior(Sprites.ICON_NECROMANTIC, Progress.BEHAVIOR_NECROMANTIC); addBehavior(Sprites.ICON_RAMPAGING, Progress.BEHAVIOR_RAMPAGING); addBehavior(Sprites.ICON_RECLUSIVE, Progress.BEHAVIOR_RECLUSIVE); addBehavior(Sprites.ICON_WILD, Progress.BEHAVIOR_WILD); behaviorLabelField = new TextField(); behaviorLabelField.x = 100; behaviorLabelField.y = 48; behaviorLabelField.height = 11; behaviorLabelField.defaultTextFormat = Fonts.REGULAR_SMALL; behaviorLabelField.embedFonts = true; behaviorLabelField.text = Progress.getBehaviorName(selectedBehavior); behaviorLabelField.selectable = false; this.addChild(behaviorLabelField); reconcileBehaviorAndBreath(); dragonTitleField = new TextField(); dragonTitleField.y = 57; dragonTitleField.height = 11; dragonTitleField.defaultTextFormat = Fonts.REGULAR_SMALL; dragonTitleField.embedFonts = true; dragonTitleField.text = "Title:"; dragonTitleField.selectable = false; this.addChild(dragonTitleField); titleArray = new Array(); titleValueArray = new Array(); addTitle(Sprites.ICON_GUARDIAN, Progress.TITLE_GUARDIAN); addTitle(Sprites.ICON_TYRANT, Progress.TITLE_TYRANT); addTitle(Sprites.ICON_WATCHER, Progress.TITLE_WATCHER); addTitle(Sprites.ICON_SCOURGE, Progress.TITLE_SCOURGE); dragonTitleLabelField = new TextField(); dragonTitleLabelField.x = 100; dragonTitleLabelField.y = 57; dragonTitleLabelField.height = 11; dragonTitleLabelField.defaultTextFormat = Fonts.REGULAR_SMALL; dragonTitleLabelField.embedFonts = true; dragonTitleLabelField.text = Progress.getTitleName(selectedTitle); dragonTitleLabelField.selectable = false; this.addChild(dragonTitleLabelField); }; var backButton:Sprite = new Sprite(); backButton.x = 5; backButton.y = 70; backButton.buttonMode = true; backButton.mouseChildren = false; backButton.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{ Main.popScreen(); }); this.addChild(backButton); var backField:TextField = new TextField(); backField.defaultTextFormat = Fonts.REGULAR_SMALL; backField.embedFonts = true; backField.width = 18; backField.height = 10; backField.text = "BACK"; backField.selectable = false; backButton.addChild(backField); backButton.graphics.lineStyle(0.5, 0, 1); backButton.graphics.drawRect(1, 1, (backButton.width - 2), (backButton.height - 2)); var beginButton:Sprite = new Sprite(); beginButton.x = 130; beginButton.y = 70; beginButton.buttonMode = true; beginButton.mouseChildren = false; beginButton.addEventListener(MouseEvent.CLICK, beginGame); this.addChild(beginButton); var beginField:TextField = new TextField(); beginField.defaultTextFormat = Fonts.REGULAR_SMALL; beginField.embedFonts = true; beginField.width = 20; beginField.height = 10; beginField.text = "BEGIN"; beginField.selectable = false; beginButton.addChild(beginField); beginButton.graphics.lineStyle(0.5, 0, 1); beginButton.graphics.drawRect(1, 1, (beginButton.width - 2), (beginButton.height - 2)); } private function titleClick(_arg1:MouseEvent):void{ var _local2:int; while (_local2 < titleArray.length) { if (titleArray[_local2].buttonMode){ titleArray[_local2].alpha = 0.5; }; _local2++; }; _arg1.target.alpha = 1; selectedTitle = titleValueArray[titleArray.indexOf(_arg1.target)]; dragonTitleLabelField.text = Progress.getTitleName(selectedTitle); } private function addBehavior(_arg1:Bitmap, _arg2:int):void{ var _local3:int = behaviorArray.length; behaviorArray.push(new Sprite()); behaviorValueArray.push(_arg2); DragonGraphics.drawSprite(behaviorArray[_local3].graphics, _arg1.bitmapData, 0, 0); behaviorArray[_local3].x = (30 + (10 * _local3)); behaviorArray[_local3].y = 49; if (SaveData.behaviorUnlocked(_arg2)){ if (selectedBehavior == -1){ selectedBehavior = _arg2; } else { behaviorArray[_local3].alpha = 0.5; }; behaviorArray[_local3].buttonMode = true; behaviorArray[_local3].addEventListener(MouseEvent.CLICK, behaviorClick); } else { behaviorArray[_local3].alpha = 0.05; }; this.addChild(behaviorArray[_local3]); } private function breathClick(_arg1:MouseEvent):void{ if (fireIcon.buttonMode){ fireIcon.alpha = 0.5; }; if (healIcon.buttonMode){ healIcon.alpha = 0.5; }; if (growthIcon.buttonMode){ growthIcon.alpha = 0.5; }; if (noneIcon.buttonMode){ noneIcon.alpha = 0.5; }; _arg1.target.alpha = 1; switch (_arg1.target){ case fireIcon: selectedBreath = Dragon.BREATH_FIRE; break; case growthIcon: selectedBreath = Dragon.BREATH_GROWTH; break; case healIcon: selectedBreath = Dragon.BREATH_HEALING; break; case noneIcon: selectedBreath = -1; break; }; } private function behaviorClick(_arg1:MouseEvent):void{ var _local2:int; while (_local2 < behaviorArray.length) { if (behaviorArray[_local2].buttonMode){ behaviorArray[_local2].alpha = 0.5; }; _local2++; }; _arg1.target.alpha = 1; selectedBehavior = behaviorValueArray[behaviorArray.indexOf(_arg1.target)]; behaviorLabelField.text = Progress.getBehaviorName(selectedBehavior); reconcileBehaviorAndBreath(); } private function updateColor(_arg1:Event):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:ColorTransform; if (((redSlider.position + blueSlider.position) + greenSlider.position) > 0){ _local2 = 0; if (redSlider.position > 0){ _local2 = ((Math.min(redSlider.position, 5) / 5) + 0.25); }; _local3 = 0; if (greenSlider.position > 0){ _local3 = ((Math.min(greenSlider.position, 5) / 5) + 0.25); }; _local4 = 0; if (blueSlider.position > 0){ _local4 = ((Math.min(blueSlider.position, 5) / 5) + 0.25); }; _local5 = new ColorTransform(_local2, _local3, _local4); portrait.transform.colorTransform = _local5; } else { portrait.transform.colorTransform = new ColorTransform(0.25, 0.25, 0.25); }; } private function addTitle(_arg1:Bitmap, _arg2:int):void{ var _local3:int = titleArray.length; titleArray.push(new Sprite()); titleValueArray.push(_arg2); DragonGraphics.drawSprite(titleArray[_local3].graphics, _arg1.bitmapData, 0, 0); titleArray[_local3].x = (40 + (10 * _local3)); titleArray[_local3].y = 58; if (SaveData.titleUnlocked(_arg2)){ if (selectedTitle == -1){ selectedTitle = _arg2; } else { titleArray[_local3].alpha = 0.5; }; titleArray[_local3].buttonMode = true; titleArray[_local3].addEventListener(MouseEvent.CLICK, titleClick); } else { titleArray[_local3].alpha = 0.05; }; this.addChild(titleArray[_local3]); } private function beginGame(_arg1:MouseEvent):void{ Main.currProgress = new Progress(); Main.currProgress.redCount = redSlider.position; Main.currProgress.greenCount = greenSlider.position; Main.currProgress.blueCount = blueSlider.position; if (startAge == Dragon.AGE_ADOLESCENT){ Main.popScreen(); Main.pushScreen(PlayScreen.getAdolescentLevel()); return; }; Main.currProgress.breathWeapon = selectedBreath; if (startAge == Dragon.AGE_ADULT){ Main.popScreen(); Main.pushScreen(PlayScreen.getAdultLevel()); return; }; if (startAge == Dragon.AGE_ELDER){ Main.currProgress.behavior = selectedBehavior; Main.currProgress.title = selectedTitle; if ((((selectedTitle == Progress.TITLE_GUARDIAN)) || ((selectedTitle == Progress.TITLE_TYRANT)))){ Main.currProgress.home = Progress.HOME_CASTLE; } else { Main.currProgress.home = Progress.HOME_MOUNTAIN; }; Main.popScreen(); Main.pushScreen(PlayScreen.getElderLevel()); return; }; } private function reconcileBehaviorAndBreath():void{ if (selectedBehavior == Progress.BEHAVIOR_FIERY){ fireIcon.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; if ((((selectedBehavior == Progress.BEHAVIOR_NECROMANTIC)) || ((selectedBehavior == Progress.BEHAVIOR_HEALER)))){ healIcon.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; if ((((selectedBehavior == Progress.BEHAVIOR_WILD)) || ((selectedBehavior == Progress.BEHAVIOR_FERTILE)))){ growthIcon.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; } } }//package Screens
Section 206
//PlayScreen (Screens.PlayScreen) package Screens { import flash.events.*; import flash.display.*; import flash.geom.*; import WorldObjects.*; import Util.*; import Interface.*; import Resources.*; public class PlayScreen extends Screen { private var _elder:ElderDragon; private var speechBubble:SpeechBubble; private var cutsceneCounter:int; private var worldObjects:Array; private var collision:Bitmap; private var _dragon:Dragon; private var shaking:Boolean; private var overlay:BreathStatus; private var sickbubbles:ParticleSystem; private var cutsceneCage:Bitmap; private var prison:SpawnPrison; private var bg1:Bitmap; private var bg2:Bitmap; private var bg3:Bitmap; private var triggers:Array; private var fg:Bitmap; private var _hero:Hero; private var currCutscene:int;// = 0 private var scroll_margin_bottom:int; private var scroll_margin_top:int; private static const CUT_HATCHLING:int = 1; private static const CUT_HEALED:int = 2; private static const SCROLL_MARGIN_MEDIUM:int = 25; private static const CUT_NONE:int = 0; private static const SCROLL_MARGIN_SMALL:int = 8; private static const SCROLL_MARGIN_X:int = 50; private static const SCROLL_MARGIN_LARGE:int = 30; public function PlayScreen(){ worldObjects = new Array(); triggers = new Array(); super(); this.addEventListener(Event.ADDED_TO_STAGE, addedToStage); } private function addFoodOnGround(_arg1:int, _arg2:int, _arg3:int):void{ var _local4:SpriteAnimation; var _local5:Class; var _local6:SpriteAnimation; _arg2 = findGroundBelow(_arg1, _arg2); switch (_arg3){ case FoodObject.EFFECT_RED: _local4 = Sprites.FOOD_REDBUGCRAWL; _local5 = CrawlingFood; _local6 = Sprites.PARTS_RED; break; case FoodObject.EFFECT_BLUE: _local4 = Sprites.FOOD_BLUEBUGCRAWL; _local5 = CrawlingFood; _local6 = Sprites.PARTS_BLUE; break; case FoodObject.EFFECT_GREEN: _local4 = Sprites.FOOD_GREENSHOOT; _local5 = FoodObject; _local6 = Sprites.PARTS_GREEN; break; }; var _local7:Rectangle = new Rectangle(1, 1, (_local4[0].width - 2), (_local4[0].height - 2)); addFoodAtPoint(_arg1, (_arg2 - _local4[0].height), _local5, _local4, _local6, _arg3, _local7); } public function shake():void{ this.y--; shaking = true; } private function wizBreathed(_arg1:int):void{ if (_arg1 == Dragon.BREATH_GROWTH){ return; }; this.removeChild(sickbubbles); this.removeChild(speechBubble); if (_arg1 == Dragon.BREATH_HEALING){ dragon.deactivate(); currCutscene = CUT_HEALED; }; } public function get elder():ElderDragon{ return (_elder); } public function collisionAt(_arg1:int, _arg2:int):Boolean{ if (_arg2 < 0){ return (true); }; return ((collision.bitmapData.getPixel(_arg1, _arg2) == 0)); } public function addWorldObject(_arg1:WorldObject, _arg2:int, _arg3:int):void{ _arg1.x = _arg2; _arg1.y = _arg3; this.addChild(_arg1); this.worldObjects.push(_arg1); } public function get dragon():Dragon{ return (_dragon); } public function supportedAtRect(_arg1:Rectangle):Boolean{ if (supportAtRect(_arg1)){ _arg1.offset(0, -1); return (((!(supportAtRect(_arg1))) && (!(collisionAtRect(_arg1))))); }; return (false); } private function stepHealedCutscene():void{ if (cutsceneCounter < 30){ cutsceneCounter++; } else { Main.pushScreen(new BookScreen(this, "Forgiveness", Text.JOURNAL_FORGIVENESS_TEXT, PlayScreen.getAdultLevel())); }; } private function addTutorial(_arg1:BitmapData, _arg2:int, _arg3:int):void{ var _local4:TutorialSign = new TutorialSign(_arg1, this); _local4.x = _arg2; _local4.y = _arg3; this.addChild(_local4); worldObjects.push(_local4); } private function getHumanCitizenState():int{ if (dragon){ return (HumanNPC.STATE_ALIVE); }; var _local1:Number = Math.random(); if ((((Main.currProgress.behavior == Progress.BEHAVIOR_FIERY)) && ((_local1 < 0.1)))){ return (HumanNPC.STATE_BURNED); }; if (Main.currProgress.behavior == Progress.BEHAVIOR_RAMPAGING){ if (_local1 < 0.1){ return (HumanNPC.STATE_DEAD); }; if (_local1 < 0.2){ return (HumanNPC.STATE_HURT); }; } else { if (Main.currProgress.behavior == Progress.BEHAVIOR_NECROMANTIC){ if ((((((Main.currProgress.title == Progress.TITLE_TYRANT)) || ((Main.currProgress.title == Progress.TITLE_GUARDIAN)))) && ((_local1 < 0.3)))){ return (HumanNPC.STATE_UNDEAD); }; if (Main.currProgress.title == Progress.TITLE_SCOURGE){ return (HumanNPC.STATE_UNDEAD); }; }; }; return (HumanNPC.STATE_ALIVE); } private function addedToStage(_arg1:Event):void{ removeEventListener(Event.ADDED_TO_STAGE, addedToStage); Sounds.startAmbience(); } private function getDeadEnemySoldierState():int{ if (dragon){ return (HumanNPC.STATE_DEAD); }; var _local1:Number = Math.random(); if (Main.currProgress.title == Progress.TITLE_GUARDIAN){ return (HumanNPC.STATE_EATEN); }; if (Main.currProgress.title == Progress.TITLE_TYRANT){ return (HumanNPC.STATE_EATEN); }; if ((((Main.currProgress.behavior == Progress.BEHAVIOR_FIERY)) && ((_local1 < 0.1)))){ return (HumanNPC.STATE_BURNED); }; if (Main.currProgress.behavior == Progress.BEHAVIOR_RAMPAGING){ if (_local1 < 0.1){ return (HumanNPC.STATE_DEAD); }; if (_local1 < 0.2){ return (HumanNPC.STATE_HURT); }; } else { if (Main.currProgress.behavior == Progress.BEHAVIOR_NECROMANTIC){ return (HumanNPC.STATE_UNDEAD); }; }; return (HumanNPC.STATE_DEAD); } public function getFoodAt(_arg1:Rectangle):Edible{ var _local2:WorldObject; for each (_local2 in worldObjects) { if ((((((_local2 is Edible)) && ((Edible(_local2).eaten == false)))) && (_local2.getBounds(this).intersects(_arg1)))){ return (Edible(_local2)); }; }; return (null); } private function getDeadSoldierState():int{ if (dragon){ return (HumanNPC.STATE_DEAD); }; var _local1:Number = Math.random(); if (Main.currProgress.title == Progress.TITLE_GUARDIAN){ return (HumanNPC.STATE_EATEN); }; if (Main.currProgress.title == Progress.TITLE_TYRANT){ return (HumanNPC.STATE_ALIVE); }; if ((((Main.currProgress.behavior == Progress.BEHAVIOR_FIERY)) && ((_local1 < 0.1)))){ return (HumanNPC.STATE_BURNED); }; if (Main.currProgress.behavior == Progress.BEHAVIOR_RAMPAGING){ if (_local1 < 0.1){ return (HumanNPC.STATE_DEAD); }; if (_local1 < 0.2){ return (HumanNPC.STATE_HURT); }; } else { if (Main.currProgress.behavior == Progress.BEHAVIOR_NECROMANTIC){ return (HumanNPC.STATE_UNDEAD); }; }; return (HumanNPC.STATE_DEAD); } private function getGallowsState():int{ if (dragon){ return (-1); }; var _local1:Number = Math.random(); if ((((Main.currProgress.title == Progress.TITLE_GUARDIAN)) || ((((Main.currProgress.behavior == Progress.BEHAVIOR_FIERY)) && ((_local1 < 0.5)))))){ return (Dragon.BREATH_FIRE); }; if ((((Main.currProgress.behavior == Progress.BEHAVIOR_WILD)) && ((_local1 < 0.5)))){ return (Dragon.BREATH_GROWTH); }; return (-1); } private function homeChosen():void{ if (dragon.x < 2250){ Main.currProgress.home = Progress.HOME_CASTLE; } else { Main.currProgress.home = Progress.HOME_MOUNTAIN; }; Main.currProgress.assignIdentity(); displayIdentityJournal(); } private function getCropState():int{ if (dragon){ return (-1); }; var _local1:Number = Math.random(); if ((((Main.currProgress.behavior == Progress.BEHAVIOR_FIERY)) && ((_local1 < 0.5)))){ return (Dragon.BREATH_FIRE); }; if (Main.currProgress.behavior == Progress.BEHAVIOR_FERTILE){ return (Dragon.BREATH_GROWTH); }; return (-1); } public function findCeilingAbove(_arg1:int, _arg2:int):int{ var _local3:int = _arg2; if (collisionAt(_arg1, _arg2)){ if (collisionAt(_arg1, (_arg2 + 1))){ return (0); }; return (_arg2); }; while (_local3 > 0) { if (collisionAt(_arg1, _local3)){ break; }; _local3--; }; return (_local3); } private function positionParallaxLayers():void{ bg2.x = Math.ceil((-(this.x) * 0.5)); bg3.x = Math.ceil((-(this.x) * 0.75)); fg.x = this.x; bg2.y = Math.ceil((-(this.y) * 0.5)); bg3.y = Math.ceil((-(this.y) * 0.75)); fg.y = this.y; } private function prepareElder():void{ var shoot_tut:TutorialSign; SaveData.elderUnlocked = true; scroll_margin_bottom = SCROLL_MARGIN_SMALL; scroll_margin_top = SCROLL_MARGIN_LARGE; populateCountryside(); _elder = new ElderDragon(this); if (Main.currProgress.home == Progress.HOME_CASTLE){ this.addWorldObject(elder, 1500, 40); } else { this.addWorldObject(elder, 3040, 0); }; this.addWorldObject(new Pickup(Pickup.TYPE_BOW, this), 230, 112); this.addWorldObject(new Pickup(Pickup.TYPE_CHEST, this), 243, 110); this.addWorldObject(new Pickup(Pickup.TYPE_FLOWER, this), 260, 113); this.addWorldObject(new Pickup(Pickup.TYPE_BOW, this), 2730, 112); this.addWorldObject(new Pickup(Pickup.TYPE_CHEST, this), 2743, 110); this.addWorldObject(new Pickup(Pickup.TYPE_FLOWER, this), 2760, 113); _hero = new Hero(this); this.addWorldObject(_hero, 16, 108); shoot_tut = new TutorialSign(Sprites.TUTORIAL_C.bitmapData, this); _hero.addEventListener(Hero.EVENT_PICKUP, function (_arg1:Event):void{ if (_hero.currPickup == Pickup.TYPE_BOW){ shoot_tut.visible = true; }; }); _hero.addEventListener(Hero.EVENT_DROP, function (_arg1:Event):void{ if (_hero.currPickup != Pickup.TYPE_BOW){ shoot_tut.visible = false; }; }); addWorldObject(shoot_tut, 315, 95); addTutorial(Sprites.TUTORIAL_LEFTRIGHT.bitmapData, 8, 95); addTutorial(Sprites.TUTORIAL_Z.bitmapData, 80, 95); addTutorial(Sprites.TUTORIAL_X.bitmapData, 244, 95); addTutorial(Sprites.TUTORIAL_X.bitmapData, 360, 95); addTrigger(new BookTrigger([new Rectangle(160, 0, 30, 160)], "The Hero", Text.JOURNAL_HERO_TEXT, Sounds.MUSIC_HEROSTART)); fg = Backgrounds.ADULT_FG; fg.scaleX = 4; fg.scaleY = 4; this.addChild(fg); } public function removeWorldObject(_arg1:WorldObject):void{ worldObjects.splice(worldObjects.indexOf(_arg1), 1); this.removeChild(_arg1); _arg1.destroy(); } public function clearOverlay():void{ if (overlay){ this.removeChild(overlay); overlay = null; }; } private function getHurtSoldierState():int{ if (dragon){ return (HumanNPC.STATE_HURT); }; var _local1:Number = Math.random(); if (Main.currProgress.title == Progress.TITLE_GUARDIAN){ return (HumanNPC.STATE_EATEN); }; if ((((Main.currProgress.behavior == Progress.BEHAVIOR_FIERY)) && ((_local1 < 0.1)))){ return (HumanNPC.STATE_BURNED); }; if (Main.currProgress.behavior == Progress.BEHAVIOR_RAMPAGING){ if (_local1 < 0.1){ return (HumanNPC.STATE_DEAD); }; if (_local1 < 0.2){ return (HumanNPC.STATE_HURT); }; } else { if (Main.currProgress.behavior == Progress.BEHAVIOR_NECROMANTIC){ return (HumanNPC.STATE_UNDEAD); }; if (Main.currProgress.behavior == Progress.BEHAVIOR_HEALER){ return (HumanNPC.STATE_ALIVE); }; }; return (HumanNPC.STATE_HURT); } public function getBreathablesAt(_arg1:Rectangle):Array{ var _local3:WorldObject; var _local2:Array = new Array(); for each (_local3 in worldObjects) { if ((((((_local3 is Breathable)) && (!(Breathable(_local3).breathSpent)))) && (_local3.getBounds(this).intersects(_arg1)))){ _local2.push(_local3); }; }; return (_local2); } private function removeCage(_arg1:Event):void{ prison = null; Sounds.MUSIC_ADOLESCENT.play(); } public function supportAt(_arg1:int, _arg2:int):Boolean{ return ((collision.bitmapData.getPixel(_arg1, _arg2) == 0xFF0000)); } public function supportAtRect(_arg1:Rectangle):Boolean{ var _local3:int; var _local2:int = _arg1.left; while (_local2 < _arg1.right) { _local3 = _arg1.top; while (_local3 < _arg1.bottom) { if (collision.bitmapData.getPixel(_local2, _local3) == 0xFF0000){ return (true); }; _local3++; }; _local2++; }; return (false); } public function findGroundBelow(_arg1:int, _arg2:int, _arg3:Boolean=false):int{ var _local4:int = _arg2; var _local5:Boolean; if (collisionAt(_arg1, _arg2)){ if (collisionAt(_arg1, (_arg2 - 1))){ return (collision.height); }; return (_arg2); }; if (((!(_arg3)) && (supportAt(_arg1, _arg2)))){ _local5 = true; if (((!(supportAt(_arg1, (_arg2 - 1)))) && (!(collisionAt(_arg1, (_arg2 - 1)))))){ return (_arg2); }; }; while (_local4 < collision.height) { if (collisionAt(_arg1, _local4)){ break; }; if (((((!(_local5)) && (!(_arg3)))) && (supportAt(_arg1, _local4)))){ break; }; _local4++; }; return (_local4); } public function getPickup(_arg1:Rectangle):Pickup{ var _local2:WorldObject; for each (_local2 in worldObjects) { if ((((_local2 is Pickup)) && (_local2.getBounds(this).intersects(_arg1)))){ return (Pickup(_local2)); }; }; return (null); } private function stepHatchlingCutscene():void{ if (this.x > -((bg1.width - Main.UNSCALED_WIDTH))){ this.x--; if (this.y < -65){ this.y++; }; if (this.y > -65){ this.y--; }; positionParallaxLayers(); } else { if (cutsceneCage == null){ cutsceneCage = new Bitmap(Sprites.CAGE_BREAK[0]); cutsceneCage.alpha = 0; cutsceneCage.x = (dragon.x - 10); cutsceneCage.y = (dragon.y - 38); this.addChild(cutsceneCage); cutsceneCounter = 0; Sounds.APPEAR.play(); } else { if (cutsceneCage.alpha < 1){ cutsceneCage.alpha = (cutsceneCage.alpha + 0.1); } else { if (cutsceneCounter < 30){ cutsceneCounter++; } else { Main.pushScreen(new BookScreen(this, "Capturing a Dragon", Text.JOURNAL_CAPTURE_TEXT, PlayScreen.getAdolescentLevel())); SaveData.adolescentUnlocked = true; this.alpha = 0; }; }; }; }; } private function displayIdentityJournal():void{ var _local1:String; _local1 = ((Progress.getBehaviorName(Main.currProgress.behavior) + " ") + Progress.getTitleName(Main.currProgress.title)); SaveData.unlockBehavior(Main.currProgress.behavior); SaveData.unlockTitle(Main.currProgress.title); switch (Main.currProgress.title){ case Progress.TITLE_GUARDIAN: Main.pushScreen(new BookScreen(this, _local1, Text.JOURNAL_GUARDIAN_TEXT, PlayScreen.getElderLevel())); break; case Progress.TITLE_TYRANT: Main.pushScreen(new BookScreen(this, _local1, Text.JOURNAL_TYRANT_TEXT, PlayScreen.getElderLevel())); break; case Progress.TITLE_SCOURGE: Main.pushScreen(new BookScreen(this, _local1, Text.JOURNAL_SCOURGE_TEXT, PlayScreen.getElderLevel())); break; case Progress.TITLE_WATCHER: default: Main.pushScreen(new BookScreen(this, _local1, Text.JOURNAL_WATCHER_TEXT, PlayScreen.getElderLevel())); break; }; } private function addFoodAtPoint(_arg1:int, _arg2:int, _arg3:Class, _arg4:SpriteAnimation, _arg5:SpriteAnimation, _arg6:int, _arg7:Rectangle):void{ var _local8:FoodObject = new _arg3(_arg4, _arg5, _arg6, this, _arg7); _local8.x = _arg1; _local8.y = _arg2; this.addChild(_local8); worldObjects.push(_local8); } private function getBuildingState():int{ if (dragon){ return (-1); }; var _local1:Number = Math.random(); if ((((Main.currProgress.behavior == Progress.BEHAVIOR_FIERY)) && ((_local1 < 0.5)))){ return (Dragon.BREATH_FIRE); }; if ((((Main.currProgress.behavior == Progress.BEHAVIOR_WILD)) && ((_local1 < 0.5)))){ return (Dragon.BREATH_GROWTH); }; return (-1); } public function collisionAtRect(_arg1:Rectangle):Boolean{ var _local3:int; var _local2:int = _arg1.left; while (_local2 < _arg1.right) { _local3 = _arg1.top; while (_local3 < _arg1.bottom) { if (collision.bitmapData.getPixel(_local2, _local3) == 0){ return (true); }; _local3++; }; _local2++; }; return (false); } private function plantBreathed(_arg1:int):void{ if (_arg1 == Dragon.BREATH_FIRE){ Main.currProgress.plantsBurned++; } else { if (_arg1 == Dragon.BREATH_GROWTH){ Main.currProgress.neutralPlantsGrown++; }; }; } private function gallowsBreathed(_arg1:int):void{ if ((((_arg1 == Dragon.BREATH_FIRE)) || ((_arg1 == Dragon.BREATH_GROWTH)))){ Main.currProgress.guardsKilled++; }; } public function showOverlay(_arg1:BreathStatus):void{ if (this.overlay){ this.removeChild(this.overlay); }; this.overlay = _arg1; this.addChild(overlay); } private function getLiveEnemySoldierState():int{ if (dragon){ return (HumanNPC.STATE_ALIVE); }; var _local1:Number = Math.random(); if (Main.currProgress.title == Progress.TITLE_GUARDIAN){ return (HumanNPC.STATE_EATEN); }; if (Main.currProgress.title == Progress.TITLE_TYRANT){ return (HumanNPC.STATE_EATEN); }; if ((((Main.currProgress.behavior == Progress.BEHAVIOR_FIERY)) && ((_local1 < 0.1)))){ return (HumanNPC.STATE_BURNED); }; if (Main.currProgress.behavior == Progress.BEHAVIOR_RAMPAGING){ if (_local1 < 0.1){ return (HumanNPC.STATE_DEAD); }; if (_local1 < 0.2){ return (HumanNPC.STATE_HURT); }; } else { if (Main.currProgress.behavior == Progress.BEHAVIOR_NECROMANTIC){ return (HumanNPC.STATE_UNDEAD); }; }; return (HumanNPC.STATE_ALIVE); } public function stompHumans(_arg1:int, _arg2:int):void{ var _local3:WorldObject; for each (_local3 in worldObjects) { if ((((_local3 is HumanNPC)) && (((((_arg1 - _local3.centerX) * (_arg1 - _local3.centerX)) + ((_arg2 - _local3.bottom) * (_arg2 - _local3.bottom))) < 64)))){ HumanNPC(_local3).getStomped(); }; }; } private function addHatchling(_arg1:Event):void{ if (dragon == null){ _dragon = new Dragon(this, Dragon.AGE_HATCHLING); dragon.x = 60; dragon.y = 128; this.addChildAt(dragon, this.getChildIndex(prison)); worldObjects.push(dragon); prison = null; Sounds.MUSIC_HATCH.play(); }; } private function startHatchlingCutscene():void{ dragon.deactivate(); currCutscene = CUT_HATCHLING; } private function populateCountryside():void{ bg3 = Backgrounds.ADULT_BG3; bg3.scaleX = 4; bg3.scaleY = 4; this.addChild(bg3); bg2 = Backgrounds.ADULT_BG2; bg2.scaleX = 2; bg2.scaleY = 2; this.addChild(bg2); bg1 = Backgrounds.ADULT_BG1; this.addChild(bg1); collision = Backgrounds.ADULT_COLLIDE; addWorldObject(new BreathTarget(Sprites.TARGET_TREE_L, 1, -1, 2, plantBreathed, this, getPlantState()), 22, 57); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_L, 1, -1, 2, plantBreathed, this, getPlantState()), 60, 54); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_L, 1, -1, 2, plantBreathed, this, getPlantState()), 156, 56); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), -10, 70); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 7, 72); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 18, 71); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 35, 74); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 51, 73); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 70, 70); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 92, 75); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 114, 71); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 128, 72); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 150, 73); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 175, 76); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_S, 1, -1, 2, plantBreathed, this, getPlantState()), 10, 90); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_S, 1, -1, 2, plantBreathed, this, getPlantState()), 80, 88); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_S, 1, -1, 2, plantBreathed, this, getPlantState()), 120, 90); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_S, 1, -1, 2, plantBreathed, this, getPlantState()), 200, 87); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_S, 1, -1, 2, plantBreathed, this, getPlantState()), 265, 85); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_L, 1, -1, 2, plantBreathed, this, getPlantState()), 354, 57); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_L, 1, -1, 2, plantBreathed, this, getPlantState()), 425, 55); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 481, 68); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_L, 1, -1, 2, plantBreathed, this, getPlantState()), 471, 58); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 280, 71); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 301, 69); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 322, 72); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 346, 68); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 360, 73); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 380, 71); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 402, 69); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 419, 72); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 442, 70); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 468, 71); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_S, 1, -1, 2, plantBreathed, this, getPlantState()), 337, 88); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_S, 1, -1, 2, plantBreathed, this, getPlantState()), 377, 90); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_S, 1, -1, 2, plantBreathed, this, getPlantState()), 418, 89); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_S, 1, -1, 2, plantBreathed, this, getPlantState()), 453, 91); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_S, 1, -1, 2, plantBreathed, this, getPlantState()), 497, 90); addWorldObject(new BreathTarget(Sprites.TARGET_FARMHOUSE, 1, -1, 2, buildingBreathed, this, getBuildingState()), 552, 92); addWorldObject(new BreathTarget(Sprites.TARGET_CROP, 1, -1, 2, cropBreathed, this, getCropState()), 598, 109); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this), 740, 71); addWorldObject(new BreathTarget(Sprites.TARGET_FARMHOUSE, 1, -1, 2, buildingBreathed, this, getBuildingState()), 760, 89); addWorldObject(new BreathTarget(Sprites.TARGET_CROP, 1, -1, 2, cropBreathed, this, getCropState()), 804, 108); addWorldObject(new BreathTarget(Sprites.TARGET_TOWNHOUSE_S, 1, -1, 2, buildingBreathed, this, getBuildingState()), 960, 101); addWorldObject(new BreathTarget(Sprites.TARGET_TOWNHOUSE_M, 1, -1, 2, buildingBreathed, this, getBuildingState()), 976, 87); addWorldObject(new BreathTarget(Sprites.TARGET_TOWNHOUSE_L, 1, -1, 2, buildingBreathed, this, getBuildingState()), 1008, 85); addWorldObject(new BreathTarget(Sprites.TARGET_TOWNHOUSE_M, 1, -1, 2, buildingBreathed, this, getBuildingState()), 1054, 83); addWorldObject(new BreathTarget(Sprites.TARGET_TOWNHOUSE_S, 1, -1, 2, buildingBreathed, this, getBuildingState()), 1076, 103); addWorldObject(new BreathTarget(Sprites.TARGET_TOWNHOUSE_M, 1, -1, 2, buildingBreathed, this, getBuildingState()), 1096, 85); addWorldObject(new BreathTarget(Sprites.TARGET_TOWNHOUSE_S, 1, -1, 2, buildingBreathed, this, getBuildingState()), 1131, 102); addWorldObject(new BreathTarget(Sprites.TARGET_GALLOWS, 1, -1, 2, gallowsBreathed, this, getGallowsState()), 1235, 96); addWorldObject(new BreathTarget(Sprites.TARGET_TOWNHOUSE_S, 1, -1, 2, buildingBreathed, this, getBuildingState()), 1301, 99); addWorldObject(new BreathTarget(Sprites.TARGET_TOWNHOUSE_M, 1, -1, 2, buildingBreathed, this, getBuildingState()), 1321, 87); addWorldObject(new BreathTarget(Sprites.TARGET_TOWNHOUSE_L, 1, -1, 2, buildingBreathed, this, getBuildingState()), 1352, 85); addWorldObject(new BreathTarget(Sprites.TARGET_TOWNHOUSE_M, 1, -1, 2, buildingBreathed, this, getBuildingState()), 1411, 86); addWorldObject(new HumanNPC(Sprites.NPC_FARMER, Sprites.NPC_FARMER_DEAD, Sprites.NPC_FARMER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_FARMER_HURT, getHumanCitizenState(), this), 590, 108); addWorldObject(new HumanNPC(Sprites.NPC_FARMER, Sprites.NPC_FARMER_DEAD, Sprites.NPC_FARMER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_FARMER_HURT, getHumanCitizenState(), this), 782, 108); addWorldObject(new HumanNPC(Sprites.NPC_TOWNIE2, Sprites.NPC_TOWNIE2_DEAD, Sprites.NPC_TOWNIE2_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_TOWNIE2_HURT, getHumanCitizenState(), this), 786, 108); addWorldObject(new HumanNPC(Sprites.NPC_TOWNIE1, Sprites.NPC_TOWNIE1_DEAD, Sprites.NPC_TOWNIE1_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_TOWNIE1_HURT, getHumanCitizenState(), this), 1000, 108); addWorldObject(new HumanNPC(Sprites.NPC_TOWNIE1, Sprites.NPC_TOWNIE1_DEAD, Sprites.NPC_TOWNIE1_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_TOWNIE1_HURT, getHumanCitizenState(), this), 1050, 108); addWorldObject(new HumanNPC(Sprites.NPC_TOWNIE1, Sprites.NPC_TOWNIE1_DEAD, Sprites.NPC_TOWNIE1_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_TOWNIE1_HURT, getHumanCitizenState(), this), 1100, 108); addWorldObject(new HumanNPC(Sprites.NPC_TOWNIE1, Sprites.NPC_TOWNIE1_DEAD, Sprites.NPC_TOWNIE1_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_TOWNIE1_HURT, getHumanCitizenState(), this), 1150, 108); addWorldObject(new HumanNPC(Sprites.NPC_TOWNIE2, Sprites.NPC_TOWNIE2_DEAD, Sprites.NPC_TOWNIE2_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_TOWNIE2_HURT, getHumanCitizenState(), this), 1025, 108); addWorldObject(new HumanNPC(Sprites.NPC_TOWNIE2, Sprites.NPC_TOWNIE2_DEAD, Sprites.NPC_TOWNIE2_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_TOWNIE2_HURT, getHumanCitizenState(), this), 1075, 108); addWorldObject(new HumanNPC(Sprites.NPC_TOWNIE2, Sprites.NPC_TOWNIE2_DEAD, Sprites.NPC_TOWNIE2_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_TOWNIE2_HURT, getHumanCitizenState(), this), 1125, 108); addWorldObject(new HumanNPC(Sprites.NPC_TOWNIE2, Sprites.NPC_TOWNIE2_DEAD, Sprites.NPC_TOWNIE2_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_TOWNIE2_HURT, getHumanCitizenState(), this), 1175, 108); addWorldObject(new HumanNPC(Sprites.NPC_TOWNIE1, Sprites.NPC_TOWNIE1_DEAD, Sprites.NPC_TOWNIE1_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_TOWNIE1_HURT, getInjuredCitizenState(), this), 1210, 108); addWorldObject(new HumanNPC(Sprites.NPC_TOWNIE2, Sprites.NPC_TOWNIE2_DEAD, Sprites.NPC_TOWNIE2_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_TOWNIE2_HURT, getInjuredCitizenState(), this), 1218, 108); addWorldObject(new HumanNPC(Sprites.NPC_SOLDIER, Sprites.NPC_SOLDIER_DEAD, Sprites.NPC_SOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_SOLDIER_HURT, getGuardState(), this), 1230, 108); addWorldObject(new HumanNPC(Sprites.NPC_SOLDIER, Sprites.NPC_SOLDIER_DEAD, Sprites.NPC_SOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_SOLDIER_HURT, getGuardState(), this), 1240, 108); addWorldObject(new HumanNPC(Sprites.NPC_SOLDIER, Sprites.NPC_SOLDIER_DEAD, Sprites.NPC_SOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_SOLDIER_HURT, getGuardState(), this), 1485, 108); addWorldObject(new HumanNPC(Sprites.NPC_SOLDIER, Sprites.NPC_SOLDIER_DEAD, Sprites.NPC_SOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_SOLDIER_HURT, getGuardState(), this), 1495, 108); addWorldObject(new HumanNPC(Sprites.NPC_SOLDIER, Sprites.NPC_SOLDIER_DEAD, Sprites.NPC_SOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_SOLDIER_HURT, getGuardState(), this), 1505, 108); addWorldObject(new HumanNPC(Sprites.NPC_SOLDIER, Sprites.NPC_SOLDIER_DEAD, Sprites.NPC_SOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_SOLDIER_HURT, getGuardState(), this), 1512, 108); addWorldObject(new HumanNPC(Sprites.NPC_TOWNIE1, Sprites.NPC_TOWNIE1_DEAD, Sprites.NPC_TOWNIE1_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_TOWNIE1_HURT, getInjuredCitizenState(), this), 1480, 108); addWorldObject(new BreathTarget(Sprites.TARGET_FARMHOUSE, 1, -1, 2, buildingBreathed, this, getBuildingState()), 1775, 92); addWorldObject(new BreathTarget(Sprites.TARGET_CROP, 1, -1, 2, cropBreathed, this, getCropState()), 1801, 107); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 1825, 71); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_L, 1, -1, 2, plantBreathed, this, getPlantState()), 2662, 53); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 2600, 71); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 2625, 70); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 2652, 69); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 2672, 72); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 2693, 73); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 2719, 68); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 2746, 71); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_M, 1, -1, 2, plantBreathed, this, getPlantState()), 2778, 73); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_S, 1, -1, 2, plantBreathed, this, getPlantState()), 2615, 88); addWorldObject(new BreathTarget(Sprites.TARGET_TREE_S, 1, -1, 2, plantBreathed, this, getPlantState()), 2680, 91); addWorldObject(new HumanNPC(Sprites.NPC_FARMER, Sprites.NPC_FARMER_DEAD, Sprites.NPC_FARMER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_FARMER_HURT, getHumanCitizenState(), this), 1790, 108); addWorldObject(new HumanNPC(Sprites.NPC_SOLDIER, Sprites.NPC_SOLDIER_DEAD, Sprites.NPC_SOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_SOLDIER_HURT, getSoldierState(), this), 2000, 108); addWorldObject(new HumanNPC(Sprites.NPC_SOLDIER, Sprites.NPC_SOLDIER_DEAD, Sprites.NPC_SOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_SOLDIER_HURT, getSoldierState(), this), 2050, 108); addWorldObject(new HumanNPC(Sprites.NPC_SOLDIER, Sprites.NPC_SOLDIER_DEAD, Sprites.NPC_SOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_SOLDIER_HURT, getSoldierState(), this), 2100, 108); addWorldObject(new HumanNPC(Sprites.NPC_SOLDIER, Sprites.NPC_SOLDIER_DEAD, Sprites.NPC_SOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_SOLDIER_HURT, getSoldierState(), this), 2150, 108); addWorldObject(new HumanNPC(Sprites.NPC_SOLDIER, Sprites.NPC_SOLDIER_DEAD, Sprites.NPC_SOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_SOLDIER_HURT, getHurtSoldierState(), this), 2075, 108); addWorldObject(new HumanNPC(Sprites.NPC_SOLDIER, Sprites.NPC_SOLDIER_DEAD, Sprites.NPC_SOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_SOLDIER_HURT, getHurtSoldierState(), this), 2126, 108); addWorldObject(new HumanNPC(Sprites.NPC_SOLDIER, Sprites.NPC_SOLDIER_DEAD, Sprites.NPC_SOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_SOLDIER_HURT, getDeadSoldierState(), this), 2175, 108); addWorldObject(new HumanNPC(Sprites.NPC_SOLDIER, Sprites.NPC_SOLDIER_DEAD, Sprites.NPC_SOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_SOLDIER_HURT, getDeadSoldierState(), this), 2200, 108); addWorldObject(new HumanNPC(Sprites.NPC_SOLDIER, Sprites.NPC_SOLDIER_DEAD, Sprites.NPC_SOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_SOLDIER_HURT, getDeadSoldierState(), this), 2223, 108); addWorldObject(new HumanNPC(Sprites.NPC_ENEMYSOLDIER, Sprites.NPC_ENEMYSOLDIER_DEAD, Sprites.NPC_ENEMYSOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_ENEMYSOLDIER_HURT, getDeadEnemySoldierState(), this), 2275, 108); addWorldObject(new HumanNPC(Sprites.NPC_ENEMYSOLDIER, Sprites.NPC_ENEMYSOLDIER_DEAD, Sprites.NPC_ENEMYSOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_ENEMYSOLDIER_HURT, getDeadEnemySoldierState(), this), 0x0900, 108); addWorldObject(new HumanNPC(Sprites.NPC_ENEMYSOLDIER, Sprites.NPC_ENEMYSOLDIER_DEAD, Sprites.NPC_ENEMYSOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_ENEMYSOLDIER_HURT, getDeadEnemySoldierState(), this), 2321, 108); addWorldObject(new HumanNPC(Sprites.NPC_ENEMYSOLDIER, Sprites.NPC_ENEMYSOLDIER_DEAD, Sprites.NPC_ENEMYSOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_ENEMYSOLDIER_HURT, getDeadEnemySoldierState(), this), 2352, 108); addWorldObject(new HumanNPC(Sprites.NPC_ENEMYSOLDIER, Sprites.NPC_ENEMYSOLDIER_DEAD, Sprites.NPC_ENEMYSOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_ENEMYSOLDIER_HURT, getDeadEnemySoldierState(), this), 2370, 108); addWorldObject(new HumanNPC(Sprites.NPC_ENEMYSOLDIER, Sprites.NPC_ENEMYSOLDIER_DEAD, Sprites.NPC_ENEMYSOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_ENEMYSOLDIER_HURT, getDeadEnemySoldierState(), this), 2384, 108); addWorldObject(new HumanNPC(Sprites.NPC_ENEMYSOLDIER, Sprites.NPC_ENEMYSOLDIER_DEAD, Sprites.NPC_ENEMYSOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_ENEMYSOLDIER_HURT, getDeadEnemySoldierState(), this), 2401, 108); addWorldObject(new HumanNPC(Sprites.NPC_ENEMYSOLDIER, Sprites.NPC_ENEMYSOLDIER_DEAD, Sprites.NPC_ENEMYSOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_ENEMYSOLDIER_HURT, getLiveEnemySoldierState(), this), 2360, 108); addWorldObject(new HumanNPC(Sprites.NPC_ENEMYSOLDIER, Sprites.NPC_ENEMYSOLDIER_DEAD, Sprites.NPC_ENEMYSOLDIER_ZOMBIE, Sprites.NPC_BURNED, Sprites.NPC_ENEMYSOLDIER_HURT, getHurtEnemySoldierState(), this), 2413, 108); } private function getSoldierState():int{ if (dragon){ return (HumanNPC.STATE_ALIVE); }; var _local1:Number = Math.random(); if (Main.currProgress.title == Progress.TITLE_GUARDIAN){ return (HumanNPC.STATE_EATEN); }; if ((((Main.currProgress.behavior == Progress.BEHAVIOR_FIERY)) && ((_local1 < 0.1)))){ return (HumanNPC.STATE_BURNED); }; if (Main.currProgress.behavior == Progress.BEHAVIOR_RAMPAGING){ if (_local1 < 0.1){ return (HumanNPC.STATE_DEAD); }; if (_local1 < 0.2){ return (HumanNPC.STATE_HURT); }; } else { if (Main.currProgress.behavior == Progress.BEHAVIOR_NECROMANTIC){ return (HumanNPC.STATE_UNDEAD); }; }; return (HumanNPC.STATE_ALIVE); } private function cropBreathed(_arg1:int):void{ if (_arg1 == Dragon.BREATH_FIRE){ Main.currProgress.structuresBurned++; } else { if (_arg1 == Dragon.BREATH_GROWTH){ Main.currProgress.cropsGrown++; }; }; } private function treeBreathed(_arg1:int):void{ if (_arg1 == Dragon.BREATH_GROWTH){ this.collision = Backgrounds.ADOLESCENT_COLLIDETREE; }; } private function hayBreathed(_arg1:int):void{ if (_arg1 == Dragon.BREATH_FIRE){ this.collision = Backgrounds.ADOLESCENT_COLLIDEHAY; }; } public function findCeilingAboveRect(_arg1:Rectangle):int{ if (collisionAtRect(_arg1)){ _arg1.offset(0, 1); if (collisionAtRect(_arg1)){ return (-1); }; return ((_arg1.top - 1)); }; while (_arg1.top > 0) { if (collisionAtRect(_arg1)){ break; }; _arg1.offset(0, -1); }; return (_arg1.top); } override public function step(_arg1:int):void{ var _local3:WorldObject; var _local2:Rectangle = new Rectangle((-240 - x), (-120 - y), 640, 320); for each (_local3 in worldObjects) { if (_local2.contains(_local3.x, _local3.y)){ if (((prison) && ((_local3 == dragon)))){ } else { _local3.step(_arg1); }; }; }; if ((((currCutscene == 0)) && (((dragon) || (hero))))){ adjustView(); checkTriggers(); }; if (overlay){ overlay.step(); }; if (currCutscene != CUT_NONE){ switch (currCutscene){ case CUT_HATCHLING: stepHatchlingCutscene(); break; case CUT_HEALED: stepHealedCutscene(); break; }; }; } private function buildingBreathed(_arg1:int):void{ if (_arg1 == Dragon.BREATH_FIRE){ Main.currProgress.structuresBurned++; } else { if (_arg1 == Dragon.BREATH_GROWTH){ Main.currProgress.buildingsOvergrown++; }; }; } private function adjustView():void{ var _local1:WorldObject; var _local4:int; if (dragon){ _local1 = dragon; } else { if (hero){ _local1 = hero; }; }; if (shaking){ shaking = false; return; }; var _local2:int = (_local1.x + this.x); if ((((_local2 > ((Main.UNSCALED_WIDTH - SCROLL_MARGIN_X) - _local1.width))) && ((((_local1.x + _local1.width) + SCROLL_MARGIN_X) <= bg1.width)))){ this.x = (((Main.UNSCALED_WIDTH - SCROLL_MARGIN_X) - _local1.x) - _local1.width); } else { if ((((_local2 < SCROLL_MARGIN_X)) && (((_local1.x - SCROLL_MARGIN_X) > 0)))){ this.x = (SCROLL_MARGIN_X - _local1.x); }; }; var _local3:int = (_local1.y + this.y); if (_local3 > ((Main.UNSCALED_HEIGHT - scroll_margin_bottom) - _local1.height)){ _local4 = (((Main.UNSCALED_HEIGHT - scroll_margin_bottom) - _local1.y) - _local1.height); if (_local4 < -((bg1.height - Main.UNSCALED_HEIGHT))){ _local4 = -((bg1.height - Main.UNSCALED_HEIGHT)); }; this.y = _local4; } else { if ((((_local3 < scroll_margin_top)) && (((_local1.y - scroll_margin_top) > 0)))){ _local4 = (scroll_margin_top - _local1.y); if (_local4 > 0){ _local4 = 0; }; this.y = _local4; }; }; positionParallaxLayers(); } private function addTrigger(_arg1:Trigger):void{ triggers.push(_arg1); } private function getHurtEnemySoldierState():int{ if (dragon){ return (HumanNPC.STATE_HURT); }; var _local1:Number = Math.random(); if (Main.currProgress.title == Progress.TITLE_GUARDIAN){ return (HumanNPC.STATE_EATEN); }; if (Main.currProgress.title == Progress.TITLE_TYRANT){ return (HumanNPC.STATE_EATEN); }; if ((((Main.currProgress.behavior == Progress.BEHAVIOR_FIERY)) && ((_local1 < 0.1)))){ return (HumanNPC.STATE_BURNED); }; if (Main.currProgress.behavior == Progress.BEHAVIOR_RAMPAGING){ if (_local1 < 0.1){ return (HumanNPC.STATE_DEAD); }; if (_local1 < 0.2){ return (HumanNPC.STATE_HURT); }; } else { if (Main.currProgress.behavior == Progress.BEHAVIOR_NECROMANTIC){ return (HumanNPC.STATE_UNDEAD); }; }; return (HumanNPC.STATE_HURT); } private function getGuardState():int{ if (dragon){ return (HumanNPC.STATE_ALIVE); }; var _local1:Number = Math.random(); if (Main.currProgress.title == Progress.TITLE_GUARDIAN){ return (HumanNPC.STATE_EATEN); }; if ((((Main.currProgress.behavior == Progress.BEHAVIOR_FIERY)) && ((_local1 < 0.1)))){ return (HumanNPC.STATE_BURNED); }; if (Main.currProgress.behavior == Progress.BEHAVIOR_RAMPAGING){ if (_local1 < 0.1){ return (HumanNPC.STATE_DEAD); }; if (_local1 < 0.2){ return (HumanNPC.STATE_HURT); }; } else { if ((((Main.currProgress.behavior == Progress.BEHAVIOR_NECROMANTIC)) && ((Main.currProgress.home == Progress.HOME_CASTLE)))){ return (HumanNPC.STATE_UNDEAD); }; }; return (HumanNPC.STATE_ALIVE); } private function getInjuredCitizenState():int{ if (dragon){ return (HumanNPC.STATE_HURT); }; var _local1:Number = Math.random(); if (Main.currProgress.title == Progress.TITLE_GUARDIAN){ return (HumanNPC.STATE_ALIVE); }; if ((((Main.currProgress.behavior == Progress.BEHAVIOR_FIERY)) && ((_local1 < 0.1)))){ return (HumanNPC.STATE_BURNED); }; if (Main.currProgress.behavior == Progress.BEHAVIOR_RAMPAGING){ if (_local1 < 0.1){ return (HumanNPC.STATE_DEAD); }; if (_local1 < 0.2){ return (HumanNPC.STATE_HURT); }; }; return (HumanNPC.STATE_ALIVE); } private function getPlantState():int{ if (dragon){ return (-1); }; var _local1:Number = Math.random(); if ((((Main.currProgress.behavior == Progress.BEHAVIOR_FIERY)) && ((_local1 < 0.5)))){ return (Dragon.BREATH_FIRE); }; if ((((((Main.currProgress.behavior == Progress.BEHAVIOR_FERTILE)) || ((Main.currProgress.behavior == Progress.BEHAVIOR_WILD)))) && ((_local1 < 0.5)))){ return (Dragon.BREATH_GROWTH); }; return (-1); } private function prepareHatchling():void{ scroll_margin_bottom = SCROLL_MARGIN_MEDIUM; scroll_margin_top = SCROLL_MARGIN_MEDIUM; bg3 = Backgrounds.HATCHLING_BG3; bg3.scaleX = 4; bg3.scaleY = 4; this.addChild(bg3); bg2 = Backgrounds.HATCHLING_BG2; bg2.scaleX = 2; bg2.scaleY = 2; this.addChild(bg2); bg1 = Backgrounds.HATCHLING_BG1; this.addChild(bg1); collision = Backgrounds.HATCHLING_COLLIDE; prison = new SpawnPrison(Sprites.EGG_HATCH, Sprites.PARTS_SHELL, Sounds.EGGCRACK, this); prison.x = 70; prison.y = 125; this.addChild(prison); worldObjects.push(prison); prison.addEventListener(Event.OPEN, addHatchling); addTutorial(Sprites.TUTORIAL_LEFTRIGHT.bitmapData, 70, 120); addTutorial(Sprites.TUTORIAL_X.bitmapData, 285, 120); addTutorial(Sprites.TUTORIAL_Z.bitmapData, 480, 120); addTutorial(Sprites.TUTORIAL_DOWNZ.bitmapData, 930, 10); addTrigger(new BookTrigger([new Rectangle(380, 0, 10, 160)], "Coloration", Text.JOURNAL_COLORATION_TEXT, Sounds.MUSIC_COLORATION)); addTrigger(new BookTrigger([new Rectangle(160, 0, 10, 160)], "Hatchlings", Text.JOURNAL_HATCHLING_TEXT)); addTrigger(new Trigger([new Rectangle((bg1.width - 100), 0, Main.UNSCALED_WIDTH, bg1.height)], startHatchlingCutscene)); addFoodOnGround(285, 80, FoodObject.EFFECT_GREEN); addFoodOnGround(390, 127, FoodObject.EFFECT_BLUE); addFoodOnGround(525, 125, FoodObject.EFFECT_RED); addFoodOnGround(560, 70, FoodObject.EFFECT_GREEN); addFoodOnGround(800, 70, FoodObject.EFFECT_BLUE); addFoodOnGround(955, 100, FoodObject.EFFECT_RED); addFoodOnGround(1015, 20, FoodObject.EFFECT_GREEN); addFoodOnGround(1125, 60, FoodObject.EFFECT_GREEN); addFoodOnGround(1180, 80, FoodObject.EFFECT_BLUE); addFoodOnGround(1360, 30, FoodObject.EFFECT_RED); addFoodOnGround(1603, 44, FoodObject.EFFECT_GREEN); addFoodOnGround(1653, 50, FoodObject.EFFECT_BLUE); addFoodOnGround(1610, 125, FoodObject.EFFECT_RED); addFoodOnGround(1815, 10, FoodObject.EFFECT_BLUE); addFoodOnGround(1990, 20, FoodObject.EFFECT_RED); var _local1:ParticleSystem = new ParticleSystem(Sprites.PARTS_WATER, new Rectangle(0, 0, 1, 1), ParticleSystem.BEHAVIOR_FALL, this, 46); _local1.x = 1612; _local1.y = 13; this.addChild(_local1); this.worldObjects.push(_local1); var _local2:ParticleSystem = new ParticleSystem(Sprites.PARTS_WATER, new Rectangle(0, 0, 1, 1), ParticleSystem.BEHAVIOR_FALL, this, 81); _local2.x = 1708; _local2.y = 61; this.addChild(_local2); this.worldObjects.push(_local2); fg = Backgrounds.HATCHLING_FG; fg.scaleX = 4; fg.scaleY = 4; this.addChild(fg); this.y = -80; positionParallaxLayers(); } private function checkTriggers():void{ var _local1:Trigger; for each (_local1 in triggers) { if (((((dragon) && (_local1.contains(dragon)))) || (((hero) && (_local1.contains(hero)))))){ _local1.activate(); }; }; } private function prepareAdult():void{ SaveData.adultUnlocked = true; scroll_margin_bottom = SCROLL_MARGIN_SMALL; scroll_margin_top = 0; _dragon = new Dragon(this, Dragon.AGE_ADULT); populateCountryside(); addWorldObject(new BreathTarget(Sprites.TARGET_DEER, 1, 2, 3, null, this), 236, 97); this.addWorldObject(_dragon, 20, 65); addWorldObject(new HomeSign(this, homeChosen), 1598, 12); addWorldObject(new HomeSign(this, homeChosen), 3160, 50); addTrigger(new BookTrigger([new Rectangle(160, 0, 30, 160)], "Adulthood", Text.JOURNAL_ADULT_TEXT, Sounds.MUSIC_ADULT)); addTrigger(new BookTrigger([new Rectangle(560, 0, 30, 160)], "Human Interaction", Text.JOURNAL_HUMANINTERACTION_TEXT)); fg = Backgrounds.ADULT_FG; fg.scaleX = 4; fg.scaleY = 4; this.addChild(fg); } public function findGroundBelowRect(_arg1:Rectangle):int{ var _local2:Boolean; if (collisionAtRect(_arg1)){ _arg1.offset(0, -1); if (collisionAtRect(_arg1)){ return (_arg1.bottom); }; return ((_arg1.top + 1)); }; if (supportAtRect(_arg1)){ _local2 = true; _arg1.offset(0, -1); if (((!(supportAtRect(_arg1))) && (!(collisionAtRect(_arg1))))){ return ((_arg1.top + 1)); }; }; while (_arg1.bottom < collision.height) { if (collisionAtRect(_arg1)){ break; }; if (((!(_local2)) && (supportAtRect(_arg1)))){ break; }; _arg1.offset(0, 1); }; return (_arg1.top); } private function escapeAdolescent():void{ Main.pushScreen(new BookScreen(this, "Escape", Text.JOURNAL_ESCAPE_TEXT, PlayScreen.getAdultLevel())); SaveData.adultUnlocked = true; if (dragon.activeBreath == -1){ SaveData.unlockBreath(-1); }; } public function get hero():Hero{ return (_hero); } private function prepareAdolescent():void{ SaveData.adolescentUnlocked = true; scroll_margin_bottom = SCROLL_MARGIN_SMALL; scroll_margin_top = SCROLL_MARGIN_LARGE; bg3 = Backgrounds.ADOLESCENT_BG3; bg3.scaleX = 4; bg3.scaleY = 4; this.addChild(bg3); bg2 = Backgrounds.ADOLESCENT_BG2; bg2.scaleX = 2; bg2.scaleY = 2; this.addChild(bg2); bg1 = Backgrounds.ADOLESCENT_BG1; this.addChild(bg1); collision = Backgrounds.ADOLESCENT_COLLIDE; this.addWorldObject(new ParticleSystem(Sprites.PARTS_GREEN, new Rectangle(0, 0, 24, 1), ParticleSystem.BEHAVIOR_FALL, this, 31), 397, 515); this.addWorldObject(new ParticleSystem(Sprites.PARTS_GREEN, new Rectangle(0, 0, 1, 1), ParticleSystem.BEHAVIOR_FALL, this, 21), 344, 528); this.addWorldObject(new ParticleSystem(Sprites.PARTS_GREEN, new Rectangle(0, 0, 24, 1), ParticleSystem.BEHAVIOR_FALL, this, 31), 0x0404, 519); this.addFoodAtPoint(205, 335, FoodObject, Sprites.FOOD_PLANTFLOWER, Sprites.PARTS_PLANTFOOD, FoodObject.EFFECT_PLANT, new Rectangle(0, 2, 6, 10)); this.addFoodAtPoint(435, 124, FoodObject, Sprites.FOOD_PLANTBUSH, Sprites.PARTS_PLANTFOOD, FoodObject.EFFECT_PLANT, new Rectangle(0, 0, 16, 12)); this.addFoodAtPoint(773, 292, FoodObject, Sprites.FOOD_PLANTPOT, Sprites.PARTS_PLANTFOOD, FoodObject.EFFECT_PLANT, new Rectangle(0, 0, 15, 10)); this.addFoodAtPoint(587, 365, FoodObject, Sprites.FOOD_PLANTTREE, Sprites.PARTS_PLANTFOOD, FoodObject.EFFECT_PLANT, new Rectangle(0, 0, 18, 11)); this.addFoodAtPoint(900, 425, FoodObject, Sprites.FOOD_FIRETORCH, Sprites.PARTS_FIREFOOD, FoodObject.EFFECT_FIRE, new Rectangle(0, 0, 4, 5)); this.addFoodAtPoint(369, 386, FoodObject, Sprites.FOOD_FIREWOOD, Sprites.PARTS_FIREFOOD, FoodObject.EFFECT_FIRE, new Rectangle(0, 0, 16, 4)); this.addFoodAtPoint(716, 206, FoodObject, Sprites.FOOD_FIRECANDLE, Sprites.PARTS_FIREFOOD, FoodObject.EFFECT_FIRE, new Rectangle(4, 0, 2, 4)); this.addFoodAtPoint(1186, 116, FoodObject, Sprites.FOOD_FIRELAMP, Sprites.PARTS_FIREFOOD, FoodObject.EFFECT_FIRE, new Rectangle(3, 7, 4, 8)); this.addFoodAtPoint(661, 207, FoodObject, Sprites.FOOD_HEALPOTION, Sprites.PARTS_HEALFOOD, FoodObject.EFFECT_HEAL, new Rectangle(0, 0, 3, 4)); this.addFoodAtPoint(821, 127, FoodObject, Sprites.FOOD_HEALGEM, Sprites.PARTS_HEALFOOD, FoodObject.EFFECT_HEAL, new Rectangle(2, 0, 4, 4)); this.addFoodAtPoint(680, 461, FoodObject, Sprites.FOOD_HEALMUSHROOMS, Sprites.PARTS_HEALFOOD, FoodObject.EFFECT_HEAL, new Rectangle(0, 0, 23, 10)); this.addFoodAtPoint(1250, 201, FoodObject, Sprites.FOOD_HEALJAR, Sprites.PARTS_HEALFOOD, FoodObject.EFFECT_HEAL, new Rectangle(1, 0, 7, 2)); this.addWorldObject(new BreathTarget(Sprites.TARGET_VASE, 2, -1, 1, null, this), 736, 39); this.addWorldObject(new BreathTarget(Sprites.TARGET_JOURNAL, 1, -1, -1, null, this), 799, 42); this.addWorldObject(new BreathTarget(Sprites.TARGET_BROKENBARREL, 1, -1, 2, null, this), 1091, 441); this.addWorldObject(new BreathTarget(Sprites.TARGET_WIZARDHAY, 1, -1, 2, hayBreathed, this), 1194, 338); this.addWorldObject(new BreathTarget(Sprites.TARGET_WIZARDTREE, 1, -1, 2, treeBreathed, this), 27, 278); this.addWorldObject(new BreathTarget(Sprites.TARGET_WIZARD, 1, 2, 3, wizBreathed, this), 650, 35); _dragon = new Dragon(this, Dragon.AGE_ADOLESCENT); this.addWorldObject(_dragon, 380, 192); prison = new SpawnPrison(Sprites.CAGE_BREAK, Sprites.PARTS_WOOD, Sounds.WOODBREAK, this); this.addWorldObject(prison, 365, 171); prison.addEventListener(Event.OPEN, removeCage); addTutorial(Sprites.TUTORIAL_ZZ.bitmapData, 529, 154); addTutorial(Sprites.TUTORIAL_C.bitmapData, 714, 27); addTutorial(Sprites.TUTORIAL_C.bitmapData, 90, 335); addTutorial(Sprites.TUTORIAL_C.bitmapData, 1165, 340); sickbubbles = new ParticleSystem(Sprites.PARTS_SICK, new Rectangle(0, 0, 8, 5), ParticleSystem.BEHAVIOR_DRIFT, this, 60); this.addWorldObject(sickbubbles, 655, 42); speechBubble = new SpeechBubble(671, 28, this); this.addChild(speechBubble); this.worldObjects.push(speechBubble); fg = Backgrounds.ADOLESCENT_FG; fg.scaleX = 4; fg.scaleY = 4; this.addChild(fg); addTrigger(new BookTrigger([new Rectangle(450, 160, 30, 72)], "Adolescence", Text.JOURNAL_ADOLESCENT_TEXT)); addTrigger(new BookTrigger([new Rectangle(198, 347, 190, 45), new Rectangle(420, 118, 48, 16), new Rectangle(591, 356, 28, 36), new Rectangle(812, 109, 28, 28)], "Breath Powers", Text.JOURNAL_BREATH_TEXT)); addTrigger(new Trigger([new Rectangle(1272, 488, 8, 64)], escapeAdolescent)); addTrigger(new Trigger([new Rectangle(-19, 391, 8, 1)], escapeAdolescent)); addTrigger(new Trigger([new Rectangle(bg1.width, 391, 1, 1)], escapeAdolescent)); adjustView(); } public static function getAdultLevel():PlayScreen{ var _local1:PlayScreen = new (PlayScreen); _local1.prepareAdult(); return (_local1); } public static function getHatchlingLevel():PlayScreen{ var _local1:PlayScreen = new (PlayScreen); _local1.prepareHatchling(); return (_local1); } public static function getElderLevel():PlayScreen{ var _local1:PlayScreen = new (PlayScreen); _local1.prepareElder(); return (_local1); } public static function getAdolescentLevel():PlayScreen{ var _local1:PlayScreen = new (PlayScreen); _local1.prepareAdolescent(); return (_local1); } } }//package Screens
Section 207
//Screen (Screens.Screen) package Screens { import flash.display.*; public class Screen extends Sprite { public function refresh():void{ } public function step(_arg1:int):void{ } } }//package Screens
Section 208
//TitleScreen (Screens.TitleScreen) package Screens { import flash.events.*; import flash.display.*; import WorldObjects.*; import Util.*; import Resources.*; import flash.text.*; import flash.net.*; public class TitleScreen extends Screen { private var egg:Sprite; private var castle:Sprite; private var herodoll:Sprite; private var adultdragon:Sprite; public function TitleScreen(){ var ArmorLogo:Bitmap; var sponsorField:TextField; egg = new Sprite(); castle = new Sprite(); adultdragon = new Sprite(); herodoll = new Sprite(); super(); this.scaleX = 2; this.scaleY = 2; DragonGraphics.drawSprite(graphics, Backgrounds.TITLE_BG.bitmapData, 0, 0); egg.addChild(Sprites.TITLE_EGG); castle.addChild(Sprites.TITLE_CASTLE); adultdragon.addChild(Sprites.TITLE_ADULTDRAGON); herodoll.addChild(Sprites.TITLE_HERODOLL); this.addChild(egg); this.addChild(castle); this.addChild(adultdragon); this.addChild(herodoll); egg.buttonMode = true; egg.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{ Main.currProgress = new Progress(); Main.pushScreen(PlayScreen.getHatchlingLevel()); }); castle.buttonMode = true; castle.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{ Main.pushScreen(new NewGameScreen(Dragon.AGE_ADOLESCENT)); }); adultdragon.buttonMode = true; adultdragon.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{ Main.pushScreen(new NewGameScreen(Dragon.AGE_ADULT)); }); herodoll.buttonMode = true; herodoll.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{ Main.pushScreen(new NewGameScreen(Dragon.AGE_ELDER)); }); var titleField:TextField = new TextField(); titleField.y = -3; titleField.width = 160; titleField.height = 16; titleField.defaultTextFormat = Fonts.REGULAR_LARGECENTERWHITE; titleField.embedFonts = true; titleField.text = "How to Raise a Dragon"; titleField.selectable = false; this.addChild(titleField); var byField:TextField = new TextField(); byField.y = 8; byField.x = 15; byField.width = 50; byField.height = 16; byField.defaultTextFormat = Fonts.REGULAR_SMALL; byField.embedFonts = true; byField.htmlText = "<a href=\"http://ludusnovus.net\" target=\"_blank\">by Gregory Weir</a>"; byField.textColor = 0xFFFFFF; byField.selectable = false; this.addChild(byField); ArmorLogo = new Bitmap(Sprites.PIXELARMORLOGO.bitmapData); ArmorLogo.x = 100; ArmorLogo.y = 9; this.addChild(ArmorLogo); sponsorField = new TextField(); sponsorField.y = 8; sponsorField.x = 86; sponsorField.width = 60; sponsorField.height = 16; sponsorField.defaultTextFormat = Fonts.REGULAR_SMALL; sponsorField.embedFonts = true; sponsorField.htmlText = "<a href=\"http://armorgames.com\" target=\"_blank\">and Armor Games</a>"; sponsorField.textColor = 0xFFFFFF; sponsorField.selectable = false; this.addChild(sponsorField); var helpButton:Sprite = new Sprite(); helpButton.y = 70; helpButton.x = 2; helpButton.buttonMode = true; helpButton.mouseChildren = false; helpButton.cacheAsBitmap = true; this.addChild(helpButton); helpButton.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{ Main.pushScreen(new ControlsScreen()); }); var helpField:TextField = new TextField(); helpField.width = 30; helpField.defaultTextFormat = Fonts.REGULAR_SMALL; helpField.embedFonts = true; helpField.text = "Controls"; helpField.selectable = false; helpButton.addChild(helpField); var creditButton:Sprite = new Sprite(); creditButton.y = 70; creditButton.x = 133; creditButton.buttonMode = true; creditButton.mouseChildren = false; creditButton.cacheAsBitmap = true; this.addChild(creditButton); creditButton.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{ Main.pushScreen(new CreditsScreen()); }); var creditField:TextField = new TextField(); creditField.width = 30; creditField.defaultTextFormat = Fonts.REGULAR_SMALL; creditField.embedFonts = true; creditField.text = "Credits"; creditField.selectable = false; creditButton.addChild(creditField); var playMoreButton:Sprite = new Sprite(); playMoreButton.y = 70; playMoreButton.x = 53; playMoreButton.buttonMode = true; playMoreButton.mouseChildren = false; playMoreButton.cacheAsBitmap = true; this.addChild(playMoreButton); playMoreButton.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://armorgames.com"), "_blank"); }); var playMoreField:TextField = new TextField(); playMoreField.width = 54; playMoreField.defaultTextFormat = Fonts.REGULAR_SMALL; playMoreField.embedFonts = true; playMoreField.text = "Play More Games"; playMoreField.selectable = false; playMoreButton.addChild(playMoreField); arrangeStuff(); } override public function refresh():void{ arrangeStuff(); Sounds.stopAmbience(); } private function arrangeStuff():void{ if (SaveData.elderUnlocked){ egg.x = 17; egg.y = 23; castle.visible = true; castle.x = 46; castle.y = 11; adultdragon.visible = true; adultdragon.x = 85; adultdragon.y = 16; herodoll.visible = true; herodoll.x = 121; herodoll.y = 26; } else { if (SaveData.adultUnlocked){ egg.x = 22; egg.y = 17; castle.visible = true; castle.x = 67; castle.y = 11; adultdragon.visible = true; adultdragon.x = 113; adultdragon.y = 21; herodoll.visible = false; } else { if (SaveData.adolescentUnlocked){ egg.x = 43; egg.y = 12; castle.visible = true; castle.x = 87; castle.y = 11; adultdragon.visible = false; herodoll.visible = false; } else { egg.x = 69; egg.y = 13; castle.visible = false; adultdragon.visible = false; herodoll.visible = false; }; }; }; } } }//package Screens
Section 209
//DragonGraphics (Util.DragonGraphics) package Util { import flash.display.*; import flash.geom.*; import flash.filters.*; public class DragonGraphics { public static const MONOCHROME_FILTER:ColorMatrixFilter = new ColorMatrixFilter(MONOCHROME_MATRIX); private static const MONOCHROME_MATRIX:Array = [0.3, 0.59, 0.11, 0, 0, 0.3, 0.59, 0.11, 0, 0, 0.3, 0.59, 0.11, 0, 0, 0, 0, 0, 1, 0]; public static function drawSprite(_arg1:Graphics, _arg2:BitmapData, _arg3:Number, _arg4:Number, _arg5:Boolean=false, _arg6:Matrix=null, _arg7:Number=1):void{ if (_arg6 == null){ _arg6 = new Matrix(); }; if (_arg5){ _arg6.scale(-1, 1); }; if (_arg7 != 1){ _arg6.scale(_arg7, _arg7); }; if (((!((_arg3 == 0))) || (!((_arg4 == 0))))){ _arg6.translate(_arg3, _arg4); }; _arg1.beginBitmapFill(_arg2, _arg6); _arg1.drawRect(_arg3, _arg4, (_arg2.width * _arg7), (_arg2.height * _arg7)); _arg1.endFill(); } } }//package Util
Section 210
//DragonMath (Util.DragonMath) package Util { public class DragonMath { public static function randint(_arg1:int, _arg2:int):int{ if (_arg1 == _arg2){ return (_arg1); }; var _local3:Number = Math.random(); var _local4:int = (Math.floor((_local3 * ((_arg2 - _arg1) + 1))) + _arg1); if (_local4 > _arg2){ return (_arg2); }; return (_local4); } } }//package Util
Section 211
//SaveData (Util.SaveData) package Util { import flash.net.*; public class SaveData { private static const datastore:SharedObject = SharedObject.getLocal("HowToRaiseADragon", "/"); public static function set elderUnlocked(_arg1:Boolean):void{ datastore.data["Elder"] = _arg1; } public static function breathUnlocked(_arg1:int):Boolean{ return (datastore.data[("Breath" + _arg1)]); } public static function unlockBreath(_arg1:int):void{ datastore.data[("Breath" + _arg1)] = true; } public static function get elderUnlocked():Boolean{ return (datastore.data["Elder"]); } public static function set adolescentUnlocked(_arg1:Boolean):void{ datastore.data["Adolescent"] = _arg1; } public static function unlockTitle(_arg1:int):void{ datastore.data[("Title" + _arg1)] = true; } public static function behaviorUnlocked(_arg1:int):Boolean{ return (datastore.data[("Behavior" + _arg1)]); } public static function unlockBehavior(_arg1:int):void{ datastore.data[("Behavior" + _arg1)] = true; } public static function get adolescentUnlocked():Boolean{ return (datastore.data["Adolescent"]); } public static function set adultUnlocked(_arg1:Boolean):void{ datastore.data["Adult"] = _arg1; } public static function titleUnlocked(_arg1:int):Boolean{ return (datastore.data[("Title" + _arg1)]); } public static function clear():void{ datastore.clear(); } public static function get adultUnlocked():Boolean{ return (datastore.data["Adult"]); } } }//package Util
Section 212
//SpriteAnimation (Util.SpriteAnimation) package Util { import flash.display.*; import flash.geom.*; public dynamic class SpriteAnimation extends Array { public function SpriteAnimation(_arg1:BitmapData, _arg2:int){ var _local3:BitmapData; super(); if (_arg2 == 1){ push(_arg1); return; }; var _local4:int = (_arg1.width / _arg2); var _local5:int; while (_local5 < _arg2) { _local3 = new BitmapData(_local4, _arg1.height, true, 0); _local3.copyPixels(_arg1, new Rectangle((_local4 * _local5), 0, _local4, _arg1.height), new Point(0, 0)); push(_local3); _local5++; }; } public static function getBlank(_arg1:int, _arg2:int):SpriteAnimation{ return (new SpriteAnimation(new BitmapData(_arg1, _arg2, true, 0), 1)); } } }//package Util
Section 213
//Arrow (WorldObjects.Arrow) package WorldObjects { import Screens.*; import Util.*; import Resources.*; public class Arrow extends WorldObject { private var facingLeft:Boolean; private var TTL:int;// = 60 private static const ARROW_LIFE:int = 60; public function Arrow(_arg1:Boolean, _arg2:PlayScreen){ super(_arg2); this.facingLeft = _arg1; DragonGraphics.drawSprite(graphics, Sprites.ARROW, 0, 0, _arg1); } override public function step(_arg1:int):void{ if (facingLeft){ x = (x - 3); } else { x = (x + 3); }; if (((myScreen.elder) && (myScreen.elder.arrowHits(this)))){ myScreen.elder.getArrowed(); myScreen.removeWorldObject(this); } else { TTL--; if (TTL <= 0){ myScreen.removeWorldObject(this); }; }; } } }//package WorldObjects
Section 214
//Breathable (WorldObjects.Breathable) package WorldObjects { public interface Breathable { function get breathSpent():Boolean; function takeBreath(_arg1:int):void; } }//package WorldObjects
Section 215
//BreathTarget (WorldObjects.BreathTarget) package WorldObjects { import Screens.*; import Util.*; import Resources.*; public class BreathTarget extends WorldObject implements Breathable { private var healFrame:int; private var growthFrame:int; private var fireHP:int;// = 30 private var _spent:Boolean; private var healHP:int;// = 30 private var anim:SpriteAnimation; private var callback:Function; private var growthHP:int;// = 30 private var fireFrame:int; private static const STARTING_HP:int = 30; public function BreathTarget(_arg1:SpriteAnimation, _arg2:int, _arg3:int, _arg4:int, _arg5:Function, _arg6:PlayScreen, _arg7:int=-1){ super(_arg6); this.anim = _arg1; this.fireFrame = _arg2; this.healFrame = _arg3; this.growthFrame = _arg4; this.callback = _arg5; if (_arg1 != null){ DragonGraphics.drawSprite(graphics, _arg1[0], 0, 0); }; if (_arg7 != -1){ transition(_arg7, false); }; } private function transition(_arg1:int, _arg2:Boolean=true):void{ var _local3:int; var _local4:SpriteAnimation; _spent = true; switch (_arg1){ case Dragon.BREATH_FIRE: _local3 = fireFrame; _local4 = Sprites.PARTS_FIREFOOD; if (_arg2){ Sounds.FOOM.play(); }; break; case Dragon.BREATH_GROWTH: _local3 = growthFrame; _local4 = Sprites.PARTS_PLANTFOOD; if (_arg2){ Sounds.JINGLE.play(); }; break; case Dragon.BREATH_HEALING: _local3 = healFrame; _local4 = Sprites.PARTS_HEALFOOD; if (_arg2){ Sounds.CHOIR.play(); }; break; }; graphics.clear(); DragonGraphics.drawSprite(graphics, anim[_local3], 0, 0); if (_arg2){ this.addParticles(_local4, this.getRect(this), ParticleSystem.BEHAVIOR_BURST, 10); }; if (callback != null){ callback(_arg1); }; } public function get breathSpent():Boolean{ return (_spent); } override public function step(_arg1:int):void{ updateParticles(_arg1); } public function takeBreath(_arg1:int):void{ if (breathSpent){ return; }; switch (_arg1){ case Dragon.BREATH_FIRE: if (fireFrame != -1){ fireHP--; if (fireHP <= 0){ transition(Dragon.BREATH_FIRE); }; }; break; case Dragon.BREATH_GROWTH: if (growthFrame != -1){ growthHP--; if (growthHP <= 0){ transition(Dragon.BREATH_GROWTH); }; }; break; case Dragon.BREATH_HEALING: if (healFrame != -1){ healHP--; if (healHP <= 0){ transition(Dragon.BREATH_HEALING); }; }; break; }; } } }//package WorldObjects
Section 216
//CrawlingFood (WorldObjects.CrawlingFood) package WorldObjects { import Screens.*; import flash.geom.*; import Util.*; public class CrawlingFood extends FoodObject { public function CrawlingFood(_arg1:SpriteAnimation, _arg2:SpriteAnimation, _arg3:int, _arg4:PlayScreen, _arg5:Rectangle){ super(_arg1, _arg2, _arg3, _arg4, _arg5); } override public function step(_arg1:int):void{ super.step(_arg1); if (!eaten){ if (((((_arg1 % 4) == 0)) && ((animFrame == 2)))){ if (facingRight){ if (!tryWalk(1)){ _facingRight = false; }; } else { if (!tryWalk(-1)){ _facingRight = true; }; }; if (Math.random() < 0.05){ this._facingRight = !(this.facingRight); }; }; applyGravity(); }; } } }//package WorldObjects
Section 217
//Dragon (WorldObjects.Dragon) package WorldObjects { import Screens.*; import flash.events.*; import flash.geom.*; import Util.*; import Interface.*; import Resources.*; import flash.ui.*; public class Dragon extends WorldObject { private var breathing:Boolean;// = false private var standAnim:SpriteAnimation; private var healCount:int;// = 0 private var momentum:int;// = 0 private var falling:Boolean; private var biteAnim:SpriteAnimation; private var breathParticles:ParticleSystem; private var _footrect:Rectangle; private var biting:Boolean; private var jumpingDown:Boolean; private var zDown:Boolean; private var _age:int; private var runAnim:SpriteAnimation; private var leftDown:Boolean; private var greenCount:int;// = 0 private var blueCount:int;// = 0 private var animFrame:int;// = 0 private var rightDown:Boolean; private var jumpAnim:SpriteAnimation; private var currAnim:SpriteAnimation; private var plantCount:int;// = 0 private var _activeBreath:int;// = -1 private var downDown:Boolean; private var fireCount:int;// = 0 private var walkAnim:SpriteAnimation; private var doubleJumpUsed:Boolean; private var redCount:int;// = 0 private static const jogMomentum:int = 15; public static const BREATH_GROWTH:int = 2; public static const MAX_COLOR:int = 5; public static const AGE_ELDER:int = 3; private static const runMomentum:int = 30; public static const BREATH_FIRE:int = 0; public static const AGE_ADOLESCENT:int = 1; public static const AGE_ADULT:int = 2; public static const BREATH_HEALING:int = 1; public static const AGE_HATCHLING:int = 0; public function Dragon(_arg1:PlayScreen, _arg2:int){ super(_arg1); this._age = _arg2; redCount = Main.currProgress.redCount; greenCount = Main.currProgress.greenCount; blueCount = Main.currProgress.blueCount; assignAnimations(); this.spriteHeight = standAnim[0].height; DragonGraphics.drawSprite(graphics, standAnim[0], 0, 0); if (((redCount + blueCount) + greenCount) == 0){ this.transform.colorTransform = new ColorTransform(0.25, 0.25, 0.25); } else { updateColor(); }; this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); } public function get footRect():Rectangle{ if (_footrect == null){ switch (age){ case AGE_HATCHLING: _footrect = new Rectangle((centerX - 2), bottom, 4, 1); break; case AGE_ADOLESCENT: _footrect = new Rectangle((x + 15), bottom, 10, 1); break; case AGE_ADULT: default: _footrect = new Rectangle((x + 21), bottom, 13, 1); break; }; }; return (_footrect); } public function get activeBreath():int{ return (_activeBreath); } private function updateMomentum():void{ if (((leftDown) && (!(rightDown)))){ _facingRight = false; if (momentum > 0){ momentum = (momentum - 5); } else { if (momentum > -(runMomentum)){ momentum--; }; }; } else { if (((rightDown) && (!(leftDown)))){ _facingRight = true; if (momentum < 0){ momentum = (momentum + 5); } else { if (momentum < runMomentum){ momentum++; }; }; } else { if (momentum > 0){ momentum = (momentum - 5); if (momentum < 0){ momentum = 0; }; } else { if (momentum < 0){ momentum = (momentum + 5); if (momentum > 0){ momentum = 0; }; }; }; }; }; } override public function destroy():void{ super.destroy(); stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp); biting = false; breathing = false; momentum = 0; } private function describeBreath(_arg1:Event):void{ var _local2:String; var _local3:String; switch (activeBreath){ case BREATH_FIRE: _local2 = "Fire Breath"; _local3 = Text.JOURNAL_FIREBREATH_TEXT; break; case BREATH_GROWTH: _local2 = "Plant Growth Breath"; _local3 = Text.JOURNAL_GROWTHBREATH_TEXT; break; case BREATH_HEALING: _local2 = "Healing Breath"; _local3 = Text.JOURNAL_HEALBREATH_TEXT; break; }; Main.pushScreen(new BookScreen((Main.currScreen as PlayScreen), _local2, _local3)); Sounds.MUSIC_BREATH.play(); } private function land():void{ if (age == AGE_ADULT){ myScreen.shake(); myScreen.stompHumans(centerX, bottom); Sounds.THUD.play(); }; } override protected function collidesAt(_arg1:int, _arg2:int):Boolean{ return (((((myScreen.collisionAt((centerX + _arg1), (bottom + _arg2))) || (myScreen.collisionAt(((centerX - 5) + _arg1), (bottom + _arg2))))) || (myScreen.collisionAt(((centerX + 5) + _arg1), (bottom + _arg2))))); } public function get age():int{ return (_age); } private function updatePosition(_arg1:int):void{ var _local2:int; if (momentum > 0){ if (momentum < jogMomentum){ _local2 = 2; } else { if (momentum < runMomentum){ _local2 = 3; } else { _local2 = 4; }; }; } else { if (momentum < 0){ if (momentum > -(jogMomentum)){ _local2 = -2; } else { if (momentum > -(runMomentum)){ _local2 = -3; } else { _local2 = -4; }; }; }; }; if (!tryWalk(_local2)){ momentum = 0; }; if (age == AGE_ADULT){ applyAdultGravity(); } else { applyGravity(); }; if (onGround()){ doubleJumpUsed = false; }; if (((jumpingDown) && (((!(inSupporter())) || (onGround()))))){ jumpingDown = false; }; } private function updateColor():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:ColorTransform; if (((redCount + greenCount) + blueCount) > 0){ _local1 = 0; if (redCount > 0){ _local1 = ((Math.min(redCount, MAX_COLOR) / MAX_COLOR) + 0.25); }; _local2 = 0; if (greenCount > 0){ _local2 = ((Math.min(greenCount, MAX_COLOR) / MAX_COLOR) + 0.25); }; _local3 = 0; if (blueCount > 0){ _local3 = ((Math.min(blueCount, MAX_COLOR) / MAX_COLOR) + 0.25); }; _local4 = new ColorTransform(_local1, _local2, _local3); this.transform.colorTransform = _local4; }; } private function startBite():void{ biting = true; } private function inSupporter():Boolean{ return (supportedAt(0, -1)); } private function updateBreath(_arg1:int):void{ if (activeBreath != -1){ showBreathOverlay(activeBreath); } else { switch (_arg1){ case BREATH_FIRE: if (fireCount == 4){ activateBreath(BREATH_FIRE); showBreathOverlay(_arg1, describeBreath); Main.currProgress.breathWeapon = BREATH_FIRE; return; }; break; case BREATH_GROWTH: if (plantCount == 4){ activateBreath(BREATH_GROWTH); showBreathOverlay(_arg1, describeBreath); Main.currProgress.breathWeapon = BREATH_GROWTH; return; }; break; case BREATH_HEALING: if (healCount == 4){ activateBreath(BREATH_HEALING); showBreathOverlay(_arg1, describeBreath); Main.currProgress.breathWeapon = BREATH_HEALING; return; }; break; }; showBreathOverlay(_arg1); }; } private function onAddedToStage(_arg1:Event):void{ this.removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage); stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp); this.activateBreath(Main.currProgress.breathWeapon); } override protected function supportedAt(_arg1:int, _arg2:int):Boolean{ return (((((myScreen.supportAt((centerX + _arg1), (bottom + _arg2))) || (myScreen.supportAt(((centerX - 5) + _arg1), (bottom + _arg2))))) || (myScreen.supportAt(((centerX + 5) + _arg1), (bottom + _arg2))))); } private function tryEat():void{ var _local1:Rectangle; switch (age){ case AGE_HATCHLING: if (facingRight){ _local1 = new Rectangle((x + 33), (y + 9), 8, 12); } else { _local1 = new Rectangle(x, (y + 9), 8, 12); }; break; case AGE_ADOLESCENT: if (facingRight){ _local1 = new Rectangle((x + 31), (y + 16), 9, 22); } else { _local1 = new Rectangle(x, (y + 16), 9, 22); }; break; case AGE_ADULT: if (facingRight){ _local1 = new Rectangle((x + 42), (y + 33), 13, 22); } else { _local1 = new Rectangle(x, (y + 33), 13, 22); }; break; }; var _local2:Edible = myScreen.getFoodAt(_local1); if (_local2){ _local2.becomeEaten(); switch (_local2.effect){ case FoodObject.EFFECT_RED: Sounds.GULP.play(); redCount++; Main.currProgress.redCount++; updateColor(); break; case FoodObject.EFFECT_GREEN: Sounds.GULP.play(); greenCount++; Main.currProgress.greenCount++; updateColor(); break; case FoodObject.EFFECT_BLUE: Sounds.GULP.play(); blueCount++; Main.currProgress.blueCount++; updateColor(); break; case FoodObject.EFFECT_FIRE: Sounds.CHEW.play(); fireCount++; updateBreath(BREATH_FIRE); break; case FoodObject.EFFECT_HEAL: Sounds.CHEW.play(); healCount++; updateBreath(BREATH_HEALING); break; case FoodObject.EFFECT_PLANT: Sounds.CHEW.play(); plantCount++; updateBreath(BREATH_GROWTH); break; }; }; } private function testLanding():void{ if (onGround()){ if (falling){ land(); }; falling = false; } else { falling = true; }; } override protected function getGroundLevelAt(_arg1:int, _arg2:int):int{ return (Math.min(Math.min(myScreen.findGroundBelow((centerX + _arg1), (bottom + _arg2)), myScreen.findGroundBelow(((centerX + _arg1) - 5), (bottom + _arg2))), myScreen.findGroundBelow(((centerX + _arg1) + 5), (bottom + _arg2)))); } override protected function getGroundLevel():int{ return (Math.min(Math.min(myScreen.findGroundBelow(centerX, bottom, jumpingDown), myScreen.findGroundBelow((centerX - 5), bottom, jumpingDown)), myScreen.findGroundBelow((centerX + 5), bottom, jumpingDown))); } public function activateBreath(_arg1:int):void{ var _local2:SpriteAnimation; var _local3:int; if (_arg1 == -1){ return; }; _activeBreath = _arg1; switch (_arg1){ case BREATH_FIRE: _local2 = Sprites.PARTS_FIREBREATH; break; case BREATH_HEALING: _local2 = Sprites.PARTS_HEALING; break; case BREATH_GROWTH: _local2 = Sprites.PARTS_GROWTH; break; }; if (age == AGE_ADOLESCENT){ _local3 = 15; } else { _local3 = 25; }; breathParticles = new ParticleSystem(_local2, null, ParticleSystem.BEHAVIOR_BREATH, myScreen, _local3); myScreen.addChild(breathParticles); SaveData.unlockBreath(_arg1); } private function onKeyUp(_arg1:KeyboardEvent):void{ switch (_arg1.keyCode){ case Keyboard.RIGHT: rightDown = false; break; case Keyboard.LEFT: leftDown = false; break; case Keyboard.DOWN: downDown = false; break; case 67: if (activeBreath != -1){ Sounds.stopBreath(); }; breathing = false; break; case 90: case 89: zDown = false; break; }; } override protected function getCeilingLevel():int{ return (Math.max(Math.max(myScreen.findCeilingAbove(centerX, (bottom - 1)), myScreen.findCeilingAbove((centerX - 5), (bottom - 1))), myScreen.findCeilingAbove((centerX + 5), (bottom - 1)))); } protected function applyAdultGravity():void{ var _local1:int = getGroundLevel(); var _local2:int = getCeilingLevel(); if ((((bottom < _local1)) || ((yVelocity < 0)))){ bottom = (bottom + yVelocity); if (!(((yVelocity > 0)) && (zDown))){ yVelocity = (yVelocity + GRAVITY); }; if (bottom < (_local2 + 1)){ bottom = (_local2 + 1); yVelocity = 0; } else { if (bottom > _local1){ bottom = _local1; yVelocity = 0; }; }; }; } private function tryStartJump():void{ if (onGround()){ this.yVelocity = -7; } else { if (((!((age == AGE_HATCHLING))) && (!(doubleJumpUsed)))){ if (age != AGE_ADULT){ doubleJumpUsed = true; }; this.yVelocity = -7; }; }; } private function assignAnimations():void{ switch (age){ case AGE_HATCHLING: standAnim = Sprites.HATCHLING_STAND; walkAnim = Sprites.HATCHLING_WALK; jumpAnim = Sprites.HATCHLING_JUMP; biteAnim = Sprites.HATCHLING_BITE; break; case AGE_ADOLESCENT: standAnim = Sprites.ADOLESCENT_STAND; walkAnim = Sprites.ADOLESCENT_WALK; jumpAnim = Sprites.ADOLESCENT_JUMP; biteAnim = Sprites.ADOLESCENT_BITE; break; case AGE_ADULT: standAnim = Sprites.ADULT_STAND; walkAnim = Sprites.ADULT_WALK; jumpAnim = Sprites.ADULT_JUMP; biteAnim = Sprites.ADULT_BITE; break; }; currAnim = standAnim; } private function onKeyDown(_arg1:KeyboardEvent):void{ switch (_arg1.keyCode){ case Keyboard.RIGHT: rightDown = true; break; case Keyboard.LEFT: leftDown = true; break; case Keyboard.DOWN: downDown = true; break; case Keyboard.BACKSPACE: trace((((("Dragon at (" + centerX) + ", ") + y) + ")")); break; case 90: case 89: if (!zDown){ if (downDown){ tryJumpDown(); } else { tryStartJump(); }; }; zDown = true; break; case 88: startBite(); breathing = false; break; case 67: if (!breathing){ if (activeBreath == -1){ Sounds.DRAGONWHEEZE.play(); } else { Sounds.startBreath(); }; }; breathing = true; break; }; } override public function step(_arg1:int):void{ updateMomentum(); updatePosition(_arg1); updateAnimation(_arg1); testLanding(); if (breathParticles){ if (breathing){ addBreath(); addBreath(); addBreath(); addBreath(); }; breathParticles.step(_arg1); }; } private function updateAnimation(_arg1:int):void{ if (biting){ if (currAnim != biteAnim){ this.currAnim = biteAnim; this.animFrame = 0; } else { if ((_arg1 % 4) == 0){ animFrame++; if (animFrame == 3){ tryEat(); }; if (animFrame == currAnim.length){ biting = false; updateAnimation(_arg1); return; }; }; }; } else { if (!onGround()){ this.currAnim = jumpAnim; this.animFrame = 0; } else { if (momentum == 0){ this.currAnim = standAnim; this.animFrame = 0; } else { this.currAnim = walkAnim; if ((((Math.abs(momentum) >= jogMomentum)) && (((_arg1 % 4) == 0)))){ this.animFrame++; if ((((age == AGE_ADULT)) && ((((animFrame == 4)) || ((animFrame == 2)))))){ Sounds.THUD.play(); }; } else { if ((((Math.abs(momentum) < jogMomentum)) && (((_arg1 % 8) == 0)))){ this.animFrame++; if ((((age == AGE_ADULT)) && ((((animFrame == 4)) || ((animFrame == 2)))))){ Sounds.THUD.play(); }; }; }; if (animFrame >= currAnim.length){ animFrame = 0; }; }; }; }; this.graphics.clear(); DragonGraphics.drawSprite(graphics, currAnim[animFrame], 0, 0, !(facingRight)); } private function addBreath():void{ var _local1:int; var _local2:int; var _local3:Rectangle; var _local4:Array; var _local5:Breathable; if (((!((activeBreath == -1))) && (breathParticles))){ if (age == AGE_ADOLESCENT){ _local2 = 15; } else { _local2 = 18; }; if (facingRight){ if (age == AGE_ADOLESCENT){ _local1 = 37; _local3 = new Rectangle((_local1 + x), (_local2 + y), 24, 24); } else { _local1 = 51; _local3 = new Rectangle((_local1 + x), (_local2 + y), 36, 36); }; } else { if (age == AGE_ADOLESCENT){ _local1 = 3; _local3 = new Rectangle(((_local1 + x) - 24), (_local2 + y), 24, 24); } else { _local1 = 3; _local3 = new Rectangle(((_local1 + x) - 36), (_local2 + y), 36, 36); }; }; breathParticles.createParticle(new Rectangle((x + _local1), (y + _local2), 1, 1), !(facingRight)); _local4 = myScreen.getBreathablesAt(_local3); for each (_local5 in _local4) { _local5.takeBreath(activeBreath); }; }; } private function tryJumpDown():void{ if (((supportedAt(0, 0)) && ((getGroundLevel() == bottom)))){ jumpingDown = true; y++; momentum = 0; }; } private function showBreathOverlay(_arg1:int, _arg2:Function=null):void{ var _local3:BreathStatus; switch (_arg1){ case BREATH_FIRE: _local3 = new BreathStatus(Sprites.ICON_FLAME.bitmapData, fireCount); break; case BREATH_GROWTH: _local3 = new BreathStatus(Sprites.ICON_LEAF.bitmapData, plantCount); break; case BREATH_HEALING: _local3 = new BreathStatus(Sprites.ICON_HEALING.bitmapData, healCount); break; }; if (_arg2 != null){ _local3.addEventListener(Event.COMPLETE, _arg2); }; myScreen.showOverlay(_local3); } public function deactivate():void{ stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp); momentum = 0; biting = false; leftDown = false; rightDown = false; breathing = false; Sounds.stopBreath(); } } }//package WorldObjects
Section 218
//Edible (WorldObjects.Edible) package WorldObjects { public interface Edible { function get effect():int; function get eaten():Boolean; function becomeEaten():void; } }//package WorldObjects
Section 219
//ElderDragon (WorldObjects.ElderDragon) package WorldObjects { import Screens.*; import flash.display.*; import flash.geom.*; import Resources.*; public class ElderDragon extends WorldObject { private var HP:int;// = 15 private var approving:Boolean; private var seqStep:int;// = 0 private var currSeq:int; private var seqFrame:int;// = 0 private var tailBitmap:Bitmap; private var nextSeq:int;// = -1 private var breathParticles:ParticleSystem; private var headBitmap:Bitmap; private var targetPickup:Pickup; private var aggro:Boolean; private static const SEQ_RETURNTAIL:int = 6; private static const SEQ_APPROVAL:int = 7; private static const SEQ_TAILSTAB:int = 9; private static const SEQ_DEATH:int = 12; private static const SEQ_FLICKDROP:int = 4; private static const SEQ_RETURNDROP:int = 5; private static const SEQ_IDLETAIL:int = 1; private static const SEQ_GETDROP:int = 3; private static const SEQ_BREATHE:int = 11; private static const SEQ_DISAPPROVAL:int = 8; private static const SEQ_WAIT:int = 0; private static const SEQ_BITE:int = 10; private static const SEQ_IDLEHEAD:int = 2; public function ElderDragon(_arg1:PlayScreen){ super(_arg1); headBitmap = new Bitmap(); headBitmap.x = 50; headBitmap.y = 0; this.addChild(headBitmap); tailBitmap = new Bitmap(); tailBitmap.x = 55; tailBitmap.y = 75; this.addChild(tailBitmap); headBitmap.bitmapData = Sprites.ELDER_HEAD[0]; tailBitmap.bitmapData = Sprites.ELDER_TAIL[0]; if (Main.currProgress.title == Progress.TITLE_SCOURGE){ aggro = true; }; trace(Main.currProgress.breathWeapon); breathParticles = new ParticleSystem(Sprites.PARTS_FIREBREATH, null, ParticleSystem.BEHAVIOR_BREATH, _arg1, 50); _arg1.addChild(breathParticles); updateColor(); } private function stepIdleHead():void{ headBitmap.bitmapData = Sprites.ELDER_HEAD_NOD[seqFrame]; seqFrame++; if (seqFrame > Sprites.ELDER_HEAD_NOD.length){ headBitmap.bitmapData = Sprites.ELDER_HEAD[0]; seqFrame = 0; if (nextSeq != -1){ currSeq = nextSeq; nextSeq = -1; } else { currSeq = SEQ_WAIT; }; }; } public function getArrowed():void{ if ((((HP > 0)) && (((HP % 3) == 0)))){ Sounds.PAIN.play(); }; HP--; aggro = true; if ((((((HP <= 0)) && (!((nextSeq == SEQ_DEATH))))) && (!((currSeq == SEQ_DEATH))))){ nextSeq = SEQ_DEATH; }; } private function addBreath():void{ var _local1:Rectangle = new Rectangle((x + 25), (y + 26), 50, 50); breathParticles.createParticle(new Rectangle(((x + headBitmap.x) + 22), ((y + headBitmap.y) + 26), 1, 1), true); breathParticles.createParticle(new Rectangle(((x + headBitmap.x) + 22), ((y + headBitmap.y) + 26), 1, 1), true); breathParticles.createParticle(new Rectangle(((x + headBitmap.x) + 22), ((y + headBitmap.y) + 26), 1, 1), true); breathParticles.createParticle(new Rectangle(((x + headBitmap.x) + 22), ((y + headBitmap.y) + 26), 1, 1), true); breathParticles.createParticle(new Rectangle(((x + headBitmap.x) + 22), ((y + headBitmap.y) + 26), 1, 1), true); breathParticles.createParticle(new Rectangle(((x + headBitmap.x) + 22), ((y + headBitmap.y) + 26), 1, 1), true); breathParticles.createParticle(new Rectangle(((x + headBitmap.x) + 22), ((y + headBitmap.y) + 26), 1, 1), true); breathParticles.createParticle(new Rectangle(((x + headBitmap.x) + 22), ((y + headBitmap.y) + 26), 1, 1), true); } private function stepBite():void{ if (seqStep == 0){ if (seqFrame == 1){ headBitmap.bitmapData = Sprites.ELDER_HEAD_BITE[1]; }; seqFrame++; if (seqFrame >= 20){ seqStep++; seqFrame = 0; }; } else { if (seqStep == 1){ headBitmap.bitmapData = Sprites.ELDER_HEAD_BITE[(seqFrame + 1)]; seqFrame++; if (seqFrame >= (Sprites.ELDER_HEAD_BITE.length - 1)){ seqFrame = 0; seqStep++; Sounds.CHOMP.play(); if (headBitmap.hitTestObject(myScreen.hero)){ myScreen.hero.getHit(); }; }; } else { seqFrame++; if (seqFrame >= 10){ seqStep = 0; seqFrame = 0; headBitmap.bitmapData = Sprites.ELDER_HEAD[0]; if (nextSeq != -1){ currSeq = nextSeq; nextSeq = -1; } else { currSeq = SEQ_WAIT; }; }; }; }; } override public function step(_arg1:int):void{ switch (currSeq){ case SEQ_WAIT: stepWait(); break; case SEQ_IDLETAIL: if ((_arg1 % 4) == 0){ stepIdleTail(); }; break; case SEQ_IDLEHEAD: if ((_arg1 % 4) == 0){ stepIdleHead(); }; break; case SEQ_GETDROP: stepGetDrop(); break; case SEQ_RETURNDROP: stepReturnDrop(); break; case SEQ_RETURNTAIL: stepReturnTail(); break; case SEQ_APPROVAL: stepApproval(); break; case SEQ_FLICKDROP: stepFlickDrop(); break; case SEQ_DISAPPROVAL: stepDisapproval(); break; case SEQ_TAILSTAB: stepTailStab(); break; case SEQ_BITE: stepBite(); break; case SEQ_BREATHE: stepBreathe(); break; case SEQ_DEATH: stepDeath(); break; }; breathParticles.step(_arg1); } private function stepDeath():void{ if ((((seqStep == 0)) || ((seqStep == 2)))){ if (seqFrame == 0){ headBitmap.bitmapData = Sprites.ELDER_HEAD_DEATH[1]; }; seqFrame++; if (seqFrame >= 10){ seqFrame = 0; seqStep++; }; } else { if ((((seqStep == 1)) || ((seqStep == 3)))){ if (seqFrame == 0){ headBitmap.bitmapData = Sprites.ELDER_HEAD_DEATH[0]; }; seqFrame++; if (seqFrame >= 10){ seqFrame = 0; seqStep++; }; } else { if ((((((seqStep == 4)) || ((seqStep == 5)))) || ((seqStep == 6)))){ if (seqFrame == 0){ headBitmap.bitmapData = Sprites.ELDER_HEAD_DEATH[(seqStep - 3)]; if (seqStep == 4){ Sounds.DEATH.play(); }; }; seqFrame++; if (seqFrame >= 5){ seqFrame = 0; seqStep++; }; } else { if (seqStep == 7){ seqFrame++; if (seqFrame >= 30){ seqStep++; }; } else { if (myScreen.hero.dead){ Main.pushScreen(new BookScreen(myScreen, "Stalemate", Text.JOURNAL_STALEMATE_TEXT, new EndScreen(false, false))); } else { Main.pushScreen(new BookScreen(myScreen, "Slaying the Dragon", Text.JOURNAL_DRAGONSLAYER_TEXT, new EndScreen(true, false))); }; Sounds.MUSIC_HEROEND.play(); }; }; }; }; } private function stepReturnTail():void{ if (tailBitmap.x < 55){ tailBitmap.x++; }; if (tailBitmap.x > 55){ tailBitmap.x--; }; if (tailBitmap.y < 75){ tailBitmap.y++; }; if (tailBitmap.y > 75){ tailBitmap.y--; }; if ((((tailBitmap.x == 55)) && ((tailBitmap.y == 75)))){ if (approving){ currSeq = SEQ_APPROVAL; } else { currSeq = SEQ_DISAPPROVAL; }; }; } private function stepTailStab():void{ if ((((seqStep == 0)) || ((seqStep == 2)))){ tailBitmap.y--; seqFrame++; if (seqFrame == 8){ seqStep++; seqFrame = 0; }; } else { if ((((seqStep == 1)) || ((seqStep == 3)))){ tailBitmap.y++; seqFrame++; if (seqFrame == 8){ seqStep++; seqFrame = 0; }; } else { if (seqStep == 4){ tailBitmap.x = (tailBitmap.x - 4); if (tailBitmap.hitTestObject(myScreen.hero)){ myScreen.hero.getHit(); seqStep++; } else { if (tailBitmap.x <= 0){ seqStep++; }; }; } else { if (seqStep == 5){ tailBitmap.x = (tailBitmap.x + 4); if (tailBitmap.x >= 55){ seqStep = 0; seqFrame = 0; if (nextSeq != -1){ currSeq = nextSeq; nextSeq = -1; } else { currSeq = SEQ_WAIT; }; }; }; }; }; }; } public function stepBreathe():void{ var _local1:Rectangle; if (seqStep == 0){ if (seqFrame == 1){ headBitmap.bitmapData = Sprites.ELDER_HEAD_BITE[1]; }; seqFrame++; if (seqFrame >= 20){ seqStep++; seqFrame = 0; Sounds.startBreath(); }; } else { if (seqStep == 1){ addBreath(); seqFrame++; if (seqFrame >= 30){ seqStep++; seqFrame = 0; _local1 = new Rectangle((x + 25), (y + 26), 50, 50); if (_local1.intersects(myScreen.hero.getRect(myScreen))){ myScreen.hero.getHit(); }; Sounds.stopBreath(); }; } else { seqStep = 0; seqFrame = 0; headBitmap.bitmapData = Sprites.ELDER_HEAD[0]; if (nextSeq != -1){ currSeq = nextSeq; nextSeq = -1; } else { currSeq = SEQ_WAIT; }; }; }; } public function get dead():Boolean{ return ((HP <= 0)); } private function stepDisapproval():void{ if (seqFrame < 3){ headBitmap.bitmapData = Sprites.ELDER_HEAD_ROAR[seqFrame]; } else { if (seqFrame == 3){ Sounds.ROAR.play(); } else { if (seqFrame > 45){ headBitmap.bitmapData = Sprites.ELDER_HEAD_ROAR[(seqFrame - 43)]; }; }; }; seqFrame++; if (seqFrame > (Sprites.ELDER_HEAD_ROAR.length + 43)){ seqFrame = 0; headBitmap.bitmapData = Sprites.ELDER_HEAD[0]; currSeq = -1; if (nextSeq != -1){ currSeq = nextSeq; nextSeq = -1; } else { currSeq = SEQ_WAIT; }; }; } private function stepWait():void{ var _local1:int; var _local2:Number; seqFrame++; if (aggro){ _local1 = 10; } else { _local1 = 30; }; if (seqFrame >= _local1){ seqFrame = 0; seqStep = 0; if (nextSeq != -1){ currSeq = nextSeq; nextSeq = -1; } else { _local2 = Math.random(); if (aggro){ if (Main.currProgress.breathWeapon == Dragon.BREATH_FIRE){ if (_local2 < 0.1){ currSeq = SEQ_WAIT; } else { if (_local2 < 0.4){ currSeq = SEQ_TAILSTAB; } else { if (_local2 < 0.7){ currSeq = SEQ_BREATHE; } else { if (_local2 < 0.9){ currSeq = SEQ_BITE; } else { if (_local2 < 0.95){ currSeq = SEQ_IDLETAIL; } else { currSeq = SEQ_IDLEHEAD; }; }; }; }; }; } else { if (_local2 < 0.1){ currSeq = SEQ_WAIT; } else { if (_local2 < 0.55){ currSeq = SEQ_TAILSTAB; } else { if (_local2 < 0.9){ currSeq = SEQ_BITE; } else { if (_local2 < 0.95){ currSeq = SEQ_IDLETAIL; } else { currSeq = SEQ_IDLEHEAD; }; }; }; }; }; } else { if (_local2 < 0.6){ currSeq = SEQ_WAIT; } else { if (_local2 < 0.8){ currSeq = SEQ_IDLETAIL; } else { currSeq = SEQ_IDLEHEAD; }; }; }; }; }; } private function updateColor():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:ColorTransform; if (((Main.currProgress.redCount + Main.currProgress.greenCount) + Main.currProgress.blueCount) > 0){ _local1 = 0; if (Main.currProgress.redCount > 0){ _local1 = ((Math.min(Main.currProgress.redCount, Dragon.MAX_COLOR) / Dragon.MAX_COLOR) + 0.25); }; _local2 = 0; if (Main.currProgress.greenCount > 0){ _local2 = ((Math.min(Main.currProgress.greenCount, Dragon.MAX_COLOR) / Dragon.MAX_COLOR) + 0.25); }; _local3 = 0; if (Main.currProgress.blueCount > 0){ _local3 = ((Math.min(Main.currProgress.blueCount, Dragon.MAX_COLOR) / Dragon.MAX_COLOR) + 0.25); }; _local4 = new ColorTransform(_local1, _local2, _local3); this.transform.colorTransform = _local4; }; } private function stepReturnDrop():void{ if (tailBitmap.x < 130){ tailBitmap.x++; }; if (tailBitmap.x > 130){ tailBitmap.x--; }; if (tailBitmap.y < 75){ tailBitmap.y++; }; if (tailBitmap.y > 75){ tailBitmap.y--; }; targetPickup.x = ((tailBitmap.x + x) + (targetPickup.width / 2)); targetPickup.y = ((tailBitmap.y + y) + 8); if ((((tailBitmap.x == 130)) && ((tailBitmap.y == 75)))){ myScreen.removeChild(targetPickup); targetPickup = null; currSeq = SEQ_RETURNTAIL; }; } private function stepFlickDrop():void{ var _local1:int; var _local2:int; if (seqStep == 0){ _local1 = (x + tailBitmap.x); _local2 = ((y + tailBitmap.y) + 8); if (_local1 < targetPickup.centerX){ tailBitmap.x++; }; if (_local1 > targetPickup.centerX){ tailBitmap.x--; }; if (_local2 < targetPickup.bottom){ tailBitmap.y++; }; if (_local2 > targetPickup.bottom){ tailBitmap.y--; }; if ((((_local1 == targetPickup.centerX)) && ((_local2 == targetPickup.bottom)))){ seqStep = 1; targetPickup.getFlicked(); targetPickup = null; }; } else { if (seqStep == 1){ tailBitmap.y = (tailBitmap.y - 2); seqFrame++; if (seqFrame >= 2){ seqStep = 2; seqFrame = 0; }; } else { if (seqStep == 2){ tailBitmap.y = (tailBitmap.y + 2); seqFrame++; if (seqFrame >= 2){ seqStep = 0; seqFrame = 0; currSeq = SEQ_RETURNTAIL; }; }; }; }; } private function stepIdleTail():void{ if (seqStep == 0){ tailBitmap.y--; } else { if (seqStep == 2){ tailBitmap.y++; }; }; seqFrame++; if (seqFrame >= 3){ seqStep++; seqFrame = 0; if (seqStep >= 4){ seqStep = 0; if (nextSeq != -1){ currSeq = nextSeq; nextSeq = -1; } else { currSeq = SEQ_WAIT; }; }; }; } private function stepApproval():void{ headBitmap.bitmapData = Sprites.ELDER_HEAD_NOD[seqFrame]; seqFrame++; if (seqFrame >= Sprites.ELDER_HEAD_NOD.length){ seqFrame = 0; seqStep++; if (seqStep >= 4){ headBitmap.bitmapData = Sprites.ELDER_HEAD[0]; currSeq = -1; if ((((Main.currProgress.title == Progress.TITLE_GUARDIAN)) || ((Main.currProgress.title == Progress.TITLE_WATCHER)))){ Main.pushScreen(new BookScreen(myScreen, "Friendship", Text.JOURNAL_FRIENDSHIP_TEXT, new EndScreen(true, true))); } else { Main.pushScreen(new BookScreen(myScreen, "Service", Text.JOURNAL_SERVITUDE_TEXT, new EndScreen(true, true))); }; Sounds.MUSIC_HEROEND.play(); }; }; } public function examineDrop(_arg1:Pickup):void{ if (((((!(aggro)) && ((_arg1.x >= this.x)))) && ((_arg1.x <= this.getRect(myScreen).right)))){ if ((((Main.currProgress.behavior == Progress.BEHAVIOR_FERTILE)) || ((Main.currProgress.behavior == Progress.BEHAVIOR_WILD)))){ if (_arg1.type == Pickup.TYPE_FLOWER){ targetPickup = _arg1; nextSeq = SEQ_GETDROP; approving = true; } else { if (_arg1.type == Pickup.TYPE_CHEST){ targetPickup = _arg1; nextSeq = SEQ_FLICKDROP; }; }; } else { if (_arg1.type == Pickup.TYPE_CHEST){ targetPickup = _arg1; nextSeq = SEQ_GETDROP; approving = true; } else { if (_arg1.type == Pickup.TYPE_FLOWER){ targetPickup = _arg1; nextSeq = SEQ_FLICKDROP; }; }; }; }; } public function arrowHits(_arg1:Arrow):Boolean{ if (!_arg1.hitTestObject(this)){ return (false); }; if (!_arg1.hitTestObject(headBitmap)){ return (false); }; return (headBitmap.bitmapData.hitTest(new Point((x + headBitmap.x), (y + headBitmap.y)), 0, new Point((_arg1.x + 3), _arg1.y))); } private function stepGetDrop():void{ var _local1:int = (x + tailBitmap.x); var _local2:int = ((y + tailBitmap.y) + 8); if (_local1 < targetPickup.centerX){ tailBitmap.x++; }; if (_local1 > targetPickup.centerX){ tailBitmap.x--; }; if (_local2 < targetPickup.y){ tailBitmap.y++; }; if (_local2 > targetPickup.y){ tailBitmap.y--; }; if ((((_local1 == targetPickup.centerX)) && ((_local2 == targetPickup.y)))){ currSeq = SEQ_RETURNDROP; }; } } }//package WorldObjects
Section 220
//FoodObject (WorldObjects.FoodObject) package WorldObjects { import Screens.*; import flash.events.*; import flash.geom.*; import Util.*; public class FoodObject extends WorldObject implements Edible { protected var _eaten:Boolean;// = false private var animation:SpriteAnimation; private var _effect:int; private var behavior:int; private var part:SpriteAnimation; private var spawnRegion:Rectangle; protected var animFrame:int;// = 0 public static const EFFECT_RED:int = 0; public static const EFFECT_FIRE:int = 3; public static const EFFECT_BLUE:int = 2; public static const EFFECT_GREEN:int = 1; public static const EFFECT_HEAL:int = 4; public static const EFFECT_PLANT:int = 5; public function FoodObject(_arg1:SpriteAnimation, _arg2:SpriteAnimation, _arg3:int, _arg4:PlayScreen, _arg5:Rectangle){ super(_arg4); _effect = _arg3; this.part = _arg2; this.spawnRegion = _arg5; animation = _arg1; this.spriteHeight = animation[0].height; DragonGraphics.drawSprite(graphics, animation[0], 0, 0); if (_arg3 == EFFECT_PLANT){ behavior = ParticleSystem.BEHAVIOR_DRIFTDOWN; } else { behavior = ParticleSystem.BEHAVIOR_RISE; }; this.addEventListener(Event.ADDED, onAdded); } public function get eaten():Boolean{ return (_eaten); } public function becomeEaten():void{ _eaten = true; this.graphics.clear(); pSystems[0].stopCreation(); } override public function step(_arg1:int):void{ updateParticles(_arg1); if (((((!(eaten)) && ((animation.length > 1)))) && (((_arg1 % 4) == 0)))){ stepAnimation(); }; if (((eaten) && ((((pSystems.length == 0)) || ((pSystems[0].numParticles == 0)))))){ myScreen.removeWorldObject(this); }; } public function get effect():int{ return (_effect); } private function onAdded(_arg1:Event):void{ this.removeEventListener(Event.ADDED, onAdded); addParticles(part, spawnRegion, behavior); } private function stepAnimation():void{ animFrame++; if (animFrame >= animation.length){ animFrame = 0; }; graphics.clear(); DragonGraphics.drawSprite(graphics, animation[animFrame], 0, 0, !(facingRight)); } } }//package WorldObjects
Section 221
//Hero (WorldObjects.Hero) package WorldObjects { import Screens.*; import flash.events.*; import flash.geom.*; import Util.*; import Resources.*; import flash.ui.*; public class Hero extends WorldObject { private var zDown:Boolean; private var hp:int;// = 3 private var leftDown:Boolean; private var rightDown:Boolean; private var downDown:Boolean; private var cDown:Boolean; private var _currPickup:int;// = -1 public static const EVENT_PICKUP:String = "PICKUP"; private static const MAX_HP:int = 3; public static const EVENT_DROP:String = "PICKUP"; public function Hero(_arg1:PlayScreen){ super(_arg1); this.spriteHeight = 12; redraw(); this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); } private function onKeyDown(_arg1:KeyboardEvent):void{ switch (_arg1.keyCode){ case Keyboard.RIGHT: rightDown = true; break; case Keyboard.LEFT: leftDown = true; break; case Keyboard.DOWN: downDown = true; break; case Keyboard.BACKSPACE: trace((((("Hero at (" + centerX) + ", ") + y) + ")")); break; case 90: case 89: if (!zDown){ tryStartJump(); }; zDown = true; break; case 88: tryPickup(); break; case 67: if (!cDown){ tryFire(); }; cDown = true; break; }; } override public function step(_arg1:int):void{ updatePosition(_arg1); } public function get currPickup():int{ return (_currPickup); } private function tryFire():void{ if (currPickup == Pickup.TYPE_BOW){ if (facingRight){ myScreen.addWorldObject(new Arrow(false, myScreen), (x + 5), (y + 6)); } else { myScreen.addWorldObject(new Arrow(true, myScreen), (x - 4), (y + 6)); }; Sounds.BOWSHOT.play(); }; } private function tryPickup():void{ var _local2:Pickup; if (currPickup != -1){ _local2 = new Pickup(currPickup, myScreen); _currPickup = -1; dispatchEvent(new Event(EVENT_DROP)); }; var _local1:Pickup = myScreen.getPickup(new Rectangle(x, y, 5, 12)); if (_local1){ _currPickup = _local1.type; myScreen.removeWorldObject(_local1); dispatchEvent(new Event(EVENT_PICKUP)); }; if (_local2){ myScreen.addWorldObject(_local2, x, (y + (12 - _local2.height))); if (myScreen.elder){ myScreen.elder.examineDrop(_local2); }; }; } private function updatePosition(_arg1:int):void{ if (hp > 0){ if (((leftDown) && (!(rightDown)))){ _facingRight = false; tryWalk(-2); } else { if (((((!(leftDown)) && (rightDown))) && (_arg1))){ _facingRight = true; tryWalk(2); }; }; if ((((Main.currProgress.home == Progress.HOME_CASTLE)) && ((x >= 1575)))){ x = 1575; } else { if ((((Main.currProgress.home == Progress.HOME_MOUNTAIN)) && ((x >= 3110)))){ x = 3110; }; }; }; applyGravity(); } public function getHit():void{ if (hp > 0){ Sounds.GRUNT.play(); }; hp--; redraw(); if (((dead) && (!(myScreen.elder.dead)))){ Main.pushScreen(new BookScreen(myScreen, "Fall of the Hero", Text.JOURNAL_HERODEATH_TEXT, new EndScreen(false, true))); Sounds.MUSIC_HEROEND.play(); }; } private function onAddedToStage(_arg1:Event):void{ this.removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage); stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp); } public function get dead():Boolean{ return ((hp <= 0)); } private function tryStartJump():void{ if (((onGround()) && ((hp > 0)))){ this.yVelocity = -7; }; } private function redraw():void{ graphics.clear(); if (hp > 0){ DragonGraphics.drawSprite(graphics, Sprites.HERO_EMPTY[(MAX_HP - hp)], 0, 0); } else { DragonGraphics.drawSprite(graphics, Sprites.HERO_DEAD[0], -3, 9); }; } override public function destroy():void{ super.destroy(); stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp); } private function onKeyUp(_arg1:KeyboardEvent):void{ switch (_arg1.keyCode){ case Keyboard.RIGHT: rightDown = false; break; case Keyboard.LEFT: leftDown = false; break; case Keyboard.DOWN: downDown = false; break; case 90: case 89: zDown = false; break; case 67: cDown = false; break; }; } } }//package WorldObjects
Section 222
//HomeSign (WorldObjects.HomeSign) package WorldObjects { import Screens.*; import flash.display.*; import flash.geom.*; import Util.*; import Resources.*; public class HomeSign extends WorldObject { private var done:Boolean; private var counter:int; private var callback:Function; private var monoicon:BitmapData; private static const MAX_COUNTER:int = 150; public function HomeSign(_arg1:PlayScreen, _arg2:Function){ super(_arg1); this.callback = _arg2; redraw(); } private function redraw():void{ if (monoicon == null){ monoicon = Sprites.ICON_HOUSE.bitmapData.clone(); monoicon.applyFilter(Sprites.ICON_HOUSE.bitmapData, Sprites.ICON_HOUSE.bitmapData.rect, new Point(0, 0), DragonGraphics.MONOCHROME_FILTER); }; graphics.clear(); DragonGraphics.drawSprite(graphics, monoicon, 0, 0); var _local1:int = (Sprites.ICON_HOUSE.height * (counter / MAX_COUNTER)); graphics.beginBitmapFill(Sprites.ICON_HOUSE.bitmapData); graphics.drawRect(0, (Sprites.ICON_HOUSE.height - _local1), width, _local1); } override public function step(_arg1:int):void{ if (done){ return; }; if (((((myScreen.dragon) && ((myScreen.dragon.centerX > this.x)))) && ((myScreen.dragon.centerX < (this.x + this.width))))){ alpha = 1; if (counter < MAX_COUNTER){ counter++; } else { done = true; this.visible = false; callback(); }; } else { if (counter > 0){ counter--; }; alpha = (((50 - Math.abs((this.centerX - myScreen.dragon.centerX))) + (this.width / 2)) / 50); }; redraw(); } } }//package WorldObjects
Section 223
//HumanNPC (WorldObjects.HumanNPC) package WorldObjects { import Screens.*; import flash.geom.*; import Util.*; import Resources.*; public class HumanNPC extends WorldObject implements Edible, Breathable { private var hurtAnim:SpriteAnimation; private var aliveAnim:SpriteAnimation; private var deadAnim:SpriteAnimation; private var zombieAnim:SpriteAnimation; private var burnedAnim:SpriteAnimation; private var currBehavior:int; private var breathHP:int;// = 30 private var currState:int; public static const BEHAVIOR_ENEMYSOLDIER:int = 2; private static const STARTING_HP:int = 30; public static const STATE_UNDEAD:int = 1; public static const STATE_DEAD:int = 3; public static const STATE_EATEN:int = 4; public static const BEHAVIOR_NORMAL:int = 0; public static const BEHAVIOR_ZOMBIE:int = 1; public static const BEHAVIOR_SOLDIER:int = 2; public static const STATE_BURNED:int = 2; public static const STATE_HURT:int = 5; public static const STATE_ALIVE:int = 0; public function HumanNPC(_arg1:SpriteAnimation, _arg2:SpriteAnimation, _arg3:SpriteAnimation, _arg4:SpriteAnimation, _arg5:SpriteAnimation, _arg6:int, _arg7:PlayScreen, _arg8:int=0){ super(_arg7); this.aliveAnim = _arg1; this.deadAnim = _arg2; this.zombieAnim = _arg3; this.burnedAnim = _arg4; this.hurtAnim = _arg5; this.spriteHeight = _arg1[0].height; currState = _arg6; currBehavior = _arg8; redraw(); } public function get eaten():Boolean{ return ((currState == STATE_EATEN)); } override public function step(_arg1:int):void{ updateParticles(_arg1); if ((((currState == STATE_ALIVE)) || ((currState == STATE_UNDEAD)))){ move(_arg1); }; if ((((pSystems.length > 0)) && ((pSystems[0].numParticles == 0)))){ myScreen.removeChild(pSystems[0]); pSystems.splice(0, 1); }; if (((eaten) && ((((pSystems.length == 0)) || ((pSystems[0].numParticles == 0)))))){ myScreen.removeWorldObject(this); }; } public function takeBreath(_arg1:int):void{ switch (_arg1){ case Dragon.BREATH_FIRE: if ((((((((((currState == STATE_ALIVE)) || ((currState == STATE_UNDEAD)))) || ((currState == STATE_EATEN)))) || ((currState == STATE_HURT)))) || ((currState == STATE_DEAD)))){ breathHP--; if (breathHP <= 0){ Sounds.FOOM.play(); if ((((currState == STATE_ALIVE)) || ((currState == STATE_HURT)))){ Main.currProgress.humansKilled++; Main.currProgress.humansBurned++; if (aliveAnim == Sprites.NPC_SOLDIER){ Main.currProgress.guardsKilled++; }; }; currState = STATE_BURNED; redraw(); breathHP = STARTING_HP; this.addParticles(Sprites.PARTS_FIREFOOD, this.getRect(this), ParticleSystem.BEHAVIOR_BURST, 5); }; }; break; case Dragon.BREATH_HEALING: if ((((currState == STATE_DEAD)) || ((currState == STATE_BURNED)))){ breathHP--; if (breathHP <= 0){ Sounds.CHOIR.play(); Sounds.MOAN.play(); currState = STATE_UNDEAD; currBehavior = BEHAVIOR_ZOMBIE; redraw(); breathHP = STARTING_HP; this.addParticles(Sprites.PARTS_HEALFOOD, this.getRect(this), ParticleSystem.BEHAVIOR_BURST, 5); Main.currProgress.humansRaised++; }; } else { if (currState == STATE_HURT){ breathHP--; if (breathHP <= 0){ Sounds.CHOIR.play(); currState = STATE_ALIVE; redraw(); breathHP = STARTING_HP; this.addParticles(Sprites.PARTS_HEALFOOD, this.getRect(this), ParticleSystem.BEHAVIOR_BURST, 5); Main.currProgress.humansHealed++; }; }; }; break; }; } private function move(_arg1:int):void{ var _local2 = 4; if ((((((currBehavior == BEHAVIOR_ZOMBIE)) && (!((myScreen.dragon == null))))) && ((Math.abs((this.centerX - myScreen.dragon.centerX)) >= 40)))){ _facingRight = (myScreen.dragon.centerX > this.centerX); _local2 = 2; } else { if (Math.random() < 0.05){ this._facingRight = !(this.facingRight); }; }; if ((_arg1 % _local2) == 0){ if (_facingRight){ if (!tryWalk(1)){ _facingRight = false; }; } else { if (!tryWalk(-1)){ _facingRight = true; }; }; }; applyGravity(); } public function getStomped():void{ if ((((((currState == STATE_ALIVE)) || ((currState == STATE_UNDEAD)))) || ((currState == STATE_HURT)))){ bloodSpray(); Sounds.SQUISH.play(); if ((((currState == STATE_ALIVE)) || ((currState == STATE_HURT)))){ Main.currProgress.humansKilled++; if (aliveAnim == Sprites.NPC_SOLDIER){ Main.currProgress.guardsKilled++; }; }; currState = STATE_DEAD; redraw(); }; } private function bloodSpray():void{ if ((((((currState == STATE_ALIVE)) || ((currState == STATE_DEAD)))) || ((currState == STATE_HURT)))){ this.addParticles(Sprites.PARTS_RED, new Rectangle(0, 0, this.width, this.height), ParticleSystem.BEHAVIOR_BURST, 5); }; if (currState == STATE_UNDEAD){ this.addParticles(Sprites.PARTS_GREEN, new Rectangle(0, 0, this.width, this.height), ParticleSystem.BEHAVIOR_BURST, 5); }; } public function get effect():int{ return (-1); } private function redraw():void{ graphics.clear(); switch (currState){ case STATE_ALIVE: DragonGraphics.drawSprite(graphics, aliveAnim[0], 0, 0); break; case STATE_DEAD: DragonGraphics.drawSprite(graphics, deadAnim[0], 0, (aliveAnim[0].height - deadAnim[0].height)); break; case STATE_BURNED: DragonGraphics.drawSprite(graphics, burnedAnim[0], 0, (aliveAnim[0].height - burnedAnim[0].height)); break; case STATE_UNDEAD: DragonGraphics.drawSprite(graphics, zombieAnim[0], 0, 0); break; case STATE_HURT: DragonGraphics.drawSprite(graphics, hurtAnim[0], 0, (aliveAnim[0].height - hurtAnim[0].height)); break; }; } public function becomeEaten():void{ bloodSpray(); Sounds.CHOMP.play(); if ((((currState == STATE_ALIVE)) || ((currState == STATE_HURT)))){ Main.currProgress.humansKilled++; if (aliveAnim == Sprites.NPC_SOLDIER){ Main.currProgress.guardsKilled++; }; }; currState = STATE_EATEN; redraw(); } public function get breathSpent():Boolean{ return ((currState == STATE_EATEN)); } } }//package WorldObjects
Section 224
//Particle (WorldObjects.Particle) package WorldObjects { import flash.display.*; public class Particle { public var reversed:Boolean;// = false public var sprite:BitmapData; public var x:Number; public var y:Number; public var age:int;// = 0 public function Particle(_arg1:BitmapData, _arg2:Number, _arg3:Number){ this.sprite = _arg1; this.x = _arg2; this.y = _arg3; } } }//package WorldObjects
Section 225
//ParticleSystem (WorldObjects.ParticleSystem) package WorldObjects { import Screens.*; import flash.display.*; import flash.geom.*; import Util.*; public class ParticleSystem extends WorldObject { private var minX:int; private var minY:int; private var TTL:int; private var spawnRegion:Rectangle; private var behavior:int; private var creatingNew:Boolean;// = true private var particleSprites:SpriteAnimation; private var particles:Array; private var maxX:int; private var maxY:int; public static const BEHAVIOR_FALL:int = 4; private static const DRAW_MARGIN:int = 16; public static const BEHAVIOR_BURST:int = 6; public static const BEHAVIOR_BREATH:int = 1; public static const BEHAVIOR_SHRAPNEL:int = 3; public static const BEHAVIOR_DRIFT:int = 2; public static const BEHAVIOR_RISE:int = 0; public static const BEHAVIOR_DRIFTDOWN:int = 5; public function ParticleSystem(_arg1:SpriteAnimation, _arg2:Rectangle, _arg3:int, _arg4:PlayScreen, _arg5:int=30){ var _local6:int; var _local7:int; particles = new Array(); super(_arg4); this.particleSprites = _arg1; this.behavior = _arg3; this.spawnRegion = _arg2; this.TTL = _arg5; if (_arg3 == BEHAVIOR_SHRAPNEL){ _local6 = 0; while (_local6 < 10) { createParticle(); _local6++; }; creatingNew = false; }; if (_arg3 == BEHAVIOR_BURST){ _local7 = ((_arg2.width * _arg2.height) / 4); _local6 = 0; while (_local6 < _local7) { createParticle(); _local6++; }; creatingNew = false; }; } public function stopCreation():void{ creatingNew = false; } public function get numParticles():int{ return (particles.length); } override public function step(_arg1:int):void{ if (creatingNew){ if (behavior == BEHAVIOR_BREATH){ } else { if (behavior == BEHAVIOR_FALL){ createParticle(); createParticle(); } else { if (behavior == BEHAVIOR_DRIFT){ if ((_arg1 % 32) == 0){ createParticle(); }; } else { if (behavior == BEHAVIOR_DRIFTDOWN){ if ((_arg1 % 16) == 0){ createParticle(); }; } else { if (((((_arg1 % 4) == 0)) && (creatingNew))){ createParticle(); }; }; }; }; }; }; moveParticles(_arg1); redraw(); } private function moveParticles(_arg1:int):void{ var _local2:int; var _local3:Particle; var _local4:int; var _local5:int; var _local6:int; if (particles.length > 0){ minX = particles[0].x; maxX = particles[0].x; minY = particles[0].y; maxY = particles[0].y; }; for each (_local3 in particles) { _local3.age++; _local2 = DragonMath.randint(1, 3); switch (behavior){ case BEHAVIOR_BREATH: if (_local3.reversed){ _local3.x--; } else { _local3.x++; }; if (_local2 != 3){ _local3.y++; }; if (_local2 == 2){ _local3.y++; }; break; case BEHAVIOR_RISE: if ((_arg1 % 2) == 0){ _local3.y--; }; break; case BEHAVIOR_DRIFT: if ((_arg1 % 6) == 0){ _local3.y--; if (_local2 == 2){ _local3.x++; } else { if (_local2 == 3){ _local3.x--; }; }; }; break; case BEHAVIOR_DRIFTDOWN: if ((_arg1 % 6) == 0){ _local3.y++; if (_local2 == 2){ _local3.x++; } else { if (_local2 == 3){ _local3.x--; }; }; }; break; case BEHAVIOR_SHRAPNEL: _local3.y++; _local3.x = (_local3.x + (((_local3.x - spawnRegion.left) / spawnRegion.width) - 0.5)); if (_local3.age == (TTL - 1)){ alpha = 0.5; }; break; case BEHAVIOR_BURST: _local5 = (_local3.x - (spawnRegion.left + (spawnRegion.width / 2))); _local6 = (_local3.y - (spawnRegion.top + (spawnRegion.height / 2))); _local3.x = (_local3.x + ((2 * _local5) / Math.sqrt(((_local5 * _local5) + (_local6 * _local6))))); _local3.y = (_local3.y + ((2 * _local6) / Math.sqrt(((_local5 * _local5) + (_local6 * _local6))))); if (_local3.age == (TTL - 5)){ alpha = 0.5; }; break; case BEHAVIOR_FALL: _local3.y++; if (Math.random() < 0.01){ if (Math.random() < 0.5){ _local3.x++; } else { _local3.x--; }; }; break; }; if (_local3.x < minX){ minX = _local3.x; }; if (_local3.x > maxX){ maxX = _local3.x; }; if (_local3.y < minY){ minY = _local3.y; }; if (_local3.y > maxY){ maxY = _local3.y; }; }; _local4 = 0; while (_local4 < particles.length) { if (particles[_local4].age > TTL){ if (((!((behavior == BEHAVIOR_BREATH))) || ((Math.random() < 0.5)))){ particles.splice(_local4, 1); _local4--; }; }; _local4++; }; } public function createParticle(_arg1:Rectangle=null, _arg2:Boolean=false):void{ if (_arg1 == null){ _arg1 = spawnRegion; }; var _local3:int = DragonMath.randint(_arg1.left, _arg1.right); var _local4:int = DragonMath.randint(_arg1.top, _arg1.bottom); var _local5:int = DragonMath.randint(0, (particleSprites.length - 1)); var _local6:Particle = new Particle(particleSprites[_local5], _local3, _local4); _local6.reversed = _arg2; particles.push(_local6); } public function get isDead():Boolean{ return ((((particles.length == 0)) && (!(creatingNew)))); } private function redraw():void{ var _local1:int; var _local2:int; var _local3:BitmapData; var _local4:BitmapData; var _local5:Particle; graphics.clear(); if (particles.length > 0){ _local1 = (((maxX - minX) + DRAW_MARGIN) + DRAW_MARGIN); _local2 = (((maxY - minY) + DRAW_MARGIN) + DRAW_MARGIN); _local3 = new BitmapData(_local1, _local2, true, 0); _local4 = new BitmapData(_local1, _local2, true, 0); for each (_local5 in particles) { if (!_local5.reversed){ _local3.copyPixels(_local5.sprite, new Rectangle(0, 0, _local5.sprite.width, _local5.sprite.height), new Point(((int(_local5.x) - minX) + DRAW_MARGIN), ((int(_local5.y) - minY) + DRAW_MARGIN)), null, null, true); } else { _local4.copyPixels(_local5.sprite, new Rectangle(0, 0, _local5.sprite.width, _local5.sprite.height), new Point((((_local1 - DRAW_MARGIN) + minX) - int(_local5.x)), ((int(_local5.y) - minY) + DRAW_MARGIN)), null, null, true); }; }; DragonGraphics.drawSprite(graphics, _local3, (minX - DRAW_MARGIN), (minY - DRAW_MARGIN)); DragonGraphics.drawSprite(graphics, _local4, (minX - DRAW_MARGIN), (minY - DRAW_MARGIN), true); }; } } }//package WorldObjects
Section 226
//Pickup (WorldObjects.Pickup) package WorldObjects { import Screens.*; import flash.display.*; import Util.*; import Resources.*; public class Pickup extends WorldObject { private var flicked:Boolean; private var _type:int; public static const TYPE_FLOWER:int = 1; public static const TYPE_BOW:int = 0; public static const TYPE_CHEST:int = 2; public function Pickup(_arg1:int, _arg2:PlayScreen){ super(_arg2); this._type = _arg1; draw(); } public function getFlicked():void{ flicked = true; } public function get type():int{ return (_type); } private function draw():void{ var _local1:BitmapData; switch (type){ case TYPE_BOW: _local1 = Sprites.ITEM_BOW[0]; break; case TYPE_CHEST: _local1 = Sprites.ITEM_CHEST[0]; break; case TYPE_FLOWER: _local1 = Sprites.ITEM_FLOWER[0]; break; }; spriteHeight = _local1.height; DragonGraphics.drawSprite(graphics, _local1, 0, 0); } override public function step(_arg1:int):void{ applyGravity(); if (flicked){ x = (x - 8); if (((myScreen.hero) && ((x < (myScreen.hero.x - 200))))){ myScreen.removeWorldObject(this); }; }; } } }//package WorldObjects
Section 227
//SpawnPrison (WorldObjects.SpawnPrison) package WorldObjects { import Screens.*; import flash.events.*; import flash.geom.*; import Util.*; import flash.media.*; public class SpawnPrison extends WorldObject { private var parts:SpriteAnimation; private var progress:int;// = 0 private var rockingFrame:int;// = 0 private var anim:SpriteAnimation; private var sound:Sound; private var fading:Boolean;// = false private var rocking:Boolean;// = false public function SpawnPrison(_arg1:SpriteAnimation, _arg2:SpriteAnimation, _arg3:Sound, _arg4:PlayScreen){ this.anim = _arg1; this.parts = _arg2; this.sound = _arg3; super(_arg4); redraw(); this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); } private function onKeyDown(_arg1:KeyboardEvent):void{ if (!rocking){ progress++; if (progress >= anim.length){ hatch(); } else { redraw(); rocking = true; rockingFrame = 0; sound.play(); }; }; } private function onAddedToStage(_arg1:Event):void{ stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); } override public function step(_arg1:int):void{ updateParticles(_arg1); if (rocking){ switch (rockingFrame){ case 0: x--; break; case 1: x++; break; case 2: x++; break; case 3: x--; rocking = false; break; }; rockingFrame++; }; if (fading){ alpha = (alpha - 0.1); if ((((((alpha <= 0)) && (pSystems[0]))) && ((pSystems[0].numParticles == 0)))){ myScreen.removeWorldObject(this); }; }; } private function redraw():void{ graphics.clear(); DragonGraphics.drawSprite(graphics, anim[progress], 0, 0); } private function hatch():void{ if (!fading){ this.addParticles(parts, new Rectangle(4, 4, (this.width - 8), (this.height - 8)), ParticleSystem.BEHAVIOR_SHRAPNEL); this.dispatchEvent(new Event(Event.OPEN)); fading = true; }; } } }//package WorldObjects
Section 228
//TutorialSign (WorldObjects.TutorialSign) package WorldObjects { import Screens.*; import flash.display.*; import Util.*; public class TutorialSign extends WorldObject { public function TutorialSign(_arg1:BitmapData, _arg2:PlayScreen){ super(_arg2); DragonGraphics.drawSprite(graphics, _arg1, 0, 0); this.alpha = 0; } private function setAlpha():void{ var _local1:WorldObject; var _local2:int; if (myScreen.dragon){ _local1 = myScreen.dragon; } else { if (myScreen.hero){ _local1 = myScreen.hero; }; }; if (_local1){ _local2 = Math.abs((this.centerX - _local1.centerX)); if (_local2 > 50){ alpha = 0; } else { if (_local2 < 10){ alpha = 1; } else { alpha = ((50 - _local2) / 40); }; }; } else { alpha = 0; }; } override public function step(_arg1:int):void{ setAlpha(); } } }//package WorldObjects
Section 229
//WorldObject (WorldObjects.WorldObject) package WorldObjects { import Screens.*; import flash.display.*; import flash.geom.*; import Util.*; public class WorldObject extends Sprite { protected var spriteHeight:int;// = 0 protected var pSystems:Array; protected var _facingRight:Boolean;// = true protected var yVelocity:int;// = 0 protected var myScreen:PlayScreen; protected static const GRAVITY:int = 1; public function WorldObject(_arg1:PlayScreen){ pSystems = new Array(); super(); this.myScreen = _arg1; } protected function applyGravity():void{ var _local1:int = getGroundLevel(); var _local2:int = getCeilingLevel(); if ((((bottom < _local1)) || ((yVelocity < 0)))){ bottom = (bottom + yVelocity); yVelocity = (yVelocity + GRAVITY); if (bottom < (_local2 + 1)){ bottom = (_local2 + 2); yVelocity = 0; } else { if (bottom > _local1){ bottom = _local1; yVelocity = 0; }; }; }; } protected function supportedAt(_arg1:int, _arg2:int):Boolean{ return (myScreen.supportAt((centerX + _arg1), (bottom + _arg2))); } protected function getGroundLevel():int{ return (myScreen.findGroundBelow(centerX, bottom)); } protected function collidesAt(_arg1:int, _arg2:int):Boolean{ return (myScreen.collisionAt((centerX + _arg1), (bottom + _arg2))); } protected function onGround():Boolean{ return ((this.bottom == getGroundLevel())); } private function walkLevelOrDown(_arg1:int):void{ x = (x + _arg1); var _local2:int = getGroundLevel(); if ((_local2 - bottom) <= Math.abs(_arg1)){ bottom = _local2; }; } protected function addParticles(_arg1:SpriteAnimation, _arg2:Rectangle, _arg3:int, _arg4:int=30):void{ var _local5:ParticleSystem = new ParticleSystem(_arg1, _arg2, _arg3, myScreen, _arg4); _local5.x = this.x; _local5.y = this.y; myScreen.addChild(_local5); pSystems.push(_local5); } public function set bottom(_arg1:int):void{ this.y = (_arg1 - spriteHeight); } protected function getGroundLevelAt(_arg1:int, _arg2:int):int{ return (myScreen.findGroundBelow((centerX + _arg1), (bottom + _arg2))); } public function step(_arg1:int):void{ } public function get facingRight():Boolean{ return (_facingRight); } protected function updateParticles(_arg1:int):void{ var _local3:ParticleSystem; var _local2:Array = new Array(); for each (_local3 in pSystems) { _local3.x = this.x; _local3.y = this.y; _local3.step(_arg1); if (_local3.isDead){ _local3.parent.removeChild(_local3); _local2.push(_local3); }; }; for each (_local3 in _local2) { pSystems.splice(pSystems.indexOf(_local3), 1); }; } public function get centerX():int{ return ((this.x + (this.width / 2))); } public function get bottom():int{ return ((this.y + spriteHeight)); } private function tryWalkUpSlope(_arg1:int):Boolean{ var _local2:int; if (_arg1 > 0){ _local2 = getGroundLevelAt(_arg1, (-(_arg1) - 1)); if ((((_local2 >= ((bottom - _arg1) - 1))) && ((_local2 < bottom)))){ x = (x + _arg1); bottom = _local2; return (true); }; return (false); } else { if (_arg1 < 0){ _local2 = getGroundLevelAt(_arg1, (_arg1 - 1)); if ((((_local2 >= ((bottom + _arg1) - 1))) && ((_local2 < bottom)))){ x = (x + _arg1); bottom = _local2; return (true); }; return (false); }; }; return (false); } public function destroy():void{ var _local1:ParticleSystem; for each (_local1 in pSystems) { myScreen.removeChild(_local1); }; } protected function tryWalk(_arg1:int):Boolean{ var _local2:int; if (this.supportedAt(_arg1, -1)){ if (tryWalkUpSlope(_arg1)){ return (true); }; if (!this.collidesAt(_arg1, -1)){ walkLevelOrDown(_arg1); return (true); }; } else { if (!this.collidesAt(_arg1, -1)){ walkLevelOrDown(_arg1); return (true); }; return (tryWalkUpSlope(_arg1)); }; return (false); } protected function getCeilingLevel():int{ return (myScreen.findCeilingAbove(centerX, (bottom - 1))); } } }//package WorldObjects
Section 230
//Main (Main) package { import Screens.*; import flash.events.*; import flash.display.*; import flash.geom.*; import Util.*; import flash.utils.*; import flash.ui.*; public class Main extends Sprite { private var introTimer:Timer; private var drawSurface:Sprite; private var currFrame:int;// = 0 private var introAnim:MovieClip; private static const FPS:int = 30; public static const UNSCALED_HEIGHT:int = 80; public static const UNSCALED_WIDTH:int = 160; private static var drawMatrix:Matrix; public static var theMain:Main; private static var currFPS:int; private static var agIntroClass:Class = Main_agIntroClass; private static var screenStack:Array = new Array(); public static var currProgress:Progress; public function Main():void{ theMain = this; if (stage){ init(); } else { addEventListener(Event.ADDED_TO_STAGE, init); }; } private function onKeyDown(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.ESCAPE){ while (!((currScreen is TitleScreen))) { popScreen(); }; }; if (((((((_arg1.shiftKey) && (_arg1.ctrlKey))) && (_arg1.altKey))) && ((_arg1.keyCode == 67)))){ SaveData.clear(); }; } private function step(_arg1:TimerEvent):void{ var _local2:BitmapData; currFPS++; if (currScreen != null){ currScreen.step(currFrame); }; currFrame++; if (currFrame >= FPS){ currFrame = 0; }; if ((currScreen is PlayScreen)){ _local2 = new BitmapData((UNSCALED_WIDTH * 2), (UNSCALED_HEIGHT * 2), false, 0); _local2.draw(drawSurface, drawMatrix); graphics.clear(); DragonGraphics.drawSprite(graphics, _local2, 0, 0); }; } private function introDone(_arg1:Event):void{ var _local4:String; var _local5:String; var _local6:int; introTimer.removeEventListener(TimerEvent.TIMER, introDone); introTimer.stop(); introTimer = null; Loader(introAnim.getChildAt(0)).unload(); this.removeChild(introAnim); introAnim = null; stage.quality = StageQuality.LOW; drawSurface = new Sprite(); drawSurface.visible = false; this.addChild(drawSurface); drawMatrix = new Matrix(); drawMatrix.scale(2, 2); var _local2:Array = new Array(); var _local3:Boolean; if (_local2.length > 0){ _local3 = false; _local4 = stage.loaderInfo.url.split("/")[2]; for (_local5 in _local2) { _local6 = _local4.toLowerCase().indexOf(_local2[_local5]); if ((((_local6 > -1)) && ((_local6 == (_local4.length - _local2[_local5].length))))){ _local3 = true; break; }; }; }; if (!_local3){ this.alpha = 0; }; currProgress = new Progress(); pushScreen(new TitleScreen()); stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); } private function init(_arg1:Event=null):void{ removeEventListener(Event.ADDED_TO_STAGE, init); var _local2:Sprite = new Sprite(); _local2.graphics.beginFill(0); _local2.graphics.drawRect(0, 0, (UNSCALED_WIDTH * 2), (UNSCALED_HEIGHT * 2)); _local2.graphics.endFill(); this.mask = _local2; this.addChild(_local2); this.scaleX = 2; this.scaleY = 2; introAnim = new agIntroClass(); var _local3:Number = (Main.UNSCALED_WIDTH / introAnim.width); introAnim.scaleX = (_local3 * 2); introAnim.scaleY = (_local3 * 2); introAnim.y = (Main.UNSCALED_HEIGHT - (introAnim.height * _local3)); this.addChild(introAnim); introTimer = new Timer(6000, 1); introTimer.addEventListener(TimerEvent.TIMER, introDone); introTimer.start(); var _local4:Timer = new Timer((1000 / FPS), 0); _local4.addEventListener(TimerEvent.TIMER, step); _local4.start(); } public static function pushScreen(_arg1:Screen):void{ if ((_arg1 is PlayScreen)){ theMain.drawSurface.addChild(_arg1); } else { theMain.addChild(_arg1); }; if (currScreen){ if ((currScreen is PlayScreen)){ theMain.drawSurface.removeChild(currScreen); } else { theMain.removeChild(currScreen); }; }; screenStack.push(_arg1); _arg1.focusRect = false; theMain.stage.focus = _arg1; } public static function popScreen():void{ if (screenStack.length > 1){ if ((screenStack[(screenStack.length - 2)] is PlayScreen)){ theMain.drawSurface.addChild(screenStack[(screenStack.length - 2)]); } else { theMain.addChild(screenStack[(screenStack.length - 2)]); }; screenStack[(screenStack.length - 2)].refresh(); }; if ((((currScreen is PlayScreen)) && (!((PlayScreen(currScreen).dragon == null))))){ PlayScreen(currScreen).dragon.destroy(); }; if ((currScreen is PlayScreen)){ theMain.drawSurface.removeChild(currScreen); } else { theMain.removeChild(currScreen); }; screenStack.pop(); if (currScreen){ currScreen.focusRect = false; theMain.stage.focus = currScreen; }; } public static function get currScreen():Screen{ return (screenStack[(screenStack.length - 1)]); } } }//package
Section 231
//Main_agIntroClass (Main_agIntroClass) package { import mx.core.*; import flash.utils.*; public class Main_agIntroClass extends MovieClipLoaderAsset { public var dataClass:Class; private static var bytes:ByteArray = null; public function Main_agIntroClass(){ dataClass = Main_agIntroClass_dataClass; super(); initialWidth = (11000 / 20); initialHeight = (8000 / 20); } override public function get movieClipData():ByteArray{ if (bytes == null){ bytes = ByteArray(new dataClass()); }; return (bytes); } } }//package
Section 232
//Main_agIntroClass_dataClass (Main_agIntroClass_dataClass) package { import mx.core.*; public class Main_agIntroClass_dataClass extends ByteArrayAsset { } }//package
Section 233
//Preloader (Preloader) package { import flash.events.*; import flash.display.*; import flash.net.*; import flash.utils.*; public class Preloader extends MovieClip { private static var ArmorGamesLogoClass:Class = Preloader_ArmorGamesLogoClass; public function Preloader(){ super(); stage.scaleMode = StageScaleMode.NO_SCALE; addEventListener(Event.ENTER_FRAME, checkFrame); var logo:Sprite = new Sprite(); logo.addChild((new ArmorGamesLogoClass() as Bitmap)); logo.buttonMode = true; logo.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://armorgames.com"), "_blank"); }); logo.x = 50; logo.y = 85; this.addChild(logo); this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, checkProgress); drawProgressBar(0); } private function drawProgressBar(_arg1:Number):void{ graphics.clear(); graphics.lineStyle(2, 136); graphics.drawRect(50, 235, (640 - 100), 25); graphics.lineStyle(); graphics.beginFill(51); graphics.drawRect(50, 235, ((640 - 100) * _arg1), 25); graphics.endFill(); } private function checkFrame(_arg1:Event):void{ if (currentFrame == totalFrames){ removeEventListener(Event.ENTER_FRAME, checkFrame); this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, checkProgress); startup(); }; } private function checkProgress(_arg1:ProgressEvent):void{ drawProgressBar((_arg1.bytesLoaded / _arg1.bytesTotal)); } private function startup():void{ graphics.clear(); this.removeChildAt(0); stop(); var _local1:Class = (getDefinitionByName("Main") as Class); addChild((new (_local1) as DisplayObject)); } } }//package
Section 234
//Preloader_ArmorGamesLogoClass (Preloader_ArmorGamesLogoClass) package { import mx.core.*; public class Preloader_ArmorGamesLogoClass extends BitmapAsset { } }//package
Section 235
//Progress (Progress) package { public class Progress { public var humansKilled:int; public var redCount:int; public var greenCount:int; public var humansHealed:int; public var guardsKilled:int; public var blueCount:int; public var behavior:int;// = -1 public var breathWeapon:int;// = -1 public var cropsGrown:int; public var home:int;// = 0 public var buildingsOvergrown:int; public var neutralPlantsGrown:int; public var structuresBurned:int; public var humansBurned:int; public var plantsBurned:int; public var title:int;// = -1 public var humansRaised:int; public static const TITLE_GUARDIAN:int = 1; public static const BEHAVIOR_RECLUSIVE:int = 0; public static const TITLE_WATCHER:int = 3; public static const BEHAVIOR_WILD:int = 3; public static const HOME_CASTLE:int = 0; public static const BEHAVIOR_RAMPAGING:int = 1; public static const TITLE_TYRANT:int = 0; public static const BEHAVIOR_HEALER:int = 6; public static const HOME_MOUNTAIN:int = 1; public static const BEHAVIOR_NECROMANTIC:int = 4; public static const TITLE_SCOURGE:int = 2; public static const BEHAVIOR_FERTILE:int = 5; public static const BEHAVIOR_FIERY:int = 2; public function assignIdentity():void{ if (((humansBurned + structuresBurned) + plantsBurned) > 10){ behavior = BEHAVIOR_FIERY; } else { if ((((cropsGrown > 1)) && ((buildingsOvergrown < 4)))){ behavior = BEHAVIOR_FERTILE; } else { if ((buildingsOvergrown + neutralPlantsGrown) > 6){ behavior = BEHAVIOR_WILD; } else { if (humansRaised > 6){ behavior = BEHAVIOR_NECROMANTIC; } else { if (humansKilled > 6){ behavior = BEHAVIOR_RAMPAGING; } else { if (humansHealed > 2){ behavior = BEHAVIOR_HEALER; } else { behavior = BEHAVIOR_RECLUSIVE; }; }; }; }; }; }; if (home == HOME_CASTLE){ if ((((guardsKilled > ((humansKilled * 0.75) - humansHealed))) || (((humansKilled - humansHealed) <= 1)))){ title = TITLE_GUARDIAN; } else { title = TITLE_TYRANT; }; } else { if (((humansKilled + structuresBurned) + buildingsOvergrown) > 8){ title = TITLE_SCOURGE; } else { title = TITLE_WATCHER; }; }; } public static function getBehaviorName(_arg1:int):String{ switch (_arg1){ case _slot1.BEHAVIOR_FERTILE: return ("Fertile"); case _slot1.BEHAVIOR_FIERY: return ("Fiery"); case _slot1.BEHAVIOR_NECROMANTIC: return ("Necromantic"); case _slot1.BEHAVIOR_RAMPAGING: return ("Rampaging"); case _slot1.BEHAVIOR_RECLUSIVE: return ("Reclusive"); case _slot1.BEHAVIOR_WILD: return ("Wild"); case _slot1.BEHAVIOR_HEALER: return ("Healer"); }; return ("ERROR"); } public static function getTitleName(_arg1:int):String{ switch (_arg1){ case _slot1.TITLE_GUARDIAN: return ("Guardian"); case _slot1.TITLE_TYRANT: return ("Tyrant"); case _slot1.TITLE_WATCHER: return ("Watcher"); case _slot1.TITLE_SCOURGE: return ("Scourge"); }; return ("ERROR"); } } }//package

Library Items

Symbol 1 Bitmap {Preloader_ArmorGamesLogoClass}
Symbol 2 Sound {Resources.Sounds_moan_class} [Resources.Sounds_moan_class]
Symbol 3 Sound {Resources.Sounds_eggcrack_class} [Resources.Sounds_eggcrack_class]
Symbol 4 Sound {Resources.Sounds_music_adolescent_class} [Resources.Sounds_music_adolescent_class]
Symbol 5 Sound {Resources.Sounds_gulp_class} [Resources.Sounds_gulp_class]
Symbol 6 Sound {Resources.Sounds_appear_class} [Resources.Sounds_appear_class]
Symbol 7 Sound {Resources.Sounds_pain_class} [Resources.Sounds_pain_class]
Symbol 8 Sound {Resources.Sounds_music_hatch_class} [Resources.Sounds_music_hatch_class]
Symbol 9 Sound {Resources.Sounds_roar_class} [Resources.Sounds_roar_class]
Symbol 10 Sound {Resources.Sounds_woodbreak_class} [Resources.Sounds_woodbreak_class]
Symbol 11 Sound {Resources.Sounds_music_coloration_class} [Resources.Sounds_music_coloration_class]
Symbol 12 Sound {Resources.Sounds_music_heroend_class} [Resources.Sounds_music_heroend_class]
Symbol 13 Sound {Resources.Sounds_squish_class} [Resources.Sounds_squish_class]
Symbol 14 Sound {Resources.Sounds_death_class} [Resources.Sounds_death_class]
Symbol 15 Sound {Resources.Sounds_chomp_class} [Resources.Sounds_chomp_class]
Symbol 16 Sound {Resources.Sounds_jingle_class} [Resources.Sounds_jingle_class]
Symbol 17 Sound {Resources.Sounds_choir_class} [Resources.Sounds_choir_class]
Symbol 18 Sound {Resources.Sounds_dragonwheeze_class} [Resources.Sounds_dragonwheeze_class]
Symbol 19 Sound {Resources.Sounds_music_herostart_class} [Resources.Sounds_music_herostart_class]
Symbol 20 Sound {Resources.Sounds_thud_class} [Resources.Sounds_thud_class]
Symbol 21 Sound {Resources.Sounds_grunt_class} [Resources.Sounds_grunt_class]
Symbol 22 Sound {Resources.Sounds_bowshot_class} [Resources.Sounds_bowshot_class]
Symbol 23 Sound {Resources.Sounds_ambience_class} [Resources.Sounds_ambience_class]
Symbol 24 Sound {Resources.Sounds_chew_class} [Resources.Sounds_chew_class]
Symbol 25 Sound {Resources.Sounds_foom_class} [Resources.Sounds_foom_class]
Symbol 26 Sound {Resources.Sounds_music_adult_class} [Resources.Sounds_music_adult_class]
Symbol 27 Sound {Resources.Sounds_music_breath_class} [Resources.Sounds_music_breath_class]
Symbol 28 Sound {Resources.Sounds_firebreath_class} [Resources.Sounds_firebreath_class]
Symbol 29 Bitmap {Resources.Sprites_tutorial_CClass}
Symbol 30 Bitmap {Resources.Sprites_part_growthClass}
Symbol 31 Bitmap {Resources.Sprites_npc_townie2_deadClass}
Symbol 32 Bitmap {Resources.Sprites_tutorial_ZZClass}
Symbol 33 Bitmap {Resources.Sprites_elder_tailClass}
Symbol 34 Bitmap {Resources.Sprites_adult_standClass}
Symbol 35 Bitmap {Resources.Sprites_icon_healing_smallClass}
Symbol 36 Bitmap {Resources.Sprites_target_wizardtreeClass}
Symbol 37 Bitmap {Resources.Sprites_target_townhouse_mClass}
Symbol 38 Bitmap {Resources.Sprites_title_eggClass}
Symbol 39 Bitmap {Resources.Sprites_npc_soldier_deadClass}
Symbol 40 Bitmap {Resources.Sprites_part_firebreathClass}
Symbol 41 Bitmap {Resources.Backgrounds_endscreen_bgClass}
Symbol 42 Bitmap {Resources.Sprites_hatchling_walkClass}
Symbol 43 Bitmap {Resources.Sprites_target_tree_sClass}
Symbol 44 Bitmap {Resources.Sprites_adult_biteClass}
Symbol 45 Bitmap {Resources.Sprites_food_healmushroomsClass}
Symbol 46 Bitmap {Resources.Backgrounds_endscreen_dragonClass}
Symbol 47 Bitmap {Resources.Sprites_target_gallowsClass}
Symbol 48 Bitmap {Resources.Sprites_food_plantbushClass}
Symbol 49 Bitmap {Resources.Sprites_title_castleClass}
Symbol 50 Bitmap {Resources.Sprites_part_healingClass}
Symbol 51 Bitmap {Resources.Sprites_npc_townie1_deadClass}
Symbol 52 Bitmap {Resources.Backgrounds_adolescent_collideClass}
Symbol 53 Bitmap {Resources.Sprites_food_firelampClass}
Symbol 54 Bitmap {Resources.Sprites_title_adultdragonClass}
Symbol 55 Bitmap {Resources.Sprites_speechbubble_healClass}
Symbol 56 Bitmap {Resources.Sprites_part_greenClass}
Symbol 57 Bitmap {Resources.Sprites_icon_guardianClass}
Symbol 58 Bitmap {Resources.Sprites_icon_wildClass}
Symbol 59 Bitmap {Resources.Backgrounds_adolescent_bg2Class}
Symbol 60 Bitmap {Resources.Sprites_elder_head_roarClass}
Symbol 61 Bitmap {Resources.Sprites_target_farmhouseClass}
Symbol 62 Bitmap {Resources.Sprites_npc_enemysoldier_deadClass}
Symbol 63 Bitmap {Resources.Backgrounds_adult_bg1Class}
Symbol 64 Bitmap {Resources.Sprites_npc_townie2Class}
Symbol 65 Bitmap {Resources.Backgrounds_hatchling_bg3Class}
Symbol 66 Bitmap {Resources.Sprites_icon_reclusiveClass}
Symbol 67 Bitmap {Resources.Sprites_food_firecandleClass}
Symbol 68 Bitmap {Resources.Backgrounds_endscreen_rampartsClass}
Symbol 69 Bitmap {Resources.Sprites_adolescent_jumpClass}
Symbol 70 Bitmap {Resources.Sprites_icon_leafClass}
Symbol 71 Bitmap {Resources.Sprites_pixelarmorlogoClass}
Symbol 72 Bitmap {Resources.Sprites_target_townhouse_lClass}
Symbol 73 Bitmap {Resources.Sprites_part_redClass}
Symbol 74 Bitmap {Resources.Sprites_icon_scourgeClass}
Symbol 75 Bitmap {Resources.Sprites_part_blueClass}
Symbol 76 Bitmap {Resources.Sprites_icon_healing_behaviorClass}
Symbol 77 Bitmap {Resources.Sprites_part_healfoodClass}
Symbol 78 Bitmap {Resources.Sprites_npc_townie2_zombieClass}
Symbol 79 Bitmap {Resources.Sprites_part_waterClass}
Symbol 80 Bitmap {Resources.Sprites_food_firewoodClass}
Symbol 81 Bitmap {Resources.Sprites_npc_soldier2_hurtClass}
Symbol 82 Bitmap {Resources.Sprites_food_healjarClass}
Symbol 83 Bitmap {Resources.Sprites_target_wizardhayClass}
Symbol 84 Bitmap {Resources.Sprites_npc_farmerClass}
Symbol 85 Bitmap {Resources.Sprites_icon_healingClass}
Symbol 86 Bitmap {Resources.Sprites_elder_head_nodClass}
Symbol 87 Bitmap {Resources.Backgrounds_titlebgClass}
Symbol 88 Bitmap {Resources.Backgrounds_hatchling_bg1Class}
Symbol 89 Bitmap {Resources.Sprites_tutorial_XClass}
Symbol 90 Bitmap {Resources.Backgrounds_endscreen_heroClass}
Symbol 91 Bitmap {Resources.Sprites_part_plantfoodClass}
Symbol 92 Bitmap {Resources.Sprites_target_townhouse_sClass}
Symbol 93 Bitmap {Resources.Sprites_food_planttreeClass}
Symbol 94 Bitmap {Resources.Backgrounds_hatchling_collideClass}
Symbol 95 Bitmap {Resources.Sprites_title_herodollClass}
Symbol 96 Bitmap {Resources.Sprites_cage_breakClass}
Symbol 97 Bitmap {Resources.Sprites_hero_deadClass}
Symbol 98 Bitmap {Resources.Sprites_target_wizardClass}
Symbol 99 Bitmap {Resources.Sprites_adult_jumpClass}
Symbol 100 Bitmap {Resources.Sprites_food_redbugcrawlClass}
Symbol 101 Bitmap {Resources.Sprites_hatchling_jumpClass}
Symbol 102 Bitmap {Resources.Backgrounds_hatchling_fgClass}
Symbol 103 Bitmap {Resources.Sprites_npc_enemysoldierClass}
Symbol 104 Bitmap {Resources.Sprites_hatchling_biteClass}
Symbol 105 Bitmap {Resources.Sprites_part_sickClass}
Symbol 106 Bitmap {Resources.Sprites_item_bowClass}
Symbol 107 Bitmap {Resources.Sprites_arrowClass}
Symbol 108 Bitmap {Resources.Backgrounds_adult_bg3Class}
Symbol 109 Bitmap {Resources.Sprites_npc_farmer_deadClass}
Symbol 110 Bitmap {Resources.Sprites_icon_rampagingClass}
Symbol 111 Bitmap {Resources.Sprites_icon_leaf_smallClass}
Symbol 112 Bitmap {Resources.Backgrounds_hatchling_bg2Class}
Symbol 113 Bitmap {Resources.Sprites_part_shellClass}
Symbol 114 Bitmap {Resources.Sprites_icon_none_smallClass}
Symbol 115 Bitmap {Resources.Sprites_target_deerClass}
Symbol 116 Bitmap {Resources.Sprites_icon_houseClass}
Symbol 117 Bitmap {Resources.Sprites_tutorial_leftrightClass}
Symbol 118 MovieClip {Main_agIntroClass}
Symbol 119 Bitmap {Resources.Sprites_food_plantflowerClass}
Symbol 120 Bitmap {Resources.Sprites_npc_enemysoldier_zombieClass}
Symbol 121 Bitmap {Resources.Backgrounds_adolescent_bg3Class}
Symbol 122 Bitmap {Resources.Sprites_food_greenshootClass}
Symbol 123 Bitmap {Resources.Sprites_food_plantpotClass}
Symbol 124 Bitmap {Resources.Sprites_adult_walkClass}
Symbol 125 Bitmap {Resources.Sprites_npc_townie2_hurtClass}
Symbol 126 Bitmap {Resources.Backgrounds_adolescent_collidehayClass}
Symbol 127 Bitmap {Resources.Sprites_food_bluebugcrawlClass}
Symbol 128 Bitmap {Resources.Sprites_hatchlingClass}
Symbol 129 Bitmap {Resources.Sprites_item_chestClass}
Symbol 130 Bitmap {Resources.Backgrounds_adolescent_fgClass}
Symbol 131 Bitmap {Resources.Sprites_icon_necromanticClass}
Symbol 132 Bitmap {Resources.Sprites_icon_watcherClass}
Symbol 133 Bitmap {Resources.Sprites_npc_soldier1_hurtClass}
Symbol 134 Bitmap {Resources.Sprites_adolescent_walkClass}
Symbol 135 Bitmap {Resources.Sprites_target_brokenbarrelClass}
Symbol 136 Font {Resources.Fonts_unibodyReg}
Symbol 137 Bitmap {Resources.Sprites_npc_townie1Class}
Symbol 138 Bitmap {Resources.Backgrounds_adult_collideClass}
Symbol 139 Bitmap {Resources.Backgrounds_adolescent_collidetreeClass}
Symbol 140 Bitmap {Resources.Sprites_npc_soldierClass}
Symbol 141 Bitmap {Resources.Sprites_elder_head_biteClass}
Symbol 142 Bitmap {Resources.Sprites_food_firetorchClass}
Symbol 143 Bitmap {Resources.Sprites_egg_hatchClass}
Symbol 144 Bitmap {Resources.Sprites_adolescent_biteClass}
Symbol 145 Bitmap {Resources.Sprites_npc_farmer_hurtClass}
Symbol 146 Bitmap {Resources.Sprites_item_flowerClass}
Symbol 147 Bitmap {Resources.Sprites_icon_tyrantClass}
Symbol 148 Bitmap {Resources.Sprites_icon_fertileClass}
Symbol 149 Bitmap {Resources.Sprites_npc_burnedClass}
Symbol 150 Bitmap {Resources.Sprites_elder_headClass}
Symbol 151 Bitmap {Resources.Sprites_icon_fieryClass}
Symbol 152 Bitmap {Resources.Sprites_target_tree_lClass}
Symbol 153 Bitmap {Resources.Sprites_food_healpotionClass}
Symbol 154 Bitmap {Resources.Backgrounds_adult_bg2Class}
Symbol 155 Bitmap {Resources.Sprites_bookmaskClass}
Symbol 156 Bitmap {Resources.Sprites_adolescent_standClass}
Symbol 157 Bitmap {Resources.Sprites_part_firefoodClass}
Symbol 158 Bitmap {Resources.Sprites_npc_townie1_zombieClass}
Symbol 159 Bitmap {Resources.Sprites_part_woodClass}
Symbol 160 Bitmap {Resources.Sprites_food_healgemClass}
Symbol 161 Bitmap {Resources.Sprites_elder_head_deathClass}
Symbol 162 Bitmap {Resources.Sprites_npc_soldier_zombieClass}
Symbol 163 Bitmap {Resources.Sprites_hero_emptyClass}
Symbol 164 Bitmap {Resources.Sprites_npc_farmer_zombieClass}
Symbol 165 Bitmap {Resources.Backgrounds_endscreen_mountainsClass}
Symbol 166 Bitmap {Resources.Sprites_icon_flame_smallClass}
Symbol 167 Bitmap {Resources.Sprites_tutorial_ZClass}
Symbol 168 Bitmap {Resources.Backgrounds_adult_fgClass}
Symbol 169 Bitmap {Resources.Sprites_npc_townie1_hurtClass}
Symbol 170 BinaryData {Main_agIntroClass_dataClass}
Symbol 171 Bitmap {Resources.Sprites_target_journalClass}
Symbol 172 Bitmap {Resources.Sprites_tutorial_downZClass}
Symbol 173 Bitmap {Resources.Sprites_target_tree_mClass}
Symbol 174 Bitmap {Resources.Backgrounds_adolescent_bg1Class}
Symbol 175 Bitmap {Resources.Sprites_icon_flameClass}
Symbol 176 Bitmap {Resources.Sprites_target_vaseClass}
Symbol 177 Bitmap {Resources.Sprites_target_cropClass}
Symbol 178 Font {Resources.Fonts_unibodyIta}

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1458 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 2Symbol 2 as "Resources.Sounds_moan_class"
ExportAssets (56)Timeline Frame 2Symbol 3 as "Resources.Sounds_eggcrack_class"
ExportAssets (56)Timeline Frame 2Symbol 4 as "Resources.Sounds_music_adolescent_class"
ExportAssets (56)Timeline Frame 2Symbol 5 as "Resources.Sounds_gulp_class"
ExportAssets (56)Timeline Frame 2Symbol 6 as "Resources.Sounds_appear_class"
ExportAssets (56)Timeline Frame 2Symbol 7 as "Resources.Sounds_pain_class"
ExportAssets (56)Timeline Frame 2Symbol 8 as "Resources.Sounds_music_hatch_class"
ExportAssets (56)Timeline Frame 2Symbol 9 as "Resources.Sounds_roar_class"
ExportAssets (56)Timeline Frame 2Symbol 10 as "Resources.Sounds_woodbreak_class"
ExportAssets (56)Timeline Frame 2Symbol 11 as "Resources.Sounds_music_coloration_class"
ExportAssets (56)Timeline Frame 2Symbol 12 as "Resources.Sounds_music_heroend_class"
ExportAssets (56)Timeline Frame 2Symbol 13 as "Resources.Sounds_squish_class"
ExportAssets (56)Timeline Frame 2Symbol 14 as "Resources.Sounds_death_class"
ExportAssets (56)Timeline Frame 2Symbol 15 as "Resources.Sounds_chomp_class"
ExportAssets (56)Timeline Frame 2Symbol 16 as "Resources.Sounds_jingle_class"
ExportAssets (56)Timeline Frame 2Symbol 17 as "Resources.Sounds_choir_class"
ExportAssets (56)Timeline Frame 2Symbol 18 as "Resources.Sounds_dragonwheeze_class"
ExportAssets (56)Timeline Frame 2Symbol 19 as "Resources.Sounds_music_herostart_class"
ExportAssets (56)Timeline Frame 2Symbol 20 as "Resources.Sounds_thud_class"
ExportAssets (56)Timeline Frame 2Symbol 21 as "Resources.Sounds_grunt_class"
ExportAssets (56)Timeline Frame 2Symbol 22 as "Resources.Sounds_bowshot_class"
ExportAssets (56)Timeline Frame 2Symbol 23 as "Resources.Sounds_ambience_class"
ExportAssets (56)Timeline Frame 2Symbol 24 as "Resources.Sounds_chew_class"
ExportAssets (56)Timeline Frame 2Symbol 25 as "Resources.Sounds_foom_class"
ExportAssets (56)Timeline Frame 2Symbol 26 as "Resources.Sounds_music_adult_class"
ExportAssets (56)Timeline Frame 2Symbol 27 as "Resources.Sounds_music_breath_class"
ExportAssets (56)Timeline Frame 2Symbol 28 as "Resources.Sounds_firebreath_class"
SerialNumber (41)Timeline Frame 1

Labels

"Preloader"Frame 1
"start"Frame 2




http://swfchan.com/42/205688/info.shtml
Created: 10/10 -2018 04:37:46 Last modified: 10/10 -2018 04:37:46 Server time: 22/12 -2024 03:04:43