Frame 1
_root.count1 = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
setProperty("load.g", _xscale , _root.count1);
Frame 2
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
gotoAndPlay (3);
} else {
gotoAndPlay (1);
}
Frame 3
_root.m.s.setVolume(100);
_root.m.s.start();
gotoAndPlay (4);
Frame 4
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
Instance of Symbol 40 MovieClip "jukebox" in Frame 4
onClipEvent (load) {
function vReset() {
snd.stop();
_root.jukebox.gotoAndPlay(4);
}
snd = new Sound();
vReset();
}
onClipEvent (enterFrame) {
this.stupid = _root.world._x;
this.stoopid = _root.world._y;
if (_root.fader.resetFlag) {
vReset();
}
}
Instance of Symbol 73 MovieClip "tBoard" in Frame 4
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 76 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_root.world.player.hasSeed == true) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 87 MovieClip "bossGage" in Frame 4
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 97 MovieClip "dWindow" in Frame 4
onClipEvent (load) {
function open(port, msg) {
action = "open";
goNext = false;
message = msg;
portrait.gotoAndStop(port);
_root.world.player.actionLock = true;
_root.world.player.stop();
this._visible = true;
this._y = targetY;
this._xscale = 0;
this._yscale = 0;
}
function close() {
_root.world.player.actionLock = false;
if (_root.world.player.pose == "stand") {
_root.world.player.gotoAndStop("stand");
_root.world.player.pose = "stand";
} else {
_root.world.player.prevPose = "bleh";
_root.world.player.pose = "ko";
}
this._visible = false;
this._y = -200;
action = "done";
if (_root.world.endBlock.egStart) {
_root.jukebox.gotoAndPlay(2);
_root.world.endBlock.egStart = false;
}
_root.jukebox.snd.setVolume(100);
goNext = true;
}
action = "none";
goNext = false;
this._visible = false;
targetY = this._y;
this._y = -200;
scaleStep = 10;
}
onClipEvent (enterFrame) {
if (this._visible) {
if (Key.isDown(88)) {
action = "close";
}
}
if (action == "open") {
if (this._xscale < 100) {
this._xscale = this._xscale + scaleStep;
this._yscale = this._yscale + scaleStep;
} else {
action = "none";
}
}
if (action == "close") {
if (0 < this._xscale) {
this._xscale = this._xscale - scaleStep;
this._yscale = this._yscale - scaleStep;
} else {
close();
}
}
}
Instance of Symbol 108 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_parent.world.player.arrows == 0) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 274 MovieClip "world" in Frame 4
onClipEvent (load) {
safeY = 850;
startX = this._x;
startY = this._y;
this._quality = "LOW";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 275 MovieClip "white" in Frame 4
onClipEvent (load) {
this._visible = false;
}
Frame 5
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
Instance of Symbol 320 MovieClip "world" in Frame 5
onClipEvent (load) {
safeY = 1000;
startX = this._x;
startY = this._y;
this._quality = "LOW";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Frame 6
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
Instance of Symbol 357 MovieClip "world" in Frame 6
onClipEvent (load) {
safeY = 850;
startX = this._x;
startY = this._y;
this._quality = "LOW";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Frame 7
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
Instance of Symbol 369 MovieClip "world" in Frame 7
onClipEvent (load) {
safeY = 850;
startX = this._x;
startY = this._y;
this._quality = "LOW";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Frame 8
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
_root.white._visible = true;
Instance of Symbol 385 MovieClip "world" in Frame 8
onClipEvent (load) {
safeY = 850;
startX = this._x;
startY = this._y;
this._quality = "LOW";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Frame 9
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
_root.white._visible = false;
Instance of Symbol 391 MovieClip "world" in Frame 9
onClipEvent (load) {
safeY = 850;
startX = this._x;
startY = this._y;
this._quality = "LOW";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Frame 10
function continueNow() {
_root.jukebox.snd.stop();
gotoAndPlay (3);
}
stop();
Instance of Symbol 434 MovieClip "world" in Frame 10
onClipEvent (load) {
safeY = 850;
startX = this._x;
startY = this._y;
this._quality = "LOW";
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 436 MovieClip in Frame 11
onClipEvent (load) {
_root.white._visible = true;
}
Symbol 40 MovieClip Frame 1
stop();
Symbol 40 MovieClip Frame 2
stop();
Symbol 40 MovieClip Frame 3
stop();
Symbol 44 MovieClip Frame 1
doorFlag = false;
Symbol 44 MovieClip Frame 11
stop();
this._visible = false;
Symbol 44 MovieClip Frame 12
this._visible = true;
Symbol 44 MovieClip Frame 39
_root.nextFrame();
doorFlag = true;
this.gotoAndPlay("warpIn");
_root.white._visible = false;
Symbol 50 Button
on (release) {
getURL ("doneDonate.html");
}
Symbol 58 Button
on (release) {
_root.continueNow();
}
Symbol 60 MovieClip Frame 1
fadeType = "cont";
resetFlag = false;
Symbol 60 MovieClip Frame 11
stop();
this._visible = false;
Symbol 60 MovieClip Frame 12
this._visible = true;
Symbol 60 MovieClip Frame 37
if (fadeType == "cont") {
resetFlag = true;
}
Symbol 60 MovieClip Frame 39
resetFlag = false;
Symbol 60 MovieClip Frame 52
if (fadeType == "cont") {
gotoAndPlay (1);
}
if (fadeType == "game") {
gotoAndPlay (53);
}
Symbol 60 MovieClip Frame 53
stop();
Symbol 64 Button
on (release) {
_quality = "MEDIUM";
loadMovie ("d0805614.swf", _level0);
}
Symbol 95 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 17
gotoAndPlay (2);
Symbol 142 MovieClip Frame 18
stop();
Symbol 142 MovieClip Frame 19
stop();
Symbol 142 MovieClip Frame 20
stop();
Symbol 142 MovieClip Frame 21
shooting = true;
Symbol 142 MovieClip Frame 27
shootArrow();
arrowCount++;
Symbol 142 MovieClip Frame 31
shooting = false;
gotoAndStop (1);
Symbol 149 MovieClip Frame 1
stop();
Symbol 149 MovieClip Frame 19
this._y = _root.world.safeY;
curing = false;
Symbol 149 MovieClip Frame 20
stop();
Symbol 153 MovieClip Frame 1
stop();
Symbol 153 MovieClip Frame 2
stop();
Symbol 153 MovieClip Frame 3
stop();
Symbol 154 MovieClip Frame 1
stop();
Symbol 154 MovieClip Frame 17
gotoAndPlay (2);
Symbol 154 MovieClip Frame 18
stop();
Symbol 154 MovieClip Frame 19
stop();
Symbol 154 MovieClip Frame 20
stop();
Symbol 154 MovieClip Frame 21
shooting = true;
Symbol 154 MovieClip Frame 27
shootArrow();
arrowCount++;
Symbol 154 MovieClip Frame 31
shooting = false;
gotoAndStop (1);
Symbol 163 MovieClip Frame 1
stop();
Symbol 163 MovieClip Frame 10
this._y = _root.world.safeY;
Symbol 166 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 17
gotoAndPlay (2);
Symbol 166 MovieClip Frame 18
stop();
Symbol 166 MovieClip Frame 19
stop();
Symbol 166 MovieClip Frame 20
stop();
Symbol 166 MovieClip Frame 21
shooting = true;
Symbol 166 MovieClip Frame 27
shootArrow();
arrowCount++;
Symbol 166 MovieClip Frame 31
shooting = false;
gotoAndStop (1);
Symbol 172 MovieClip Frame 1
if (_parent.arrows == 0) {
this._visible = false;
} else {
this._visible = true;
}
Symbol 174 MovieClip Frame 1
if (_parent.arrows == 0) {
this._visible = false;
} else {
this._visible = true;
}
Symbol 213 MovieClip Frame 1
stop();
Symbol 213 MovieClip Frame 2
stop();
Symbol 213 MovieClip Frame 3
stop();
Symbol 213 MovieClip Frame 4
stop();
Symbol 213 MovieClip Frame 24
gotoAndPlay (5);
Symbol 213 MovieClip Frame 25
doneAttack = false;
Instance of Symbol 192 MovieClip "attMask" in Symbol 213 MovieClip Frame 27
onClipEvent (load) {
this._visible = false;
}
Symbol 213 MovieClip Frame 30
stop();
doneAttack = true;
Symbol 213 MovieClip Frame 31
stop();
Symbol 213 MovieClip Frame 32
doneShoot = false;
if (0 < this._xscale) {
_parent.arrow1.activateRight();
} else {
_parent.arrow1.activateLeft();
}
Symbol 213 MovieClip Frame 40
stop();
doneShoot = true;
Symbol 213 MovieClip Frame 41
stop();
Symbol 213 MovieClip Frame 50
gotoAndPlay (42);
Symbol 213 MovieClip Frame 51
doneThrow = false;
Symbol 213 MovieClip Frame 54
if (0 < this._xscale) {
_parent.seed.activateRight();
} else {
_parent.seed.activateLeft();
}
Symbol 213 MovieClip Frame 59
stop();
doneThrow = true;
Symbol 223 MovieClip Frame 1
stop();
Symbol 223 MovieClip Frame 20
this._y = _root.world.safeY;
stop();
Symbol 240 MovieClip Frame 1
stop();
active = false;
Symbol 240 MovieClip Frame 2
active = true;
Symbol 240 MovieClip Frame 7
_root.world.player.vVelocity = this.bounceHeight;
Symbol 240 MovieClip Frame 11
gotoAndStop (1);
Symbol 241 MovieClip Frame 1
stop();
active = false;
Symbol 241 MovieClip Frame 2
active = true;
Symbol 241 MovieClip Frame 7
_root.world.player.vVelocity = this.bounceHeight;
Symbol 241 MovieClip Frame 11
gotoAndStop (1);
Symbol 242 MovieClip Frame 1
stop();
active = false;
Symbol 242 MovieClip Frame 2
active = true;
Symbol 242 MovieClip Frame 7
_root.world.player.vVelocity = this.bounceHeight;
Symbol 242 MovieClip Frame 11
gotoAndStop (1);
Symbol 253 MovieClip Frame 1
stop();
active = false;
Symbol 253 MovieClip Frame 2
active = true;
Symbol 253 MovieClip Frame 7
_root.world.player.vVelocity = this.bounceHeight;
Symbol 253 MovieClip Frame 11
gotoAndStop (1);
Instance of Symbol 113 MovieClip "enar3" in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= _root.world.safeY) {
deactivate();
}
}
}
}
Instance of Symbol 142 MovieClip in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar3.activateLeft(this._x, this._y);
} else {
_parent.enar3.activateRight(this._x, this._y);
}
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 149 MovieClip in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 25;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 153 MovieClip in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 113 MovieClip "enar2" in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= _root.world.safeY) {
deactivate();
}
}
}
}
Instance of Symbol 154 MovieClip in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar2.activateLeft(this._x, this._y);
} else {
_parent.enar2.activateRight(this._x, this._y);
}
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 165 MovieClip "seed" in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.hasSeed = false;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 113 MovieClip "enar1" in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= _root.world.safeY) {
deactivate();
}
}
}
}
Instance of Symbol 166 MovieClip in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar1.activateLeft(this._x, this._y);
} else {
_parent.enar1.activateRight(this._x, this._y);
}
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 213 MovieClip "player" in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
arrows = 0;
bow._visible = false;
hasSeed = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (hasSeed) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "Pause");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 20;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 15;
}
}
}
}
Instance of Symbol 217 MovieClip in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 219 MovieClip in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 223 MovieClip "deathEffect" in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 225 MovieClip "arrow1" in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 227 MovieClip "mil" in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
flag = 0;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -80;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 80;
}
if (_parent.player.hitMask.hitTest(this) && (flag < 9)) {
if (flag == 0) {
_root.dWindow.open(4, "I'll check out the road ahead. Milo, you go see if one of King Oblig's couriers is around.");
flag = 1;
}
if (flag == 1) {
if (_root.dWindow.goNext) {
flag = 2;
}
}
if (flag == 2) {
_root.dWindow.open(5, "Ok *ulp* I just hope there's no ghosts...");
flag = 3;
}
if (flag == 3) {
if (_root.dWindow.goNext) {
flag = 9;
}
_root.dWindow.goNext = false;
}
}
}
Instance of Symbol 240 MovieClip in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 241 MovieClip in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -60;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 242 MovieClip in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -42;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 253 MovieClip in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -40;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 267 MovieClip in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.seedPass = _parent.player.hasSeed;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 240 MovieClip in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 268 MovieClip "endBlock" in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 4000;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Gallan! Once I open the shrine, you ring the bell! We just have to watch out for the G..G..GYAAH!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 100;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 273 MovieClip "ground" in Symbol 274 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Symbol 279 MovieClip Frame 1
stop();
Symbol 279 MovieClip Frame 19
this._y = _root.world.safeY;
curing = false;
Symbol 279 MovieClip Frame 20
stop();
Symbol 280 MovieClip Frame 1
stop();
Symbol 280 MovieClip Frame 2
stop();
Symbol 280 MovieClip Frame 3
stop();
Symbol 280 MovieClip Frame 4
stop();
Symbol 280 MovieClip Frame 24
gotoAndPlay (5);
Symbol 280 MovieClip Frame 25
doneAttack = false;
Instance of Symbol 192 MovieClip "attMask" in Symbol 280 MovieClip Frame 27
onClipEvent (load) {
this._visible = false;
}
Symbol 280 MovieClip Frame 30
stop();
doneAttack = true;
Symbol 280 MovieClip Frame 31
stop();
Symbol 280 MovieClip Frame 32
doneShoot = false;
if (0 < this._xscale) {
_parent.arrow1.activateRight();
} else {
_parent.arrow1.activateLeft();
}
Symbol 280 MovieClip Frame 40
stop();
doneShoot = true;
Symbol 280 MovieClip Frame 41
stop();
Symbol 280 MovieClip Frame 50
gotoAndPlay (42);
Symbol 280 MovieClip Frame 51
doneThrow = false;
Symbol 280 MovieClip Frame 54
if (0 < this._xscale) {
_parent.seed.activateRight();
} else {
_parent.seed.activateLeft();
}
Symbol 280 MovieClip Frame 59
stop();
doneThrow = true;
Symbol 309 MovieClip Frame 1
stop();
Symbol 309 MovieClip Frame 2
stop();
Symbol 309 MovieClip Frame 3
stop();
Symbol 309 MovieClip Frame 18
gotoAndPlay (4);
Symbol 309 MovieClip Frame 37
attacking = false;
goFight = false;
Symbol 310 MovieClip Frame 1
stop();
Symbol 310 MovieClip Frame 17
gotoAndPlay (2);
Symbol 310 MovieClip Frame 18
stop();
Symbol 310 MovieClip Frame 19
stop();
Symbol 310 MovieClip Frame 20
stop();
Symbol 310 MovieClip Frame 21
shooting = true;
Symbol 310 MovieClip Frame 27
shootArrow();
arrowCount++;
Symbol 310 MovieClip Frame 31
shooting = false;
gotoAndStop (1);
Instance of Symbol 279 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 100;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 113 MovieClip "enar3" in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= _root.world.safeY) {
deactivate();
}
}
}
}
Instance of Symbol 142 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar3.activateLeft(this._x, this._y);
} else {
_parent.enar3.activateRight(this._x, this._y);
}
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 149 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 25;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 280 MovieClip "player" in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
hasSeed = _root.seedPass;
lives = _root.lifePass;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = _root.hpPass;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function vReset() {
arrows = 0;
bow._visible = false;
hasSeed = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
sReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (hasSeed) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "Pause");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 15;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 282 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
flag = 0;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -66;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 66;
}
if (_parent.player.hitMask.hitTest(this) && (flag < 9)) {
if (flag == 0) {
_root.dWindow.open(1, "Blaze Blossoms grow in this forest. The flowers burst into flame when they bloom.");
flag = 1;
}
if (flag == 1) {
if (_root.dWindow.goNext) {
flag = 2;
}
}
if (flag == 2) {
_root.dWindow.open(1, "They only grow where there's lots of Sword Vine, which burns up when the flowers sprout.");
flag = 3;
}
if (flag == 3) {
if (_root.dWindow.goNext) {
flag = 9;
}
_root.dWindow.goNext = false;
}
}
}
Instance of Symbol 153 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 153 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 113 MovieClip "enar2" in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= _root.world.safeY) {
deactivate();
}
}
}
}
Instance of Symbol 154 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar2.activateLeft(this._x, this._y);
} else {
_parent.enar2.activateRight(this._x, this._y);
}
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 153 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 153 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 153 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 284 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.arrows = _parent.player.arrows + 15;
s.start();
_parent.player.bow._visible = true;
_parent.player.doneShoot = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 309 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 113 MovieClip "enar1" in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= _root.world.safeY) {
deactivate();
}
}
}
}
Instance of Symbol 310 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = false;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar1.activateLeft(this._x, this._y);
} else {
_parent.enar1.activateRight(this._x, this._y);
}
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 165 MovieClip "seed" in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.hasSeed = false;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 217 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 219 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 223 MovieClip "deathEffect" in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 225 MovieClip "arrow1" in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 311 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -66;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 66;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(1, "There's dark magic in the forest, and not just the usual ghosts...");
active = false;
}
}
Instance of Symbol 267 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.seedPass = _parent.player.hasSeed;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 240 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 240 MovieClip in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 268 MovieClip "endBlock" in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 4000;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Gallan! Once I open the shrine, you ring the bell! We just have to watch out for the G..G..GYAAH!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 100;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 319 MovieClip "ground" in Symbol 320 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Symbol 321 MovieClip Frame 1
stop();
Symbol 321 MovieClip Frame 2
stop();
Symbol 321 MovieClip Frame 3
stop();
Symbol 322 MovieClip Frame 1
stop();
Symbol 322 MovieClip Frame 2
stop();
Symbol 322 MovieClip Frame 3
stop();
Symbol 322 MovieClip Frame 4
stop();
Symbol 322 MovieClip Frame 24
gotoAndPlay (5);
Symbol 322 MovieClip Frame 25
doneAttack = false;
Instance of Symbol 192 MovieClip "attMask" in Symbol 322 MovieClip Frame 27
onClipEvent (load) {
this._visible = false;
}
Symbol 322 MovieClip Frame 30
stop();
doneAttack = true;
Symbol 322 MovieClip Frame 31
stop();
Symbol 322 MovieClip Frame 32
doneShoot = false;
if (0 < this._xscale) {
_parent.arrow1.activateRight();
} else {
_parent.arrow1.activateLeft();
}
Symbol 322 MovieClip Frame 40
stop();
doneShoot = true;
Symbol 322 MovieClip Frame 41
stop();
Symbol 322 MovieClip Frame 50
gotoAndPlay (42);
Symbol 322 MovieClip Frame 51
doneThrow = false;
Symbol 322 MovieClip Frame 54
if (0 < this._xscale) {
_parent.seed.activateRight();
} else {
_parent.seed.activateLeft();
}
Symbol 322 MovieClip Frame 59
stop();
doneThrow = true;
Symbol 342 MovieClip Frame 1
stop();
Symbol 342 MovieClip Frame 21
this.vineClear();
Symbol 342 MovieClip Frame 33
stop();
Instance of Symbol 341 MovieClip in Symbol 342 MovieClip Frame 33
onClipEvent (enterFrame) {
if (_root.world.player.hasSeed == true) {
this._visible = false;
} else {
this._visible = true;
}
}
Symbol 349 MovieClip Frame 1
stop();
Symbol 349 MovieClip Frame 21
this.vineClear();
Symbol 349 MovieClip Frame 33
stop();
Instance of Symbol 341 MovieClip in Symbol 349 MovieClip Frame 33
onClipEvent (enterFrame) {
if (_root.world.player.hasSeed == true) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 354 MovieClip "tsb1" in Symbol 356 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._yscale = 100;
}
vReset();
}
Instance of Symbol 321 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 321 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 321 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 321 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 279 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 100;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 219 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 284 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.arrows = _parent.player.arrows + 15;
s.start();
_parent.player.bow._visible = true;
_parent.player.doneShoot = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 113 MovieClip "enar1" in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= _root.world.safeY) {
deactivate();
}
}
}
}
Instance of Symbol 166 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar1.activateLeft(this._x, this._y);
} else {
_parent.enar1.activateRight(this._x, this._y);
}
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 322 MovieClip "player" in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
hasSeed = _root.seedPass;
lives = _root.lifePass;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = _root.hpPass;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function vReset() {
arrows = 0;
bow._visible = false;
hasSeed = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
sReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (hasSeed) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "Pause");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 15;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 324 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.lives++;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
}
}
Instance of Symbol 325 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -66;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 66;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(1, "This Sword Vine looks pretty sharp, but you look like you have tough armor...");
active = false;
}
}
Instance of Symbol 165 MovieClip "seed" in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.hasSeed = false;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 217 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 219 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 223 MovieClip "deathEffect" in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 225 MovieClip "arrow1" in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 328 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
attackPwr = 8;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
}
Instance of Symbol 267 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.seedPass = _parent.player.hasSeed;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 342 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(33);
firstSeed = true;
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
if (firstSeed) {
_root.dWindow.open(3, "You got a Blaze Blossom! Press 'S' to throw it! Use it wisely!");
firstSeed = false;
}
}
}
Instance of Symbol 328 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
attackPwr = 8;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
}
Instance of Symbol 343 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
attackPwr = 9;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
}
Instance of Symbol 343 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
attackPwr = 9;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
}
Instance of Symbol 343 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
attackPwr = 9;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
}
Instance of Symbol 346 MovieClip "mil" in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
flag = 0;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -80;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 80;
}
if (_parent.player.hitMask.hitTest(this) && (flag < 9)) {
if (flag == 0) {
_root.dWindow.open(5, "I've found one of the King's couriers!");
flag = 1;
}
if (flag == 1) {
if (_root.dWindow.goNext) {
flag = 2;
}
}
if (flag == 2) {
_root.dWindow.open(2, "This Sword Vine has overgrown the path. We need to find a way through");
flag = 3;
}
if (flag == 3) {
if (_root.dWindow.goNext) {
flag = 9;
}
_root.dWindow.goNext = false;
}
}
}
Instance of Symbol 348 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 100;
}
}
Instance of Symbol 349 MovieClip "fl1" in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndStop("idle");
this._visible = false;
}
function grow() {
this._visible = true;
this.gotoAndPlay(2);
}
function vineClear() {
_parent.ground.tsb1._yscale = 0;
_parent.th1._yscale = 0;
}
vReset();
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
}
}
Instance of Symbol 350 MovieClip "th1" in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 10;
this._yscale = 100;
}
vReset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
if (this.hitTest(_parent.seed)) {
_parent.fl1.grow();
}
}
Instance of Symbol 240 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 240 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 343 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
attackPwr = 9;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
}
Instance of Symbol 343 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
attackPwr = 9;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
}
Instance of Symbol 343 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
attackPwr = 9;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
}
Instance of Symbol 343 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
attackPwr = 9;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
}
Instance of Symbol 268 MovieClip "endBlock" in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 4000;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Gallan! Once I open the shrine, you ring the bell! We just have to watch out for the G..G..GYAAH!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 100;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 356 MovieClip "ground" in Symbol 357 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Symbol 358 MovieClip Frame 1
stop();
Symbol 358 MovieClip Frame 21
this.vineClear();
Symbol 358 MovieClip Frame 33
stop();
Instance of Symbol 341 MovieClip in Symbol 358 MovieClip Frame 33
onClipEvent (enterFrame) {
if (_root.world.player.hasSeed == true) {
this._visible = false;
} else {
this._visible = true;
}
}
Symbol 360 MovieClip Frame 1
stop();
Symbol 360 MovieClip Frame 21
this.vineClear();
Symbol 360 MovieClip Frame 33
stop();
Instance of Symbol 341 MovieClip in Symbol 360 MovieClip Frame 33
onClipEvent (enterFrame) {
if (_root.world.player.hasSeed == true) {
this._visible = false;
} else {
this._visible = true;
}
}
Symbol 361 MovieClip Frame 1
stop();
Symbol 361 MovieClip Frame 2
stop();
Symbol 361 MovieClip Frame 3
stop();
Symbol 361 MovieClip Frame 18
gotoAndPlay (4);
Symbol 361 MovieClip Frame 37
attacking = false;
goFight = false;
Symbol 363 MovieClip Frame 1
stop();
Symbol 363 MovieClip Frame 17
gotoAndPlay (2);
Symbol 363 MovieClip Frame 18
stop();
Symbol 363 MovieClip Frame 19
stop();
Symbol 363 MovieClip Frame 20
stop();
Symbol 363 MovieClip Frame 21
shooting = true;
Symbol 363 MovieClip Frame 27
shootArrow();
arrowCount++;
Symbol 363 MovieClip Frame 31
shooting = false;
gotoAndStop (1);
Instance of Symbol 354 MovieClip "tsb2" in Symbol 368 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._yscale = 100;
}
vReset();
}
Instance of Symbol 354 MovieClip "tsb1" in Symbol 368 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._yscale = 100;
}
vReset();
}
Instance of Symbol 358 MovieClip "fl2" in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndStop("idle");
this._visible = false;
}
function grow() {
this._visible = true;
this.gotoAndPlay(2);
}
function vineClear() {
_parent.ground.tsb2._yscale = 0;
_parent.th2._yscale = 0;
}
vReset();
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
}
}
Instance of Symbol 359 MovieClip "th2" in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 10;
this._yscale = 100;
}
vReset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
if (this.hitTest(_parent.seed)) {
_parent.fl2.grow();
}
}
Instance of Symbol 149 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 25;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 322 MovieClip "player" in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
hasSeed = _root.seedPass;
lives = _root.lifePass;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = _root.hpPass;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function vReset() {
arrows = 0;
bow._visible = false;
hasSeed = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
sReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (hasSeed) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "Pause");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 15;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 360 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(33);
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
}
}
Instance of Symbol 321 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 361 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 362 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 100;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(2, "The woods get pretty misty up ahead.");
active = false;
}
}
Instance of Symbol 361 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 361 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 113 MovieClip "enar2" in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= _root.world.safeY) {
deactivate();
}
}
}
}
Instance of Symbol 363 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = false;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar2.activateLeft(this._x, this._y);
} else {
_parent.enar2.activateRight(this._x, this._y);
}
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 321 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 321 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 165 MovieClip "seed" in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.hasSeed = false;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 113 MovieClip "enar1" in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= _root.world.safeY) {
deactivate();
}
}
}
}
Instance of Symbol 310 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = false;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar1.activateLeft(this._x, this._y);
} else {
_parent.enar1.activateRight(this._x, this._y);
}
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 217 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 219 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 223 MovieClip "deathEffect" in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 225 MovieClip "arrow1" in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 349 MovieClip "fl1" in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndStop("idle");
this._visible = false;
}
function grow() {
this._visible = true;
this.gotoAndPlay(2);
}
function vineClear() {
_parent.ground.tsb1._yscale = 0;
_parent.th1._yscale = 0;
}
vReset();
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
}
}
Instance of Symbol 350 MovieClip "th1" in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 10;
this._yscale = 100;
}
vReset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
if (this.hitTest(_parent.seed)) {
_parent.fl1.grow();
}
}
Instance of Symbol 360 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(33);
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
}
}
Instance of Symbol 360 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(33);
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
}
}
Instance of Symbol 267 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.seedPass = _parent.player.hasSeed;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 240 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 240 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 240 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 242 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -42;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 253 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -40;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 240 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 268 MovieClip "endBlock" in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 4000;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Gallan! Once I open the shrine, you ring the bell! We just have to watch out for the G..G..GYAAH!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 100;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 368 MovieClip "ground" in Symbol 369 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Symbol 381 MovieClip Frame 20
gotoAndPlay (1);
Symbol 381 MovieClip Frame 21
attPwr = 0;
Symbol 381 MovieClip Frame 35
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
Symbol 381 MovieClip Frame 36
stop();
Instance of Symbol 381 MovieClip in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 381 MovieClip in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 381 MovieClip in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 381 MovieClip in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 381 MovieClip in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 360 MovieClip in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(33);
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
}
}
Instance of Symbol 280 MovieClip "player" in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
hasSeed = _root.seedPass;
lives = _root.lifePass;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = _root.hpPass;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function vReset() {
arrows = 0;
bow._visible = false;
hasSeed = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
sReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (hasSeed) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "Pause");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 15;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 279 MovieClip in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 100;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 165 MovieClip "seed" in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.hasSeed = false;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 217 MovieClip in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 219 MovieClip in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 223 MovieClip "deathEffect" in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 225 MovieClip "arrow1" in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 240 MovieClip in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 240 MovieClip in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 324 MovieClip in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.lives++;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
}
}
Instance of Symbol 267 MovieClip in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.seedPass = _parent.player.hasSeed;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 240 MovieClip in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 268 MovieClip "endBlock" in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 4000;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Gallan! Once I open the shrine, you ring the bell! We just have to watch out for the G..G..GYAAH!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 100;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 384 MovieClip "ground" in Symbol 385 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 354 MovieClip "tsb1" in Symbol 390 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._yscale = 100;
}
vReset();
}
Instance of Symbol 381 MovieClip in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 381 MovieClip in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 322 MovieClip "player" in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
hasSeed = _root.seedPass;
lives = _root.lifePass;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = _root.hpPass;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function vReset() {
arrows = 0;
bow._visible = false;
hasSeed = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
sReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (hasSeed) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "Pause");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 15;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 381 MovieClip in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 381 MovieClip in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 381 MovieClip in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 381 MovieClip in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 348 MovieClip in Symbol 391 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 100;
}
}
Instance of Symbol 386 MovieClip in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
flag = 0;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -66;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 66;
}
if (_parent.player.hitMask.hitTest(this) && (flag < 9)) {
if (flag == 0) {
_root.dWindow.open(1, "You got past those other ghosts, but you won't get past the Master Onineeko.");
flag = 1;
}
if (flag == 1) {
if (_root.dWindow.goNext) {
flag = 2;
}
}
if (flag == 2) {
_root.dWindow.open(1, "The only way to stop him is to ring the Shrine Bell. It takes two people to ring it.");
flag = 3;
}
if (flag == 3) {
if (_root.dWindow.goNext) {
flag = 4;
}
}
if (flag == 4) {
_root.dWindow.open(5, "I guess that means it will take both of us to stop the.. *ulp* .. ghosts?");
flag = 5;
}
if (flag == 5) {
if (_root.dWindow.goNext) {
flag = 6;
}
}
if (flag == 6) {
_root.dWindow.open(4, "Come on Milo, we have to find out who's behind these attacks...");
flag = 7;
}
if (flag == 7) {
if (_root.dWindow.goNext) {
flag = 9;
}
_root.dWindow.goNext = false;
}
}
}
Instance of Symbol 387 MovieClip "mil" in Symbol 391 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -80;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 80;
}
}
Instance of Symbol 279 MovieClip in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 100;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 284 MovieClip in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.arrows = _parent.player.arrows + 15;
s.start();
_parent.player.bow._visible = true;
_parent.player.doneShoot = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 165 MovieClip "seed" in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.hasSeed = false;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 217 MovieClip in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 219 MovieClip in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 223 MovieClip "deathEffect" in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 225 MovieClip "arrow1" in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 360 MovieClip in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(33);
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
}
}
Instance of Symbol 349 MovieClip "fl1" in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndStop("idle");
this._visible = false;
}
function grow() {
this._visible = true;
this.gotoAndPlay(2);
}
function vineClear() {
_parent.ground.tsb1._yscale = 0;
_parent.th1._yscale = 0;
}
vReset();
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
}
}
Instance of Symbol 350 MovieClip "th1" in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 10;
this._yscale = 100;
}
vReset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
if (this.hitTest(_parent.seed)) {
_parent.fl1.grow();
}
}
Instance of Symbol 240 MovieClip in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 240 MovieClip in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 240 MovieClip in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 240 MovieClip in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 268 MovieClip "endBlock" in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 4000;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Gallan! Once I open the shrine, you ring the bell! We just have to watch out for the G..G..GYAAH!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 100;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 267 MovieClip in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.seedPass = _parent.player.hasSeed;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 390 MovieClip "ground" in Symbol 391 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Symbol 400 MovieClip Frame 20
gotoAndPlay (1);
Symbol 400 MovieClip Frame 21
attPwr = 0;
Symbol 400 MovieClip Frame 35
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
Symbol 400 MovieClip Frame 36
stop();
Symbol 401 MovieClip Frame 20
gotoAndPlay (1);
Symbol 401 MovieClip Frame 21
attPwr = 0;
Symbol 401 MovieClip Frame 35
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
Symbol 401 MovieClip Frame 36
stop();
Symbol 414 MovieClip Frame 10
gotoAndPlay (1);
Symbol 414 MovieClip Frame 11
stop();
Symbol 414 MovieClip Frame 12
stop();
Symbol 421 MovieClip Frame 1
stop();
Symbol 421 MovieClip Frame 17
gotoAndPlay (6);
Symbol 427 MovieClip Frame 1
stop();
shutter = true;
alreadyRung = false;
Symbol 427 MovieClip Frame 2
mRope.gotoAndPlay(2);
pullStart = true;
Symbol 427 MovieClip Frame 10
stop();
shutter = false;
Symbol 427 MovieClip Frame 15
mRope.gotoAndStop(1);
Symbol 427 MovieClip Frame 20
_root.world.oni.moveToShock = true;
gotoAndStop (1);
Symbol 427 MovieClip Frame 45
gotoAndPlay (11);
Instance of Symbol 392 MovieClip "endBlock" in Symbol 434 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 7500;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Gallan! Once I open the shrine, you ring the bell! We just have to watch out for the G..G..GYAAH!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 100;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 165 MovieClip "seed" in Symbol 434 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.hasSeed = false;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 322 MovieClip "player" in Symbol 434 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
hasSeed = _root.seedPass;
lives = _root.lifePass;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = _root.hpPass;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function vReset() {
arrows = 0;
bow._visible = false;
hasSeed = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
sReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (hasSeed) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "Pause");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 15;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 399 MovieClip "beam" in Symbol 434 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.stop();
active = false;
this._visible = false;
this._x = startX;
this._y = startY;
shockCount = 0;
shockLimit = 300;
this._rotation = 0;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (_parent.player.actionLock == false) {
if (active) {
this.play();
this._visible = true;
this._rotation = this._rotation + 2.5;
this._x = _parent.oni._x;
this._y = _parent.oni._y;
shockCount++;
if (this.hitMask.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, true) && (_parent.player.wincing == false)) {
_parent.player.getHit(20, this._x, 14, false);
}
}
if (shockCount == shockLimit) {
active = false;
this.stop();
this._x = startX;
this._y = startY;
this._rotation = 0;
shockCount = 0;
_parent.oni.move = true;
_parent.oni.goSummon = true;
}
}
}
Instance of Symbol 400 MovieClip "g3" in Symbol 434 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 8;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 4;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 401 MovieClip "g2" in Symbol 434 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 1;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 1;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 381 MovieClip "g1" in Symbol 434 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 414 MovieClip "oni" in Symbol 434 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._x = startX;
this._y = startY;
gotoAndPlay (1);
floatSpeed = 4;
origin = this._x;
floatPosition = 0;
maxFloat = 225;
floatDirection = -1;
move = true;
tollOffset = 60;
tollCount = 60;
tollOdd = true;
tolling = false;
moveToShock = false;
goSummon = false;
summonCount = 0;
summonDelay = 90;
dead = false;
hp = 100;
_root.bossGage.bar._xscale = hp;
}
function getHit() {
hp = hp - 25;
if (0 >= hp) {
hp = 0;
}
_root.bossGage.bar._xscale = hp;
}
function shockNow() {
moveToShock = false;
move = false;
_parent.beam.active = true;
s.start(0, 3);
}
function summon() {
h.start();
this.move = false;
this.gotoAndStop("shock");
_parent.g1.vReset();
_parent.g2.vReset();
_parent.g3.vReset();
_parent.shrine.pullStart = false;
}
function die() {
dead = true;
this.gotoAndStop("wince");
stop();
_root.bossGage._visible = false;
_parent.player.score = _parent.player.score + 100;
}
h = new Sound(this);
h.attachSound("heh");
s = new Sound(this);
s.attachSound("bolt");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (dead && (0 < this._alpha)) {
this._alpha = this._alpha - 1;
}
if (dead && (0 >= this._alpha)) {
_parent.endBlock.tally = true;
}
if ((dead == false) && (_parent.player.dead == false)) {
if (_parent.player.actionLock == false) {
if (move) {
floatPosition = floatPosition + (floatSpeed * floatDirection);
this._x = origin + floatPosition;
if ((maxFloat * -1) >= floatPosition) {
floatDirection = 1;
this._xscale = -100;
}
if (floatPosition >= maxFloat) {
floatDirection = -1;
this._xscale = 100;
}
}
if ((floatPosition == 0) && (moveToShock == true)) {
shockNow();
}
if (tolling) {
this.gotoAndStop("wince");
move = false;
if (tollOdd) {
this._x = (origin + floatPosition) - tollCount;
tollOdd = false;
} else {
this._x = (origin + floatPosition) + tollCount;
tollOdd = true;
}
tollCount = tollCount - 1;
if (tollCount == 0) {
move = true;
tolling = false;
gotoAndPlay (1);
tollCount = tollOffset;
if (0 >= hp) {
die();
}
}
}
if (goSummon) {
summonCount++;
if (summonCount == summonDelay) {
summon();
}
if (summonCount == (summonDelay + 30)) {
move = true;
this.gotoAndPlay(1);
goSummon = false;
summonCount = 0;
}
}
}
}
}
Instance of Symbol 427 MovieClip "shrine" in Symbol 434 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
shutter = true;
pullCount = 0;
pullLimit = 120;
pullStart = false;
tolling = false;
alreadyRung = false;
this.gotoAndStop(1);
mRope.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((0 >= ((_parent.g1.hp + _parent.g2.hp) + _parent.g3.hp)) && (this.pullStart == false)) {
this.gotoAndPlay(2);
}
if (alreadyRung == false) {
if ((shutter == false) && (this.hitTest(_parent.player.attMask))) {
this.gotoAndPlay(21);
if (_parent.oni.tolling == false) {
_parent.oni.getHit();
alreadyRung = true;
}
_parent.oni.tolling = true;
}
}
if (shutter == false) {
pullCount++;
if (pullCount == pullLimit) {
pullCount = 0;
this.gotoAndPlay(11);
}
}
}
Instance of Symbol 217 MovieClip in Symbol 434 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 219 MovieClip in Symbol 434 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 223 MovieClip "deathEffect" in Symbol 434 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 225 MovieClip "arrow1" in Symbol 434 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 241 MovieClip in Symbol 434 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -60;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 268 MovieClip "endBlock" in Symbol 434 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 4000;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Gallan! Once I open the shrine, you ring the bell! We just have to watch out for the G..G..GYAAH!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 100;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 433 MovieClip "ground" in Symbol 434 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 381 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 381 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 322 MovieClip "player" in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
hasSeed = _root.seedPass;
lives = _root.lifePass;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = _root.hpPass;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function vReset() {
arrows = 0;
bow._visible = false;
hasSeed = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
sReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (hasSeed) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "Pause");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 15;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 381 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 381 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 381 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 381 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 348 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 100;
}
}
Instance of Symbol 386 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
flag = 0;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -66;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 66;
}
if (_parent.player.hitMask.hitTest(this) && (flag < 9)) {
if (flag == 0) {
_root.dWindow.open(1, "You got past those other ghosts, but you won't get past the Master Onineeko.");
flag = 1;
}
if (flag == 1) {
if (_root.dWindow.goNext) {
flag = 2;
}
}
if (flag == 2) {
_root.dWindow.open(1, "The only way to stop him is to ring the Shrine Bell. It takes two people to ring it.");
flag = 3;
}
if (flag == 3) {
if (_root.dWindow.goNext) {
flag = 4;
}
}
if (flag == 4) {
_root.dWindow.open(5, "I guess that means it will take both of us to stop the.. *ulp* .. ghosts?");
flag = 5;
}
if (flag == 5) {
if (_root.dWindow.goNext) {
flag = 6;
}
}
if (flag == 6) {
_root.dWindow.open(4, "Come on Milo, we have to find out who's behind these attacks...");
flag = 7;
}
if (flag == 7) {
if (_root.dWindow.goNext) {
flag = 9;
}
_root.dWindow.goNext = false;
}
}
}
Instance of Symbol 387 MovieClip "mil" in Symbol 435 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -80;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 80;
}
}
Instance of Symbol 279 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 100;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 284 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.arrows = _parent.player.arrows + 15;
s.start();
_parent.player.bow._visible = true;
_parent.player.doneShoot = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 165 MovieClip "seed" in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.hasSeed = false;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 217 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 219 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 223 MovieClip "deathEffect" in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 225 MovieClip "arrow1" in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 360 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(33);
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
}
}
Instance of Symbol 349 MovieClip "fl1" in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndStop("idle");
this._visible = false;
}
function grow() {
this._visible = true;
this.gotoAndPlay(2);
}
function vineClear() {
_parent.ground.tsb1._yscale = 0;
_parent.th1._yscale = 0;
}
vReset();
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
}
}
Instance of Symbol 350 MovieClip "th1" in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 10;
this._yscale = 100;
}
vReset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
if (this.hitTest(_parent.seed)) {
_parent.fl1.grow();
}
}
Instance of Symbol 240 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 240 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 240 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 240 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 268 MovieClip "endBlock" in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 4000;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Gallan! Once I open the shrine, you ring the bell! We just have to watch out for the G..G..GYAAH!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 100;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 267 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.seedPass = _parent.player.hasSeed;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 390 MovieClip "ground" in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 381 MovieClip in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 381 MovieClip in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 381 MovieClip in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 381 MovieClip in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 381 MovieClip in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 360 MovieClip in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(33);
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
}
}
Instance of Symbol 280 MovieClip "player" in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
hasSeed = _root.seedPass;
lives = _root.lifePass;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = _root.hpPass;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function vReset() {
arrows = 0;
bow._visible = false;
hasSeed = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
sReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (hasSeed) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "Pause");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 15;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 279 MovieClip in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 100;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 165 MovieClip "seed" in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.hasSeed = false;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 217 MovieClip in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 219 MovieClip in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 223 MovieClip "deathEffect" in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 225 MovieClip "arrow1" in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 240 MovieClip in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 240 MovieClip in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 324 MovieClip in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.lives++;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
}
}
Instance of Symbol 267 MovieClip in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.seedPass = _parent.player.hasSeed;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 240 MovieClip in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 268 MovieClip "endBlock" in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 4000;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Gallan! Once I open the shrine, you ring the bell! We just have to watch out for the G..G..GYAAH!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 100;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 384 MovieClip "ground" in Symbol 436 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 358 MovieClip "fl2" in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndStop("idle");
this._visible = false;
}
function grow() {
this._visible = true;
this.gotoAndPlay(2);
}
function vineClear() {
_parent.ground.tsb2._yscale = 0;
_parent.th2._yscale = 0;
}
vReset();
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
}
}
Instance of Symbol 359 MovieClip "th2" in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 10;
this._yscale = 100;
}
vReset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
if (this.hitTest(_parent.seed)) {
_parent.fl2.grow();
}
}
Instance of Symbol 149 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 25;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 322 MovieClip "player" in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
hasSeed = _root.seedPass;
lives = _root.lifePass;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = _root.hpPass;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function vReset() {
arrows = 0;
bow._visible = false;
hasSeed = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
sReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (hasSeed) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "Pause");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 15;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 360 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(33);
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
}
}
Instance of Symbol 321 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 361 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 362 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 100;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(2, "The woods get pretty misty up ahead.");
active = false;
}
}
Instance of Symbol 361 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 361 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 113 MovieClip "enar2" in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= _root.world.safeY) {
deactivate();
}
}
}
}
Instance of Symbol 363 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = false;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar2.activateLeft(this._x, this._y);
} else {
_parent.enar2.activateRight(this._x, this._y);
}
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 321 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 321 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 165 MovieClip "seed" in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.hasSeed = false;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 113 MovieClip "enar1" in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= _root.world.safeY) {
deactivate();
}
}
}
}
Instance of Symbol 310 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = false;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar1.activateLeft(this._x, this._y);
} else {
_parent.enar1.activateRight(this._x, this._y);
}
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 217 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 219 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 223 MovieClip "deathEffect" in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 225 MovieClip "arrow1" in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 349 MovieClip "fl1" in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndStop("idle");
this._visible = false;
}
function grow() {
this._visible = true;
this.gotoAndPlay(2);
}
function vineClear() {
_parent.ground.tsb1._yscale = 0;
_parent.th1._yscale = 0;
}
vReset();
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
}
}
Instance of Symbol 350 MovieClip "th1" in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 10;
this._yscale = 100;
}
vReset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
if (this.hitTest(_parent.seed)) {
_parent.fl1.grow();
}
}
Instance of Symbol 360 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(33);
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
}
}
Instance of Symbol 360 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(33);
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
}
}
Instance of Symbol 267 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.seedPass = _parent.player.hasSeed;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 240 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 240 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 240 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 242 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -42;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 253 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -40;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 240 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 268 MovieClip "endBlock" in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 4000;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Gallan! Once I open the shrine, you ring the bell! We just have to watch out for the G..G..GYAAH!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 100;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 368 MovieClip "ground" in Symbol 437 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 321 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 321 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 321 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 321 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 279 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 100;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 219 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 284 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.arrows = _parent.player.arrows + 15;
s.start();
_parent.player.bow._visible = true;
_parent.player.doneShoot = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 113 MovieClip "enar1" in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= _root.world.safeY) {
deactivate();
}
}
}
}
Instance of Symbol 166 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar1.activateLeft(this._x, this._y);
} else {
_parent.enar1.activateRight(this._x, this._y);
}
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 322 MovieClip "player" in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
hasSeed = _root.seedPass;
lives = _root.lifePass;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = _root.hpPass;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function vReset() {
arrows = 0;
bow._visible = false;
hasSeed = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
sReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (hasSeed) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "Pause");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 15;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 324 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.lives++;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
}
}
Instance of Symbol 325 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -66;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 66;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(1, "This Sword Vine looks pretty sharp, but you look like you have tough armor...");
active = false;
}
}
Instance of Symbol 165 MovieClip "seed" in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.hasSeed = false;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 217 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 219 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 223 MovieClip "deathEffect" in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 225 MovieClip "arrow1" in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 328 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
attackPwr = 8;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
}
Instance of Symbol 267 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.seedPass = _parent.player.hasSeed;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 342 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(33);
firstSeed = true;
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
if (firstSeed) {
_root.dWindow.open(3, "You got a Blaze Blossom! Press 'S' to throw it! Use it wisely!");
firstSeed = false;
}
}
}
Instance of Symbol 328 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
attackPwr = 8;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
}
Instance of Symbol 343 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
attackPwr = 9;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
}
Instance of Symbol 343 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
attackPwr = 9;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
}
Instance of Symbol 343 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
attackPwr = 9;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
}
Instance of Symbol 346 MovieClip "mil" in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
flag = 0;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -80;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 80;
}
if (_parent.player.hitMask.hitTest(this) && (flag < 9)) {
if (flag == 0) {
_root.dWindow.open(5, "I've found one of the King's couriers!");
flag = 1;
}
if (flag == 1) {
if (_root.dWindow.goNext) {
flag = 2;
}
}
if (flag == 2) {
_root.dWindow.open(2, "This Sword Vine has overgrown the path. We need to find a way through");
flag = 3;
}
if (flag == 3) {
if (_root.dWindow.goNext) {
flag = 9;
}
_root.dWindow.goNext = false;
}
}
}
Instance of Symbol 348 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -100;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 100;
}
}
Instance of Symbol 349 MovieClip "fl1" in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndStop("idle");
this._visible = false;
}
function grow() {
this._visible = true;
this.gotoAndPlay(2);
}
function vineClear() {
_parent.ground.tsb1._yscale = 0;
_parent.th1._yscale = 0;
}
vReset();
s = new Sound(this);
s.attachSound("seedP");
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.hasSeed == false)) {
_parent.player.hasSeed = true;
s.start();
}
}
Instance of Symbol 350 MovieClip "th1" in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 10;
this._yscale = 100;
}
vReset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
if (this.hitTest(_parent.seed)) {
_parent.fl1.grow();
}
}
Instance of Symbol 240 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 240 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 343 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
attackPwr = 9;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
}
Instance of Symbol 343 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
attackPwr = 9;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
}
Instance of Symbol 343 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
attackPwr = 9;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
}
Instance of Symbol 343 MovieClip in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
attackPwr = 9;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackpwr, this._x, 14, true);
}
}
Instance of Symbol 268 MovieClip "endBlock" in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 4000;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Gallan! Once I open the shrine, you ring the bell! We just have to watch out for the G..G..GYAAH!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 100;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 356 MovieClip "ground" in Symbol 438 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 279 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 100;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 113 MovieClip "enar3" in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= _root.world.safeY) {
deactivate();
}
}
}
}
Instance of Symbol 142 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar3.activateLeft(this._x, this._y);
} else {
_parent.enar3.activateRight(this._x, this._y);
}
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 149 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 25;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 280 MovieClip "player" in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
hasSeed = _root.seedPass;
lives = _root.lifePass;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = _root.hpPass;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function vReset() {
arrows = 0;
bow._visible = false;
hasSeed = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
sReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (hasSeed) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "Pause");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 15;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 282 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
flag = 0;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -66;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 66;
}
if (_parent.player.hitMask.hitTest(this) && (flag < 9)) {
if (flag == 0) {
_root.dWindow.open(1, "Blaze Blossoms grow in this forest. The flowers burst into flame when they bloom.");
flag = 1;
}
if (flag == 1) {
if (_root.dWindow.goNext) {
flag = 2;
}
}
if (flag == 2) {
_root.dWindow.open(1, "They only grow where there's lots of Sword Vine, which burns up when the flowers sprout.");
flag = 3;
}
if (flag == 3) {
if (_root.dWindow.goNext) {
flag = 9;
}
_root.dWindow.goNext = false;
}
}
}
Instance of Symbol 153 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 153 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 113 MovieClip "enar2" in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= _root.world.safeY) {
deactivate();
}
}
}
}
Instance of Symbol 154 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar2.activateLeft(this._x, this._y);
} else {
_parent.enar2.activateRight(this._x, this._y);
}
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 153 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 153 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 153 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 284 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.arrows = _parent.player.arrows + 15;
s.start();
_parent.player.bow._visible = true;
_parent.player.doneShoot = true;
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 309 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
prevPose = "";
pose = "jump";
attackPwr = 20;
touchAttack = 8;
hp = 60;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 6;
speed = 6;
this._x = startX;
this._y = starty;
stunned = false;
attacking = false;
waitTimer = 58;
waitDelay = 60;
goFight = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 600;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 10;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -10;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (attackTarget < this._x) {
this._xscale = 100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if (stunned == false) {
if (goFight) {
hVelocity = speed * -1;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if (stunned == false) {
if (goFight) {
hVelocity = speed;
}
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (waitTimer == waitDelay) {
waitTimer = 0;
goFight = true;
attackTarget = _parent.player._x;
} else {
waitTimer++;
}
prevPose = pose;
if (grounded) {
if (goFight) {
if (attacking) {
pose = "attack";
} else {
pose = "run";
if (this._xscale == 100) {
this.hVelocity = speed * -1;
}
if (this._xscale == -100) {
this.hVelocity = speed;
}
}
} else {
pose = "stand";
hVelocity = 0;
stunned = false;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else {
pose = "jump";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 14, true);
} else {
_parent.player.getHit(touchAttack, this._x, 14, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (goFight && (grounded)) {
if (Math.abs(_parent.player._x - this._x) < 200) {
attacking = true;
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 113 MovieClip "enar1" in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= _root.world.safeY) {
deactivate();
}
}
}
}
Instance of Symbol 310 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = false;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar1.activateLeft(this._x, this._y);
} else {
_parent.enar1.activateRight(this._x, this._y);
}
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 165 MovieClip "seed" in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.hasSeed = false;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 217 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 219 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 223 MovieClip "deathEffect" in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 225 MovieClip "arrow1" in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 311 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -66;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 66;
}
if (_parent.player.hitMask.hitTest(this) && (active)) {
_root.dWindow.open(1, "There's dark magic in the forest, and not just the usual ghosts...");
active = false;
}
}
Instance of Symbol 267 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.seedPass = _parent.player.hasSeed;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 240 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 240 MovieClip in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 268 MovieClip "endBlock" in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 4000;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Gallan! Once I open the shrine, you ring the bell! We just have to watch out for the G..G..GYAAH!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 100;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 319 MovieClip "ground" in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 113 MovieClip "enar3" in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= _root.world.safeY) {
deactivate();
}
}
}
}
Instance of Symbol 142 MovieClip in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar3.activateLeft(this._x, this._y);
} else {
_parent.enar3.activateRight(this._x, this._y);
}
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 149 MovieClip in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
function vreset() {
this.gotoAndStop(1);
curePower = 25;
this._x = startX;
this._y = startY;
curing = false;
}
function cure() {
curing = true;
s.start();
this.gotoAndPlay(2);
_parent.player.hp = _parent.player.hp + curePower;
if (100 < _parent.player.hp) {
_parent.player.hp = 100;
}
_root.life.bar._xscale = _parent.player.hp;
}
s = new Sound(this);
s.attachSound("sparkle");
startX = this._x;
startY = this._y;
vreset();
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hitMask) && (curing == false)) {
cure();
}
if (_root.fader.resetFlag) {
vreset();
}
if (curing == true) {
this._x = _parent.player._x;
this._y = _parent.player._y;
}
}
Instance of Symbol 153 MovieClip in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
attackPwr = 12;
hp = 20;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 9;
this._x = startX;
this._y = starty;
stunned = false;
speed = 8;
jumpTimer = 0;
jumpDelay = 20;
goJump = false;
dead = false;
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 200;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
grounded = false;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
grounded = false;
}
}
r = new Sound(this);
r.attachSound("raieetFast");
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 500) {
if (_parent.player.actionLock == false) {
if (grounded) {
this.gotoAndStop(1);
stunned = false;
}
if (grounded == false) {
if (stunned) {
this.gotoAndStop(3);
_parent.spang._y = _root.world.safeY;
}
if (stunned == false) {
this.gotoAndStop(2);
}
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 14, true);
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (jumpTimer == jumpDelay) {
jumpTimer = 0;
goJump = true;
attackTarget = _parent.player._x;
} else if (grounded) {
hVelocity = 0;
jumpTimer++;
}
if (attackTarget < this._x) {
this._xscale = 80;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed * -1;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = -80;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
if ((grounded == false) && (stunned == false)) {
hVelocity = speed;
}
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (goJump && (grounded)) {
grounded = false;
vVelocity = -40;
goJump = false;
r.start();
}
if (this.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 113 MovieClip "enar2" in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= _root.world.safeY) {
deactivate();
}
}
}
}
Instance of Symbol 154 MovieClip in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar2.activateLeft(this._x, this._y);
} else {
_parent.enar2.activateRight(this._x, this._y);
}
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 165 MovieClip "seed" in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.hasSeed = false;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 113 MovieClip "enar1" in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
function activateRight(orgX, orgY) {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function activateLeft(orgX, orgY) {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = orgX + 100;
originY = orgY - 19;
this._x = originX - 200;
this._y = originY;
active = true;
spinOff = false;
this._rotation = 0;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
spinOff = false;
speed = speedSave;
this._rotation = 0;
}
range = 500;
speedSave = 40;
speed = speedSave;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
active = false;
bearing = right;
this._x = returnX;
this._y = returnY;
spinOff = false;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
if (spinOff == false) {
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (_parent.player.pose == "roll") {
spinOff = true;
_parent.player.p.start();
} else {
_parent.player.getHit(15, this._x, 5, true);
deactivate();
}
}
}
if (spinOff) {
speed = 0;
this._y = this._y + 20;
this._x = this._x + ((speedSave / 4) * (_parent.player._xscale / 80));
this._rotation = this._rotation + 45;
if (this._y >= _root.world.safeY) {
deactivate();
}
}
}
}
Instance of Symbol 166 MovieClip in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
stationary = true;
prevPose = "";
pose = "jumpDown";
attackPwr = 20;
touchAttack = 8;
hp = 40;
vVelocity = 0;
gravity = 4;
tVelocity = 30;
grounded = false;
hVelocity = 0;
maxSpeed = 8;
speed = 7;
maxArrow = 3;
arrowCount = 0;
fireCount = 0;
fireDelay = 40;
moveCount = 0;
moveLimit = 45;
jumpPower = -30;
goMove = false;
goShoot = true;
shooting = false;
moving = false;
this._x = startX;
this._y = starty;
stunned = false;
dead = false;
}
function shootArrow() {
if (0 < this._xscale) {
_parent.enar1.activateLeft(this._x, this._y);
} else {
_parent.enar1.activateRight(this._x, this._y);
}
}
function die() {
_parent.deathEffect._x = this._x;
_parent.deathEffect._y = this._y;
_parent.deathEffect.gotoAndPlay(2);
_parent.deathEffect.s.start();
this._y = _root.world.safeY;
_parent.spang._y = _root.world.safeY;
_parent.player.score = _parent.player.score + 400;
dead = true;
}
function getHit(damage, xoff) {
hp = hp - damage;
stunned = true;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -15;
this.hVelocity = 20;
grounded = false;
} else {
this.vVelocity = -15;
this.hVelocity = -20;
grounded = false;
}
}
slash = new Sound(this);
slash.attachSound("slash2");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
if (this._x < _parent.player._x) {
if (goShoot) {
this._xscale = -80;
} else {
this._xscale = 80;
}
if ((-500 < (_parent.player._x - this._x)) && ((_parent.player._x - this._x) < 0)) {
if (stunned == false) {
if (moving) {
hVelocity = speed * -1;
}
}
}
} else {
if (goShoot) {
this._xscale = 80;
} else {
this._xscale = -80;
}
if (((_parent.player._x - this._x) < 500) && (0 < (_parent.player._x - this._x))) {
if (stunned == false) {
if (moving) {
hVelocity = speed;
}
}
}
}
if (moving) {
if (moveCount == moveLimit) {
moveCount = 0;
moving = false;
goShoot = true;
} else {
moveCount++;
if (stationary == false) {
moving = true;
hVelocity = (speed * -1) * (this._xscale / 80);
}
}
}
if ((shooting == false) && (moving == false)) {
if (fireCount == fireDelay) {
fireCount = 0;
shooting = true;
if (arrowCount == maxArrow) {
arrowCount = 0;
if (stationary == false) {
moving = true;
grounded = false;
vVelocity = jumpPower;
goShoot = false;
}
}
} else {
fireCount++;
}
}
prevPose = pose;
if (grounded) {
if (moving) {
pose = "run";
} else if (shooting) {
pose = "shoot";
} else {
pose = "stand";
stunned = false;
hVelocity = 0;
}
}
if (grounded == false) {
if (stunned) {
pose = "wince";
_parent.spang._y = _root.world.safeY;
} else if (vVelocity < 0) {
pose = "jumpUp";
} else {
pose = "jumpDown";
}
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
if (attacking) {
_parent.player.getHit(attackPwr, this._x, 8, true);
} else {
_parent.player.getHit(touchAttack, this._x, 6, true);
}
if (_parent.player.invincible) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (this.hitMask.hitTest(_parent.player.attMask)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.arrow1)) {
slash.start();
_parent.spang._y = this._y - (this._height / 2);
_parent.spang._x = this._x;
getHit(_parent.player.arrowPwr, _parent.player._x);
}
if (this.hitMask.hitTest(_parent.seed)) {
getHit(_parent.seed.exPower, _parent.player._x);
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 213 MovieClip "player" in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
arrows = 0;
bow._visible = false;
hasSeed = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (hasSeed) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "Pause");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 20;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 15;
}
}
}
}
Instance of Symbol 217 MovieClip in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 219 MovieClip in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 223 MovieClip "deathEffect" in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 225 MovieClip "arrow1" in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 227 MovieClip "mil" in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
flag = 0;
}
onClipEvent (enterFrame) {
if ((_parent.player._x + 10) < this._x) {
this._xscale = -80;
}
if (this._x < (_parent.player._x - 10)) {
this._xscale = 80;
}
if (_parent.player.hitMask.hitTest(this) && (flag < 9)) {
if (flag == 0) {
_root.dWindow.open(4, "I'll check out the road ahead. Milo, you go see if one of King Oblig's couriers is around.");
flag = 1;
}
if (flag == 1) {
if (_root.dWindow.goNext) {
flag = 2;
}
}
if (flag == 2) {
_root.dWindow.open(5, "Ok *ulp* I just hope there's no ghosts...");
flag = 3;
}
if (flag == 3) {
if (_root.dWindow.goNext) {
flag = 9;
}
_root.dWindow.goNext = false;
}
}
}
Instance of Symbol 240 MovieClip in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 241 MovieClip in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -60;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 242 MovieClip in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -42;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 253 MovieClip in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -40;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 267 MovieClip in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
active = false;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
if (active == false) {
_root.arrowPass = _parent.player.arrows;
_root.lifePass = _parent.player.lives;
_root.hpPass = _parent.player.hp;
_root.scorePass = _parent.player.score;
_root.seedPass = _parent.player.hasSeed;
_root.warper.gotoAndPlay("warpOut");
active = true;
}
}
}
Instance of Symbol 240 MovieClip in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -50;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 268 MovieClip "endBlock" in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 4000;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Gallan! Once I open the shrine, you ring the bell! We just have to watch out for the G..G..GYAAH!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 100;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 273 MovieClip "ground" in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 392 MovieClip "endBlock" in Symbol 441 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 7500;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Gallan! Once I open the shrine, you ring the bell! We just have to watch out for the G..G..GYAAH!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 100;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 165 MovieClip "seed" in Symbol 441 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = 1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function activateLeft() {
if (active == false) {
bearing = -1;
originX = _parent.player._x + 20;
originY = _parent.player._y - 49;
this._x = originX - 40;
this._y = originY;
active = true;
vVelocity = -15;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.hasSeed = false;
}
function explode() {
_parent.explosion._x = this._x;
_parent.explosion._y = this._y;
_parent.explosion.gotoAndPlay(2);
deactivate();
}
range = 500;
speed = 20;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = 1;
vVelocity = 0;
hVelocity = 0;
tVelocity = 30;
gravity = 4;
exPower = 20;
}
onClipEvent (enterFrame) {
if (active) {
hVelocity = speed * bearing;
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
explode();
} else {
this._x = this._x + hVelocity;
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
vVelocity = 0;
explode();
}
}
if (active) {
this._y = newY;
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
Instance of Symbol 322 MovieClip "player" in Symbol 441 MovieClip Frame 1
onClipEvent (load) {
function sReset() {
arrows = _root.arrowPass;
if (arrows == 0) {
bow._visible = false;
}
hasSeed = _root.seedPass;
lives = _root.lifePass;
score = _root.scorePass;
prevScore = score;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = _root.hpPass;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = _root.hpPass;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function vReset() {
arrows = 0;
bow._visible = false;
hasSeed = false;
score = prevScore;
prevPose = "";
vLock = false;
screenNudge = 0;
maxNudge = 160;
dead = false;
actionLock = false;
invincible = false;
invMax = 450;
invCount = invMax;
_root.life.ibar._visible = false;
_root.life.bar._xscale = 100;
vVelocity = 0;
hVelocity = 0;
grounded = false;
this._x = startX;
this._y = startY;
hp = 100;
maxRun = 10;
attackPwr = 20;
arrowPwr = 8;
jumpPwr = 40;
gravity = 4;
tVelocity = 30;
doneAttack = true;
doneShoot = true;
doneThrow = true;
countAttack = 0;
countShoot = 0;
countJump = 0;
countThrow = 0;
wincing = false;
winceCount = 0;
winceDelay = 60;
wincePose = false;
this._alpha = 100;
}
function getHit(damage, xoffset, knockBack, defensible) {
if (dead == false) {
if (pose == "roll") {
if (defensible) {
damageWas = damage;
damage = 0;
}
if (invincible) {
damage = 0;
knockBack = 0;
}
}
this.hp = this.hp - damage;
if (hp < 0) {
hp = 0;
}
this.vVelocity = -10;
grounded = false;
if (damageWas != 9) {
if (_parent.player._x < xoffset) {
this.hVelocity = knockBack * -1;
} else {
this.hVelocity = knockBack;
}
}
_root.life.bar._xscale = hp;
if (0 < damage) {
wincing = true;
winceTmp = 1;
u.start();
wincePose = true;
} else {
p.start();
}
}
}
function die() {
_root.world.player._alpha = 100;
dead = true;
_root.world.player.gotoAndStop("ko");
lives--;
if (lives >= 0) {
_root.fader.fadeType = "cont";
} else {
_root.fader.fadeType = "game";
lives++;
}
_root.fader.gotoAndPlay("fadeOut");
}
u = new Sound(this);
u.attachSound("urg");
p = new Sound(this);
p.attachSound("tink");
startX = this._x;
startY = this._y;
prevScore = 0;
score = 0;
lives = 3;
sReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (actionLock == false)) {
if (invincible) {
if (invCount == invMax) {
_root.life.ibar._visible = true;
}
invCount--;
_root.life.ibar._xscale = (invCount / invMax) * 100;
if (0 >= invCount) {
invincible = false;
_root.life.ibar._visible = false;
_root.life.ibar._xscale = 100;
invCount = invMax;
}
}
if (wincing == true) {
this._alpha = 75;
winceCount++;
if (winceCount == winceDelay) {
wincing = false;
winceCount = 0;
this._alpha = 100;
}
}
if (Key.isDown(Key.LEFT)) {
_xscale = -80;
}
if (Key.isDown(Key.RIGHT)) {
_xscale = 80;
}
if (Key.isDown(Key.SPACE)) {
countAttack++;
if (2 < countAttack) {
countAttack = 2;
}
} else {
countAttack = 0;
}
if (Key.isDown(65)) {
countShoot++;
if (2 < countShoot) {
countShoot = 2;
}
} else {
countShoot = 0;
}
if (Key.isDown(83)) {
countThrow++;
if (2 < countThrow) {
countThrow = 2;
}
} else {
countThrow = 0;
}
if (Key.isDown(Key.UP)) {
countJump++;
if (2 < countJump) {
countJump = 2;
}
} else {
countJump = 0;
}
prevPose = pose;
pose = "stand";
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "roll";
} else {
pose = "duck";
}
} else {
if (Key.isDown(Key.LEFT) || (Key.isDown(Key.RIGHT))) {
pose = "run";
}
if (vVelocity < 0) {
pose = "jumpUp";
}
if (0 < vVelocity) {
pose = "jumpDown";
}
if (hasSeed) {
if ((countThrow == 1) || (doneThrow == false)) {
pose = "throw";
}
}
if (0 < arrows) {
if ((countShoot == 1) || (doneShoot == false)) {
pose = "shoot";
}
}
if ((countAttack == 1) || (doneAttack == false)) {
pose = "attack";
}
if (wincePose) {
pose = "wince";
}
if (dead) {
pose = "ko";
}
}
if (invincible) {
pose = "roll";
}
if (pose != prevPose) {
gotoAndPlay(pose);
}
if (Key.isDown(Key.LEFT)) {
if ((maxRun * -1) < hVelocity) {
hVelocity--;
}
if (Key.isDown(Key.RIGHT)) {
hVelocity++;
}
}
if (Key.isDown(Key.RIGHT)) {
if (hVelocity < maxRun) {
hVelocity++;
}
}
if ((countJump == 1) && (Key.isDown(Key.DOWN) == false)) {
if (grounded) {
vVelocity = jumpPwr * -1;
grounded = false;
}
}
if (Key.isDown(80)) {
_root.dWindow.open(4, "Pause");
_root.jukebox.snd.setVolume(0);
}
if (Key.isDown(100)) {
if ((maxNudge * -1) < screenNudge) {
screenNudge = screenNudge - 20;
_root.world._x = _root.world._x + 20;
}
}
if (Key.isDown(102)) {
if (screenNudge < maxNudge) {
screenNudge = screenNudge + 20;
_root.world._x = _root.world._x - 20;
}
}
if (Key.isDown(101)) {
_root.world._x = _root.world._x + screenNudge;
screenNudge = 0;
}
if ((Key.isDown(Key.RIGHT) == false) && (Key.isDown(Key.LEFT) == false)) {
if (-1 >= hVelocity) {
hVelocity++;
}
if (hVelocity >= 1) {
hVelocity--;
}
}
if (grounded == false) {
vVelocity = vVelocity + gravity;
if (tVelocity < vVelocity) {
vVelocity = tVelocity;
}
}
newX = this._x + hVelocity;
newY = this._y + vVelocity;
if (_parent.ground.hitTest(newX + _parent._x, (this._y + _parent._y) + 3, true) == false) {
grounded = false;
}
if (_parent.ground.hitTest(newX + _parent._x, this._y + _parent._y, true)) {
hVelocity = 0;
} else {
this._x = this._x + hVelocity;
_root.world._x = _root.world._x + (hVelocity * -1);
}
if (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
if (0 < vVelocity) {
while (_parent.ground.hitTest(this._x + _parent._x, newY + _parent._y, true)) {
newY--;
}
grounded = true;
vVelocity = 0;
if (wincePose) {
wincePose = false;
}
if (hp == 0) {
die();
}
}
}
this._y = newY;
if (_root.world.safeY < this._y) {
die();
}
if (vLock == false) {
if (340 < (this._y + _parent._y)) {
_root.world._y = _root.world._y - 15;
}
if ((this._y + _parent._y) < 130) {
_root.world._y = _root.world._y + 10;
}
}
}
}
Instance of Symbol 399 MovieClip "beam" in Symbol 441 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.stop();
active = false;
this._visible = false;
this._x = startX;
this._y = startY;
shockCount = 0;
shockLimit = 300;
this._rotation = 0;
}
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (_parent.player.actionLock == false) {
if (active) {
this.play();
this._visible = true;
this._rotation = this._rotation + 2.5;
this._x = _parent.oni._x;
this._y = _parent.oni._y;
shockCount++;
if (this.hitMask.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, true) && (_parent.player.wincing == false)) {
_parent.player.getHit(20, this._x, 14, false);
}
}
if (shockCount == shockLimit) {
active = false;
this.stop();
this._x = startX;
this._y = startY;
this._rotation = 0;
shockCount = 0;
_parent.oni.move = true;
_parent.oni.goSummon = true;
}
}
}
Instance of Symbol 400 MovieClip "g3" in Symbol 441 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 8;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 4;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 401 MovieClip "g2" in Symbol 441 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 1;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 1;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 381 MovieClip "g1" in Symbol 441 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this.gotoAndPlay(1);
attackPwr = 12;
hp = 20;
vVelocity = 0;
hVelocity = 0;
this._x = startX;
this._y = starty;
speed = 3;
drift = 0;
driftCounter = 6;
maxDrift = 12;
hDrift = 0;
hDriftCounter = 3;
maxHDrift = 8;
dead = false;
}
function die() {
this.gotoAndPlay("poof");
}
function getHit(damage, xoff) {
hp = hp - damage;
if (0 >= hp) {
hp = 0;
die();
}
if (xoff < this._x) {
this.vVelocity = -10;
this.hVelocity = 14;
} else {
this.vVelocity = -10;
this.hVelocity = -14;
}
}
h = new Sound(this);
h.attachSound("heh");
startX = this._x;
startY = this._y;
attackTarget = _parent.player._x;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((dead == false) && (_parent.player.dead == false)) {
if (Math.abs(_parent.player._x - this._x) < 600) {
if (_parent.player.actionLock == false) {
attackTarget = _parent.player._x;
if (this.hitTest(_parent.player.hitMask) && (_parent.player.wincing == false)) {
_parent.player.getHit(attackPwr, this._x, 5, false);
if (_parent.player.invincible) {
getHit(_parent.player.attackPwr * 2, _parent.player._x);
}
}
if (attackTarget < this._x) {
this._xscale = -100;
if ((-500 < (attackTarget - this._x)) && ((attackTarget - this._x) < 0)) {
hVelocity = speed * -1;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
} else {
this._xscale = 100;
if (((attackTarget - this._x) < 500) && (0 < (attackTarget - this._x))) {
hVelocity = speed;
}
if (((this._x - 10) < attackTarget) && (attackTarget < (this._x + 10))) {
hVelocity = 0;
}
}
if (this._y < (_parent.player._y - 100)) {
vVelocity = speed;
} else {
vVelocity = speed * -1;
}
if (this.hitTest(_parent.player.attMask)) {
getHit(_parent.player.attackPwr, _parent.player._x);
}
if (this.hitTest(_parent.arrow1)) {
getHit(_parent.player.arrowPwr, _parent.player._x);
}
drift = drift + driftCounter;
if (maxDrift < drift) {
driftCounter = -1;
}
if (drift < (maxDrift * -1)) {
driftCounter = 1;
}
hDrift = hDrift + hDriftCounter;
if (maxHDrift < hDrift) {
hDriftCounter = -1;
}
if (hDrift < (maxHDrift * -1)) {
hDriftCounter = 1;
}
this._y = this._y + (vVelocity + drift);
this._x = this._x + (hVelocity + hDrift);
if (_root.world.safeY < this._y) {
this.die();
}
if (hVelocity != 0) {
if (-1 >= hVelocity) {
hVelocity = hVelocity + 1;
}
if (hVelocity >= 1) {
hVelocity = hVelocity - 1;
}
}
}
}
}
}
Instance of Symbol 414 MovieClip "oni" in Symbol 441 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
this._x = startX;
this._y = startY;
gotoAndPlay (1);
floatSpeed = 4;
origin = this._x;
floatPosition = 0;
maxFloat = 225;
floatDirection = -1;
move = true;
tollOffset = 60;
tollCount = 60;
tollOdd = true;
tolling = false;
moveToShock = false;
goSummon = false;
summonCount = 0;
summonDelay = 90;
dead = false;
hp = 100;
_root.bossGage.bar._xscale = hp;
}
function getHit() {
hp = hp - 25;
if (0 >= hp) {
hp = 0;
}
_root.bossGage.bar._xscale = hp;
}
function shockNow() {
moveToShock = false;
move = false;
_parent.beam.active = true;
s.start(0, 3);
}
function summon() {
h.start();
this.move = false;
this.gotoAndStop("shock");
_parent.g1.vReset();
_parent.g2.vReset();
_parent.g3.vReset();
_parent.shrine.pullStart = false;
}
function die() {
dead = true;
this.gotoAndStop("wince");
stop();
_root.bossGage._visible = false;
_parent.player.score = _parent.player.score + 100;
}
h = new Sound(this);
h.attachSound("heh");
s = new Sound(this);
s.attachSound("bolt");
startX = this._x;
startY = this._y;
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (dead && (0 < this._alpha)) {
this._alpha = this._alpha - 1;
}
if (dead && (0 >= this._alpha)) {
_parent.endBlock.tally = true;
}
if ((dead == false) && (_parent.player.dead == false)) {
if (_parent.player.actionLock == false) {
if (move) {
floatPosition = floatPosition + (floatSpeed * floatDirection);
this._x = origin + floatPosition;
if ((maxFloat * -1) >= floatPosition) {
floatDirection = 1;
this._xscale = -100;
}
if (floatPosition >= maxFloat) {
floatDirection = -1;
this._xscale = 100;
}
}
if ((floatPosition == 0) && (moveToShock == true)) {
shockNow();
}
if (tolling) {
this.gotoAndStop("wince");
move = false;
if (tollOdd) {
this._x = (origin + floatPosition) - tollCount;
tollOdd = false;
} else {
this._x = (origin + floatPosition) + tollCount;
tollOdd = true;
}
tollCount = tollCount - 1;
if (tollCount == 0) {
move = true;
tolling = false;
gotoAndPlay (1);
tollCount = tollOffset;
if (0 >= hp) {
die();
}
}
}
if (goSummon) {
summonCount++;
if (summonCount == summonDelay) {
summon();
}
if (summonCount == (summonDelay + 30)) {
move = true;
this.gotoAndPlay(1);
goSummon = false;
summonCount = 0;
}
}
}
}
}
Instance of Symbol 427 MovieClip "shrine" in Symbol 441 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
shutter = true;
pullCount = 0;
pullLimit = 120;
pullStart = false;
tolling = false;
alreadyRung = false;
this.gotoAndStop(1);
mRope.gotoAndStop(1);
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if ((0 >= ((_parent.g1.hp + _parent.g2.hp) + _parent.g3.hp)) && (this.pullStart == false)) {
this.gotoAndPlay(2);
}
if (alreadyRung == false) {
if ((shutter == false) && (this.hitTest(_parent.player.attMask))) {
this.gotoAndPlay(21);
if (_parent.oni.tolling == false) {
_parent.oni.getHit();
alreadyRung = true;
}
_parent.oni.tolling = true;
}
}
if (shutter == false) {
pullCount++;
if (pullCount == pullLimit) {
pullCount = 0;
this.gotoAndPlay(11);
}
}
}
Instance of Symbol 217 MovieClip in Symbol 441 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.maxRun = 15;
_parent.player.jumpPwr = 58;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 219 MovieClip in Symbol 441 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("c");
startX = this._x;
startY = this._y;
}
onClipEvent (enterFrame) {
if (_parent.player.hitMask.hitTest(this._x + _parent._x, this._y + _parent._y, false)) {
_parent.player.invincible = true;
s.start();
this._y = _root.world.safeY;
}
if (_root.fader.resetFlag) {
this._x = startX;
this._y = startY;
}
}
Instance of Symbol 223 MovieClip "deathEffect" in Symbol 441 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
s.attachSound("swoosh2");
}
Instance of Symbol 225 MovieClip "arrow1" in Symbol 441 MovieClip Frame 1
onClipEvent (load) {
function activateRight() {
if (active == false) {
bearing = "right";
this._xscale = 80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX;
this._y = originY;
active = true;
}
}
function activateLeft() {
if (active == false) {
bearing = "left";
this._xscale = -80;
originX = _parent.player._x + 100;
originY = _parent.player._y - 29;
this._x = originX - 200;
this._y = originY;
active = true;
}
}
function deactivate() {
active = false;
this._x = returnX;
this._y = returnY;
_parent.player.arrows--;
if (_parent.player.arrows < 0) {
_parent.player.arrows = 0;
}
}
range = 500;
speed = 60;
returnX = 0;
returnY = _root.world.safeY;
originX = _parent.player._x + 100;
originY = _parent.player._y - 49;
active = false;
bearing = right;
}
onClipEvent (enterFrame) {
if (active) {
if (bearing == "right") {
this._x = this._x + speed;
if ((originX + range) < this._x) {
deactivate();
}
} else {
this._x = this._x - speed;
if (this._x < ((originX - 200) - range)) {
deactivate();
}
}
}
}
Instance of Symbol 241 MovieClip in Symbol 441 MovieClip Frame 1
onClipEvent (load) {
bounceHeight = -60;
}
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y, false) && (0 < _parent.player.vVelocity)) {
if (active == false) {
this.gotoAndPlay(2);
}
}
}
Instance of Symbol 268 MovieClip "endBlock" in Symbol 441 MovieClip Frame 1
onClipEvent (load) {
function vReset() {
_root.jukebox.gotoAndStop(1);
egStart = false;
tally = false;
active = true;
s1 = 0;
s2 = 0;
s3 = 0;
st = 0;
sr = "Paladin";
scoreDone = 0;
lifeDone = 0;
healthDone = 0;
si = 4000;
scorePlay = false;
}
vReset();
}
onClipEvent (enterFrame) {
if (_root.fader.resetFlag) {
vReset();
}
if (this.hitTest(_parent.player._x + _parent._x, _parent.player._y + _parent._y)) {
_root.bossGage._visible = true;
if (active) {
_root.dWindow.open(5, "Gallan! Once I open the shrine, you ring the bell! We just have to watch out for the G..G..GYAAH!");
_root.jukebox.snd.stop();
egStart = true;
active = false;
}
}
if (tally) {
if (scorePlay == false) {
_root.jukebox.snd.stop();
_root.jukebox.gotoAndPlay(3);
scorePlay = true;
_quality = "MEDIUM";
}
if (((scoreDone + lifeDone) + heathDone) != 3) {
_root.tboard._visible = true;
_parent.player.actionLock = true;
_parent.player.stop();
if (s1 < _parent.player.score) {
s1 = s1 + 100;
} else {
scoreDone = 1;
}
if (s2 < ((_parent.player.lives - 1) * 1000)) {
s2 = s2 + 50;
} else {
lifeDone = 1;
}
if (s3 < (_parent.player.hp * 10)) {
s3 = s3 + 5;
} else {
healthDone = 1;
}
st = (s1 + s2) + s3;
if (st < si) {
sr = "Page";
}
if ((st >= si) && (st < (si * 2))) {
sr = "Squire";
}
if ((st >= (si * 2)) && (st < (si * 3))) {
sr = "Knight";
}
if ((st >= (si * 3)) && (st < (si * 4))) {
sr = "Hero";
}
if (st >= (si * 4)) {
sr = "Paladin";
}
}
st = (s1 + s2) + s3;
}
}
Instance of Symbol 433 MovieClip "ground" in Symbol 441 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}