Frame 1
var _mochiads_game_id = "890f3fb085f72295";
mochi.as2.MochiServices.connect("890f3fb085f72295");
var all_script_address = "";
mochi.as2.MochiAd.showPreGameAd({id:_mochiads_game_id, res:"550x400"});
score_script_address1 = all_script_address + "daily_scores.php";
score_script_address2 = all_script_address + "weekly_scores.php";
score_script_address3 = all_script_address + "monthly_scores.php";
if (_allowsound == false) {
} else {
_allowsound = true;
}
_uninitiated = true;
_root._slotEffect = "MISS";
_justloaded = false;
Frame 9
if (_allowsound == false) {
} else {
_allowsound = true;
}
if (_allowmusic == false) {
} else {
_allowmusic = true;
}
_uninitiated = true;
_justloaded = false;
stop();
startNewGame = false;
showHighScores = false;
saveData = null;
var saveData = SharedObject.getLocal("saveObject");
if (saveData.data._charlevel != undefined) {
continueButton._visible = true;
} else {
continueButton._visible = false;
}
Frame 10
stop();
_gameMode = null;
Frame 11
stop();
gameDifficulty = null;
Frame 12
if (showHighScores) {
gotoAndPlay (926);
}
Frame 28
if (_justloaded) {
gotoAndPlay (35);
}
Frame 35
function enemyAI() {
if (_enemyStunned) {
_enemyStunned = false;
gotoAndPlay (719);
} else if (_enemy == "bapho") {
if ((((_enemyhp < (0.2 * _enemymaxhp)) && (random(100) < 50)) || ((random(100) < 20) && (_enemyhp < (0.8 * _enemymaxhp)))) && (_enemymp >= _healmpCost)) {
_castedLoV = false;
_enemymp = _enemymp - _healmpCost;
gotoAndPlay (403);
} else if (((random(100) < 30) && (_enemymp > _LoVmpCost)) && ((_castedLoV == false) || (_charlevel > 100))) {
_enemymp = _enemymp - _LoVmpCost;
gotoAndPlay (310);
} else {
_castedLoV = false;
if ((random(100) < (25 + (_charlevel / 10))) && (_enemymp > _jumpAttackmpCost)) {
_enemymp = _enemymp - _jumpAttackmpCost;
gotoAndPlay (543);
} else {
gotoAndPlay (120);
}
}
} else if (_enemy == "eddga") {
if ((((_enemyhp < (0.2 * _enemymaxhp)) && (random(100) < 50)) || ((random(100) < 20) && (_enemyhp < (0.8 * _enemymaxhp)))) && (_enemymp >= _healmpCost)) {
_enemymp = _enemymp - _healmpCost;
gotoAndPlay (403);
} else if ((random(100) < 40) && (_enemymp > _fireballmpCost)) {
_enemymp = _enemymp - _fireballmpCost;
gotoAndPlay (668);
} else {
gotoAndPlay (591);
}
} else if (_enemy == "turtle") {
if ((((_enemyhp < (0.2 * _enemymaxhp)) && (random(100) < 50)) || ((random(100) < 20) && (_enemyhp < (0.8 * _enemymaxhp)))) && (_enemymp >= _healmpCost)) {
_enemymp = _enemymp - _healmpCost;
gotoAndPlay (403);
} else if ((random(100) < 20) && (_enemymp > _waterballmpCost)) {
_enemymp = _enemymp - _waterballmpCost;
gotoAndPlay (840);
} else {
gotoAndPlay (765);
}
}
}
function getCharHP() {
_root._charmaxhp = Math.round(((_root._charvit * 6) + (_root._charlevel * 11)) * (((100 + _root._charlevel) + _root._charvit) / 100)) + _root._charExtraHP;
}
function getCharMP() {
_root._charmaxmp = Math.round((_root._charint + _root._charlevel) * _root._mpFactor);
_levels50to100 = (_root._charint + _root._charlevel) - 50;
if (_levels50to100 > 50) {
_levels50to100 = 50;
} else if (_levels50to100 < 0) {
_levels50to100 = 0;
}
_root._charmaxmp = _root._charmaxmp + _levels50to100;
_levels0to50 = _root._charint + _root._charlevel;
if (_levels0to50 > 50) {
_levels0to50 = 50;
}
_root._charmaxmp = _root._charmaxmp + _levels0to50;
}
function getEnemyMP() {
_root._enemymp = (_root._enemymaxmp = Math.round((_root._enemyint + _root._enemylevel) * _mpFactor));
_levels50to100 = Math.round(_root._enemyint + _root._enemylevel) - 50;
if (_levels50to100 > 50) {
_levels50to100 = 50;
} else if (_levels50to100 < 0) {
_levels50to100 = 0;
}
_root._enemymp = (_root._enemymaxmp = _root._enemymaxmp + _levels50to100);
_levels0to50 = Math.round(_root._enemyint) + _root._enemylevel;
if (_levels0to50 > 50) {
_levels0to50 = 50;
}
_root._enemymp = (_root._enemymaxmp = _root._enemymaxmp + Math.round(_levels0to50));
}
function calculateDef() {
if (_root._slotEffect == "STRIPARMOR") {
_root._chardef = 10;
} else {
_root._chardef = _root._chararmor + 10;
}
}
function calculatebaseDamage() {
if (_root._slotEffect == "STRIPWEAPON") {
_root._actualcharstr = ((_root._charstr + (4 * _root._swordmasterylevel)) + (_root._chardamageFactor * _root._charlevel)) + 20;
} else {
_root._actualcharstr = (((_root._charstr + (4 * _root._swordmasterylevel)) + _root._charWeaponDamage) + (_root._chardamageFactor * _root._charlevel)) + 20;
}
_root._charbasedamage = (Math.round(_root._actualcharstr) + "-") + Math.round(_root._actualcharstr * 1.1);
}
function calculateCrit() {
if (_root._slotEffect == "MISFORTUNE") {
_root._charcrit = 0;
} else {
_root._charcrit = Math.floor(_root._charluk * 0.75) + 1;
}
}
function calculateEva() {
if (_root._slotEffect == "SLOW") {
_root._chareva = ((Math.round(_root._charagi / 2) + " (") + ((70 - _root._enemydex) + Math.round(_root._charagi / 2))) + "%)";
} else {
_root._chareva = ((_root._charagi + " (") + ((70 - _root._enemydex) + _root._charagi)) + "%)";
}
}
function calculateHit() {
_root._charhit = (((_root._chardex + 50) + " (") + Math.round((_root._chardex + 50) - _root._enemyagi)) + "%)";
}
function calculateHits() {
if (_root._slotEffect == "SLOW") {
_root._charhits = Math.floor((1 + Math.floor((_root._charagi + 1) / 20)) / 2);
if (_root._charhits < 1) {
_root._charhits = 1;
}
} else if (_root._quickenNow) {
_root._charhits = 2 + Math.floor((_root._charagi + 1) / (20 - _root._quickenlevel));
} else {
_root._charhits = 1 + Math.floor((_root._charagi + 1) / 20);
}
}
function LoVSubDamage() {
if (_quitgame) {
_enemydamagedealt = Math.ceil(((_root._charmaxhp / 12) * (100 + random(50))) / 100);
} else {
_enemydamagedealt = Math.round((((_enemyint * (100 + random(100))) / 100) * (101 - (_charint / 1.5))) / 500);
}
}
function waterballSubDamage() {
if (_quitgame) {
_enemydamagedealt = Math.ceil(((_root._charmaxhp / 3) * (100 + random(100))) / 100);
} else {
_enemydamagedealt = Math.round((((_enemyint * (100 + random(100))) / 100) * (101 - (_charint / 1.5))) / 110);
}
}
function charhpbar() {
_charhptemp = _charhptemp - ((_charhptemp - _charhp) / 9);
if (_charhptemp < 0) {
_charhptemp = 0;
}
charhealth.text = (charhealth2.text = Math.round(_charhptemp));
charmaxhealth.text = (charmaxhealth2.text = _charmaxhp);
charhealthbar._xscale = ((_charhptemp - ((_charhptemp - _charhp) / 9)) / _charmaxhp) * 100;
if (charhealthbar._xscale < 0) {
charhealthbar._xscale = 0;
}
}
function enemyhpbar() {
_enemyhptemp = _enemyhptemp - ((_enemyhptemp - _enemyhp) / 9);
if (_enemyhptemp < 0) {
_enemyhptemp = 0;
}
enemyhealth.text = (enemyhealth2.text = Math.round(_enemyhptemp));
enemymaxhealth.text = (enemymaxhealth2.text = _enemymaxhp);
enemyhealthbar._xscale = ((_enemyhptemp - ((_enemyhptemp - _enemyhp) / 9)) / _enemymaxhp) * 100;
if (enemyhealthbar._xscale < 0) {
enemyhealthbar._xscale = 0;
}
}
function charmpbarFunction() {
_charmptemp = _charmptemp - ((_charmptemp - _charmp) / 9);
if (_charmptemp < 0) {
_charmptemp = 0;
}
charmp.text = (charmp2.text = Math.round(_charmptemp));
charmaxmp.text = (charmaxmp2.text = _charmaxmp);
charmpbar._xscale = ((_charmptemp - ((_charmptemp - _charmp) / 9)) / _charmaxmp) * 100;
if (charmpbar._xscale < 0) {
charmpbar._xscale = 0;
}
}
function enemympbarFunction() {
_enemymptemp = _enemymptemp - ((_enemymptemp - _enemymp) / 9);
if (_enemymptemp < 0) {
_enemymptemp = 0;
}
enemymp.text = (enemymp2.text = Math.round(_enemymptemp));
enemymaxmp.text = (enemymaxmp2.text = _enemymaxmp);
enemympbar._xscale = ((_enemymptemp - ((_enemymptemp - _enemymp) / 9)) / _enemymaxmp) * 100;
if (enemympbar._xscale < 0) {
enemympbar._xscale = 0;
}
}
saveComplete = function () {
gotoAndStop (9);
};
gotoandstop47 = function () {
gotoAndStop (81);
};
isDefendSuccessful = function () {
if (_defendNow && (random(100) < (40 + (_defendlevel * 5)))) {
_defendSuccess = true;
} else {
_defendSuccess = false;
}
};
ifDefendNow = function () {
if (_defendSuccess) {
_actualchardef = 100;
} else if (_defendNow) {
_actualchardef = _chardef + (2.5 * _defendlevel);
} else {
_actualchardef = _chardef;
}
};
toggleMusic = function () {
if (bgmusic._currentframe == 2) {
_allowmusic = false;
} else if (bgmusic._currentframe == 3) {
_allowsound = false;
} else {
_allowsound = true;
_allowmusic = true;
}
};
commandAttack = function () {
_bashNow = false;
gotoAndPlay (81);
};
commandDefend = function () {
if (_defendlevel > 0) {
_defendNow = true;
gotoAndPlay (437);
}
};
commandBash = function () {
if (_bashlevel > 0) {
if ((_charmp >= _bashMPCost1) && (_bashlevel <= 5)) {
_charmp = _charmp - _bashMPCost1;
gotoAndPlay (81);
_bashnow = true;
} else if ((_charmp >= _bashMPCost2) && (_bashlevel >= 5)) {
_charmp = _charmp - _bashMPCost2;
gotoAndPlay (81);
_bashnow = true;
}
}
};
commandProvoke = function () {
if (((_provokelevel > 0) && (_charmp >= 10)) && (_provokedThisRound == false)) {
_provokeCounter = 6 + (_provokelevel / 2);
_enemyprovoked = true;
_provokedThisRound = true;
_charmp = _charmp - 10;
gotoAndPlay (234);
}
};
commandHeal = function () {
if ((_heallevel > 0) && (_charmp >= 20)) {
_charmp = _charmp - 20;
gotoAndPlay (196);
}
};
commandQuicken = function () {
if ((_charmp >= _quickenMPCost) && (_quickenNow == false)) {
_quickenedThisRound = true;
_charmp = _charmp - _quickenMPCost;
if (_root._slotEffect == "SLOW") {
_root._slotEffect = "MISS";
} else {
_quickenCounter = 6 + (_quickenlevel / 2);
_quickenNow = true;
}
_root.calculateHits();
gotoAndPlay (445);
}
};
commandStatus = function () {
gotoAndStop (541);
};
commandShop = function () {
gotoAndStop (540);
};
justInitiated = false;
dmgtextSpeed = 20;
_fpsdelay = getTimer();
_frames = 0;
if (_justloaded) {
if (_enemy == "") {
_enemy = "bapho";
}
} else {
var randomNumber = random(100);
if (randomNumber < 33) {
_enemy = "eddga";
} else if (randomNumber < 66) {
_enemy = "bapho";
} else {
_enemy = "turtle";
}
}
charhpbar();
enemyhpbar();
charmpbarFunction();
enemympbarFunction();
_counterFactor = 7.5;
_chardamageFactor = 0.25;
_charExtraHP = 80;
_enemyExtraHP = 80;
_fireballmpCost = 25;
_LoVmpCost = 40;
_waterballmpCost = 25;
_healmpCost = 20;
_bashMPCost1 = 5;
_bashMPCost2 = 10;
_mpFactor = 0.8;
_quickenMPCost = 15;
_jumpAttackmpCost = 15;
_charvitLimit = 99;
_charintLimit = 99;
_charstrLimit = 99;
_charagiLimit = 99;
_charlukLimit = 99;
_chardexLimit = 99;
if (_uninitiated) {
justInitiated = true;
stop();
_root.usedPotionThisRound = false;
_uninitiated = false;
_quickenedThisRound = false;
_provokedThisRound = false;
_charMoney = 0;
_quickenNow = false;
_showStatus = true;
_autoSelect = true;
_charWeaponDamage = 1;
_statpoints = 48;
_skillpoints = 1;
_charlevel = 1;
_charvit = 1;
getCharHP();
_root._charhp = _root._charmaxhp;
_charhptemp = 0;
_charint = 1;
getCharMP();
_root._charmp = _root._charmaxmp;
_charmptemp = 0;
_charstr = 1;
_chararmor = 1;
_charagi = 1;
_charluk = 1;
_chardex = 1;
_heallevel = 0;
_defendlevel = 0;
_bashlevel = 0;
_regenlevel = 0;
_provokelevel = 0;
_swordmasterylevel = 0;
_quickenlevel = 0;
_counterlevel = 0;
redPotions = 0;
yellowPotions = 0;
whitePotions = 0;
bluePotions = 0;
_root._slotEffect = "MISS";
}
_quickenCounter = 0;
_provokeCounter = 0;
_quickenedThisRound = false;
_quickenNow = false;
_enemyprovoked = false;
_provokedThisRound = false;
_justLeveledUp = true;
_enemylevel = _charlevel;
if (!_justloaded) {
if (_enemy == "bapho") {
_enemyExtraHP = 70 + (_enemylevel * 5);
_enemyvit = 1;
_enemyint = 5;
_enemystr = 20;
_enemydef = 1;
_enemyagi = 1;
_enemycrit = 1;
_enemydex = 30;
_levelupCounter = 1;
while (_levelupCounter < _enemylevel) {
_enemyvit = _enemyvit + 1;
_enemyint = _enemyint + (1 + Math.floor(_levelupCounter / 50));
_enemystr = _enemystr + (2.6 + Math.floor(_levelupCounter / 50));
_enemydef = _enemydef + 0.5;
_enemyagi = _enemyagi + 0.2;
_enemydex = _enemydex + 1;
_levelupCounter++;
}
} else if (_enemy == "eddga") {
_enemyExtraHP = 80 + (_enemylevel * 7);
_enemyvit = 5;
_enemyint = 5;
_enemystr = 20;
_enemydef = 5;
_enemyagi = -25;
_enemycrit = 1;
_enemydex = 25;
_levelupCounter = 1;
while (_levelupCounter < _enemylevel) {
_enemyvit = _enemyvit + 1.33333333333333;
_enemyint = _enemyint + (0.666666666666667 + (Math.floor(_levelupCounter / 50) * 0.666666666666667));
_enemystr = _enemystr + (3.1 + Math.floor(_levelupCounter / 50));
_enemydef = _enemydef + 0.5;
_enemyagi = _enemyagi + 0.2;
_enemydex = _enemydex + 1;
_levelupCounter++;
}
} else if (_enemy == "turtle") {
_enemyExtraHP = 100 + (_enemylevel * 10);
_enemyvit = 10;
_enemyint = 1;
_enemystr = 15;
_enemydef = 5;
_enemyagi = -50;
_enemycrit = 1;
_enemydex = 49;
_levelupCounter = 1;
while (_levelupCounter < _enemylevel) {
_enemyvit = _enemyvit + 1;
_enemyint = _enemyint + (0.9 + (Math.floor(_levelupCounter / 50) * 0.9));
_enemystr = _enemystr + (2.85 + Math.floor(_levelupCounter / 50));
_enemydef = _enemydef + 0.6;
_enemyagi = _enemyagi + 0.1;
_enemydex = _enemydex + 1;
_levelupCounter++;
}
}
_enemyhp = (_enemymaxhp = Math.round((((_root._enemyvit * 6) + (_root._enemylevel * 6)) * ((100 + _root._enemylevel) + _root._enemyvit)) / 100) + _enemyExtraHP);
_enemyhptemp = 0;
getEnemyMP();
_enemymptemp = 0;
if (_enemydef > 75) {
_enemydef = 75;
}
_enemyprovoked = false;
}
_root.calculateHits();
_root.calculatebaseDamage();
_root.getCharHP();
_root.getCharMP();
_root.calculateEva();
_root.calculateHit();
_root.calculateDef();
_root.calculateCrit();
tacticsClip._visible = false;
if ((_showStatus == false) || (_justloaded)) {
statusScreen._visible = false;
play();
}
shopButton._visible = false;
fightButton._visible = false;
shopWindow._visible = false;
dimmer._visible = false;
fps.onEnterFrame = function () {
_frames++;
if ((getTimer() - _fpsdelay) >= 1000) {
_fpsdelay = getTimer();
_framerate = _frames;
_frames = 0;
}
};
Frame 36
tacticsClip._visible = true;
statusScreen._visible = true;
charhpbar();
enemyhpbar();
charmpbarFunction();
enemympbarFunction();
charhealthbar.onEnterFrame = function () {
if (_allowsound) {
if (_allowmusic) {
tellTarget (bgmusic) {
gotoAndStop (2);
};
} else {
tellTarget (bgmusic) {
gotoAndStop (3);
};
}
} else {
tellTarget (bgmusic) {
gotoAndStop (4);
};
}
charhpbar();
enemyhpbar();
charmpbarFunction();
enemympbarFunction();
};
if (_enemy == "eddga") {
tellTarget (enemyEnter) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyEnter) {
gotoAndStop (3);
};
}
Frame 65
if (_enemy == "eddga") {
tellTarget (enemyStand) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyStand) {
gotoAndStop (3);
};
}
Frame 76
if (_allowsound) {
sound_drawweapon.play();
}
Frame 79
_quickenCounter--;
_provokeCounter--;
if (_quickenCounter <= 0) {
_quickenedThisRound = false;
_quickenNow = false;
_root.calculateHits();
}
if (_provokeCounter <= 0) {
_enemyprovoked = false;
_provokedThisRound = false;
}
if (_justloaded) {
_justLeveledUp = false;
_justloaded = false;
_regenerateThisRound = true;
} else if (_justLeveledUp) {
_regenerateThisRound = true;
_justLeveledUp = false;
} else {
_regenerateThisRound = false;
}
play();
if (_enemy == "eddga") {
tellTarget (enemyStand) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyStand) {
gotoAndStop (3);
};
}
Frame 80
suicideButton._visible = false;
suicideButton2._visible = false;
_enemyStunned = false;
if (_regenerateThisRound) {
} else {
usedPotionThisRound = false;
_regenerateThisRound = true;
if ((1 + Math.floor(_charmaxmp / 100)) < 10) {
_charmp = _charmp + (1 + Math.floor(_charmaxmp / 100));
} else {
_charmp = _charmp + 9;
}
if ((1 + Math.floor(_enemymaxmp / 100)) < 10) {
_enemymp = _enemymp + (1 + Math.floor(_enemymaxmp / 100));
} else {
_enemymp = _enemymp + 9;
}
if ((_root._slotEffect == "POISON") || (poisoncounter > 0)) {
_charhp = _charhp - Math.floor(_charmaxhp / 20);
poisoncounter--;
} else {
_charhp = _charhp + (1 + Math.floor(_charmaxhp / 100));
}
_enemyhp = _enemyhp + (1 + Math.floor(_enemymaxhp / 100));
if (_charmp > _charmaxmp) {
_charmp = _charmaxmp;
}
if (_enemymp > _enemymaxmp) {
_enemymp = _enemymaxmp;
}
if (_charhp > _charmaxhp) {
_charhp = _charmaxhp;
}
if (_charhp < 1) {
_charhp = 1;
}
if (_enemyhp > _enemymaxhp) {
_enemyhp = _enemymaxhp;
}
}
charhpbar();
enemyhpbar();
charmpbarFunction();
enemympbarFunction();
stop();
if (((_autoHeal && (_charhp < ((_charmaxhp * _healPercent) / 100))) && (_heallevel > 0)) && (_charmp >= 20)) {
_charmp = _charmp - 20;
gotoAndPlay (196);
} else if (_autoDefend && (_defendlevel > 0)) {
_defendNow = true;
gotoAndPlay (437);
} else if (((_autoProvoke && (_provokelevel > 0)) && (_charmp >= 10)) && (_provokedThisRound == false)) {
_provokeCounter = 6 + (_provokelevel / 2);
_enemyprovoked = true;
_provokedThisRound = true;
_charmp = _charmp - 10;
gotoAndPlay (234);
} else if (((_autoQuicken && (_charmp >= 15)) && (_quickenlevel > 0)) && (_quickenNow == false)) {
_quickenedThisRound = true;
_charmp = _charmp - _quickenMPCost;
if (_root._slotEffect == "SLOW") {
_root._slotEffect = "MISS";
} else {
_quickenCounter = 6 + (_quickenlevel / 2);
_quickenNow = true;
}
_root.calculateHits();
gotoAndPlay (445);
} else if (((_autoBash && (_charmp >= _bashMPCost1)) && (_bashlevel <= 5)) && (_bashlevel > 0)) {
_charmp = _charmp - _bashMPCost1;
gotoAndPlay (81);
_bashnow = true;
} else if ((_autoBash && (_charmp >= _bashMPCost2)) && (_bashlevel >= 5)) {
_charmp = _charmp - _bashMPCost2;
gotoAndPlay (81);
_bashnow = true;
} else if (_autoAttack) {
_bashNow = false;
gotoAndPlay (81);
}
_quitgame = false;
function command(_button, _skillLevel, _skillMPCost) {
if ((_skillLevel < 1) || (_charmp < _skillMPCost)) {
if (_button == "defend") {
defendButton._visible = false;
}
if (_button == "bash") {
bashButton._visible = false;
}
if (_button == "provoke") {
provokeButton._visible = false;
}
if (_button == "heal") {
healButton._visible = false;
}
if (_button == "quicken") {
quickenButton._visible = false;
}
}
}
potionList._visible = false;
f_hint._visible = false;
quickenButton._visible = true;
defendButton._visible = true;
bashButton._visible = true;
provokeButton._visible = true;
healButton._visible = true;
if (usedPotionThisRound) {
useButton._visible = false;
}
if (_quickenedThisRound) {
quickenButton._visible = false;
}
if (_provokedThisRound) {
provokeButton._visible = false;
}
command("defend", _defendlevel, 0);
if (_bashlevel > 5) {
command("bash", _bashlevel, 15);
} else {
command("bash", _bashlevel, 7);
}
command("provoke", _provokelevel, 15);
command("heal", _heallevel, 20);
command("quicken", _quickenlevel, 15);
temp2.onEnterFrame = function () {
if (Key.isDown(18)) {
f_hint._visible = true;
} else {
f_hint._visible = false;
}
if (Key.isDown(112)) {
commandAttack();
} else if (Key.isDown(113)) {
commandDefend();
} else if (Key.isDown(114)) {
commandBash();
} else if (Key.isDown(115)) {
commandProvoke();
} else if (Key.isDown(116)) {
commandHeal();
} else if (Key.isDown(117)) {
commandQuicken();
} else if (Key.isDown(120)) {
commandStatus();
} else if (Key.isDown(121)) {
commandShop();
}
quickenButton._visible = true;
defendButton._visible = true;
bashButton._visible = true;
provokeButton._visible = true;
healButton._visible = true;
if (_quickenedThisRound) {
quickenButton._visible = false;
}
if (_provokedThisRound) {
provokeButton._visible = false;
}
command("defend", _defendlevel, 10);
if (_bashlevel > 5) {
command("bash", _bashlevel, 15);
} else {
command("bash", _bashlevel, 7);
}
command("provoke", _provokelevel, 15);
command("heal", _heallevel, 20);
command("quicken", _quickenlevel, _quickenMPCost);
};
if (_enemy == "eddga") {
tellTarget (enemyStand) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyStand) {
gotoAndStop (3);
};
}
Frame 81
_hitsDone = 0;
_charAttackDamage = 0;
Frame 82
if (_allowsound) {
sound_dash.play();
}
Frame 92
if (_allowsound && (_bashnow)) {
sound_bash.play();
}
if (_bashnow) {
stop();
basheffect.play();
_bashcounter = 15;
}
basheffect.onEnterFrame = function () {
if (_bashcounter > 0) {
_bashcounter--;
} else {
play();
}
};
if (_enemy == "eddga") {
tellTarget (enemyStand) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyStand) {
gotoAndStop (3);
};
}
Frame 93
if (_allowsound) {
sound_swingweapon.play();
}
Frame 94
_root.calculateCrit();
if (_bashnow) {
_charhitrate = (_chardex + 50) + (5 * _bashlevel);
} else {
_charhitrate = _chardex + 50;
}
if ((_bashnow == false) && (random(100) < _charcrit)) {
_enemywashit = true;
_criticalAttackNow = true;
} else if (random(100) < (_charhitrate - _enemyagi)) {
_enemywashit = true;
}
Frame 95
if (_allowsound) {
if (_enemywashit) {
if (_bashnow || (_criticalAttackNow)) {
sound_wapak.play();
} else {
sound_slash.play();
}
} else {
sound_dash.play();
}
}
Frame 96
_enemyStunned = false;
if (_enemywashit) {
if (_root._slotEffect == "STRIPWEAPON") {
_root._actualcharstr = ((_root._charstr + (4 * _root._swordmasterylevel)) + (_root._chardamageFactor * _root._charlevel)) + 20;
} else {
_root._actualcharstr = (((_root._charstr + (4 * _root._swordmasterylevel)) + _root._charWeaponDamage) + (_root._chardamageFactor * _root._charlevel)) + 20;
}
if (_enemyprovoked) {
_actualenemydef = _enemydef * (1 - (0.09 * _provokelevel));
} else {
_actualenemydef = _enemydef;
}
if (_bashnow) {
if ((_bashlevel > 5) && (random(100) < ((_bashlevel * 10) - 30))) {
_enemyStunned = true;
}
if (_enemyprovoked) {
_chardamagedealt = Math.round(((((_actualcharstr * ((100 + (40 * _bashlevel)) + random(10))) / 100) * (101 - _actualenemydef)) / 100) - ((_enemyvit / 2) / 1.2));
} else {
_chardamagedealt = Math.round(((((_actualcharstr * ((100 + (40 * _bashlevel)) + random(10))) / 100) * (101 - _actualenemydef)) / 100) - (_enemyvit / 2));
}
} else if (_criticalAttackNow) {
if (_enemyprovoked) {
_chardamagedealt = Math.round((_actualcharstr * 1.2) - ((_enemyvit / 2) / 1.2));
} else {
_chardamagedealt = Math.round((_actualcharstr * 1.2) - (_enemyvit / 2));
}
} else if (_enemyprovoked) {
_chardamagedealt = Math.round(((((_actualcharstr * (100 + random(10))) / 100) * (101 - _actualenemydef)) / 100) - ((_enemyvit / 2) / 1.2));
} else {
_chardamagedealt = Math.round(((((_actualcharstr * (100 + random(10))) / 100) * (101 - _actualenemydef)) / 100) - (_enemyvit / 2));
}
if (_chardamagedealt < 1) {
_chardamagedealt = 1;
}
_charAttackDamage = _charAttackDamage + _chardamagedealt;
_enemyhp = _enemyhp - _chardamagedealt;
_chartotaldamagedealt = _chartotaldamagedealt + _chardamagedealt;
if ((_charhits > 1) && (_bashNow == false)) {
_thousands = Math.floor(_chardamagedealt / 1000);
_hundreds = Math.floor((_chardamagedealt - (_thousands * 1000)) / 100);
_tens = Math.floor(((_chardamagedealt - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_chardamagedealt - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
tellTarget (subDamage) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._ones;
enemydamagedealt2.text = "";
enemydamagedealt1.text = "";
};
} else if (_digits == 2) {
tellTarget (subDamage) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else if (_digits == 3) {
tellTarget (subDamage) {
minus.text = "-";
enemydamagedealt4.text = _root._hundreds;
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else {
tellTarget (subDamage) {
minus.text = "-";
enemydamagedealt4.text = _root._thousands;
enemydamagedealt3.text = _root._hundreds;
enemydamagedealt2.text = _root._tens;
enemydamagedealt1.text = _root._ones;
};
}
}
} else if ((_charhits > 1) && (_bashNow == false)) {
tellTarget (subDamage) {
minus.text = "";
enemydamagedealt4.text = "m";
enemydamagedealt3.text = "i";
enemydamagedealt2.text = "s";
enemydamagedealt1.text = "s";
};
}
basheffect2.stop();
if (_bashnow) {
basheffect2.play();
whiteFlash.play();
}
if (_criticalAttackNow) {
basheffect2.play();
}
if (_enemy == "eddga") {
tellTarget (enemyHit) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyHit) {
gotoAndStop (3);
};
}
Frame 98
_hitsDone++;
if (_enemyhp > 0) {
if ((_charhits > _hitsDone) && (_bashNow == false)) {
gotoAndPlay (92);
} else if (_bashNow) {
_bashnow = false;
}
}
_digits = 0;
if (_charAttackDamage > 0) {
_enemywashit = false;
_thousands = Math.floor(_charAttackDamage / 1000);
_hundreds = Math.floor((_charAttackDamage - (_thousands * 1000)) / 100);
_tens = Math.floor(((_charAttackDamage - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_charAttackDamage - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
_1.text = "";
_2.text = "-";
_3.text = _ones;
_4.text = "";
_5.text = "";
} else if (_digits == 2) {
_1.text = "";
_2.text = "-";
_3.text = _tens;
_4.text = _ones;
_5.text = "";
} else if (_digits == 3) {
_1.text = "-";
_2.text = _hundreds;
_3.text = _tens;
_4.text = _ones;
_5.text = "";
} else {
_1.text = "-";
_2.text = _thousands;
_3.text = _hundreds;
_4.text = _tens;
_5.text = _ones;
}
_chartotaldamagedealt = _chartotaldamagedealt + _chardamagedealt;
if ((_enemyhp <= 0) && (_allowsound)) {
if (_enemy == "eddga") {
sound_eddgadie.play();
} else if (_enemy == "bapho") {
sound_baphodie.play();
}
}
} else {
_1.text = "m";
_2.text = "i";
_3.text = "s";
_4.text = "s";
_5.text = "";
}
_criticalAttackNow = false;
var _speed1;
var _speed2;
var _speed3;
var _speed4;
var _speed5;
var _1counter;
var _2counter;
var _3counter;
var _4counter;
var _5counter;
_1._y = (_2._y = (_3._y = (_4._y = (_5._y = -100))));
_speed1 = (_speed2 = (_speed3 = (_speed4 = (_speed5 = 0))));
_ytarget = 130;
_1counter = 0;
_2counter = 3;
_3counter = 6;
_4counter = 9;
_5counter = 12;
___temp.onEnterFrame = function () {
if (_1counter <= 0) {
if (_1counter == 0) {
_1._y = _ytarget - 50;
_1counter--;
}
if (_1._y < _ytarget) {
_speed1 = _speed1 + ((_1._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_1._y - _ytarget) < 5) {
_speed1 = _speed1 / 10;
}
} else {
_1._y = _ytarget - 10;
}
} else {
_1counter--;
}
if (_2counter <= 0) {
if (_2counter == 0) {
_2._y = _ytarget - 50;
_2counter--;
}
if (_2._y < _ytarget) {
_speed2 = _speed2 + ((_2._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_2._y - _ytarget) < 5) {
_speed2 = _speed2 / 10;
}
} else {
_2._y = _ytarget - 10;
}
} else {
_2counter--;
}
if (_3counter <= 0) {
if (_3counter == 0) {
_3._y = _ytarget - 50;
_3counter--;
}
if (_3._y < _ytarget) {
_speed3 = _speed3 + ((_3._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_3._y - _ytarget) < 5) {
_speed3 = _speed3 / 10;
}
} else {
_3._y = _ytarget - 10;
}
} else {
_3counter--;
}
if (_4counter <= 0) {
if (_4counter == 0) {
_4._y = _ytarget - 50;
_4counter--;
}
if (_4._y < _ytarget) {
_speed4 = _speed4 + ((_4._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_4._y - _ytarget) < 5) {
_speed4 = _speed4 / 10;
}
} else {
_4._y = _ytarget - 10;
}
} else {
_4counter--;
}
if (_5counter <= 0) {
if (_5counter == 0) {
_5._y = _ytarget - 50;
_5counter--;
}
if (_5._y < _ytarget) {
_speed5 = _speed5 + ((_5._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_5._y - _ytarget) < 5) {
_speed5 = _speed5 / 10;
}
} else {
_5._y = _ytarget - 10;
}
} else {
_5counter--;
}
_1._y = _1._y - _speed1;
_2._y = _2._y - _speed2;
_3._y = _3._y - _speed3;
_4._y = _4._y - _speed4;
_5._y = _5._y - _speed5;
};
Frame 99
enemyHit._visible = false;
enemyDead._visible = false;
if (_enemyhp > 0) {
enemyHit._visible = true;
if (_enemy == "eddga") {
tellTarget (enemyHit) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyHit) {
gotoAndStop (3);
};
}
} else {
enemyDead._visible = true;
if (_enemy == "bapho") {
if (_allowsound) {
sound_baphodie.play();
}
} else if (_enemy == "eddga") {
tellTarget (enemyDead) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyDead) {
gotoAndStop (3);
};
}
whiteFlash.play();
}
Frame 103
if (_enemyhp > 0) {
if (_enemy == "eddga") {
tellTarget (enemyStand) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyStand) {
gotoAndStop (3);
};
}
} else {
enemyStand._visible = false;
}
Frame 104
if (_enemyhp > 0) {
if (_enemy == "eddga") {
tellTarget (enemyStand) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyStand) {
gotoAndStop (3);
};
}
} else {
enemyStand._visible = false;
}
Frame 118
if (_enemyhp <= 0) {
leveledUpAlready = false;
gotoAndPlay (536);
} else {
enemyAI();
}
Frame 120
if (_defendNow) {
charStand.gotoAndStop(2);
} else {
charStand.gotoAndStop(1);
}
Frame 151
_enemyhitrate = (_enemydex + _enemylevel) + 30;
_charevarate = _charagi + _charlevel;
if (random(100) < (_enemyhitrate - _charevarate)) {
_charwashit = true;
}
Frame 152
if (_allowsound) {
if (_charwashit) {
sound_slash.play();
} else {
sound_dash.play();
}
}
Frame 154
isDefendSuccessful();
if ((_allowsound && (_defendSuccess)) && (_charwashit)) {
sound_clang.play();
}
Frame 158
charDie._visible = false;
if (_defendNow) {
charDefend._visible = true;
tellTarget (charDefend) {
gotoAndPlay (9);
};
charHit._visible = false;
} else {
charDefend._visible = false;
charHit._visible = true;
}
Frame 160
_digits = 0;
_charDead = false;
if (_charwashit) {
_charwashit = false;
if (_enemyprovoked) {
_actualenemystr = _enemystr * (1 + (0.02 * _provokelevel));
} else {
_actualenemystr = _enemystr;
}
_root.calculateDef();
_root.ifDefendNow();
_enemydamagedealt = Math.round(((((_actualenemystr * (100 + random(10))) / 100) * (101 - _actualchardef)) / 100) - (_charvit / 2));
if (_enemydamagedealt < 1) {
_enemydamagedealt = 1;
}
_thousands = Math.floor(_enemydamagedealt / 1000);
_hundreds = Math.floor((_enemydamagedealt - (_thousands * 1000)) / 100);
_tens = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
__1.text = "";
__2.text = "-";
__3.text = _ones;
__4.text = "";
__5.text = "";
} else if (_digits == 2) {
__1.text = "";
__2.text = "-";
__3.text = _tens;
__4.text = _ones;
__5.text = "";
} else if (_digits == 3) {
__1.text = "-";
__2.text = _hundreds;
__3.text = _tens;
__4.text = _ones;
__5.text = "";
} else {
__1.text = "-";
__2.text = _thousands;
__3.text = _hundreds;
__4.text = _tens;
__5.text = _ones;
}
_charhp = _charhp - _enemydamagedealt;
_enemytotaldamagedealt = _enemytotaldamagedealt + _enemydamagedealt;
if ((_charhp <= 0) && (_allowsound)) {
sound_chardie.play();
}
} else {
__1.text = "m";
__2.text = "i";
__3.text = "s";
__4.text = "s";
__5.text = "";
}
if (_charhp > 0) {
charDie._visible = false;
} else {
_charDead = true;
whiteFlash.play();
charDie._visible = true;
charHit._visible = false;
charDefend._visible = false;
}
var __speed1;
var __speed2;
var __speed3;
var __speed4;
var __speed5;
var __1counter;
var __2counter;
var __3counter;
var __4counter;
var __5counter;
__1._y = (__2._y = (__3._y = (__4._y = (__5._y = -100))));
__speed1 = (__speed2 = (__speed3 = (__speed4 = (__speed5 = 0))));
__ytarget = 130;
__1counter = 0;
__2counter = 3;
__3counter = 6;
__4counter = 9;
__5counter = 12;
__temp.onEnterFrame = function () {
if (__1counter <= 0) {
if (__1counter == 0) {
__1._y = __ytarget - 50;
__1counter--;
}
if (__1._y < __ytarget) {
__speed1 = __speed1 + ((__1._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__1._y - __ytarget) < 5) {
__speed1 = __speed1 / 10;
}
} else {
__1._y = __ytarget - 10;
}
} else {
__1counter--;
}
if (__2counter <= 0) {
if (__2counter == 0) {
__2._y = __ytarget - 50;
__2counter--;
}
if (__2._y < __ytarget) {
__speed2 = __speed2 + ((__2._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__2._y - __ytarget) < 5) {
__speed2 = __speed2 / 10;
}
} else {
__2._y = __ytarget - 10;
}
} else {
__2counter--;
}
if (__3counter <= 0) {
if (__3counter == 0) {
__3._y = __ytarget - 50;
__3counter--;
}
if (__3._y < __ytarget) {
__speed3 = __speed3 + ((__3._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__3._y - __ytarget) < 5) {
__speed3 = __speed3 / 10;
}
} else {
__3._y = __ytarget - 10;
}
} else {
__3counter--;
}
if (__4counter <= 0) {
if (__4counter == 0) {
__4._y = __ytarget - 50;
__4counter--;
}
if (__4._y < __ytarget) {
__speed4 = __speed4 + ((__4._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__4._y - __ytarget) < 5) {
__speed4 = __speed4 / 10;
}
} else {
__4._y = __ytarget - 10;
}
} else {
__4counter--;
}
if (__5counter <= 0) {
if (__5counter == 0) {
__5._y = __ytarget - 50;
__5counter--;
}
if (__5._y < __ytarget) {
__speed5 = __speed5 + ((__5._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__5._y - __ytarget) < 5) {
__speed5 = __speed5 / 10;
}
} else {
__5._y = __ytarget - 10;
}
} else {
__5counter--;
}
__1._y = __1._y - __speed1;
__2._y = __2._y - __speed2;
__3._y = __3._y - __speed3;
__4._y = __4._y - __speed4;
__5._y = __5._y - __speed5;
};
Frame 164
_counterAttack = false;
charCounter._visible = false;
if ((_charDead == false) && (random(100) < (_counterlevel * _counterFactor))) {
charHit._visible = false;
charDefend._visible = false;
charCounter._visible = true;
_counterAttack = true;
}
Frame 165
if (_allowsound && (_counterAttack)) {
sound_swingweapon.play();
}
Frame 167
_root.calculateCrit();
if ((_charhp > 0) && (random(100) < _charcrit)) {
_criticalAttackNow = true;
}
if (_allowsound && (_counterAttack)) {
if (_criticalAttackNow) {
sound_wapak.play();
} else {
sound_slash.play();
}
}
if (_charhp > 0) {
charDie._visible = false;
charStand._visible = true;
} else {
charDie._visible = true;
charStand._visible = false;
}
Frame 168
if (_counterAttack) {
if (_criticalAttackNow) {
basheffect2.play();
}
_charAttackDamage = 0;
if (_root._slotEffect == "STRIPWEAPON") {
_root._actualcharstr = ((_root._charstr + (4 * _root._swordmasterylevel)) + (_root._chardamageFactor * _root._charlevel)) + 20;
} else {
_root._actualcharstr = (((_root._charstr + (4 * _root._swordmasterylevel)) + _root._charWeaponDamage) + (_root._chardamageFactor * _root._charlevel)) + 20;
}
if (_enemyprovoked) {
_actualenemydef = _enemydef * (1 - (0.09 * _provokelevel));
} else {
_actualenemydef = _enemydef;
}
if (_criticalAttackNow) {
if (_enemyprovoked) {
_chardamagedealt = Math.round((_actualcharstr * 1.2) - ((_enemyvit / 2) / 1.2));
} else {
_chardamagedealt = Math.round((_actualcharstr * 1.2) - (_enemyvit / 2));
}
} else if (_enemyprovoked) {
_chardamagedealt = Math.round(((((_actualcharstr * (100 + random(10))) / 100) * (101 - _actualenemydef)) / 100) - ((_enemyvit / 2) / 1.2));
} else {
_chardamagedealt = Math.round(((((_actualcharstr * (100 + random(10))) / 100) * (101 - _actualenemydef)) / 100) - (_enemyvit / 2));
}
_chardamagedealt = _chardamagedealt * (1 + ((_counterlevel * 2) / 10));
if (_chardamagedealt < 1) {
_chardamagedealt = 1;
}
if (_chardamagedealt >= _enemyhp) {
_chardamagedealt = _enemyhp - 1;
}
_charAttackDamage = _charAttackDamage + _chardamagedealt;
_enemyhp = _enemyhp - _chardamagedealt;
_chartotaldamagedealt = _chartotaldamagedealt + _chardamagedealt;
}
enemyShadow._visible = false;
baphohit._visible = false;
if (_counterAttack) {
baphohit._visible = true;
baphoUncountered._visible = false;
charStand._visible = false;
enemyShadow._visible = true;
}
Frame 171
if (_counterAttack) {
_digits = 0;
_thousands = Math.floor(_charAttackDamage / 1000);
_hundreds = Math.floor((_charAttackDamage - (_thousands * 1000)) / 100);
_tens = Math.floor(((_charAttackDamage - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_charAttackDamage - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
_1.text = "";
_2.text = "-";
_3.text = _ones;
_4.text = "";
_5.text = "";
} else if (_digits == 2) {
_1.text = "";
_2.text = "-";
_3.text = _tens;
_4.text = _ones;
_5.text = "";
} else if (_digits == 3) {
_1.text = "-";
_2.text = _hundreds;
_3.text = _tens;
_4.text = _ones;
_5.text = "";
} else {
_1.text = "-";
_2.text = _thousands;
_3.text = _hundreds;
_4.text = _tens;
_5.text = _ones;
}
}
var _speed1;
var _speed2;
var _speed3;
var _speed4;
var _speed5;
var _1counter;
var _2counter;
var _3counter;
var _4counter;
var _5counter;
_1._y = (_2._y = (_3._y = (_4._y = (_5._y = -100))));
_speed1 = (_speed2 = (_speed3 = (_speed4 = (_speed5 = 0))));
_ytarget = 130;
_1counter = 0;
_2counter = 3;
_3counter = 6;
_4counter = 9;
_5counter = 12;
___temp.onEnterFrame = function () {
if (_1counter <= 0) {
if (_1counter == 0) {
_1._y = _ytarget - 50;
_1counter--;
}
if (_1._y < _ytarget) {
_speed1 = _speed1 + ((_1._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_1._y - _ytarget) < 5) {
_speed1 = _speed1 / 10;
}
} else {
_1._y = _ytarget - 10;
}
} else {
_1counter--;
}
if (_2counter <= 0) {
if (_2counter == 0) {
_2._y = _ytarget - 50;
_2counter--;
}
if (_2._y < _ytarget) {
_speed2 = _speed2 + ((_2._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_2._y - _ytarget) < 5) {
_speed2 = _speed2 / 10;
}
} else {
_2._y = _ytarget - 10;
}
} else {
_2counter--;
}
if (_3counter <= 0) {
if (_3counter == 0) {
_3._y = _ytarget - 50;
_3counter--;
}
if (_3._y < _ytarget) {
_speed3 = _speed3 + ((_3._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_3._y - _ytarget) < 5) {
_speed3 = _speed3 / 10;
}
} else {
_3._y = _ytarget - 10;
}
} else {
_3counter--;
}
if (_4counter <= 0) {
if (_4counter == 0) {
_4._y = _ytarget - 50;
_4counter--;
}
if (_4._y < _ytarget) {
_speed4 = _speed4 + ((_4._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_4._y - _ytarget) < 5) {
_speed4 = _speed4 / 10;
}
} else {
_4._y = _ytarget - 10;
}
} else {
_4counter--;
}
if (_5counter <= 0) {
if (_5counter == 0) {
_5._y = _ytarget - 50;
_5counter--;
}
if (_5._y < _ytarget) {
_speed5 = _speed5 + ((_5._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_5._y - _ytarget) < 5) {
_speed5 = _speed5 / 10;
}
} else {
_5._y = _ytarget - 10;
}
} else {
_5counter--;
}
_1._y = _1._y - _speed1;
_2._y = _2._y - _speed2;
_3._y = _3._y - _speed3;
_4._y = _4._y - _speed4;
_5._y = _5._y - _speed5;
};
Frame 174
if (_charhp > 0) {
charStand._visible = true;
}
Frame 195
_defendNow = false;
if (_charhp > 0) {
if ((_regenlevel > 0) && (_charhp < _charmaxhp)) {
_regennow = true;
gotoAndPlay (196);
} else {
gotoAndPlay (79);
}
} else {
gotoAndStop (923);
}
Frame 196
if (_enemy == "eddga") {
tellTarget (enemyStand) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyStand) {
gotoAndStop (3);
};
}
if (_defendNow) {
charStand.gotoAndStop(2);
} else {
charStand.gotoAndStop(1);
}
Frame 197
if (_allowsound) {
sound_aah.play();
}
Frame 204
_digits = 0;
if (_regennow) {
_chardamagehealed = Math.round((5 * _regenlevel) + ((_charmaxhp / 500) * _regenlevel));
} else {
_chardamagehealed = Math.round((((100 + (_charint * 2)) * ((_charvit + (_heallevel * 10)) + _charlevel)) * (100 + random(20))) / 15000);
}
if (_chardamagehealed > (_charmaxhp - _charhp)) {
_chardamagehealed = _charmaxhp - _charhp;
}
_thousands = Math.floor(_chardamagehealed / 1000);
_hundreds = Math.floor((_chardamagehealed - (_thousands * 1000)) / 100);
_tens = Math.floor(((_chardamagehealed - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_chardamagehealed - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
__1.text = "";
__2.text = "+";
__3.text = _ones;
__4.text = "";
__5.text = "";
} else if (_digits == 2) {
__1.text = "";
__2.text = "+";
__3.text = _tens;
__4.text = _ones;
__5.text = "";
} else if (_digits == 3) {
__1.text = "+";
__2.text = _hundreds;
__3.text = _tens;
__4.text = _ones;
__5.text = "";
} else {
__1.text = "+";
__2.text = _thousands;
__3.text = _hundreds;
__4.text = _tens;
__5.text = _ones;
}
_charhp = _charhp + _chardamagehealed;
var __speed1;
var __speed2;
var __speed3;
var __speed4;
var __speed5;
var __1counter;
var __2counter;
var __3counter;
var __4counter;
var __5counter;
__1._y = (__2._y = (__3._y = (__4._y = (__5._y = -100))));
__speed1 = (__speed2 = (__speed3 = (__speed4 = (__speed5 = 0))));
__ytarget = 130;
__1counter = 0;
__2counter = 3;
__3counter = 6;
__4counter = 9;
__5counter = 12;
__temp.onEnterFrame = function () {
if (__1counter <= 0) {
if (__1counter == 0) {
__1._y = __ytarget - 50;
__1counter--;
}
if (__1._y < __ytarget) {
__speed1 = __speed1 + ((__1._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__1._y - __ytarget) < 5) {
__speed1 = __speed1 / 10;
}
} else {
__1._y = __ytarget - 10;
}
} else {
__1counter--;
}
if (__2counter <= 0) {
if (__2counter == 0) {
__2._y = __ytarget - 50;
__2counter--;
}
if (__2._y < __ytarget) {
__speed2 = __speed2 + ((__2._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__2._y - __ytarget) < 5) {
__speed2 = __speed2 / 10;
}
} else {
__2._y = __ytarget - 10;
}
} else {
__2counter--;
}
if (__3counter <= 0) {
if (__3counter == 0) {
__3._y = __ytarget - 50;
__3counter--;
}
if (__3._y < __ytarget) {
__speed3 = __speed3 + ((__3._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__3._y - __ytarget) < 5) {
__speed3 = __speed3 / 10;
}
} else {
__3._y = __ytarget - 10;
}
} else {
__3counter--;
}
if (__4counter <= 0) {
if (__4counter == 0) {
__4._y = __ytarget - 50;
__4counter--;
}
if (__4._y < __ytarget) {
__speed4 = __speed4 + ((__4._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__4._y - __ytarget) < 5) {
__speed4 = __speed4 / 10;
}
} else {
__4._y = __ytarget - 10;
}
} else {
__4counter--;
}
if (__5counter <= 0) {
if (__5counter == 0) {
__5._y = __ytarget - 50;
__5counter--;
}
if (__5._y < __ytarget) {
__speed5 = __speed5 + ((__5._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__5._y - __ytarget) < 5) {
__speed5 = __speed5 / 10;
}
} else {
__5._y = __ytarget - 10;
}
} else {
__5counter--;
}
__1._y = __1._y - __speed1;
__2._y = __2._y - __speed2;
__3._y = __3._y - __speed3;
__4._y = __4._y - __speed4;
__5._y = __5._y - __speed5;
};
Frame 229
if (_regennow) {
gotoAndPlay (79);
_regennow = false;
} else {
enemyAI();
}
Frame 234
if (_enemy == "eddga") {
tellTarget (enemyStand) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyStand) {
gotoAndStop (3);
};
}
Frame 277
if (_enemy == "eddga") {
tellTarget (enemyProvoked) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyProvoked) {
gotoAndStop (3);
};
}
Frame 309
enemyAI();
Frame 310
_castedLoV = true;
if (_allowsound) {
sound_ignite.play();
}
if (_defendNow) {
charStand.gotoAndStop(2);
} else {
charStand.gotoAndStop(1);
}
Frame 328
if (_allowsound) {
sound_boom.play();
}
_lovDamage = 0;
LoVSubDamage();
if (_enemydamagedealt < 1) {
_enemydamagedealt = 1;
}
_lovDamage = _lovDamage + _enemydamagedealt;
_charhp = _charhp - _enemydamagedealt;
_enemytotaldamagedealt = _enemytotaldamagedealt + _enemydamagedealt;
_thousands = Math.floor(_enemydamagedealt / 1000);
_hundreds = Math.floor((_enemydamagedealt - (_thousands * 1000)) / 100);
_tens = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
tellTarget (subDamage) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._ones;
enemydamagedealt2.text = "";
enemydamagedealt1.text = "";
};
} else if (_digits == 2) {
tellTarget (subDamage) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else if (_digits == 3) {
tellTarget (subDamage) {
minus.text = "-";
enemydamagedealt4.text = _root._hundreds;
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else {
tellTarget (subDamage) {
minus.text = "-";
enemydamagedealt4.text = _root._thousands;
enemydamagedealt3.text = _root._hundreds;
enemydamagedealt2.text = _root._tens;
enemydamagedealt1.text = _root._ones;
};
}
duplicateMovieClip (charHit, "charHit2", 2000);
charHit._x = 9999;
_flameCounter = 50;
flameExplosion.onEnterFrame = function () {
if (_flameCounter > 0) {
if ((_flameCounter % 10) == 1) {
duplicateMovieClip (flameExplosion, "flameExplosion" + _flameCounter, _flameCounter + 2000);
_random = (flameExplosion._xscale * (random(80) + 60)) / 100;
setProperty("flameExplosion" + _flameCounter, _xscale , _random);
setProperty("flameExplosion" + _flameCounter, _yscale , _random);
setProperty("flameExplosion" + _flameCounter, _x , (flameExplosion._x + random(75)) - 38);
setProperty("flameExplosion" + _flameCounter, _y , (flameExplosion._y + random(25)) - 10);
}
if ((_flameCounter % 10) == 5) {
duplicateMovieClip (flameExplosion, "flameExplosion" + _flameCounter, _flameCounter);
_random = (flameExplosion._xscale * (random(40) + 90)) / 100;
setProperty("flameExplosion" + _flameCounter, _xscale , _random);
setProperty("flameExplosion" + _flameCounter, _yscale , _random);
setProperty("flameExplosion" + _flameCounter, _x , (flameExplosion._x + random(75)) - 38);
setProperty("flameExplosion" + _flameCounter, _y , (flameExplosion._y + random(25)) - 20);
}
_flameCounter = _flameCounter - 1;
}
};
Frame 332
LoVSubDamage();
if (_enemydamagedealt < 1) {
_enemydamagedealt = 1;
}
_lovDamage = _lovDamage + _enemydamagedealt;
_charhp = _charhp - _enemydamagedealt;
_enemytotaldamagedealt = _enemytotaldamagedealt + _enemydamagedealt;
_thousands = Math.floor(_enemydamagedealt / 1000);
_hundreds = Math.floor((_enemydamagedealt - (_thousands * 1000)) / 100);
_tens = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
tellTarget (subDamage2) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._ones;
enemydamagedealt2.text = "";
enemydamagedealt1.text = "";
};
} else if (_digits == 2) {
tellTarget (subDamage2) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else if (_digits == 3) {
tellTarget (subDamage2) {
minus.text = "-";
enemydamagedealt4.text = _root._hundreds;
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else {
tellTarget (subDamage2) {
minus.text = "-";
enemydamagedealt4.text = _root._thousands;
enemydamagedealt3.text = _root._hundreds;
enemydamagedealt2.text = _root._tens;
enemydamagedealt1.text = _root._ones;
};
}
Frame 336
LoVSubDamage();
if (_enemydamagedealt < 1) {
_enemydamagedealt = 1;
}
_lovDamage = _lovDamage + _enemydamagedealt;
_charhp = _charhp - _enemydamagedealt;
_enemytotaldamagedealt = _enemytotaldamagedealt + _enemydamagedealt;
_thousands = Math.floor(_enemydamagedealt / 1000);
_hundreds = Math.floor((_enemydamagedealt - (_thousands * 1000)) / 100);
_tens = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
tellTarget (subDamage3) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._ones;
enemydamagedealt2.text = "";
enemydamagedealt1.text = "";
};
} else if (_digits == 2) {
tellTarget (subDamage3) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else if (_digits == 3) {
tellTarget (subDamage3) {
minus.text = "-";
enemydamagedealt4.text = _root._hundreds;
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else {
tellTarget (subDamage3) {
minus.text = "-";
enemydamagedealt4.text = _root._thousands;
enemydamagedealt3.text = _root._hundreds;
enemydamagedealt2.text = _root._tens;
enemydamagedealt1.text = _root._ones;
};
}
Frame 341
LoVSubDamage();
if (_enemydamagedealt < 1) {
_enemydamagedealt = 1;
}
_lovDamage = _lovDamage + _enemydamagedealt;
_charhp = _charhp - _enemydamagedealt;
_enemytotaldamagedealt = _enemytotaldamagedealt + _enemydamagedealt;
_thousands = Math.floor(_enemydamagedealt / 1000);
_hundreds = Math.floor((_enemydamagedealt - (_thousands * 1000)) / 100);
_tens = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
tellTarget (subDamage4) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._ones;
enemydamagedealt2.text = "";
enemydamagedealt1.text = "";
};
} else if (_digits == 2) {
tellTarget (subDamage4) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else if (_digits == 3) {
tellTarget (subDamage4) {
minus.text = "-";
enemydamagedealt4.text = _root._hundreds;
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else {
tellTarget (subDamage4) {
minus.text = "-";
enemydamagedealt4.text = _root._thousands;
enemydamagedealt3.text = _root._hundreds;
enemydamagedealt2.text = _root._tens;
enemydamagedealt1.text = _root._ones;
};
}
Frame 346
LoVSubDamage();
if (_enemydamagedealt < 1) {
_enemydamagedealt = 1;
}
_lovDamage = _lovDamage + _enemydamagedealt;
_charhp = _charhp - _enemydamagedealt;
_enemytotaldamagedealt = _enemytotaldamagedealt + _enemydamagedealt;
_thousands = Math.floor(_enemydamagedealt / 1000);
_hundreds = Math.floor((_enemydamagedealt - (_thousands * 1000)) / 100);
_tens = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
tellTarget (subDamage5) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._ones;
enemydamagedealt2.text = "";
enemydamagedealt1.text = "";
};
} else if (_digits == 2) {
tellTarget (subDamage5) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else if (_digits == 3) {
tellTarget (subDamage5) {
minus.text = "-";
enemydamagedealt4.text = _root._hundreds;
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else {
tellTarget (subDamage5) {
minus.text = "-";
enemydamagedealt4.text = _root._thousands;
enemydamagedealt3.text = _root._hundreds;
enemydamagedealt2.text = _root._tens;
enemydamagedealt1.text = _root._ones;
};
}
Frame 351
LoVSubDamage();
if (_enemydamagedealt < 1) {
_enemydamagedealt = 1;
}
_lovDamage = _lovDamage + _enemydamagedealt;
_charhp = _charhp - _enemydamagedealt;
_enemytotaldamagedealt = _enemytotaldamagedealt + _enemydamagedealt;
_thousands = Math.floor(_enemydamagedealt / 1000);
_hundreds = Math.floor((_enemydamagedealt - (_thousands * 1000)) / 100);
_tens = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
tellTarget (subDamage6) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._ones;
enemydamagedealt2.text = "";
enemydamagedealt1.text = "";
};
} else if (_digits == 2) {
tellTarget (subDamage6) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else if (_digits == 3) {
tellTarget (subDamage6) {
minus.text = "-";
enemydamagedealt4.text = _root._hundreds;
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else {
tellTarget (subDamage6) {
minus.text = "-";
enemydamagedealt4.text = _root._thousands;
enemydamagedealt3.text = _root._hundreds;
enemydamagedealt2.text = _root._tens;
enemydamagedealt1.text = _root._ones;
};
}
Frame 356
LoVSubDamage();
if (_enemydamagedealt < 1) {
_enemydamagedealt = 1;
}
_lovDamage = _lovDamage + _enemydamagedealt;
_charhp = _charhp - _enemydamagedealt;
_enemytotaldamagedealt = _enemytotaldamagedealt + _enemydamagedealt;
_thousands = Math.floor(_enemydamagedealt / 1000);
_hundreds = Math.floor((_enemydamagedealt - (_thousands * 1000)) / 100);
_tens = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
tellTarget (subDamage7) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._ones;
enemydamagedealt2.text = "";
enemydamagedealt1.text = "";
};
} else if (_digits == 2) {
tellTarget (subDamage7) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else if (_digits == 3) {
tellTarget (subDamage7) {
minus.text = "-";
enemydamagedealt4.text = _root._hundreds;
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else {
tellTarget (subDamage7) {
minus.text = "-";
enemydamagedealt4.text = _root._thousands;
enemydamagedealt3.text = _root._hundreds;
enemydamagedealt2.text = _root._tens;
enemydamagedealt1.text = _root._ones;
};
}
Frame 361
LoVSubDamage();
if (_enemydamagedealt < 1) {
_enemydamagedealt = 1;
}
_lovDamage = _lovDamage + _enemydamagedealt;
_charhp = _charhp - _enemydamagedealt;
_enemytotaldamagedealt = _enemytotaldamagedealt + _enemydamagedealt;
_thousands = Math.floor(_enemydamagedealt / 1000);
_hundreds = Math.floor((_enemydamagedealt - (_thousands * 1000)) / 100);
_tens = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
tellTarget (subDamage8) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._ones;
enemydamagedealt2.text = "";
enemydamagedealt1.text = "";
};
} else if (_digits == 2) {
tellTarget (subDamage8) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else if (_digits == 3) {
tellTarget (subDamage8) {
minus.text = "-";
enemydamagedealt4.text = _root._hundreds;
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else {
tellTarget (subDamage8) {
minus.text = "-";
enemydamagedealt4.text = _root._thousands;
enemydamagedealt3.text = _root._hundreds;
enemydamagedealt2.text = _root._tens;
enemydamagedealt1.text = _root._ones;
};
}
Frame 366
LoVSubDamage();
if (_enemydamagedealt < 1) {
_enemydamagedealt = 1;
}
_lovDamage = _lovDamage + _enemydamagedealt;
_charhp = _charhp - _enemydamagedealt;
_enemytotaldamagedealt = _enemytotaldamagedealt + _enemydamagedealt;
_thousands = Math.floor(_enemydamagedealt / 1000);
_hundreds = Math.floor((_enemydamagedealt - (_thousands * 1000)) / 100);
_tens = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
tellTarget (subDamage9) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._ones;
enemydamagedealt2.text = "";
enemydamagedealt1.text = "";
};
} else if (_digits == 2) {
tellTarget (subDamage9) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else if (_digits == 3) {
tellTarget (subDamage9) {
minus.text = "-";
enemydamagedealt4.text = _root._hundreds;
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else {
tellTarget (subDamage9) {
minus.text = "-";
enemydamagedealt4.text = _root._thousands;
enemydamagedealt3.text = _root._hundreds;
enemydamagedealt2.text = _root._tens;
enemydamagedealt1.text = _root._ones;
};
}
Frame 371
LoVSubDamage();
if (_enemydamagedealt < 1) {
_enemydamagedealt = 1;
}
_lovDamage = _lovDamage + _enemydamagedealt;
_charhp = _charhp - _enemydamagedealt;
_enemytotaldamagedealt = _enemytotaldamagedealt + _enemydamagedealt;
_thousands = Math.floor(_enemydamagedealt / 1000);
_hundreds = Math.floor((_enemydamagedealt - (_thousands * 1000)) / 100);
_tens = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
tellTarget (subDamage10) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._ones;
enemydamagedealt2.text = "";
enemydamagedealt1.text = "";
};
} else if (_digits == 2) {
tellTarget (subDamage10) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else if (_digits == 3) {
tellTarget (subDamage10) {
minus.text = "-";
enemydamagedealt4.text = _root._hundreds;
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else {
tellTarget (subDamage10) {
minus.text = "-";
enemydamagedealt4.text = _root._thousands;
enemydamagedealt3.text = _root._hundreds;
enemydamagedealt2.text = _root._tens;
enemydamagedealt1.text = _root._ones;
};
}
Frame 381
_digits = 0;
_thousands = Math.floor(_lovDamage / 1000);
_hundreds = Math.floor((_lovDamage - (_thousands * 1000)) / 100);
_tens = Math.floor(((_lovDamage - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_lovDamage - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
__1.text = "";
__2.text = "-";
__3.text = _ones;
__4.text = "";
__5.text = "";
} else if (_digits == 2) {
__1.text = "";
__2.text = "-";
__3.text = _tens;
__4.text = _ones;
__5.text = "";
} else if (_digits == 3) {
__1.text = "-";
__2.text = _hundreds;
__3.text = _tens;
__4.text = _ones;
__5.text = "";
} else {
__1.text = "-";
__2.text = _thousands;
__3.text = _hundreds;
__4.text = _tens;
__5.text = _ones;
}
if (_charhp > 0) {
charDie._visible = false;
} else {
whiteFlash.play();
charDie._visible = true;
}
var __speed1;
var __speed2;
var __speed3;
var __speed4;
var __speed5;
var __1counter;
var __2counter;
var __3counter;
var __4counter;
var __5counter;
__1._y = (__2._y = (__3._y = (__4._y = (__5._y = -100))));
__speed1 = (__speed2 = (__speed3 = (__speed4 = (__speed5 = 0))));
__ytarget = 130;
__1counter = 0;
__2counter = 3;
__3counter = 6;
__4counter = 9;
__5counter = 12;
__temp.onEnterFrame = function () {
if (__1counter <= 0) {
if (__1counter == 0) {
__1._y = __ytarget - 50;
__1counter--;
}
if (__1._y < __ytarget) {
__speed1 = __speed1 + ((__1._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__1._y - __ytarget) < 5) {
__speed1 = __speed1 / 10;
}
} else {
__1._y = __ytarget - 10;
}
} else {
__1counter--;
}
if (__2counter <= 0) {
if (__2counter == 0) {
__2._y = __ytarget - 50;
__2counter--;
}
if (__2._y < __ytarget) {
__speed2 = __speed2 + ((__2._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__2._y - __ytarget) < 5) {
__speed2 = __speed2 / 10;
}
} else {
__2._y = __ytarget - 10;
}
} else {
__2counter--;
}
if (__3counter <= 0) {
if (__3counter == 0) {
__3._y = __ytarget - 50;
__3counter--;
}
if (__3._y < __ytarget) {
__speed3 = __speed3 + ((__3._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__3._y - __ytarget) < 5) {
__speed3 = __speed3 / 10;
}
} else {
__3._y = __ytarget - 10;
}
} else {
__3counter--;
}
if (__4counter <= 0) {
if (__4counter == 0) {
__4._y = __ytarget - 50;
__4counter--;
}
if (__4._y < __ytarget) {
__speed4 = __speed4 + ((__4._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__4._y - __ytarget) < 5) {
__speed4 = __speed4 / 10;
}
} else {
__4._y = __ytarget - 10;
}
} else {
__4counter--;
}
if (__5counter <= 0) {
if (__5counter == 0) {
__5._y = __ytarget - 50;
__5counter--;
}
if (__5._y < __ytarget) {
__speed5 = __speed5 + ((__5._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__5._y - __ytarget) < 5) {
__speed5 = __speed5 / 10;
}
} else {
__5._y = __ytarget - 10;
}
} else {
__5counter--;
}
__1._y = __1._y - __speed1;
__2._y = __2._y - __speed2;
__3._y = __3._y - __speed3;
__4._y = __4._y - __speed4;
__5._y = __5._y - __speed5;
};
if (_charhp > 0) {
charStand._visible = true;
} else {
charStand._visible = false;
}
Frame 382
removeMovieClip(charHit2);
Frame 402
_defendNow = false;
if (_charhp > 0) {
if (_quitgame) {
gotoAndPlay (310);
} else if ((_regenlevel > 0) && (_charhp < _charmaxhp)) {
_regennow = true;
gotoAndPlay (196);
} else {
gotoAndPlay (79);
}
} else {
gotoAndStop (923);
}
Frame 403
if (_enemy == "eddga") {
tellTarget (enemyStand) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyStand) {
gotoAndStop (3);
};
}
if (_defendNow) {
charStand.gotoAndStop(2);
} else {
charStand.gotoAndStop(1);
}
Frame 404
if (_allowsound) {
sound_aah.play();
}
Frame 411
_digits = 0;
_enemydamagehealed = Math.round((_enemyint * ((50 + random(50)) + _enemyvit)) / 60);
if (_enemydamagehealed > (_enemymaxhp - _enemyhp)) {
_enemydamagehealed = _enemymaxhp - _enemyhp;
}
_thousands = Math.floor(_enemydamagehealed / 1000);
_hundreds = Math.floor((_enemydamagehealed - (_thousands * 1000)) / 100);
_tens = Math.floor(((_enemydamagehealed - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_enemydamagehealed - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
_1.text = "";
_2.text = "+";
_3.text = _ones;
_4.text = "";
_5.text = "";
} else if (_digits == 2) {
_1.text = "";
_2.text = "+";
_3.text = _tens;
_4.text = _ones;
_5.text = "";
} else if (_digits == 3) {
_1.text = "+";
_2.text = _hundreds;
_3.text = _tens;
_4.text = _ones;
_5.text = "";
} else {
_1.text = "+";
_2.text = _thousands;
_3.text = _hundreds;
_4.text = _tens;
_5.text = _ones;
}
_enemyhp = _enemyhp + _enemydamagehealed;
var _speed1;
var _speed2;
var _speed3;
var _speed4;
var _speed5;
var _1counter;
var _2counter;
var _3counter;
var _4counter;
var _5counter;
_1._y = (_2._y = (_3._y = (_4._y = (_5._y = -100))));
_speed1 = (_speed2 = (_speed3 = (_speed4 = (_speed5 = 0))));
_ytarget = 130;
_1counter = 0;
_2counter = 3;
_3counter = 6;
_4counter = 9;
_5counter = 12;
___temp.onEnterFrame = function () {
if (_1counter <= 0) {
if (_1counter == 0) {
_1._y = _ytarget - 50;
_1counter--;
}
if (_1._y < _ytarget) {
_speed1 = _speed1 + ((_1._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_1._y - _ytarget) < 5) {
_speed1 = _speed1 / 10;
}
} else {
_1._y = _ytarget - 10;
}
} else {
_1counter--;
}
if (_2counter <= 0) {
if (_2counter == 0) {
_2._y = _ytarget - 50;
_2counter--;
}
if (_2._y < _ytarget) {
_speed2 = _speed2 + ((_2._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_2._y - _ytarget) < 5) {
_speed2 = _speed2 / 10;
}
} else {
_2._y = _ytarget - 10;
}
} else {
_2counter--;
}
if (_3counter <= 0) {
if (_3counter == 0) {
_3._y = _ytarget - 50;
_3counter--;
}
if (_3._y < _ytarget) {
_speed3 = _speed3 + ((_3._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_3._y - _ytarget) < 5) {
_speed3 = _speed3 / 10;
}
} else {
_3._y = _ytarget - 10;
}
} else {
_3counter--;
}
if (_4counter <= 0) {
if (_4counter == 0) {
_4._y = _ytarget - 50;
_4counter--;
}
if (_4._y < _ytarget) {
_speed4 = _speed4 + ((_4._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_4._y - _ytarget) < 5) {
_speed4 = _speed4 / 10;
}
} else {
_4._y = _ytarget - 10;
}
} else {
_4counter--;
}
if (_5counter <= 0) {
if (_5counter == 0) {
_5._y = _ytarget - 50;
_5counter--;
}
if (_5._y < _ytarget) {
_speed5 = _speed5 + ((_5._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_5._y - _ytarget) < 5) {
_speed5 = _speed5 / 10;
}
} else {
_5._y = _ytarget - 10;
}
} else {
_5counter--;
}
_1._y = _1._y - _speed1;
_2._y = _2._y - _speed2;
_3._y = _3._y - _speed3;
_4._y = _4._y - _speed4;
_5._y = _5._y - _speed5;
};
Frame 436
_defendNow = false;
if ((_regenlevel > 0) && (_charhp < _charmaxhp)) {
_regennow = true;
gotoAndPlay (196);
} else {
gotoAndPlay (79);
}
Frame 437
if (_enemy == "eddga") {
tellTarget (enemyStand) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyStand) {
gotoAndStop (3);
};
}
if (_defendNow) {
charDefend._visible = true;
charStand._visible = false;
} else {
charDefend._visible = false;
charStand._visible = true;
}
Frame 444
enemyAI();
Frame 445
if (_enemy == "eddga") {
tellTarget (enemyStand) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyStand) {
gotoAndStop (3);
};
}
Frame 473
enemyAI();
Frame 532
gotoAndPlay (5);
Frame 533
_root._autoSelected = false;
eddgaDead._visible = false;
baphoDead._visible = false;
turtleDead._visible = false;
if (_enemy == "eddga") {
eddgaDead._visible = true;
} else if (_enemy == "bapho") {
baphoDead._visible = true;
} else if (_enemy == "turtle") {
turtleDead._visible = true;
}
Frame 534
gotoAndPlay (538);
gotoAndStop (538);
eddgaDead._visible = false;
baphoDead._visible = false;
turtleDead._visible = false;
if (_enemy == "eddga") {
eddgaDead._visible = true;
} else if (_enemy == "bapho") {
baphoDead._visible = true;
} else if (_enemy == "turtle") {
turtleDead._visible = true;
}
Frame 535
gotoAndPlay (537);
eddgaDead._visible = false;
baphoDead._visible = false;
turtleDead._visible = false;
if (_enemy == "eddga") {
eddgaDead._visible = true;
} else if (_enemy == "bapho") {
baphoDead._visible = true;
} else if (_enemy == "turtle") {
turtleDead._visible = true;
}
Frame 536
if (leveledUpAlready) {
gotoAndPlay (5);
}
leveledUpAlready = true;
_exp++;
_temp12345 = 0;
if (_exp >= _expLevelUp) {
_exp = 0;
_charlevel++;
_temp12345 = 3 + Math.floor(_charlevel / 5);
if (_temp12345 > 23) {
_temp12345 = 23;
}
_statpoints = _statpoints + _temp12345;
if ((_charlevel % 2) == 1) {
_skillpoints++;
}
_temp1 = _root._charmaxhp;
_root.getCharHP();
_root._charhp = _root._charhp + (_root._charmaxhp - _temp1);
_temp2 = _root._charmaxmp;
getCharMP();
_root._charmp = _root._charmp + ((_root._charmaxmp * 1.1) - _temp2);
if (_root._charmp > _root._charmaxmp) {
_root._charmp = _root._charmaxmp;
}
}
eddgaDead._visible = false;
baphoDead._visible = false;
turtleDead._visible = false;
if (_enemy == "eddga") {
eddgaDead._visible = true;
} else if (_enemy == "bapho") {
baphoDead._visible = true;
} else if (_enemy == "turtle") {
turtleDead._visible = true;
}
Frame 537
stop();
redPotionClip._visible = false;
yellowPotionClip._visible = false;
whitePotionClip._visible = false;
bluePotionClip._visible = false;
potionsObtainedCounter = 0;
if (random(8) < 1) {
redPotions++;
redPotionClip._visible = true;
potionsObtainedCounter++;
}
if (random(15) < 1) {
yellowPotions++;
yellowPotionClip._visible = true;
potionsObtainedCounter++;
}
if (random(30) < 1) {
whitePotions++;
whitePotionClip._visible = true;
potionsObtainedCounter++;
}
if (random(30) < 1) {
bluePotions++;
bluePotionClip._visible = true;
potionsObtainedCounter++;
}
potionsPositionTemp = 0;
while (potionsPositionTemp < potionsObtainedCounter) {
if (redPotionClip._visible && (redPotionClip._x > 500)) {
redPotionClip._x = ((275 - (((potionsObtainedCounter - 1) * (redPotionClip._width - 5)) / 2)) + (potionsPositionTemp * (yellowPotionClip._width + 2.5))) - (potionsObtainedCounter * 2.5);
} else if (yellowPotionClip._visible && (yellowPotionClip._x > 500)) {
yellowPotionClip._x = ((275 - (((potionsObtainedCounter - 1) * (redPotionClip._width - 5)) / 2)) + (potionsPositionTemp * (yellowPotionClip._width + 2.5))) - (potionsObtainedCounter * 2.5);
} else if (whitePotionClip._visible && (whitePotionClip._x > 500)) {
whitePotionClip._x = ((275 - (((potionsObtainedCounter - 1) * (redPotionClip._width - 5)) / 2)) + (potionsPositionTemp * (yellowPotionClip._width + 2.5))) - (potionsObtainedCounter * 2.5);
} else if (bluePotionClip._visible && (bluePotionClip._x > 500)) {
bluePotionClip._x = ((275 - (((potionsObtainedCounter - 1) * (redPotionClip._width - 5)) / 2)) + (potionsPositionTemp * (yellowPotionClip._width + 2.5))) - (potionsObtainedCounter * 2.5);
}
potionsPositionTemp++;
}
if (potionsObtainedCounter == 0) {
zenyObtainedClip._y = 171 + (zenyObtainedClip._height / 2);
}
if (zenyBoosterCounter > 0) {
var zenyCounter;
zenyCounter = 0;
while (zenyCounter < 15) {
zenyObtained = 1200;
while (random(10000) < 9996) {
zenyObtained++;
}
zenyCounter++;
}
} else {
var zenyCounter;
zenyCounter = 0;
while (zenyCounter < 15) {
zenyObtained = 800;
while (random(10000) < 9990) {
zenyObtained++;
}
zenyCounter++;
}
}
_charMoney = _charMoney + zenyObtained;
zenyBoosterCounter--;
eddgaDead._visible = false;
baphoDead._visible = false;
turtleDead._visible = false;
if (_enemy == "eddga") {
eddgaDead._visible = true;
} else if (_enemy == "bapho") {
baphoDead._visible = true;
} else if (_enemy == "turtle") {
turtleDead._visible = true;
}
Frame 538
statusScreen._visible = true;
statusEx._visible = true;
gotoAndStop (35);
Frame 539
gotoAndStop (80);
if (_enemy == "eddga") {
tellTarget (enemyStand) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyStand) {
gotoAndStop (3);
};
}
Frame 540
_charhptemp = _charhptemp - ((_charhptemp - _charhp) / 9);
if (_charhptemp < 0) {
_charhptemp = 0;
}
charhealth.text = Math.round(_charhptemp);
charmaxhealth.text = _charmaxhp;
charhealthbar._xscale = ((_charhptemp - ((_charhptemp - _charhp) / 9)) / _charmaxhp) * 100;
if (charhealthbar._xscale < 0) {
charhealthbar._xscale = 0;
}
_enemyhptemp = _enemyhptemp - ((_enemyhptemp - _enemyhp) / 9);
if (_enemyhptemp < 0) {
_enemyhptemp = 0;
}
enemyhealth.text = Math.round(_enemyhptemp);
enemymaxhealth.text = _enemymaxhp;
enemyhealthbar._xscale = ((_enemyhptemp - ((_enemyhptemp - _enemyhp) / 9)) / _enemymaxhp) * 100;
if (enemyhealthbar._xscale < 0) {
enemyhealthbar._xscale = 0;
}
_charmptemp = _charmptemp - ((_charmptemp - _charmp) / 9);
if (_charmptemp < 0) {
_charmptemp = 0;
}
charmp.text = Math.round(_charmptemp);
charmaxmp.text = _charmaxmp;
charmpbar._xscale = ((_charmptemp - ((_charmptemp - _charmp) / 9)) / _charmaxmp) * 100;
if (charmpbar._xscale < 0) {
charmpbar._xscale = 0;
}
_enemymptemp = _enemymptemp - ((_enemymptemp - _enemymp) / 9);
if (_enemymptemp < 0) {
_enemymptemp = 0;
}
enemymp.text = Math.round(_enemymptemp);
enemymaxmp.text = _enemymaxmp;
enemympbar._xscale = ((_enemymptemp - ((_enemymptemp - _enemymp) / 9)) / _enemymaxmp) * 100;
if (enemympbar._xscale < 0) {
enemympbar._xscale = 0;
}
if (_enemy == "eddga") {
tellTarget (enemyStand) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyStand) {
gotoAndStop (3);
};
}
Frame 541
_charhptemp = _charhptemp - ((_charhptemp - _charhp) / 9);
if (_charhptemp < 0) {
_charhptemp = 0;
}
charhealth.text = Math.round(_charhptemp);
charmaxhealth.text = _charmaxhp;
charhealthbar._xscale = ((_charhptemp - ((_charhptemp - _charhp) / 9)) / _charmaxhp) * 100;
if (charhealthbar._xscale < 0) {
charhealthbar._xscale = 0;
}
_enemyhptemp = _enemyhptemp - ((_enemyhptemp - _enemyhp) / 9);
if (_enemyhptemp < 0) {
_enemyhptemp = 0;
}
enemyhealth.text = Math.round(_enemyhptemp);
enemymaxhealth.text = _enemymaxhp;
enemyhealthbar._xscale = ((_enemyhptemp - ((_enemyhptemp - _enemyhp) / 9)) / _enemymaxhp) * 100;
if (enemyhealthbar._xscale < 0) {
enemyhealthbar._xscale = 0;
}
_charmptemp = _charmptemp - ((_charmptemp - _charmp) / 9);
if (_charmptemp < 0) {
_charmptemp = 0;
}
charmp.text = Math.round(_charmptemp);
charmaxmp.text = _charmaxmp;
charmpbar._xscale = ((_charmptemp - ((_charmptemp - _charmp) / 9)) / _charmaxmp) * 100;
if (charmpbar._xscale < 0) {
charmpbar._xscale = 0;
}
_enemymptemp = _enemymptemp - ((_enemymptemp - _enemymp) / 9);
if (_enemymptemp < 0) {
_enemymptemp = 0;
}
enemymp.text = Math.round(_enemymptemp);
enemymaxmp.text = _enemymaxmp;
enemympbar._xscale = ((_enemymptemp - ((_enemymptemp - _enemymp) / 9)) / _enemymaxmp) * 100;
if (enemympbar._xscale < 0) {
enemympbar._xscale = 0;
}
_root.calculateHits();
statusScreen._visible = (statusEx._visible = true);
_root.calculatebaseDamage();
_root.getCharHP();
_root.getCharMP();
_root.calculateEva();
_root.calculateHit();
_root.calculateDef();
_root.calculateCrit();
if (_enemy == "eddga") {
tellTarget (enemyStand) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyStand) {
gotoAndStop (3);
};
}
Frame 542
if (_enemy == "eddga") {
tellTarget (enemyStand) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyStand) {
gotoAndStop (3);
};
}
Frame 543
if (_defendNow) {
charStand.gotoAndStop(2);
} else {
charStand.gotoAndStop(1);
}
Frame 547
_enemyhitrate = (_enemydex + _enemylevel) + 50;
_charevarate = _charagi + _charlevel;
if (random(100) < (_enemyhitrate - _charevarate)) {
_charwashit = true;
}
Frame 548
if (_allowsound) {
if (_charwashit) {
sound_slash.play();
} else {
sound_dash.play();
}
}
Frame 550
isDefendSuccessful();
if ((_allowsound && (_defendSuccess)) && (_charwashit)) {
sound_clang.play();
}
Frame 554
charDie._visible = false;
if (_defendNow) {
charDefend._visible = true;
tellTarget (charDefend) {
gotoAndPlay (9);
};
charHit._visible = false;
} else {
charDefend._visible = false;
charHit._visible = true;
}
Frame 556
_digits = 0;
if (_charwashit) {
_charwashit = false;
if (_enemyprovoked) {
_actualenemystr = _enemystr * (1 + (0.02 * _provokelevel));
} else {
_actualenemystr = _enemystr;
}
_root.calculateDef();
_root.ifDefendNow();
_enemydamagedealt = Math.round(((((_actualenemystr * (120 + random(50))) / 100) * (101 - _actualchardef)) / 100) - (_charvit / 2));
if (_enemydamagedealt < 1) {
_enemydamagedealt = 1;
}
_thousands = Math.floor(_enemydamagedealt / 1000);
_hundreds = Math.floor((_enemydamagedealt - (_thousands * 1000)) / 100);
_tens = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
__1.text = "";
__2.text = "-";
__3.text = _ones;
__4.text = "";
__5.text = "";
} else if (_digits == 2) {
__1.text = "";
__2.text = "-";
__3.text = _tens;
__4.text = _ones;
__5.text = "";
} else if (_digits == 3) {
__1.text = "-";
__2.text = _hundreds;
__3.text = _tens;
__4.text = _ones;
__5.text = "";
} else {
__1.text = "-";
__2.text = _thousands;
__3.text = _hundreds;
__4.text = _tens;
__5.text = _ones;
}
_charhp = _charhp - _enemydamagedealt;
_enemytotaldamagedealt = _enemytotaldamagedealt + _enemydamagedealt;
if ((_charhp <= 0) && (_allowsound)) {
sound_chardie.play();
}
} else {
__1.text = "m";
__2.text = "i";
__3.text = "s";
__4.text = "s";
__5.text = "";
}
if (_charhp > 0) {
charDie._visible = false;
} else {
whiteFlash.play();
charDie._visible = true;
charHit._visible = false;
charDefend._visible = false;
}
_defendNow = false;
var __speed1;
var __speed2;
var __speed3;
var __speed4;
var __speed5;
var __1counter;
var __2counter;
var __3counter;
var __4counter;
var __5counter;
__1._y = (__2._y = (__3._y = (__4._y = (__5._y = -100))));
__speed1 = (__speed2 = (__speed3 = (__speed4 = (__speed5 = 0))));
__ytarget = 130;
__1counter = 0;
__2counter = 3;
__3counter = 6;
__4counter = 9;
__5counter = 12;
__temp.onEnterFrame = function () {
if (__1counter <= 0) {
if (__1counter == 0) {
__1._y = __ytarget - 50;
__1counter--;
}
if (__1._y < __ytarget) {
__speed1 = __speed1 + ((__1._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__1._y - __ytarget) < 5) {
__speed1 = __speed1 / 10;
}
} else {
__1._y = __ytarget - 10;
}
} else {
__1counter--;
}
if (__2counter <= 0) {
if (__2counter == 0) {
__2._y = __ytarget - 50;
__2counter--;
}
if (__2._y < __ytarget) {
__speed2 = __speed2 + ((__2._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__2._y - __ytarget) < 5) {
__speed2 = __speed2 / 10;
}
} else {
__2._y = __ytarget - 10;
}
} else {
__2counter--;
}
if (__3counter <= 0) {
if (__3counter == 0) {
__3._y = __ytarget - 50;
__3counter--;
}
if (__3._y < __ytarget) {
__speed3 = __speed3 + ((__3._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__3._y - __ytarget) < 5) {
__speed3 = __speed3 / 10;
}
} else {
__3._y = __ytarget - 10;
}
} else {
__3counter--;
}
if (__4counter <= 0) {
if (__4counter == 0) {
__4._y = __ytarget - 50;
__4counter--;
}
if (__4._y < __ytarget) {
__speed4 = __speed4 + ((__4._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__4._y - __ytarget) < 5) {
__speed4 = __speed4 / 10;
}
} else {
__4._y = __ytarget - 10;
}
} else {
__4counter--;
}
if (__5counter <= 0) {
if (__5counter == 0) {
__5._y = __ytarget - 50;
__5counter--;
}
if (__5._y < __ytarget) {
__speed5 = __speed5 + ((__5._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__5._y - __ytarget) < 5) {
__speed5 = __speed5 / 10;
}
} else {
__5._y = __ytarget - 10;
}
} else {
__5counter--;
}
__1._y = __1._y - __speed1;
__2._y = __2._y - __speed2;
__3._y = __3._y - __speed3;
__4._y = __4._y - __speed4;
__5._y = __5._y - __speed5;
};
Frame 563
if (_charhp > 0) {
charDie._visible = false;
charStand._visible = true;
} else {
charDie._visible = true;
charStand._visible = false;
}
Frame 590
_defendNow = false;
if (_charhp > 0) {
if ((_regenlevel > 0) && (_charhp < _charmaxhp)) {
_regennow = true;
gotoAndPlay (196);
} else {
gotoAndPlay (79);
}
} else {
gotoAndStop (923);
}
Frame 591
if (_defendNow) {
charStand.gotoAndStop(2);
} else {
charStand.gotoAndStop(1);
}
Frame 622
_enemyhitrate = (_enemydex + _enemylevel) + 30;
_charevarate = _charagi + _charlevel;
if (random(100) < (_enemyhitrate - _charevarate)) {
_charwashit = true;
}
_poisonhit = false;
if (random(300) < (_root._charlevel + 30)) {
_charwashit = true;
_poisonhit = true;
}
Frame 624
if (_allowsound) {
if (_charwashit) {
sound_slice.play();
sound_wapaw.play();
} else {
sound_dash.play();
}
}
Frame 626
isDefendSuccessful();
if ((_allowsound && (_defendSuccess)) && (_charwashit)) {
sound_clang.play();
}
Frame 631
charDie._visible = false;
if (_defendNow) {
charDefend._visible = true;
tellTarget (charDefend) {
gotoAndPlay (9);
};
charHit._visible = false;
} else {
charDefend._visible = false;
charHit._visible = true;
}
Frame 634
if (_poisonhit) {
poisoncounter = 3;
poisonflash.play();
}
Frame 635
_digits = 0;
_charDead = false;
if (_charwashit) {
_charwashit = false;
if (_enemyprovoked) {
_actualenemystr = _enemystr * (1 + (0.02 * _provokelevel));
} else {
_actualenemystr = _enemystr;
}
_root.calculateDef();
_root.ifDefendNow();
_enemydamagedealt = Math.round(((((_actualenemystr * (100 + random(20))) / 100) * (101 - _actualchardef)) / 100) - (_charvit / 2));
if (_enemydamagedealt < 1) {
_enemydamagedealt = 1;
}
_thousands = Math.floor(_enemydamagedealt / 1000);
_hundreds = Math.floor((_enemydamagedealt - (_thousands * 1000)) / 100);
_tens = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
__1.text = "";
__2.text = "-";
__3.text = _ones;
__4.text = "";
__5.text = "";
} else if (_digits == 2) {
__1.text = "";
__2.text = "-";
__3.text = _tens;
__4.text = _ones;
__5.text = "";
} else if (_digits == 3) {
__1.text = "-";
__2.text = _hundreds;
__3.text = _tens;
__4.text = _ones;
__5.text = "";
} else {
__1.text = "-";
__2.text = _thousands;
__3.text = _hundreds;
__4.text = _tens;
__5.text = _ones;
}
_charhp = _charhp - _enemydamagedealt;
_enemytotaldamagedealt = _enemytotaldamagedealt + _enemydamagedealt;
if ((_charhp <= 0) && (_allowsound)) {
sound_chardie.play();
}
} else {
__1.text = "m";
__2.text = "i";
__3.text = "s";
__4.text = "s";
__5.text = "";
}
if (_charhp > 0) {
charDie._visible = false;
} else {
whiteFlash.play();
_charDead = true;
charDie._visible = true;
charHit._visible = false;
charDefend._visible = false;
}
var __speed1;
var __speed2;
var __speed3;
var __speed4;
var __speed5;
var __1counter;
var __2counter;
var __3counter;
var __4counter;
var __5counter;
__1._y = (__2._y = (__3._y = (__4._y = (__5._y = -100))));
__speed1 = (__speed2 = (__speed3 = (__speed4 = (__speed5 = 0))));
__ytarget = 130;
__1counter = 0;
__2counter = 3;
__3counter = 6;
__4counter = 9;
__5counter = 12;
__temp.onEnterFrame = function () {
if (__1counter <= 0) {
if (__1counter == 0) {
__1._y = __ytarget - 50;
__1counter--;
}
if (__1._y < __ytarget) {
__speed1 = __speed1 + ((__1._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__1._y - __ytarget) < 5) {
__speed1 = __speed1 / 10;
}
} else {
__1._y = __ytarget - 10;
}
} else {
__1counter--;
}
if (__2counter <= 0) {
if (__2counter == 0) {
__2._y = __ytarget - 50;
__2counter--;
}
if (__2._y < __ytarget) {
__speed2 = __speed2 + ((__2._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__2._y - __ytarget) < 5) {
__speed2 = __speed2 / 10;
}
} else {
__2._y = __ytarget - 10;
}
} else {
__2counter--;
}
if (__3counter <= 0) {
if (__3counter == 0) {
__3._y = __ytarget - 50;
__3counter--;
}
if (__3._y < __ytarget) {
__speed3 = __speed3 + ((__3._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__3._y - __ytarget) < 5) {
__speed3 = __speed3 / 10;
}
} else {
__3._y = __ytarget - 10;
}
} else {
__3counter--;
}
if (__4counter <= 0) {
if (__4counter == 0) {
__4._y = __ytarget - 50;
__4counter--;
}
if (__4._y < __ytarget) {
__speed4 = __speed4 + ((__4._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__4._y - __ytarget) < 5) {
__speed4 = __speed4 / 10;
}
} else {
__4._y = __ytarget - 10;
}
} else {
__4counter--;
}
if (__5counter <= 0) {
if (__5counter == 0) {
__5._y = __ytarget - 50;
__5counter--;
}
if (__5._y < __ytarget) {
__speed5 = __speed5 + ((__5._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__5._y - __ytarget) < 5) {
__speed5 = __speed5 / 10;
}
} else {
__5._y = __ytarget - 10;
}
} else {
__5counter--;
}
__1._y = __1._y - __speed1;
__2._y = __2._y - __speed2;
__3._y = __3._y - __speed3;
__4._y = __4._y - __speed4;
__5._y = __5._y - __speed5;
};
Frame 637
_counterAttack = false;
charCounter._visible = false;
if ((_charDead == false) && (random(100) < (_counterlevel * _counterFactor))) {
charHit._visible = false;
charDefend._visible = false;
charCounter._visible = true;
_counterAttack = true;
}
Frame 638
if (_allowsound && (_counterAttack)) {
sound_swingweapon.play();
}
Frame 640
_root.calculateCrit();
if ((_charhp > 0) && (random(100) < _charcrit)) {
_criticalAttackNow = true;
}
if (_allowsound && (_counterAttack)) {
if (_criticalAttackNow) {
sound_wapak.play();
} else {
sound_slash.play();
}
}
Frame 641
if (_counterAttack) {
if (_criticalAttackNow) {
basheffect2.play();
}
_charAttackDamage = 0;
if (_root._slotEffect == "STRIPWEAPON") {
_root._actualcharstr = ((_root._charstr + (4 * _root._swordmasterylevel)) + (_root._chardamageFactor * _root._charlevel)) + 20;
} else {
_root._actualcharstr = (((_root._charstr + (4 * _root._swordmasterylevel)) + _root._charWeaponDamage) + (_root._chardamageFactor * _root._charlevel)) + 20;
}
if (_enemyprovoked) {
_actualenemydef = _enemydef * (1 - (0.09 * _provokelevel));
} else {
_actualenemydef = _enemydef;
}
if (_criticalAttackNow) {
if (_enemyprovoked) {
_chardamagedealt = Math.round((_actualcharstr * 1.2) - ((_enemyvit / 2) / 1.2));
} else {
_chardamagedealt = Math.round((_actualcharstr * 1.2) - (_enemyvit / 2));
}
} else if (_enemyprovoked) {
_chardamagedealt = Math.round(((((_actualcharstr * (100 + random(10))) / 100) * (101 - _actualenemydef)) / 100) - ((_enemyvit / 2) / 1.2));
} else {
_chardamagedealt = Math.round(((((_actualcharstr * (100 + random(10))) / 100) * (101 - _actualenemydef)) / 100) - (_enemyvit / 2));
}
_chardamagedealt = _chardamagedealt * (1 + ((_counterlevel * 2) / 10));
if (_chardamagedealt < 1) {
_chardamagedealt = 1;
}
if (_chardamagedealt >= _enemyhp) {
_chardamagedealt = _enemyhp - 1;
}
_charAttackDamage = _charAttackDamage + _chardamagedealt;
_enemyhp = _enemyhp - _chardamagedealt;
_chartotaldamagedealt = _chartotaldamagedealt + _chardamagedealt;
}
eddgaHit._visible = false;
if (_counterAttack) {
charStand._visible = false;
eddgaHit._visible = true;
eddgaWalk._visible = false;
}
if (_charhp > 0) {
charDie._visible = false;
if (_counterAttack == false) {
charStand._visible = true;
}
} else {
charDie._visible = true;
charStand._visible = false;
}
Frame 644
minus.text = "";
chardamagedealt4.text = "";
chardamagedealt3.text = "";
chardamagedealt2.text = "";
chardamagedealt1.text = "";
if (_counterAttack) {
_digits = 0;
_thousands = Math.floor(_charAttackDamage / 1000);
_hundreds = Math.floor((_charAttackDamage - (_thousands * 1000)) / 100);
_tens = Math.floor(((_charAttackDamage - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_charAttackDamage - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
_1.text = "";
_2.text = "-";
_3.text = _ones;
_4.text = "";
_5.text = "";
} else if (_digits == 2) {
_1.text = "";
_2.text = "-";
_3.text = _tens;
_4.text = _ones;
_5.text = "";
} else if (_digits == 3) {
_1.text = "-";
_2.text = _hundreds;
_3.text = _tens;
_4.text = _ones;
_5.text = "";
} else {
_1.text = "-";
_2.text = _thousands;
_3.text = _hundreds;
_4.text = _tens;
_5.text = _ones;
}
}
var _speed1;
var _speed2;
var _speed3;
var _speed4;
var _speed5;
var _1counter;
var _2counter;
var _3counter;
var _4counter;
var _5counter;
_1._y = (_2._y = (_3._y = (_4._y = (_5._y = -100))));
_speed1 = (_speed2 = (_speed3 = (_speed4 = (_speed5 = 0))));
_ytarget = 130;
_1counter = 0;
_2counter = 3;
_3counter = 6;
_4counter = 9;
_5counter = 12;
___temp.onEnterFrame = function () {
if (_1counter <= 0) {
if (_1counter == 0) {
_1._y = _ytarget - 50;
_1counter--;
}
if (_1._y < _ytarget) {
_speed1 = _speed1 + ((_1._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_1._y - _ytarget) < 5) {
_speed1 = _speed1 / 10;
}
} else {
_1._y = _ytarget - 10;
}
} else {
_1counter--;
}
if (_2counter <= 0) {
if (_2counter == 0) {
_2._y = _ytarget - 50;
_2counter--;
}
if (_2._y < _ytarget) {
_speed2 = _speed2 + ((_2._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_2._y - _ytarget) < 5) {
_speed2 = _speed2 / 10;
}
} else {
_2._y = _ytarget - 10;
}
} else {
_2counter--;
}
if (_3counter <= 0) {
if (_3counter == 0) {
_3._y = _ytarget - 50;
_3counter--;
}
if (_3._y < _ytarget) {
_speed3 = _speed3 + ((_3._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_3._y - _ytarget) < 5) {
_speed3 = _speed3 / 10;
}
} else {
_3._y = _ytarget - 10;
}
} else {
_3counter--;
}
if (_4counter <= 0) {
if (_4counter == 0) {
_4._y = _ytarget - 50;
_4counter--;
}
if (_4._y < _ytarget) {
_speed4 = _speed4 + ((_4._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_4._y - _ytarget) < 5) {
_speed4 = _speed4 / 10;
}
} else {
_4._y = _ytarget - 10;
}
} else {
_4counter--;
}
if (_5counter <= 0) {
if (_5counter == 0) {
_5._y = _ytarget - 50;
_5counter--;
}
if (_5._y < _ytarget) {
_speed5 = _speed5 + ((_5._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_5._y - _ytarget) < 5) {
_speed5 = _speed5 / 10;
}
} else {
_5._y = _ytarget - 10;
}
} else {
_5counter--;
}
_1._y = _1._y - _speed1;
_2._y = _2._y - _speed2;
_3._y = _3._y - _speed3;
_4._y = _4._y - _speed4;
_5._y = _5._y - _speed5;
};
Frame 647
if (_charhp > 0) {
charStand._visible = true;
eddgaWalk._visible = true;
}
Frame 667
_defendNow = false;
if (_charhp > 0) {
if ((_regenlevel > 0) && (_charhp < _charmaxhp)) {
_regennow = true;
gotoAndPlay (196);
} else {
gotoAndPlay (79);
}
} else {
gotoAndStop (923);
}
Frame 668
if (_defendNow) {
charStand.gotoAndStop(2);
} else {
charStand.gotoAndStop(1);
}
Frame 669
if (_allowsound) {
sound_fireball.play();
}
Frame 697
if (_quitgame) {
_fireballDamage = (_charhp * (100 + random(20))) / 100;
} else {
_fireballDamage = Math.round(((((_enemyint * 15) * (100 + random(100))) / 100) * (101 - (_charint / 1.5))) / 500);
}
_charhp = _charhp - _fireballDamage;
_digits = 0;
_thousands = Math.floor(_fireballDamage / 1000);
_hundreds = Math.floor((_fireballDamage - (_thousands * 1000)) / 100);
_tens = Math.floor(((_fireballDamage - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_fireballDamage - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
__1.text = "";
__2.text = "-";
__3.text = _ones;
__4.text = "";
__5.text = "";
} else if (_digits == 2) {
__1.text = "";
__2.text = "-";
__3.text = _tens;
__4.text = _ones;
__5.text = "";
} else if (_digits == 3) {
__1.text = "-";
__2.text = _hundreds;
__3.text = _tens;
__4.text = _ones;
__5.text = "";
} else {
__1.text = "-";
__2.text = _thousands;
__3.text = _hundreds;
__4.text = _tens;
__5.text = _ones;
}
var __speed1;
var __speed2;
var __speed3;
var __speed4;
var __speed5;
var __1counter;
var __2counter;
var __3counter;
var __4counter;
var __5counter;
__1._y = (__2._y = (__3._y = (__4._y = (__5._y = -100))));
__speed1 = (__speed2 = (__speed3 = (__speed4 = (__speed5 = 0))));
__ytarget = 130;
__1counter = 0;
__2counter = 3;
__3counter = 6;
__4counter = 9;
__5counter = 12;
__temp.onEnterFrame = function () {
if (__1counter <= 0) {
if (__1counter == 0) {
__1._y = __ytarget - 50;
__1counter--;
}
if (__1._y < __ytarget) {
__speed1 = __speed1 + ((__1._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__1._y - __ytarget) < 5) {
__speed1 = __speed1 / 10;
}
} else {
__1._y = __ytarget - 10;
}
} else {
__1counter--;
}
if (__2counter <= 0) {
if (__2counter == 0) {
__2._y = __ytarget - 50;
__2counter--;
}
if (__2._y < __ytarget) {
__speed2 = __speed2 + ((__2._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__2._y - __ytarget) < 5) {
__speed2 = __speed2 / 10;
}
} else {
__2._y = __ytarget - 10;
}
} else {
__2counter--;
}
if (__3counter <= 0) {
if (__3counter == 0) {
__3._y = __ytarget - 50;
__3counter--;
}
if (__3._y < __ytarget) {
__speed3 = __speed3 + ((__3._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__3._y - __ytarget) < 5) {
__speed3 = __speed3 / 10;
}
} else {
__3._y = __ytarget - 10;
}
} else {
__3counter--;
}
if (__4counter <= 0) {
if (__4counter == 0) {
__4._y = __ytarget - 50;
__4counter--;
}
if (__4._y < __ytarget) {
__speed4 = __speed4 + ((__4._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__4._y - __ytarget) < 5) {
__speed4 = __speed4 / 10;
}
} else {
__4._y = __ytarget - 10;
}
} else {
__4counter--;
}
if (__5counter <= 0) {
if (__5counter == 0) {
__5._y = __ytarget - 50;
__5counter--;
}
if (__5._y < __ytarget) {
__speed5 = __speed5 + ((__5._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__5._y - __ytarget) < 5) {
__speed5 = __speed5 / 10;
}
} else {
__5._y = __ytarget - 10;
}
} else {
__5counter--;
}
__1._y = __1._y - __speed1;
__2._y = __2._y - __speed2;
__3._y = __3._y - __speed3;
__4._y = __4._y - __speed4;
__5._y = __5._y - __speed5;
};
Frame 707
if (_charhp > 0) {
charDie._visible = false;
} else {
whiteFlash.play();
charDie._visible = true;
}
if (_charhp > 0) {
charStand._visible = true;
} else {
charStand._visible = false;
}
Frame 718
_defendNow = false;
if (_charhp > 0) {
if ((_regenlevel > 0) && (_charhp < _charmaxhp)) {
_regennow = true;
gotoAndPlay (196);
} else {
gotoAndPlay (79);
}
} else {
gotoAndStop (923);
}
Frame 719
if (_enemy == "eddga") {
tellTarget (enemyStand) {
gotoAndStop (2);
};
} else if (_enemy == "turtle") {
tellTarget (enemyStand) {
gotoAndStop (3);
};
}
Frame 720
stunStars.play();
Frame 764
if (_charhp > 0) {
if ((_regenlevel > 0) && (_charhp < _charmaxhp)) {
_regennow = true;
gotoAndPlay (196);
} else {
gotoAndPlay (79);
}
} else {
gotoAndStop (923);
}
Frame 765
if (_charhp > 0) {
charStand._visible = true;
eddgaWalk._visible = true;
}
if (_defendNow) {
charStand.gotoAndStop(2);
} else {
charStand.gotoAndStop(1);
}
Frame 792
_enemyhitrate = (_enemydex + _enemylevel) + 30;
_charevarate = _charagi + _charlevel;
if (random(100) < (_enemyhitrate - _charevarate)) {
_charwashit = true;
}
Frame 794
if (_allowsound) {
if (_charwashit) {
sound_slice.play();
sound_wapaw.play();
} else {
sound_dash.play();
}
}
Frame 796
isDefendSuccessful();
if ((_allowsound && (_defendSuccess)) && (_charwashit)) {
sound_clang.play();
}
Frame 800
charDie._visible = false;
if (_defendNow) {
charDefend._visible = true;
tellTarget (charDefend) {
gotoAndPlay (9);
};
charHit._visible = false;
} else {
charDefend._visible = false;
charHit._visible = true;
}
Frame 805
_digits = 0;
_charDead = false;
if (_charwashit) {
_charwashit = false;
if (_enemyprovoked) {
_actualenemystr = _enemystr * (1 + (0.02 * _provokelevel));
} else {
_actualenemystr = _enemystr;
}
_root.calculateDef();
_root.ifDefendNow();
_enemydamagedealt = Math.round(((((_actualenemystr * (100 + random(20))) / 100) * (101 - _actualchardef)) / 100) - (_charvit / 2));
if (_quitgame) {
_enemydamagedealt = _charmaxhp * (1 + (Math.random() / 10));
}
if (_enemydamagedealt < 1) {
_enemydamagedealt = 1;
}
_thousands = Math.floor(_enemydamagedealt / 1000);
_hundreds = Math.floor((_enemydamagedealt - (_thousands * 1000)) / 100);
_tens = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
__1.text = "";
__2.text = "-";
__3.text = _ones;
__4.text = "";
__5.text = "";
} else if (_digits == 2) {
__1.text = "";
__2.text = "-";
__3.text = _tens;
__4.text = _ones;
__5.text = "";
} else if (_digits == 3) {
__1.text = "-";
__2.text = _hundreds;
__3.text = _tens;
__4.text = _ones;
__5.text = "";
} else {
__1.text = "-";
__2.text = _thousands;
__3.text = _hundreds;
__4.text = _tens;
__5.text = _ones;
}
_charhp = _charhp - _enemydamagedealt;
_enemytotaldamagedealt = _enemytotaldamagedealt + _enemydamagedealt;
if ((_charhp <= 0) && (_allowsound)) {
sound_chardie.play();
}
} else {
__1.text = "m";
__2.text = "i";
__3.text = "s";
__4.text = "s";
__5.text = "";
}
if (_charhp > 0) {
charDie._visible = false;
} else {
whiteFlash.play();
_charDead = true;
charDie._visible = true;
charHit._visible = false;
charDefend._visible = false;
}
var __speed1;
var __speed2;
var __speed3;
var __speed4;
var __speed5;
var __1counter;
var __2counter;
var __3counter;
var __4counter;
var __5counter;
__1._y = (__2._y = (__3._y = (__4._y = (__5._y = -100))));
__speed1 = (__speed2 = (__speed3 = (__speed4 = (__speed5 = 0))));
__ytarget = 130;
__1counter = 0;
__2counter = 3;
__3counter = 6;
__4counter = 9;
__5counter = 12;
__temp.onEnterFrame = function () {
if (__1counter <= 0) {
if (__1counter == 0) {
__1._y = __ytarget - 50;
__1counter--;
}
if (__1._y < __ytarget) {
__speed1 = __speed1 + ((__1._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__1._y - __ytarget) < 5) {
__speed1 = __speed1 / 10;
}
} else {
__1._y = __ytarget - 10;
}
} else {
__1counter--;
}
if (__2counter <= 0) {
if (__2counter == 0) {
__2._y = __ytarget - 50;
__2counter--;
}
if (__2._y < __ytarget) {
__speed2 = __speed2 + ((__2._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__2._y - __ytarget) < 5) {
__speed2 = __speed2 / 10;
}
} else {
__2._y = __ytarget - 10;
}
} else {
__2counter--;
}
if (__3counter <= 0) {
if (__3counter == 0) {
__3._y = __ytarget - 50;
__3counter--;
}
if (__3._y < __ytarget) {
__speed3 = __speed3 + ((__3._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__3._y - __ytarget) < 5) {
__speed3 = __speed3 / 10;
}
} else {
__3._y = __ytarget - 10;
}
} else {
__3counter--;
}
if (__4counter <= 0) {
if (__4counter == 0) {
__4._y = __ytarget - 50;
__4counter--;
}
if (__4._y < __ytarget) {
__speed4 = __speed4 + ((__4._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__4._y - __ytarget) < 5) {
__speed4 = __speed4 / 10;
}
} else {
__4._y = __ytarget - 10;
}
} else {
__4counter--;
}
if (__5counter <= 0) {
if (__5counter == 0) {
__5._y = __ytarget - 50;
__5counter--;
}
if (__5._y < __ytarget) {
__speed5 = __speed5 + ((__5._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__5._y - __ytarget) < 5) {
__speed5 = __speed5 / 10;
}
} else {
__5._y = __ytarget - 10;
}
} else {
__5counter--;
}
__1._y = __1._y - __speed1;
__2._y = __2._y - __speed2;
__3._y = __3._y - __speed3;
__4._y = __4._y - __speed4;
__5._y = __5._y - __speed5;
};
Frame 806
_counterAttack = false;
charCounter._visible = false;
if ((_charDead == false) && (random(100) < (_counterlevel * _counterFactor))) {
charHit._visible = false;
charDefend._visible = false;
charCounter._visible = true;
_counterAttack = true;
}
Frame 808
if (_allowsound && (_counterAttack)) {
sound_swingweapon.play();
}
Frame 810
_root.calculateCrit();
if ((_charhp > 0) && (random(100) < _charcrit)) {
_criticalAttackNow = true;
}
if (_allowsound && (_counterAttack)) {
if (_criticalAttackNow) {
sound_wapak.play();
} else {
sound_slash.play();
}
}
turtleHit._visible = false;
if (_counterAttack) {
charStand._visible = false;
turtleHit._visible = true;
turtleWalk._visible = false;
}
if (_charhp > 0) {
charDie._visible = false;
if (_counterAttack == false) {
charStand._visible = true;
}
} else {
charDie._visible = true;
charStand._visible = false;
}
Frame 811
if (_counterAttack) {
if (_criticalAttackNow) {
basheffect2.play();
}
_charAttackDamage = 0;
if (_root._slotEffect == "STRIPWEAPON") {
_root._actualcharstr = ((_root._charstr + (4 * _root._swordmasterylevel)) + (_root._chardamageFactor * _root._charlevel)) + 20;
} else {
_root._actualcharstr = (((_root._charstr + (4 * _root._swordmasterylevel)) + _root._charWeaponDamage) + (_root._chardamageFactor * _root._charlevel)) + 20;
}
if (_enemyprovoked) {
_actualenemydef = _enemydef * (1 - (0.09 * _provokelevel));
} else {
_actualenemydef = _enemydef;
}
if (_criticalAttackNow) {
if (_enemyprovoked) {
_chardamagedealt = Math.round((_actualcharstr * 1.2) - ((_enemyvit / 2) / 1.2));
} else {
_chardamagedealt = Math.round((_actualcharstr * 1.2) - (_enemyvit / 2));
}
} else if (_enemyprovoked) {
_chardamagedealt = Math.round(((((_actualcharstr * (100 + random(10))) / 100) * (101 - _actualenemydef)) / 100) - ((_enemyvit / 2) / 1.2));
} else {
_chardamagedealt = Math.round(((((_actualcharstr * (100 + random(10))) / 100) * (101 - _actualenemydef)) / 100) - (_enemyvit / 2));
}
_chardamagedealt = _chardamagedealt * (1 + ((_counterlevel * 2) / 10));
if (_chardamagedealt < 1) {
_chardamagedealt = 1;
}
if (_chardamagedealt >= _enemyhp) {
_chardamagedealt = _enemyhp - 1;
}
_charAttackDamage = _charAttackDamage + _chardamagedealt;
_enemyhp = _enemyhp - _chardamagedealt;
_chartotaldamagedealt = _chartotaldamagedealt + _chardamagedealt;
}
Frame 814
minus.text = "";
chardamagedealt4.text = "";
chardamagedealt3.text = "";
chardamagedealt2.text = "";
chardamagedealt1.text = "";
if (_counterAttack) {
_digits = 0;
_thousands = Math.floor(_charAttackDamage / 1000);
_hundreds = Math.floor((_charAttackDamage - (_thousands * 1000)) / 100);
_tens = Math.floor(((_charAttackDamage - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_charAttackDamage - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
_1.text = "";
_2.text = "-";
_3.text = _ones;
_4.text = "";
_5.text = "";
} else if (_digits == 2) {
_1.text = "";
_2.text = "-";
_3.text = _tens;
_4.text = _ones;
_5.text = "";
} else if (_digits == 3) {
_1.text = "-";
_2.text = _hundreds;
_3.text = _tens;
_4.text = _ones;
_5.text = "";
} else {
_1.text = "-";
_2.text = _thousands;
_3.text = _hundreds;
_4.text = _tens;
_5.text = _ones;
}
}
var _speed1;
var _speed2;
var _speed3;
var _speed4;
var _speed5;
var _1counter;
var _2counter;
var _3counter;
var _4counter;
var _5counter;
_1._y = (_2._y = (_3._y = (_4._y = (_5._y = -100))));
_speed1 = (_speed2 = (_speed3 = (_speed4 = (_speed5 = 0))));
_ytarget = 130;
_1counter = 0;
_2counter = 3;
_3counter = 6;
_4counter = 9;
_5counter = 12;
___temp.onEnterFrame = function () {
if (_1counter <= 0) {
if (_1counter == 0) {
_1._y = _ytarget - 50;
_1counter--;
}
if (_1._y < _ytarget) {
_speed1 = _speed1 + ((_1._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_1._y - _ytarget) < 5) {
_speed1 = _speed1 / 10;
}
} else {
_1._y = _ytarget - 10;
}
} else {
_1counter--;
}
if (_2counter <= 0) {
if (_2counter == 0) {
_2._y = _ytarget - 50;
_2counter--;
}
if (_2._y < _ytarget) {
_speed2 = _speed2 + ((_2._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_2._y - _ytarget) < 5) {
_speed2 = _speed2 / 10;
}
} else {
_2._y = _ytarget - 10;
}
} else {
_2counter--;
}
if (_3counter <= 0) {
if (_3counter == 0) {
_3._y = _ytarget - 50;
_3counter--;
}
if (_3._y < _ytarget) {
_speed3 = _speed3 + ((_3._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_3._y - _ytarget) < 5) {
_speed3 = _speed3 / 10;
}
} else {
_3._y = _ytarget - 10;
}
} else {
_3counter--;
}
if (_4counter <= 0) {
if (_4counter == 0) {
_4._y = _ytarget - 50;
_4counter--;
}
if (_4._y < _ytarget) {
_speed4 = _speed4 + ((_4._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_4._y - _ytarget) < 5) {
_speed4 = _speed4 / 10;
}
} else {
_4._y = _ytarget - 10;
}
} else {
_4counter--;
}
if (_5counter <= 0) {
if (_5counter == 0) {
_5._y = _ytarget - 50;
_5counter--;
}
if (_5._y < _ytarget) {
_speed5 = _speed5 + ((_5._y - _ytarget) / dmgtextSpeed);
if (Math.abs(_5._y - _ytarget) < 5) {
_speed5 = _speed5 / 10;
}
} else {
_5._y = _ytarget - 10;
}
} else {
_5counter--;
}
_1._y = _1._y - _speed1;
_2._y = _2._y - _speed2;
_3._y = _3._y - _speed3;
_4._y = _4._y - _speed4;
_5._y = _5._y - _speed5;
};
Frame 816
if (_charhp > 0) {
charStand._visible = true;
turtleWalk._visible = true;
}
Frame 838
_defendNow = false;
if (_charhp > 0) {
if ((_regenlevel > 0) && (_charhp < _charmaxhp)) {
_regennow = true;
gotoAndPlay (196);
} else {
gotoAndPlay (79);
}
} else {
gotoAndStop (923);
}
Frame 840
if (_defendNow) {
charStand.gotoAndStop(2);
} else {
charStand.gotoAndStop(1);
}
Frame 845
if (_allowsound) {
sound_waterball.play();
}
Frame 873
_waterballDamage = 0;
waterballSubDamage();
if (_enemydamagedealt < 1) {
_enemydamagedealt = 1;
}
_waterballDamage = _waterballDamage + _enemydamagedealt;
_charhp = _charhp - _enemydamagedealt;
_enemytotaldamagedealt = _enemytotaldamagedealt + _enemydamagedealt;
_thousands = Math.floor(_enemydamagedealt / 1000);
_hundreds = Math.floor((_enemydamagedealt - (_thousands * 1000)) / 100);
_tens = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
tellTarget (subDamage) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._ones;
enemydamagedealt2.text = "";
enemydamagedealt1.text = "";
};
} else if (_digits == 2) {
tellTarget (subDamage) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else if (_digits == 3) {
tellTarget (subDamage) {
minus.text = "-";
enemydamagedealt4.text = _root._hundreds;
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else {
tellTarget (subDamage) {
minus.text = "-";
enemydamagedealt4.text = _root._thousands;
enemydamagedealt3.text = _root._hundreds;
enemydamagedealt2.text = _root._tens;
enemydamagedealt1.text = _root._ones;
};
}
Frame 875
whiteFlash.gotoAndPlay(2);
Frame 880
whiteFlash.gotoAndPlay(2);
Frame 881
waterballSubDamage();
if (_enemydamagedealt < 1) {
_enemydamagedealt = 1;
}
_waterballDamage = _waterballDamage + _enemydamagedealt;
_charhp = _charhp - _enemydamagedealt;
_enemytotaldamagedealt = _enemytotaldamagedealt + _enemydamagedealt;
_thousands = Math.floor(_enemydamagedealt / 1000);
_hundreds = Math.floor((_enemydamagedealt - (_thousands * 1000)) / 100);
_tens = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
tellTarget (subDamage2) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._ones;
enemydamagedealt2.text = "";
enemydamagedealt1.text = "";
};
} else if (_digits == 2) {
tellTarget (subDamage2) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else if (_digits == 3) {
tellTarget (subDamage2) {
minus.text = "-";
enemydamagedealt4.text = _root._hundreds;
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else {
tellTarget (subDamage2) {
minus.text = "-";
enemydamagedealt4.text = _root._thousands;
enemydamagedealt3.text = _root._hundreds;
enemydamagedealt2.text = _root._tens;
enemydamagedealt1.text = _root._ones;
};
}
Frame 885
whiteFlash.gotoAndPlay(2);
Frame 889
waterballSubDamage();
if (_enemydamagedealt < 1) {
_enemydamagedealt = 1;
}
_waterballDamage = _waterballDamage + _enemydamagedealt;
_charhp = _charhp - _enemydamagedealt;
_enemytotaldamagedealt = _enemytotaldamagedealt + _enemydamagedealt;
_thousands = Math.floor(_enemydamagedealt / 1000);
_hundreds = Math.floor((_enemydamagedealt - (_thousands * 1000)) / 100);
_tens = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_enemydamagedealt - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
tellTarget (subDamage3) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._ones;
enemydamagedealt2.text = "";
enemydamagedealt1.text = "";
};
} else if (_digits == 2) {
tellTarget (subDamage3) {
minus.text = "";
enemydamagedealt4.text = "-";
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else if (_digits == 3) {
tellTarget (subDamage3) {
minus.text = "-";
enemydamagedealt4.text = _root._hundreds;
enemydamagedealt3.text = _root._tens;
enemydamagedealt2.text = _root._ones;
enemydamagedealt1.text = "";
};
} else {
tellTarget (subDamage3) {
minus.text = "-";
enemydamagedealt4.text = _root._thousands;
enemydamagedealt3.text = _root._hundreds;
enemydamagedealt2.text = _root._tens;
enemydamagedealt1.text = _root._ones;
};
}
Frame 891
charDie._visible = false;
if (_charhp > 0) {
charDie._visible = false;
charStand._visible = true;
} else {
charDie._visible = true;
charStand._visible = false;
}
Frame 892
if (_charhp > 0) {
charDie._visible = false;
} else {
whiteFlash.play();
charDie._visible = true;
}
Frame 901
_digits = 0;
_thousands = Math.floor(_waterballDamage / 1000);
_hundreds = Math.floor((_waterballDamage - (_thousands * 1000)) / 100);
_tens = Math.floor(((_waterballDamage - (_thousands * 1000)) - (_hundreds * 100)) / 10);
_ones = Math.floor(((_waterballDamage - (_thousands * 1000)) - (_hundreds * 100)) - (_tens * 10));
if (_thousands == 0) {
_thousands = "";
_digits = 3;
if (_hundreds == 0) {
_hundreds = "";
_digits = 2;
if (_tens == 0) {
_tens = "";
_digits = 1;
}
}
}
if (_digits == 1) {
__1.text = "";
__2.text = "-";
__3.text = _ones;
__4.text = "";
__5.text = "";
} else if (_digits == 2) {
__1.text = "";
__2.text = "-";
__3.text = _tens;
__4.text = _ones;
__5.text = "";
} else if (_digits == 3) {
__1.text = "-";
__2.text = _hundreds;
__3.text = _tens;
__4.text = _ones;
__5.text = "";
} else {
__1.text = "-";
__2.text = _thousands;
__3.text = _hundreds;
__4.text = _tens;
__5.text = _ones;
}
var __speed1;
var __speed2;
var __speed3;
var __speed4;
var __speed5;
var __1counter;
var __2counter;
var __3counter;
var __4counter;
var __5counter;
__1._y = (__2._y = (__3._y = (__4._y = (__5._y = -100))));
__speed1 = (__speed2 = (__speed3 = (__speed4 = (__speed5 = 0))));
__ytarget = 130;
__1counter = 0;
__2counter = 3;
__3counter = 6;
__4counter = 9;
__5counter = 12;
__temp.onEnterFrame = function () {
if (__1counter <= 0) {
if (__1counter == 0) {
__1._y = __ytarget - 50;
__1counter--;
}
if (__1._y < __ytarget) {
__speed1 = __speed1 + ((__1._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__1._y - __ytarget) < 5) {
__speed1 = __speed1 / 10;
}
} else {
__1._y = __ytarget - 10;
}
} else {
__1counter--;
}
if (__2counter <= 0) {
if (__2counter == 0) {
__2._y = __ytarget - 50;
__2counter--;
}
if (__2._y < __ytarget) {
__speed2 = __speed2 + ((__2._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__2._y - __ytarget) < 5) {
__speed2 = __speed2 / 10;
}
} else {
__2._y = __ytarget - 10;
}
} else {
__2counter--;
}
if (__3counter <= 0) {
if (__3counter == 0) {
__3._y = __ytarget - 50;
__3counter--;
}
if (__3._y < __ytarget) {
__speed3 = __speed3 + ((__3._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__3._y - __ytarget) < 5) {
__speed3 = __speed3 / 10;
}
} else {
__3._y = __ytarget - 10;
}
} else {
__3counter--;
}
if (__4counter <= 0) {
if (__4counter == 0) {
__4._y = __ytarget - 50;
__4counter--;
}
if (__4._y < __ytarget) {
__speed4 = __speed4 + ((__4._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__4._y - __ytarget) < 5) {
__speed4 = __speed4 / 10;
}
} else {
__4._y = __ytarget - 10;
}
} else {
__4counter--;
}
if (__5counter <= 0) {
if (__5counter == 0) {
__5._y = __ytarget - 50;
__5counter--;
}
if (__5._y < __ytarget) {
__speed5 = __speed5 + ((__5._y - __ytarget) / dmgtextSpeed);
if (Math.abs(__5._y - __ytarget) < 5) {
__speed5 = __speed5 / 10;
}
} else {
__5._y = __ytarget - 10;
}
} else {
__5counter--;
}
__1._y = __1._y - __speed1;
__2._y = __2._y - __speed2;
__3._y = __3._y - __speed3;
__4._y = __4._y - __speed4;
__5._y = __5._y - __speed5;
};
Frame 922
_defendNow = false;
if (_charhp > 0) {
if ((_regenlevel > 0) && (_charhp < _charmaxhp)) {
_regennow = true;
gotoAndPlay (196);
} else {
gotoAndPlay (79);
}
} else {
gotoAndStop (923);
}
Frame 923
stop();
var saveData = SharedObject.getLocal("saveObject");
saveData.clear();
statusScreen._visible = (statusEx._visible = true);
_root._slotEffect = "MISS";
_root.calculateHits();
_root.calculatebaseDamage();
_root.getCharHP();
_root.getCharMP();
_root.calculateEva();
_root.calculateHit();
_root.calculateDef();
_root.calculateCrit();
Frame 924
var o = {n:[4, 11, 0, 12, 11, 3, 9, 14, 2, 5, 5, 5, 10, 13, 14, 1], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var boardID = o.f(0, "");
if (_gameMode == "normal") {
if (gameDifficulty == "easy") {
mochi.as2.MochiScores.showLeaderboard({boardID:"4b0cb39e2555ade1", score:_root._charlevel});
} else if (gameDifficulty == "normal") {
mochi.as2.MochiScores.showLeaderboard({boardID:"fb5fd0e86c995a66", score:_root._charlevel});
} else if (gameDifficulty == "hard") {
mochi.as2.MochiScores.showLeaderboard({boardID:"d60ae6d0babff1dc", score:_root._charlevel});
}
} else if (_gameMode == "SLOTMACHINE") {
if (gameDifficulty == "easy") {
mochi.as2.MochiScores.showLeaderboard({boardID:"b76d865e0d2d8df3", score:_root._charlevel});
} else if (gameDifficulty == "normal") {
mochi.as2.MochiScores.showLeaderboard({boardID:"d48c6e99a305170e", score:_root._charlevel});
} else if (gameDifficulty == "hard") {
mochi.as2.MochiScores.showLeaderboard({boardID:"354de0e6d593b7c3", score:_root._charlevel});
}
}
Frame 925
gotoAndPlay (9);
Frame 926
stop();
var o = {n:[4, 11, 0, 12, 11, 3, 9, 14, 2, 5, 5, 5, 10, 13, 14, 1], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var boardID = o.f(0, "");
if (_gameMode == "normal") {
if (gameDifficulty == "easy") {
mochi.as2.MochiScores.showLeaderboard({boardID:"4b0cb39e2555ade1"});
} else if (gameDifficulty == "normal") {
mochi.as2.MochiScores.showLeaderboard({boardID:"fb5fd0e86c995a66"});
} else if (gameDifficulty == "hard") {
mochi.as2.MochiScores.showLeaderboard({boardID:"d60ae6d0babff1dc"});
}
} else if (_gameMode == "SLOTMACHINE") {
if (gameDifficulty == "easy") {
mochi.as2.MochiScores.showLeaderboard({boardID:"b76d865e0d2d8df3"});
} else if (gameDifficulty == "normal") {
mochi.as2.MochiScores.showLeaderboard({boardID:"d48c6e99a305170e"});
} else if (gameDifficulty == "hard") {
mochi.as2.MochiScores.showLeaderboard({boardID:"354de0e6d593b7c3"});
}
}
Frame 927
gotoAndPlay (9);
Frame 928
function loadDataFunction(_userName, _userPass, _fileAddress) {
_root._loadName2 = _userName;
_root._loadPass2 = _userPass;
_uninitiated = false;
redPotions = 0;
yellowPotions = 0;
whitePotions = 0;
bluePotions = 0;
_quickenedThisRound = false;
_provokedThisRound = false;
_charMoney = 0;
_quickenNow = false;
_showStatus = true;
_autoSelect = true;
_charWeaponDamage = 1;
_statpoints = 48;
_skillpoints = 1;
_charlevel = 1;
_charvit = 1;
_charhptemp = 0;
_charint = 1;
_charmptemp = 0;
_charstr = 1;
_chardef = 5;
_charagi = 1;
_charluk = 1;
_chardex = 1;
_heallevel = 0;
_defendlevel = 0;
_bashlevel = 0;
_regenlevel = 0;
_provokelevel = 0;
_swordmasterylevel = 0;
_quickenlevel = 0;
_counterlevel = 0;
_enemylevel = 1;
_enemyvit = 1;
_enemyhptemp = 0;
_enemyint = 5;
_enemymptemp = 0;
_enemystr = 20;
_enemydef = 1;
_enemyagi = 1;
_enemycrit = 1;
_enemydex = 30;
_fileAddress = (((all_script_address + _userName) + "_") + _userPass) + ".php";
dataLoader2.loadVariables(_fileAddress, dataLoader2, "POST");
nowLoading._visible = true;
}
_fileAddress = "";
_loadCountdown = 0.5;
_loadedAlready = false;
nowLoading._visible = false;
clearingFile._visible = false;
clearSuccess._visible = false;
_loadData = "";
dataLoader.action = "";
_root._loadName = "";
_root._loadPass = "";
_root._loadName2 = "";
_root._loadPass2 = "";
dataLoader._clearData = "";
dataLoader.onEnterFrame = function () {
if (dataLoader2._loadData == "SUCCESS") {
_root._enemy = dataLoader2._enemy;
_root._gameMode = dataLoader2._gameMode;
_root._chararmor = parseInt(dataLoader2._chararmor);
_root._slotEffect = dataLoader2._slotEffect;
_root._charMoney = parseInt(dataLoader2._charMoney);
_root._quickenCounter = parseInt(dataLoader2._quickenCounter);
_root._provokeCounter = parseInt(dataLoader2._provokeCounter);
_root.zenyBoosterCounter = parseInt(dataLoader2._zenyBoosterCounter);
_root.redPotions = parseInt(dataLoader2._redPotions);
_root.yellowPotions = parseInt(dataLoader2._yellowPotions);
_root.whitePotions = parseInt(dataLoader2._whitePotions);
_root.bluePotions = parseInt(dataLoader2._bluePotions);
_root._charWeaponDamage = parseInt(dataLoader2._charWeaponDamage);
_root._charmaxhp = parseInt(dataLoader2._charmaxhp);
_root._charhp = parseInt(dataLoader2._charhp);
_root._charhptemp = parseInt(dataLoader2._charhptemp);
_root._charmaxmp = parseInt(dataLoader2._charmaxmp);
_root._charmp = parseInt(dataLoader2._charmp);
_root._charmptemp = parseInt(dataLoader2._charmptemp);
_root._charlevel = parseInt(dataLoader2._charlevel);
_root._charstr = parseInt(dataLoader2._charstr);
_root._charagi = parseInt(dataLoader2._charagi);
_root._chardef = parseInt(dataLoader2._chardef);
_root._chardex = parseInt(dataLoader2._chardex);
_root._charvit = parseInt(dataLoader2._charvit);
_root._charint = parseInt(dataLoader2._charint);
_root._charluk = parseInt(dataLoader2._charluk);
_root._provokelevel = parseInt(dataLoader2._provokelevel);
_root._bashlevel = parseInt(dataLoader2._bashlevel);
_root._regenlevel = parseInt(dataLoader2._regenlevel);
_root._quickenlevel = parseInt(dataLoader2._quickenlevel);
_root._defendlevel = parseInt(dataLoader2._defendlevel);
_root._swordmasterylevel = parseInt(dataLoader2._swordmasterylevel);
_root._counterlevel = parseInt(dataLoader2._counterlevel);
_root._heallevel = parseInt(dataLoader2._heallevel);
_root._statpoints = parseInt(dataLoader2._statpoints);
_root._skillPoints = parseInt(dataLoader2._skillPoints);
_root._enemylevel = parseInt(dataLoader2._enemylevel);
_root._enemyvit = parseInt(dataLoader2._enemyvit);
_root._enemymaxhp = parseInt(dataLoader2._enemymaxhp);
_root._enemyhp = parseInt(dataLoader2._enemyhp);
_root._enemyhptemp = parseInt(dataLoader2._enemyhptemp);
_root._enemyint = parseInt(dataLoader2._enemyint);
_root._enemymaxmp = parseInt(dataLoader2._enemymaxmp);
_root._enemymp = parseInt(dataLoader2._enemymp);
_root._enemymptemp = parseInt(dataLoader2._enemymptemp);
_root._enemystr = parseInt(dataLoader2._enemystr);
_root._enemydef = parseInt(dataLoader2._enemydef);
_root._enemyagi = parseInt(dataLoader2._enemyagi);
_root._enemydex = parseInt(dataLoader2._enemydex);
dataLoader.userName = (_root._loadName2 + "_") + _root._loadPass2;
dataLoader.loadVariables(all_script_address + "clearData.php", "GET");
_justloaded = true;
dataLoader2._loadData = "";
_loadedAlready = true;
if (dataLoader2._usedPotionThisRound == "true") {
_root.usedPotionThisRound = true;
} else {
_root.usedPotionThisRound = false;
}
if ((dataLoader2._gameDifficulty != "easy") && (dataLoader2._gameDifficulty != "hard")) {
_root.gameDifficulty = "normal";
} else {
_root.gameDifficulty = dataLoader2._gameDifficulty;
}
_root._actualcharstr = (_root._charstr + (4 * _root._swordmasterylevel)) + _charWeaponDamage;
_root._charbasedamage = (Math.round(_root._actualcharstr) + "-") + Math.round(_root._actualcharstr * 1.1);
}
if (dataLoader._clearData == "SUCCESS") {
clearingFile._visible = false;
clearSuccess._visible = true;
if (_loadCountdown > 0) {
_loadCountdown = _loadCountdown - 0.025;
} else {
_loadedAlready = false;
gotoAndStop (35);
}
} else if (_loadedAlready) {
nowLoading._visible = false;
clearingFile._visible = true;
}
};
Frame 929
stop();
Frame 930
stop();
Frame 931
stop();
Frame 932
stop();
Frame 933
stop();
Symbol 1120 MovieClip [__Packages.mochi.as2.MochiSync] Frame 0
class mochi.as2.MochiSync
{
var _syncContainer;
function MochiSync () {
_syncContainer = {};
}
function getProp(name) {
return(_syncContainer[name]);
}
function setProp(name, value) {
if (_syncContainer[name] == value) {
return(undefined);
}
_syncContainer[name] = value;
mochi.as2.MochiServices.send("sync_propUpdate", {name:name, value:value});
}
function triggerEvent(eventType, args) {
switch (eventType) {
case SYNC_REQUEST :
mochi.as2.MochiServices.send("sync_syncronize", _syncContainer);
break;
case SYNC_PROPERTY :
_syncContainer[args.name] = args.value;
}
}
static var SYNC_REQUEST = "SyncRequest";
static var SYNC_PROPERTY = "UpdateProperty";
}
Symbol 1121 MovieClip [__Packages.mochi.as2.MochiServices] Frame 0
class mochi.as2.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("3.3 as2");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
warnID(id, false);
if ((!_connected) && (_clip == undefined)) {
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local6 = "_mochiservices_com_" + id;
var _local5 = new MovieClipLoader();
var _local3 = {};
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
if (urlOptions().servURL) {
_servURL = urlOptions().servURL;
}
var _local4 = _servURL + _services;
if (urlOptions().servicesURL) {
_local4 = urlOptions().servicesURL;
}
allowDomains(_local4);
_clip = clip.createEmptyMovieClip(_local6, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
listen();
if (_local3.waitInterval != null) {
clearInterval(_local3.waitInterval);
}
_local3.onLoadError = loadError;
_local3.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_local3.startTime = getTimer();
_local3.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_local3.waitInterval = setInterval(_local3, "wait", 1000);
_local5.addListener(_local3);
_local5.loadClip((((((_local4 + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options)) + "&api_version=") + getVersion(), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
return(_clip);
}
static function loadError(target_mc, errorCode, httpStatus) {
disconnect();
onError.apply(null, [errorCode]);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel._nextcallbackID = 0;
_listenChannel._callbacks = {};
_listenChannel.connect(_listenChannelName);
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_listenChannel.onEvent = function (pkg) {
switch (pkg.target) {
case "events" :
mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case "coins" :
mochi.as2.MochiCoins.triggerEvent(pkg.event, pkg.args);
break;
case "sync" :
mochi.as2.MochiServices.servicesSync.triggerEvent(pkg.event, pkg.args);
}
};
_listenChannel.onError = function () {
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
};
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _listenChannel._callbacks[_local1.callbackID];
}
delete _listenChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var _local5 = {};
var _local6;
if (_root._url.indexOf("mochiad_options") != -1) {
var _local2 = (_root._url.indexOf("mochiad_options") + "mochiad_options".length) + 1;
_local6 = _root._url.substr(_local2, _root._url.length);
} else if (_root.mochiad_options) {
_local6 = _root.mochiad_options;
}
if (_local6) {
var _local4 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split("=");
_local5[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local5);
}
static function warnID(bid, leaderboard) {
bid = bid.toLowerCase();
if (bid.length != 16) {
return(undefined);
}
if (bid == "1e113c7239048b3f") {
if (leaderboard) {
}
return(undefined);
}
if (bid == "84993a1de4031cd8") {
if (leaderboard) {
}
return(undefined);
}
var _local1 = 0;
while (_local1 < bid.length) {
switch (bid.charAt(_local1)) {
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
case "a" :
case "b" :
case "c" :
case "d" :
case "e" :
case "f" :
break;
default :
return(undefined);
}
_local1++;
}
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var _local7 = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://x.mochiads.com/linkping.swf?t=" + getTimer());
_local7.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
};
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static function setContainer(clip) {
}
static function stayOnTop(clip) {
}
static var _servURL = "http://www.mochiads.com/static/lib/services/";
static var _services = "services.swf";
static var _mochiLC = "MochiLC.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
static var servicesSync = new mochi.as2.MochiSync();
}
Symbol 1122 MovieClip [__Packages.mochi.as2.MochiEventDispatcher] Frame 0
class mochi.as2.MochiEventDispatcher
{
var eventTable;
function MochiEventDispatcher () {
eventTable = {};
}
function buildDelegate(thisObject, thatObject) {
var _local2 = {thisObject:thisObject, thatObject:thatObject};
if (thatObject != undefined) {
var funct = ((typeof(thatObject) == "string") ? (thisObject[thatObject]) : (thatObject));
_local2.delegate = function (args) {
funct.call(thisObject, args);
};
} else {
_local2.delegate = thisObject;
}
return(_local2);
}
function compareDelegate(d_A, d_B) {
if ((d_A.thisObject != d_B.thisObject) || (d_A.thatObject != d_B.thatObject)) {
return(false);
}
return(true);
}
function addEventListener(event, thisObject, thatObject) {
removeEventListener(event, thisObject, thatObject);
eventTable[event].push(buildDelegate(thisObject, thatObject));
}
function removeEventListener(event, thisObject, thatObject) {
var _local3 = buildDelegate(thisObject, thatObject);
if (eventTable[event] == undefined) {
eventTable[event] = [];
return(undefined);
}
for (var _local4 in eventTable[event]) {
if (!compareDelegate(eventTable[event][_local4], _local3)) {
continue;
}
eventTable[event].splice(Number(_local4), 1);
}
}
function triggerEvent(event, args) {
if (eventTable[event] == undefined) {
return(undefined);
}
for (var _local4 in eventTable[event]) {
eventTable[event][_local4].delegate(args);
}
}
}
Symbol 1123 MovieClip [__Packages.mochi.as2.MochiEvents] Frame 0
class mochi.as2.MochiEvents
{
static var gameStart, levelStart;
function MochiEvents () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function startSession(achievementID) {
mochi.as2.MochiServices.send("events_beginSession", {achievementID:achievementID}, null, null);
}
static function trigger(kind, obj) {
if (obj == undefined) {
obj = {};
} else if (obj.kind != undefined) {
obj.kind = kind;
}
mochi.as2.MochiServices.send("events_triggerEvent", {eventObject:obj}, null, null);
}
static function setNotifications(clip, style) {
var _local2 = {};
for (var _local3 in style) {
_local2[_local3] = style[_local3];
}
_local2.clip = clip;
mochi.as2.MochiServices.send("events_setNotifications", _local2, null, null);
}
static function addEventListener(eventType, thisObject, thatObject) {
_dispatcher.addEventListener(eventType, thisObject, thatObject);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, thisObject, thatObject) {
_dispatcher.removeEventListener(eventType, thisObject, thatObject);
}
static function startGame() {
gameStart = new Date().getTime();
trigger("start_game");
}
static function endGame() {
var _local1 = new Date().getTime() - gameStart;
trigger("end_game", {time:_local1});
}
static function startLevel() {
levelStart = new Date().getTime();
trigger("start_level");
}
static function endLevel() {
var _local1 = new Date().getTime() - levelStart;
trigger("end_level", {time:_local1});
}
static var ACHIEVEMENT_RECEIVED = "AchievementReceived";
static var ALIGN_TOP_LEFT = "ALIGN_TL";
static var ALIGN_TOP = "ALIGN_T";
static var ALIGN_TOP_RIGHT = "ALIGN_TR";
static var ALIGN_LEFT = "ALIGN_L";
static var ALIGN_CENTER = "ALIGN_C";
static var ALIGN_RIGHT = "ALIGN_R";
static var ALIGN_BOTTOM_LEFT = "ALIGN_BL";
static var ALIGN_BOTTOM = "ALIGN_B";
static var ALIGN_BOTTOM_RIGHT = "ALIGN_BR";
static var FORMAT_SHORT = "ShortForm";
static var FORMAT_LONG = "LongForm";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1124 MovieClip [__Packages.mochi.as2.MochiCoins] Frame 0
class mochi.as2.MochiCoins
{
function MochiCoins () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showStore(options) {
mochi.as2.MochiServices.send("coins_showStore", {options:options}, null, null);
}
static function showItem(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
return(undefined);
}
mochi.as2.MochiServices.send("coins_showItem", {options:options}, null, null);
}
static function showVideo(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
return(undefined);
}
mochi.as2.MochiServices.send("coins_showVideo", {options:options}, null, null);
}
static function showLoginWidget(options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send("coins_showLoginWidget", {options:options});
}
static function hideLoginWidget() {
mochi.as2.MochiServices.send("coins_hideLoginWidget");
}
static function getStoreItems() {
mochi.as2.MochiServices.send("coins_getStoreItems");
}
static function getUserInfo() {
mochi.as2.MochiServices.send("coins_getUserInfo");
}
static function saveUserProperties(properties) {
mochi.as2.MochiServices.send("coins_saveUserProperties", properties);
}
static function addEventListener(eventType, delegate) {
_dispatcher.addEventListener(eventType, delegate);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, delegate) {
_dispatcher.removeEventListener(eventType, delegate);
}
static var LOGGED_IN = "LoggedIn";
static var LOGGED_OUT = "LoggedOut";
static var LOGIN_SHOW = "LoginShow";
static var LOGIN_HIDE = "LoginHide";
static var STORE_SHOW = "StoreShow";
static var STORE_HIDE = "StoreHide";
static var PROFILE_SHOW = "ProfileShow";
static var PROFILE_HIDE = "ProfileHide";
static var PROPERTIES_SAVED = "PropertySaved";
static var WIDGET_LOADED = "WidgetLoaded";
static var ITEM_OWNED = "ItemOwned";
static var ITEM_NEW = "ItemNew";
static var STORE_ITEMS = "StoreItems";
static var USER_INFO = "UserInfo";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var NO_USER = "NoUser";
static var PROPERTIES_SIZE = "PropertiesSize";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1125 MovieClip [__Packages.mochi.as2.MochiAd] Frame 0
class mochi.as2.MochiAd
{
function MochiAd () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
mochi.as2.MochiAd.containerNotify(clip, {id:"hostLoadPcnt", pcnt:_local2}, clip._mochiad._containerLCName);
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local7 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local7._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
if (_local7._url.indexOf("http") != 0) {
}
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
mochi.as2.MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new Object();
var _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
containerNotify(clip, {id:"unload"}, clip._mochiad._containerLCName);
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
containerRpcResult(clip, callbackID, _local4, clip._mochiad._containerLCName);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
containerRpcResult(clip, callbackID, _local3, clip._mochiad._containerLCName);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
static function containerNotify(clip, args, lcName) {
var _local1 = clip._mochiad._mochiad_ctr.ad.app;
if (_local1.notify) {
_local1.notify(args);
} else {
new LocalConnection().send(lcName, "notify", args);
}
}
static function containerRpcResult(clip, callbackID, val, lcName) {
var _local1 = clip._mochiad._mochiad_ctr.ad.app;
if (_local1.rpcResult) {
_local1.rpcResult(callbackID, val);
} else {
new LocalConnection().send(lcName, "rpcResult", callbackID, val);
}
}
}
Symbol 1126 MovieClip [__Packages.mochi.as2.MochiScores] Frame 0
class mochi.as2.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.as2.MochiServices.warnID(boardID, true);
mochi.as2.MochiScores.boardID = boardID;
mochi.as2.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
options.clip = mochi.as2.MochiServices.clip;
if ((options.clip != mochi.as2.MochiServices.__get__clip()) || (mochi.as2.MochiServices.__get__childClip()._target == undefined)) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.connect(mochi.as2.MochiServices.__get__id(), options.clip);
}
delete options.clip;
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (options.score instanceof TextField) {
if (options.score.text != undefined) {
options.score = options.score.text;
}
} else if (options.score instanceof mochi.as2.MochiDigits) {
options.score = options.score.value;
}
var _local1 = Number(options.score);
if (isNaN(_local1)) {
} else if ((_local1 == Number.NEGATIVE_INFINITY) || (_local1 == Number.POSITIVE_INFINITY)) {
} else {
if (Math.floor(_local1) != _local1) {
}
options.score = _local1;
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.as2.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.as2.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.as2.MochiServices.warnID(options.boardID, true);
mochi.as2.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.as2.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.as2.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
score = Number(score);
if (isNaN(score)) {
} else if ((score == Number.NEGATIVE_INFINITY) || (score == Number.POSITIVE_INFINITY)) {
} else {
if (Math.floor(score) != score) {
}
score = Number(score);
}
mochi.as2.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.as2.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 1127 MovieClip [__Packages.mochi.as2.MochiDigits] Frame 0
class mochi.as2.MochiDigits
{
var Encoder, Fragment, Sibling;
function MochiDigits (digit, index) {
Encoder = 0;
setValue(digit, index);
}
function get value() {
return(Number(toString()));
}
function set value(v) {
setValue(v);
//return(value);
}
function addValue(v) {
value = value + v;
}
function setValue(digit, index) {
var _local3 = digit.toString();
if ((index == undefined) || (isNaN(index))) {
index = 0;
}
Fragment = _local3.charCodeAt(index++) ^ Encoder;
if (index < _local3.length) {
Sibling = new mochi.as2.MochiDigits(digit, index);
} else {
Sibling = null;
}
reencode();
}
function reencode() {
var _local2 = int(2147483647 * Math.random());
Fragment = Fragment ^ (_local2 ^ Encoder);
Encoder = _local2;
}
function toString() {
var _local2 = String.fromCharCode(Fragment ^ Encoder);
return(((Sibling != null) ? (_local2.concat(Sibling.toString())) : (_local2)));
}
}
Symbol 15 Button
on (release) {
play();
showHighScores = true;
}
Symbol 20 Button
on (release) {
play();
startNewGame = true;
}
Symbol 25 Button
on (release) {
saveData = null;
var saveData = SharedObject.getLocal("saveObject");
if (saveData.data._charlevel != undefined) {
_uninitiated = false;
_justloaded = true;
redPotions = 0;
yellowPotions = 0;
whitePotions = 0;
bluePotions = 0;
_quickenedThisRound = false;
_provokedThisRound = false;
_charMoney = 0;
_quickenNow = false;
_showStatus = true;
_autoSelect = true;
_charWeaponDamage = 1;
_statpoints = 48;
_skillpoints = 1;
_charlevel = 1;
_charvit = 1;
_charhptemp = 0;
_charint = 1;
_charmptemp = 0;
_charstr = 1;
_chardef = 5;
_charagi = 1;
_charluk = 1;
_chardex = 1;
_heallevel = 0;
_defendlevel = 0;
_bashlevel = 0;
_regenlevel = 0;
_provokelevel = 0;
_swordmasterylevel = 0;
_quickenlevel = 0;
_counterlevel = 0;
_enemylevel = 1;
_enemyvit = 1;
_enemyhptemp = 0;
_enemyint = 5;
_enemymptemp = 0;
_enemystr = 20;
_enemydef = 1;
_enemyagi = 1;
_enemycrit = 1;
_enemydex = 30;
_root._gameMode = saveData.data._gameMode;
_root._slotEffect = saveData.data._slotEffect;
_root._chararmor = saveData.data._chararmor;
_root._enemy = saveData.data._enemy;
_root.gameDifficulty = gameDifficulty;
_root._quickenCounter = _quickenCounter;
_root._provokeCounter = _provokeCounter;
_root.poisoncounter = saveData.data.poisoncounter;
_root.zenyBoosterCounter = zenyBoosterCounter;
_root.usedPotionThisRound = saveData.data.usedPotionThisRound;
_root.redPotions = saveData.data.redPotions;
_root.yellowPotions = saveData.data.yellowPotions;
_root.whitePotions = saveData.data.whitePotions;
_root.bluePotions = saveData.data.bluePotions;
_root._charMoney = saveData.data._charMoney;
_root._charWeaponDamage = saveData.data._charWeaponDamage;
_root._charmaxhp = saveData.data._charmaxhp;
_root._charhp = saveData.data._charhp;
_root.charhptemp = 0;
_root._charmaxmp = saveData.data._charmaxmp;
_root._charmp = saveData.data._charmp;
_root.charmptemp = 0;
_root._charlevel = saveData.data._charlevel;
_root._charstr = saveData.data._charstr;
_root._charagi = saveData.data._charagi;
_root._chardef = saveData.data._chardef;
_root._chardex = saveData.data._chardex;
_root._charvit = saveData.data._charvit;
_root._charint = saveData.data._charint;
_root._charluk = saveData.data._charluk;
_root._provokelevel = saveData.data._provokelevel;
_root._bashlevel = saveData.data._bashlevel;
_root._regenlevel = saveData.data._regenlevel;
_root._quickenlevel = saveData.data._quickenlevel;
_root._defendlevel = saveData.data._defendlevel;
_root._swordmasterylevel = saveData.data._swordmasterylevel;
_root._counterlevel = saveData.data._counterlevel;
_root._heallevel = saveData.data._heallevel;
_root._statpoints = saveData.data._statpoints;
_root._skillPoints = saveData.data._skillPoints;
_root._enemylevel = saveData.data._enemylevel;
_root._enemyvit = saveData.data._enemyvit;
_root._enemymaxhp = saveData.data._enemymaxhp;
_root._enemyhp = saveData.data._enemyhp;
_root.enemyhptemp = 0;
_root._enemyint = saveData.data._enemyint;
_root._enemymaxmp = saveData.data._enemymaxmp;
_root._enemymp = saveData.data._enemymp;
_root.enemymptemp = 0;
_root._enemystr = saveData.data._enemystr;
_root._enemydef = saveData.data._enemydef;
_root._enemyagi = saveData.data._enemyagi;
_root._enemydex = saveData.data._enemydex;
_root._actualcharstr = (saveData.data._charstr + (4 * _root._swordmasterylevel)) + _charWeaponDamage;
_root._charbasedamage = (Math.round(_root._actualcharstr) + "-") + Math.round(_root._actualcharstr * 1.1);
saveData.clear();
gotoAndPlay (13);
} else {
continueButton._visible = false;
}
}
Symbol 30 Button
on (release) {
gotoAndPlay (929);
}
Symbol 36 Button
on (release) {
_gameMode = "SLOTMACHINE";
play();
}
Symbol 44 Button
on (release) {
_gameMode = "normal";
play();
}
Symbol 50 Button
on (release) {
gotoAndPlay (9);
}
Symbol 55 Button
on (release) {
gameDifficulty = "normal";
play();
}
Symbol 62 Button
on (release) {
gameDifficulty = "easy";
play();
}
Symbol 68 Button
on (release) {
gameDifficulty = "hard";
play();
}
Symbol 69 Button
on (release) {
gotoAndPlay (10);
}
Symbol 76 Button
on (release) {
statusScreen._visible = false;
statusEx._visible = false;
play();
}
Symbol 79 MovieClip Frame 1
Symbol 81 MovieClip Frame 1
function hidestatbutton(_type, _buttonName, _stat, _limit, _statCost, _statCost2) {
if (_type == "stat") {
if ((_root._statpoints < (1 + Math.floor((_stat - 1) / 10))) || (_stat >= _limit)) {
tellTarget (statButtons) {
setProperty(_buttonName, _visible , false);
};
} else {
tellTarget (statButtons) {
setProperty(_buttonName, _visible , true);
};
}
}
if (_type == "skill") {
if ((_root._skillpoints < (1 + Math.floor((_stat - 1) / 10))) || (_stat >= _limit)) {
tellTarget (skillButtons) {
setProperty(_buttonName, _visible , false);
};
} else {
tellTarget (skillButtons) {
setProperty(_buttonName, _visible , true);
};
}
}
_statCost.text = 1 + Math.floor((_stat - 1) / 10);
_statCost2.text = 1 + Math.floor((_stat - 1) / 10);
}
statButtons.onEnterFrame = function () {
if (_root._statpoints <= 0) {
statButtons._visible = false;
} else {
statButtons._visible = true;
}
if (_root._skillpoints <= 0) {
skillButtons._visible = false;
} else {
skillButtons._visible = true;
}
hidestatbutton("stat", "strButton", _root._charstr, 99, strengthCost, strengthCost2);
hidestatbutton("stat", "agiButton", _root._charagi, 99, agilityCost, agilityCost2);
hidestatbutton("stat", "dexButton", _root._chardex, 99, dexterityCost, dexterityCost2);
hidestatbutton("stat", "vitButton", _root._charvit, 99, vitalityCost, vitalityCost2);
hidestatbutton("stat", "intButton", _root._charint, 99, intelligenceCost, intelligenceCost2);
hidestatbutton("stat", "lukButton", _root._charluk, 99, luckCost, luckCost2);
hidestatbutton("skill", "provokeButton", _root._provokelevel, 10);
hidestatbutton("skill", "regenButton", _root._regenlevel, 10);
hidestatbutton("skill", "bashButton", _root._bashlevel, 10);
hidestatbutton("skill", "swordmasteryButton", _root._swordmasterylevel, 10);
hidestatbutton("skill", "defendButton", _root._defendlevel, 10);
hidestatbutton("skill", "healButton", _root._heallevel, 10);
hidestatbutton("skill", "quickenButton", _root._quickenlevel, 10);
};
Symbol 90 Button
on (release) {
shopWindow._visible = true;
shopButton._visible = false;
fightButton._visible = false;
dimmer._visible = false;
}
Symbol 95 Button
on (release, keyPress "<Space>") {
play();
}
Symbol 171 Button
on (release) {
if (_root.gameDifficulty == "easy") {
initialPointsRequired = 1;
} else if (_root.gameDifficulty == "normal") {
initialPointsRequired = 2;
} else if (_root.gameDifficulty == "hard") {
initialPointsRequired = 3;
}
_pointsrequired = initialPointsRequired + Math.floor((_root._charstr - 1) / 10);
if (_root._statpoints >= _pointsrequired) {
_root._charstr++;
_root._statpoints = _root._statpoints - _pointsrequired;
_root.calculatebaseDamage();
}
}
Symbol 172 Button
on (release) {
if (_root.gameDifficulty == "easy") {
initialPointsRequired = 1;
} else if (_root.gameDifficulty == "normal") {
initialPointsRequired = 2;
} else if (_root.gameDifficulty == "hard") {
initialPointsRequired = 3;
}
_pointsrequired = initialPointsRequired + Math.floor((_root._chardex - 1) / 10);
if (_root._statpoints >= _pointsrequired) {
_root._chardex++;
_root._statpoints = _root._statpoints - _pointsrequired;
_root.calculateHit();
}
}
Symbol 173 Button
on (release) {
if (_root.gameDifficulty == "easy") {
initialPointsRequired = 1;
} else if (_root.gameDifficulty == "normal") {
initialPointsRequired = 2;
} else if (_root.gameDifficulty == "hard") {
initialPointsRequired = 3;
}
_pointsrequired = initialPointsRequired + Math.floor((_root._charvit - 1) / 10);
if (_root._statpoints >= _pointsrequired) {
_root._charvit++;
_root._statpoints = _root._statpoints - _pointsrequired;
_temp = _root._charmaxhp;
_root.getCharHP();
_root._charhp = _root._charhp + (_root._charmaxhp - _temp);
}
}
Symbol 174 Button
on (release) {
if (_root.gameDifficulty == "easy") {
initialPointsRequired = 1;
} else if (_root.gameDifficulty == "normal") {
initialPointsRequired = 2;
} else if (_root.gameDifficulty == "hard") {
initialPointsRequired = 3;
}
_pointsrequired = initialPointsRequired + Math.floor((_root._charint - 1) / 10);
if (_root._statpoints >= _pointsrequired) {
_root._charint++;
_root._statpoints = _root._statpoints - _pointsrequired;
_temp = _root._charmaxmp;
_root.getCharMP();
_root._charmp = _root._charmp + (_root._charmaxmp - _temp);
}
}
Symbol 175 Button
on (release) {
if (_root.gameDifficulty == "easy") {
initialPointsRequired = 1;
} else if (_root.gameDifficulty == "normal") {
initialPointsRequired = 2;
} else if (_root.gameDifficulty == "hard") {
initialPointsRequired = 3;
}
_pointsrequired = initialPointsRequired + Math.floor((_root._charluk - 1) / 10);
if (_root._statpoints >= _pointsrequired) {
_root._charluk++;
_root._statpoints = _root._statpoints - _pointsrequired;
_root.calculateCrit();
}
}
Symbol 176 Button
on (release) {
if (_root.gameDifficulty == "easy") {
initialPointsRequired = 1;
} else if (_root.gameDifficulty == "normal") {
initialPointsRequired = 2;
} else if (_root.gameDifficulty == "hard") {
initialPointsRequired = 3;
}
_pointsrequired = initialPointsRequired + Math.floor((_root._charagi - 1) / 10);
if (_root._statpoints >= _pointsrequired) {
_root._charagi++;
_root._statpoints = _root._statpoints - _pointsrequired;
_root.calculateEva();
_root.calculateHits();
}
}
Symbol 178 Button
on (release) {
if (_root._skillpoints > 0) {
_root._provokelevel++;
_root._skillpoints--;
}
}
Symbol 179 Button
on (release) {
if (_root._skillpoints > 0) {
_root._regenlevel++;
_root._skillpoints--;
if (_root._skillpoints <= 0) {
_root.statusButtons._visible = false;
}
}
}
Symbol 180 Button
on (release) {
if (_root._skillpoints > 0) {
_root._bashlevel++;
_root._skillpoints--;
if (_root._skillpoints <= 0) {
_root.statusButtons._visible = false;
}
}
}
Symbol 181 Button
on (release) {
if (_root._skillpoints > 0) {
_root._swordmasterylevel++;
_root._skillpoints--;
_root.calculatebaseDamage();
if (_root._skillpoints <= 0) {
_root._statusButtons._visible = false;
}
}
}
Symbol 182 Button
on (release) {
if (_root._skillpoints > 0) {
_root._defendlevel++;
_root._skillpoints--;
}
}
Symbol 183 Button
on (release) {
if (_root._skillpoints > 0) {
_root._heallevel++;
_root._skillpoints--;
}
}
Symbol 184 Button
on (release) {
if (_root._skillpoints > 0) {
_root._quickenlevel++;
_root._skillpoints--;
if (_root._skillpoints <= 0) {
_root.statusButtons._visible = false;
}
}
}
Symbol 185 Button
on (release) {
if (_root._skillpoints > 0) {
_root._counterlevel++;
_root._skillpoints--;
}
}
Symbol 187 MovieClip Frame 1
function hidestatbutton(_type, _buttonName, _stat, _limit, _statCost, _statCost2) {
if (_root.gameDifficulty == "easy") {
initialPointsRequired = 1;
} else if (_root.gameDifficulty == "normal") {
initialPointsRequired = 2;
} else if (_root.gameDifficulty == "hard") {
initialPointsRequired = 3;
}
if (_type == "stat") {
if ((_root._statpoints < (initialPointsRequired + Math.floor((_stat - 1) / 10))) || (_stat >= _limit)) {
tellTarget (statButtons) {
setProperty(_buttonName, _visible , false);
};
} else {
tellTarget (statButtons) {
setProperty(_buttonName, _visible , true);
};
}
}
if (_type == "skill") {
if ((_root._skillpoints < (1 + Math.floor((_stat - 1) / 10))) || (_stat >= _limit)) {
tellTarget (skillButtons) {
setProperty(_buttonName, _visible , false);
};
} else {
tellTarget (skillButtons) {
setProperty(_buttonName, _visible , true);
};
}
}
_statCost.text = initialPointsRequired + Math.floor((_stat - 1) / 10);
_statCost2.text = initialPointsRequired + Math.floor((_stat - 1) / 10);
}
cursedText = new TextFormat();
cursedText.color = 16711680 /* 0xFF0000 */;
normalText = new TextFormat();
normalText.color = 16777215 /* 0xFFFFFF */;
misfortune._visible = false;
stripweapon._visible = false;
slowed._visible = false;
striparmor._visible = false;
critText.setTextFormat(normalText);
damageText.setTextFormat(normalText);
hitsText.setTextFormat(normalText);
evasionText.setTextFormat(normalText);
defText.setTextFormat(normalText);
if (_root._slotEffect == "MISFORTUNE") {
critText.setTextFormat(cursedText);
} else if (_root._slotEffect == "STRIPWEAPON") {
damageText.setTextFormat(cursedText);
} else if (_root._slotEffect == "SLOW") {
hitsText.setTextFormat(cursedText);
evasionText.setTextFormat(cursedText);
} else if (_root._slotEffect == "STRIPARMOR") {
defText.setTextFormat(cursedText);
}
statButtons.onEnterFrame = function () {
if (_root._statpoints <= 0) {
statButtons._visible = false;
} else {
statButtons._visible = true;
}
if (_root._skillpoints <= 0) {
skillButtons._visible = false;
} else {
skillButtons._visible = true;
}
hidestatbutton("stat", "strButton", _root._charstr, _root._charstrLimit, strengthCost, strengthCost2);
hidestatbutton("stat", "agiButton", _root._charagi, _root._charagiLimit, agilityCost, agilityCost2);
hidestatbutton("stat", "dexButton", _root._chardex, _root._chardexLimit, dexterityCost, dexterityCost2);
hidestatbutton("stat", "vitButton", _root._charvit, _root._charvitLimit, vitalityCost, vitalityCost2);
hidestatbutton("stat", "intButton", _root._charint, _root._charintLimit, intelligenceCost, intelligenceCost2);
hidestatbutton("stat", "lukButton", _root._charluk, _root._charlukLimit, luckCost, luckCost2);
hidestatbutton("skill", "provokeButton", _root._provokelevel, 10);
hidestatbutton("skill", "regenButton", _root._regenlevel, 10);
hidestatbutton("skill", "bashButton", _root._bashlevel, 10);
hidestatbutton("skill", "swordmasteryButton", _root._swordmasterylevel, 10);
hidestatbutton("skill", "defendButton", _root._defendlevel, 10);
hidestatbutton("skill", "healButton", _root._heallevel, 10);
hidestatbutton("skill", "quickenButton", _root._quickenlevel, 10);
hidestatbutton("skill", "counterButton", _root._counterlevel, 10);
};
Symbol 188 Button
on (release, keyPress "<Space>") {
if (justInitiated || (_justloaded)) {
play();
} else {
statusScreen._visible = false;
statusEx._visible = false;
shopButton._visible = true;
fightButton._visible = true;
dimmer._visible = true;
}
}
Symbol 191 MovieClip Frame 1
stop();
Symbol 191 MovieClip Frame 2
stop();
Symbol 193 Button
on (release) {
if (_root._autoDefend) {
_root._autoDefend = false;
} else {
_root._autoDefend = true;
}
}
Symbol 194 Button
on (release) {
if (_root._autoAttack) {
_root._autoAttack = false;
} else {
_root._autoAttack = true;
}
}
Symbol 195 Button
on (release) {
if (_root._autoBash) {
_root._autoBash = false;
} else {
_root._autoBash = true;
}
}
Symbol 196 Button
on (release) {
if (_root._autoHeal) {
_root._autoHeal = false;
} else {
_root._autoHeal = true;
}
}
Symbol 197 Button
on (release) {
if (_root._autoProvoke) {
_root._autoProvoke = false;
} else {
_root._autoProvoke = true;
}
}
Symbol 198 Button
on (release) {
if (_root._autoQuicken) {
_root._autoQuicken = false;
} else {
_root._autoQuicken = true;
}
}
Symbol 199 Button
on (release) {
if (_root._showStatus) {
_root._showStatus = false;
} else {
_root._showStatus = true;
}
}
Symbol 200 Button
on (release) {
if (_root._autoSelect) {
_root._autoSelect = false;
} else {
_root._autoSelect = true;
}
}
Symbol 208 Button
on (release) {
_root._healPercent = _root._healPercent + 5;
if (_root._healPercent > 95) {
_root._healPercent = 95;
}
}
Symbol 209 Button
on (release) {
_root._healPercent = _root._healPercent - 5;
if (_root._healPercent < 5) {
_root._healPercent = 5;
}
}
Symbol 214 Button
on (release) {
_root._autoAttack = false;
_root._autoDefend = false;
_root._autoBash = false;
_root._autoProvoke = false;
_root._autoHeal = false;
_root._autoQuicken = false;
}
Symbol 215 MovieClip Frame 1
autoAttackClip.onEnterFrame = function () {
if (_root._autoAttack) {
tellTarget (autoAttackClip) {
gotoAndStop (2);
};
} else {
tellTarget (autoAttackClip) {
gotoAndStop (1);
};
}
if (_root._autoDefend) {
tellTarget (autoDefendClip) {
gotoAndStop (2);
};
} else {
tellTarget (autoDefendClip) {
gotoAndStop (1);
};
}
if (_root._autoBash) {
tellTarget (autoBashClip) {
gotoAndStop (2);
};
} else {
tellTarget (autoBashClip) {
gotoAndStop (1);
};
}
if (_root._autoProvoke) {
tellTarget (autoProvokeClip) {
gotoAndStop (2);
};
} else {
tellTarget (autoProvokeClip) {
gotoAndStop (1);
};
}
if (_root._autoHeal) {
tellTarget (autoHealClip) {
gotoAndStop (2);
};
} else {
tellTarget (autoHealClip) {
gotoAndStop (1);
};
}
if (_root._autoQuicken) {
tellTarget (autoQuickenClip) {
gotoAndStop (2);
};
} else {
tellTarget (autoQuickenClip) {
gotoAndStop (1);
};
}
if (_root._showStatus) {
tellTarget (showStatusClip) {
gotoAndStop (2);
};
} else {
tellTarget (showStatusClip) {
gotoAndStop (1);
};
}
if (_root._autoSelect) {
tellTarget (autoSelectClip) {
gotoAndStop (2);
};
} else {
tellTarget (autoSelectClip) {
gotoAndStop (1);
};
}
};
Symbol 251 Button
on (release) {
buyArmor(10000, 5, 10);
}
Symbol 254 Button
on (release) {
buyArmor(20000, 15, 25);
}
Symbol 262 Button
on (release) {
buyArmor(30000, 25, 40);
}
Symbol 265 Button
on (release) {
buyArmor(50000, 35, 65);
}
Symbol 268 Button
on (release) {
buyArmor(80000, 45, 100);
}
Symbol 275 Button
on (release) {
buyWeapon(10000, 10, 10);
}
Symbol 277 Button
on (release) {
buyWeapon(20000, 20, 25);
}
Symbol 279 Button
on (release) {
buyWeapon(30000, 30, 40);
}
Symbol 280 Button
on (release) {
buyWeapon(50000, 40, 65);
}
Symbol 281 Button
on (release) {
buyWeapon(80000, 50, 100);
}
Symbol 282 Button
on (release, keyPress "<Space>") {
_root.shopWindow._visible = false;
_root.shopButton._visible = true;
_root.fightButton._visible = true;
_root.dimmer._visible = true;
}
Symbol 290 Button
on (release) {
gotoAndStop (2);
}
Symbol 305 Button
on (release) {
buyPotion(1, 500);
}
Symbol 308 Button
on (release) {
buyPotion(2, 1600);
}
Symbol 310 Button
on (release) {
buyPotion(3, 4200);
}
Symbol 313 Button
on (release) {
buyPotion(4, 4200);
}
Symbol 320 Button
on (release) {
buyEnchantment(1, 15000, 0);
}
Symbol 325 Button
on (release) {
gotoAndStop (1);
}
Symbol 326 MovieClip Frame 1
function buyEnchantment(_itemNum, _itemCost, _itemLevelReq) {
if (_itemCost <= _root._charMoney) {
_root._charMoney = _root._charMoney - _itemCost;
if (_itemNum == 1) {
_root.zenyBoosterCounter = 15;
}
}
}
function buyPotion(_itemNum, _itemCost) {
if (_itemCost <= _root._charMoney) {
_root._charMoney = _root._charMoney - _itemCost;
if (_itemNum == 1) {
_root.redPotions++;
} else if (_itemNum == 2) {
_root.yellowPotions++;
} else if (_itemNum == 3) {
_root.whitePotions++;
} else if (_itemNum == 4) {
_root.bluePotions++;
}
}
}
function buyArmor(_itemCost, _itemDefense, _itemLevelReq) {
if (((_itemCost <= _root._charMoney) && (_itemLevelReq <= _root._charlevel)) && (_itemDefense > _root._chararmor)) {
_root._charMoney = _root._charMoney - _itemCost;
_root._chararmor = _itemDefense;
}
}
function buyWeapon(_itemCost, _itemDamage, _itemLevelReq) {
if (((_itemCost <= _root._charMoney) && (_itemLevelReq <= _root._charlevel)) && (_itemDamage > _root._charWeaponDamage)) {
_root._charMoney = _root._charMoney - _itemCost;
_root._charWeaponDamage = _itemDamage;
}
}
function shop(_item, _itemCost, _itemLevelReq, _enchantmentCounter) {
if (((_itemCost > _root._charMoney) || (_itemLevelReq > _root._charlevel)) || (_enchantmentCounter > 0)) {
_item._visible = false;
}
}
stop();
shop(woodenMail, 10000, 10);
shop(paddedArmor, 20000, 25);
shop(chainMail, 30000, 40);
shop(fullPlate, 50000, 65);
shop(plateArmor, 80000, 100);
shop(katana, 10000, 10);
shop(slayer, 20000, 25);
shop(bastardSword, 30000, 40);
shop(broadSword, 50000, 65);
shop(claymore, 80000, 100);
shopOnEnterClip.onEnterFrame = function () {
shop(woodenMail, 10000, 10);
shop(paddedArmor, 20000, 25);
shop(chainMail, 30000, 40);
shop(fullPlate, 50000, 65);
shop(plateArmor, 80000, 100);
shop(katana, 10000, 10);
shop(slayer, 20000, 25);
shop(bastardSword, 30000, 40);
shop(broadSword, 50000, 65);
shop(claymore, 80000, 100);
shop(redPotion, 500);
shop(yellowPotion, 1600);
shop(whitePotion, 4200);
shop(bluePotion, 4200);
shop(zenyBooster, 15000, 0, _root.zenyBoosterCounter);
};
Symbol 326 MovieClip Frame 2
shop(redPotion, 500);
shop(yellowPotion, 1600);
shop(whitePotion, 4200);
shop(bluePotion, 4200);
shop(zenyBooster, 15000, 0, _root.zenyBoosterCounter);
Symbol 359 MovieClip Frame 1
stop();
Symbol 368 MovieClip Frame 1
stop();
blueBarTemp.onEnterFrame = function () {
if ((_root._slotEffect == "POISON") || (_root.poisoncounter > 0)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
};
stop();
Symbol 368 MovieClip Frame 2
stop();
Symbol 388 Button
on (release) {
toggleMusic();
}
on (keyPress "M") {
toggleMusic();
}
on (keyPress "m") {
toggleMusic();
}
Symbol 392 MovieClip Frame 2
stop();
Symbol 392 MovieClip Frame 3
stop();
Symbol 392 MovieClip Frame 4
stop();
Symbol 392 MovieClip Frame 5
gotoAndPlay (2);
Symbol 394 Button
on (release) {
qualiToggle.play();
}
on (keyPress "q") {
qualiToggle.play();
}
on (keyPress "Q") {
qualiToggle.play();
}
Symbol 401 MovieClip Frame 1
stop();
_quality = "HIGH";
Symbol 401 MovieClip Frame 2
stop();
_quality = "MEDIUM";
Symbol 401 MovieClip Frame 3
stop();
_quality = "LOW";
Symbol 469 MovieClip Frame 1
stop();
Symbol 474 MovieClip Frame 1
stop();
Symbol 492 MovieClip Frame 1
stop();
Symbol 492 MovieClip Frame 2
stop();
Symbol 507 MovieClip Frame 1
stop();
Symbol 507 MovieClip Frame 2
_root.gotoandstop47();
Symbol 507 MovieClip Frame 37
gotoAndStop (1);
_root.enemyAI();
Symbol 507 MovieClip Frame 38
_root.gotoandstop47();
Symbol 507 MovieClip Frame 73
gotoAndStop (1);
_root.enemyAI();
Symbol 507 MovieClip Frame 74
_root.gotoandstop47();
Symbol 507 MovieClip Frame 109
gotoAndStop (1);
_root.enemyAI();
Symbol 507 MovieClip Frame 110
_root.gotoandstop47();
Symbol 507 MovieClip Frame 145
gotoAndStop (1);
_root.enemyAI();
Symbol 528 Button
on (release) {
commandAttack();
}
Symbol 532 Button
on (release) {
commandDefend();
}
Symbol 536 Button
on (release) {
commandBash();
}
Symbol 539 Button
on (release) {
gotoAndPlay (840);
}
Symbol 543 Button
on (release) {
commandHeal();
}
Symbol 548 Button
on (release) {
commandProvoke();
}
Symbol 549 Button
on (keyPress "<Escape>") {
_quitgame = true;
if (_enemy == "bapho") {
gotoAndPlay (310);
} else if (_enemy == "eddga") {
gotoAndPlay (668);
}
}
on (release) {
_quitgame = true;
if (_enemy == "bapho") {
gotoAndPlay (310);
} else if (_enemy == "eddga") {
gotoAndPlay (668);
}
}
Symbol 551 Button
on (release) {
commandQuicken();
}
Symbol 552 Button
on (release) {
commandStatus();
}
Symbol 554 Button
on (release) {
if (potionList._visible) {
potionList._visible = false;
} else {
potionList._visible = true;
}
}
Symbol 561 Button
on (release) {
if ((_root.redPotions > 0) && (_root.usedPotionThisRound == false)) {
_root.usedPotionThisRound = true;
_root.potionEffect.gotoAndPlay(38);
_root.potionList._visible = false;
_root.useButton._visible = false;
_root.redPotions--;
_root._charhp = _root._charhp + 100;
if (_root._charhp > _root._charmaxhp) {
_root._charhp = _root._charmaxhp;
}
}
}
Symbol 562 Button
on (release) {
if ((_root.yellowPotions > 0) && (_root.usedPotionThisRound == false)) {
_root.usedPotionThisRound = true;
_root.potionEffect.gotoAndPlay(74);
_root.potionList._visible = false;
_root.useButton._visible = false;
_root.yellowPotions--;
_root._charhp = _root._charhp + 300;
if (_root._charhp > _root._charmaxhp) {
_root._charhp = _root._charmaxhp;
}
}
}
Symbol 563 Button
on (release) {
if ((_root.whitePotions > 0) && (_root.usedPotionThisRound == false)) {
_root.usedPotionThisRound = true;
_root.potionEffect.gotoAndPlay(110);
_root.potionList._visible = false;
_root.useButton._visible = false;
_root.whitePotions--;
_root._charhp = _root._charhp + 800;
if (_root._charhp > _root._charmaxhp) {
_root._charhp = _root._charmaxhp;
}
}
}
Symbol 564 Button
on (release) {
if ((_root.bluePotions > 0) && (_root.usedPotionThisRound == false)) {
_root.usedPotionThisRound = true;
_root.potionEffect.gotoAndPlay(2);
_root.potionList._visible = false;
_root.useButton._visible = false;
_root.bluePotions--;
_root._charmp = _root._charmp + 50;
if (_root._charmp > _root._charmaxmp) {
_root._charmp = _root._charmaxmp;
}
}
}
Symbol 577 Button
on (release) {
if (suicideButton._visible) {
suicideButton._visible = false;
suicideButton2._visible = false;
} else {
suicideButton._visible = true;
suicideButton2._visible = true;
}
}
Symbol 580 Button
on (release) {
var saveData = SharedObject.getLocal("saveObject");
saveData.data._gameMode = _root._gameMode;
saveData.data._slotEffect = _root._slotEffect;
saveData.data._chararmor = _root._chararmor;
saveData.data._enemy = _root._enemy;
saveData.data.gameDifficulty = gameDifficulty;
saveData.data._quickenCounter = _quickenCounter;
saveData.data._provokeCounter = _provokeCounter;
saveData.data.poisoncounter = _root.poisoncounter;
saveData.data.zenyBoosterCounter = zenyBoosterCounter;
saveData.data.usedPotionThisRound = _root.usedPotionThisRound;
saveData.data.redPotions = _root.redPotions;
saveData.data.yellowPotions = _root.yellowPotions;
saveData.data.whitePotions = _root.whitePotions;
saveData.data.bluePotions = _root.bluePotions;
saveData.data._charMoney = _root._charMoney;
saveData.data._charWeaponDamage = _root._charWeaponDamage;
saveData.data._charmaxhp = _root._charmaxhp;
saveData.data._charhp = _root._charhp;
saveData.data.charhptemp = 0;
saveData.data._charmaxmp = _root._charmaxmp;
saveData.data._charmp = _root._charmp;
saveData.data.charmptemp = 0;
saveData.data._charlevel = _root._charlevel;
saveData.data._charstr = _root._charstr;
saveData.data._charagi = _root._charagi;
saveData.data._chardef = _root._chardef;
saveData.data._chardex = _root._chardex;
saveData.data._charvit = _root._charvit;
saveData.data._charint = _root._charint;
saveData.data._charluk = _root._charluk;
saveData.data._provokelevel = _root._provokelevel;
saveData.data._bashlevel = _root._bashlevel;
saveData.data._regenlevel = _root._regenlevel;
saveData.data._quickenlevel = _root._quickenlevel;
saveData.data._defendlevel = _root._defendlevel;
saveData.data._swordmasterylevel = _root._swordmasterylevel;
saveData.data._counterlevel = _root._counterlevel;
saveData.data._heallevel = _root._heallevel;
saveData.data._statpoints = _root._statpoints;
saveData.data._skillPoints = _root._skillPoints;
saveData.data._enemylevel = _root._enemylevel;
saveData.data._enemyvit = _root._enemyvit;
saveData.data._enemymaxhp = _root._enemymaxhp;
saveData.data._enemyhp = _root._enemyhp;
saveData.data.enemyhptemp = 0;
saveData.data._enemyint = _root._enemyint;
saveData.data._enemymaxmp = _root._enemymaxmp;
saveData.data._enemymp = _root._enemymp;
saveData.data.enemymptemp = 0;
saveData.data._enemystr = _root._enemystr;
saveData.data._enemydef = _root._enemydef;
saveData.data._enemyagi = _root._enemyagi;
saveData.data._enemydex = _root._enemydex;
saveData.flush();
gotoAndPlay (9);
}
Symbol 586 Button
on (release) {
if (_root.suicideButton._visible) {
_root.suicideButton._visible = false;
_root.suicideButton2._visible = false;
} else {
_root.suicideButton._visible = true;
_root.suicideButton2._visible = true;
}
}
Symbol 593 Button
on (release) {
_quitgame = true;
if (_enemy == "bapho") {
gotoAndPlay (310);
} else if (_enemy == "eddga") {
gotoAndPlay (668);
} else if (_enemy == "turtle") {
gotoAndPlay (840);
}
}
Symbol 596 MovieClip Frame 1
stop();
Symbol 609 MovieClip Frame 1
stop();
Symbol 609 MovieClip Frame 2
stop();
_spikecounter = 50;
setProperty(spike, _rotation , random(360));
_random = random(100);
setProperty(spike, _xscale , _random);
setProperty(spike, _yscale , _random);
spike.onEnterFrame = function () {
if (_spikecounter > 0) {
duplicateMovieClip (spike, "spike" + _spikecounter, _spikecounter);
setProperty("spike" + _spikecounter, _rotation , random(360));
_random = random(100);
setProperty("spike" + _spikecounter, _xscale , _random);
setProperty("spike" + _spikecounter, _yscale , _random);
_spikecounter--;
duplicateMovieClip (spike, "spike" + _spikecounter, _spikecounter);
setProperty("spike" + _spikecounter, _rotation , random(360));
_random = random(100);
setProperty("spike" + _spikecounter, _xscale , _random);
setProperty("spike" + _spikecounter, _yscale , _random);
_spikecounter--;
duplicateMovieClip (spike, "spike" + _spikecounter, _spikecounter);
setProperty("spike" + _spikecounter, _rotation , random(360));
_random = random(100);
setProperty("spike" + _spikecounter, _xscale , _random);
setProperty("spike" + _spikecounter, _yscale , _random);
_spikecounter--;
duplicateMovieClip (spike, "spike" + _spikecounter, _spikecounter);
setProperty("spike" + _spikecounter, _rotation , random(360));
_random = random(100);
setProperty("spike" + _spikecounter, _xscale , _random);
setProperty("spike" + _spikecounter, _yscale , _random);
_spikecounter--;
duplicateMovieClip (spike, "spike" + _spikecounter, _spikecounter);
setProperty("spike" + _spikecounter, _rotation , random(360));
_random = random(100);
setProperty("spike" + _spikecounter, _xscale , _random);
setProperty("spike" + _spikecounter, _yscale , _random);
_spikecounter--;
}
};
Symbol 612 MovieClip Frame 1
stop();
Symbol 614 MovieClip Frame 5
stop();
Symbol 615 MovieClip Frame 5
stop();
Symbol 616 MovieClip Frame 5
stop();
Symbol 617 MovieClip Frame 1
stop();
Symbol 617 MovieClip Frame 2
stop();
_spikecounter = 50;
spike.onEnterFrame = function () {
while (_spikecounter > 0) {
duplicateMovieClip (spike, "spike" + _spikecounter, _spikecounter);
setProperty("spike" + _spikecounter, _rotation , random(360));
_random = random(100);
setProperty("spike" + _spikecounter, _xscale , _random);
setProperty("spike" + _spikecounter, _yscale , _random);
_spikecounter--;
duplicateMovieClip (spike2, "spike" + _spikecounter, _spikecounter);
setProperty("spike" + _spikecounter, _rotation , random(360));
_random = random(100);
setProperty("spike" + _spikecounter, _xscale , _random);
setProperty("spike" + _spikecounter, _yscale , _random);
_spikecounter--;
duplicateMovieClip (spike3, "spike" + _spikecounter, _spikecounter);
setProperty("spike" + _spikecounter, _rotation , random(360));
_random = random(100);
setProperty("spike" + _spikecounter, _xscale , _random);
setProperty("spike" + _spikecounter, _yscale , _random);
_spikecounter--;
duplicateMovieClip (spike2, "spike" + _spikecounter, _spikecounter);
setProperty("spike" + _spikecounter, _rotation , random(360));
_random = random(100);
setProperty("spike" + _spikecounter, _xscale , _random);
setProperty("spike" + _spikecounter, _yscale , _random);
_spikecounter--;
duplicateMovieClip (spike, "spike" + _spikecounter, _spikecounter);
setProperty("spike" + _spikecounter, _rotation , random(360));
_random = random(100);
setProperty("spike" + _spikecounter, _xscale , _random);
setProperty("spike" + _spikecounter, _yscale , _random);
_spikecounter--;
}
};
Symbol 620 MovieClip Frame 1
stop();
Symbol 623 MovieClip Frame 1
stop();
Symbol 626 MovieClip Frame 1
stop();
Symbol 628 MovieClip Frame 1
stop();
Symbol 636 MovieClip Frame 1
stop();
Symbol 648 MovieClip Frame 1
stop();
Symbol 651 MovieClip Frame 1
stop();
Symbol 664 MovieClip Frame 3
stop();
Symbol 669 MovieClip Frame 7
stop();
Symbol 670 MovieClip Frame 1
stop();
Symbol 680 MovieClip Frame 1
stop();
Symbol 690 MovieClip Frame 8
stop();
Symbol 690 MovieClip Frame 16
stop();
Symbol 697 MovieClip Frame 9
stop();
Symbol 706 MovieClip Frame 10
stop();
Symbol 719 MovieClip Frame 1
stop();
Symbol 747 MovieClip Frame 1
stop();
Symbol 751 MovieClip Frame 1
stop();
Symbol 760 MovieClip Frame 1
stop();
Symbol 767 MovieClip Frame 10
stop();
Symbol 771 MovieClip Frame 5
stop();
Symbol 784 MovieClip Frame 2
stop();
i = 10;
wind.onEnterFrame = function () {
if (i > 0) {
i--;
duplicateMovieClip (wind, "wind" + i, i);
setProperty("wind" + i, _yscale , random(3) * 30);
setProperty("wind" + i, _y , (wind._y + random(10)) - 20);
setProperty("wind" + i, _x , (wind._x + random(20)) - 10);
}
};
Symbol 814 Button
on (release) {
stopSlotMachine();
slotButton._visible = false;
}
Symbol 820 MovieClip Frame 1
stop();
Symbol 821 MovieClip Frame 1
if (_root._autoSelect && (_root._autoSelected == false)) {
_root._autoSelected = true;
slotButton._visible = false;
_autoSelectCounter = 24 + random(36);
}
autoSelectTemp.onEnterFrame = function () {
_autoSelectCounter--;
if (_autoSelectCounter == 0) {
stopSlotMachine();
}
};
function stopSlotMachine() {
_temp3 = 1;
slotMachineFrame.onEnterFrame = function () {
if (_temp3 < 23) {
play();
_temp3 = _temp3 + 1;
} else if (((_root.slotMachine._currentframe - 1) % 4) == 0) {
stop();
if (_root._slotEffect == "NONE") {
if (((_root.slotMachine._currentframe - 1) / 4) == 0) {
_root._slotEffect = "STRIPARMOR";
} else if (((_root.slotMachine._currentframe - 1) / 4) == 8) {
_root._slotEffect = "DAMAGE";
_root._charhp = _root._charhp - (_root._charmaxhp / 5);
if (_root._charhp < 1) {
_root._charhp = 1;
}
} else if (((_root.slotMachine._currentframe - 1) / 4) == 7) {
_root._slotEffect = "RESTORE";
_root._charhp = _root._charmaxhp;
_root._charmp = _root._charmaxmp;
} else if (((_root.slotMachine._currentframe - 1) / 4) == 6) {
_root._slotEffect = "SLOW";
} else if (((_root.slotMachine._currentframe - 1) / 4) == 5) {
_root._slotEffect = "MISFORTUNE";
} else if (((_root.slotMachine._currentframe - 1) / 4) == 4) {
_root._slotEffect = "MISS";
} else if (((_root.slotMachine._currentframe - 1) / 4) == 3) {
_root._slotEffect = "STRIPWEAPON";
} else if (((_root.slotMachine._currentframe - 1) / 4) == 2) {
_root._slotEffect = "POISON";
} else if (((_root.slotMachine._currentframe - 1) / 4) == 1) {
_root._slotEffect = "ZENY";
_root._charMoney = _root._charMoney + 5000;
plus5000zeny.play();
}
}
_timeCounter = _timeCounter - 0.025;
if (_timeCounter < 0) {
_root.play();
}
}
};
}
_timeCounter = 1;
_root._slotEffect = "NONE";
Symbol 834 Button
on (release, keyPress "<Space>") {
if (_root._gameMode == "SLOTMACHINE") {
gotoAndStop (533);
} else {
gotoAndStop (538);
}
}
Symbol 843 Button
on (release) {
if (bgmusic._currentframe == 2) {
_allowmusic = false;
} else if (bgmusic._currentframe == 3) {
_allowsound = false;
} else {
_allowsound = true;
_allowmusic = true;
}
}
Symbol 848 Button
on (release, keyPress "<Space>") {
gotoAndStop (80);
}
Symbol 857 Button
on (release) {
saveDataFunction(_root._saveName, _root._savePass);
nowSaving._visible = true;
}
Symbol 861 Button
on (release) {
gotoAndStop (80);
}
Symbol 882 MovieClip Frame 1
stop();
Symbol 901 MovieClip Frame 1
stop();
Symbol 955 MovieClip Frame 1
stop();
Symbol 1031 Button
on (release) {
play();
}
Symbol 1041 Button
on (release) {
loadDataFunction(_root._loadName, _root._loadPass);
}
Symbol 1049 Button
on (release) {
gotoAndStop (9);
}