Frame 1
function getNationNumber(nation) {
return(NATION_NUMBER[nation.toLowerCase()]);
}
function isExclusive() {
var _local2 = ["http://www.arcadetown.com", "http://www.freewebgames.com", "http://www.gamedelight.com", "http://cdn-www.arcadetown.com", "file://", "http://vitalyzaborov.narod.ru/swf/"];
var _local1 = 0;
while (_local1 < _local2.length) {
if (_url.substr(0, _local2[_local1].length) == _local2[_local1]) {
return(true);
}
_local1++;
}
return(false);
}
function isEvilAddictingGames() {
var _local2 = ["http://www.addictinggames.com", "http://www.armorgames.com", "http://vitalyzaborov.narod.ru/evil_url/", "file://"];
var _local1 = 0;
while (_local1 < _local2.length) {
if (_url.substr(0, _local2[_local1].length) == _local2[_local1]) {
return(true);
}
_local1++;
}
return(false);
}
function getX(xx) {
return(Math.floor(xx / CAGE_W));
}
function getY(yy) {
return(Math.floor((yy - SKY_HEIGHT) / CAGE_H));
}
function stgX(XX) {
return((XX * CAGE_W) + (CAGE_W / 2));
}
function stgY(YY) {
return(((YY * CAGE_H) + (CAGE_H / 2)) + SKY_HEIGHT);
}
function getDepthDown(xx, yy) {
return((DEPTH_DOWN + xx) + (yy * F_WIDTH));
}
function getDepthCorpse(xx, yy) {
return((DEPTH_CORPSE + xx) + (yy * F_WIDTH));
}
function getDepthMan(xx, yy) {
return((DEPTH_MAN + (xx * 3)) + ((yy * F_WIDTH) * 3));
}
function normalX(xx) {
if (xx >= F_WIDTH) {
return(F_WIDTH - 1);
}
if (xx < 0) {
return(0);
}
return(xx);
}
function normalY(yy) {
if (yy >= F_WIDTH) {
return(F_HEIGHT - 1);
}
if (yy < 0) {
return(0);
}
return(yy);
}
function znak(num) {
return(((num < 0) ? -1 : 1));
}
function d(ddd) {
return(Math.floor(Math.random() * ddd) + 1);
}
function dice(ddd) {
return(Math.floor(Math.random() * ddd));
}
function dd(dice) {
return(Math.floor(Math.random() * ((dice * 2) + 1)) - dice);
}
function addUnit(xx, yy, un, tm) {
if (un == null) {
return(undefined);
}
if (un.HORSE != null) {
_root.attachMovie("Horseman", "hero" + _global.HERO, 9999, {_x:xx, _y:yy, team:tm});
_root["hero" + _global.HERO].MOVE_FRAMES = 445;
} else {
_root.attachMovie("Human", "hero" + _global.HERO, 9999, {_x:xx, _y:yy, team:tm});
_root["hero" + _global.HERO].MOVE_FRAMES = 475;
}
_root["hero" + _global.HERO].initUnit(un);
_global.HERO++;
}
function addHero(xx, yy, un, tm) {
if (un == null) {
return(undefined);
}
if (un.HORSE != null) {
_root.attachMovie("Horseman_Player", "hero0", 9999, {_x:xx, _y:yy, team:tm});
_root.hero0.MOVE_FRAMES = 445;
} else {
_root.attachMovie("Human_Player", "hero0", 9999, {_x:xx, _y:yy, team:tm});
_root.hero0.MOVE_FRAMES = 475;
}
_root.hero0.initUnit(un);
}
function addProjectile(fx, fy, tx, ty, dmg_data, xscl_mod, wpn_frame, tm, pr) {
var _local5 = (wpn_frame == 230) || (wpn_frame == 231);
var _local4 = (wpn_frame >= 218) && (wpn_frame <= 238);
var _local2 = getDepthMan(fx, fy);
_root.attachMovie((_local5 ? "Grenade" : "Arrow"), "gr_" + _local2, _local2 + 2, {_x:stgX(fx), _y:stgY(fy), X:fx, Y:fy, dstX:tx, dstY:ty, dmg_data:dmg_data});
if (_local4) {
if (!_local5) {
_root["gr_" + _local2].gren.gotoAndStop(wpn_frame);
}
_root["gr_" + _local2].play();
} else {
_root["gr_" + _local2].gotoAndStop(10);
}
_root["gr_" + _local2].is_throwing = _local4;
if (pr) {
_root["gr_" + _local2].pierce = pr;
}
_root["gr_" + _local2].team = tm;
_root["gr_" + _local2]._xscale = _root["gr_" + _local2]._xscale * xscl_mod;
}
function addArrowShower(fx, fy, dmg_dat) {
var _local2 = getDepthMan(fx, fy);
if (_root["as_" + _local2]) {
_root["as_" + _local2].play_count++;
} else {
_root.attachMovie("ArrowShower", "as_" + _local2, _local2 + 1, {_x:stgX(fx), _y:stgY(fy), X:fx, Y:fy});
}
_root["as_" + _local2].addDamage(dmg_dat);
}
function addArrowWall(fx, fy, dm, cr) {
var _local2 = getDepthMan(fx, fy);
if (_root["as_" + _local2]) {
_root["as_" + _local2].play_count++;
} else {
_root.attachMovie("ArrowWall", "as_" + _local2, _local2 + 1, {_x:stgX(fx), _y:stgY(fy), X:fx, Y:fy});
}
_root["as_" + _local2].addDamage(dm, cr);
}
function addBlow(xx, yy, tp) {
var _local2 = getDepthDown(xx, yy);
_root.attachMovie("Blow " + tp, "dw_" + _local2, _local2, {_x:stgX(xx), _y:stgY(yy)});
}
function openCity(townID) {
_global.CURR_TOWN = townID;
gotoAndStop ("TOWN_SCREEN");
}
function deselectUnits() {
var _local2;
while (_local2 = _global.SELECTED.pop() , _local2) {
_local2.borders._visible = false;
}
}
function getFreeY(xx) {
var _local3 = d(F_HEIGHT) - 1;
var _local2 = 0;
do {
if (_global.field[xx][_local3].empty && (_global.field[xx][_local3].free)) {
break;
}
_local3 = d(F_HEIGHT) - 1;
_local2++;
} while (_local2 <= 150);
return(_local3);
}
function getTeamCount(tm) {
var _local4 = 0;
var _local3 = 0;
while (_local3 < _global.HERO) {
if ((_root["hero" + _local3].HP > 0) && (_root["hero" + _local3].team == tm)) {
_local4++;
}
_local3++;
}
return(_local4);
}
function addItemTo(array, item) {
addItemInfoTo(array, item.getItemInfo());
}
function addItemInfoTo(array, item) {
if (!item) {
return(undefined);
}
var _local1 = 0;
while (_local1 < array.length) {
if ((((((array[_local1].CATEGORY == item.CATEGORY) && (array[_local1].NATION == item.NATION)) && (array[_local1].TYPE == item.TYPE)) && (array[_local1].LEVEL == item.LEVEL)) && (array[_local1].ENCH_ID == item.ENCH_ID)) && (array[_local1].REFINE == item.REFINE)) {
array[_local1].COUNT = array[_local1].COUNT + item.COUNT;
return(undefined);
}
_local1++;
}
array.push(item);
}
function unloadMap() {
var _local6 = _global.HERO - 1;
while (_local6 > 0) {
if (_root["hero" + _local6].HP > 0) {
_root["hero" + _local6].cancelAllStatuses();
if (_root["hero" + _local6].team == 0) {
if (_root["hero" + _local6].unit_ref != undefined) {
_global.FRIENDS.unshift(_root["hero" + _local6].unit_ref);
}
}
}
_root["hero" + _local6].removeMovieClip();
_local6--;
}
_root.hero0.removeMovieClip();
delete _global.AURAS;
var _local4 = 0;
while (_local4 < F_WIDTH) {
var _local3 = 0;
while (_local3 < F_HEIGHT) {
_global.field[_local4][_local3].empty = true;
_global.field[_local4][_local3].free = true;
_global.field[_local4][_local3].who.removeMovieClip();
_global.field[_local4][_local3].who = null;
var _local5 = getDepthMan(_local4, _local3);
_root["blood_" + _local5].removeMovieClip();
_root["gr_" + _local5].removeMovieClip();
_root["as_" + _local5].removeMovieClip();
_local3++;
}
_local4++;
}
_global.HERO = 1;
_global.EVIL_HERO = null;
_root.scr.removeMovieClip();
_root.attachMovie("ArrowCursor", "_cursor", 7001, {_x:_xmouse, _y:_ymouse});
_root._quality = "HIGH";
_root.onEnterFrame = null;
}
function commandAI() {
var _local3 = getTeamCount(0);
if (MAX_UNIT_AMOUNT > _local3) {
if (((FRIENDS.length > 0) && (_global.BATTLE_TYPE != "CHALLENGE")) && (_global.BATTLE_TYPE != "ARMY_CHALLENGE")) {
reinforceUnit(FRIENDS.shift(), 0);
_root.scr.reinitArrowStorm();
}
}
_local3 = getTeamCount(1);
if (MAX_UNIT_AMOUNT > _local3) {
if (((ENEMIES.length > 0) && (_global.BATTLE_TYPE != "CHALLENGE")) && (_global.BATTLE_TYPE != "ARMY_CHALLENGE")) {
reinforceUnit(ENEMIES.shift(), 1);
} else if (_local3 == 0) {
unloadMap();
_root.gotoAndStop("VICTORY");
return(undefined);
}
}
}
function getTeam(team_num) {
var _local4 = new Array();
var _local3 = _global.HERO - 1;
while (_local3 >= 1) {
if (((_root["hero" + _local3].HP > 0) && (_root["hero" + _local3].team == team_num)) && (_root["hero" + _local3].unit_ref != _global.EVIL_HERO)) {
_local4.unshift(_root["hero" + _local3]);
}
_local3--;
}
return(_local4);
}
function getSoldiersAmount() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < _global.FRIENDS.length) {
if (_global.FRIENDS[_local2] != null) {
_local3++;
}
_local2++;
}
return(_local3);
}
function operateStatuses() {
var _local3 = _global.HERO - 1;
while (_local3 >= 0) {
if (_root["hero" + _local3].HP > 0) {
_root["hero" + _local3].regenerateSP();
_root["hero" + _local3].operateStatuses();
}
_local3--;
}
}
function operateAuras() {
var _local5 = getTeam(0);
var _local4 = getTeam(1);
var _local3 = 0;
while (_local3 < _global.AURAS.length) {
if (!_global.AURAS[_local3].operate(_local5, _local4)) {
if (_global.AURAS[_local3].caster == _root.hero0) {
_root.scr.resetCurrAura(_global.AURAS[_local3].back_ref, false);
}
_global.AURAS.splice(_local3, 1);
_local3--;
}
_local3++;
}
}
function reinforceUnit(un, sd) {
mana[sd] = mana[sd] - PRICES[un];
var _local1 = (F_WIDTH - 1) * sd;
var _local3 = getFreeY(_local1);
addUnit(stgX(_local1), stgY(_local3), un, sd);
}
function saveGame(slot) {
var _local3 = SharedObject.getLocal("Feudalism_Save_" + slot);
_local3.data.FRIENDS = new Array();
var _local5 = 0;
while (_local5 < _global.FRIENDS.length) {
if (_global.FRIENDS[_local5]) {
_local3.data.FRIENDS[_local5] = _global.FRIENDS[_local5].getUnitInfo();
}
_local5++;
}
_local3.data.QUEST = new Object();
_local3.data.QUEST.avatar_id = _global.QUEST.avatar_id;
_local3.data.QUEST.enemies_amount = _global.QUEST.enemies_amount;
_local3.data.QUEST.cities = _global.QUEST.cities;
_local3.data.QUEST.rewards = _global.QUEST.rewards;
_local3.data.QUEST.curr_city = _global.QUEST.curr_city;
_local3.data.QUEST.curr_gold = _global.QUEST.curr_gold;
_local3.data.MAIN_HERO = new Object();
_local3.data.MAIN_HERO.EXP = _global.MAIN_HERO.EXP;
_local3.data.MAIN_HERO.LEVEL = _global.MAIN_HERO.LEVEL;
_local3.data.MAIN_HERO.NAME = _global.MAIN_HERO.NAME;
_local3.data.MAIN_HERO.NATION = _global.MAIN_HERO.NATION;
_local3.data.MAIN_HERO.GENDER = _global.MAIN_HERO.GENDER;
_local3.data.MAIN_HERO.STR = _global.MAIN_HERO.STR;
_local3.data.MAIN_HERO.DEX = _global.MAIN_HERO.DEX;
_local3.data.MAIN_HERO.CON = _global.MAIN_HERO.CON;
_local3.data.MAIN_HERO.SPR = _global.MAIN_HERO.SPR;
_local3.data.MAIN_HERO.stat_points = _global.MAIN_HERO.stat_points;
_local3.data.MAIN_HERO.skill_points = _global.MAIN_HERO.skill_points;
_local3.data.MAIN_HERO.SKILL = new Array();
for (_local5 in _global.MAIN_HERO.SKILL) {
_local3.data.MAIN_HERO.SKILL[_local5] = _global.MAIN_HERO.SKILL[_local5];
}
_local3.data.MAIN_HERO.ACTIVE_SKILLS = new Array();
_local3.data.MAIN_HERO.PASSIVE_SKILLS = new Array();
_local3.data.MAIN_HERO.AURA_SKILLS = new Array();
for (_local5 in _global.MAIN_HERO.ACTIVE_SKILLS) {
_local3.data.MAIN_HERO.ACTIVE_SKILLS[_local5] = new Array();
for (var _local4 in _global.MAIN_HERO.ACTIVE_SKILLS[_local5]) {
_local3.data.MAIN_HERO.ACTIVE_SKILLS[_local5][_local4] = _global.MAIN_HERO.ACTIVE_SKILLS[_local5][_local4];
}
}
for (_local5 in _global.MAIN_HERO.PASSIVE_SKILLS) {
_local3.data.MAIN_HERO.PASSIVE_SKILLS[_local5] = new Array();
for (var _local4 in _global.MAIN_HERO.PASSIVE_SKILLS[_local5]) {
_local3.data.MAIN_HERO.PASSIVE_SKILLS[_local5][_local4] = _global.MAIN_HERO.PASSIVE_SKILLS[_local5][_local4];
}
}
for (_local5 in _global.MAIN_HERO.AURA_SKILLS) {
_local3.data.MAIN_HERO.AURA_SKILLS[_local5] = new Array();
for (var _local4 in _global.MAIN_HERO.AURA_SKILLS[_local5]) {
_local3.data.MAIN_HERO.AURA_SKILLS[_local5][_local4] = _global.MAIN_HERO.AURA_SKILLS[_local5][_local4];
}
}
_local3.data.MAIN_HERO.WEAPON_PRI = ((_global.MAIN_HERO.WEAPON_PRI != null) ? (_global.MAIN_HERO.WEAPON_PRI.getItemInfo()) : null);
_local3.data.MAIN_HERO.WEAPON_SEC = ((_global.MAIN_HERO.WEAPON_SEC != null) ? (_global.MAIN_HERO.WEAPON_SEC.getItemInfo()) : null);
_local3.data.MAIN_HERO.ARMOR = ((_global.MAIN_HERO.ARMOR != null) ? (_global.MAIN_HERO.ARMOR.getItemInfo()) : null);
_local3.data.MAIN_HERO.HELMET = ((_global.MAIN_HERO.HELMET != null) ? (_global.MAIN_HERO.HELMET.getItemInfo()) : null);
_local3.data.MAIN_HERO.HORSE = ((_global.MAIN_HERO.HORSE != null) ? (_global.MAIN_HERO.HORSE) : null);
_local3.data.INVENTORY = _global.INVENTORY;
_local3.data.IS_CAPTURED = _global.IS_CAPTURED;
_local3.data.IS_HOSTILE = _global.IS_HOSTILE;
_local3.data.SHIP_LOCATION = _global.SHIP_LOCATION;
_local3.data.CURR_TOWN = _global.CURR_TOWN;
_local3.data.SAILING_SHIP = _global.SAILING_SHIP;
_local3.data.GOLD = _global.GOLD;
_local3.data.POTION_HealSmall = _global.POTION_HealSmall;
_local3.data.POTION_HealMedium = _global.POTION_HealMedium;
_local3.data.POTION_HealBig = _global.POTION_HealBig;
_local3.data.SCROLL_AllHealSmall = _global.SCROLL_AllHealSmall;
_local3.data.SCROLL_AllHealBig = _global.SCROLL_AllHealBig;
_local3.data.SCROLL_Rage = _global.SCROLL_Rage;
_local3.data.GAME_ENDED = _global.GAME_ENDED;
_local3.flush(65536);
_root.town_screen.wnd.gotoAndStop(1);
_root.town_screen.enableAll();
}
function loadGame(slot) {
var _local3 = SharedObject.getLocal("Feudalism_Save_" + slot);
if (!_local3.data.GOLD) {
return(false);
}
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var _local4 = 0;
while (_local4 < _local3.data.FRIENDS.length) {
if (_local3.data.FRIENDS[_local4]) {
_global.FRIENDS[_local4] = new Unit(_local3.data.FRIENDS[_local4].NATION, _local3.data.FRIENDS[_local4].TYPE, _local3.data.FRIENDS[_local4].ID);
}
_local4++;
}
delete _global.QUEST;
_global.QUEST = new Quest();
_global.QUEST.avatar_id = _local3.data.QUEST.avatar_id;
_global.QUEST.enemies_amount = _local3.data.QUEST.enemies_amount;
_global.QUEST.cities = _local3.data.QUEST.cities;
_global.QUEST.rewards = _local3.data.QUEST.rewards;
_global.QUEST.curr_city = _local3.data.QUEST.curr_city;
_global.QUEST.curr_gold = _local3.data.QUEST.curr_gold;
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.EXP = _local3.data.MAIN_HERO.EXP;
_global.MAIN_HERO.LEVEL = _local3.data.MAIN_HERO.LEVEL;
_global.MAIN_HERO.NAME = _local3.data.MAIN_HERO.NAME;
_global.MAIN_HERO.NATION = _local3.data.MAIN_HERO.NATION;
_global.MAIN_HERO.GENDER = _local3.data.MAIN_HERO.GENDER;
_global.MAIN_HERO.STR = _local3.data.MAIN_HERO.STR;
_global.MAIN_HERO.DEX = _local3.data.MAIN_HERO.DEX;
_global.MAIN_HERO.CON = _local3.data.MAIN_HERO.CON;
_global.MAIN_HERO.SPR = _local3.data.MAIN_HERO.SPR;
_global.MAIN_HERO.stat_points = _local3.data.MAIN_HERO.stat_points;
_global.MAIN_HERO.skill_points = _local3.data.MAIN_HERO.skill_points;
delete _global.MAIN_HERO.SKILL;
_global.MAIN_HERO.SKILL = new Array();
for (_local4 in _local3.data.MAIN_HERO.SKILL) {
_global.MAIN_HERO.SKILL[_local4] = _local3.data.MAIN_HERO.SKILL[_local4];
}
delete _global.MAIN_HERO.ACTIVE_SKILLS;
delete _global.MAIN_HERO.PASSIVE_SKILLS;
delete _global.MAIN_HERO.AURA_SKILLS;
_global.MAIN_HERO.ACTIVE_SKILLS = new Array();
_global.MAIN_HERO.PASSIVE_SKILLS = new Array();
_global.MAIN_HERO.AURA_SKILLS = new Array();
for (_local4 in _local3.data.MAIN_HERO.ACTIVE_SKILLS) {
_global.MAIN_HERO.ACTIVE_SKILLS[_local4] = new Array();
for (var _local5 in _local3.data.MAIN_HERO.ACTIVE_SKILLS[_local4]) {
_global.MAIN_HERO.ACTIVE_SKILLS[_local4][_local5] = _local3.data.MAIN_HERO.ACTIVE_SKILLS[_local4][_local5];
}
}
for (_local4 in _local3.data.MAIN_HERO.PASSIVE_SKILLS) {
_global.MAIN_HERO.PASSIVE_SKILLS[_local4] = new Array();
for (var _local5 in _local3.data.MAIN_HERO.PASSIVE_SKILLS[_local4]) {
_global.MAIN_HERO.PASSIVE_SKILLS[_local4][_local5] = _local3.data.MAIN_HERO.PASSIVE_SKILLS[_local4][_local5];
}
}
for (_local4 in _local3.data.MAIN_HERO.AURA_SKILLS) {
_global.MAIN_HERO.AURA_SKILLS[_local4] = new Array();
for (var _local5 in _local3.data.MAIN_HERO.AURA_SKILLS[_local4]) {
_global.MAIN_HERO.AURA_SKILLS[_local4][_local5] = _local3.data.MAIN_HERO.AURA_SKILLS[_local4][_local5];
}
}
_global.MAIN_HERO.WEAPON_PRI = ((_local3.data.MAIN_HERO.WEAPON_PRI != null) ? (new WeaponClass(_local3.data.MAIN_HERO.WEAPON_PRI.TYPE, _local3.data.MAIN_HERO.WEAPON_PRI.NATION, _local3.data.MAIN_HERO.WEAPON_PRI.LEVEL, _local3.data.MAIN_HERO.WEAPON_PRI.ENCH_ID, _local3.data.MAIN_HERO.WEAPON_PRI.REFINE)) : null);
_global.MAIN_HERO.WEAPON_SEC = ((_local3.data.MAIN_HERO.WEAPON_SEC != null) ? (new WeaponClass(_local3.data.MAIN_HERO.WEAPON_SEC.TYPE, _local3.data.MAIN_HERO.WEAPON_SEC.NATION, _local3.data.MAIN_HERO.WEAPON_SEC.LEVEL, _local3.data.MAIN_HERO.WEAPON_SEC.ENCH_ID, _local3.data.MAIN_HERO.WEAPON_SEC.REFINE)) : null);
_global.MAIN_HERO.ARMOR = ((_local3.data.MAIN_HERO.ARMOR != null) ? (new Armor(_local3.data.MAIN_HERO.ARMOR.TYPE, _local3.data.MAIN_HERO.ARMOR.NATION, _local3.data.MAIN_HERO.ARMOR.LEVEL, _local3.data.MAIN_HERO.ARMOR.ENCH_ID, _local3.data.MAIN_HERO.ARMOR.REFINE)) : null);
_global.MAIN_HERO.HELMET = ((_local3.data.MAIN_HERO.HELMET != null) ? (new Armor(_local3.data.MAIN_HERO.HELMET.TYPE, _local3.data.MAIN_HERO.HELMET.NATION, _local3.data.MAIN_HERO.HELMET.LEVEL, _local3.data.MAIN_HERO.HELMET.ENCH_ID, _local3.data.MAIN_HERO.HELMET.REFINE)) : null);
_global.MAIN_HERO.HORSE = ((_local3.data.MAIN_HERO.HORSE != null) ? (new Horse(_local3.data.MAIN_HERO.HORSE.skin_color, _local3.data.MAIN_HERO.HORSE.bonus_HP, _local3.data.MAIN_HERO.HORSE.bonus_DEF, _local3.data.MAIN_HERO.HORSE.bonus_speed, _local3.data.MAIN_HERO.HORSE.price)) : null);
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_local4 = 0;
while (_local4 < _local3.data.INVENTORY.length) {
_global.INVENTORY[_local4] = new ItemInfo(_local3.data.INVENTORY[_local4].CATEGORY, _local3.data.INVENTORY[_local4].TYPE, _local3.data.INVENTORY[_local4].NATION, _local3.data.INVENTORY[_local4].LEVEL, _local3.data.INVENTORY[_local4].ENCH_ID, _local3.data.INVENTORY[_local4].REFINE);
_global.INVENTORY[_local4].COUNT = _local3.data.INVENTORY[_local4].COUNT;
_local4++;
}
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = _local3.data.IS_CAPTURED;
delete _global.IS_HOSTILE;
_global.IS_HOSTILE = _local3.data.IS_HOSTILE;
_global.SHIP_LOCATION = _local3.data.SHIP_LOCATION;
_global.CURR_TOWN = _local3.data.CURR_TOWN;
_global.SAILING_SHIP = _local3.data.SAILING_SHIP;
_global.GOLD = _local3.data.GOLD;
_global.POTION_HealSmall = _local3.data.POTION_HealSmall;
_global.POTION_HealMedium = _local3.data.POTION_HealMedium;
_global.POTION_HealBig = _local3.data.POTION_HealBig;
_global.SCROLL_AllHealSmall = _local3.data.SCROLL_AllHealSmall;
_global.SCROLL_AllHealBig = _local3.data.SCROLL_AllHealBig;
_global.SCROLL_Rage = _local3.data.SCROLL_Rage;
if (_local3.data.GAME_ENDED == undefined) {
_global.GAME_ENDED = false;
} else {
_global.GAME_ENDED = _local3.data.GAME_ENDED;
}
_root.gotoAndStop("TOWN_SCREEN");
_root.town_screen.init();
return(true);
}
_global.F_WIDTH = 20;
_global.F_HEIGHT = 8;
_global.SKY_HEIGHT = 300;
_global.CAGE_W = 40;
_global.CAGE_H = 25;
_global.SCREEN_W = 800;
_global.SCREEN_H = 600;
_global.DEPTH_DOWN = 1000;
_global.DEPTH_CORPSE = 2000;
_global.DEPTH_MAN = 3000;
_global.S_ANGLE = 3;
_global.DISAPEAR_TIME = 2;
_global.SELECTED = new Array();
_global.MAX_UNIT_AMOUNT = 10;
_global.times = 0;
_global.RAGE = new Array(2);
_global.SHIP_PRICE = 10000;
_global.BATTLE_MAP = 45;
NATION_NUMBER = new Array();
NATION_NUMBER.rog = 0;
NATION_NUMBER.viz = 1;
NATION_NUMBER.ger = 2;
NATION_NUMBER.rus = 3;
NATION_NUMBER.jap = 4;
NATION_NUMBER.mon = 5;
NATION_NUMBER.ara = 6;
_global.field = new Array(F_WIDTH);
var i = 0;
while (i < _global.field.length) {
_global.field[i] = new Array(F_HEIGHT);
var j = 0;
while (j < F_HEIGHT) {
_global.field[i][j] = new Cage(i, j);
j++;
}
i++;
}
percent = function (x) {
return(d(100) <= x);
};
loadDefaults = function () {
var _local2 = SharedObject.getLocal("Feudalism");
var _local3 = false;
for (var _local4 in _local2.data) {
_local3 = true;
break;
}
if (_local3) {
_global.SAVED_QUALITY = _local2.data.SAVED_QUALITY;
_global.HIGHLIGHT_TROOPS = _local2.data.HIGHLIGHT_TROOPS;
_global.SHOW_HELP = _local2.data.SHOW_HELP;
_global.CO_UP_1 = _local2.data.CO_UP_1;
_global.CO_UP_2 = _local2.data.CO_UP_2;
_global.CO_DOWN_1 = _local2.data.CO_DOWN_1;
_global.CO_DOWN_2 = _local2.data.CO_DOWN_2;
_global.CO_LEFT_1 = _local2.data.CO_LEFT_1;
_global.CO_LEFT_2 = _local2.data.CO_LEFT_2;
_global.CO_RIGHT_1 = _local2.data.CO_RIGHT_1;
_global.CO_RIGHT_2 = _local2.data.CO_RIGHT_2;
_global.CO_ATTACK_1 = _local2.data.CO_ATTACK_1;
_global.CO_ATTACK_2 = _local2.data.CO_ATTACK_2;
_global.CO_SWITCH = _local2.data.CO_SWITCH;
} else {
_global.SAVED_QUALITY = "MEDIUM";
_global.HIGHLIGHT_TROOPS = true;
_global.SHOW_HELP = true;
_global.CO_UP_1 = 38;
_global.CO_UP_2 = 87;
_global.CO_DOWN_1 = 40;
_global.CO_DOWN_2 = 83;
_global.CO_LEFT_1 = 37;
_global.CO_LEFT_2 = 65;
_global.CO_RIGHT_1 = 39;
_global.CO_RIGHT_2 = 68;
_global.CO_ATTACK_1 = 32;
_global.CO_ATTACK_2 = 45;
_global.CO_SWITCH = 16;
}
};
saveDefaults = function () {
var _local2 = SharedObject.getLocal("Feudalism");
_local2.data.SAVED_QUALITY = _global.SAVED_QUALITY;
_local2.data.HIGHLIGHT_TROOPS = _global.HIGHLIGHT_TROOPS;
_local2.data.SHOW_HELP = _global.SHOW_HELP;
_local2.data.CO_UP_1 = _global.CO_UP_1;
_local2.data.CO_UP_2 = _global.CO_UP_2;
_local2.data.CO_DOWN_1 = _global.CO_DOWN_1;
_local2.data.CO_DOWN_2 = _global.CO_DOWN_2;
_local2.data.CO_LEFT_1 = _global.CO_LEFT_1;
_local2.data.CO_LEFT_2 = _global.CO_LEFT_2;
_local2.data.CO_RIGHT_1 = _global.CO_RIGHT_1;
_local2.data.CO_RIGHT_2 = _global.CO_RIGHT_2;
_local2.data.CO_ATTACK_1 = _global.CO_ATTACK_1;
_local2.data.CO_ATTACK_2 = _global.CO_ATTACK_2;
_local2.data.CO_SWITCH = _global.CO_SWITCH;
_local2.flush();
};
loadMap = function (map) {
_root.WhatToLoad = map;
_global.HERO = 1;
delete _global.LOOT;
_global.LOOT = new Array();
_global.AURAS = new Array();
_global.EXP_GOT = 0;
_global.GOLD_GOT = 0;
_root.attachMovie("BattleCursor", "_cursor", 7001, {_x:_xmouse, _y:_ymouse});
_root.attachMovie("Screen", "scr", 6002, {_x:0, _y:0});
_root.gotoAndStop(map + 4);
var _local4 = 0;
while (_local4 < F_WIDTH) {
var _local3 = 0;
while (_local3 < F_HEIGHT) {
_global.field[_local4][_local3].empty = true;
_global.field[_local4][_local3].free = true;
_global.field[_local4][_local3].who = null;
_local3++;
}
_local4++;
}
_root._quality = _global.SAVED_QUALITY;
_root.onEnterFrame = _root.battleEnterFrame;
};
gameLoad = function (map) {
unloadMap();
_root.WhatToLoad = map;
_root.gotoAndStop("GAME_LOAD");
};
_root.battleEnterFrame = function () {
if (_global.times >= 30) {
_global.times = 0;
commandAI();
operateStatuses();
operateAuras();
} else {
_global.times++;
}
};
_root.tutorialEnterFrame = function () {
if (_global.times >= 30) {
_global.times = 0;
operateStatuses();
operateAuras();
} else {
_global.times++;
}
};
var _mochiads_game_id = "688d29a336371bcc";
fscommand ("trapallkeys", true);
_root.kongregateServices.connect();
MochiAd.showPreGameAd({id:"688d29a336371bcc", res:"800x600"});
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("4462953a", this, 10301, true);
Frame 2
gotoAndStop (3);
Frame 3
stop();
_global.QUEST = new Quest();
_global.LOOT = new Array();
_global.INVENTORY = new Array();
_global.BATTLE_TUTORIAL_PLAYED = false;
_global.STORE_DONT_ASK_AMOUNT = false;
var menu_cm = new ContextMenu();
menu_cm.hideBuiltInItems();
_root.menu = menu_cm;
Frame 4
loadDefaults();
_global.ENEMIES = new Array();
_global.FRIENDS = new Array();
_global.GAME_ENDED = false;
stop();
Frame 5
stop();
Instance of Symbol 2331 MovieClip in Frame 5
on (press) {
_root.scr.screenOnPress();
}
on (release) {
_root.scr.screenOnRelease();
}
Instance of Symbol 43 MovieClip [BlackSquare] "cursor" in Frame 5
onClipEvent (enterFrame) {
this._x = Math.floor(_root._xmouse / 40) * 40;
this._y = Math.floor(_root._ymouse / 25) * 25;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 0;
tm = 1;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 1;
tm = 1;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 2;
tm = 1;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 3;
tm = 1;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 4;
tm = 1;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 0;
tm = 0;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 1;
tm = 0;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 2;
tm = 0;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 3;
tm = 0;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 4;
tm = 0;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 6;
tm = 1;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 7;
tm = 1;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 8;
tm = 1;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 9;
tm = 1;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 10;
tm = 1;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 6;
tm = 0;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 7;
tm = 0;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 8;
tm = 0;
}
Instance of Symbol 2335 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
sq = "Player";
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 9;
tm = 0;
}
Instance of Symbol 2333 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 10;
tm = 0;
}
Instance of Symbol 2335 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
sq = "Enemy";
}
Frame 112
_root.loadMap(WhatToLoad);
Frame 113
stop();
Instance of Symbol 1958 MovieClip in Frame 113
on (release) {
getURL ("http://www.arcadetown.com?gameid=feudalism2", "_blank");
}
Frame 114
_root.loot_txt.text = "";
var i = 0;
while (i < _global.LOOT.length) {
_root.addItemInfoTo(_global.INVENTORY, _global.LOOT[i]);
temp_item = _global.LOOT[i].getItem();
_root.loot_txt.text = _root.loot_txt.text + (((temp_item.NAME + " x") + _global.LOOT[i].COUNT) + newline);
if (temp_item.NAME == "Occult Rune") {
_root.kongregateStats.submit("OccultRuneFound", _global.LOOT[i].COUNT);
}
i++;
}
Instance of Symbol 3112 MovieClip "fields" in Frame 114
onClipEvent (enterFrame) {
if (_global.GOLD_GOT > 0) {
_global.GOLD++;
_global.GOLD_GOT--;
this.gold_txt.text = _global.GOLD + " gp.";
}
if (_global.EXP_GOT > 0) {
if (_global.MAIN_HERO.experience(1)) {
this.level_up.gotoAndPlay(2);
}
this.exp_txt.text = (_global.MAIN_HERO.EXP + "/") + Hero.getExpForLevel(_global.MAIN_HERO.LEVEL + 1);
_global.EXP_GOT--;
}
}
Instance of Symbol 1958 MovieClip in Frame 115
on (release) {
getURL ("http://www.arcadetown.com", "_blank");
}
Frame 116
_global.BATTLE_TUTORIAL_PLAYED = truel;
Instance of Symbol 2331 MovieClip in Frame 116
on (press) {
_root.scr.screenOnPress();
}
on (release) {
_root.scr.screenOnRelease();
}
Instance of Symbol 43 MovieClip [BlackSquare] "cursor" in Frame 116
onClipEvent (enterFrame) {
this._x = Math.floor(_root._xmouse / 40) * 40;
this._y = Math.floor(_root._ymouse / 25) * 25;
}
Symbol 39 MovieClip [BarnUnit] Frame 1
#initclip 118
Object.registerClass("BarnUnit", BarnIcon);
#endinitclip
Symbol 43 MovieClip [BlackSquare] Frame 1
stop();
Symbol 48 MovieClip [FlyCritDamage] Frame 25
this.removeMovieClip();
Symbol 55 MovieClip [BrdrShdw] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "shadowColor");
Symbol 57 MovieClip [BrdrFace] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "buttonColor");
Symbol 60 MovieClip [BrdrBlk] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "borderColor");
Symbol 62 MovieClip [BrdrHilght] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "highlightColor");
Symbol 65 MovieClip [Defaults] Frame 1
#initclip 87
Object.registerClass("Defaults", mx.skins.halo.Defaults);
#endinitclip
Symbol 66 MovieClip [UIObjectExtensions] Frame 1
#initclip 88
Object.registerClass("UIObjectExtensions", mx.core.ext.UIObjectExtensions);
#endinitclip
Symbol 67 MovieClip [UIObject] Frame 1
#initclip 89
Object.registerClass("UIObject", mx.core.UIObject);
#endinitclip
stop();
Symbol 70 Button
on (keyPress "<Tab>") {
this.tabHandler();
}
Symbol 71 MovieClip Frame 1
#initclip 90
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
#endinitclip
Symbol 72 MovieClip [FocusRect] Frame 1
#initclip 91
Object.registerClass("FocusRect", mx.skins.halo.FocusRect);
#endinitclip
Symbol 73 MovieClip [FocusManager] Frame 1
#initclip 92
Object.registerClass("FocusManager", mx.managers.FocusManager);
#endinitclip
stop();
Symbol 74 MovieClip [UIComponentExtensions] Frame 1
#initclip 93
Object.registerClass("UIComponentExtensions", mx.core.ext.UIComponentExtensions);
#endinitclip
Symbol 75 MovieClip [UIComponent] Frame 1
#initclip 94
Object.registerClass("UIComponent", mx.core.UIComponent);
#endinitclip
stop();
Symbol 76 MovieClip [SimpleButton] Frame 1
#initclip 95
Object.registerClass("SimpleButton", mx.controls.SimpleButton);
#endinitclip
stop();
Symbol 79 MovieClip [Border] Frame 1
#initclip 96
Object.registerClass("Border", mx.skins.Border);
#endinitclip
stop();
Symbol 80 MovieClip [RectBorder] Frame 1
#initclip 97
mx.skins.SkinElement.registerElement(mx.skins.RectBorder.symbolName, Object(mx.skins.RectBorder));
Object.registerClass("RectBorder", mx.skins.halo.RectBorder);
#endinitclip
stop();
Symbol 81 MovieClip [TextInput] Frame 1
#initclip 98
Object.registerClass("TextInput", mx.controls.TextInput);
#endinitclip
stop();
Symbol 88 MovieClip [StepThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 100 MovieClip [NumericStepper] Frame 1
#initclip 99
Object.registerClass("NumericStepper", mx.controls.NumericStepper);
#endinitclip
stop();
Instance of Symbol 76 MovieClip [SimpleButton] in Symbol 100 MovieClip [NumericStepper] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 81 MovieClip [TextInput] in Symbol 100 MovieClip [NumericStepper] Frame 2
//component parameters
onClipEvent (initialize) {
editable = true;
password = false;
text = "";
maxChars = null;
restrict = "null";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 125 MovieClip [ComboBase] Frame 1
#initclip 100
mx.controls.listclasses.DataSelector.Initialize(Object(mx.controls.ComboBase).prototype);
Object.registerClass("ComboBase", mx.controls.ComboBase);
#endinitclip
stop();
Instance of Symbol 76 MovieClip [SimpleButton] in Symbol 125 MovieClip [ComboBase] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 81 MovieClip [TextInput] in Symbol 125 MovieClip [ComboBase] Frame 2
//component parameters
onClipEvent (initialize) {
editable = true;
password = false;
text = "";
maxChars = null;
restrict = "null";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 126 MovieClip [DataProvider] Frame 1
#initclip 101
Object.registerClass("DataProvider", mx.controls.listclasses.DataProvider);
#endinitclip
stop();
Symbol 127 MovieClip [DataSelector] Frame 1
#initclip 102
Object.registerClass("DataSelector", mx.controls.listclasses.DataSelector);
#endinitclip
stop();
Symbol 128 MovieClip [SelectableRow] Frame 1
#initclip 103
Object.registerClass("SelectableRow", mx.controls.listclasses.SelectableRow);
#endinitclip
stop();
Symbol 129 MovieClip [ButtonSkin] Frame 1
#initclip 104
Object.registerClass("ButtonSkin", mx.skins.halo.ButtonSkin);
#endinitclip
Symbol 130 MovieClip [Button] Frame 1
#initclip 105
Object.registerClass("Button", mx.controls.Button);
#endinitclip
stop();
Instance of Symbol 76 MovieClip [SimpleButton] in Symbol 130 MovieClip [Button] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 131 MovieClip [CustomBorder] Frame 1
#initclip 106
Object.registerClass("CustomBorder", mx.skins.CustomBorder);
mx.skins.SkinElement.registerElement("CustomBorder", mx.skins.CustomBorder);
#endinitclip
Symbol 141 MovieClip [ScrollThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 143 MovieClip [ScrollThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 154 MovieClip [ThumbThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 156 MovieClip [ThumbThemeColor3] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 163 MovieClip [ThumbThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 184 MovieClip [BtnDownArrow] Frame 1
#initclip 107
Object.registerClass("BtnDownArrow", mx.controls.SimpleButton);
#endinitclip
Symbol 185 MovieClip [BtnUpArrow] Frame 1
#initclip 108
Object.registerClass("BtnUpArrow", mx.controls.SimpleButton);
#endinitclip
Symbol 187 MovieClip [HScrollBar] Frame 1
#initclip 109
Object.registerClass("HScrollBar", mx.controls.HScrollBar);
#endinitclip
stop();
Instance of Symbol 130 MovieClip [Button] in Symbol 187 MovieClip [HScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 76 MovieClip [SimpleButton] in Symbol 187 MovieClip [HScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 188 MovieClip [VScrollBar] Frame 1
#initclip 110
Object.registerClass("VScrollBar", mx.controls.VScrollBar);
#endinitclip
stop();
Instance of Symbol 130 MovieClip [Button] in Symbol 188 MovieClip [VScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 76 MovieClip [SimpleButton] in Symbol 188 MovieClip [VScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 189 MovieClip [View] Frame 1
#initclip 111
Object.registerClass("View", mx.core.View);
#endinitclip
stop();
Symbol 190 MovieClip [ScrollView] Frame 1
#initclip 112
Object.registerClass("ScrollView", mx.core.ScrollView);
#endinitclip
stop();
Instance of Symbol 187 MovieClip [HScrollBar] in Symbol 190 MovieClip [ScrollView] Frame 2
//component parameters
onClipEvent (initialize) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 188 MovieClip [VScrollBar] in Symbol 190 MovieClip [ScrollView] Frame 2
//component parameters
onClipEvent (initialize) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 191 MovieClip [ScrollSelectList] Frame 1
#initclip 113
Object.registerClass("ScrollSelectList", mx.controls.listclasses.ScrollSelectList);
#endinitclip
stop();
Symbol 192 MovieClip [List] Frame 1
#initclip 114
Object.registerClass("List", mx.controls.List);
#endinitclip
stop();
Symbol 198 MovieClip [ComboDownArrowDisabled] Frame 1
#initclip 115
Object.registerClass("ComboDownArrowDisabled", mx.controls.SimpleButton);
#endinitclip
Symbol 200 MovieClip [ComboThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 203 MovieClip [ComboAssets] Frame 1
#initclip 116
mx.controls.ComboBox.prototype.downArrowUpName = "ComboDownArrowUp";
mx.controls.ComboBox.prototype.downArrowDownName = "ComboDownArrowDown";
mx.controls.ComboBox.prototype.downArrowOverName = "ComboDownArrowOver";
mx.controls.ComboBox.prototype.downArrowDisabledName = "ComboDownArrowDisabled";
mx.controls.ComboBox.prototype.wrapDownArrowButton = false;
mx.controls.ComboBox.prototype.dropDownBorderStyle = "solid";
mx.controls.ComboBox.prototype.adjustFocusRect = function () {
var _local2 = this.getStyle("themeColor");
if (_local2 == undefined) {
_local2 = 8453965 /* 0x80FF4D */;
}
var _local3 = this._parent.focus_mc;
_local3.setSize(this.width + 4, this.height + 4, {bl:0, tl:0, tr:5, br:5}, 100, _local2);
_local3.move(this.x - 2, this.y - 2);
};
#endinitclip
Symbol 204 MovieClip [ComboBox] Frame 1
#initclip 117
Object.registerClass("ComboBox", mx.controls.ComboBox);
#endinitclip
stop();
Instance of Symbol 192 MovieClip [List] in Symbol 204 MovieClip [ComboBox] Frame 2
//component parameters
onClipEvent (initialize) {
multipleSelection = false;
rowHeight = 20;
}
Symbol 3129 MovieClip [__Packages.Quest] Frame 0
class Quest extends Object
{
var cities, rewards, deliver_to, curr_city, enemies_amount, curr_gold;
function Quest () {
super();
cities = new Array();
rewards = new Array();
}
function initQuestBattle(city_id) {
removeDeliverNote();
deliver_to = "";
avatar_id = getQuestAvatarID(city_id);
curr_city = city_id;
enemies_amount = _root.d(_global.MAIN_HERO.LEVEL + 5);
curr_gold = (_root.d(enemies_amount) * 1000) * Math.ceil(_global.MAIN_HERO.LEVEL / 10);
if (enemies_amount > 20) {
enemies_amount = 20;
}
}
function initQuestFedEx(city_id, nation_id) {
removeDeliverNote();
while (((deliver_to = getCityID(nation_id))) == city_id) {
}
avatar_id = -1;
curr_city = city_id;
enemies_amount = 0;
curr_gold = 500 + (100 * _root.d(10));
}
function anyOf(arr) {
return(arr[_root.dice(arr.length)]);
}
function aproveDeliver() {
cities.push(deliver_to);
rewards.push(curr_gold);
}
function removeDeliverNote() {
var _local2 = 0;
while (_local2 < cities.length) {
if (cities[_local2] == deliver_to) {
rewards.splice(_local2, 1);
cities.splice(_local2, 1);
break;
}
_local2++;
}
}
function getCityID(nation_id) {
switch (nation_id) {
case "Viz" :
return(anyOf(["Caesarea", "Veii", "Palmyra", "Tyrus", "Artaxata", "Seleucia", "Treveri", "Curia"]));
case "Ger" :
return(anyOf(["Grobben", "Torburg", "Dortmund", "Odense", "Holmgard", "Skara", "Lunde", "Risby"]));
case "Rus" :
return(anyOf(["RaGorod", "Zlatograd", "Dobrov", "Grouzeno", "Krasnodolye", "Svetlolesye", "Staroe", "Elki"]));
case "Jap" :
return(anyOf(["Nagoya", "Izumo", "Matsuyama", "Omi", "Echigo", "Sapporo", "Suo", "Nara"]));
case "Mon" :
return(anyOf(["Cardiff", "Armagh", "Kells", "Iona", "Tara", "Swansea", "Llanelli", "Neath"]));
case "Ara" :
return(anyOf(["Tiflis", "Medina", "Mosul", "Samarra", "Mahdia", "Shiraz", "Rabat", "Aden"]));
}
}
function getQuestAvatarID(city_id) {
switch (city_id) {
case "Caesarea" :
case "Palmyra" :
case "Curia" :
case "Treveri" :
return(anyOf([0, 1, 2]));
case "Veii" :
return(3);
case "Tyrus" :
case "Artaxata" :
case "Seleucia" :
return(anyOf([4, 5, 6]));
case "Grobben" :
case "Odense" :
return(anyOf([9, 12, 13]));
case "Torburg" :
case "Dortmund" :
case "Holmgard" :
case "Skara" :
case "Lunde" :
case "Risby" :
return(anyOf([7, 8, 9, 10, 11]));
case "RaGorod" :
case "Zlatograd" :
case "Dobrov" :
case "Grouzeno" :
case "Krasnodolye" :
case "Elki" :
return(anyOf([14, 15, 16, 17, 18]));
case "Svetlolesye" :
case "Staroe" :
return(19);
case "Nagoya" :
case "Izumo" :
case "Omi" :
return(20);
case "Matsuyama" :
case "Suo" :
case "Nara" :
return(21);
case "Echigo" :
return(22);
case "Sapporo" :
return(23);
case "Kells" :
case "Neath" :
case "Swansea" :
return(anyOf([24, 25]));
case "Cardiff" :
case "Iona" :
case "Tara" :
return(anyOf([26, 27]));
case "Armagh" :
return(23);
case "Llanelli" :
return(28);
case "Tiflis" :
case "Rabat" :
case "Aden" :
case "Mahdia" :
return(anyOf([29, 30, 31, 32]));
case "Medina" :
case "Samarra" :
return(33);
case "Mosul" :
case "Shiraz" :
return(22);
}
}
function prepareBattle() {
delete _global.ENEMIES;
_global.ENEMIES = new Array();
var _local3 = 0;
while (_local3 < enemies_amount) {
_global.ENEMIES.push(this[("get" + (((Math.floor(_local3 / 5) % 2) == 0) ? "Melee" : "Ranged")) + "Unit"]());
_local3++;
}
cities.push(curr_city);
rewards.push(curr_gold);
avatar_id = -1;
}
function getMeleeUnit() {
var _local3 = new Unit("Rog", null, 0);
_local3.NAME = "Quest Melee Rogue";
_local3.LEVEL = 1 + Math.round(_global.MAIN_HERO.LEVEL / 5);
var _local4 = Math.max(Math.max(_global.MAIN_HERO.STR, _global.MAIN_HERO.DEX), Math.max(_global.MAIN_HERO.CON, _global.MAIN_HERO.SPR));
_local3.SPR = 5;
switch (_local3.NATION) {
case "Viz" :
_local3.STR = _root.d(_local4);
_local3.DEX = _root.d(_local4 / 3);
_local3.CON = _root.d(_local4 / 2);
_local3.WEAPON_PRI = new WeaponClass("TwohandedSword", "Viz", Math.ceil(_global.MAIN_HERO.LEVEL / 10));
_local3.WEAPON_SEC = null;
break;
case "Ger" :
_local3.STR = _root.d(_local4 / 1.5);
_local3.DEX = _root.d(_local4 / 6);
_local3.CON = _root.d(_local4);
_local3.WEAPON_PRI = new WeaponClass("OnehandedMace", "Ger", Math.ceil(_global.MAIN_HERO.LEVEL / 13));
_local3.WEAPON_SEC = new WeaponClass("Shield", "Ger", Math.ceil(_global.MAIN_HERO.LEVEL / 25));
break;
case "Rus" :
_local3.STR = _root.d(_local4);
_local3.DEX = _root.d(_local4 / 2);
_local3.CON = _root.d(_local4 / 4);
_local3.WEAPON_PRI = new WeaponClass("OnehandedAxe", "Rus", Math.ceil(_global.MAIN_HERO.LEVEL / 13));
_local3.WEAPON_SEC = new WeaponClass("OnehandedAxe", "Rus", Math.ceil(_global.MAIN_HERO.LEVEL / 13));
_local3.SKILL.Dual = 75 + Math.round(_global.MAIN_HERO.LEVEL / 2);
break;
case "Jap" :
_local3.STR = _root.d(_local4);
_local3.DEX = _root.d(_local4);
_local3.CON = _root.d(_local4 / 6);
_local3.WEAPON_PRI = new WeaponClass(((_root.d(2) == 1) ? "Katana" : "Staff"), "Jap", Math.ceil(_global.MAIN_HERO.LEVEL / 10));
_local3.WEAPON_SEC = null;
break;
case "Mon" :
_local3.STR = _root.d(_local4 / 2);
_local3.DEX = _root.d(_local4);
_local3.CON = _root.d(_local4 / 3);
_local3.WEAPON_PRI = new WeaponClass("Dagger", "Mon", Math.ceil(_global.MAIN_HERO.LEVEL / 10));
_local3.WEAPON_SEC = null;
break;
case "Ara" :
_local3.STR = _root.d(_local4 / 1.5);
_local3.DEX = _root.d(_local4 / 1.5);
_local3.CON = _root.d(_local4 / 3);
_local3.WEAPON_PRI = new WeaponClass("OnehandedSword", "Ara", Math.ceil(_global.MAIN_HERO.LEVEL / 13));
_local3.WEAPON_SEC = new WeaponClass("OnehandedSword", "Ara", Math.ceil(_global.MAIN_HERO.LEVEL / 13));
_local3.SKILL.Dual = 75 + Math.round(_global.MAIN_HERO.LEVEL / 2);
}
if ((_global.MAIN_HERO.ARMOR == null) || (_global.MAIN_HERO.ARMOR.LEVEL == 1)) {
_local3.ARMOR = null;
} else {
_local3.ARMOR = new Armor("Clothes", _local3.NATION, _global.MAIN_HERO.ARMOR.LEVEL - 1);
}
if ((_global.MAIN_HERO.HELMET == null) || (_global.MAIN_HERO.HELMET.LEVEL == 1)) {
_local3.HELMET = null;
} else {
_local3.HELMET = new Armor("Helmet", _local3.NATION, _global.MAIN_HERO.HELMET.LEVEL - 1);
}
if (_local3.DEX > 100) {
_local3.DEX = 100;
}
_local3.HORSE = null;
_local3.primary_skill = _local3.WEAPON_PRI.skill;
_local3.secondary_skill = _local3.WEAPON_SEC.skill;
_local3.SKILL[_local3.primary_skill] = 50 + _global.MAIN_HERO.LEVEL;
_local3.SKILL[_local3.secondary_skill] = 50 + _global.MAIN_HERO.LEVEL;
_local3.price = _global.MAIN_HERO.LEVEL * 20;
return(_local3);
}
function getRangedUnit() {
var _local3 = new Unit("Rog", null, 0);
_local3.NAME = "Quest Ranged Rogue";
_local3.LEVEL = 1 + Math.round(_global.MAIN_HERO.LEVEL / 5);
var _local4 = Math.max(Math.max(_global.MAIN_HERO.STR, _global.MAIN_HERO.DEX), Math.max(_global.MAIN_HERO.CON, _global.MAIN_HERO.SPR));
_local3.SPR = 5;
switch (_local3.NATION) {
case "Viz" :
_local3.STR = _root.d(_local4 / 3);
_local3.DEX = _root.d(_local4);
_local3.CON = _root.d(_local4 / 4);
_local3.WEAPON_PRI = new WeaponClass("Crossbow", "Viz", Math.ceil(_global.MAIN_HERO.LEVEL / 17));
_local3.WEAPON_SEC = new WeaponClass("TwohandedSword", "Viz", Math.ceil(_global.MAIN_HERO.LEVEL / 13));
break;
case "Ger" :
_local3.STR = _root.d(_local4 / 5);
_local3.DEX = _root.d(_local4);
_local3.CON = _root.d(_local4 / 2);
_local3.WEAPON_PRI = new WeaponClass("Crossbow", "Ger", Math.ceil(_global.MAIN_HERO.LEVEL / 17));
_local3.WEAPON_SEC = new WeaponClass("TwohandedMace", "Ger", Math.ceil(_global.MAIN_HERO.LEVEL / 17));
break;
case "Rus" :
_local3.STR = _root.d(_local4 / 2);
_local3.DEX = _root.d(_local4);
_local3.CON = _root.d(_local4 / 5);
_local3.WEAPON_PRI = new WeaponClass("Bow", "Rus", Math.ceil(_global.MAIN_HERO.LEVEL / 20));
_local3.WEAPON_SEC = new WeaponClass("TwohandedAxe", "Rus", Math.ceil(_global.MAIN_HERO.LEVEL / 17));
break;
case "Jap" :
_local3.STR = _root.d(_local4);
_local3.DEX = _root.d(_local4);
_local3.CON = _root.d(_local4 / 6);
_local3.WEAPON_PRI = new WeaponClass("Throwing", "Jap", Math.ceil(_global.MAIN_HERO.LEVEL / 13));
_local3.WEAPON_SEC = new WeaponClass(((_root.d(2) == 1) ? "Katana" : "Staff"), "Jap", Math.ceil(_global.MAIN_HERO.LEVEL / 13));
break;
case "Mon" :
_local3.STR = _root.d(_local4 / 2);
_local3.DEX = _root.d(_local4);
_local3.CON = _root.d(_local4 / 5);
_local3.WEAPON_PRI = new WeaponClass("Bow", "Mon", Math.ceil(_global.MAIN_HERO.LEVEL / 17));
_local3.WEAPON_SEC = new WeaponClass("TwohandedSword", "Mon", Math.ceil(_global.MAIN_HERO.LEVEL / 17));
break;
case "Ara" :
_local3.STR = _root.d(_local4 / 2);
_local3.DEX = _root.d(_local4);
_local3.CON = _root.d(_local4 / 5);
_local3.WEAPON_PRI = new WeaponClass("Crossbow", "Ara", Math.ceil(_global.MAIN_HERO.LEVEL / 17));
_local3.WEAPON_SEC = new WeaponClass("TwohandedSword", "Ara", Math.ceil(_global.MAIN_HERO.LEVEL / 17));
}
if ((_global.MAIN_HERO.ARMOR == null) || (_global.MAIN_HERO.ARMOR.LEVEL <= 2)) {
_local3.ARMOR = null;
} else {
_local3.ARMOR = new Armor("Clothes", _local3.NATION, _global.MAIN_HERO.ARMOR.LEVEL - 2);
}
if ((_global.MAIN_HERO.HELMET == null) || (_global.MAIN_HERO.HELMET.LEVEL <= 2)) {
_local3.HELMET = null;
} else {
_local3.HELMET = new Armor("Helmet", _local3.NATION, _global.MAIN_HERO.HELMET.LEVEL - 2);
}
if (_local3.DEX > 100) {
_local3.DEX = 100;
}
_local3.HORSE = null;
_local3.primary_skill = _local3.WEAPON_PRI.skill;
_local3.secondary_skill = _local3.WEAPON_SEC.skill;
_local3.SKILL[_local3.primary_skill] = 75 + Math.round(_global.MAIN_HERO.LEVEL / 2);
_local3.SKILL[_local3.secondary_skill] = 25 + _global.MAIN_HERO.LEVEL;
_local3.price = _global.MAIN_HERO.LEVEL * 15;
return(_local3);
}
var avatar_id = -1;
}
Symbol 3130 MovieClip [__Packages.Hero] Frame 0
class Hero extends Object
{
var LEVEL, EXP, stat_points, skill_points, ACTIVE_SKILLS, PASSIVE_SKILLS, AURA_SKILLS, SKILL, HORSE, WEAPON_PRI, WEAPON_SEC, NAME, NATION, GENDER, STR, CON, DEX, SPR, ARMOR, HELMET;
function Hero () {
super();
LEVEL = 0;
EXP = 0;
stat_points = 10;
skill_points = 1;
ACTIVE_SKILLS = new Array();
PASSIVE_SKILLS = new Array();
AURA_SKILLS = new Array();
SKILL = new Array();
SKILL.Sword = 0;
SKILL.Axe = 0;
SKILL.Mace = 0;
SKILL.FarEast = 0;
SKILL.Spear = 0;
SKILL.Dagger = 0;
SKILL.Staff = 0;
SKILL.Dual = 0;
SKILL.Katar = 0;
SKILL.Fist = 0;
SKILL.Bow = 0;
SKILL.Crossbow = 0;
SKILL.Throwing = 0;
}
static function getExpForLevel(lv) {
switch (lv) {
case 0 :
return(-1);
case 1 :
return(0);
case 2 :
return(50);
case 3 :
return(107);
case 4 :
return(173);
case 5 :
return(247);
case 6 :
return(333);
case 7 :
return(431);
case 8 :
return(543);
case 9 :
return(671);
case 10 :
return(817);
case 11 :
return(984);
case 12 :
return(1176);
case 13 :
return(1395);
case 14 :
return(1645);
case 15 :
return(1932);
case 16 :
return(2259);
case 17 :
return(2634);
case 18 :
return(3062);
case 19 :
return(3552);
case 20 :
return(4112);
case 21 :
return(4753);
case 22 :
return(5486);
case 23 :
return(6325);
case 24 :
return(7283);
case 25 :
return(8380);
case 26 :
return(9634);
case 27 :
return(11068);
case 28 :
return(12708);
case 29 :
return(14584);
case 30 :
return(16730);
case 31 :
return(19184);
case 32 :
return(21990);
case 33 :
return(25199);
case 34 :
return(28870);
case 35 :
return(33068);
case 36 :
return(37870);
case 37 :
return(43361);
case 38 :
return(49641);
case 39 :
return(56824);
case 40 :
return(65038);
case 41 :
return(74433);
case 42 :
return(85178);
case 43 :
return(97467);
case 44 :
return(11152);
case 45 :
return(127595);
case 46 :
return(145978);
case 47 :
return(167002);
case 48 :
return(191048);
case 49 :
return(218548);
case 50 :
return(250000);
}
return(0);
}
static function getNationDodgeMod(nation) {
switch (nation) {
case "Rog" :
return(1.2);
case "Viz" :
return(1.4);
case "Ger" :
return(1.3);
case "Rus" :
return(1.6);
case "Jap" :
return(1.7);
case "Mon" :
return(1.5);
case "Ara" :
return(1.6);
}
}
function experience(xp) {
EXP = EXP + xp;
var _local2 = false;
while ((LEVEL < 50) && (EXP >= getExpForLevel(LEVEL + 1))) {
LEVEL++;
stat_points = stat_points + 10;
skill_points = skill_points + 1;
_local2 = true;
}
return(_local2);
}
function equipItemInfo(slot, item_info) {
var _local2 = item_info.getItem();
if (((slot == "ARMOR") && (item_info.TYPE != "Clothes")) || ((slot == "HELMET") && (item_info.TYPE != "Helmet"))) {
return("Cant't eqiup armor into this slot!");
}
if (((slot == "WEAPON_PRI") || (slot == "WEAPON_SEC")) && ((item_info.TYPE == "Clothes") || (item_info.TYPE == "Helmet"))) {
return("Cant't eqiup weapon or shield into this slot!");
}
if ((_local2.require_param != null) && (this[_local2.require_param] < _local2.require_value)) {
return(("You have not enough " + _local2.require_param) + " to equip this item.");
}
if (item_info.CATEGORY == "WeaponClass") {
var _local4 = ((slot == "WEAPON_PRI") ? "WEAPON_SEC" : "WEAPON_PRI");
if (HORSE != null) {
switch (_local2.TYPE) {
case "Dagger" :
case "Katar" :
case "Staff" :
return("This weapon isn't designed for fighting from a horse!");
}
if ((((slot == "WEAPON_SEC") && (_local2.TYPE != "Shield")) && (!_local2.isTwohanded())) && (WEAPON_PRI.rng == 0)) {
return("Can't use dual weapon from a horse!");
}
}
if ((_local2.TYPE == "Shield") && (slot == "WEAPON_PRI")) {
return("Can't equip shield into right hand!");
}
if ((_local2.TYPE == "Shield") && (this[_local4] == null)) {
return("It's impossible to wear a shield and fight with bare hands!");
}
if ((_local2.TYPE == "Shield") && (this[_local4].isTwohanded())) {
return("It's impossible to use shield with a twohanded weapon!");
}
if ((this[_local4].TYPE == "Shield") && (_local2.isTwohanded())) {
return("It's impossible to use a twohanded weapon with shield!");
}
if (this[_local4] != null) {
if ((_local2.rng > 0) && (this[_local4].rng > 0)) {
return("Can't equip both ranged weapons");
}
if (((_local2.rng == 0) && (this[_local4].rng == 0)) && (_local2.isTwohanded() || (this[_local4].isTwohanded()))) {
return("Can't equip two melee weapons, if one of them is twohanded");
}
}
if (((WEAPON_PRI == null) && (slot == "WEAPON_SEC")) && (_local2.rng == 0)) {
slot = "WEAPON_PRI";
}
}
this[slot] = _local2;
return("OK");
}
function equipHorse(horse) {
switch (WEAPON_PRI.TYPE) {
case "Katana" :
case "NinjaTo" :
case "Dagger" :
case "Katar" :
case "Staff" :
return("My weapon isn't designed for fighting from a horse!");
}
switch (WEAPON_SEC.TYPE) {
case "Katana" :
case "NinjaTo" :
case "Dagger" :
case "Katar" :
case "Staff" :
return("My weapon isn't designed for fighting from a horse!");
}
if ((WEAPON_SEC.TYPE != "Shield") && (!(WEAPON_SEC.isTwohanded() || (WEAPON_PRI.isTwohanded())))) {
return("I can't fight with dual weapons from a horse!");
}
HORSE = horse;
return("OK");
}
function heroVizMale() {
LEVEL = 1;
NAME = "Edgar";
NATION = "Viz";
GENDER = "m";
STR = 30;
CON = 15;
DEX = 20;
SPR = 10;
SKILL = new Array();
SKILL.Sword = 55;
SKILL.Axe = 20;
SKILL.Mace = 20;
SKILL.FarEast = 0;
SKILL.Spear = 25;
SKILL.Dagger = 45;
SKILL.Staff = 0;
SKILL.Dual = 15;
SKILL.Katar = 0;
SKILL.Fist = 50;
SKILL.Bow = 20;
SKILL.Crossbow = 30;
SKILL.Throwing = 40;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Viz", 1);
WEAPON_SEC = new WeaponClass("Bow", "Viz", 1);
ARMOR = null;
HELMET = null;
HORSE = null;
ACTIVE_SKILLS["2H_sword"] = [0, 0, 0];
ACTIVE_SKILLS.spear = [0, 0, 0];
ACTIVE_SKILLS.crossbow = [0, 0, 0];
PASSIVE_SKILLS.push(["Infantry_1", 0]);
PASSIVE_SKILLS.push(["Infantry_2", 0]);
PASSIVE_SKILLS.push(["Swordsmen_2", 0]);
PASSIVE_SKILLS.push(["Bowmen_1", 0]);
PASSIVE_SKILLS.push(["Horsemen_1", 0]);
PASSIVE_SKILLS.push(["Horsemen_3", 0]);
AURA_SKILLS.push(["Barrier", 0]);
AURA_SKILLS.push(["NationViz", 0]);
AURA_SKILLS.push(["ForceBalance", 0]);
}
function heroVizFemale() {
LEVEL = 1;
NAME = "Selena";
NATION = "Viz";
GENDER = "f";
STR = 15;
CON = 10;
DEX = 35;
SPR = 10;
SKILL = new Array();
SKILL.Sword = 35;
SKILL.Axe = 10;
SKILL.Mace = 10;
SKILL.FarEast = 0;
SKILL.Spear = 30;
SKILL.Dagger = 50;
SKILL.Staff = 0;
SKILL.Dual = 15;
SKILL.Katar = 0;
SKILL.Fist = 50;
SKILL.Bow = 50;
SKILL.Crossbow = 60;
SKILL.Throwing = 15;
WEAPON_PRI = new WeaponClass("Crossbow", "Viz", 1);
WEAPON_SEC = new WeaponClass("Dagger", "Viz", 1);
ARMOR = null;
HELMET = null;
HORSE = null;
ACTIVE_SKILLS.crossbow = [0, 0, 0];
ACTIVE_SKILLS.dagger = [0, 0, 0];
ACTIVE_SKILLS["2H_sword"] = [0, 0, 0];
PASSIVE_SKILLS.push(["Infantry_3", 0]);
PASSIVE_SKILLS.push(["Bowmen_2", 0]);
PASSIVE_SKILLS.push(["Bowmen_3", 0]);
PASSIVE_SKILLS.push(["Swordsmen_2", 0]);
PASSIVE_SKILLS.push(["Swordsmen_3", 0]);
PASSIVE_SKILLS.push(["AssassinTraining", 0]);
AURA_SKILLS.push(["DivineHelp", 0]);
AURA_SKILLS.push(["Healing", 0]);
AURA_SKILLS.push(["UnholyBreath", 0]);
}
function heroGerMale() {
LEVEL = 1;
NAME = "Karl";
NATION = "Ger";
GENDER = "m";
STR = 20;
CON = 35;
DEX = 5;
SPR = 10;
SKILL = new Array();
SKILL.Sword = 30;
SKILL.Axe = 20;
SKILL.Mace = 60;
SKILL.FarEast = 0;
SKILL.Spear = 25;
SKILL.Dagger = 5;
SKILL.Staff = 0;
SKILL.Dual = 5;
SKILL.Katar = 0;
SKILL.Fist = 50;
SKILL.Bow = 15;
SKILL.Crossbow = 15;
SKILL.Throwing = 45;
WEAPON_PRI = new WeaponClass("OnehandedMace", "Ger", 1);
WEAPON_SEC = new WeaponClass("Shield", "Ger", 1);
ARMOR = new Armor("Clothes", "Ger", 1);
HELMET = null;
HORSE = null;
ACTIVE_SKILLS.shield = [0, 0, 0];
ACTIVE_SKILLS["2H_axe"] = [0, 0, 0];
ACTIVE_SKILLS.throwing = [0, 0, 0];
PASSIVE_SKILLS.push(["Infantry_1", 0]);
PASSIVE_SKILLS.push(["Infantry_2", 0]);
PASSIVE_SKILLS.push(["Infantry_3", 0]);
PASSIVE_SKILLS.push(["Swordsmen_2", 0]);
PASSIVE_SKILLS.push(["Swordsmen_1", 0]);
PASSIVE_SKILLS.push(["Horsemen_2", 0]);
AURA_SKILLS.push(["Devotion", 0]);
AURA_SKILLS.push(["Sacrifice", 0]);
AURA_SKILLS.push(["HolyTribunal", 0]);
}
function heroGerFemale() {
LEVEL = 1;
NAME = "Elizabth";
NATION = "Ger";
GENDER = "f";
STR = 20;
CON = 25;
DEX = 25;
SPR = 10;
SKILL = new Array();
SKILL.Sword = 10;
SKILL.Axe = 5;
SKILL.Mace = 50;
SKILL.FarEast = 0;
SKILL.Spear = 50;
SKILL.Dagger = 5;
SKILL.Staff = 0;
SKILL.Dual = 5;
SKILL.Katar = 0;
SKILL.Fist = 50;
SKILL.Bow = 35;
SKILL.Crossbow = 45;
SKILL.Throwing = 60;
WEAPON_PRI = new WeaponClass("Spear", "Ger", 1);
WEAPON_SEC = new WeaponClass("Throwing", "Ger", 1);
ARMOR = null;
HELMET = null;
HORSE = null;
ACTIVE_SKILLS.spear = [0, 0, 0];
ACTIVE_SKILLS.crossbow = [0, 0, 0];
ACTIVE_SKILLS.shield = [0, 0, 0];
PASSIVE_SKILLS.push(["Infantry_3", 0]);
PASSIVE_SKILLS.push(["Infantry_1", 0]);
PASSIVE_SKILLS.push(["Swordsmen_1", 0]);
PASSIVE_SKILLS.push(["Bowmen_3", 0]);
PASSIVE_SKILLS.push(["Horsemen_1", 0]);
PASSIVE_SKILLS.push(["Horsemen_2", 0]);
AURA_SKILLS.push(["DivineHelp", 0]);
AURA_SKILLS.push(["NationGer", 0]);
AURA_SKILLS.push(["BansheeCry", 0]);
}
function heroRusMale() {
LEVEL = 1;
NAME = "Vseslav";
NATION = "Rus";
GENDER = "m";
STR = 40;
CON = 15;
DEX = 10;
SPR = 5;
SKILL = new Array();
SKILL.Sword = 5;
SKILL.Axe = 60;
SKILL.Mace = 35;
SKILL.FarEast = 0;
SKILL.Spear = 15;
SKILL.Dagger = 5;
SKILL.Staff = 0;
SKILL.Dual = 20;
SKILL.Katar = 0;
SKILL.Fist = 50;
SKILL.Bow = 15;
SKILL.Crossbow = 5;
SKILL.Throwing = 45;
WEAPON_PRI = new WeaponClass("TwohandedAxe", "Rus", 1);
WEAPON_SEC = new WeaponClass("Throwing", "Rus", 1);
ARMOR = new Armor("Clothes", "Rus", 1);
HELMET = new Armor("Helmet", "Rus", 1);
HORSE = null;
ACTIVE_SKILLS["2H_axe"] = [0, 0, 0];
ACTIVE_SKILLS.shield = [0, 0, 0];
ACTIVE_SKILLS.throwing = [0, 0, 0];
PASSIVE_SKILLS.push(["Infantry_3", 0]);
PASSIVE_SKILLS.push(["Infantry_2", 0]);
PASSIVE_SKILLS.push(["BerserkerTraining", 0]);
PASSIVE_SKILLS.push(["Swordsmen_3", 0]);
PASSIVE_SKILLS.push(["Swordsmen_2", 0]);
PASSIVE_SKILLS.push(["Horsemen_3", 0]);
AURA_SKILLS.push(["Barrier", 0]);
AURA_SKILLS.push(["NationRus", 0]);
AURA_SKILLS.push(["Sacrifice", 0]);
}
function heroRusFemale() {
LEVEL = 1;
NAME = "Olga";
NATION = "Rus";
GENDER = "f";
STR = 20;
CON = 10;
DEX = 30;
SPR = 15;
SKILL = new Array();
SKILL.Sword = 50;
SKILL.Axe = 25;
SKILL.Mace = 5;
SKILL.FarEast = 0;
SKILL.Spear = 15;
SKILL.Dagger = 20;
SKILL.Staff = 0;
SKILL.Dual = 5;
SKILL.Katar = 0;
SKILL.Fist = 50;
SKILL.Bow = 65;
SKILL.Crossbow = 40;
SKILL.Throwing = 15;
WEAPON_PRI = new WeaponClass("Bow", "Rus", 1);
WEAPON_SEC = new WeaponClass("TwohandedSword", "Rus", 1);
ARMOR = null;
HELMET = null;
HORSE = null;
ACTIVE_SKILLS.bow = [0, 0, 0];
ACTIVE_SKILLS["2H_sword"] = [0, 0, 0];
ACTIVE_SKILLS.spear = [0, 0, 0];
PASSIVE_SKILLS.push(["Bowmen_1", 0]);
PASSIVE_SKILLS.push(["Bowmen_2", 0]);
PASSIVE_SKILLS.push(["Bowmen_3", 0]);
PASSIVE_SKILLS.push(["Infantry_1", 0]);
PASSIVE_SKILLS.push(["Infantry_2", 0]);
PASSIVE_SKILLS.push(["Swordsmen_2", 0]);
AURA_SKILLS.push(["DivineHelp", 0]);
AURA_SKILLS.push(["VenomCloud", 0]);
AURA_SKILLS.push(["SoulDrain", 0]);
}
function heroJapMale() {
LEVEL = 1;
NAME = "Sieg";
NATION = "Jap";
GENDER = "m";
STR = 30;
CON = 5;
DEX = 30;
SPR = 10;
SKILL = new Array();
SKILL.Sword = 0;
SKILL.Axe = 0;
SKILL.Mace = 0;
SKILL.FarEast = 70;
SKILL.Spear = 0;
SKILL.Dagger = 0;
SKILL.Staff = 45;
SKILL.Dual = 45;
SKILL.Katar = 0;
SKILL.Fist = 100;
SKILL.Bow = 15;
SKILL.Crossbow = 0;
SKILL.Throwing = 0;
WEAPON_PRI = new WeaponClass("NinjaTo", "Jap", 1);
WEAPON_SEC = new WeaponClass("Bow", "Jap", 1);
ARMOR = null;
HELMET = null;
HORSE = null;
ACTIVE_SKILLS.dual = [0, 0, 0];
ACTIVE_SKILLS.katana = [0, 0, 0];
ACTIVE_SKILLS.bow = [0, 0, 0];
PASSIVE_SKILLS.push(["Infantry_2", 0]);
PASSIVE_SKILLS.push(["Infantry_3", 0]);
PASSIVE_SKILLS.push(["FarEastWarTraining", 0]);
PASSIVE_SKILLS.push(["Bowmen_1", 0]);
PASSIVE_SKILLS.push(["Bowmen_2", 0]);
PASSIVE_SKILLS.push(["Meditate", 0]);
AURA_SKILLS.push(["VenomCloud", 0]);
AURA_SKILLS.push(["NationJap", 0]);
AURA_SKILLS.push(["LifeLeech", 0]);
}
function heroJapFemale() {
LEVEL = 1;
NAME = "Niora";
NATION = "Jap";
GENDER = "f";
STR = 20;
CON = 5;
DEX = 40;
SPR = 15;
SKILL = new Array();
SKILL.Sword = 0;
SKILL.Axe = 0;
SKILL.Mace = 0;
SKILL.FarEast = 55;
SKILL.Spear = 0;
SKILL.Dagger = 0;
SKILL.Staff = 70;
SKILL.Dual = 5;
SKILL.Katar = 0;
SKILL.Fist = 100;
SKILL.Bow = 55;
SKILL.Crossbow = 0;
SKILL.Throwing = 0;
WEAPON_PRI = new WeaponClass("Staff", "Jap", 1);
WEAPON_SEC = new WeaponClass("Throwing", "Jap", 1);
ARMOR = null;
HELMET = null;
HORSE = null;
ACTIVE_SKILLS.staff = [0, 0, 0];
ACTIVE_SKILLS.throwing = [0, 0, 0];
ACTIVE_SKILLS.katana = [0, 0, 0];
PASSIVE_SKILLS.push(["FarEastWarTraining", 0]);
PASSIVE_SKILLS.push(["Meditate", 0]);
PASSIVE_SKILLS.push(["KungFuSecrets", 0]);
PASSIVE_SKILLS.push(["Infantry_3", 0]);
PASSIVE_SKILLS.push(["Bowmen_1", 0]);
PASSIVE_SKILLS.push(["Bowmen_3", 0]);
AURA_SKILLS.push(["DivineHelp", 0]);
AURA_SKILLS.push(["SoulDrain", 0]);
AURA_SKILLS.push(["UnholyBreath", 0]);
}
function heroMonMale() {
LEVEL = 1;
NAME = "Chingis";
NATION = "Mon";
GENDER = "m";
STR = 25;
CON = 15;
DEX = 15;
SPR = 15;
SKILL = new Array();
SKILL.Sword = 60;
SKILL.Axe = 5;
SKILL.Mace = 5;
SKILL.FarEast = 0;
SKILL.Spear = 5;
SKILL.Dagger = 25;
SKILL.Staff = 0;
SKILL.Dual = 35;
SKILL.Katar = 0;
SKILL.Fist = 50;
SKILL.Bow = 55;
SKILL.Crossbow = 5;
SKILL.Throwing = 10;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Mon", 1);
WEAPON_SEC = new WeaponClass("Shield", "Mon", 1);
ARMOR = null;
HELMET = null;
HORSE = null;
ACTIVE_SKILLS.shield = [0, 0, 0];
ACTIVE_SKILLS.bow = [0, 0, 0];
ACTIVE_SKILLS["2H_sword"] = [0, 0, 0];
PASSIVE_SKILLS.push(["Swordsmen_2", 0]);
PASSIVE_SKILLS.push(["Swordsmen_1", 0]);
PASSIVE_SKILLS.push(["Horsemen_2", 0]);
PASSIVE_SKILLS.push(["Bowmen_1", 0]);
PASSIVE_SKILLS.push(["Bowmen_3", 0]);
PASSIVE_SKILLS.push(["Horsemen_3", 0]);
AURA_SKILLS.push(["DivineHelp", 0]);
AURA_SKILLS.push(["NationMon", 0]);
AURA_SKILLS.push(["ForceBalance", 0]);
}
function heroMonFemale() {
LEVEL = 1;
NAME = "Inga";
NATION = "Mon";
GENDER = "f";
STR = 10;
CON = 10;
DEX = 30;
SPR = 25;
SKILL = new Array();
SKILL.Sword = 40;
SKILL.Axe = 5;
SKILL.Mace = 5;
SKILL.FarEast = 0;
SKILL.Spear = 10;
SKILL.Dagger = 60;
SKILL.Staff = 0;
SKILL.Dual = 5;
SKILL.Katar = 0;
SKILL.Fist = 50;
SKILL.Bow = 65;
SKILL.Crossbow = 5;
SKILL.Throwing = 10;
WEAPON_PRI = new WeaponClass("Bow", "Mon", 1);
WEAPON_SEC = new WeaponClass("Dagger", "Mon", 1);
ARMOR = null;
HELMET = null;
HORSE = null;
ACTIVE_SKILLS.bow = [0, 0, 0];
ACTIVE_SKILLS.dagger = [0, 0, 0];
ACTIVE_SKILLS.shield = [0, 0, 0];
PASSIVE_SKILLS.push(["Bowmen_1", 0]);
PASSIVE_SKILLS.push(["Bowmen_2", 0]);
PASSIVE_SKILLS.push(["Bowmen_3", 0]);
PASSIVE_SKILLS.push(["Horsemen_1", 0]);
PASSIVE_SKILLS.push(["Horsemen_2", 0]);
PASSIVE_SKILLS.push(["Horsemen_3", 0]);
AURA_SKILLS.push(["VenomCloud", 0]);
AURA_SKILLS.push(["Healing", 0]);
AURA_SKILLS.push(["BansheeCry", 0]);
}
function heroAraMale() {
LEVEL = 1;
NAME = "Ismael";
NATION = "Ara";
GENDER = "m";
STR = 35;
CON = 20;
DEX = 15;
SPR = 5;
SKILL = new Array();
SKILL.Sword = 55;
SKILL.Axe = 5;
SKILL.Mace = 5;
SKILL.FarEast = 0;
SKILL.Spear = 5;
SKILL.Dagger = 10;
SKILL.Staff = 0;
SKILL.Dual = 45;
SKILL.Katar = 35;
SKILL.Fist = 50;
SKILL.Bow = 5;
SKILL.Crossbow = 30;
SKILL.Throwing = 10;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Ara", 1);
WEAPON_SEC = new WeaponClass("OnehandedSword", "Ara", 1);
ARMOR = null;
HELMET = new Armor("Helmet", "Ara", 1);
HORSE = null;
ACTIVE_SKILLS.dual = [0, 0, 0];
ACTIVE_SKILLS["2H_sword"] = [0, 0, 0];
ACTIVE_SKILLS.crossbow = [0, 0, 0];
PASSIVE_SKILLS.push(["Infantry_2", 0]);
PASSIVE_SKILLS.push(["Swordsmen_2", 0]);
PASSIVE_SKILLS.push(["AssassinTraining", 0]);
PASSIVE_SKILLS.push(["Infantry_1", 0]);
PASSIVE_SKILLS.push(["Swordsmen_1", 0]);
PASSIVE_SKILLS.push(["Swordsmen_3", 0]);
AURA_SKILLS.push(["NationAra", 0]);
AURA_SKILLS.push(["Healing", 0]);
AURA_SKILLS.push(["HolyTribunal", 0]);
}
function heroAraFemale() {
LEVEL = 1;
NAME = "Diana";
NATION = "Ara";
GENDER = "f";
STR = 30;
CON = 10;
DEX = 30;
SPR = 5;
SKILL = new Array();
SKILL.Sword = 40;
SKILL.Axe = 5;
SKILL.Mace = 5;
SKILL.FarEast = 0;
SKILL.Spear = 10;
SKILL.Dagger = 60;
SKILL.Staff = 0;
SKILL.Dual = 10;
SKILL.Katar = 65;
SKILL.Fist = 50;
SKILL.Bow = 5;
SKILL.Crossbow = 20;
SKILL.Throwing = 0;
WEAPON_PRI = new WeaponClass("Katar", "Ara", 1);
WEAPON_SEC = new WeaponClass("Crossbow", "Viz", 1);
ARMOR = null;
HELMET = null;
HORSE = null;
ACTIVE_SKILLS.katar = [0, 0, 0];
ACTIVE_SKILLS.crossbow = [0, 0, 0];
ACTIVE_SKILLS.dagger = [0, 0, 0];
PASSIVE_SKILLS.push(["Infantry_3", 0]);
PASSIVE_SKILLS.push(["AssassinTraining", 0]);
PASSIVE_SKILLS.push(["FindWeakPoint", 0]);
PASSIVE_SKILLS.push(["Swordsmen_3", 0]);
PASSIVE_SKILLS.push(["Horsemen_1", 0]);
PASSIVE_SKILLS.push(["Horsemen_3", 0]);
AURA_SKILLS.push(["VenomCloud", 0]);
AURA_SKILLS.push(["SoulDrain", 0]);
AURA_SKILLS.push(["UnholyBreath", 0]);
}
function enemyVizKing() {
LEVEL = 40;
NAME = "Republic King";
NATION = "Viz";
GENDER = "m";
STR = 100;
CON = 60;
DEX = 20;
SPR = 40;
SKILL = new Array();
SKILL.Sword = 100;
SKILL.Crossbow = 100;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Viz", 7);
WEAPON_SEC = new WeaponClass("Crossbow", "Viz", 4);
ARMOR = new Armor("Clothes", "Viz", 8);
HELMET = new Armor("Helmet", "Viz", 8);
HORSE = null;
ACTIVE_SKILLS["2H_sword"] = [5, 5, 5];
ACTIVE_SKILLS.crossbow = [5, 5, 5];
PASSIVE_SKILLS.push(["Infantry_1", 5]);
PASSIVE_SKILLS.push(["Infantry_2", 5]);
PASSIVE_SKILLS.push(["Swordsmen_2", 5]);
PASSIVE_SKILLS.push(["Bowmen_1", 5]);
PASSIVE_SKILLS.push(["Horsemen_1", 5]);
PASSIVE_SKILLS.push(["Horsemen_3", 5]);
AURA_SKILLS.push(["NationViz", 5]);
}
function enemyGerKing() {
LEVEL = 40;
NAME = "Order King";
NATION = "Ger";
GENDER = "m";
STR = 100;
CON = 100;
DEX = 10;
SPR = 10;
SKILL = new Array();
SKILL.Mace = 100;
SKILL.Throwing = 100;
WEAPON_PRI = new WeaponClass("TwohandedMace", "Ger", 6);
WEAPON_SEC = new WeaponClass("Throwing", "Ger", 6);
ARMOR = new Armor("Clothes", "Ger", 8);
HELMET = new Armor("Helmet", "Ger", 8);
HORSE = null;
ACTIVE_SKILLS["2H_axe"] = [5, 5, 5];
ACTIVE_SKILLS.throwing = [5, 5, 5];
PASSIVE_SKILLS.push(["Infantry_1", 5]);
PASSIVE_SKILLS.push(["Infantry_1", 5]);
PASSIVE_SKILLS.push(["Infantry_3", 5]);
PASSIVE_SKILLS.push(["Swordsmen_2", 5]);
PASSIVE_SKILLS.push(["Swordsmen_1", 5]);
PASSIVE_SKILLS.push(["Horsemen_2", 5]);
AURA_SKILLS.push(["NationGer", 5]);
}
function enemyRusKing() {
LEVEL = 40;
NAME = "Forest King";
NATION = "Rus";
GENDER = "m";
STR = 110;
CON = 60;
DEX = 10;
SPR = 20;
SKILL = new Array();
SKILL.Axe = 100;
SKILL.Bow = 100;
WEAPON_PRI = new WeaponClass("TwohandedAxe", "Rus", 6);
WEAPON_SEC = new WeaponClass("Bow", "Rus", 4);
ARMOR = new Armor("Clothes", "Rus", 8);
HELMET = new Armor("Helmet", "Rus", 8);
HORSE = null;
ACTIVE_SKILLS["2H_axe"] = [5, 5, 5];
ACTIVE_SKILLS.bow = [5, 5, 5];
PASSIVE_SKILLS.push(["Infantry_3", 5]);
PASSIVE_SKILLS.push(["Infantry_2", 5]);
PASSIVE_SKILLS.push(["BerserkerTraining", 5]);
PASSIVE_SKILLS.push(["Swordsmen_3", 5]);
PASSIVE_SKILLS.push(["Swordsmen_2", 5]);
PASSIVE_SKILLS.push(["Horsemen_3", 5]);
AURA_SKILLS.push(["NationRus", 5]);
}
function enemyJapKing() {
LEVEL = 40;
NAME = "Empire King";
NATION = "Jap";
GENDER = "m";
STR = 90;
CON = 30;
DEX = 90;
SPR = 40;
SKILL = new Array();
SKILL.FarEast = 100;
SKILL.Dual = 100;
WEAPON_PRI = new WeaponClass("NinjaTo", "Jap", 8);
WEAPON_SEC = new WeaponClass("NinjaTo", "Jap", 8);
ARMOR = new Armor("Clothes", "Jap", 8);
HELMET = new Armor("Helmet", "Jap", 8);
HORSE = null;
ACTIVE_SKILLS.dual = [5, 5, 5];
PASSIVE_SKILLS.push(["Infantry_2", 5]);
PASSIVE_SKILLS.push(["Infantry_3", 5]);
PASSIVE_SKILLS.push(["FarEastWarTraining", 5]);
PASSIVE_SKILLS.push(["Bowmen_1", 5]);
PASSIVE_SKILLS.push(["Bowmen_2", 5]);
PASSIVE_SKILLS.push(["Meditate", 5]);
AURA_SKILLS.push(["NationJap", 5]);
}
function enemyMonKing() {
LEVEL = 40;
NAME = "Horde King";
NATION = "Mon";
GENDER = "m";
STR = 100;
CON = 20;
DEX = 40;
SPR = 60;
SKILL = new Array();
SKILL.Sword = 100;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Mon", 7);
WEAPON_SEC = new WeaponClass("Shield", "Mon", 4);
ARMOR = new Armor("Clothes", "Mon", 8);
HELMET = new Armor("Helmet", "Mon", 8);
HORSE = null;
ACTIVE_SKILLS.shield = [5, 5, 5];
PASSIVE_SKILLS.push(["Swordsmen_2", 5]);
PASSIVE_SKILLS.push(["Swordsmen_1", 5]);
PASSIVE_SKILLS.push(["Horsemen_2", 5]);
PASSIVE_SKILLS.push(["Bowmen_1", 5]);
PASSIVE_SKILLS.push(["Bowmen_3", 5]);
PASSIVE_SKILLS.push(["Horsemen_3", 5]);
AURA_SKILLS.push(["NationMon", 5]);
}
function enemyAraKing() {
LEVEL = 40;
NAME = "Desert King";
NATION = "Ara";
GENDER = "m";
STR = 100;
CON = 60;
DEX = 70;
SPR = 30;
SKILL = new Array();
SKILL.Sword = 100;
SKILL.Dual = 100;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Ara", 7);
WEAPON_SEC = new WeaponClass("OnehandedSword", "Ara", 7);
ARMOR = new Armor("Clothes", "Ara", 8);
HELMET = new Armor("Helmet", "Ara", 8);
HORSE = null;
ACTIVE_SKILLS.dual = [5, 5, 5];
PASSIVE_SKILLS.push(["Infantry_2", 5]);
PASSIVE_SKILLS.push(["Swordsmen_2", 5]);
PASSIVE_SKILLS.push(["AssassinTraining", 5]);
PASSIVE_SKILLS.push(["Infantry_1", 5]);
PASSIVE_SKILLS.push(["Swordsmen_1", 5]);
PASSIVE_SKILLS.push(["Swordsmen_3", 5]);
AURA_SKILLS.push(["NationAra", 5]);
}
static function getChampion(nation, lv) {
var _local1 = new Hero();
_local1[("enemy" + nation) + "Champion"]();
_local1.LEVEL = 10 + (5 * lv);
_local1.STR = 20 + (10 * lv);
_local1.CON = 20 + (10 * lv);
_local1.DEX = 20 + (10 * lv);
_local1.SPR = 20 + (10 * lv);
_local1.ARMOR = new Armor("Clothes", nation, lv);
_local1.HELMET = new Armor("Helmet", nation, lv);
return(_local1);
}
function enemyVizChampion(lv) {
LEVEL = 50;
NAME = "Republic Champion";
NATION = "Viz";
GENDER = "f";
STR = 100;
CON = 100;
DEX = 100;
SPR = 100;
SKILL = new Array();
SKILL.Sword = 100;
SKILL.Dual = 100;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Viz", 7);
WEAPON_SEC = new WeaponClass("OnehandedSword", "Viz", 7);
ARMOR = new Armor("Clothes", "Viz", 8);
HELMET = new Armor("Helmet", "Viz", 8);
HORSE = null;
ACTIVE_SKILLS.dual = [5, 5, 5];
PASSIVE_SKILLS.push(["Infantry_1", 5]);
PASSIVE_SKILLS.push(["Infantry_2", 5]);
PASSIVE_SKILLS.push(["Swordsmen_2", 5]);
PASSIVE_SKILLS.push(["Bowmen_1", 5]);
PASSIVE_SKILLS.push(["Horsemen_1", 5]);
PASSIVE_SKILLS.push(["Horsemen_3", 5]);
AURA_SKILLS.push(["UnholyBreath", 5]);
}
function enemyGerChampion() {
LEVEL = 50;
NAME = "Order Champion";
NATION = "Ger";
GENDER = "m";
STR = 100;
CON = 100;
DEX = 100;
SPR = 100;
SKILL = new Array();
SKILL.Mace = 100;
SKILL.Throwing = 100;
WEAPON_PRI = new WeaponClass("TwohandedMace", "Ger", 6);
WEAPON_SEC = new WeaponClass("Throwing", "Ger", 6);
ARMOR = new Armor("Clothes", "Ger", 8);
HELMET = new Armor("Helmet", "Ger", 8);
HORSE = null;
ACTIVE_SKILLS["2H_axe"] = [5, 5, 5];
ACTIVE_SKILLS.throwing = [5, 5, 5];
PASSIVE_SKILLS.push(["Infantry_1", 5]);
PASSIVE_SKILLS.push(["Infantry_1", 5]);
PASSIVE_SKILLS.push(["Infantry_3", 5]);
PASSIVE_SKILLS.push(["Swordsmen_2", 5]);
PASSIVE_SKILLS.push(["Swordsmen_1", 5]);
PASSIVE_SKILLS.push(["Horsemen_2", 5]);
AURA_SKILLS.push(["HolyTribunal", 5]);
}
function enemyRusChampion() {
LEVEL = 50;
NAME = "Forest Champion";
NATION = "Rus";
GENDER = "m";
STR = 110;
CON = 100;
DEX = 100;
SPR = 100;
SKILL = new Array();
SKILL.Axe = 100;
SKILL.Dual = 100;
WEAPON_PRI = new WeaponClass("OnehandedAxe", "Rus", 6);
WEAPON_SEC = new WeaponClass("OnehandedAxe", "Rus", 6);
ARMOR = new Armor("Clothes", "Rus", 8);
HELMET = new Armor("Helmet", "Rus", 8);
HORSE = null;
ACTIVE_SKILLS.dual = [5, 5, 5];
PASSIVE_SKILLS.push(["Infantry_3", 5]);
PASSIVE_SKILLS.push(["Infantry_2", 5]);
PASSIVE_SKILLS.push(["BerserkerTraining", 5]);
PASSIVE_SKILLS.push(["Swordsmen_3", 5]);
PASSIVE_SKILLS.push(["Swordsmen_2", 5]);
PASSIVE_SKILLS.push(["Horsemen_3", 5]);
AURA_SKILLS.push(["VenomCloud", 5]);
}
function enemyJapChampion() {
LEVEL = 50;
NAME = "Empire Champion";
NATION = "Jap";
GENDER = "m";
STR = 100;
CON = 100;
DEX = 100;
SPR = 100;
SKILL = new Array();
SKILL.FarEast = 100;
SKILL.Throwing = 100;
WEAPON_PRI = new WeaponClass("Katana", "Jap", 8);
WEAPON_SEC = new WeaponClass("Throwing", "Jap", 7);
ARMOR = new Armor("Clothes", "Jap", 8);
HELMET = new Armor("Helmet", "Jap", 8);
HORSE = null;
ACTIVE_SKILLS.katana = [5, 5, 5];
ACTIVE_SKILLS.throwing = [5, 5, 5];
PASSIVE_SKILLS.push(["Infantry_2", 5]);
PASSIVE_SKILLS.push(["Infantry_3", 5]);
PASSIVE_SKILLS.push(["FarEastWarTraining", 5]);
PASSIVE_SKILLS.push(["Bowmen_1", 5]);
PASSIVE_SKILLS.push(["Bowmen_2", 5]);
PASSIVE_SKILLS.push(["Meditate", 5]);
AURA_SKILLS.push(["UnholyBreath", 5]);
}
function enemyMonChampion() {
LEVEL = 50;
NAME = "Horde Champion";
NATION = "Mon";
GENDER = "m";
STR = 100;
CON = 100;
DEX = 100;
SPR = 100;
SKILL = new Array();
SKILL.Sword = 100;
SKILL.Dual = 100;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Mon", 7);
WEAPON_SEC = new WeaponClass("OnehandedSword", "Mon", 7);
ARMOR = new Armor("Clothes", "Mon", 8);
HELMET = new Armor("Helmet", "Mon", 8);
HORSE = null;
ACTIVE_SKILLS.dual = [5, 5, 5];
PASSIVE_SKILLS.push(["Swordsmen_2", 5]);
PASSIVE_SKILLS.push(["Swordsmen_1", 5]);
PASSIVE_SKILLS.push(["Horsemen_2", 5]);
PASSIVE_SKILLS.push(["Bowmen_1", 5]);
PASSIVE_SKILLS.push(["Bowmen_3", 5]);
PASSIVE_SKILLS.push(["Horsemen_3", 5]);
AURA_SKILLS.push(["ForceBalance", 5]);
}
function enemyAraChampion() {
LEVEL = 50;
NAME = "Desert Champion";
NATION = "Ara";
GENDER = "f";
STR = 100;
CON = 100;
DEX = 100;
SPR = 100;
SKILL = new Array();
SKILL.Katar = 100;
SKILL.Crossbow = 100;
WEAPON_PRI = new WeaponClass("Katar", "Ara", 6);
WEAPON_SEC = new WeaponClass("Crossbow", "Viz", 4);
ARMOR = new Armor("Clothes", "Ara", 8);
HELMET = new Armor("Helmet", "Ara", 8);
HORSE = null;
ACTIVE_SKILLS.katar = [5, 5, 5];
ACTIVE_SKILLS.crossbow = [5, 5, 5];
PASSIVE_SKILLS.push(["Infantry_2", 5]);
PASSIVE_SKILLS.push(["Swordsmen_2", 5]);
PASSIVE_SKILLS.push(["AssassinTraining", 5]);
PASSIVE_SKILLS.push(["Infantry_1", 5]);
PASSIVE_SKILLS.push(["Swordsmen_1", 5]);
PASSIVE_SKILLS.push(["Swordsmen_3", 5]);
AURA_SKILLS.push(["UnholyBreath", 5]);
}
function playerTutorialDummy() {
LEVEL = 20;
NAME = "Tutorial Player";
NATION = _global.MAIN_HERO.NATION;
GENDER = _global.MAIN_HERO.GENDER;
STR = 30;
CON = 50;
DEX = 20;
SPR = 40;
SKILL = new Array();
SKILL.Sword = 100;
SKILL.Bow = 100;
WEAPON_PRI = new WeaponClass("Bow", "Viz", 2);
WEAPON_SEC = new WeaponClass("TwohandedSword", "Viz", 1);
ARMOR = null;
HELMET = null;
HORSE = null;
ACTIVE_SKILLS.crossbow = [0, 0, 0];
ACTIVE_SKILLS["2H_sword"] = [5, 0, 0];
ACTIVE_SKILLS["2H_axe"] = [0, 0, 0];
PASSIVE_SKILLS.push(["Infantry_2", 0]);
PASSIVE_SKILLS.push(["Swordsmen_2", 0]);
PASSIVE_SKILLS.push(["AssassinTraining", 0]);
PASSIVE_SKILLS.push(["Infantry_1", 0]);
PASSIVE_SKILLS.push(["Swordsmen_1", 0]);
PASSIVE_SKILLS.push(["Swordsmen_3", 0]);
AURA_SKILLS.push(["Healing", 3]);
AURA_SKILLS.push(["HolyTribunal", 0]);
AURA_SKILLS.push(["VenomCloud", 0]);
}
function enemyTutorialDummy() {
LEVEL = 1;
NAME = "Tutorial Enemy";
NATION = "Mon";
GENDER = "m";
STR = 1;
CON = 1;
DEX = 1;
SPR = 1;
SKILL = new Array();
SKILL.Sword = 50;
SKILL.Bow = 50;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Mon", 1);
WEAPON_SEC = new WeaponClass("Bow", "Mon", 2);
ARMOR = null;
HELMET = null;
HORSE = null;
}
var price = 0;
}
Symbol 3131 MovieClip [__Packages.Item] Frame 0
class Item extends Object
{
var FRAME, NAME, TYPE;
function Item () {
super();
FRAME = getFrame();
}
function initEnchant(ei) {
if (ei) {
var _local3 = new Enchant(ei);
ENCH_ID = ei;
NAME = Enchant.getPrefix(ei) + NAME;
NAME = NAME + Enchant.getSuffix(ei);
} else {
ENCH_ID = null;
}
}
function setRefine(refine_lv) {
if (refine_lv) {
REFINE = refine_lv;
NAME = NAME + (" +" + REFINE);
}
}
function getFrame() {
var _local3 = _root.getNationNumber(NATION) - 1;
var _local4 = NATION == "Rog";
switch (TYPE) {
case "OnehandedSword" :
switch (NATION) {
case "Rog" :
return(LEVEL);
case "Viz" :
case "Ger" :
case "Rus" :
return((2 + LEVEL) + (_local3 * 7));
case "Mon" :
case "Ara" :
return((LEVEL + (_local3 * 7)) - 5);
}
case "TwohandedSword" :
switch (NATION) {
case "Rog" :
return(37 + LEVEL);
case "Viz" :
case "Ger" :
case "Rus" :
return((39 + LEVEL) + (_local3 * 7));
case "Mon" :
case "Ara" :
return((32 + LEVEL) + (_local3 * 7));
}
case "OnehandedAxe" :
return(74 + (_local4 ? (LEVEL) : ((2 + LEVEL) + (_local3 * 6))));
case "TwohandedAxe" :
return(94 + (_local4 ? (LEVEL) : ((2 + LEVEL) + (_local3 * 6))));
case "OnehandedMace" :
return(114 + (_local4 ? (LEVEL) : ((2 + LEVEL) + (_local3 * 6))));
case "TwohandedMace" :
return(134 + (_local4 ? (LEVEL) : ((2 + LEVEL) + (_local3 * 6))));
case "Staff" :
return(154 + LEVEL);
case "NinjaTo" :
return(162 + (_local4 ? (LEVEL) : (2 + LEVEL)));
case "Katana" :
return(172 + (_local4 ? (LEVEL) : (2 + LEVEL)));
case "Spear" :
return((182 + LEVEL) + (_local3 * 5));
case "Dagger" :
switch (NATION) {
case "Viz" :
return(197 + LEVEL);
case "Mon" :
return(204 + LEVEL);
}
case "Katar" :
return(211 + LEVEL);
case "Throwing" :
switch (NATION) {
case "Viz" :
return(229 + LEVEL);
case "Ger" :
return(217 + LEVEL);
case "Rus" :
return(223 + LEVEL);
case "Jap" :
return(231 + LEVEL);
return((238 + LEVEL) + (_local3 * 4));
switch (NATION) {
case "Viz" :
case "Ger" :
case "Rus" :
return((258 + LEVEL) + (_local3 * 4));
case "Mon" :
return(270 + LEVEL);
return((274 + LEVEL) + (_local3 * 4));
return((_local3 + 1) + ((LEVEL - 1) * 6));
return((_local3 + 1) + ((LEVEL - 1) * 6));
return(287);
return(Enchant.getFrame(ENCH_ID));
return(LEVEL);
}
}
case "Bow" :
return((238 + LEVEL) + (_local3 * 4));
case "Shield" :
switch (NATION) {
case "Viz" :
case "Ger" :
case "Rus" :
return((258 + LEVEL) + (_local3 * 4));
case "Mon" :
return(270 + LEVEL);
return((274 + LEVEL) + (_local3 * 4));
return((_local3 + 1) + ((LEVEL - 1) * 6));
return((_local3 + 1) + ((LEVEL - 1) * 6));
return(287);
return(Enchant.getFrame(ENCH_ID));
return(LEVEL);
}
case "Crossbow" :
return((274 + LEVEL) + (_local3 * 4));
case "Clothes" :
return((_local3 + 1) + ((LEVEL - 1) * 6));
case "Helmet" :
return((_local3 + 1) + ((LEVEL - 1) * 6));
case "Fists" :
return(287);
case "Rune" :
return(Enchant.getFrame(ENCH_ID));
default :
return(LEVEL);
}
}
function getIconFrame() {
var _local2 = 0;
switch (TYPE) {
case "Clothes" :
_local2 = 286;
break;
case "Helmet" :
_local2 = 334;
break;
case "Rune" :
_local2 = 382;
}
return(_local2 + FRAME);
}
function getItemInfo() {
var _local2 = "";
switch (TYPE) {
case "Clothes" :
case "Helmet" :
_local2 = "Armor";
break;
case "Rune" :
_local2 = "Rune";
break;
default :
_local2 = "WeaponClass";
}
return(new ItemInfo(_local2, TYPE, NATION, LEVEL, ENCH_ID, REFINE));
}
function getMaxLevel() {
switch (TYPE) {
case "OnehandedSword" :
case "TwohandedSword" :
return(7);
case "OnehandedAxe" :
case "TwohandedAxe" :
return(6);
case "OnehandedMace" :
case "TwohandedMace" :
return(6);
case "NinjaTo" :
case "Katana" :
return(8);
case "Spear" :
return(5);
case "Dagger" :
return(7);
case "Staff" :
return(8);
case "Katar" :
return(6);
case "Bow" :
return(4);
case "Crossbow" :
return(4);
case "Throwing" :
return(7);
case "Shield" :
return(4);
case "Clothes" :
case "Helmet" :
return(8);
case "Rune" :
return(0);
}
}
function getRequireLevel() {
if (NATION == "Rog") {
return(1);
}
return(1 + Math.floor((40 * (LEVEL - 1)) / (getMaxLevel() - 1)));
}
var NATION = null;
var LEVEL = 0;
var REFINE = 0;
var ENCH_ID = null;
}
Symbol 3132 MovieClip [__Packages.Enchant] Frame 0
class Enchant extends Object
{
var ID;
function Enchant (en_id) {
super();
ID = en_id;
}
static function getFrame(en_id) {
switch (en_id) {
case "Footmans" :
return(1);
case "Riders" :
return(2);
case "Critical" :
return(3);
case "Bloody" :
return(4);
case "Ghost" :
return(5);
case "IcePick" :
return(6);
case "Wolverine" :
return(7);
case "ofWeaken" :
return(8);
case "ofPoison" :
return(9);
case "Stunning" :
return(10);
case "Mad" :
return(11);
case "Charming" :
return(12);
}
}
static function getPrefix(en_id) {
switch (en_id) {
case "Footmans" :
return("Footman's ");
case "Riders" :
return("Rider's ");
case "Critical" :
return("Critical ");
case "Bloody" :
return("Bloody ");
case "Ghost" :
return("Ghost ");
case "IcePick" :
return("");
case "Wolverine" :
return("Wolverine ");
case "ofWeaken" :
return("");
case "ofPoison" :
return("");
case "Stunning" :
return("Stunning ");
case "Mad" :
return("Mad ");
case "Charming" :
return("Charming ");
}
}
static function getSuffix(en_id) {
switch (en_id) {
case "Footmans" :
return("");
case "Riders" :
return("");
case "Critical" :
return("");
case "Bloody" :
return("");
case "Ghost" :
return("");
case "IcePick" :
return(" of Thanatos");
case "Wolverine" :
return("");
case "ofWeaken" :
return(" of Weaking");
case "ofPoison" :
return(" of Poison");
case "Stunning" :
return("");
case "Mad" :
return("");
case "Charming" :
return("");
}
}
function operate(who, dmg_data) {
this["operate_" + ID](who, dmg_data);
}
function operate_Footmans(who, dmg_data) {
if (who.isHorseman) {
dmg_data.damage = Math.round(dmg_data.damage * (1 + BASE_BONUS));
}
}
function operate_Riders(who, dmg_data) {
if (!who.isHorseman) {
dmg_data.damage = Math.round(dmg_data.damage * (1 + BASE_BONUS));
}
}
function operate_Critical(who, dmg_data) {
dmg_data.crit = dmg_data.crit + 10;
}
function operate_Bloody(who, dmg_data) {
dmg_data.damage = dmg_data.damage + who.DEF;
}
function operate_Ghost(who, dmg_data) {
dmg_data.damage = Math.round(dmg_data.damage * (1 - BASE_BONUS));
dmg_data.damage = dmg_data.damage + who.DEF;
}
function operate_IcePick(who, dmg_data) {
dmg_data.damage = Math.round(dmg_data.damage * (1 + (who.DEF / 50)));
dmg_data.damage = dmg_data.damage + who.DEF;
}
function operate_Wolverine(who, dmg_data) {
dmg_data.damage = dmg_data.damage + 15;
}
function operate_ofWeaken(who, dmg_data) {
if (who.HP < (who.MAX_HP / 2)) {
dmg_data.damage = Math.round(dmg_data.damage * 1.5);
} else {
dmg_data.damage = Math.round(dmg_data.damage * 0.5);
}
}
function operate_ofPoison(who, dmg_data) {
if (_root.percent(5)) {
dmg_data.addStatus("Poison", 5);
}
}
function operate_Stunning(who, dmg_data) {
if (_root.percent(5)) {
dmg_data.addStatus("Stun", 2);
}
}
function operate_Mad(who, dmg_data) {
if (_root.percent(5)) {
dmg_data.addStatus("Chaos", 5);
}
}
function operate_Charming(who, dmg_data) {
if (_root.percent(5)) {
dmg_data.addStatus("Charm", 5);
}
}
var BASE_BONUS = 0.3;
}
Symbol 3133 MovieClip [__Packages.Creature] Frame 0
class Creature extends MovieClip
{
var isHorseman, statuses, speed, _xscale, _yscale, X, _x, Y, _y, moveX, moveY, isSwitchingWeapons, isDead, team, body, aspd_timer, bar_clr, borders, attacking, gox, goy, inner_depth, nextX, nextY, swapDepths, MOVE_FRAMES, HP, runAnim, atkAnim, wpnPri, wpnSec, DEF, MAX_HP, light_circle, onEnterFrame, unit_ref, _name, attachMovie, agi_delay, dex_aspd_mod, aspd_delay, DODGE, SHIELD_DODGE, MAX_SP, SPregen, active_skills, aura_skills, preferRanged, SP;
function Creature () {
super();
}
function CreatureInit() {
isHorseman = false;
statuses = new Array();
speed = 3;
_xscale = 25;
_yscale = 25;
X = _root.getX(_x);
Y = _root.getY(_y);
_x = _root.stgX(X);
_y = _root.stgY(Y);
moveX = 0;
moveY = 0;
isSwitchingWeapons = false;
isDead = false;
if (team == 0) {
body._xscale = -100;
}
aspd_timer = 0;
bar_clr = new Color(borders.hp_bar);
attacking = null;
gox = null;
goy = null;
initPosition();
inner_depth = 1;
body.head.stun_anim._visible = false;
}
function dist(man) {
return(Math.round(Math.sqrt(((X - man.X) * (X - man.X)) + ((Y - man.Y) * (Y - man.Y)))));
}
function canGo(xx, yy) {
return((((((xx >= 0) && (xx < _global.F_WIDTH)) && (yy >= 0)) && (yy < _global.F_HEIGHT)) && (_global.field[xx][yy].empty)) && (_global.field[xx][yy].free));
}
function leavePosition() {
_global.field[X][Y].who = null;
_global.field[X][Y].empty = true;
X = nextX;
Y = nextY;
swapDepths(_root.getDepthMan(X, Y));
_global.field[X][Y].who = this;
}
function initPosition() {
swapDepths(_root.getDepthMan(X, Y));
_global.field[X][Y].who = this;
_global.field[X][Y].empty = false;
}
function startMove() {
if (moveX != 0) {
body._xscale = (-moveX) * 100;
}
if (canGo(X + moveX, Y + moveY)) {
if ((body._currentframe <= MOVE_FRAMES) && (HP > 0)) {
body.gotoAndPlay(runAnim);
}
nextX = X + moveX;
nextY = Y + moveY;
_global.field[nextX][nextY].empty = false;
return(true);
}
moveX = 0;
moveY = 0;
return(false);
}
function stopMove() {
moveX = 0;
moveY = 0;
if (!isSwitchingWeapons) {
body.gotoAndStop(atkAnim);
}
}
function continueMove() {
if (moveX != 0) {
body._xscale = (-moveX) * 100;
}
if (canGo(X + moveX, Y + moveY)) {
nextX = X + moveX;
nextY = Y + moveY;
_global.field[nextX][nextY].empty = false;
return(true);
}
return(false);
}
function moveOnX() {
if (moveX != 0) {
_x = _x + (speed * moveX);
}
}
function moveOnY() {
if (moveY != 0) {
_y = _y + ((speed * moveY) / (_global.CAGE_W / _global.CAGE_H));
}
}
function moveNewStep() {
if ((_root.getX(_x) != X) || (_root.getY(_y) != Y)) {
leavePosition();
}
}
function moveComplete() {
if ((((X == nextX) && (Y == nextY)) && (Math.abs(_y - _root.stgY(Y)) < speed)) && (Math.abs(_x - _root.stgX(X)) < speed)) {
_x = _root.stgX(X);
_y = _root.stgY(Y);
return(true);
}
return(false);
}
function switchWeapons() {
if (!canSwitchWeapons()) {
return(undefined);
}
isSwitchingWeapons = true;
if (wpnPri.TYPE == "Melee") {
if (wpnSec.c_type == "bow") {
body.gotoAndPlay("bow_on");
} else {
body.gotoAndPlay("crossbow_on");
}
} else if (wpnPri.c_type == "bow") {
body.gotoAndPlay("bow_off");
} else {
body.gotoAndPlay("crossbow_off");
}
}
function onRunAnimComplete() {
if (!isDead) {
body.gotoAndPlay(runAnim);
} else {
playDieAnim();
}
}
function onAnimComplete() {
isSwitchingWeapons = false;
if (!isDead) {
body.gotoAndStop(atkAnim);
} else {
playDieAnim();
}
}
function onSwitchWeapons() {
var _local2 = wpnPri;
wpnPri = wpnSec;
wpnSec = _local2;
initFightingStyle();
onAnimComplete();
}
function onEndAttack() {
onAnimComplete();
}
static function getArrowErrorRatio(hit_chance) {
switch (true) {
case _root.percent(hit_chance) :
return(0);
case _root.percent(hit_chance * 1.5) :
return(1);
case _root.percent(hit_chance * 2) :
return(2);
case _root.percent(hit_chance * 3) :
return(3);
}
return(4);
}
function getHitChance(who, useSecondWeapon) {
var _local2 = (useSecondWeapon ? (wpnSec) : (wpnPri));
if (who == null) {
return(_local2.HIT);
}
if (_local2.TYPE == "Melee") {
var _local4 = (_local2.HIT + 90) - Math.floor(who.DODGE);
if ((body._xscale > 0) != (who.body._xscale > 0)) {
_local4 = _local4 * ((100 - who.SHIELD_DODGE) / 100);
}
return(_local4);
}
return((((_local2.HIT * _local2.HIT) / 100) + 90) - Math.floor(who.DODGE));
}
function getDamageData(who, useSecondWeapon, dmg_mod) {
var _local3 = (useSecondWeapon ? (wpnSec) : (wpnPri));
var _local4 = new DamageData(this, _local3.dmg + _root.dice(_local3.rnd), getHitChance(who, useSecondWeapon), _local3.CRIT);
if (who != null) {
_local3.setDmgDataMods(who, _local4);
}
return(_local4);
}
function takeDamage(dmg_data, close_hit) {
if (isDead) {
return(undefined);
}
if (dmg_data.attacker.team == team) {
return(undefined);
}
if (dmg_data.hit < 10) {
dmg_data.hit = 10;
}
if (!_root.percent(dmg_data.hit)) {
dmg_data.attacker.addMessage("miss", "FlyMiss");
return(undefined);
}
if ((attacking != null) && (close_hit)) {
gox = null;
goy = null;
attacking = dmg_data.attacker;
}
dmg_data.damage = Math.round(dmg_data.damage);
if (dmg_data.statuses.length > 0) {
var _local4 = 0;
while (_local4 < dmg_data.statuses.length) {
addStatus(dmg_data.statuses[_local4]);
_local4++;
}
}
var _local5 = _root.percent(dmg_data.crit);
if (!_local5) {
dmg_data.damage = dmg_data.damage - DEF;
if (dmg_data.damage < 0) {
dmg_data.damage = 0;
}
}
if (dmg_data.att == _root.hero0) {
_root.kongregateStats.submit("MaxDamageInflicted", dmg_data.damage);
}
if (this == _root.hero0) {
_root.kongregateStats.submit("MaxDamageReceived", dmg_data.damage);
}
addMessage(dmg_data.damage, (_local5 ? "FlyCritDamage" : "FlyDamage"));
HP = HP - dmg_data.damage;
if (HP <= 0) {
die();
return(undefined);
}
redrawHealthBar();
}
function redrawHealthBar() {
var _local2 = (HP / MAX_HP) * 100;
borders.hp_bar._xscale = _local2;
if (_local2 > 70) {
bar_clr.setRGB(52224);
} else if (_local2 > 40) {
bar_clr.setRGB(16776960);
} else if (_local2 > 20) {
bar_clr.setRGB(16750848);
} else {
bar_clr.setRGB(16711680);
}
}
function playDieAnim() {
if (isHorseman) {
body.gotoAndPlay("die_horse");
} else {
switch (atkAnim) {
case "shield" :
case "katar" :
case "dual" :
body.gotoAndPlay("die_onehanded");
break;
case "throwing" :
case "bow" :
case "crossbow" :
body.gotoAndPlay("die_ranged");
break;
default :
body.gotoAndPlay("die_twohanded");
}
}
}
function die() {
HP = 0;
if (!isDead) {
cancelAllStatuses();
isDead = true;
light_circle._visible = false;
onEnterFrame = null;
_global.field[X][Y].empty = true;
_global.field[X][Y].who = null;
_global.field[nextX][nextY].empty = true;
borders._visible = false;
body.head.stun_anim._visible = false;
if (team != 0) {
var _local4 = Rune.getRandomRune();
if (_local4) {
_root.addItemTo(_global.LOOT, _local4);
}
_root.addItemTo(_global.LOOT, unit_ref.WEAPON_PRI);
_root.addItemTo(_global.LOOT, unit_ref.WEAPON_SEC);
_root.addItemTo(_global.LOOT, unit_ref.ARMOR);
_root.addItemTo(_global.LOOT, unit_ref.HELMET);
_global.EXP_GOT = _global.EXP_GOT + (Math.round(Math.sqrt(unit_ref.price)) * 3);
_global.GOLD_GOT = _global.GOLD_GOT + _root.d(unit_ref.price / 4);
}
playDieAnim();
if (_name == "hero0") {
_root.unloadMap();
_root.gotoAndStop("GAME_OVER");
}
}
}
function cancelAllStatuses() {
var _local2 = 0;
while (_local2 < statuses.length) {
statuses[_local2].endStatus(this);
_local2++;
}
}
function restInPeace() {
var _local3 = _root.getDepthMan(X, Y);
_root["blood_" + _local3].removeMovieClip();
_root.getInstanceAtDepth(_root.getDepthCorpse(X, Y)).removeMovieClip();
swapDepths(_root.getDepthCorpse(X, Y));
}
function addMessage(some_text, msg_type) {
attachMovie(msg_type, "flying_msg_" + inner_depth, inner_depth, {_x:0, _y:100});
this["flying_msg_" + inner_depth].inner.value_txt.text = some_text;
inner_depth = inner_depth + ((inner_depth < 15) ? 1 : -14);
}
function canSwitchWeapons() {
switch (atkAnim) {
case "dual" :
return(false);
case "shield" :
return((wpnSec != null) && (wpnSec.c_type != "Shield"));
case "dagger" :
case "katana" :
case "spear" :
case "throwing" :
case "katar" :
case "fists" :
case "staff" :
case "2H_sword" :
case "2H_axe" :
return(wpnSec.c_type != "Fists");
case "bow" :
case "crossbow" :
return(true);
}
trace("Fighting style missed:" + atkAnim);
}
static function getAtkAnim(pri_tp, sec_tp) {
if (((!WeaponClass.isTwohandedType(pri_tp)) && (!WeaponClass.isTwohandedType(sec_tp))) && (sec_tp != "Shield")) {
return("dual");
}
switch (pri_tp) {
case "OnehandedSword" :
case "OnehandedAxe" :
case "OnehandedMace" :
return("shield");
case "TwohandedSword" :
return("2H_sword");
case "TwohandedAxe" :
case "TwohandedMace" :
return("2H_axe");
case "NinjaTo" :
case "Katana" :
return("katana");
case "Katar" :
return("katar");
case "Staff" :
return("staff");
case "Spear" :
return("spear");
case "Dagger" :
return("dagger");
case "Fists" :
return("fists");
case "Bow" :
return("bow");
case "Crossbow" :
return("crossbow");
case "Throwing" :
return("throwing");
}
trace("Unknown weapon type:" + pri_tp);
}
static function getRunAnim(atk_anim, is_horseman) {
switch (atk_anim) {
case "spear" :
case "staff" :
return("run_2H_axe");
case "dagger" :
return("run_2H_sword");
case "fists" :
return((is_horseman ? "run_2H_sword" : "run_dual"));
case "katana" :
return((is_horseman ? "run_2H_sword" : "run_katana"));
}
return("run_" + atk_anim);
}
function getAttackDelay() {
switch (atkAnim) {
case "dagger" :
return(20);
case "katana" :
return(25);
case "shield" :
case "dual" :
case "spear" :
case "throwing" :
case "katar" :
return(30);
case "fists" :
case "staff" :
return(35);
case "2H_sword" :
case "2H_axe" :
case "bow" :
return(40);
case "crossbow" :
return(60);
}
trace("Fighting style missed:" + atkAnim);
}
function getWeaponDelay() {
switch (atkAnim) {
case "dagger" :
case "katana" :
return(30);
case "shield" :
case "dual" :
case "throwing" :
return(50);
case "staff" :
case "katar" :
return(40);
case "spear" :
return(70);
case "fists" :
return(20);
case "2H_sword" :
case "bow" :
return(60);
case "2H_axe" :
case "crossbow" :
return(70);
}
trace("Fighting style missed:" + atkAnim);
}
function initStoringWeapon() {
body.body.storage_spear._visible = false;
body.body.storage_bow._visible = false;
body.body.storage_axe._visible = false;
body.body.storage_staff._visible = false;
body.body.storage_sword._visible = false;
body.body.storage_katar._visible = false;
body.body.storage_dagger._visible = false;
body.body.storage_throwing._visible = false;
if (atkAnim == "dual") {
return(undefined);
}
switch (wpnSec.c_type) {
case "OnehandedSword" :
case "TwohandedSword" :
case "OnehandedMace" :
case "OnehandedAxe" :
case "NinjaTo" :
case "Katana" :
body.body.storage_sword._visible = true;
body.body.storage_sword.gotoAndStop(wpnSec.frame);
break;
case "TwohandedAxe" :
case "TwohandedMace" :
body.body.storage_axe._visible = true;
body.body.storage_axe.gotoAndStop(wpnSec.frame);
break;
case "Staff" :
body.body.storage_staff._visible = true;
body.body.storage_staff.gotoAndStop(wpnSec.frame);
break;
case "Spear" :
body.body.storage_spear._visible = true;
body.body.storage_spear.gotoAndStop(wpnSec.frame);
break;
case "Katar" :
body.body.storage_katar._visible = true;
body.body.storage_katar.gotoAndStop(wpnSec.frame);
break;
case "Dagger" :
body.body.storage_dagger._visible = true;
body.body.storage_dagger.gotoAndStop(wpnSec.frame);
break;
case "Bow" :
case "Crossbow" :
body.body.storage_bow._visible = true;
body.body.storage_bow.gotoAndStop(wpnSec.frame);
break;
case "Throwing" :
body.body.storage_throwing._visible = true;
body.body.storage_throwing.gotoAndStop(wpnSec.frame);
}
}
function initFightingStyle() {
atkAnim = getAtkAnim(wpnPri.c_type, (wpnSec ? (wpnSec.c_type) : null));
runAnim = getRunAnim(atkAnim, isHorseman);
agi_delay = Math.max(1, Math.round(dex_aspd_mod * (getWeaponDelay() - wpnPri.aspd_bonus)));
aspd_delay = agi_delay + getAttackDelay();
switch (atkAnim) {
case "dual" :
case "shield" :
body.weapL.gotoAndStop(wpnPri.frame);
body.weapR.gotoAndStop(wpnSec.frame);
break;
case "2H_sword" :
case "2H_axe" :
case "katana" :
case "staff" :
case "spear" :
case "dagger" :
case "fists" :
case "bow" :
case "crossbow" :
case "throwing" :
body.weapL.gotoAndStop(wpnPri.frame);
body.weapR.gotoAndStop("unarmed");
break;
case "katar" :
body.weapL.gotoAndStop(wpnPri.frame);
body.weapR.gotoAndStop(wpnPri.frame);
break;
default :
trace("Fighting style missed:" + atkAnim);
}
initStoringWeapon();
initSkills();
body.gotoAndStop(atkAnim);
}
function initSkills() {
}
function initUnit(hero) {
unit_ref = hero;
var _local6 = hero.NATION.toLowerCase();
DEF = 0;
DODGE = Math.floor(hero.DEX * Hero.getNationDodgeMod(hero.NATION));
SHIELD_DODGE = ((hero.WEAPON_SEC.TYPE == "Shield") ? (hero.WEAPON_SEC.crit) : 0);
MAX_HP = Math.round(((1 + (hero.CON * 0.05)) * hero.LEVEL) * 10);
MAX_SP = 20 + Math.round(((1 + (hero.SPR * 0.1)) * hero.LEVEL) * 2);
SPregen = Math.round(MAX_SP / 20);
dex_aspd_mod = 1 - Math.min(1, hero.DEX / 100);
active_skills = hero.ACTIVE_SKILLS;
aura_skills = hero.AURA_SKILLS;
body.arm_l.gotoAndStop((hero.GENDER + "_") + _local6);
body.arm_r.gotoAndStop((hero.GENDER + "_") + _local6);
body.hand_l.gotoAndStop((hero.GENDER + "_") + _local6);
body.hand_r.gotoAndStop((hero.GENDER + "_") + _local6);
body.footL.gotoAndStop((hero.GENDER + "_") + _local6);
body.footR.gotoAndStop((hero.GENDER + "_") + _local6);
body.legL.gotoAndStop((hero.GENDER + "_") + _local6);
body.legR.gotoAndStop((hero.GENDER + "_") + _local6);
body.body.gotoAndStop((hero.GENDER + "_") + _local6);
body.head.gotoAndStop((hero.GENDER + "_") + _local6);
if (hero.HORSE != null) {
isHorseman = true;
body.horse.gotoAndStop(hero.HORSE.skin_color);
body.morda.gotoAndStop(hero.HORSE.skin_color);
body.ftL1.gotoAndStop(hero.HORSE.skin_color);
body.ftR1.gotoAndStop(hero.HORSE.skin_color);
body.ftL2.gotoAndStop(hero.HORSE.skin_color);
body.ftR2.gotoAndStop(hero.HORSE.skin_color);
body.lgL1.gotoAndStop(hero.HORSE.skin_color);
body.lgR1.gotoAndStop(hero.HORSE.skin_color);
body.lgL2.gotoAndStop(hero.HORSE.skin_color);
body.lgR2.gotoAndStop(hero.HORSE.skin_color);
DEF = DEF + hero.HORSE.bonus_DEF;
speed = speed + hero.HORSE.bonus_speed;
MAX_HP = MAX_HP + hero.HORSE.bonus_HP;
DODGE = DODGE / 1.5;
MOVE_FRAMES = 890;
} else {
MOVE_FRAMES = 2115;
isHorseman = false;
}
if (hero.ARMOR != null) {
body.arm_l.armor._visible = true;
body.arm_r.armor._visible = true;
body.hand_l.armor._visible = true;
body.hand_r.armor._visible = true;
body.body.armor._visible = true;
body.arm_l.armor.gotoAndStop(hero.ARMOR.FRAME);
body.arm_r.armor.gotoAndStop(hero.ARMOR.FRAME);
body.hand_l.armor.gotoAndStop(hero.ARMOR.FRAME);
body.hand_r.armor.gotoAndStop(hero.ARMOR.FRAME);
body.body.armor.gotoAndStop(hero.ARMOR.FRAME);
DEF = DEF + hero.ARMOR.value;
MAX_HP = MAX_HP + hero.ARMOR.HP_mod;
MAX_SP = MAX_SP + hero.ARMOR.SP_mod;
} else {
body.arm_l.armor._visible = false;
body.arm_r.armor._visible = false;
body.hand_l.armor._visible = false;
body.hand_r.armor._visible = false;
body.body.armor._visible = false;
}
if (hero.HELMET != null) {
body.head.armor._visible = true;
body.head.armor.gotoAndStop(hero.HELMET.FRAME);
DEF = DEF + hero.HELMET.value;
} else {
body.head.armor._visible = false;
}
var _local8 = hero.WEAPON_PRI;
var _local7 = hero.WEAPON_SEC;
if (_local8 == null) {
_local8 = new WeaponClass("Fists", "All", 0);
}
if (_local7 == null) {
_local7 = new WeaponClass("Fists", "All", 0);
}
wpnPri = new Weapon(_local8, hero.SKILL[_local8.skill], hero.STR, hero.DEX);
wpnSec = new Weapon(_local7, hero.SKILL[_local7.skill], hero.STR, hero.DEX);
initFightingStyle();
switch (atkAnim) {
case "bow" :
case "crossbow" :
case "throwing" :
preferRanged = true;
break;
default :
preferRanged = false;
}
HP = MAX_HP;
SP = MAX_SP;
if (hero instanceof Unit) {
var _local5 = ((team == 0) ? (_global.MAIN_HERO) : (_global.EVIL_HERO));
if (_local5 != null) {
var _local4 = 0;
while (_local4 < _local5.PASSIVE_SKILLS.length) {
Skill.operatePassive(this, _local5.PASSIVE_SKILLS[_local4][0], _local5.PASSIVE_SKILLS[_local4][1]);
_local4++;
}
}
}
if (hero == _global.EVIL_HERO) {
speed = speed * 2;
}
}
function meleeHit(skill_id, useSecondWeapon, dmg_mod, skill_flag) {
if ((attacking == null) && (skill_id == 0)) {
return(undefined);
}
if (useSecondWeapon == undefined) {
useSecondWeapon = false;
}
if (skill_id == undefined) {
skill_id = 0;
}
if (dmg_mod == undefined) {
dmg_mod = 1;
}
if (skill_flag == undefined) {
skill_flag = 0;
}
if (skill_id != 0) {
if (!active_skills[atkAnim]) {
trace(((((unit_ref.NAME + " uses unavailable skill: ") + atkAnim) + " (") + skill_id) + ")");
return(undefined);
}
var _local3 = active_skills[atkAnim][skill_id - 1];
if (_local3 <= 0) {
trace((((((unit_ref.NAME + " uses skill (") + atkAnim) + "-") + skill_id) + ") of strange level:") + _local3);
return(undefined);
}
Skill.operate(true, this, attacking, useSecondWeapon, atkAnim, skill_id, _local3, skill_flag);
} else {
var _local5 = getDamageData(attacking, useSecondWeapon);
_local5.damage = _local5.damage * dmg_mod;
attacking.takeDamage(_local5, true);
}
}
function rangedHit(skill_id, useSecondWeapon, dmg_mod, skill_flag) {
if (useSecondWeapon == undefined) {
useSecondWeapon = false;
}
if (skill_id == undefined) {
skill_id = 0;
}
if (dmg_mod == undefined) {
dmg_mod = 1;
}
if (skill_flag == undefined) {
skill_flag = 0;
}
var _local5 = getDamageData(attacking, useSecondWeapon, dmg_mod);
if (skill_id != 0) {
if (!active_skills[atkAnim]) {
trace(((((unit_ref.NAME + " uses unavailable skill: ") + atkAnim) + " (") + skill_id) + ")");
return(undefined);
}
var _local4 = active_skills[atkAnim][skill_id - 1];
if (_local4 <= 0) {
trace((((((unit_ref.NAME + " uses skill (") + atkAnim) + "-") + skill_id) + ") of strange level:") + _local4);
return(undefined);
}
Skill.operate(false, this, attacking, useSecondWeapon, atkAnim, skill_id, _local4, skill_flag);
} else {
_local5 = getDamageData(attacking, useSecondWeapon);
_local5.damage = _local5.damage * dmg_mod;
addProjectile(attacking, getArrowErrorRatio(getHitChance(attacking, useSecondWeapon)), _local5);
}
}
function addProjectile(target, err, dmg_data, pierce) {
if (target == null) {
var _local5 = X - (10 * _root.znak(body._xscale));
var _local4 = Y;
} else {
var _local5 = target.X + _root.dd(err);
var _local4 = target.Y + _root.dd(err);
}
_root.addProjectile(X, Y, _local5, _local4, dmg_data, ((body._xscale > 0) ? 1 : -1), wpnPri.frame, team, pierce);
}
function canHitRanged(man, no_range_check) {
var _local8 = dist(man);
if (Math.abs((X - man.X) / (Y - man.Y)) >= _global.S_ANGLE) {
if ((_local8 <= wpnPri.rng) || (no_range_check)) {
var _local5 = _root.znak(man.X - X);
var _local7 = (X - man.X) / (Y - man.Y);
var _local4 = X + _local5;
while (_local4 != man.X) {
if (!_global.field[_local4][Y + Math.round(((_local4 - X) + _local5) / _local7)].free) {
return(false);
}
_local4 = _local4 + _local5;
}
return(true);
}
}
return(false);
}
function canHitMelee(man) {
return(((man.Y == Y) && (Math.abs(X - man.X) == 1)) || ((man.nextY == Y) && (Math.abs(X - man.nextX) == 1)));
}
function getNearestCreatureInSight(friend, no_range_check) {
var _local7 = null;
var _local6 = 10000;
var _local4 = 0;
while (_local4 < _global.HERO) {
if ((_root["hero" + _local4].HP > 0) && (friend == (_root["hero" + _local4].team == team))) {
if (canHitRanged(_root["hero" + _local4], no_range_check)) {
var _local5 = dist(_root["hero" + _local4]);
if (_local5 < _local6) {
_local7 = _root["hero" + _local4];
_local6 = _local5;
}
}
}
_local4++;
}
return(_local7);
}
function getCreaturesInSight(friend, amount) {
var _local5 = new Array();
var _local8 = 10000;
var _local4 = 0;
while (_local4 < _global.HERO) {
if ((_root["hero" + _local4].HP > 0) && (friend == (_root["hero" + _local4].team == team))) {
if (canHitRanged(_root["hero" + _local4])) {
_local5.push(_root["hero" + _local4]);
if (_local5.length == amount) {
return(_local5);
}
}
}
_local4++;
}
return(_local5);
}
function addStatus(newStatus) {
var _local2 = 0;
while (_local2 < statuses.length) {
if (statuses[_local2].TYPE == newStatus.TYPE) {
statuses[_local2].time_left = statuses[_local2].time_left + newStatus.time_left;
return(undefined);
}
_local2++;
}
newStatus.startStatus(this);
statuses.push(newStatus);
}
function operateStatuses() {
var _local2 = 0;
while (_local2 < statuses.length) {
statuses[_local2].duringStatus(this);
if (statuses[_local2].timePassed()) {
statuses[_local2].endStatus(this);
statuses.splice(_local2, 1);
_local2--;
}
_local2++;
}
}
function regenerateSP() {
SP = SP + SPregen;
if (SP > MAX_SP) {
SP = MAX_SP;
}
}
function healHP(heal_amount) {
if (HP <= 0) {
return(undefined);
}
heal_amount = Math.round(heal_amount);
attachMovie("HealAnim", "anim", 1);
addMessage(heal_amount, "FlyHeal");
if (HP >= MAX_HP) {
return(undefined);
}
HP = HP + heal_amount;
if (HP > MAX_HP) {
HP = MAX_HP;
}
redrawHealthBar();
}
function getAuraID(aura_name) {
var _local3 = 0;
while (_local3 < _global.AURAS.length) {
if ((_global.AURAS[_local3].TYPE == aura_name) && (_global.AURAS[_local3].caster.team == team)) {
return(_local3);
}
_local3++;
}
return(-1);
}
function startAura(aura_id) {
var _local4 = getAuraID(aura_skills[aura_id - 1][0]);
if (_local4 >= 0) {
return(false);
}
_global.AURAS.push(new Aura(aura_skills[aura_id - 1][0], aura_skills[aura_id - 1][1], this, aura_id));
return(true);
}
function endAura(aura_id) {
var _local3 = getAuraID(aura_skills[aura_id - 1][0]);
if ((_local3 >= 0) && (_global.AURAS[_local3].caster == this)) {
_global.AURAS.splice(_local3, 1);
return(true);
}
return(false);
}
}
Symbol 3134 MovieClip [__Packages.Weapon] Frame 0
class Weapon
{
var TYPE, dmg, rnd, rng, HIT, CRIT, c_type, aspd_bonus, frame, enchant;
function Weapon (wpn, skill_lv, str, dex) {
TYPE = ((wpn.rng > 0) ? "Ranged" : "Melee");
dmg = wpn.dmg + (wpn.REFINE * 3);
switch (TYPE) {
case "Melee" :
dmg + Math.floor(str / 2);
break;
case "Ranged" :
dmg + Math.floor(dex / 2);
}
rnd = Math.ceil(wpn.rnd * (1 + (0.1 * wpn.REFINE)));
rng = wpn.rng;
HIT = skill_lv;
CRIT = wpn.crit;
c_type = wpn.TYPE;
aspd_bonus = wpn.aspd_bonus;
frame = wpn.getFrame();
if (wpn.ENCH_ID != null) {
enchant = new Enchant(wpn.ENCH_ID);
}
}
function isTwohanded() {
return(WeaponClass.isTwohandedType(c_type));
}
function setDmgDataMods(target, dmg_data) {
if (enchant) {
enchant.operate(target, dmg_data);
}
}
}
Symbol 3135 MovieClip [__Packages.DamageData] Frame 0
class DamageData
{
var attacker, damage, hit, crit, statuses;
function DamageData (att, dam, ht, cri) {
attacker = att;
damage = dam;
hit = ht;
crit = cri;
statuses = new Array();
}
function addStatus(st, tl) {
statuses.push(new Status(st, tl));
}
function addDmgData(dmg_data) {
damage = damage + dmg_data.damage;
crit = (crit + dmg_data.crit) / 2;
hit = (hit + dmg_data.hit) / 2;
statuses.concat(dmg_data.statuses);
}
var arrow_error_ratio = 0;
}
Symbol 3136 MovieClip [__Packages.Status] Frame 0
class Status
{
var TYPE, time_left, initail_values;
function Status (tp, tl) {
TYPE = tp;
time_left = tl;
initail_values = new Array();
}
function startStatus(human) {
this[TYPE + "Start"](human);
}
function duringStatus(human) {
this[TYPE + "During"](human);
}
function endStatus(human) {
this[TYPE + "End"](human);
}
function timePassed() {
time_left--;
if (time_left <= 0) {
return(true);
}
return(false);
}
function StunStart(human) {
human.aspd_timer = time_left * 10;
human.onAnimComplete();
human.body.head.stun_anim._visible = true;
human.isSwitchingWeapons = true;
}
function StunEnd(human) {
human.aspd_timer = 0;
human.body.head.stun_anim._visible = false;
human.onAnimComplete();
}
function PoisonStart(human) {
var _local1 = new Color(human.body);
_local1.setTransform({rb:-40, gb:40, bb:-40});
}
function PoisonDuring(human) {
human.HP = human.HP - Math.round(human.MAX_HP / 20);
if (human.HP <= 0) {
human.HP = 1;
}
human.redrawHealthBar();
}
function PoisonEnd(human) {
var _local1 = new Color(human.body);
_local1.setTransform({rb:0, gb:0, bb:0});
}
function ChaosStart(human) {
initail_values.push(human.team);
human.team = _root.d(998) + 2;
human.attacking = null;
}
function ChaosEnd(human) {
human.team = Number(initail_values.pop());
}
function CharmStart(human) {
human.team = 1 - human.team;
human.attacking = null;
}
function CharmEnd(human) {
human.team = 1 - human.team;
human.attacking = null;
}
}
Symbol 3137 MovieClip [__Packages.Rune] Frame 0
class Rune extends Item
{
var ENCH_ID, TYPE, FRAME, getFrame, NAME, price, setRefine;
function Rune (rune_id, rf) {
super();
ENCH_ID = rune_id;
TYPE = "Rune";
FRAME = getFrame();
NAME = getRuneName(rune_id);
price = 100;
setRefine(rf);
}
static function getRuneName(rune_id) {
switch (rune_id) {
case "Footmans" :
return("Infantry Rune");
case "Riders" :
return("Chivalry Rune");
case "Critical" :
return("Critical Rune");
case "Bloody" :
return("Bloody Rune");
case "Ghost" :
return("Ghost Rune");
case "IcePick" :
return("Occult Rune");
case "Wolverine" :
return("Wolf Rune");
case "ofWeaken" :
return("Weak Rune");
case "ofPoison" :
return("Poisoned Rune");
case "Stunning" :
return("Stunning Rune");
case "Mad" :
return("Mad Rune");
case "Charming" :
return("Charming Rune");
}
}
static function getRuneDescription(rune_id) {
switch (rune_id) {
case "Footmans" :
return("Increase damage on horsemen by 30%");
case "Riders" :
return("Increase damage on all units without horses by 30%");
case "Critical" :
return("Increase critical strike chance by 10%");
case "Bloody" :
return("Attacks ignore enemy\u2019s armor defense.");
case "Ghost" :
return("Attacks ignore enemy\u2019s armor defense. But damage decreased by 30%");
case "IcePick" :
return("Very rare and powerful rune. It allows to deal more damage depending on target\u2019s armor defense. Te more defense has target, the more damage it will receive.");
case "Wolverine" :
return("Damage +15");
case "ofWeaken" :
return("If target has less than 50% of its max HP then damage + 50%, else damage -50%");
case "ofPoison" :
return("Adds 5% chance to poison enemy when attacking");
case "Stunning" :
return("Adds 5% chance to stun enemy when attacking");
case "Mad" :
return("Adds 5% chance to make mad enemy when attacking");
case "Charming" :
return("Adds 5% chance to charm enemy when attacking. Charmed enemies fight on your side and cannot be attacked by your teammates. Does not work on mad enemies. Charm status lasts 5 seconds.");
}
}
static function getRandomRune() {
var _local2 = _root.d(1000);
if (_local2 == 1) {
return(new Rune("IcePick"));
}
if (_local2 < 5) {
return(new Rune("Bloody"));
}
if (_local2 < 14) {
return(new Rune("Footmans"));
}
if (_local2 < 20) {
return(new Rune("Riders"));
}
if (_local2 < 25) {
return(new Rune("Critical"));
}
if (_local2 < 30) {
return(new Rune("Ghost"));
}
if (_local2 < 40) {
return(new Rune("ofWeaken"));
}
if (_local2 < 50) {
return(new Rune("ofPoison"));
}
if (_local2 < 60) {
return(new Rune("Stunning"));
}
if (_local2 < 70) {
return(new Rune("Mad"));
}
if (_local2 < 80) {
return(new Rune("Charming"));
}
if (_local2 < 100) {
return(new Rune("Wolverine"));
}
return(null);
}
}
Symbol 3138 MovieClip [__Packages.Skill] Frame 0
class Skill
{
function Skill () {
}
static function getSkillInfoByFrame(frame) {
switch (frame) {
case 1 :
return({nm:"shield", id:1});
case 2 :
return({nm:"shield", id:2});
case 3 :
return({nm:"shield", id:3});
case 4 :
return({nm:"2H_sword", id:1});
case 5 :
return({nm:"2H_sword", id:2});
case 6 :
return({nm:"2H_sword", id:3});
case 7 :
return({nm:"2H_axe", id:1});
case 8 :
return({nm:"2H_axe", id:2});
case 9 :
return({nm:"2H_axe", id:3});
case 10 :
return({nm:"dual", id:1});
case 11 :
return({nm:"dual", id:2});
case 12 :
return({nm:"dual", id:3});
case 13 :
return({nm:"spear", id:1});
case 14 :
return({nm:"spear", id:2});
case 15 :
return({nm:"spear", id:3});
case 16 :
return({nm:"dagger", id:1});
case 17 :
return({nm:"dagger", id:2});
case 18 :
return({nm:"dagger", id:3});
case 19 :
return({nm:"katana", id:1});
case 20 :
return({nm:"katana", id:2});
case 21 :
return({nm:"katana", id:3});
case 22 :
return({nm:"staff", id:1});
case 23 :
return({nm:"staff", id:2});
case 24 :
return({nm:"staff", id:3});
case 25 :
return({nm:"katar", id:1});
case 26 :
return({nm:"katar", id:2});
case 27 :
return({nm:"katar", id:3});
case 28 :
return({nm:"bow", id:1});
case 29 :
return({nm:"bow", id:2});
case 30 :
return({nm:"bow", id:3});
case 31 :
return({nm:"crossbow", id:1});
case 32 :
return({nm:"crossbow", id:2});
case 33 :
return({nm:"crossbow", id:3});
case 34 :
return({nm:"throwing", id:1});
case 35 :
return({nm:"throwing", id:2});
case 36 :
return({nm:"throwing", id:3});
case 37 :
return({nm:"Bowmen_1", id:0});
case 38 :
return({nm:"Bowmen_2", id:0});
case 39 :
return({nm:"Bowmen_3", id:0});
case 40 :
return({nm:"Infantry_1", id:0});
case 41 :
return({nm:"Infantry_2", id:0});
case 42 :
return({nm:"Infantry_3", id:0});
case 43 :
return({nm:"Horsemen_1", id:0});
case 44 :
return({nm:"Horsemen_2", id:0});
case 45 :
return({nm:"Horsemen_3", id:0});
case 46 :
return({nm:"Swordsmen_1", id:0});
case 47 :
return({nm:"Swordsmen_2", id:0});
case 48 :
return({nm:"Swordsmen_3", id:0});
case 49 :
return({nm:"Meditate", id:0});
case 50 :
return({nm:"FarEastWarTraining", id:0});
case 51 :
return({nm:"AssassinTraining", id:0});
case 52 :
return({nm:"BerserkerTraining", id:0});
case 53 :
return({nm:"KungFuSecrets", id:0});
case 54 :
return({nm:"FindWeakPoint", id:0});
case 60 :
return({nm:"Devotion", id:-1});
case 61 :
return({nm:"DivineHelp", id:-1});
case 62 :
return({nm:"Barrier", id:-1});
case 63 :
return({nm:"Sacrifice", id:-1});
case 64 :
return({nm:"ForceBalance", id:-1});
case 65 :
return({nm:"VenomCloud", id:-1});
case 66 :
return({nm:"HolyTribunal", id:-1});
case 67 :
return({nm:"UnholyBreath", id:-1});
case 68 :
return({nm:"LifeLeech", id:-1});
case 69 :
return({nm:"SoulDrain", id:-1});
case 70 :
return({nm:"Healing", id:-1});
case 71 :
return({nm:"BansheeCry", id:-1});
case 72 :
return({nm:"NationViz", id:-1});
case 73 :
return({nm:"NationGer", id:-1});
case 74 :
return({nm:"NationRus", id:-1});
case 75 :
return({nm:"NationJap", id:-1});
case 76 :
return({nm:"NationMon", id:-1});
case 77 :
return({nm:"NationAra", id:-1});
}
return(null);
}
static function getSkillName(skill_name, skill_id) {
switch (skill_name) {
case "shield" :
switch (skill_id) {
case 1 :
return("Shield Charge");
case 2 :
return("Triple Attack");
case 3 :
return("Guarded Attack");
switch (skill_id) {
case 1 :
return("Mighty blow");
case 2 :
return("Blast Wave");
case 3 :
return("Smashing Jump");
switch (skill_id) {
case 1 :
return("Stunning Hit");
case 2 :
return("Berserk Smash");
case 3 :
return("Mad Hit");
switch (skill_id) {
case 1 :
return("Bladestorm");
case 2 :
return("Salto");
case 3 :
return("Double Jump");
switch (skill_id) {
case 1 :
return("Pierce");
case 2 :
return("Fury of Blows");
case 3 :
return("Burning Spear");
switch (skill_id) {
case 1 :
return("Backstab");
case 2 :
return("Double Crit");
case 3 :
return("Dagger Boomerang");
switch (skill_id) {
case 1 :
return("Windy Strike");
case 2 :
return("Kick");
case 3 :
return("Guillotine Blade");
switch (skill_id) {
case 1 :
return("Fast Combo");
case 2 :
return("Light Pillar");
case 3 :
return("Thunder Assault");
switch (skill_id) {
case 1 :
return("Shadow Strike");
case 2 :
return("Crit Combo");
case 3 :
return("Meteor Strike");
switch (skill_id) {
case 1 :
return("Double Shot");
case 2 :
return("Quick Shooting");
case 3 :
return("Arrow Rain");
switch (skill_id) {
case 1 :
return("Stunning Shot");
case 2 :
return("Headshot");
case 3 :
return("Piercing Shot");
switch (skill_id) {
case 1 :
return("Multithrow");
case 2 :
return("Fast Throwing");
case 3 :
return("Ricochette");
return("[No skillname for fists]");
return("Marksmen Training");
return("Eagle Eyes");
return("Sharp Arrows");
return("Infantry Defense Mastery");
return("Infantry Offense Mastery");
return("Infantry Weapon Mastery");
return("Horsemen Riding Mastery");
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
}
}
}
}
}
}
}
}
}
case "2H_sword" :
switch (skill_id) {
case 1 :
return("Mighty blow");
case 2 :
return("Blast Wave");
case 3 :
return("Smashing Jump");
switch (skill_id) {
case 1 :
return("Stunning Hit");
case 2 :
return("Berserk Smash");
case 3 :
return("Mad Hit");
switch (skill_id) {
case 1 :
return("Bladestorm");
case 2 :
return("Salto");
case 3 :
return("Double Jump");
switch (skill_id) {
case 1 :
return("Pierce");
case 2 :
return("Fury of Blows");
case 3 :
return("Burning Spear");
switch (skill_id) {
case 1 :
return("Backstab");
case 2 :
return("Double Crit");
case 3 :
return("Dagger Boomerang");
switch (skill_id) {
case 1 :
return("Windy Strike");
case 2 :
return("Kick");
case 3 :
return("Guillotine Blade");
switch (skill_id) {
case 1 :
return("Fast Combo");
case 2 :
return("Light Pillar");
case 3 :
return("Thunder Assault");
switch (skill_id) {
case 1 :
return("Shadow Strike");
case 2 :
return("Crit Combo");
case 3 :
return("Meteor Strike");
switch (skill_id) {
case 1 :
return("Double Shot");
case 2 :
return("Quick Shooting");
case 3 :
return("Arrow Rain");
switch (skill_id) {
case 1 :
return("Stunning Shot");
case 2 :
return("Headshot");
case 3 :
return("Piercing Shot");
switch (skill_id) {
case 1 :
return("Multithrow");
case 2 :
return("Fast Throwing");
case 3 :
return("Ricochette");
return("[No skillname for fists]");
return("Marksmen Training");
return("Eagle Eyes");
return("Sharp Arrows");
return("Infantry Defense Mastery");
return("Infantry Offense Mastery");
return("Infantry Weapon Mastery");
return("Horsemen Riding Mastery");
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
}
}
}
}
}
}
}
}
case "2H_axe" :
switch (skill_id) {
case 1 :
return("Stunning Hit");
case 2 :
return("Berserk Smash");
case 3 :
return("Mad Hit");
switch (skill_id) {
case 1 :
return("Bladestorm");
case 2 :
return("Salto");
case 3 :
return("Double Jump");
switch (skill_id) {
case 1 :
return("Pierce");
case 2 :
return("Fury of Blows");
case 3 :
return("Burning Spear");
switch (skill_id) {
case 1 :
return("Backstab");
case 2 :
return("Double Crit");
case 3 :
return("Dagger Boomerang");
switch (skill_id) {
case 1 :
return("Windy Strike");
case 2 :
return("Kick");
case 3 :
return("Guillotine Blade");
switch (skill_id) {
case 1 :
return("Fast Combo");
case 2 :
return("Light Pillar");
case 3 :
return("Thunder Assault");
switch (skill_id) {
case 1 :
return("Shadow Strike");
case 2 :
return("Crit Combo");
case 3 :
return("Meteor Strike");
switch (skill_id) {
case 1 :
return("Double Shot");
case 2 :
return("Quick Shooting");
case 3 :
return("Arrow Rain");
switch (skill_id) {
case 1 :
return("Stunning Shot");
case 2 :
return("Headshot");
case 3 :
return("Piercing Shot");
switch (skill_id) {
case 1 :
return("Multithrow");
case 2 :
return("Fast Throwing");
case 3 :
return("Ricochette");
return("[No skillname for fists]");
return("Marksmen Training");
return("Eagle Eyes");
return("Sharp Arrows");
return("Infantry Defense Mastery");
return("Infantry Offense Mastery");
return("Infantry Weapon Mastery");
return("Horsemen Riding Mastery");
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
}
}
}
}
}
}
}
case "dual" :
switch (skill_id) {
case 1 :
return("Bladestorm");
case 2 :
return("Salto");
case 3 :
return("Double Jump");
switch (skill_id) {
case 1 :
return("Pierce");
case 2 :
return("Fury of Blows");
case 3 :
return("Burning Spear");
switch (skill_id) {
case 1 :
return("Backstab");
case 2 :
return("Double Crit");
case 3 :
return("Dagger Boomerang");
switch (skill_id) {
case 1 :
return("Windy Strike");
case 2 :
return("Kick");
case 3 :
return("Guillotine Blade");
switch (skill_id) {
case 1 :
return("Fast Combo");
case 2 :
return("Light Pillar");
case 3 :
return("Thunder Assault");
switch (skill_id) {
case 1 :
return("Shadow Strike");
case 2 :
return("Crit Combo");
case 3 :
return("Meteor Strike");
switch (skill_id) {
case 1 :
return("Double Shot");
case 2 :
return("Quick Shooting");
case 3 :
return("Arrow Rain");
switch (skill_id) {
case 1 :
return("Stunning Shot");
case 2 :
return("Headshot");
case 3 :
return("Piercing Shot");
switch (skill_id) {
case 1 :
return("Multithrow");
case 2 :
return("Fast Throwing");
case 3 :
return("Ricochette");
return("[No skillname for fists]");
return("Marksmen Training");
return("Eagle Eyes");
return("Sharp Arrows");
return("Infantry Defense Mastery");
return("Infantry Offense Mastery");
return("Infantry Weapon Mastery");
return("Horsemen Riding Mastery");
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
}
}
}
}
}
}
case "spear" :
switch (skill_id) {
case 1 :
return("Pierce");
case 2 :
return("Fury of Blows");
case 3 :
return("Burning Spear");
switch (skill_id) {
case 1 :
return("Backstab");
case 2 :
return("Double Crit");
case 3 :
return("Dagger Boomerang");
switch (skill_id) {
case 1 :
return("Windy Strike");
case 2 :
return("Kick");
case 3 :
return("Guillotine Blade");
switch (skill_id) {
case 1 :
return("Fast Combo");
case 2 :
return("Light Pillar");
case 3 :
return("Thunder Assault");
switch (skill_id) {
case 1 :
return("Shadow Strike");
case 2 :
return("Crit Combo");
case 3 :
return("Meteor Strike");
switch (skill_id) {
case 1 :
return("Double Shot");
case 2 :
return("Quick Shooting");
case 3 :
return("Arrow Rain");
switch (skill_id) {
case 1 :
return("Stunning Shot");
case 2 :
return("Headshot");
case 3 :
return("Piercing Shot");
switch (skill_id) {
case 1 :
return("Multithrow");
case 2 :
return("Fast Throwing");
case 3 :
return("Ricochette");
return("[No skillname for fists]");
return("Marksmen Training");
return("Eagle Eyes");
return("Sharp Arrows");
return("Infantry Defense Mastery");
return("Infantry Offense Mastery");
return("Infantry Weapon Mastery");
return("Horsemen Riding Mastery");
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
}
}
}
}
}
case "dagger" :
switch (skill_id) {
case 1 :
return("Backstab");
case 2 :
return("Double Crit");
case 3 :
return("Dagger Boomerang");
switch (skill_id) {
case 1 :
return("Windy Strike");
case 2 :
return("Kick");
case 3 :
return("Guillotine Blade");
switch (skill_id) {
case 1 :
return("Fast Combo");
case 2 :
return("Light Pillar");
case 3 :
return("Thunder Assault");
switch (skill_id) {
case 1 :
return("Shadow Strike");
case 2 :
return("Crit Combo");
case 3 :
return("Meteor Strike");
switch (skill_id) {
case 1 :
return("Double Shot");
case 2 :
return("Quick Shooting");
case 3 :
return("Arrow Rain");
switch (skill_id) {
case 1 :
return("Stunning Shot");
case 2 :
return("Headshot");
case 3 :
return("Piercing Shot");
switch (skill_id) {
case 1 :
return("Multithrow");
case 2 :
return("Fast Throwing");
case 3 :
return("Ricochette");
return("[No skillname for fists]");
return("Marksmen Training");
return("Eagle Eyes");
return("Sharp Arrows");
return("Infantry Defense Mastery");
return("Infantry Offense Mastery");
return("Infantry Weapon Mastery");
return("Horsemen Riding Mastery");
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
}
}
}
}
case "katana" :
switch (skill_id) {
case 1 :
return("Windy Strike");
case 2 :
return("Kick");
case 3 :
return("Guillotine Blade");
switch (skill_id) {
case 1 :
return("Fast Combo");
case 2 :
return("Light Pillar");
case 3 :
return("Thunder Assault");
switch (skill_id) {
case 1 :
return("Shadow Strike");
case 2 :
return("Crit Combo");
case 3 :
return("Meteor Strike");
switch (skill_id) {
case 1 :
return("Double Shot");
case 2 :
return("Quick Shooting");
case 3 :
return("Arrow Rain");
switch (skill_id) {
case 1 :
return("Stunning Shot");
case 2 :
return("Headshot");
case 3 :
return("Piercing Shot");
switch (skill_id) {
case 1 :
return("Multithrow");
case 2 :
return("Fast Throwing");
case 3 :
return("Ricochette");
return("[No skillname for fists]");
return("Marksmen Training");
return("Eagle Eyes");
return("Sharp Arrows");
return("Infantry Defense Mastery");
return("Infantry Offense Mastery");
return("Infantry Weapon Mastery");
return("Horsemen Riding Mastery");
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
}
}
}
case "staff" :
switch (skill_id) {
case 1 :
return("Fast Combo");
case 2 :
return("Light Pillar");
case 3 :
return("Thunder Assault");
switch (skill_id) {
case 1 :
return("Shadow Strike");
case 2 :
return("Crit Combo");
case 3 :
return("Meteor Strike");
switch (skill_id) {
case 1 :
return("Double Shot");
case 2 :
return("Quick Shooting");
case 3 :
return("Arrow Rain");
switch (skill_id) {
case 1 :
return("Stunning Shot");
case 2 :
return("Headshot");
case 3 :
return("Piercing Shot");
switch (skill_id) {
case 1 :
return("Multithrow");
case 2 :
return("Fast Throwing");
case 3 :
return("Ricochette");
return("[No skillname for fists]");
return("Marksmen Training");
return("Eagle Eyes");
return("Sharp Arrows");
return("Infantry Defense Mastery");
return("Infantry Offense Mastery");
return("Infantry Weapon Mastery");
return("Horsemen Riding Mastery");
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
}
}
case "katar" :
switch (skill_id) {
case 1 :
return("Shadow Strike");
case 2 :
return("Crit Combo");
case 3 :
return("Meteor Strike");
switch (skill_id) {
case 1 :
return("Double Shot");
case 2 :
return("Quick Shooting");
case 3 :
return("Arrow Rain");
switch (skill_id) {
case 1 :
return("Stunning Shot");
case 2 :
return("Headshot");
case 3 :
return("Piercing Shot");
switch (skill_id) {
case 1 :
return("Multithrow");
case 2 :
return("Fast Throwing");
case 3 :
return("Ricochette");
return("[No skillname for fists]");
return("Marksmen Training");
return("Eagle Eyes");
return("Sharp Arrows");
return("Infantry Defense Mastery");
return("Infantry Offense Mastery");
return("Infantry Weapon Mastery");
return("Horsemen Riding Mastery");
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
}
case "bow" :
switch (skill_id) {
case 1 :
return("Double Shot");
case 2 :
return("Quick Shooting");
case 3 :
return("Arrow Rain");
switch (skill_id) {
case 1 :
return("Stunning Shot");
case 2 :
return("Headshot");
case 3 :
return("Piercing Shot");
switch (skill_id) {
case 1 :
return("Multithrow");
case 2 :
return("Fast Throwing");
case 3 :
return("Ricochette");
return("[No skillname for fists]");
return("Marksmen Training");
return("Eagle Eyes");
return("Sharp Arrows");
return("Infantry Defense Mastery");
return("Infantry Offense Mastery");
return("Infantry Weapon Mastery");
return("Horsemen Riding Mastery");
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
case "crossbow" :
switch (skill_id) {
case 1 :
return("Stunning Shot");
case 2 :
return("Headshot");
case 3 :
return("Piercing Shot");
switch (skill_id) {
case 1 :
return("Multithrow");
case 2 :
return("Fast Throwing");
case 3 :
return("Ricochette");
return("[No skillname for fists]");
return("Marksmen Training");
return("Eagle Eyes");
return("Sharp Arrows");
return("Infantry Defense Mastery");
return("Infantry Offense Mastery");
return("Infantry Weapon Mastery");
return("Horsemen Riding Mastery");
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
case "throwing" :
switch (skill_id) {
case 1 :
return("Multithrow");
case 2 :
return("Fast Throwing");
case 3 :
return("Ricochette");
return("[No skillname for fists]");
return("Marksmen Training");
return("Eagle Eyes");
return("Sharp Arrows");
return("Infantry Defense Mastery");
return("Infantry Offense Mastery");
return("Infantry Weapon Mastery");
return("Horsemen Riding Mastery");
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
case "fists" :
return("[No skillname for fists]");
case "Bowmen_1" :
return("Marksmen Training");
case "Bowmen_2" :
return("Eagle Eyes");
case "Bowmen_3" :
return("Sharp Arrows");
case "Infantry_1" :
return("Infantry Defense Mastery");
case "Infantry_2" :
return("Infantry Offense Mastery");
case "Infantry_3" :
return("Infantry Weapon Mastery");
case "Horsemen_1" :
return("Horsemen Riding Mastery");
case "Horsemen_2" :
return("Horsemen Defense Mastery");
case "Horsemen_3" :
return("Horsemen Battle Mastery");
case "Swordsmen_1" :
return("Footmen Defense Mastery");
case "Swordsmen_2" :
return("Footmen Offense Mastery");
case "Swordsmen_3" :
return("Footmen Weapon Mastery");
case "Meditate" :
return("Meditation");
case "FarEastWarTraining" :
return("Far East War Arts");
case "AssassinTraining" :
return("Assassination Mastery");
case "BerserkerTraining" :
return("Berserkers' Fury");
case "KungFuSecrets" :
return("Kung-Fu Secrets");
case "FindWeakPoint" :
return("Find Weak Point");
}
return(("No such skill for " + skill_name) + skill_id);
}
static function getSkilltypeDescr(skill_name) {
switch (skill_name) {
case "shield" :
return("One handed weapon & shield moves");
case "2H_sword" :
return("Two handed sword moves");
case "2H_axe" :
return("Two handed mace and axe moves");
case "dual" :
return("Dual weapons moves");
case "spear" :
return("Spear moves");
case "dagger" :
return("Dagger moves");
case "katana" :
return("Katana moves");
case "staff" :
return("Staff moves");
case "katar" :
return("Katar moves");
case "bow" :
return("Bow moves");
case "crossbow" :
return("Crossbow moves");
case "throwing" :
return("Throwing weapons moves");
}
return("[no such skill type]");
}
static function getCostSP(atk_anim, skill_id) {
switch (atk_anim) {
case "shield" :
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(20);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(25);
case 3 :
return(35);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(20);
case 3 :
return(35);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(25);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(12);
case 2 :
return(17);
case 3 :
return(40);
switch (skill_id) {
case 1 :
return(35);
case 2 :
return(20);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(20);
case 3 :
return(100);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(25);
switch (skill_id) {
case 1 :
return(10);
case 2 :
return(21);
case 3 :
return(40);
switch (skill_id) {
case 1 :
return(18);
case 2 :
return(24);
case 3 :
return(28);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(25);
case 3 :
return(30);
return(0);
}
}
}
}
}
}
}
}
}
}
}
}
case "2H_sword" :
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(25);
case 3 :
return(35);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(20);
case 3 :
return(35);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(25);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(12);
case 2 :
return(17);
case 3 :
return(40);
switch (skill_id) {
case 1 :
return(35);
case 2 :
return(20);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(20);
case 3 :
return(100);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(25);
switch (skill_id) {
case 1 :
return(10);
case 2 :
return(21);
case 3 :
return(40);
switch (skill_id) {
case 1 :
return(18);
case 2 :
return(24);
case 3 :
return(28);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(25);
case 3 :
return(30);
return(0);
}
}
}
}
}
}
}
}
}
}
}
case "2H_axe" :
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(20);
case 3 :
return(35);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(25);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(12);
case 2 :
return(17);
case 3 :
return(40);
switch (skill_id) {
case 1 :
return(35);
case 2 :
return(20);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(20);
case 3 :
return(100);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(25);
switch (skill_id) {
case 1 :
return(10);
case 2 :
return(21);
case 3 :
return(40);
switch (skill_id) {
case 1 :
return(18);
case 2 :
return(24);
case 3 :
return(28);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(25);
case 3 :
return(30);
return(0);
}
}
}
}
}
}
}
}
}
}
case "dual" :
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(25);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(12);
case 2 :
return(17);
case 3 :
return(40);
switch (skill_id) {
case 1 :
return(35);
case 2 :
return(20);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(20);
case 3 :
return(100);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(25);
switch (skill_id) {
case 1 :
return(10);
case 2 :
return(21);
case 3 :
return(40);
switch (skill_id) {
case 1 :
return(18);
case 2 :
return(24);
case 3 :
return(28);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(25);
case 3 :
return(30);
return(0);
}
}
}
}
}
}
}
}
}
case "spear" :
switch (skill_id) {
case 1 :
return(12);
case 2 :
return(17);
case 3 :
return(40);
switch (skill_id) {
case 1 :
return(35);
case 2 :
return(20);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(20);
case 3 :
return(100);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(25);
switch (skill_id) {
case 1 :
return(10);
case 2 :
return(21);
case 3 :
return(40);
switch (skill_id) {
case 1 :
return(18);
case 2 :
return(24);
case 3 :
return(28);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(25);
case 3 :
return(30);
return(0);
}
}
}
}
}
}
}
}
case "dagger" :
switch (skill_id) {
case 1 :
return(35);
case 2 :
return(20);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(20);
case 3 :
return(100);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(25);
switch (skill_id) {
case 1 :
return(10);
case 2 :
return(21);
case 3 :
return(40);
switch (skill_id) {
case 1 :
return(18);
case 2 :
return(24);
case 3 :
return(28);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(25);
case 3 :
return(30);
return(0);
}
}
}
}
}
}
}
case "katana" :
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(20);
case 3 :
return(100);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(25);
switch (skill_id) {
case 1 :
return(10);
case 2 :
return(21);
case 3 :
return(40);
switch (skill_id) {
case 1 :
return(18);
case 2 :
return(24);
case 3 :
return(28);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(25);
case 3 :
return(30);
return(0);
}
}
}
}
}
}
case "staff" :
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(25);
switch (skill_id) {
case 1 :
return(10);
case 2 :
return(21);
case 3 :
return(40);
switch (skill_id) {
case 1 :
return(18);
case 2 :
return(24);
case 3 :
return(28);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(25);
case 3 :
return(30);
return(0);
}
}
}
}
}
case "katar" :
switch (skill_id) {
case 1 :
return(10);
case 2 :
return(21);
case 3 :
return(40);
switch (skill_id) {
case 1 :
return(18);
case 2 :
return(24);
case 3 :
return(28);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(25);
case 3 :
return(30);
return(0);
}
}
}
}
case "bow" :
switch (skill_id) {
case 1 :
return(18);
case 2 :
return(24);
case 3 :
return(28);
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(25);
case 3 :
return(30);
return(0);
}
}
}
case "crossbow" :
switch (skill_id) {
case 1 :
return(15);
case 2 :
return(25);
case 3 :
return(30);
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(25);
case 3 :
return(30);
return(0);
}
}
case "throwing" :
switch (skill_id) {
case 1 :
return(20);
case 2 :
return(25);
case 3 :
return(30);
return(0);
}
case "fists" :
return(0);
}
trace((("Attempt to get SP cost of skill which does not exist: " + atk_anim) + "-") + skill_id);
return(0);
}
static function getActiveSkillFrame(atk_anim, skill_id) {
switch (atk_anim) {
case "shield" :
return(skill_id);
case "2H_sword" :
return(3 + skill_id);
case "2H_axe" :
return(6 + skill_id);
case "dual" :
return(9 + skill_id);
case "spear" :
return(12 + skill_id);
case "dagger" :
return(15 + skill_id);
case "katana" :
return(18 + skill_id);
case "staff" :
return(21 + skill_id);
case "katar" :
return(24 + skill_id);
case "bow" :
return(27 + skill_id);
case "crossbow" :
return(30 + skill_id);
case "throwing" :
return(33 + skill_id);
case "fists" :
return(0);
}
return(("No such skill for " + atk_anim) + skill_id);
}
static function getPassiveSkillFrame(skill_name) {
var _local1 = 37;
switch (skill_name) {
case "Bowmen_1" :
return(_local1);
case "Bowmen_2" :
return(_local1 + 1);
case "Bowmen_3" :
return(_local1 + 2);
case "Infantry_1" :
return(_local1 + 3);
case "Infantry_2" :
return(_local1 + 4);
case "Infantry_3" :
return(_local1 + 5);
case "Horsemen_1" :
return(_local1 + 6);
case "Horsemen_2" :
return(_local1 + 7);
case "Horsemen_3" :
return(_local1 + 8);
case "Swordsmen_1" :
return(_local1 + 9);
case "Swordsmen_2" :
return(_local1 + 10);
case "Swordsmen_3" :
return(_local1 + 11);
case "Meditate" :
return(_local1 + 12);
case "FarEastWarTraining" :
return(_local1 + 13);
case "AssassinTraining" :
return(_local1 + 14);
case "BerserkerTraining" :
return(_local1 + 15);
case "KungFuSecrets" :
return(_local1 + 16);
case "FindWeakPoint" :
return(_local1 + 17);
}
}
static function getSkillRequire(skill_name, skill_id) {
if (skill_id <= 1) {
return(0);
}
switch (skill_name) {
case "shield" :
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(4);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(4);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(5);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(2);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
return(0);
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
}
}
}
}
}
}
}
}
}
case "2H_sword" :
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(4);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(4);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(5);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(2);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
return(0);
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
}
}
}
}
}
}
}
}
case "2H_axe" :
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(4);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(5);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(2);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
return(0);
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
}
}
}
}
}
}
}
case "dual" :
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(5);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(2);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
return(0);
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
}
}
}
}
}
}
case "spear" :
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(5);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(2);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
return(0);
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
}
}
}
}
}
case "dagger" :
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(5);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(2);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
return(0);
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
}
}
}
}
case "katana" :
switch (skill_id) {
case 2 :
return(5);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(2);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
return(0);
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
}
}
}
case "staff" :
switch (skill_id) {
case 2 :
return(2);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
return(0);
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
}
}
case "katar" :
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
return(0);
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
}
case "bow" :
switch (skill_id) {
case 2 :
return(3);
case 3 :
return(3);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
return(0);
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
}
case "crossbow" :
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
return(0);
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
}
case "throwing" :
switch (skill_id) {
case 2 :
return(1);
case 3 :
return(5);
return(0);
return("Horsemen Defense Mastery");
return("Horsemen Battle Mastery");
return("Footmen Defense Mastery");
return("Footmen Offense Mastery");
return("Footmen Weapon Mastery");
return("Meditation");
return("Far East War Arts");
return("Assassination Mastery");
return("Berserkers' Fury");
return("Kung-Fu Secrets");
return("Find Weak Point");
}
case "fists" :
return(0);
case "Bowmen_1" :
case "Bowmen_2" :
case "Bowmen_3" :
case "Infantry_1" :
case "Infantry_2" :
case "Infantry_3" :
case "Horsemen_1" :
case "Horsemen_2" :
return("Horsemen Defense Mastery");
case "Horsemen_3" :
return("Horsemen Battle Mastery");
case "Swordsmen_1" :
return("Footmen Defense Mastery");
case "Swordsmen_2" :
return("Footmen Offense Mastery");
case "Swordsmen_3" :
return("Footmen Weapon Mastery");
case "Meditate" :
return("Meditation");
case "FarEastWarTraining" :
return("Far East War Arts");
case "AssassinTraining" :
return("Assassination Mastery");
case "BerserkerTraining" :
return("Berserkers' Fury");
case "KungFuSecrets" :
return("Kung-Fu Secrets");
case "FindWeakPoint" :
return("Find Weak Point");
}
return(("No such skill for " + skill_name) + skill_id);
}
static function operate(is_melee, att, target, useSecondWeapon, atk_anim, skill_id, skill_lv, skill_flag) {
var _local1 = att.getDamageData(target, useSecondWeapon);
if (Skill[(("active_" + atk_anim) + "_") + skill_id](att, target, _local1, skill_lv, skill_flag)) {
if (is_melee) {
target.takeDamage(_local1, true);
} else {
att.addProjectile(target, Creature.getArrowErrorRatio(_local1.hit), _local1);
}
}
}
static function operatePassive(man, skill_name, skill_lv) {
Skill["passive_" + skill_name](man, skill_lv);
}
static function active_shield_1(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.crit = 0;
if (_root.percent(att.SHIELD_DODGE + (2 * skill_lv))) {
dmg_data.addStatus("Stun", 3);
}
dmg_data.damage = ((att.unit_ref.STR + (att.SHIELD_DODGE * 2)) * skill_lv) / 2;
return(true);
}
static function active_shield_2(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (0.5 + (0.1 * skill_lv));
return(true);
}
static function active_shield_3(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (0.4 + (0.1 * skill_lv));
return(true);
}
static function active_2H_sword_1(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (1.5 + (0.2 * skill_lv));
return(true);
}
static function active_2H_sword_2(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (1 + (0.2 * skill_lv));
dmg_data.hit = 10000;
var _local5 = ((att.body._xscale > 0) ? 1 : -1);
var _local2 = 1;
while (_local2 <= 3) {
_global.field[att.X - (_local2 * _local5)][att.Y].who.takeDamage(dmg_data, null);
_local2++;
}
return(false);
}
static function active_2H_sword_3(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (1 + (0.4 * skill_lv));
dmg_data.hit = 10000;
var _local4 = -1;
while (_local4 <= 1) {
var _local3 = -1;
while (_local3 <= 1) {
_global.field[att.X + _local4][att.Y + _local3].who.takeDamage(dmg_data, null);
_local3++;
}
_local4++;
}
_root.addBlow(att.X, att.Y, "3x3");
return(false);
}
static function active_2H_axe_1(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (0.5 + (0.1 * skill_lv));
if (_root.percent(30 + (3 * skill_lv))) {
dmg_data.addStatus("Stun", 3);
}
return(true);
}
static function active_2H_axe_2(att, target, dmg_data, skill_lv, skill_flag) {
var _local7 = new DamageData(att, dmg_data.damage * 0.1, 100, 0);
if (_root.percent(2 * skill_lv)) {
dmg_data.addStatus("Stun", 3);
_local7.addStatus("Stun", 3);
}
if (target) {
var _local9 = target.X;
var _local8 = target.Y;
} else {
var _local9 = att.X + ((att.body._xscale > 0) ? 1 : -1);
var _local8 = att.Y;
}
var _local5 = -1;
while (_local5 <= 1) {
var _local3 = -1;
while (_local3 <= 1) {
var _local4 = _global.field[_local9 + _local5][_local8 + _local3].who;
if ((_local4 != att) && (_local4 != target)) {
_local4.takeDamage(_local7, null);
}
_local3++;
}
_local5++;
}
dmg_data.damage = dmg_data.damage * (2 + (0.4 * skill_lv));
dmg_data.crit = 100;
_root.addBlow(_local9, _local8, "3x3");
return(true);
}
static function active_2H_axe_3(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (1.5 + (0.4 * skill_lv));
dmg_data.crit = 0;
dmg_data.hit = 10000;
if (target) {
var _local7 = target.X;
var _local6 = target.Y;
} else {
var _local7 = att.X + ((att.body._xscale > 0) ? 1 : -1);
var _local6 = att.Y;
}
var _local5 = -1;
while (_local5 <= 1) {
var _local3 = -1;
while (_local3 <= 1) {
var _local4 = _global.field[_local7 + _local5][_local6 + _local3].who;
if (_local4 != att) {
_local4.takeDamage(dmg_data, null);
}
_local3++;
}
_local5++;
}
_root.addBlow(_local7, _local6, "3x3");
return(false);
}
static function active_dual_1(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (0.4 + (0.1 * skill_lv));
return(true);
}
static function active_dual_2(att, target, dmg_data, skill_lv, skill_flag) {
var _local4 = att.getDamageData(target, true);
dmg_data.damage = dmg_data.damage * (1 + (0.2 * skill_lv));
dmg_data.crit = dmg_data.crit * (1 + (0.1 * skill_lv));
_local4.damage = _local4.damage * (1 + (0.2 * skill_lv));
_local4.crit = _local4.crit * (1 + (0.1 * skill_lv));
var _local6 = -_root.znak(att.body._xscale);
_global.field[target.X + _local6][target.Y].who.takeDamage(dmg_data, null);
_global.field[target.X - _local6][target.Y].who.takeDamage(_local4, null);
return(false);
}
static function active_dual_3(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.addDmgData(att.getDamageData(target, true));
dmg_data.damage = dmg_data.damage * (1 + (0.3 * skill_lv));
dmg_data.crit = 50;
return(true);
}
static function active_spear_1(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (1 + (0.1 * skill_lv));
dmg_data.crit = 100;
return(true);
}
static function active_spear_2(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (0.75 + (0.15 * skill_lv));
dmg_data.crit = dmg_data.crit / 3;
return(true);
}
static function active_spear_3(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (2 + (0.4 * skill_lv));
dmg_data.crit = 0;
dmg_data.hit = 10000;
var _local6 = -_root.znak(att.body._xscale);
_global.field[target.X + _local6][target.Y].who.takeDamage(dmg_data, null);
var _local3 = -1;
while (_local3 <= 1) {
_global.field[target.X + (_local6 * 2)][target.Y + _local3].who.takeDamage(dmg_data, null);
_local3++;
}
_local3 = -2;
while (_local3 <= 2) {
_global.field[target.X + (_local6 * 3)][target.Y + _local3].who.takeDamage(dmg_data, null);
_local3++;
}
return(false);
}
static function active_dagger_1(att, target, dmg_data, skill_lv, skill_flag) {
if (_root.znak(att.body._xscale) != _root.znak(target.body._xscale)) {
dmg_data.damage = dmg_data.damage / 2;
dmg_data.crit = 0;
return(true);
}
dmg_data.hit = 100;
var _local4 = (0.4 + (0.1 * skill_lv)) * dmg_data.crit;
if (_root.percent(_local4)) {
target.addMessage(target.MAX_HP, "FlyDamage");
target.die();
return(false);
}
dmg_data.damage = dmg_data.damage * (3 + skill_lv);
dmg_data.crit = 0;
return(true);
}
static function active_dagger_2(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (0.75 + (0.15 * skill_lv));
dmg_data.crit = 100;
return(true);
}
static function active_dagger_3(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.crit = 0;
switch (skill_flag) {
case 1 :
dmg_data.damage = dmg_data.damage * (0.5 + (0.1 * skill_lv));
return(true);
case 2 :
dmg_data.damage = dmg_data.damage * (0.5 + (0.2 * skill_lv));
dmg_data.hit = 10000;
var _local4 = -2;
while (_local4 <= 2) {
var _local3 = -2;
while (_local3 <= 2) {
var _local5 = _global.field[att.X + _local4][att.Y + _local3].who;
_local5.takeDamage(dmg_data, null);
_local3++;
}
_local4++;
}
_root.addBlow(att.X, att.Y, "5x5");
return(false);
}
trace("Strange skill flag in Dagger-3 skill:" + skill_flag);
return(true);
}
static function active_katana_1(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (1.5 + (0.2 * skill_lv));
dmg_data.crit = dmg_data.crit * (1 + (0.2 * skill_lv));
return(true);
}
static function active_katana_2(att, target, dmg_data, skill_lv, skill_flag) {
switch (skill_flag) {
case 1 :
dmg_data.damage = (att.unit_ref.STR * skill_lv) / 2;
dmg_data.crit = 0;
target.aspd_timer = target.aspd_timer + 30;
return(true);
case 2 :
dmg_data.damage = dmg_data.damage * (1 + (0.3 * skill_lv));
return(true);
}
trace("Strange skill flag in Katana-2 skill:" + skill_flag);
return(true);
}
static function active_katana_3(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.hit = 10000;
dmg_data.crit = 100;
dmg_data.damage = dmg_data.damage + att.SP;
att.SP = 0;
dmg_data.damage = dmg_data.damage * (target.DEF / (8 - skill_lv));
return(true);
}
static function active_staff_1(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (1 + (0.2 * skill_lv));
if (_root.percent(2 * skill_lv)) {
dmg_data.addStatus("Stun", 3);
}
return(true);
}
static function active_staff_2(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (0.5 + (0.1 * skill_lv));
dmg_data.crit = 100;
dmg_data.hit = 10000;
var _local4 = -3;
while (_local4 <= 3) {
var _local3 = -3;
while (_local3 <= 3) {
var _local5 = _global.field[att.X + _local4][att.Y + _local3].who;
_local5.takeDamage(dmg_data, null);
_local3++;
}
_local4++;
}
_root.addBlow(att.X, att.Y, "5x5");
return(false);
}
static function active_staff_3(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.crit = 0;
dmg_data.damage = dmg_data.damage * (0.5 + (0.1 * skill_lv));
return(true);
}
static function active_katar_1(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (2 + (0.3 * skill_lv));
if (_root.percent(dmg_data.crit)) {
dmg_data.addStatus("Poison", 5);
}
return(true);
}
static function active_katar_2(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.crit = 100;
dmg_data.damage = dmg_data.damage * (1 + (0.1 * skill_lv));
return(true);
}
static function active_katar_3(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.crit = 0;
dmg_data.damage = dmg_data.damage * (2 + (0.4 * skill_lv));
dmg_data.hit = 10000;
var _local4 = -2;
while (_local4 <= 2) {
var _local3 = -2;
while (_local3 <= 2) {
var _local5 = _global.field[att.X + _local4][att.Y + _local3].who;
_local5.takeDamage(dmg_data, null);
_local3++;
}
_local4++;
}
_root.addBlow(att.X, att.Y, "5x5");
return(false);
}
static function active_bow_1(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (1.2 + (0.2 * skill_lv));
return(true);
}
static function active_bow_2(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (0.5 + (0.2 * skill_lv));
return(true);
}
static function active_bow_3(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (0.5 + (0.1 * skill_lv));
var _local3 = -1;
while (_local3 <= 1) {
var _local2 = -1;
while (_local2 <= 1) {
_root.addArrowShower(target.X + _local3, target.Y + _local2, dmg_data);
_local2++;
}
_local3++;
}
return(false);
}
static function active_crossbow_1(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (1.5 + (0.1 * skill_lv));
dmg_data.crit = 0;
if (_root.percent(10 * skill_lv)) {
dmg_data.addStatus("Stun", 3);
}
return(true);
}
static function active_crossbow_2(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (2.2 + (0.2 * skill_lv));
dmg_data.crit = 100;
return(true);
}
static function active_crossbow_3(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (1.6 + (0.2 * skill_lv));
dmg_data.crit = 100;
att.addProjectile(target, Creature.getArrowErrorRatio(dmg_data.hit), dmg_data, 3);
return(false);
}
static function active_throwing_1(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (0.9 + (0.1 * skill_lv));
var _local2 = att.getCreaturesInSight(false, 3);
var _local1 = 0;
while (_local1 < _local2.length) {
att.addProjectile(_local2[_local1], Creature.getArrowErrorRatio(dmg_data.hit), dmg_data);
_local1++;
}
return(false);
}
static function active_throwing_2(att, target, dmg_data, skill_lv, skill_flag) {
dmg_data.damage = dmg_data.damage * (0.5 + (0.1 * skill_lv));
return(true);
}
static function active_throwing_3(att, target, dmg_data, skill_lv, skill_flag) {
att.addProjectile(target, Creature.getArrowErrorRatio(dmg_data.hit), dmg_data, skill_lv);
return(false);
}
static function passive_Bowmen_1(man, skill_lv) {
switch ("Ranged") {
case man.wpnPri.TYPE :
var _local2 = man.wpnPri;
break;
case man.wpnSec.TYPE :
_local2 = man.wpnSec;
break;
default :
return(undefined);
}
_local2.HIT = _local2.HIT + (skill_lv * 3);
}
static function passive_Bowmen_2(man, skill_lv) {
switch ("Ranged") {
case man.wpnPri.TYPE :
var _local2 = man.wpnPri;
break;
case man.wpnSec.TYPE :
_local2 = man.wpnSec;
break;
default :
return(undefined);
}
_local2.CRIT = _local2.CRIT + (skill_lv * 2);
_local2.rng = _local2.rng + skill_lv;
}
static function passive_Bowmen_3(man, skill_lv) {
switch ("Ranged") {
case man.wpnPri.TYPE :
var _local1 = man.wpnPri;
break;
case man.wpnSec.TYPE :
_local1 = man.wpnSec;
break;
default :
return(undefined);
}
_local1.dmg = _local1.dmg + Math.round((_local1.dmg * skill_lv) * 0.04);
_local1.rnd = _local1.rnd + Math.round((_local1.rnd * skill_lv) * 0.04);
}
static function passive_Infantry_1(man, skill_lv) {
if (!man.isHorseman) {
man.MAX_HP = man.MAX_HP + (5 * skill_lv);
man.HP = man.MAX_HP;
man.DEF = man.DEF + skill_lv;
}
}
static function passive_Infantry_2(man, skill_lv) {
if (!man.isHorseman) {
man.wpnPri.dmg = man.wpnPri.dmg + Math.round((man.wpnPri.dmg * skill_lv) * 0.02);
man.wpnPri.rnd = man.wpnPri.rnd + Math.round((man.wpnPri.rnd * skill_lv) * 0.02);
}
}
static function passive_Infantry_3(man, skill_lv) {
if (!man.isHorseman) {
man.wpnPri.HIT = man.wpnPri.HIT + skill_lv;
man.DODGE = man.DODGE + skill_lv;
}
}
static function passive_Horsemen_1(man, skill_lv) {
if (man.isHorseman) {
man.speed = man.speed + (skill_lv / 2);
man.DODGE = man.DODGE + (skill_lv * 2);
}
}
static function passive_Horsemen_2(man, skill_lv) {
if (man.isHorseman) {
man.DEF = man.DEF + (3 * skill_lv);
man.MAX_HP = man.MAX_HP + (10 * skill_lv);
man.HP = man.MAX_HP;
if (man.SHIELD_DODGE > 0) {
man.SHIELD_DODGE = man.SHIELD_DODGE + skill_lv;
}
}
}
static function passive_Horsemen_3(man, skill_lv) {
if (man.isHorseman) {
man.wpnPri.HIT = man.wpnPri.HIT + (skill_lv * 3);
man.wpnPri.dmg = man.wpnPri.dmg + Math.round((man.wpnPri.dmg * skill_lv) * 0.03);
man.wpnPri.rnd = man.wpnPri.rnd + Math.round((man.wpnPri.rnd * skill_lv) * 0.03);
}
}
static function passive_Swordsmen_1(man, skill_lv) {
if (man.atkAnim == "shield") {
man.MAX_HP = man.MAX_HP + (10 * skill_lv);
man.HP = man.MAX_HP;
man.SHIELD_DODGE = man.SHIELD_DODGE + (skill_lv * 2);
}
}
static function passive_Swordsmen_2(man, skill_lv) {
if (man.atkAnim == "shield") {
man.wpnPri.dmg = man.wpnPri.dmg + Math.round((man.wpnPri.dmg * skill_lv) * 0.04);
man.wpnPri.rnd = man.wpnPri.rnd + Math.round((man.wpnPri.rnd * skill_lv) * 0.04);
}
}
static function passive_Swordsmen_3(man, skill_lv) {
if (man.atkAnim == "shield") {
man.wpnPri.HIT = man.wpnPri.HIT + (skill_lv * 2);
man.DODGE = man.DODGE + (skill_lv * 3);
}
}
static function passive_Meditate(man, skill_lv) {
if (man.unit_ref.NATION == "Jap") {
man.MAX_SP = man.MAX_SP + (10 * skill_lv);
man.SP = man.MAX_SP;
man.SPregen = man.SPregen * (1 + (0.2 * skill_lv));
}
}
static function passive_FarEastWarTraining(man, skill_lv) {
if ((man.atkAnim == "katana") || (man.atkAnim == "staff")) {
man.wpnPri.dmg = man.wpnPri.dmg + Math.round((man.wpnPri.dmg * skill_lv) * 0.03);
man.wpnPri.rnd = man.wpnPri.rnd + Math.round((man.wpnPri.rnd * skill_lv) * 0.03);
man.wpnPri.HIT = man.wpnPri.HIT + (skill_lv * 2);
}
}
static function passive_AssassinTraining(man, skill_lv) {
if ((man.atkAnim == "katar") || (man.atkAnim == "dagger")) {
man.wpnPri.dmg = man.wpnPri.dmg + Math.round((man.wpnPri.dmg * skill_lv) * 0.02);
man.wpnPri.rnd = man.wpnPri.rnd + Math.round((man.wpnPri.rnd * skill_lv) * 0.02);
man.DODGE = man.DODGE + (skill_lv * 4);
man.speed = man.speed + (skill_lv / 2);
}
}
static function passive_BerserkerTraining(man, skill_lv) {
if (man.atkAnim == "2H_axe") {
man.speed = man.speed + (skill_lv / 3);
man.DODGE = man.DODGE + skill_lv;
man.wpnPri.dmg = man.wpnPri.dmg + Math.round((man.wpnPri.dmg * skill_lv) * 0.02);
man.wpnPri.rnd = man.wpnPri.rnd + Math.round((man.wpnPri.rnd * skill_lv) * 0.02);
}
}
static function passive_KungFuSecrets(man, skill_lv) {
if (man.atkAnim == "fists") {
man.wpnPri.dmg = man.wpnPri.dmg + (10 * skill_lv);
man.wpnPri.HIT = man.wpnPri.HIT + (skill_lv * 6);
man.wpnPri.CRIT = man.wpnPri.CRIT + (skill_lv * 10);
man.DODGE = man.DODGE + (skill_lv * 5);
man.MAX_HP = man.MAX_HP + (30 * skill_lv);
man.HP = man.MAX_HP;
}
}
static function passive_FindWeakPoint(man, skill_lv) {
if (man.atkAnim == "katar") {
man.wpnPri.HIT = man.wpnPri.HIT + (skill_lv * 4);
man.wpnPri.CRIT = man.wpnPri.CRIT + (skill_lv * 6);
}
}
static function getSkillDescription(skill_name, skill_id) {
switch (skill_name) {
case "shield" :
switch (skill_id) {
case 1 :
return("Hit an enemy with your shield. The damage depends on character\u2019s STR and shield defense and calculated as (STR + defense*2)*SkillLv/2. There\u2019s also a defense+2*SkillLv % chance to stun the target.");
case 2 :
return("Hit an enemy with 3 fast attacks. Each attack deals 50+10*SkillLv% damage.");
case 3 :
return("Hide behind the shield and strike from a safe position. This attack deals only 40+10*SkillLv% damage, but you\u2019re invincible for opponent\u2019s strikes while attacking.");
switch (skill_id) {
case 1 :
return("A powerful smash that deals 150+20*SkillLv% damage with your two handed sword.");
case 2 :
return("Deals 100+20*SkillLv% damage to all enemies in 3 cells in front of character.");
case 3 :
return("Character jumps and blows ground below him, dealing 100+40*SkillLv% damage to all enemies in 3x3 area around him.");
switch (skill_id) {
case 1 :
return("Hit an enemy in the head dealing 50+10*SkillLv% damage and stunning him with 30+3*SkillLv% chance.");
case 2 :
return("Hit an enemy with powerful critical attack for 200+40*SkillLv% damage. There\u2019s also a 2*SkillLv% chance of stunning everyone (except you) in 3x3 area around the enemy.");
case 3 :
return("Deal 100+40*SkillLv% damage to all enemies in 3x3 area around the target.");
switch (skill_id) {
case 1 :
return("A combo of 3 hits with each weapon. Each hit deals 40+10*SkillLv% damage.");
case 2 :
return("Attack that deals 100+20*SkillLv% damage with 10*SkillLv% crit bonus to enemies in front of character and behind him. Character is very hard to be hit while doing this attack.");
case 3 :
return("Jump and hit an enemy with several strikes. Each strike deals 100+30*SkillLv% damage and has 50% critical chance.");
switch (skill_id) {
case 1 :
return("Strike which pierces enemy\u2019s defense dealing100+10*SkillLv% damage. This attack always has 100% critical chance.");
case 2 :
return("3 fast attacks with spear, each attack deals 75+15*SkillLv% damage, but critrate of these attacks is 3 times lower.");
case 3 :
return("Hit all enemies in a cone in front of the character for 200+40*SkillLv% damage, but without critical chance.");
switch (skill_id) {
case 1 :
return("If you hit an enemy from behind, there\u2019s a (0.4+0.1*SkillLv)*WeaponCrit% chance of instantly killing him. If instant kill fails, enemy still receives 300+100*SkillLv% damage. If you attack not from behind, enemy will get only 50% of normal damage.");
case 2 :
return("Two critical strikes, for 75+15*SkillLv% damage each.");
case 3 :
return("Character throws his dagger at enemy, then jumps, catches the dagger in the air and hits the ground. Flying dagger hits the enemy 3 times, each hit deals 50+10*SkillLv% damage. The ground hit damages all enemies in 5x5 area around the character for 50+20*SkillLv%.");
switch (skill_id) {
case 1 :
return("Character jumps and hits the enemy for 150+20*SkillLv% damage. Critical rate of this attack is also increased in 1+0.2*SkillLv times.");
case 2 :
return("Character kicks an enemy and then hits him with the sword for 100+30*SkillLv% damage. The kick itself deals damage depending on character\u2019s STR and slows enemies\u2019 attacks.");
case 3 :
return("A very powerful attack which always deals critical damage depending on target\u2019s defense. The more defense has the target, the more damage it will receive. This skill always consumes all SP. Amount of consumed SP affect the damage too.");
switch (skill_id) {
case 1 :
return("Hit an enemy 3 times, each hit deals 100+20*SkillLv% damage.");
case 2 :
return("Hits all enemies in 7x7 area around the character for 50+10*SkillLv% damage.");
case 3 :
return("Combo of 10 hits, each hit deals 50+10*SkillLv% damage.");
switch (skill_id) {
case 1 :
return("Fast strike that deals 200+30*SkillLv% damage. There\u2019s also a chance to poison the enemy.");
case 2 :
return("Combination of 4 critical hits (2 hits per hand). Each hit deals 100+10*SkillLv% damage.");
case 3 :
return("Hit all enemies around the character for 200+40*SkillLv% non-critical damage.");
switch (skill_id) {
case 1 :
return("Shoot two arrows with one shot to deal 120+20*SkillLv% damage.");
case 2 :
return("3 shots at different targets, 50+20*SkillLv% damage each.");
case 3 :
return("Shots nine arrows attacking 3x3 area around the target. Each arrow deals 50+10*SkillLv% damage.");
switch (skill_id) {
case 1 :
return("Strong shot that deals 150+50*SkillLv% damage (with no crit chance) and has 10*SkillLv% chance to stun the target.");
case 2 :
return("Character hits the enemy right in the head dealing 220+20*SkillLv% damage. This attack is always critical.");
case 3 :
return("Shot a very powerful arrow that will pierce up to 3 enemies in line. The first enemy will receive 160+20*SkillLv% damage, damage for the next enemies will be reduced for 30%. This attack is always critical.");
switch (skill_id) {
case 1 :
return("Throw 3 knives, surikens or axes at 3 nearby targets. Each throw deals 90+10*SkillLv% damage.");
case 2 :
return("3 throws at one target 50+10*SkillLv% damage each.");
case 3 :
return("Throw a ricocheting knife, axe or suriken which will hit multiple enemies. The knife will ricochet up to SkillLv times.");
return("[No skill description for fists]");
return("Increases ranged units\u2019 hit chance by 3*SkillLv%.");
return("Increases ranged units\u2019 critical hit chance by 2*SkillLv% and range by SkillLv tiles.");
return("Increases ranged units\u2019 damage by 4*SkillLv%.");
return("Increases all infantry units\u2019 HP by 5*SkillLv points and defense by SkillLv points.");
return("Increases all infantry units\u2019 damage by 2*SkillLv%.");
return("Increases all infantry units\u2019 hit and dodge chances by SkillLv%.");
return("Increases all mounted units\u2019 dodge chance by 2*SkillLv% and greatly increases their movement speed depending on SkillLv.");
return("Increases all mounted units\u2019 HP by 10*SkillLv points, defense by 3*SkillLv points and chance to block attack with the shield (if unit have one) by SkillLv%.");
return("Increases all mounted units\u2019 hit chance and damage by 3*SkillLv%.");
return("Increases HP by 10*SkillLv points and chance to block attack with the shield by SkillLv% of all units armed with one handed swords, axes or maces. If unit doesn\u2019t have a shield his block chance still will be increased. Does NOT work for units armed with dual weapons.");
return("Increases damage by 4*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases hit chance by 2*SkillLv% and dodge chance by 3*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases SP by 10*SkillLv points and SP regeneration rate by 20*SkillLv% of all East Empire\u2019s (e.g. Japanese-like) units.");
return("Increases hit chance by 2*SkillLv% and damage by 3*SkillLv% of all units armed with katana, staffs or ninja-to. Does NOT work for units armed with dual ninja-to.");
return("Increases dodge chance by 4*SkillLv% and damage by 2*SkillLv% of all units armed with daggers or katars. Also greatly increases their movement speed depending on SkillLv.");
return("Increases dodge chance by SkillLv% and damage by 2*SkillLv% of all units armed with two handed axes or maces. Also increases their movement speed depending on SkillLv.");
return("Increases damage by 10*SkillLv points, hit chance by 6*SkillLv%, critical strike chance by 10*SkillLv%, dodge chance by 5*SkillLv% and HP by 30*SkillLv points of all unarmed units.");
return("Increases hit chance by 4*SkillLv% and critical strike chance by 6*SkillLv% of all units armed with katars.");
}
}
}
}
}
}
}
}
}
}
}
}
case "2H_sword" :
switch (skill_id) {
case 1 :
return("A powerful smash that deals 150+20*SkillLv% damage with your two handed sword.");
case 2 :
return("Deals 100+20*SkillLv% damage to all enemies in 3 cells in front of character.");
case 3 :
return("Character jumps and blows ground below him, dealing 100+40*SkillLv% damage to all enemies in 3x3 area around him.");
switch (skill_id) {
case 1 :
return("Hit an enemy in the head dealing 50+10*SkillLv% damage and stunning him with 30+3*SkillLv% chance.");
case 2 :
return("Hit an enemy with powerful critical attack for 200+40*SkillLv% damage. There\u2019s also a 2*SkillLv% chance of stunning everyone (except you) in 3x3 area around the enemy.");
case 3 :
return("Deal 100+40*SkillLv% damage to all enemies in 3x3 area around the target.");
switch (skill_id) {
case 1 :
return("A combo of 3 hits with each weapon. Each hit deals 40+10*SkillLv% damage.");
case 2 :
return("Attack that deals 100+20*SkillLv% damage with 10*SkillLv% crit bonus to enemies in front of character and behind him. Character is very hard to be hit while doing this attack.");
case 3 :
return("Jump and hit an enemy with several strikes. Each strike deals 100+30*SkillLv% damage and has 50% critical chance.");
switch (skill_id) {
case 1 :
return("Strike which pierces enemy\u2019s defense dealing100+10*SkillLv% damage. This attack always has 100% critical chance.");
case 2 :
return("3 fast attacks with spear, each attack deals 75+15*SkillLv% damage, but critrate of these attacks is 3 times lower.");
case 3 :
return("Hit all enemies in a cone in front of the character for 200+40*SkillLv% damage, but without critical chance.");
switch (skill_id) {
case 1 :
return("If you hit an enemy from behind, there\u2019s a (0.4+0.1*SkillLv)*WeaponCrit% chance of instantly killing him. If instant kill fails, enemy still receives 300+100*SkillLv% damage. If you attack not from behind, enemy will get only 50% of normal damage.");
case 2 :
return("Two critical strikes, for 75+15*SkillLv% damage each.");
case 3 :
return("Character throws his dagger at enemy, then jumps, catches the dagger in the air and hits the ground. Flying dagger hits the enemy 3 times, each hit deals 50+10*SkillLv% damage. The ground hit damages all enemies in 5x5 area around the character for 50+20*SkillLv%.");
switch (skill_id) {
case 1 :
return("Character jumps and hits the enemy for 150+20*SkillLv% damage. Critical rate of this attack is also increased in 1+0.2*SkillLv times.");
case 2 :
return("Character kicks an enemy and then hits him with the sword for 100+30*SkillLv% damage. The kick itself deals damage depending on character\u2019s STR and slows enemies\u2019 attacks.");
case 3 :
return("A very powerful attack which always deals critical damage depending on target\u2019s defense. The more defense has the target, the more damage it will receive. This skill always consumes all SP. Amount of consumed SP affect the damage too.");
switch (skill_id) {
case 1 :
return("Hit an enemy 3 times, each hit deals 100+20*SkillLv% damage.");
case 2 :
return("Hits all enemies in 7x7 area around the character for 50+10*SkillLv% damage.");
case 3 :
return("Combo of 10 hits, each hit deals 50+10*SkillLv% damage.");
switch (skill_id) {
case 1 :
return("Fast strike that deals 200+30*SkillLv% damage. There\u2019s also a chance to poison the enemy.");
case 2 :
return("Combination of 4 critical hits (2 hits per hand). Each hit deals 100+10*SkillLv% damage.");
case 3 :
return("Hit all enemies around the character for 200+40*SkillLv% non-critical damage.");
switch (skill_id) {
case 1 :
return("Shoot two arrows with one shot to deal 120+20*SkillLv% damage.");
case 2 :
return("3 shots at different targets, 50+20*SkillLv% damage each.");
case 3 :
return("Shots nine arrows attacking 3x3 area around the target. Each arrow deals 50+10*SkillLv% damage.");
switch (skill_id) {
case 1 :
return("Strong shot that deals 150+50*SkillLv% damage (with no crit chance) and has 10*SkillLv% chance to stun the target.");
case 2 :
return("Character hits the enemy right in the head dealing 220+20*SkillLv% damage. This attack is always critical.");
case 3 :
return("Shot a very powerful arrow that will pierce up to 3 enemies in line. The first enemy will receive 160+20*SkillLv% damage, damage for the next enemies will be reduced for 30%. This attack is always critical.");
switch (skill_id) {
case 1 :
return("Throw 3 knives, surikens or axes at 3 nearby targets. Each throw deals 90+10*SkillLv% damage.");
case 2 :
return("3 throws at one target 50+10*SkillLv% damage each.");
case 3 :
return("Throw a ricocheting knife, axe or suriken which will hit multiple enemies. The knife will ricochet up to SkillLv times.");
return("[No skill description for fists]");
return("Increases ranged units\u2019 hit chance by 3*SkillLv%.");
return("Increases ranged units\u2019 critical hit chance by 2*SkillLv% and range by SkillLv tiles.");
return("Increases ranged units\u2019 damage by 4*SkillLv%.");
return("Increases all infantry units\u2019 HP by 5*SkillLv points and defense by SkillLv points.");
return("Increases all infantry units\u2019 damage by 2*SkillLv%.");
return("Increases all infantry units\u2019 hit and dodge chances by SkillLv%.");
return("Increases all mounted units\u2019 dodge chance by 2*SkillLv% and greatly increases their movement speed depending on SkillLv.");
return("Increases all mounted units\u2019 HP by 10*SkillLv points, defense by 3*SkillLv points and chance to block attack with the shield (if unit have one) by SkillLv%.");
return("Increases all mounted units\u2019 hit chance and damage by 3*SkillLv%.");
return("Increases HP by 10*SkillLv points and chance to block attack with the shield by SkillLv% of all units armed with one handed swords, axes or maces. If unit doesn\u2019t have a shield his block chance still will be increased. Does NOT work for units armed with dual weapons.");
return("Increases damage by 4*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases hit chance by 2*SkillLv% and dodge chance by 3*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases SP by 10*SkillLv points and SP regeneration rate by 20*SkillLv% of all East Empire\u2019s (e.g. Japanese-like) units.");
return("Increases hit chance by 2*SkillLv% and damage by 3*SkillLv% of all units armed with katana, staffs or ninja-to. Does NOT work for units armed with dual ninja-to.");
return("Increases dodge chance by 4*SkillLv% and damage by 2*SkillLv% of all units armed with daggers or katars. Also greatly increases their movement speed depending on SkillLv.");
return("Increases dodge chance by SkillLv% and damage by 2*SkillLv% of all units armed with two handed axes or maces. Also increases their movement speed depending on SkillLv.");
return("Increases damage by 10*SkillLv points, hit chance by 6*SkillLv%, critical strike chance by 10*SkillLv%, dodge chance by 5*SkillLv% and HP by 30*SkillLv points of all unarmed units.");
return("Increases hit chance by 4*SkillLv% and critical strike chance by 6*SkillLv% of all units armed with katars.");
}
}
}
}
}
}
}
}
}
}
}
case "2H_axe" :
switch (skill_id) {
case 1 :
return("Hit an enemy in the head dealing 50+10*SkillLv% damage and stunning him with 30+3*SkillLv% chance.");
case 2 :
return("Hit an enemy with powerful critical attack for 200+40*SkillLv% damage. There\u2019s also a 2*SkillLv% chance of stunning everyone (except you) in 3x3 area around the enemy.");
case 3 :
return("Deal 100+40*SkillLv% damage to all enemies in 3x3 area around the target.");
switch (skill_id) {
case 1 :
return("A combo of 3 hits with each weapon. Each hit deals 40+10*SkillLv% damage.");
case 2 :
return("Attack that deals 100+20*SkillLv% damage with 10*SkillLv% crit bonus to enemies in front of character and behind him. Character is very hard to be hit while doing this attack.");
case 3 :
return("Jump and hit an enemy with several strikes. Each strike deals 100+30*SkillLv% damage and has 50% critical chance.");
switch (skill_id) {
case 1 :
return("Strike which pierces enemy\u2019s defense dealing100+10*SkillLv% damage. This attack always has 100% critical chance.");
case 2 :
return("3 fast attacks with spear, each attack deals 75+15*SkillLv% damage, but critrate of these attacks is 3 times lower.");
case 3 :
return("Hit all enemies in a cone in front of the character for 200+40*SkillLv% damage, but without critical chance.");
switch (skill_id) {
case 1 :
return("If you hit an enemy from behind, there\u2019s a (0.4+0.1*SkillLv)*WeaponCrit% chance of instantly killing him. If instant kill fails, enemy still receives 300+100*SkillLv% damage. If you attack not from behind, enemy will get only 50% of normal damage.");
case 2 :
return("Two critical strikes, for 75+15*SkillLv% damage each.");
case 3 :
return("Character throws his dagger at enemy, then jumps, catches the dagger in the air and hits the ground. Flying dagger hits the enemy 3 times, each hit deals 50+10*SkillLv% damage. The ground hit damages all enemies in 5x5 area around the character for 50+20*SkillLv%.");
switch (skill_id) {
case 1 :
return("Character jumps and hits the enemy for 150+20*SkillLv% damage. Critical rate of this attack is also increased in 1+0.2*SkillLv times.");
case 2 :
return("Character kicks an enemy and then hits him with the sword for 100+30*SkillLv% damage. The kick itself deals damage depending on character\u2019s STR and slows enemies\u2019 attacks.");
case 3 :
return("A very powerful attack which always deals critical damage depending on target\u2019s defense. The more defense has the target, the more damage it will receive. This skill always consumes all SP. Amount of consumed SP affect the damage too.");
switch (skill_id) {
case 1 :
return("Hit an enemy 3 times, each hit deals 100+20*SkillLv% damage.");
case 2 :
return("Hits all enemies in 7x7 area around the character for 50+10*SkillLv% damage.");
case 3 :
return("Combo of 10 hits, each hit deals 50+10*SkillLv% damage.");
switch (skill_id) {
case 1 :
return("Fast strike that deals 200+30*SkillLv% damage. There\u2019s also a chance to poison the enemy.");
case 2 :
return("Combination of 4 critical hits (2 hits per hand). Each hit deals 100+10*SkillLv% damage.");
case 3 :
return("Hit all enemies around the character for 200+40*SkillLv% non-critical damage.");
switch (skill_id) {
case 1 :
return("Shoot two arrows with one shot to deal 120+20*SkillLv% damage.");
case 2 :
return("3 shots at different targets, 50+20*SkillLv% damage each.");
case 3 :
return("Shots nine arrows attacking 3x3 area around the target. Each arrow deals 50+10*SkillLv% damage.");
switch (skill_id) {
case 1 :
return("Strong shot that deals 150+50*SkillLv% damage (with no crit chance) and has 10*SkillLv% chance to stun the target.");
case 2 :
return("Character hits the enemy right in the head dealing 220+20*SkillLv% damage. This attack is always critical.");
case 3 :
return("Shot a very powerful arrow that will pierce up to 3 enemies in line. The first enemy will receive 160+20*SkillLv% damage, damage for the next enemies will be reduced for 30%. This attack is always critical.");
switch (skill_id) {
case 1 :
return("Throw 3 knives, surikens or axes at 3 nearby targets. Each throw deals 90+10*SkillLv% damage.");
case 2 :
return("3 throws at one target 50+10*SkillLv% damage each.");
case 3 :
return("Throw a ricocheting knife, axe or suriken which will hit multiple enemies. The knife will ricochet up to SkillLv times.");
return("[No skill description for fists]");
return("Increases ranged units\u2019 hit chance by 3*SkillLv%.");
return("Increases ranged units\u2019 critical hit chance by 2*SkillLv% and range by SkillLv tiles.");
return("Increases ranged units\u2019 damage by 4*SkillLv%.");
return("Increases all infantry units\u2019 HP by 5*SkillLv points and defense by SkillLv points.");
return("Increases all infantry units\u2019 damage by 2*SkillLv%.");
return("Increases all infantry units\u2019 hit and dodge chances by SkillLv%.");
return("Increases all mounted units\u2019 dodge chance by 2*SkillLv% and greatly increases their movement speed depending on SkillLv.");
return("Increases all mounted units\u2019 HP by 10*SkillLv points, defense by 3*SkillLv points and chance to block attack with the shield (if unit have one) by SkillLv%.");
return("Increases all mounted units\u2019 hit chance and damage by 3*SkillLv%.");
return("Increases HP by 10*SkillLv points and chance to block attack with the shield by SkillLv% of all units armed with one handed swords, axes or maces. If unit doesn\u2019t have a shield his block chance still will be increased. Does NOT work for units armed with dual weapons.");
return("Increases damage by 4*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases hit chance by 2*SkillLv% and dodge chance by 3*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases SP by 10*SkillLv points and SP regeneration rate by 20*SkillLv% of all East Empire\u2019s (e.g. Japanese-like) units.");
return("Increases hit chance by 2*SkillLv% and damage by 3*SkillLv% of all units armed with katana, staffs or ninja-to. Does NOT work for units armed with dual ninja-to.");
return("Increases dodge chance by 4*SkillLv% and damage by 2*SkillLv% of all units armed with daggers or katars. Also greatly increases their movement speed depending on SkillLv.");
return("Increases dodge chance by SkillLv% and damage by 2*SkillLv% of all units armed with two handed axes or maces. Also increases their movement speed depending on SkillLv.");
return("Increases damage by 10*SkillLv points, hit chance by 6*SkillLv%, critical strike chance by 10*SkillLv%, dodge chance by 5*SkillLv% and HP by 30*SkillLv points of all unarmed units.");
return("Increases hit chance by 4*SkillLv% and critical strike chance by 6*SkillLv% of all units armed with katars.");
}
}
}
}
}
}
}
}
}
}
case "dual" :
switch (skill_id) {
case 1 :
return("A combo of 3 hits with each weapon. Each hit deals 40+10*SkillLv% damage.");
case 2 :
return("Attack that deals 100+20*SkillLv% damage with 10*SkillLv% crit bonus to enemies in front of character and behind him. Character is very hard to be hit while doing this attack.");
case 3 :
return("Jump and hit an enemy with several strikes. Each strike deals 100+30*SkillLv% damage and has 50% critical chance.");
switch (skill_id) {
case 1 :
return("Strike which pierces enemy\u2019s defense dealing100+10*SkillLv% damage. This attack always has 100% critical chance.");
case 2 :
return("3 fast attacks with spear, each attack deals 75+15*SkillLv% damage, but critrate of these attacks is 3 times lower.");
case 3 :
return("Hit all enemies in a cone in front of the character for 200+40*SkillLv% damage, but without critical chance.");
switch (skill_id) {
case 1 :
return("If you hit an enemy from behind, there\u2019s a (0.4+0.1*SkillLv)*WeaponCrit% chance of instantly killing him. If instant kill fails, enemy still receives 300+100*SkillLv% damage. If you attack not from behind, enemy will get only 50% of normal damage.");
case 2 :
return("Two critical strikes, for 75+15*SkillLv% damage each.");
case 3 :
return("Character throws his dagger at enemy, then jumps, catches the dagger in the air and hits the ground. Flying dagger hits the enemy 3 times, each hit deals 50+10*SkillLv% damage. The ground hit damages all enemies in 5x5 area around the character for 50+20*SkillLv%.");
switch (skill_id) {
case 1 :
return("Character jumps and hits the enemy for 150+20*SkillLv% damage. Critical rate of this attack is also increased in 1+0.2*SkillLv times.");
case 2 :
return("Character kicks an enemy and then hits him with the sword for 100+30*SkillLv% damage. The kick itself deals damage depending on character\u2019s STR and slows enemies\u2019 attacks.");
case 3 :
return("A very powerful attack which always deals critical damage depending on target\u2019s defense. The more defense has the target, the more damage it will receive. This skill always consumes all SP. Amount of consumed SP affect the damage too.");
switch (skill_id) {
case 1 :
return("Hit an enemy 3 times, each hit deals 100+20*SkillLv% damage.");
case 2 :
return("Hits all enemies in 7x7 area around the character for 50+10*SkillLv% damage.");
case 3 :
return("Combo of 10 hits, each hit deals 50+10*SkillLv% damage.");
switch (skill_id) {
case 1 :
return("Fast strike that deals 200+30*SkillLv% damage. There\u2019s also a chance to poison the enemy.");
case 2 :
return("Combination of 4 critical hits (2 hits per hand). Each hit deals 100+10*SkillLv% damage.");
case 3 :
return("Hit all enemies around the character for 200+40*SkillLv% non-critical damage.");
switch (skill_id) {
case 1 :
return("Shoot two arrows with one shot to deal 120+20*SkillLv% damage.");
case 2 :
return("3 shots at different targets, 50+20*SkillLv% damage each.");
case 3 :
return("Shots nine arrows attacking 3x3 area around the target. Each arrow deals 50+10*SkillLv% damage.");
switch (skill_id) {
case 1 :
return("Strong shot that deals 150+50*SkillLv% damage (with no crit chance) and has 10*SkillLv% chance to stun the target.");
case 2 :
return("Character hits the enemy right in the head dealing 220+20*SkillLv% damage. This attack is always critical.");
case 3 :
return("Shot a very powerful arrow that will pierce up to 3 enemies in line. The first enemy will receive 160+20*SkillLv% damage, damage for the next enemies will be reduced for 30%. This attack is always critical.");
switch (skill_id) {
case 1 :
return("Throw 3 knives, surikens or axes at 3 nearby targets. Each throw deals 90+10*SkillLv% damage.");
case 2 :
return("3 throws at one target 50+10*SkillLv% damage each.");
case 3 :
return("Throw a ricocheting knife, axe or suriken which will hit multiple enemies. The knife will ricochet up to SkillLv times.");
return("[No skill description for fists]");
return("Increases ranged units\u2019 hit chance by 3*SkillLv%.");
return("Increases ranged units\u2019 critical hit chance by 2*SkillLv% and range by SkillLv tiles.");
return("Increases ranged units\u2019 damage by 4*SkillLv%.");
return("Increases all infantry units\u2019 HP by 5*SkillLv points and defense by SkillLv points.");
return("Increases all infantry units\u2019 damage by 2*SkillLv%.");
return("Increases all infantry units\u2019 hit and dodge chances by SkillLv%.");
return("Increases all mounted units\u2019 dodge chance by 2*SkillLv% and greatly increases their movement speed depending on SkillLv.");
return("Increases all mounted units\u2019 HP by 10*SkillLv points, defense by 3*SkillLv points and chance to block attack with the shield (if unit have one) by SkillLv%.");
return("Increases all mounted units\u2019 hit chance and damage by 3*SkillLv%.");
return("Increases HP by 10*SkillLv points and chance to block attack with the shield by SkillLv% of all units armed with one handed swords, axes or maces. If unit doesn\u2019t have a shield his block chance still will be increased. Does NOT work for units armed with dual weapons.");
return("Increases damage by 4*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases hit chance by 2*SkillLv% and dodge chance by 3*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases SP by 10*SkillLv points and SP regeneration rate by 20*SkillLv% of all East Empire\u2019s (e.g. Japanese-like) units.");
return("Increases hit chance by 2*SkillLv% and damage by 3*SkillLv% of all units armed with katana, staffs or ninja-to. Does NOT work for units armed with dual ninja-to.");
return("Increases dodge chance by 4*SkillLv% and damage by 2*SkillLv% of all units armed with daggers or katars. Also greatly increases their movement speed depending on SkillLv.");
return("Increases dodge chance by SkillLv% and damage by 2*SkillLv% of all units armed with two handed axes or maces. Also increases their movement speed depending on SkillLv.");
return("Increases damage by 10*SkillLv points, hit chance by 6*SkillLv%, critical strike chance by 10*SkillLv%, dodge chance by 5*SkillLv% and HP by 30*SkillLv points of all unarmed units.");
return("Increases hit chance by 4*SkillLv% and critical strike chance by 6*SkillLv% of all units armed with katars.");
}
}
}
}
}
}
}
}
}
case "spear" :
switch (skill_id) {
case 1 :
return("Strike which pierces enemy\u2019s defense dealing100+10*SkillLv% damage. This attack always has 100% critical chance.");
case 2 :
return("3 fast attacks with spear, each attack deals 75+15*SkillLv% damage, but critrate of these attacks is 3 times lower.");
case 3 :
return("Hit all enemies in a cone in front of the character for 200+40*SkillLv% damage, but without critical chance.");
switch (skill_id) {
case 1 :
return("If you hit an enemy from behind, there\u2019s a (0.4+0.1*SkillLv)*WeaponCrit% chance of instantly killing him. If instant kill fails, enemy still receives 300+100*SkillLv% damage. If you attack not from behind, enemy will get only 50% of normal damage.");
case 2 :
return("Two critical strikes, for 75+15*SkillLv% damage each.");
case 3 :
return("Character throws his dagger at enemy, then jumps, catches the dagger in the air and hits the ground. Flying dagger hits the enemy 3 times, each hit deals 50+10*SkillLv% damage. The ground hit damages all enemies in 5x5 area around the character for 50+20*SkillLv%.");
switch (skill_id) {
case 1 :
return("Character jumps and hits the enemy for 150+20*SkillLv% damage. Critical rate of this attack is also increased in 1+0.2*SkillLv times.");
case 2 :
return("Character kicks an enemy and then hits him with the sword for 100+30*SkillLv% damage. The kick itself deals damage depending on character\u2019s STR and slows enemies\u2019 attacks.");
case 3 :
return("A very powerful attack which always deals critical damage depending on target\u2019s defense. The more defense has the target, the more damage it will receive. This skill always consumes all SP. Amount of consumed SP affect the damage too.");
switch (skill_id) {
case 1 :
return("Hit an enemy 3 times, each hit deals 100+20*SkillLv% damage.");
case 2 :
return("Hits all enemies in 7x7 area around the character for 50+10*SkillLv% damage.");
case 3 :
return("Combo of 10 hits, each hit deals 50+10*SkillLv% damage.");
switch (skill_id) {
case 1 :
return("Fast strike that deals 200+30*SkillLv% damage. There\u2019s also a chance to poison the enemy.");
case 2 :
return("Combination of 4 critical hits (2 hits per hand). Each hit deals 100+10*SkillLv% damage.");
case 3 :
return("Hit all enemies around the character for 200+40*SkillLv% non-critical damage.");
switch (skill_id) {
case 1 :
return("Shoot two arrows with one shot to deal 120+20*SkillLv% damage.");
case 2 :
return("3 shots at different targets, 50+20*SkillLv% damage each.");
case 3 :
return("Shots nine arrows attacking 3x3 area around the target. Each arrow deals 50+10*SkillLv% damage.");
switch (skill_id) {
case 1 :
return("Strong shot that deals 150+50*SkillLv% damage (with no crit chance) and has 10*SkillLv% chance to stun the target.");
case 2 :
return("Character hits the enemy right in the head dealing 220+20*SkillLv% damage. This attack is always critical.");
case 3 :
return("Shot a very powerful arrow that will pierce up to 3 enemies in line. The first enemy will receive 160+20*SkillLv% damage, damage for the next enemies will be reduced for 30%. This attack is always critical.");
switch (skill_id) {
case 1 :
return("Throw 3 knives, surikens or axes at 3 nearby targets. Each throw deals 90+10*SkillLv% damage.");
case 2 :
return("3 throws at one target 50+10*SkillLv% damage each.");
case 3 :
return("Throw a ricocheting knife, axe or suriken which will hit multiple enemies. The knife will ricochet up to SkillLv times.");
return("[No skill description for fists]");
return("Increases ranged units\u2019 hit chance by 3*SkillLv%.");
return("Increases ranged units\u2019 critical hit chance by 2*SkillLv% and range by SkillLv tiles.");
return("Increases ranged units\u2019 damage by 4*SkillLv%.");
return("Increases all infantry units\u2019 HP by 5*SkillLv points and defense by SkillLv points.");
return("Increases all infantry units\u2019 damage by 2*SkillLv%.");
return("Increases all infantry units\u2019 hit and dodge chances by SkillLv%.");
return("Increases all mounted units\u2019 dodge chance by 2*SkillLv% and greatly increases their movement speed depending on SkillLv.");
return("Increases all mounted units\u2019 HP by 10*SkillLv points, defense by 3*SkillLv points and chance to block attack with the shield (if unit have one) by SkillLv%.");
return("Increases all mounted units\u2019 hit chance and damage by 3*SkillLv%.");
return("Increases HP by 10*SkillLv points and chance to block attack with the shield by SkillLv% of all units armed with one handed swords, axes or maces. If unit doesn\u2019t have a shield his block chance still will be increased. Does NOT work for units armed with dual weapons.");
return("Increases damage by 4*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases hit chance by 2*SkillLv% and dodge chance by 3*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases SP by 10*SkillLv points and SP regeneration rate by 20*SkillLv% of all East Empire\u2019s (e.g. Japanese-like) units.");
return("Increases hit chance by 2*SkillLv% and damage by 3*SkillLv% of all units armed with katana, staffs or ninja-to. Does NOT work for units armed with dual ninja-to.");
return("Increases dodge chance by 4*SkillLv% and damage by 2*SkillLv% of all units armed with daggers or katars. Also greatly increases their movement speed depending on SkillLv.");
return("Increases dodge chance by SkillLv% and damage by 2*SkillLv% of all units armed with two handed axes or maces. Also increases their movement speed depending on SkillLv.");
return("Increases damage by 10*SkillLv points, hit chance by 6*SkillLv%, critical strike chance by 10*SkillLv%, dodge chance by 5*SkillLv% and HP by 30*SkillLv points of all unarmed units.");
return("Increases hit chance by 4*SkillLv% and critical strike chance by 6*SkillLv% of all units armed with katars.");
}
}
}
}
}
}
}
}
case "dagger" :
switch (skill_id) {
case 1 :
return("If you hit an enemy from behind, there\u2019s a (0.4+0.1*SkillLv)*WeaponCrit% chance of instantly killing him. If instant kill fails, enemy still receives 300+100*SkillLv% damage. If you attack not from behind, enemy will get only 50% of normal damage.");
case 2 :
return("Two critical strikes, for 75+15*SkillLv% damage each.");
case 3 :
return("Character throws his dagger at enemy, then jumps, catches the dagger in the air and hits the ground. Flying dagger hits the enemy 3 times, each hit deals 50+10*SkillLv% damage. The ground hit damages all enemies in 5x5 area around the character for 50+20*SkillLv%.");
switch (skill_id) {
case 1 :
return("Character jumps and hits the enemy for 150+20*SkillLv% damage. Critical rate of this attack is also increased in 1+0.2*SkillLv times.");
case 2 :
return("Character kicks an enemy and then hits him with the sword for 100+30*SkillLv% damage. The kick itself deals damage depending on character\u2019s STR and slows enemies\u2019 attacks.");
case 3 :
return("A very powerful attack which always deals critical damage depending on target\u2019s defense. The more defense has the target, the more damage it will receive. This skill always consumes all SP. Amount of consumed SP affect the damage too.");
switch (skill_id) {
case 1 :
return("Hit an enemy 3 times, each hit deals 100+20*SkillLv% damage.");
case 2 :
return("Hits all enemies in 7x7 area around the character for 50+10*SkillLv% damage.");
case 3 :
return("Combo of 10 hits, each hit deals 50+10*SkillLv% damage.");
switch (skill_id) {
case 1 :
return("Fast strike that deals 200+30*SkillLv% damage. There\u2019s also a chance to poison the enemy.");
case 2 :
return("Combination of 4 critical hits (2 hits per hand). Each hit deals 100+10*SkillLv% damage.");
case 3 :
return("Hit all enemies around the character for 200+40*SkillLv% non-critical damage.");
switch (skill_id) {
case 1 :
return("Shoot two arrows with one shot to deal 120+20*SkillLv% damage.");
case 2 :
return("3 shots at different targets, 50+20*SkillLv% damage each.");
case 3 :
return("Shots nine arrows attacking 3x3 area around the target. Each arrow deals 50+10*SkillLv% damage.");
switch (skill_id) {
case 1 :
return("Strong shot that deals 150+50*SkillLv% damage (with no crit chance) and has 10*SkillLv% chance to stun the target.");
case 2 :
return("Character hits the enemy right in the head dealing 220+20*SkillLv% damage. This attack is always critical.");
case 3 :
return("Shot a very powerful arrow that will pierce up to 3 enemies in line. The first enemy will receive 160+20*SkillLv% damage, damage for the next enemies will be reduced for 30%. This attack is always critical.");
switch (skill_id) {
case 1 :
return("Throw 3 knives, surikens or axes at 3 nearby targets. Each throw deals 90+10*SkillLv% damage.");
case 2 :
return("3 throws at one target 50+10*SkillLv% damage each.");
case 3 :
return("Throw a ricocheting knife, axe or suriken which will hit multiple enemies. The knife will ricochet up to SkillLv times.");
return("[No skill description for fists]");
return("Increases ranged units\u2019 hit chance by 3*SkillLv%.");
return("Increases ranged units\u2019 critical hit chance by 2*SkillLv% and range by SkillLv tiles.");
return("Increases ranged units\u2019 damage by 4*SkillLv%.");
return("Increases all infantry units\u2019 HP by 5*SkillLv points and defense by SkillLv points.");
return("Increases all infantry units\u2019 damage by 2*SkillLv%.");
return("Increases all infantry units\u2019 hit and dodge chances by SkillLv%.");
return("Increases all mounted units\u2019 dodge chance by 2*SkillLv% and greatly increases their movement speed depending on SkillLv.");
return("Increases all mounted units\u2019 HP by 10*SkillLv points, defense by 3*SkillLv points and chance to block attack with the shield (if unit have one) by SkillLv%.");
return("Increases all mounted units\u2019 hit chance and damage by 3*SkillLv%.");
return("Increases HP by 10*SkillLv points and chance to block attack with the shield by SkillLv% of all units armed with one handed swords, axes or maces. If unit doesn\u2019t have a shield his block chance still will be increased. Does NOT work for units armed with dual weapons.");
return("Increases damage by 4*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases hit chance by 2*SkillLv% and dodge chance by 3*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases SP by 10*SkillLv points and SP regeneration rate by 20*SkillLv% of all East Empire\u2019s (e.g. Japanese-like) units.");
return("Increases hit chance by 2*SkillLv% and damage by 3*SkillLv% of all units armed with katana, staffs or ninja-to. Does NOT work for units armed with dual ninja-to.");
return("Increases dodge chance by 4*SkillLv% and damage by 2*SkillLv% of all units armed with daggers or katars. Also greatly increases their movement speed depending on SkillLv.");
return("Increases dodge chance by SkillLv% and damage by 2*SkillLv% of all units armed with two handed axes or maces. Also increases their movement speed depending on SkillLv.");
return("Increases damage by 10*SkillLv points, hit chance by 6*SkillLv%, critical strike chance by 10*SkillLv%, dodge chance by 5*SkillLv% and HP by 30*SkillLv points of all unarmed units.");
return("Increases hit chance by 4*SkillLv% and critical strike chance by 6*SkillLv% of all units armed with katars.");
}
}
}
}
}
}
}
case "katana" :
switch (skill_id) {
case 1 :
return("Character jumps and hits the enemy for 150+20*SkillLv% damage. Critical rate of this attack is also increased in 1+0.2*SkillLv times.");
case 2 :
return("Character kicks an enemy and then hits him with the sword for 100+30*SkillLv% damage. The kick itself deals damage depending on character\u2019s STR and slows enemies\u2019 attacks.");
case 3 :
return("A very powerful attack which always deals critical damage depending on target\u2019s defense. The more defense has the target, the more damage it will receive. This skill always consumes all SP. Amount of consumed SP affect the damage too.");
switch (skill_id) {
case 1 :
return("Hit an enemy 3 times, each hit deals 100+20*SkillLv% damage.");
case 2 :
return("Hits all enemies in 7x7 area around the character for 50+10*SkillLv% damage.");
case 3 :
return("Combo of 10 hits, each hit deals 50+10*SkillLv% damage.");
switch (skill_id) {
case 1 :
return("Fast strike that deals 200+30*SkillLv% damage. There\u2019s also a chance to poison the enemy.");
case 2 :
return("Combination of 4 critical hits (2 hits per hand). Each hit deals 100+10*SkillLv% damage.");
case 3 :
return("Hit all enemies around the character for 200+40*SkillLv% non-critical damage.");
switch (skill_id) {
case 1 :
return("Shoot two arrows with one shot to deal 120+20*SkillLv% damage.");
case 2 :
return("3 shots at different targets, 50+20*SkillLv% damage each.");
case 3 :
return("Shots nine arrows attacking 3x3 area around the target. Each arrow deals 50+10*SkillLv% damage.");
switch (skill_id) {
case 1 :
return("Strong shot that deals 150+50*SkillLv% damage (with no crit chance) and has 10*SkillLv% chance to stun the target.");
case 2 :
return("Character hits the enemy right in the head dealing 220+20*SkillLv% damage. This attack is always critical.");
case 3 :
return("Shot a very powerful arrow that will pierce up to 3 enemies in line. The first enemy will receive 160+20*SkillLv% damage, damage for the next enemies will be reduced for 30%. This attack is always critical.");
switch (skill_id) {
case 1 :
return("Throw 3 knives, surikens or axes at 3 nearby targets. Each throw deals 90+10*SkillLv% damage.");
case 2 :
return("3 throws at one target 50+10*SkillLv% damage each.");
case 3 :
return("Throw a ricocheting knife, axe or suriken which will hit multiple enemies. The knife will ricochet up to SkillLv times.");
return("[No skill description for fists]");
return("Increases ranged units\u2019 hit chance by 3*SkillLv%.");
return("Increases ranged units\u2019 critical hit chance by 2*SkillLv% and range by SkillLv tiles.");
return("Increases ranged units\u2019 damage by 4*SkillLv%.");
return("Increases all infantry units\u2019 HP by 5*SkillLv points and defense by SkillLv points.");
return("Increases all infantry units\u2019 damage by 2*SkillLv%.");
return("Increases all infantry units\u2019 hit and dodge chances by SkillLv%.");
return("Increases all mounted units\u2019 dodge chance by 2*SkillLv% and greatly increases their movement speed depending on SkillLv.");
return("Increases all mounted units\u2019 HP by 10*SkillLv points, defense by 3*SkillLv points and chance to block attack with the shield (if unit have one) by SkillLv%.");
return("Increases all mounted units\u2019 hit chance and damage by 3*SkillLv%.");
return("Increases HP by 10*SkillLv points and chance to block attack with the shield by SkillLv% of all units armed with one handed swords, axes or maces. If unit doesn\u2019t have a shield his block chance still will be increased. Does NOT work for units armed with dual weapons.");
return("Increases damage by 4*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases hit chance by 2*SkillLv% and dodge chance by 3*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases SP by 10*SkillLv points and SP regeneration rate by 20*SkillLv% of all East Empire\u2019s (e.g. Japanese-like) units.");
return("Increases hit chance by 2*SkillLv% and damage by 3*SkillLv% of all units armed with katana, staffs or ninja-to. Does NOT work for units armed with dual ninja-to.");
return("Increases dodge chance by 4*SkillLv% and damage by 2*SkillLv% of all units armed with daggers or katars. Also greatly increases their movement speed depending on SkillLv.");
return("Increases dodge chance by SkillLv% and damage by 2*SkillLv% of all units armed with two handed axes or maces. Also increases their movement speed depending on SkillLv.");
return("Increases damage by 10*SkillLv points, hit chance by 6*SkillLv%, critical strike chance by 10*SkillLv%, dodge chance by 5*SkillLv% and HP by 30*SkillLv points of all unarmed units.");
return("Increases hit chance by 4*SkillLv% and critical strike chance by 6*SkillLv% of all units armed with katars.");
}
}
}
}
}
}
case "staff" :
switch (skill_id) {
case 1 :
return("Hit an enemy 3 times, each hit deals 100+20*SkillLv% damage.");
case 2 :
return("Hits all enemies in 7x7 area around the character for 50+10*SkillLv% damage.");
case 3 :
return("Combo of 10 hits, each hit deals 50+10*SkillLv% damage.");
switch (skill_id) {
case 1 :
return("Fast strike that deals 200+30*SkillLv% damage. There\u2019s also a chance to poison the enemy.");
case 2 :
return("Combination of 4 critical hits (2 hits per hand). Each hit deals 100+10*SkillLv% damage.");
case 3 :
return("Hit all enemies around the character for 200+40*SkillLv% non-critical damage.");
switch (skill_id) {
case 1 :
return("Shoot two arrows with one shot to deal 120+20*SkillLv% damage.");
case 2 :
return("3 shots at different targets, 50+20*SkillLv% damage each.");
case 3 :
return("Shots nine arrows attacking 3x3 area around the target. Each arrow deals 50+10*SkillLv% damage.");
switch (skill_id) {
case 1 :
return("Strong shot that deals 150+50*SkillLv% damage (with no crit chance) and has 10*SkillLv% chance to stun the target.");
case 2 :
return("Character hits the enemy right in the head dealing 220+20*SkillLv% damage. This attack is always critical.");
case 3 :
return("Shot a very powerful arrow that will pierce up to 3 enemies in line. The first enemy will receive 160+20*SkillLv% damage, damage for the next enemies will be reduced for 30%. This attack is always critical.");
switch (skill_id) {
case 1 :
return("Throw 3 knives, surikens or axes at 3 nearby targets. Each throw deals 90+10*SkillLv% damage.");
case 2 :
return("3 throws at one target 50+10*SkillLv% damage each.");
case 3 :
return("Throw a ricocheting knife, axe or suriken which will hit multiple enemies. The knife will ricochet up to SkillLv times.");
return("[No skill description for fists]");
return("Increases ranged units\u2019 hit chance by 3*SkillLv%.");
return("Increases ranged units\u2019 critical hit chance by 2*SkillLv% and range by SkillLv tiles.");
return("Increases ranged units\u2019 damage by 4*SkillLv%.");
return("Increases all infantry units\u2019 HP by 5*SkillLv points and defense by SkillLv points.");
return("Increases all infantry units\u2019 damage by 2*SkillLv%.");
return("Increases all infantry units\u2019 hit and dodge chances by SkillLv%.");
return("Increases all mounted units\u2019 dodge chance by 2*SkillLv% and greatly increases their movement speed depending on SkillLv.");
return("Increases all mounted units\u2019 HP by 10*SkillLv points, defense by 3*SkillLv points and chance to block attack with the shield (if unit have one) by SkillLv%.");
return("Increases all mounted units\u2019 hit chance and damage by 3*SkillLv%.");
return("Increases HP by 10*SkillLv points and chance to block attack with the shield by SkillLv% of all units armed with one handed swords, axes or maces. If unit doesn\u2019t have a shield his block chance still will be increased. Does NOT work for units armed with dual weapons.");
return("Increases damage by 4*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases hit chance by 2*SkillLv% and dodge chance by 3*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases SP by 10*SkillLv points and SP regeneration rate by 20*SkillLv% of all East Empire\u2019s (e.g. Japanese-like) units.");
return("Increases hit chance by 2*SkillLv% and damage by 3*SkillLv% of all units armed with katana, staffs or ninja-to. Does NOT work for units armed with dual ninja-to.");
return("Increases dodge chance by 4*SkillLv% and damage by 2*SkillLv% of all units armed with daggers or katars. Also greatly increases their movement speed depending on SkillLv.");
return("Increases dodge chance by SkillLv% and damage by 2*SkillLv% of all units armed with two handed axes or maces. Also increases their movement speed depending on SkillLv.");
return("Increases damage by 10*SkillLv points, hit chance by 6*SkillLv%, critical strike chance by 10*SkillLv%, dodge chance by 5*SkillLv% and HP by 30*SkillLv points of all unarmed units.");
return("Increases hit chance by 4*SkillLv% and critical strike chance by 6*SkillLv% of all units armed with katars.");
}
}
}
}
}
case "katar" :
switch (skill_id) {
case 1 :
return("Fast strike that deals 200+30*SkillLv% damage. There\u2019s also a chance to poison the enemy.");
case 2 :
return("Combination of 4 critical hits (2 hits per hand). Each hit deals 100+10*SkillLv% damage.");
case 3 :
return("Hit all enemies around the character for 200+40*SkillLv% non-critical damage.");
switch (skill_id) {
case 1 :
return("Shoot two arrows with one shot to deal 120+20*SkillLv% damage.");
case 2 :
return("3 shots at different targets, 50+20*SkillLv% damage each.");
case 3 :
return("Shots nine arrows attacking 3x3 area around the target. Each arrow deals 50+10*SkillLv% damage.");
switch (skill_id) {
case 1 :
return("Strong shot that deals 150+50*SkillLv% damage (with no crit chance) and has 10*SkillLv% chance to stun the target.");
case 2 :
return("Character hits the enemy right in the head dealing 220+20*SkillLv% damage. This attack is always critical.");
case 3 :
return("Shot a very powerful arrow that will pierce up to 3 enemies in line. The first enemy will receive 160+20*SkillLv% damage, damage for the next enemies will be reduced for 30%. This attack is always critical.");
switch (skill_id) {
case 1 :
return("Throw 3 knives, surikens or axes at 3 nearby targets. Each throw deals 90+10*SkillLv% damage.");
case 2 :
return("3 throws at one target 50+10*SkillLv% damage each.");
case 3 :
return("Throw a ricocheting knife, axe or suriken which will hit multiple enemies. The knife will ricochet up to SkillLv times.");
return("[No skill description for fists]");
return("Increases ranged units\u2019 hit chance by 3*SkillLv%.");
return("Increases ranged units\u2019 critical hit chance by 2*SkillLv% and range by SkillLv tiles.");
return("Increases ranged units\u2019 damage by 4*SkillLv%.");
return("Increases all infantry units\u2019 HP by 5*SkillLv points and defense by SkillLv points.");
return("Increases all infantry units\u2019 damage by 2*SkillLv%.");
return("Increases all infantry units\u2019 hit and dodge chances by SkillLv%.");
return("Increases all mounted units\u2019 dodge chance by 2*SkillLv% and greatly increases their movement speed depending on SkillLv.");
return("Increases all mounted units\u2019 HP by 10*SkillLv points, defense by 3*SkillLv points and chance to block attack with the shield (if unit have one) by SkillLv%.");
return("Increases all mounted units\u2019 hit chance and damage by 3*SkillLv%.");
return("Increases HP by 10*SkillLv points and chance to block attack with the shield by SkillLv% of all units armed with one handed swords, axes or maces. If unit doesn\u2019t have a shield his block chance still will be increased. Does NOT work for units armed with dual weapons.");
return("Increases damage by 4*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases hit chance by 2*SkillLv% and dodge chance by 3*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases SP by 10*SkillLv points and SP regeneration rate by 20*SkillLv% of all East Empire\u2019s (e.g. Japanese-like) units.");
return("Increases hit chance by 2*SkillLv% and damage by 3*SkillLv% of all units armed with katana, staffs or ninja-to. Does NOT work for units armed with dual ninja-to.");
return("Increases dodge chance by 4*SkillLv% and damage by 2*SkillLv% of all units armed with daggers or katars. Also greatly increases their movement speed depending on SkillLv.");
return("Increases dodge chance by SkillLv% and damage by 2*SkillLv% of all units armed with two handed axes or maces. Also increases their movement speed depending on SkillLv.");
return("Increases damage by 10*SkillLv points, hit chance by 6*SkillLv%, critical strike chance by 10*SkillLv%, dodge chance by 5*SkillLv% and HP by 30*SkillLv points of all unarmed units.");
return("Increases hit chance by 4*SkillLv% and critical strike chance by 6*SkillLv% of all units armed with katars.");
}
}
}
}
case "bow" :
switch (skill_id) {
case 1 :
return("Shoot two arrows with one shot to deal 120+20*SkillLv% damage.");
case 2 :
return("3 shots at different targets, 50+20*SkillLv% damage each.");
case 3 :
return("Shots nine arrows attacking 3x3 area around the target. Each arrow deals 50+10*SkillLv% damage.");
switch (skill_id) {
case 1 :
return("Strong shot that deals 150+50*SkillLv% damage (with no crit chance) and has 10*SkillLv% chance to stun the target.");
case 2 :
return("Character hits the enemy right in the head dealing 220+20*SkillLv% damage. This attack is always critical.");
case 3 :
return("Shot a very powerful arrow that will pierce up to 3 enemies in line. The first enemy will receive 160+20*SkillLv% damage, damage for the next enemies will be reduced for 30%. This attack is always critical.");
switch (skill_id) {
case 1 :
return("Throw 3 knives, surikens or axes at 3 nearby targets. Each throw deals 90+10*SkillLv% damage.");
case 2 :
return("3 throws at one target 50+10*SkillLv% damage each.");
case 3 :
return("Throw a ricocheting knife, axe or suriken which will hit multiple enemies. The knife will ricochet up to SkillLv times.");
return("[No skill description for fists]");
return("Increases ranged units\u2019 hit chance by 3*SkillLv%.");
return("Increases ranged units\u2019 critical hit chance by 2*SkillLv% and range by SkillLv tiles.");
return("Increases ranged units\u2019 damage by 4*SkillLv%.");
return("Increases all infantry units\u2019 HP by 5*SkillLv points and defense by SkillLv points.");
return("Increases all infantry units\u2019 damage by 2*SkillLv%.");
return("Increases all infantry units\u2019 hit and dodge chances by SkillLv%.");
return("Increases all mounted units\u2019 dodge chance by 2*SkillLv% and greatly increases their movement speed depending on SkillLv.");
return("Increases all mounted units\u2019 HP by 10*SkillLv points, defense by 3*SkillLv points and chance to block attack with the shield (if unit have one) by SkillLv%.");
return("Increases all mounted units\u2019 hit chance and damage by 3*SkillLv%.");
return("Increases HP by 10*SkillLv points and chance to block attack with the shield by SkillLv% of all units armed with one handed swords, axes or maces. If unit doesn\u2019t have a shield his block chance still will be increased. Does NOT work for units armed with dual weapons.");
return("Increases damage by 4*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases hit chance by 2*SkillLv% and dodge chance by 3*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases SP by 10*SkillLv points and SP regeneration rate by 20*SkillLv% of all East Empire\u2019s (e.g. Japanese-like) units.");
return("Increases hit chance by 2*SkillLv% and damage by 3*SkillLv% of all units armed with katana, staffs or ninja-to. Does NOT work for units armed with dual ninja-to.");
return("Increases dodge chance by 4*SkillLv% and damage by 2*SkillLv% of all units armed with daggers or katars. Also greatly increases their movement speed depending on SkillLv.");
return("Increases dodge chance by SkillLv% and damage by 2*SkillLv% of all units armed with two handed axes or maces. Also increases their movement speed depending on SkillLv.");
return("Increases damage by 10*SkillLv points, hit chance by 6*SkillLv%, critical strike chance by 10*SkillLv%, dodge chance by 5*SkillLv% and HP by 30*SkillLv points of all unarmed units.");
return("Increases hit chance by 4*SkillLv% and critical strike chance by 6*SkillLv% of all units armed with katars.");
}
}
}
case "crossbow" :
switch (skill_id) {
case 1 :
return("Strong shot that deals 150+50*SkillLv% damage (with no crit chance) and has 10*SkillLv% chance to stun the target.");
case 2 :
return("Character hits the enemy right in the head dealing 220+20*SkillLv% damage. This attack is always critical.");
case 3 :
return("Shot a very powerful arrow that will pierce up to 3 enemies in line. The first enemy will receive 160+20*SkillLv% damage, damage for the next enemies will be reduced for 30%. This attack is always critical.");
switch (skill_id) {
case 1 :
return("Throw 3 knives, surikens or axes at 3 nearby targets. Each throw deals 90+10*SkillLv% damage.");
case 2 :
return("3 throws at one target 50+10*SkillLv% damage each.");
case 3 :
return("Throw a ricocheting knife, axe or suriken which will hit multiple enemies. The knife will ricochet up to SkillLv times.");
return("[No skill description for fists]");
return("Increases ranged units\u2019 hit chance by 3*SkillLv%.");
return("Increases ranged units\u2019 critical hit chance by 2*SkillLv% and range by SkillLv tiles.");
return("Increases ranged units\u2019 damage by 4*SkillLv%.");
return("Increases all infantry units\u2019 HP by 5*SkillLv points and defense by SkillLv points.");
return("Increases all infantry units\u2019 damage by 2*SkillLv%.");
return("Increases all infantry units\u2019 hit and dodge chances by SkillLv%.");
return("Increases all mounted units\u2019 dodge chance by 2*SkillLv% and greatly increases their movement speed depending on SkillLv.");
return("Increases all mounted units\u2019 HP by 10*SkillLv points, defense by 3*SkillLv points and chance to block attack with the shield (if unit have one) by SkillLv%.");
return("Increases all mounted units\u2019 hit chance and damage by 3*SkillLv%.");
return("Increases HP by 10*SkillLv points and chance to block attack with the shield by SkillLv% of all units armed with one handed swords, axes or maces. If unit doesn\u2019t have a shield his block chance still will be increased. Does NOT work for units armed with dual weapons.");
return("Increases damage by 4*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases hit chance by 2*SkillLv% and dodge chance by 3*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases SP by 10*SkillLv points and SP regeneration rate by 20*SkillLv% of all East Empire\u2019s (e.g. Japanese-like) units.");
return("Increases hit chance by 2*SkillLv% and damage by 3*SkillLv% of all units armed with katana, staffs or ninja-to. Does NOT work for units armed with dual ninja-to.");
return("Increases dodge chance by 4*SkillLv% and damage by 2*SkillLv% of all units armed with daggers or katars. Also greatly increases their movement speed depending on SkillLv.");
return("Increases dodge chance by SkillLv% and damage by 2*SkillLv% of all units armed with two handed axes or maces. Also increases their movement speed depending on SkillLv.");
return("Increases damage by 10*SkillLv points, hit chance by 6*SkillLv%, critical strike chance by 10*SkillLv%, dodge chance by 5*SkillLv% and HP by 30*SkillLv points of all unarmed units.");
return("Increases hit chance by 4*SkillLv% and critical strike chance by 6*SkillLv% of all units armed with katars.");
}
}
case "throwing" :
switch (skill_id) {
case 1 :
return("Throw 3 knives, surikens or axes at 3 nearby targets. Each throw deals 90+10*SkillLv% damage.");
case 2 :
return("3 throws at one target 50+10*SkillLv% damage each.");
case 3 :
return("Throw a ricocheting knife, axe or suriken which will hit multiple enemies. The knife will ricochet up to SkillLv times.");
return("[No skill description for fists]");
return("Increases ranged units\u2019 hit chance by 3*SkillLv%.");
return("Increases ranged units\u2019 critical hit chance by 2*SkillLv% and range by SkillLv tiles.");
return("Increases ranged units\u2019 damage by 4*SkillLv%.");
return("Increases all infantry units\u2019 HP by 5*SkillLv points and defense by SkillLv points.");
return("Increases all infantry units\u2019 damage by 2*SkillLv%.");
return("Increases all infantry units\u2019 hit and dodge chances by SkillLv%.");
return("Increases all mounted units\u2019 dodge chance by 2*SkillLv% and greatly increases their movement speed depending on SkillLv.");
return("Increases all mounted units\u2019 HP by 10*SkillLv points, defense by 3*SkillLv points and chance to block attack with the shield (if unit have one) by SkillLv%.");
return("Increases all mounted units\u2019 hit chance and damage by 3*SkillLv%.");
return("Increases HP by 10*SkillLv points and chance to block attack with the shield by SkillLv% of all units armed with one handed swords, axes or maces. If unit doesn\u2019t have a shield his block chance still will be increased. Does NOT work for units armed with dual weapons.");
return("Increases damage by 4*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases hit chance by 2*SkillLv% and dodge chance by 3*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
return("Increases SP by 10*SkillLv points and SP regeneration rate by 20*SkillLv% of all East Empire\u2019s (e.g. Japanese-like) units.");
return("Increases hit chance by 2*SkillLv% and damage by 3*SkillLv% of all units armed with katana, staffs or ninja-to. Does NOT work for units armed with dual ninja-to.");
return("Increases dodge chance by 4*SkillLv% and damage by 2*SkillLv% of all units armed with daggers or katars. Also greatly increases their movement speed depending on SkillLv.");
return("Increases dodge chance by SkillLv% and damage by 2*SkillLv% of all units armed with two handed axes or maces. Also increases their movement speed depending on SkillLv.");
return("Increases damage by 10*SkillLv points, hit chance by 6*SkillLv%, critical strike chance by 10*SkillLv%, dodge chance by 5*SkillLv% and HP by 30*SkillLv points of all unarmed units.");
return("Increases hit chance by 4*SkillLv% and critical strike chance by 6*SkillLv% of all units armed with katars.");
}
case "fists" :
return("[No skill description for fists]");
case "Bowmen_1" :
return("Increases ranged units\u2019 hit chance by 3*SkillLv%.");
case "Bowmen_2" :
return("Increases ranged units\u2019 critical hit chance by 2*SkillLv% and range by SkillLv tiles.");
case "Bowmen_3" :
return("Increases ranged units\u2019 damage by 4*SkillLv%.");
case "Infantry_1" :
return("Increases all infantry units\u2019 HP by 5*SkillLv points and defense by SkillLv points.");
case "Infantry_2" :
return("Increases all infantry units\u2019 damage by 2*SkillLv%.");
case "Infantry_3" :
return("Increases all infantry units\u2019 hit and dodge chances by SkillLv%.");
case "Horsemen_1" :
return("Increases all mounted units\u2019 dodge chance by 2*SkillLv% and greatly increases their movement speed depending on SkillLv.");
case "Horsemen_2" :
return("Increases all mounted units\u2019 HP by 10*SkillLv points, defense by 3*SkillLv points and chance to block attack with the shield (if unit have one) by SkillLv%.");
case "Horsemen_3" :
return("Increases all mounted units\u2019 hit chance and damage by 3*SkillLv%.");
case "Swordsmen_1" :
return("Increases HP by 10*SkillLv points and chance to block attack with the shield by SkillLv% of all units armed with one handed swords, axes or maces. If unit doesn\u2019t have a shield his block chance still will be increased. Does NOT work for units armed with dual weapons.");
case "Swordsmen_2" :
return("Increases damage by 4*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
case "Swordsmen_3" :
return("Increases hit chance by 2*SkillLv% and dodge chance by 3*SkillLv% of all units armed with one handed swords, axes or maces. Does NOT work for units armed with dual weapons.");
case "Meditate" :
return("Increases SP by 10*SkillLv points and SP regeneration rate by 20*SkillLv% of all East Empire\u2019s (e.g. Japanese-like) units.");
case "FarEastWarTraining" :
return("Increases hit chance by 2*SkillLv% and damage by 3*SkillLv% of all units armed with katana, staffs or ninja-to. Does NOT work for units armed with dual ninja-to.");
case "AssassinTraining" :
return("Increases dodge chance by 4*SkillLv% and damage by 2*SkillLv% of all units armed with daggers or katars. Also greatly increases their movement speed depending on SkillLv.");
case "BerserkerTraining" :
return("Increases dodge chance by SkillLv% and damage by 2*SkillLv% of all units armed with two handed axes or maces. Also increases their movement speed depending on SkillLv.");
case "KungFuSecrets" :
return("Increases damage by 10*SkillLv points, hit chance by 6*SkillLv%, critical strike chance by 10*SkillLv%, dodge chance by 5*SkillLv% and HP by 30*SkillLv points of all unarmed units.");
case "FindWeakPoint" :
return("Increases hit chance by 4*SkillLv% and critical strike chance by 6*SkillLv% of all units armed with katars.");
}
return(("No such skill for " + skill_name) + skill_id);
}
}
Symbol 3139 MovieClip [__Packages.Aura] Frame 0
class Aura
{
var TYPE, caster, skill_lv, back_ref, sp_cost;
function Aura (aura_id, lv, cstr, br) {
TYPE = aura_id;
caster = cstr;
skill_lv = lv;
back_ref = br;
sp_cost = getCostSP(TYPE);
}
static function getName(aura_id) {
switch (aura_id) {
case "Devotion" :
return("Devotion");
case "DivineHelp" :
return("Divine Help");
case "Barrier" :
return("Barrier");
case "Sacrifice" :
return("Sacrifice");
case "ForceBalance" :
return("Balance of Force");
case "VenomCloud" :
return("Venom Cloud");
case "HolyTribunal" :
return("Holy Tribunal");
case "UnholyBreath" :
return("Unholy Breath");
case "LifeLeech" :
return("Life Leech");
case "SoulDrain" :
return("Soul Drain");
case "Healing" :
return("Healing");
case "BansheeCry" :
return("Banshee Cry");
case "NationViz" :
return("Sign of Trade Republic");
case "NationGer" :
return("Sign of Holy Order");
case "NationRus" :
return("Sign of Forest Lands");
case "NationJap" :
return("Sign of East Empire");
case "NationMon" :
return("Sign of Black Horde");
case "NationAra" :
return("Sign of South Desert");
}
}
static function getCostSP(aura_id) {
switch (aura_id) {
case "Devotion" :
return(10);
case "DivineHelp" :
return(10);
case "Barrier" :
return(15);
case "Sacrifice" :
return(15);
case "ForceBalance" :
return(18);
case "VenomCloud" :
return(10);
case "HolyTribunal" :
return(15);
case "UnholyBreath" :
return(30);
case "LifeLeech" :
return(20);
case "SoulDrain" :
return(0);
case "Healing" :
return(8);
case "BansheeCry" :
return(5);
case "NationViz" :
return(20);
case "NationGer" :
return(20);
case "NationRus" :
return(20);
case "NationJap" :
return(20);
case "NationMon" :
return(20);
case "NationAra" :
return(20);
}
}
static function getFrame(aura_id) {
var _local1 = 60;
switch (aura_id) {
case "Devotion" :
return(_local1);
case "DivineHelp" :
return(_local1 + 1);
case "Barrier" :
return(_local1 + 2);
case "Sacrifice" :
return(_local1 + 3);
case "ForceBalance" :
return(_local1 + 4);
case "VenomCloud" :
return(_local1 + 5);
case "HolyTribunal" :
return(_local1 + 6);
case "UnholyBreath" :
return(_local1 + 7);
case "LifeLeech" :
return(_local1 + 8);
case "SoulDrain" :
return(_local1 + 9);
case "Healing" :
return(_local1 + 10);
case "BansheeCry" :
return(_local1 + 11);
case "NationViz" :
return(_local1 + 12);
case "NationGer" :
return(_local1 + 13);
case "NationRus" :
return(_local1 + 14);
case "NationJap" :
return(_local1 + 15);
case "NationMon" :
return(_local1 + 16);
case "NationAra" :
return(_local1 + 17);
}
}
function operate(team0, team1) {
if (caster.HP <= 0) {
return(false);
}
if (caster.SP < sp_cost) {
return(false);
}
caster.SP = caster.SP - sp_cost;
if (this["aura_" + TYPE]) {
if (caster.team == 0) {
this["aura_" + TYPE](team0, team1);
} else {
this["aura_" + TYPE](team1, team0);
}
}
return(true);
}
function aura_Devotion(friends, enemies) {
var _local2 = 0;
while (_local2 < friends.length) {
friends[_local2].healHP(7 * skill_lv);
_local2++;
}
}
function aura_DivineHelp(friends, enemies) {
var _local2 = 0;
while (_local2 < friends.length) {
if (friends[_local2].HP < friends[_local2].MAX_HP) {
friends[_local2].healHP(50 * skill_lv);
caster.attachMovie("StarsAnim", "anim", 1);
break;
}
_local2++;
}
}
function aura_Barrier(friends, enemies) {
var _local3 = _root.dice(friends.length - 1);
friends[_local3].HP = friends[_local3].HP + (30 * skill_lv);
friends[_local3].attachMovie("BarrierAnim", "anim", 1);
}
function aura_Sacrifice(friends, enemies) {
var _local2 = 0;
while (_local2 < friends.length) {
friends[_local2].healHP(100 * skill_lv);
_local2++;
}
caster.takeDamage(new DamageData(null, 0.19 * caster.MAX_HP, 100, 100), false);
}
function aura_ForceBalance(friends, enemies) {
var _local2 = 0;
while (_local2 < friends.length) {
friends[_local2].healHP(Math.round((0.01 * skill_lv) * friends[_local2].MAX_HP));
_local2++;
}
_local2 = 0;
while (_local2 < enemies.length) {
enemies[_local2].HP = enemies[_local2].HP - Math.round((0.01 * skill_lv) * enemies[_local2].MAX_HP);
if (enemies[_local2].HP <= 0) {
enemies[_local2].HP = 1;
}
_local2++;
}
caster.attachMovie("BalanceAnim", "anim", 1);
}
function aura_VenomCloud(friends, enemies) {
var _local3 = 0;
while (_local3 < skill_lv) {
var _local4 = _root.dice(enemies.length - 1);
enemies[_local4].addStatus(new Status("Poison", 5));
_local3++;
}
caster.attachMovie("VenomCluodAnim", "anim", 1);
}
function aura_HolyTribunal(friends, enemies) {
var _local3 = _root.dice(enemies.length - 1);
enemies[_local3].attachMovie("LightningAnim", "anim", 1);
enemies[_local3].anim._xscale = enemies[_local3].anim._xscale * 2;
enemies[_local3].anim._yscale = enemies[_local3].anim._yscale * 2;
enemies[_local3].takeDamage(new DamageData(null, 50 * skill_lv, 100, 100), false);
}
function aura_UnholyBreath(friends, enemies) {
var _local3 = 0;
while (_local3 < enemies.length) {
if (_root.percent(3)) {
enemies[_local3].addMessage(enemies[_local3].MAX_HP, "FlyDamage");
enemies[_local3].die();
return(undefined);
}
if (_root.percent(skill_lv * 2)) {
enemies[_local3].addStatus(new Status("Poison", 5));
}
if (_root.percent(skill_lv * 2)) {
enemies[_local3].addStatus(new Status("Stun", 5));
}
if (_root.percent(skill_lv * 2)) {
enemies[_local3].addStatus(new Status("Chaos", 5));
}
_local3++;
}
caster.attachMovie("UnholyBreathAnim", "anim", 1);
}
function aura_LifeLeech(friends, enemies) {
if (friends.length == 0) {
return(undefined);
}
var _local2 = 0;
while (_local2 < friends.length) {
friends[_local2].HP = friends[_local2].HP - Math.round(0.2 * friends[_local2].MAX_HP);
if (friends[_local2].HP <= 0) {
friends[_local2].HP = 1;
}
friends[_local2].attachMovie("LifeLeechAnim", "anim", 1);
friends[_local2].redrawHealthBar();
_local2++;
}
caster.healHP((0.05 * skill_lv) * caster.MAX_HP);
}
function aura_SoulDrain(friends, enemies) {
if (friends.length == 0) {
return(undefined);
}
var _local2 = 0;
while (_local2 < friends.length) {
friends[_local2].HP = friends[_local2].HP - Math.round(0.2 * friends[_local2].MAX_HP);
if (friends[_local2].HP <= 0) {
friends[_local2].HP = 1;
}
friends[_local2].attachMovie("SoulDrainAnim", "anim", 1);
friends[_local2].redrawHealthBar();
_local2++;
}
caster.SP = caster.SP + Math.round((0.04 * skill_lv) * caster.MAX_SP);
if (caster.SP > caster.MAX_SP) {
caster.SP = caster.MAX_SP;
}
}
function aura_Healing(friends, enemies) {
caster.healHP(15 * skill_lv);
}
function aura_BansheeCry(friends, enemies) {
var _local2 = 0;
while (_local2 < enemies.length) {
enemies[_local2].takeDamage(new DamageData(null, 15 * skill_lv, 100, 100), false);
_local2++;
}
caster.attachMovie("BansheeCryAnim", "anim", 1);
caster.takeDamage(new DamageData(null, 0.19 * caster.MAX_HP, 100, 100), false);
}
function aura_NationViz(friends, enemies) {
var _local2 = 0;
while (_local2 < friends.length) {
if (friends[_local2].unit_ref.NATION == "Viz") {
friends[_local2].healHP(Math.round((0.02 * skill_lv) * friends[_local2].MAX_HP));
} else {
friends[_local2].HP = friends[_local2].HP - Math.round((0.02 * skill_lv) * friends[_local2].MAX_HP);
if (friends[_local2].HP <= 0) {
friends[_local2].HP = 1;
}
friends[_local2].redrawHealthBar();
}
_local2++;
}
}
function aura_NationGer(friends, enemies) {
var _local2 = 0;
while (_local2 < friends.length) {
if (friends[_local2].unit_ref.NATION == "Ger") {
friends[_local2].healHP(Math.round((0.02 * skill_lv) * friends[_local2].MAX_HP));
} else {
friends[_local2].HP = friends[_local2].HP - Math.round((0.02 * skill_lv) * friends[_local2].MAX_HP);
if (friends[_local2].HP <= 0) {
friends[_local2].HP = 1;
}
friends[_local2].redrawHealthBar();
}
_local2++;
}
}
function aura_NationRus(friends, enemies) {
var _local2 = 0;
while (_local2 < friends.length) {
if (friends[_local2].unit_ref.NATION == "Rus") {
friends[_local2].healHP(Math.round((0.02 * skill_lv) * friends[_local2].MAX_HP));
} else {
friends[_local2].HP = friends[_local2].HP - Math.round((0.02 * skill_lv) * friends[_local2].MAX_HP);
if (friends[_local2].HP <= 0) {
friends[_local2].HP = 1;
}
friends[_local2].redrawHealthBar();
}
_local2++;
}
}
function aura_NationJap(friends, enemies) {
var _local2 = 0;
while (_local2 < friends.length) {
if (friends[_local2].unit_ref.NATION == "Jap") {
friends[_local2].healHP(Math.round((0.02 * skill_lv) * friends[_local2].MAX_HP));
} else {
friends[_local2].HP = friends[_local2].HP - Math.round((0.02 * skill_lv) * friends[_local2].MAX_HP);
if (friends[_local2].HP <= 0) {
friends[_local2].HP = 1;
}
friends[_local2].redrawHealthBar();
}
_local2++;
}
}
function aura_NationMon(friends, enemies) {
var _local2 = 0;
while (_local2 < friends.length) {
if (friends[_local2].unit_ref.NATION == "Mon") {
friends[_local2].healHP(Math.round((0.02 * skill_lv) * friends[_local2].MAX_HP));
} else {
friends[_local2].HP = friends[_local2].HP - Math.round((0.02 * skill_lv) * friends[_local2].MAX_HP);
if (friends[_local2].HP <= 0) {
friends[_local2].HP = 1;
}
friends[_local2].redrawHealthBar();
}
_local2++;
}
}
function aura_NationAra(friends, enemies) {
var _local2 = 0;
while (_local2 < friends.length) {
if (friends[_local2].unit_ref.NATION == "Ara") {
friends[_local2].healHP(Math.round((0.02 * skill_lv) * friends[_local2].MAX_HP));
} else {
friends[_local2].HP = friends[_local2].HP - Math.round((0.02 * skill_lv) * friends[_local2].MAX_HP);
if (friends[_local2].HP <= 0) {
friends[_local2].HP = 1;
}
friends[_local2].redrawHealthBar();
}
_local2++;
}
}
static function getDescription(aura_id) {
switch (aura_id) {
case "Devotion" :
return("Heals all friendly units for 7*SkillLv HP every second.");
case "DivineHelp" :
return("Heals random injured unit for 50*SkillLv HP every second.");
case "Barrier" :
return("Adds 30*SkillLv HP to random friendly unit every second. This bonus HP can even go higher than unit\u2019s max HP.");
case "Sacrifice" :
return("Caster looses 20% of his max HP every second and heals all friendly units for 100*SkillLv HP every second. Warning: this aura CAN kill the caster.");
case "ForceBalance" :
return("All friendly units recover SkillLv% of their max HP every second and all enemy units loose SkillLv% of their max HP every second. This aura cannot kill enemy units: they will have at least 1 HP.");
case "VenomCloud" :
return("Poison SkillLv enemies every second. Poison status lasts 5 seconds. Poisoned unit looses 5% of max HP every second, but cannot die from poison.");
case "HolyTribunal" :
return("Deals 50*SkillLv damage to random enemy every second. This damage is always critical and cannot be avoided.");
case "UnholyBreath" :
return("Gives 2*SkillLv% chance of poisoning, stunning or making mad all enemy units every second. All statuses last 5 seconds. Mad unit attacks nearest character, friend or foe, and is attacked by his own allies. There\u2019s also a 3% chance to instantly kill a unit.");
case "LifeLeech" :
return("All FRIENDLY units loose 20% of their max HP and caster recovers 5*SkillLv% of his/her max HP every second. This aura cannot kill friendly units, but doesn\u2019t work when there\u2019re no friendly units anymore.");
case "SoulDrain" :
return("All FRIENDLY units loose 20% of their max HP and caster recovers 4*SkillLv% of his/her max SP every second. This aura cannot kill friendly units, but doesn\u2019t work when there\u2019re no friendly units anymore.");
case "Healing" :
return("Heals caster for 15*SkillLv HP every second.");
case "BansheeCry" :
return("Every second caster sacrifices 20% of his max HP to deal 15*SkillLv damage to every of his enemies. Neither enemies nor caster can avoid this damage and it\u2019s always critical. Warning: this aura CAN kill the caster.");
case "NationViz" :
return("Heals all Trade Republic\u2019s units for 2*SkillLv% of their max HP, but other units suffer damage of 2*SkillLv% of their max HP (but this damage cannot kill them). This aura works only for friendly units.");
case "NationGer" :
return("Heals all Holy Order\u2019s units for 2*SkillLv% of their max HP, but other units suffer damage of 2*SkillLv% of their max HP (but this damage cannot kill them). This aura works only for friendly units.");
case "NationRus" :
return("Heals all Forest Lands\u2019 units for 2*SkillLv% of their max HP, but other units suffer damage of 2*SkillLv% of their max HP (but this damage cannot kill them). This aura works only for friendly units.");
case "NationJap" :
return("Heals all East Empire\u2019s units for 2*SkillLv% of their max HP, but other units suffer damage of 2*SkillLv% of their max HP (but this damage cannot kill them). This aura works only for friendly units.");
case "NationMon" :
return("Heals all Black Horde\u2019s units for 2*SkillLv% of their max HP, but other units suffer damage of 2*SkillLv% of their max HP (but this damage cannot kill them). This aura works only for friendly units.");
case "NationAra" :
return("Heals all South Desert Clan\u2019s units for 2*SkillLv% of their max HP, but other units suffer damage of 2*SkillLv% of their max HP (but this damage cannot kill them). This aura works only for friendly units.");
}
}
}
Symbol 3140 MovieClip [__Packages.ItemInfo] Frame 0
class ItemInfo extends Object
{
var CATEGORY, TYPE, NATION, LEVEL, COUNT, ENCH_ID, REFINE;
function ItemInfo (ct, tp, nt, lv, ei, rf) {
super();
CATEGORY = ct;
TYPE = tp;
NATION = nt;
LEVEL = lv;
COUNT = 1;
ENCH_ID = (ei ? (ei) : null);
REFINE = (rf ? (rf) : 0);
}
function getItem() {
switch (CATEGORY) {
case "WeaponClass" :
return(new WeaponClass(TYPE, NATION, LEVEL, ENCH_ID, REFINE));
case "Armor" :
return(new Armor(TYPE, NATION, LEVEL, ENCH_ID, REFINE));
case "Rune" :
return(new Rune(ENCH_ID, REFINE));
}
}
function getCopy() {
var _local2 = getSingleCopy();
_local2.COUNT = COUNT;
return(_local2);
}
function getSingleCopy() {
return(new ItemInfo(CATEGORY, TYPE, NATION, LEVEL, ENCH_ID, REFINE));
}
}
Symbol 3141 MovieClip [__Packages.Armor] Frame 0
class Armor extends Item
{
var TYPE, NATION, LEVEL, FRAME, getFrame, initEnchant, setRefine, NAME, value, require_param, require_value, HP_mod, SP_mod, price;
function Armor (tp, nt, lv, ei, rf) {
super();
TYPE = tp;
NATION = nt;
LEVEL = lv;
FRAME = getFrame();
this[(("Armor" + tp) + nt) + lv]();
initEnchant(ei);
setRefine(rf);
}
function ArmorClothesViz1() {
NAME = "Leather Armor";
value = 8;
require_param = "CON";
require_value = 18;
HP_mod = 8;
SP_mod = -2;
price = 288;
}
function ArmorHelmetViz1() {
NAME = "Light Helmet";
value = 3;
require_param = "CON";
require_value = 18;
HP_mod = 4;
SP_mod = -1;
price = 216;
}
function ArmorClothesViz2() {
NAME = "Bronze+Leather Armor";
value = 10;
require_param = "CON";
require_value = 23;
HP_mod = 16;
SP_mod = -4;
price = 460;
}
function ArmorHelmetViz2() {
NAME = "Hard Helmet";
value = 3;
require_param = "CON";
require_value = 23;
HP_mod = 8;
SP_mod = -2;
price = 276;
}
function ArmorClothesViz3() {
NAME = "Phalax Armor";
value = 14;
require_param = "CON";
require_value = 29;
HP_mod = 24;
SP_mod = -6;
price = 812;
}
function ArmorHelmetViz3() {
NAME = "Phalax Helmet";
value = 5;
require_param = "CON";
require_value = 29;
HP_mod = 12;
SP_mod = -3;
price = 580;
}
function ArmorClothesViz4() {
NAME = "Centurion Chainmail";
value = 19;
require_param = "CON";
require_value = 36;
HP_mod = 32;
SP_mod = -8;
price = 1368;
}
function ArmorHelmetViz4() {
NAME = "Centurion Helmet";
value = 6;
require_param = "CON";
require_value = 36;
HP_mod = 16;
SP_mod = -4;
price = 864;
}
function ArmorClothesViz5() {
NAME = "Curasis";
value = 26;
require_param = "CON";
require_value = 45;
HP_mod = 40;
SP_mod = -10;
price = 2340;
}
function ArmorHelmetViz5() {
NAME = "Chivalry Helmet";
value = 9;
require_param = "CON";
require_value = 45;
HP_mod = 20;
SP_mod = -5;
price = 1620;
}
function ArmorClothesViz6() {
NAME = "Shining Full Plate";
value = 36;
require_param = "CON";
require_value = 57;
HP_mod = 48;
SP_mod = -12;
price = 4104;
}
function ArmorHelmetViz6() {
NAME = "Leader Helmet";
value = 12;
require_param = "CON";
require_value = 57;
HP_mod = 24;
SP_mod = -6;
price = 2736;
}
function ArmorClothesViz7() {
NAME = "Commander's Full Plate";
value = 49;
require_param = "CON";
require_value = 72;
HP_mod = 56;
SP_mod = -14;
price = 7056;
}
function ArmorHelmetViz7() {
NAME = "Winged Helmet";
value = 16;
require_param = "CON";
require_value = 72;
HP_mod = 28;
SP_mod = -7;
price = 4608;
}
function ArmorClothesViz8() {
NAME = "Emperror's Full Plate";
value = 66;
require_param = "CON";
require_value = 90;
HP_mod = 64;
SP_mod = -16;
price = 11880;
}
function ArmorHelmetViz8() {
NAME = "Golden Crown";
value = 22;
require_param = "CON";
require_value = 90;
HP_mod = 32;
SP_mod = -8;
price = 7920;
}
function ArmorClothesGer1() {
NAME = "Tunic";
value = 4;
require_param = "CON";
require_value = 20;
HP_mod = 12;
SP_mod = -4;
price = 160;
}
function ArmorHelmetGer1() {
NAME = "Infantry Helmet";
value = 1;
require_param = "CON";
require_value = 20;
HP_mod = 6;
SP_mod = -2;
price = 80;
}
function ArmorClothesGer2() {
NAME = "Footmen Armor";
value = 11;
require_param = "CON";
require_value = 25;
HP_mod = 24;
SP_mod = -8;
price = 550;
}
function ArmorHelmetGer2() {
NAME = "Footman Helmet";
value = 4;
require_param = "CON";
require_value = 25;
HP_mod = 12;
SP_mod = -4;
price = 400;
}
function ArmorClothesGer3() {
NAME = "Long Chainmail";
value = 16;
require_param = "CON";
require_value = 32;
HP_mod = 36;
SP_mod = -12;
price = 1024;
}
function ArmorHelmetGer3() {
NAME = "Knight Helmet";
value = 5;
require_param = "CON";
require_value = 32;
HP_mod = 18;
SP_mod = -6;
price = 640;
}
function ArmorClothesGer4() {
NAME = "Crusader Chainmail";
value = 21;
require_param = "CON";
require_value = 40;
HP_mod = 48;
SP_mod = -16;
price = 1680;
}
function ArmorHelmetGer4() {
NAME = "Steel Helmet";
value = 7;
require_param = "CON";
require_value = 40;
HP_mod = 24;
SP_mod = -8;
price = 1120;
}
function ArmorClothesGer5() {
NAME = "Silver Full Plate";
value = 29;
require_param = "CON";
require_value = 50;
HP_mod = 60;
SP_mod = -20;
price = 2900;
}
function ArmorHelmetGer5() {
NAME = "Silver Helmet";
value = 10;
require_param = "CON";
require_value = 50;
HP_mod = 30;
SP_mod = -10;
price = 2000;
}
function ArmorClothesGer6() {
NAME = "Redeemer Full Plate";
value = 39;
require_param = "CON";
require_value = 63;
HP_mod = 72;
SP_mod = -24;
price = 4914;
}
function ArmorHelmetGer6() {
NAME = "Crusader Helmet";
value = 13;
require_param = "CON";
require_value = 63;
HP_mod = 36;
SP_mod = -12;
price = 3276;
}
function ArmorClothesGer7() {
NAME = "Serafim Full Plate";
value = 53;
require_param = "CON";
require_value = 79;
HP_mod = 84;
SP_mod = -28;
price = 8374;
}
function ArmorHelmetGer7() {
NAME = "Serafim Helmet";
value = 18;
require_param = "CON";
require_value = 79;
HP_mod = 42;
SP_mod = -14;
price = 5688;
}
function ArmorClothesGer8() {
NAME = "Infernal Armor";
value = 72;
require_param = "CON";
require_value = 100;
HP_mod = 96;
SP_mod = -32;
price = 14400;
}
function ArmorHelmetGer8() {
NAME = "Infernal Helmet";
value = 24;
require_param = "CON";
require_value = 100;
HP_mod = 48;
SP_mod = -16;
price = 9600;
}
function ArmorClothesRus1() {
NAME = "Dark Leather Armor";
value = 6;
require_param = "STR";
require_value = 20;
HP_mod = 8;
SP_mod = 6;
price = 240;
}
function ArmorHelmetRus1() {
NAME = "Leather Helmet";
value = 2;
require_param = "STR";
require_value = 20;
HP_mod = 4;
SP_mod = 3;
price = 160;
}
function ArmorClothesRus2() {
NAME = "Hard Leather Armor";
value = 9;
require_param = "STR";
require_value = 25;
HP_mod = 16;
SP_mod = 12;
price = 450;
}
function ArmorHelmetRus2() {
NAME = "Iron+Leather Helmet";
value = 3;
require_param = "STR";
require_value = 25;
HP_mod = 8;
SP_mod = 6;
price = 300;
}
function ArmorClothesRus3() {
NAME = "Short Chainmail";
value = 12;
require_param = "STR";
require_value = 32;
HP_mod = 24;
SP_mod = 18;
price = 768;
}
function ArmorHelmetRus3() {
NAME = "Guardian Helmet";
value = 4;
require_param = "STR";
require_value = 32;
HP_mod = 12;
SP_mod = 9;
price = 512;
}
function ArmorClothesRus4() {
NAME = "Warrior Chainmail";
value = 16;
require_param = "STR";
require_value = 40;
HP_mod = 32;
SP_mod = 24;
price = 1280;
}
function ArmorHelmetRus4() {
NAME = "Warrior Helmet";
value = 5;
require_param = "STR";
require_value = 40;
HP_mod = 16;
SP_mod = 12;
price = 800;
}
function ArmorClothesRus5() {
NAME = "Guardian Full Plate";
value = 22;
require_param = "STR";
require_value = 50;
HP_mod = 40;
SP_mod = 30;
price = 2200;
}
function ArmorHelmetRus5() {
NAME = "Veteran Helmet";
value = 7;
require_param = "STR";
require_value = 50;
HP_mod = 20;
SP_mod = 15;
price = 1400;
}
function ArmorClothesRus6() {
NAME = "Hero Full Plate";
value = 29;
require_param = "STR";
require_value = 63;
HP_mod = 48;
SP_mod = 36;
price = 3654;
}
function ArmorHelmetRus6() {
NAME = "Hero Helmet";
value = 10;
require_param = "STR";
require_value = 63;
HP_mod = 24;
SP_mod = 18;
price = 2520;
}
function ArmorClothesRus7() {
NAME = "Forest Keeper's Armor";
value = 40;
require_param = "STR";
require_value = 79;
HP_mod = 56;
SP_mod = 42;
price = 6320;
}
function ArmorHelmetRus7() {
NAME = "Berserker Helmet";
value = 13;
require_param = "STR";
require_value = 79;
HP_mod = 28;
SP_mod = 21;
price = 4108;
}
function ArmorClothesRus8() {
NAME = "Holy Plate Armor";
value = 54;
require_param = "STR";
require_value = 100;
HP_mod = 64;
SP_mod = 48;
price = 10800;
}
function ArmorHelmetRus8() {
NAME = "Czar's Helmet";
value = 18;
require_param = "STR";
require_value = 100;
HP_mod = 32;
SP_mod = 24;
price = 7200;
}
function ArmorClothesJap1() {
NAME = "Kimono";
value = 2;
require_param = "DEX";
require_value = 20;
HP_mod = 0;
SP_mod = 12;
price = 80;
}
function ArmorHelmetJap1() {
NAME = "Bandana";
value = 1;
require_param = "DEX";
require_value = 20;
HP_mod = 0;
SP_mod = 6;
price = 80;
}
function ArmorClothesJap2() {
NAME = "Hard Kimono";
value = 8;
require_param = "DEX";
require_value = 25;
HP_mod = 0;
SP_mod = 24;
price = 400;
}
function ArmorHelmetJap2() {
NAME = "Hood";
value = 3;
require_param = "DEX";
require_value = 25;
HP_mod = 0;
SP_mod = 12;
price = 300;
}
function ArmorClothesJap3() {
NAME = "Ninja Armor";
value = 10;
require_param = "DEX";
require_value = 32;
HP_mod = 0;
SP_mod = 36;
price = 640;
}
function ArmorHelmetJap3() {
NAME = "Ninja Helmet";
value = 3;
require_param = "DEX";
require_value = 32;
HP_mod = 0;
SP_mod = 18;
price = 384;
}
function ArmorClothesJap4() {
NAME = "Golden Ninja Armor";
value = 14;
require_param = "DEX";
require_value = 40;
HP_mod = 0;
SP_mod = 48;
price = 1120;
}
function ArmorHelmetJap4() {
NAME = "Black Ninja Helmet";
value = 5;
require_param = "DEX";
require_value = 40;
HP_mod = 0;
SP_mod = 24;
price = 800;
}
function ArmorClothesJap5() {
NAME = "Golden Samurai Armor";
value = 19;
require_param = "DEX";
require_value = 50;
HP_mod = 0;
SP_mod = 60;
price = 1900;
}
function ArmorHelmetJap5() {
NAME = "Samurai Mask";
value = 6;
require_param = "DEX";
require_value = 50;
HP_mod = 0;
SP_mod = 30;
price = 1200;
}
function ArmorClothesJap6() {
NAME = "Black Samurai Armor";
value = 26;
require_param = "DEX";
require_value = 63;
HP_mod = 0;
SP_mod = 72;
price = 3276;
}
function ArmorHelmetJap6() {
NAME = "Black Samurai Mask";
value = 9;
require_param = "DEX";
require_value = 63;
HP_mod = 0;
SP_mod = 36;
price = 2268;
}
function ArmorClothesJap7() {
NAME = "Shogun Armor";
value = 35;
require_param = "DEX";
require_value = 79;
HP_mod = 0;
SP_mod = 84;
price = 5530;
}
function ArmorHelmetJap7() {
NAME = "Shogun Mask";
value = 12;
require_param = "DEX";
require_value = 79;
HP_mod = 0;
SP_mod = 42;
price = 3792;
}
function ArmorClothesJap8() {
NAME = "Black Shogun Armor";
value = 48;
require_param = "DEX";
require_value = 100;
HP_mod = 0;
SP_mod = 96;
price = 9600;
}
function ArmorHelmetJap8() {
NAME = "Black Shogun Mask";
value = 16;
require_param = "DEX";
require_value = 100;
HP_mod = 0;
SP_mod = 48;
price = 6400;
}
function ArmorClothesMon1() {
NAME = "Horseman Coat";
value = 5;
require_param = "DEX";
require_value = 17;
HP_mod = 2;
SP_mod = 8;
price = 170;
}
function ArmorHelmetMon1() {
NAME = "Horseman Hat";
value = 2;
require_param = "DEX";
require_value = 17;
HP_mod = 1;
SP_mod = 4;
price = 136;
}
function ArmorClothesMon2() {
NAME = "Leather Jacket";
value = 8;
require_param = "DEX";
require_value = 21;
HP_mod = 4;
SP_mod = 16;
price = 336;
}
function ArmorHelmetMon2() {
NAME = "Fur Hat";
value = 3;
require_param = "DEX";
require_value = 21;
HP_mod = 2;
SP_mod = 8;
price = 252;
}
function ArmorClothesMon3() {
NAME = "Horseman Chainmail";
value = 11;
require_param = "DEX";
require_value = 27;
HP_mod = 6;
SP_mod = 24;
price = 594;
}
function ArmorHelmetMon3() {
NAME = "Wanderer Hat";
value = 4;
require_param = "DEX";
require_value = 27;
HP_mod = 3;
SP_mod = 12;
price = 432;
}
function ArmorClothesMon4() {
NAME = "Wanderer Chainmail";
value = 15;
require_param = "DEX";
require_value = 34;
HP_mod = 8;
SP_mod = 32;
price = 1020;
}
function ArmorHelmetMon4() {
NAME = "Foxtail Hat";
value = 5;
require_param = "DEX";
require_value = 34;
HP_mod = 4;
SP_mod = 16;
price = 680;
}
function ArmorClothesMon5() {
NAME = "Horseman Plate Armor";
value = 20;
require_param = "DEX";
require_value = 43;
HP_mod = 10;
SP_mod = 40;
price = 1720;
}
function ArmorHelmetMon5() {
NAME = "Foxhead Helmet";
value = 7;
require_param = "DEX";
require_value = 43;
HP_mod = 5;
SP_mod = 20;
price = 1204;
}
function ArmorClothesMon6() {
NAME = "Wanderer Plate Armor";
value = 28;
require_param = "DEX";
require_value = 54;
HP_mod = 12;
SP_mod = 48;
price = 3024;
}
function ArmorHelmetMon6() {
NAME = "Golden Hat";
value = 9;
require_param = "DEX";
require_value = 54;
HP_mod = 6;
SP_mod = 24;
price = 1944;
}
function ArmorClothesMon7() {
NAME = "Dark Rider Armor";
value = 38;
require_param = "DEX";
require_value = 68;
HP_mod = 14;
SP_mod = 56;
price = 5168;
}
function ArmorHelmetMon7() {
NAME = "Elite Wanderer Helmet";
value = 13;
require_param = "DEX";
require_value = 68;
HP_mod = 7;
SP_mod = 28;
price = 3536;
}
function ArmorClothesMon8() {
NAME = "Khan's Dress";
value = 51;
require_param = "DEX";
require_value = 85;
HP_mod = 16;
SP_mod = 64;
price = 8670;
}
function ArmorHelmetMon8() {
NAME = "Khan's Helmet";
value = 17;
require_param = "DEX";
require_value = 85;
HP_mod = 8;
SP_mod = 32;
price = 5780;
}
function ArmorClothesAra1() {
NAME = "Light Jacket";
value = 7;
require_param = "STR";
require_value = 19;
HP_mod = 4;
SP_mod = 4;
price = 266;
}
function ArmorHelmetAra1() {
NAME = "Turban";
value = 2;
require_param = "STR";
require_value = 19;
HP_mod = 2;
SP_mod = 2;
price = 152;
}
function ArmorClothesAra2() {
NAME = "Ceremonial Dress";
value = 10;
require_param = "STR";
require_value = 24;
HP_mod = 8;
SP_mod = 8;
price = 480;
}
function ArmorHelmetAra2() {
NAME = "Ceremonial Hat";
value = 3;
require_param = "STR";
require_value = 24;
HP_mod = 4;
SP_mod = 4;
price = 288;
}
function ArmorClothesAra3() {
NAME = "Pirate Chainmail";
value = 13;
require_param = "STR";
require_value = 30;
HP_mod = 12;
SP_mod = 12;
price = 780;
}
function ArmorHelmetAra3() {
NAME = "Assassin Mask";
value = 4;
require_param = "STR";
require_value = 30;
HP_mod = 6;
SP_mod = 6;
price = 480;
}
function ArmorClothesAra4() {
NAME = "Janissary Chainmail";
value = 18;
require_param = "STR";
require_value = 38;
HP_mod = 16;
SP_mod = 16;
price = 1368;
}
function ArmorHelmetAra4() {
NAME = "Desert Hat";
value = 6;
require_param = "STR";
require_value = 38;
HP_mod = 8;
SP_mod = 8;
price = 912;
}
function ArmorClothesAra5() {
NAME = "Light Curasis";
value = 24;
require_param = "STR";
require_value = 48;
HP_mod = 20;
SP_mod = 20;
price = 2304;
}
function ArmorHelmetAra5() {
NAME = "Commander Turban";
value = 8;
require_param = "STR";
require_value = 48;
HP_mod = 10;
SP_mod = 10;
price = 1536;
}
function ArmorClothesAra6() {
NAME = "Janissary Curasis";
value = 32;
require_param = "STR";
require_value = 60;
HP_mod = 24;
SP_mod = 24;
price = 3840;
}
function ArmorHelmetAra6() {
NAME = "Janissary Hat";
value = 11;
require_param = "STR";
require_value = 60;
HP_mod = 12;
SP_mod = 12;
price = 2640;
}
function ArmorClothesAra7() {
NAME = "Janissary Plate Armor";
value = 44;
require_param = "STR";
require_value = 75;
HP_mod = 28;
SP_mod = 28;
price = 6600;
}
function ArmorHelmetAra7() {
NAME = "Janissary Helmet";
value = 15;
require_param = "STR";
require_value = 75;
HP_mod = 14;
SP_mod = 14;
price = 4500;
}
function ArmorClothesAra8() {
NAME = "Sultan's Armor";
value = 60;
require_param = "STR";
require_value = 95;
HP_mod = 32;
SP_mod = 32;
price = 11400;
}
function ArmorHelmetAra8() {
NAME = "Elite Janissary Helmet";
value = 20;
require_param = "STR";
require_value = 95;
HP_mod = 16;
SP_mod = 16;
price = 7600;
}
}
Symbol 3142 MovieClip [__Packages.WeaponClass] Frame 0
class WeaponClass extends Item
{
var TYPE, NATION, LEVEL, canBeMounted, skill, FRAME, getFrame, initEnchant, setRefine, NAME, dmg, rnd, crit, price, require_param, require_value;
function WeaponClass (tp, nt, lv, ei, rf) {
super();
TYPE = tp;
NATION = nt;
LEVEL = lv;
switch (tp) {
case "Dagger" :
case "Staff" :
case "Katana" :
case "NinjaTo" :
canBeMounted = false;
break;
default :
canBeMounted = true;
}
switch (tp) {
case "OnehandedSword" :
case "TwohandedSword" :
skill = "Sword";
break;
case "OnehandedAxe" :
case "TwohandedAxe" :
skill = "Axe";
break;
case "OnehandedMace" :
case "TwohandedMace" :
skill = "Mace";
break;
case "Dagger" :
skill = "Dagger";
break;
case "Staff" :
skill = "Staff";
break;
case "Spear" :
skill = "Spear";
break;
case "NinjaTo" :
case "Katana" :
skill = "FarEast";
break;
case "Katar" :
skill = "Katar";
break;
case "Bow" :
skill = "Bow";
break;
case "Crossbow" :
skill = "Crossbow";
break;
case "Throwing" :
skill = "Throwing";
break;
case "Fists" :
skill = "Fists";
}
FRAME = getFrame();
this[(("Weapon" + tp) + nt) + lv]();
initEnchant(ei);
setRefine(rf);
}
static function isTwohandedType(tp) {
switch (tp) {
case "OnehandedSword" :
case "OnehandedAxe" :
case "OnehandedMace" :
case "NinjaTo" :
case "Shield" :
return(false);
}
return(true);
}
static function getBaseDelay(tp) {
switch (tp) {
case "OnehandedSword" :
case "OnehandedAxe" :
case "OnehandedMace" :
return(40);
case "Dagger" :
return(30);
case "TwohandedSword" :
case "TwohandedAxe" :
case "TwohandedMace" :
return(40);
case "Staff" :
return(30);
case "Spear" :
return(60);
case "NinjaTo" :
case "Katana" :
return("run_katana");
case "Katar" :
return("run_katar");
case "Bow" :
return("run_bow");
case "Crossbow" :
return("run_crossbow");
case "Throwing" :
return("run_suriken");
case "Fists" :
return("run_double");
}
}
function isTwohanded() {
return(isTwohandedType(TYPE));
}
function WeaponFistsAll0() {
NAME = "Bare hands";
dmg = 0;
rnd = 10;
rng = 0;
crit = 0;
price = 0;
}
function WeaponOnehandedSwordViz1() {
NAME = "Gladius";
dmg = 13;
rnd = 11;
crit = 5;
require_param = "STR";
require_value = 16;
price = 950;
}
function WeaponOnehandedSwordViz2() {
NAME = "Spatha";
dmg = 17;
rnd = 15;
crit = 5;
require_param = "STR";
require_value = 30;
price = 1800;
}
function WeaponOnehandedSwordViz3() {
NAME = "Chivalry Spatha";
dmg = 24;
rnd = 20;
crit = 5;
require_param = "STR";
require_value = 44;
price = 2600;
}
function WeaponOnehandedSwordViz4() {
NAME = "Leader Sword";
dmg = 33;
rnd = 28;
crit = 5;
require_param = "STR";
require_value = 57;
price = 3400;
}
function WeaponOnehandedSwordViz5() {
NAME = "Starshine";
dmg = 45;
rnd = 38;
crit = 5;
require_param = "STR";
require_value = 71;
price = 4250;
}
function WeaponOnehandedSwordViz6() {
NAME = "Beast Fang";
dmg = 61;
rnd = 52;
crit = 5;
require_param = "STR";
require_value = 85;
price = 5100;
}
function WeaponOnehandedSwordViz7() {
NAME = "Dragon Blade";
dmg = 84;
rnd = 72;
crit = 5;
require_param = "STR";
require_value = 99;
price = 5900;
}
function WeaponOnehandedSwordGer1() {
NAME = "Short Sword";
dmg = 10;
rnd = 9;
crit = 5;
require_param = "STR";
require_value = 15;
price = 900;
}
function WeaponOnehandedSwordGer2() {
NAME = "Footman Sword";
dmg = 14;
rnd = 12;
crit = 5;
require_param = "STR";
require_value = 27;
price = 1600;
}
function WeaponOnehandedSwordGer3() {
NAME = "Long Sword";
dmg = 20;
rnd = 17;
crit = 5;
require_param = "STR";
require_value = 40;
price = 2400;
}
function WeaponOnehandedSwordGer4() {
NAME = "Bastard Sword";
dmg = 27;
rnd = 23;
crit = 5;
require_param = "STR";
require_value = 52;
price = 3100;
}
function WeaponOnehandedSwordGer5() {
NAME = "Starbringer";
dmg = 37;
rnd = 32;
crit = 5;
require_param = "STR";
require_value = 65;
price = 3900;
}
function WeaponOnehandedSwordGer6() {
NAME = "Bonesword";
dmg = 51;
rnd = 44;
crit = 5;
require_param = "STR";
require_value = 77;
price = 4600;
}
function WeaponOnehandedSwordGer7() {
NAME = "Skullsword";
dmg = 70;
rnd = 60;
crit = 5;
require_param = "STR";
require_value = 90;
price = 5400;
}
function WeaponOnehandedSwordRus1() {
NAME = "Cutter";
dmg = 9;
rnd = 8;
crit = 5;
require_param = "STR";
require_value = 14;
price = 800;
}
function WeaponOnehandedSwordRus2() {
NAME = "Long Dagger";
dmg = 13;
rnd = 11;
crit = 5;
require_param = "STR";
require_value = 26;
price = 1550;
}
function WeaponOnehandedSwordRus3() {
NAME = "Cleaver";
dmg = 18;
rnd = 15;
crit = 5;
require_param = "STR";
require_value = 37;
price = 2200;
}
function WeaponOnehandedSwordRus4() {
NAME = "Guardian Sword";
dmg = 24;
rnd = 21;
crit = 5;
require_param = "STR";
require_value = 49;
price = 2900;
}
function WeaponOnehandedSwordRus5() {
NAME = "Black Curse";
dmg = 33;
rnd = 29;
crit = 5;
require_param = "STR";
require_value = 61;
price = 3650;
}
function WeaponOnehandedSwordRus6() {
NAME = "Demon Slayer";
dmg = 46;
rnd = 39;
crit = 5;
require_param = "STR";
require_value = 73;
price = 4350;
}
function WeaponOnehandedSwordRus7() {
NAME = "Kladenets";
dmg = 63;
rnd = 54;
crit = 5;
require_param = "STR";
require_value = 85;
price = 5100;
}
function WeaponOnehandedSwordMon1() {
NAME = "Horseman Blade";
dmg = 8;
rnd = 7;
crit = 15;
aspd_bonus = 10;
require_param = "DEX";
require_value = 13;
price = 750;
}
function WeaponOnehandedSwordMon2() {
NAME = "Wanderer Blade";
dmg = 11;
rnd = 9;
crit = 15;
aspd_bonus = 10;
require_param = "DEX";
require_value = 24;
price = 1400;
}
function WeaponOnehandedSwordMon3() {
NAME = "Balanced Sword";
dmg = 15;
rnd = 13;
crit = 15;
aspd_bonus = 10;
require_param = "DEX";
require_value = 35;
price = 2100;
}
function WeaponOnehandedSwordMon4() {
NAME = "Horseman Sabre";
dmg = 20;
rnd = 17;
crit = 15;
aspd_bonus = 10;
require_param = "DEX";
require_value = 47;
price = 2800;
}
function WeaponOnehandedSwordMon5() {
NAME = "Rounded Sabre";
dmg = 28;
rnd = 24;
crit = 15;
aspd_bonus = 10;
require_param = "DEX";
require_value = 58;
price = 3450;
}
function WeaponOnehandedSwordMon6() {
NAME = "Hook-like Sabre";
dmg = 38;
rnd = 33;
crit = 15;
aspd_bonus = 10;
require_param = "DEX";
require_value = 69;
price = 4100;
}
function WeaponOnehandedSwordMon7() {
NAME = "Wanderer Sabre";
dmg = 52;
rnd = 45;
crit = 15;
aspd_bonus = 10;
require_param = "DEX";
require_value = 80;
price = 4800;
}
function WeaponOnehandedSwordAra1() {
NAME = "Slave Blade";
dmg = 9;
rnd = 8;
crit = 10;
aspd_bonus = 5;
require_param = "STR";
require_value = 14;
price = 800;
}
function WeaponOnehandedSwordAra2() {
NAME = "Nomad Blade";
dmg = 13;
rnd = 11;
crit = 10;
aspd_bonus = 5;
require_param = "STR";
require_value = 26;
price = 1550;
}
function WeaponOnehandedSwordAra3() {
NAME = "Scimitar";
dmg = 18;
rnd = 15;
crit = 10;
aspd_bonus = 5;
require_param = "STR";
require_value = 37;
price = 2200;
}
function WeaponOnehandedSwordAra4() {
NAME = "Nomad Scimitar";
dmg = 24;
rnd = 21;
crit = 10;
aspd_bonus = 5;
require_param = "STR";
require_value = 49;
price = 2900;
}
function WeaponOnehandedSwordAra5() {
NAME = "Desert Scimitar";
dmg = 33;
rnd = 29;
crit = 10;
aspd_bonus = 5;
require_param = "STR";
require_value = 61;
price = 3650;
}
function WeaponOnehandedSwordAra6() {
NAME = "Desert King";
dmg = 46;
rnd = 39;
crit = 10;
aspd_bonus = 5;
require_param = "STR";
require_value = 73;
price = 4350;
}
function WeaponOnehandedSwordAra7() {
NAME = "Soul Fire";
dmg = 63;
rnd = 54;
crit = 10;
aspd_bonus = 5;
require_param = "STR";
require_value = 85;
price = 5100;
}
function WeaponTwohandedSwordViz1() {
NAME = "Iron Twohanded Sword";
dmg = 19;
rnd = 16;
crit = 5;
require_param = "STR";
require_value = 16;
price = 1400;
}
function WeaponTwohandedSwordViz2() {
NAME = "Steel Twohanded Sword";
dmg = 26;
rnd = 22;
crit = 5;
require_param = "STR";
require_value = 30;
price = 2700;
}
function WeaponTwohandedSwordViz3() {
NAME = "Falcion";
dmg = 36;
rnd = 30;
crit = 5;
require_param = "STR";
require_value = 44;
price = 3950;
}
function WeaponTwohandedSwordViz4() {
NAME = "Moonlight";
dmg = 49;
rnd = 42;
crit = 5;
require_param = "STR";
require_value = 57;
price = 5100;
}
function WeaponTwohandedSwordViz5() {
NAME = "Soul Braker";
dmg = 67;
rnd = 57;
crit = 5;
require_param = "STR";
require_value = 71;
price = 6350;
}
function WeaponTwohandedSwordViz6() {
NAME = "Golden Claw";
dmg = 92;
rnd = 79;
crit = 5;
require_param = "STR";
require_value = 85;
price = 7650;
}
function WeaponTwohandedSwordViz7() {
NAME = "Dragon Head";
dmg = 126;
rnd = 108;
crit = 5;
require_param = "STR";
require_value = 99;
price = 8900;
}
function WeaponTwohandedSwordGer1() {
NAME = "Light Twohanded Sword";
dmg = 16;
rnd = 14;
crit = 5;
require_param = "STR";
require_value = 15;
price = 1350;
}
function WeaponTwohandedSwordGer2() {
NAME = "Knight Twohanded Sword";
dmg = 22;
rnd = 19;
crit = 5;
require_param = "STR";
require_value = 27;
price = 2400;
}
function WeaponTwohandedSwordGer3() {
NAME = "Crusader Twohanded Sword";
dmg = 30;
rnd = 25;
crit = 5;
require_param = "STR";
require_value = 40;
price = 3600;
}
function WeaponTwohandedSwordGer4() {
NAME = "Claymore";
dmg = 41;
rnd = 35;
crit = 5;
require_param = "STR";
require_value = 52;
price = 4650;
}
function WeaponTwohandedSwordGer5() {
NAME = "Heart of Bat";
dmg = 56;
rnd = 48;
crit = 5;
require_param = "STR";
require_value = 65;
price = 5850;
}
function WeaponTwohandedSwordGer6() {
NAME = "Dark Sin";
dmg = 77;
rnd = 66;
crit = 5;
require_param = "STR";
require_value = 77;
price = 6900;
}
function WeaponTwohandedSwordGer7() {
NAME = "Necrosword";
dmg = 105;
rnd = 90;
crit = 5;
require_param = "STR";
require_value = 90;
price = 8100;
}
function WeaponTwohandedSwordRus1() {
NAME = "Forged Twohanded Sword";
dmg = 14;
rnd = 12;
crit = 5;
require_param = "STR";
require_value = 14;
price = 1250;
}
function WeaponTwohandedSwordRus2() {
NAME = "Long Twohanded Sword";
dmg = 19;
rnd = 17;
crit = 5;
require_param = "STR";
require_value = 26;
price = 2300;
}
function WeaponTwohandedSwordRus3() {
NAME = "Large Twohanded Sword";
dmg = 27;
rnd = 23;
crit = 5;
require_param = "STR";
require_value = 37;
price = 3300;
}
function WeaponTwohandedSwordRus4() {
NAME = "Guardian Twohanded Sword";
dmg = 37;
rnd = 31;
crit = 5;
require_param = "STR";
require_value = 49;
price = 4400;
}
function WeaponTwohandedSwordRus5() {
NAME = "Holy Twohanded Sword";
dmg = 50;
rnd = 43;
crit = 5;
require_param = "STR";
require_value = 61;
price = 5450;
}
function WeaponTwohandedSwordRus6() {
NAME = "Blazing Fire";
dmg = 69;
rnd = 59;
crit = 5;
require_param = "STR";
require_value = 73;
price = 6550;
}
function WeaponTwohandedSwordRus7() {
NAME = "Great Smasher";
dmg = 94;
rnd = 81;
crit = 5;
require_param = "STR";
require_value = 85;
price = 7650;
}
function WeaponTwohandedSwordMon1() {
NAME = "Thin Twohanded Sword";
dmg = 12;
rnd = 10;
crit = 15;
aspd_bonus = 10;
require_param = "DEX";
require_value = 13;
price = 1150;
}
function WeaponTwohandedSwordMon2() {
NAME = "Horseman Twohanded Sword";
dmg = 16;
rnd = 14;
crit = 15;
aspd_bonus = 10;
require_param = "DEX";
require_value = 24;
price = 2150;
}
function WeaponTwohandedSwordMon3() {
NAME = "Protector";
dmg = 22;
rnd = 19;
crit = 15;
aspd_bonus = 10;
require_param = "DEX";
require_value = 35;
price = 3150;
}
function WeaponTwohandedSwordMon4() {
NAME = "Twohanded Sabre";
dmg = 30;
rnd = 26;
crit = 15;
aspd_bonus = 10;
require_param = "DEX";
require_value = 47;
price = 4200;
}
function WeaponTwohandedSwordMon5() {
NAME = "Rounded Twohanded Sword";
dmg = 42;
rnd = 36;
crit = 15;
aspd_bonus = 10;
require_param = "DEX";
require_value = 58;
price = 5200;
}
function WeaponTwohandedSwordMon6() {
NAME = "Wanderer Heavy Sabre";
dmg = 57;
rnd = 49;
crit = 15;
aspd_bonus = 10;
require_param = "DEX";
require_value = 69;
price = 6200;
}
function WeaponTwohandedSwordMon7() {
NAME = "Khan's Heavy Sabre";
dmg = 79;
rnd = 68;
crit = 15;
aspd_bonus = 10;
require_param = "DEX";
require_value = 80;
price = 7200;
}
function WeaponTwohandedSwordAra1() {
NAME = "Slave Twohanded Sword";
dmg = 14;
rnd = 12;
crit = 10;
aspd_bonus = 5;
require_param = "STR";
require_value = 14;
price = 1250;
}
function WeaponTwohandedSwordAra2() {
NAME = "Long Nomad's Cutter";
dmg = 19;
rnd = 17;
crit = 10;
aspd_bonus = 5;
require_param = "STR";
require_value = 26;
price = 2300;
}
function WeaponTwohandedSwordAra3() {
NAME = "Twohanded Scimitar";
dmg = 27;
rnd = 23;
crit = 10;
aspd_bonus = 5;
require_param = "STR";
require_value = 37;
price = 3300;
}
function WeaponTwohandedSwordAra4() {
NAME = "Battle Scimitar";
dmg = 37;
rnd = 31;
crit = 10;
aspd_bonus = 5;
require_param = "STR";
require_value = 49;
price = 4400;
}
function WeaponTwohandedSwordAra5() {
NAME = "Spiky Scimitar";
dmg = 50;
rnd = 43;
crit = 10;
aspd_bonus = 5;
require_param = "STR";
require_value = 61;
price = 5450;
}
function WeaponTwohandedSwordAra6() {
NAME = "Moonbeam";
dmg = 69;
rnd = 59;
crit = 10;
aspd_bonus = 5;
require_param = "STR";
require_value = 73;
price = 6550;
}
function WeaponTwohandedSwordAra7() {
NAME = "Sun Flame";
dmg = 94;
rnd = 81;
crit = 10;
aspd_bonus = 5;
require_param = "STR";
require_value = 85;
price = 7650;
}
function WeaponOnehandedAxeViz1() {
NAME = "Ritual Axe";
dmg = 12;
rnd = 7;
crit = 6;
require_param = "STR";
require_value = 13;
price = 550;
}
function WeaponOnehandedAxeViz2() {
NAME = "Priest Axe";
dmg = 18;
rnd = 10;
crit = 6;
require_param = "STR";
require_value = 26;
price = 1150;
}
function WeaponOnehandedAxeViz3() {
NAME = "Rounded Axe";
dmg = 26;
rnd = 15;
crit = 6;
require_param = "STR";
require_value = 40;
price = 1750;
}
function WeaponOnehandedAxeViz4() {
NAME = "Breaking Axe";
dmg = 38;
rnd = 21;
crit = 6;
require_param = "STR";
require_value = 53;
price = 2350;
}
function WeaponOnehandedAxeViz5() {
NAME = "Unussual Axe";
dmg = 56;
rnd = 31;
crit = 6;
require_param = "STR";
require_value = 67;
price = 3000;
}
function WeaponOnehandedAxeViz6() {
NAME = "Elite Axe";
dmg = 81;
rnd = 46;
crit = 6;
require_param = "STR";
require_value = 80;
price = 3550;
}
function WeaponOnehandedAxeGer1() {
NAME = "Small Axe";
dmg = 15;
rnd = 9;
crit = 3;
require_param = "STR";
require_value = 15;
price = 650;
}
function WeaponOnehandedAxeGer2() {
NAME = "Infantry Axe";
dmg = 22;
rnd = 13;
crit = 3;
require_param = "STR";
require_value = 30;
price = 1300;
}
function WeaponOnehandedAxeGer3() {
NAME = "Broad Axe";
dmg = 32;
rnd = 18;
crit = 3;
require_param = "STR";
require_value = 45;
price = 2000;
}
function WeaponOnehandedAxeGer4() {
NAME = "Heavy Axe";
dmg = 47;
rnd = 27;
crit = 3;
require_param = "STR";
require_value = 60;
price = 2650;
}
function WeaponOnehandedAxeGer5() {
NAME = "Butcher";
dmg = 69;
rnd = 39;
crit = 3;
require_param = "STR";
require_value = 75;
price = 3350;
}
function WeaponOnehandedAxeGer6() {
NAME = "Holy Hope";
dmg = 101;
rnd = 57;
crit = 3;
require_param = "STR";
require_value = 90;
price = 4000;
}
function WeaponOnehandedAxeRus1() {
NAME = "Militia Axe";
dmg = 18;
rnd = 10;
crit = 3;
require_param = "STR";
require_value = 16;
price = 700;
}
function WeaponOnehandedAxeRus2() {
NAME = "Long Axe";
dmg = 27;
rnd = 15;
crit = 3;
require_param = "STR";
require_value = 33;
price = 1450;
}
function WeaponOnehandedAxeRus3() {
NAME = "Guard Axe";
dmg = 39;
rnd = 22;
crit = 3;
require_param = "STR";
require_value = 49;
price = 2200;
}
function WeaponOnehandedAxeRus4() {
NAME = "Holy Axe";
dmg = 57;
rnd = 32;
crit = 3;
require_param = "STR";
require_value = 66;
price = 2950;
}
function WeaponOnehandedAxeRus5() {
NAME = "Shining Axe";
dmg = 83;
rnd = 47;
crit = 3;
require_param = "STR";
require_value = 82;
price = 3650;
}
function WeaponOnehandedAxeRus6() {
NAME = "Czar's Axe";
dmg = 122;
rnd = 69;
crit = 3;
require_param = "STR";
require_value = 99;
price = 4450;
}
function WeaponTwohandedAxeViz1() {
NAME = "Light Twohanded Axe";
dmg = 18;
rnd = 10;
crit = 6;
require_param = "STR";
require_value = 13;
price = 850;
}
function WeaponTwohandedAxeViz2() {
NAME = "Rounded Twohanded Axe";
dmg = 27;
rnd = 15;
crit = 6;
require_param = "STR";
require_value = 26;
price = 1750;
}
function WeaponTwohandedAxeViz3() {
NAME = "Sea Wave";
dmg = 39;
rnd = 22;
crit = 6;
require_param = "STR";
require_value = 40;
price = 2650;
}
function WeaponTwohandedAxeViz4() {
NAME = "Golden Twohanded Axe";
dmg = 57;
rnd = 32;
crit = 6;
require_param = "STR";
require_value = 53;
price = 3550;
}
function WeaponTwohandedAxeViz5() {
NAME = "Elite Twohanded Axe";
dmg = 83;
rnd = 47;
crit = 6;
require_param = "STR";
require_value = 67;
price = 4500;
}
function WeaponTwohandedAxeViz6() {
NAME = "Dragon Wings";
dmg = 122;
rnd = 69;
crit = 6;
require_param = "STR";
require_value = 80;
price = 5350;
}
function WeaponTwohandedAxeGer1() {
NAME = "Steel Twohanded Axe";
dmg = 23;
rnd = 13;
crit = 3;
require_param = "STR";
require_value = 15;
price = 1000;
}
function WeaponTwohandedAxeGer2() {
NAME = "Heavy Twohanded Axe";
dmg = 33;
rnd = 19;
crit = 3;
require_param = "STR";
require_value = 30;
price = 2000;
}
function WeaponTwohandedAxeGer3() {
NAME = "Silver Twohanded Axe";
dmg = 49;
rnd = 27;
crit = 3;
require_param = "STR";
require_value = 45;
price = 3000;
}
function WeaponTwohandedAxeGer4() {
NAME = "God's Claw";
dmg = 71;
rnd = 40;
crit = 3;
require_param = "STR";
require_value = 60;
price = 4000;
}
function WeaponTwohandedAxeGer5() {
NAME = "Guillotine";
dmg = 104;
rnd = 59;
crit = 3;
require_param = "STR";
require_value = 75;
price = 5050;
}
function WeaponTwohandedAxeGer6() {
NAME = "Battle Cross";
dmg = 152;
rnd = 86;
crit = 3;
require_param = "STR";
require_value = 90;
price = 6050;
}
function WeaponTwohandedAxeRus1() {
NAME = "Peasant Twohanded Axe";
dmg = 27;
rnd = 15;
crit = 3;
require_param = "STR";
require_value = 16;
price = 1050;
}
function WeaponTwohandedAxeRus2() {
NAME = "Executioner";
dmg = 40;
rnd = 23;
crit = 3;
require_param = "STR";
require_value = 33;
price = 2200;
}
function WeaponTwohandedAxeRus3() {
NAME = "Guard Twohanded Axe";
dmg = 58;
rnd = 33;
crit = 3;
require_param = "STR";
require_value = 49;
price = 3300;
}
function WeaponTwohandedAxeRus4() {
NAME = "Elite Twohanded Axe";
dmg = 85;
rnd = 48;
crit = 3;
require_param = "STR";
require_value = 66;
price = 4450;
}
function WeaponTwohandedAxeRus5() {
NAME = "Angel Wings";
dmg = 125;
rnd = 70;
crit = 3;
require_param = "STR";
require_value = 82;
price = 5500;
}
function WeaponTwohandedAxeRus6() {
NAME = "Holy Reincarnation";
dmg = 183;
rnd = 103;
crit = 3;
require_param = "STR";
require_value = 99;
price = 6650;
}
function WeaponOnehandedMaceViz1() {
NAME = "Bronze Club";
dmg = 7;
rnd = 3;
crit = 35;
aspd_bonus = 1;
require_param = "CON";
require_value = 13;
price = 500;
}
function WeaponOnehandedMaceViz2() {
NAME = "Ritual Mace";
dmg = 10;
rnd = 4;
crit = 39;
aspd_bonus = 1;
require_param = "CON";
require_value = 26;
price = 1000;
}
function WeaponOnehandedMaceViz3() {
NAME = "Rough Mace";
dmg = 15;
rnd = 6;
crit = 43;
aspd_bonus = 1;
require_param = "CON";
require_value = 40;
price = 1600;
}
function WeaponOnehandedMaceViz4() {
NAME = "Shining Mace";
dmg = 21;
rnd = 9;
crit = 47;
aspd_bonus = 1;
require_param = "CON";
require_value = 53;
price = 2100;
}
function WeaponOnehandedMaceViz5() {
NAME = "Breaking Star";
dmg = 31;
rnd = 14;
crit = 51;
aspd_bonus = 1;
require_param = "CON";
require_value = 67;
price = 2650;
}
function WeaponOnehandedMaceViz6() {
NAME = "Elite Hammer";
dmg = 46;
rnd = 20;
crit = 55;
aspd_bonus = 1;
require_param = "CON";
require_value = 80;
price = 3200;
}
function WeaponOnehandedMaceGer1() {
NAME = "Morningstar";
dmg = 10;
rnd = 5;
crit = 35;
require_param = "CON";
require_value = 16;
price = 600;
}
function WeaponOnehandedMaceGer2() {
NAME = "Light Mace";
dmg = 15;
rnd = 7;
crit = 39;
require_param = "CON";
require_value = 33;
price = 1300;
}
function WeaponOnehandedMaceGer3() {
NAME = "Peacekeeper";
dmg = 22;
rnd = 10;
crit = 43;
require_param = "CON";
require_value = 49;
price = 1950;
}
function WeaponOnehandedMaceGer4() {
NAME = "Deadly Spikes";
dmg = 32;
rnd = 14;
crit = 47;
require_param = "CON";
require_value = 66;
price = 2600;
}
function WeaponOnehandedMaceGer5() {
NAME = "Gatebreaker";
dmg = 47;
rnd = 21;
crit = 51;
require_param = "CON";
require_value = 82;
price = 3250;
}
function WeaponOnehandedMaceGer6() {
NAME = "Saint Power";
dmg = 69;
rnd = 30;
crit = 55;
require_param = "CON";
require_value = 99;
price = 3950;
}
function WeaponOnehandedMaceRus1() {
NAME = "Spiked Wooden Club";
dmg = 9;
rnd = 4;
crit = 35;
require_param = "CON";
require_value = 15;
price = 600;
}
function WeaponOnehandedMaceRus2() {
NAME = "Armor Breaker";
dmg = 13;
rnd = 6;
crit = 39;
require_param = "CON";
require_value = 30;
price = 1200;
}
function WeaponOnehandedMaceRus3() {
NAME = "Heavy Club";
dmg = 18;
rnd = 8;
crit = 43;
require_param = "CON";
require_value = 45;
price = 1800;
}
function WeaponOnehandedMaceRus4() {
NAME = "Golden Hedgehog";
dmg = 27;
rnd = 12;
crit = 47;
require_param = "CON";
require_value = 60;
price = 2400;
}
function WeaponOnehandedMaceRus5() {
NAME = "Slaughter";
dmg = 39;
rnd = 17;
crit = 51;
require_param = "CON";
require_value = 75;
price = 3000;
}
function WeaponOnehandedMaceRus6() {
NAME = "Great Slaughter";
dmg = 57;
rnd = 25;
crit = 55;
require_param = "CON";
require_value = 90;
price = 3600;
}
function WeaponTwohandedMaceViz1() {
NAME = "Bronze Twohanded Mace";
dmg = 10;
rnd = 5;
crit = 35;
aspd_bonus = 1;
require_param = "CON";
require_value = 13;
price = 750;
}
function WeaponTwohandedMaceViz2() {
NAME = "Ritual Twohanded Mace";
dmg = 15;
rnd = 7;
crit = 39;
aspd_bonus = 1;
require_param = "CON";
require_value = 26;
price = 1550;
}
function WeaponTwohandedMaceViz3() {
NAME = "Ritual Hammer";
dmg = 22;
rnd = 10;
crit = 43;
aspd_bonus = 1;
require_param = "CON";
require_value = 40;
price = 2400;
}
function WeaponTwohandedMaceViz4() {
NAME = "Golden Hammer";
dmg = 32;
rnd = 14;
crit = 47;
aspd_bonus = 1;
require_param = "CON";
require_value = 53;
price = 3150;
}
function WeaponTwohandedMaceViz5() {
NAME = "Great Stunner";
dmg = 47;
rnd = 21;
crit = 51;
aspd_bonus = 1;
require_param = "CON";
require_value = 67;
price = 4000;
}
function WeaponTwohandedMaceViz6() {
NAME = "Dragon Teeth";
dmg = 69;
rnd = 30;
crit = 55;
aspd_bonus = 1;
require_param = "CON";
require_value = 80;
price = 4800;
}
function WeaponTwohandedMaceGer1() {
NAME = "Battle Hammer";
dmg = 15;
rnd = 7;
crit = 35;
require_param = "CON";
require_value = 16;
price = 950;
}
function WeaponTwohandedMaceGer2() {
NAME = "Steel Twohanded Mace";
dmg = 23;
rnd = 10;
crit = 39;
require_param = "CON";
require_value = 33;
price = 1950;
}
function WeaponTwohandedMaceGer3() {
NAME = "Spiked Twohanded Mace";
dmg = 33;
rnd = 15;
crit = 43;
require_param = "CON";
require_value = 49;
price = 2900;
}
function WeaponTwohandedMaceGer4() {
NAME = "Holy Star";
dmg = 48;
rnd = 21;
crit = 47;
require_param = "CON";
require_value = 66;
price = 3950;
}
function WeaponTwohandedMaceGer5() {
NAME = "Holy Avenger";
dmg = 71;
rnd = 31;
crit = 51;
require_param = "CON";
require_value = 82;
price = 4900;
}
function WeaponTwohandedMaceGer6() {
NAME = "Great Redeemer";
dmg = 103;
rnd = 45;
crit = 55;
require_param = "CON";
require_value = 99;
price = 5900;
}
function WeaponTwohandedMaceRus1() {
NAME = "Rude Twohanded Mace";
dmg = 13;
rnd = 6;
crit = 35;
require_param = "CON";
require_value = 15;
price = 900;
}
function WeaponTwohandedMaceRus2() {
NAME = "Bronze Twohanded Mace";
dmg = 19;
rnd = 8;
crit = 39;
require_param = "CON";
require_value = 30;
price = 1800;
}
function WeaponTwohandedMaceRus3() {
NAME = "Heavy Twohanded Mace";
dmg = 28;
rnd = 12;
crit = 43;
require_param = "CON";
require_value = 45;
price = 2700;
}
function WeaponTwohandedMaceRus4() {
NAME = "Hero Twohanded Mace";
dmg = 40;
rnd = 18;
crit = 47;
require_param = "CON";
require_value = 60;
price = 3600;
}
function WeaponTwohandedMaceRus5() {
NAME = "Shining Light";
dmg = 59;
rnd = 26;
crit = 51;
require_param = "CON";
require_value = 75;
price = 4500;
}
function WeaponTwohandedMaceRus6() {
NAME = "Medusa";
dmg = 86;
rnd = 38;
crit = 55;
require_param = "CON";
require_value = 90;
price = 5400;
}
function WeaponDaggerViz1() {
NAME = "Knife";
dmg = 6;
rnd = 7;
crit = 58;
require_param = "DEX";
require_value = 15;
price = 600;
}
function WeaponDaggerViz2() {
NAME = "Dagger";
dmg = 9;
rnd = 10;
crit = 63;
require_param = "DEX";
require_value = 28;
price = 1100;
}
function WeaponDaggerViz3() {
NAME = "Stiletto";
dmg = 12;
rnd = 13;
crit = 67;
require_param = "DEX";
require_value = 41;
price = 1600;
}
function WeaponDaggerViz4() {
NAME = "Damascus";
dmg = 17;
rnd = 18;
crit = 72;
require_param = "DEX";
require_value = 55;
price = 2200;
}
function WeaponDaggerViz5() {
NAME = "Icicle";
dmg = 23;
rnd = 25;
crit = 76;
require_param = "DEX";
require_value = 68;
price = 2700;
}
function WeaponDaggerViz6() {
NAME = "Feather";
dmg = 31;
rnd = 34;
crit = 81;
require_param = "DEX";
require_value = 81;
price = 3200;
}
function WeaponDaggerViz7() {
NAME = "Dark Soul";
dmg = 43;
rnd = 46;
crit = 85;
require_param = "DEX";
require_value = 94;
price = 3750;
}
function WeaponDaggerMon1() {
NAME = "Meat Knife";
dmg = 5;
rnd = 5;
crit = 65;
aspd_bonus = 5;
require_param = "DEX";
require_value = 13;
price = 500;
}
function WeaponDaggerMon2() {
NAME = "Rounded Dagger";
dmg = 6;
rnd = 7;
crit = 70;
aspd_bonus = 5;
require_param = "DEX";
require_value = 24;
price = 950;
}
function WeaponDaggerMon3() {
NAME = "Dirk";
dmg = 9;
rnd = 9;
crit = 75;
aspd_bonus = 5;
require_param = "DEX";
require_value = 35;
price = 1400;
}
function WeaponDaggerMon4() {
NAME = "Battle Dagger";
dmg = 12;
rnd = 13;
crit = 80;
aspd_bonus = 5;
require_param = "DEX";
require_value = 47;
price = 1850;
}
function WeaponDaggerMon5() {
NAME = "Ritual Knife";
dmg = 17;
rnd = 18;
crit = 85;
aspd_bonus = 5;
require_param = "DEX";
require_value = 58;
price = 2300;
}
function WeaponDaggerMon6() {
NAME = "Agony";
dmg = 23;
rnd = 24;
crit = 90;
aspd_bonus = 5;
require_param = "DEX";
require_value = 69;
price = 2750;
}
function WeaponDaggerMon7() {
NAME = "Hatred";
dmg = 31;
rnd = 34;
crit = 95;
aspd_bonus = 5;
require_param = "DEX";
require_value = 80;
price = 3200;
}
function WeaponStaffJap1() {
NAME = "Apprentice Staff";
dmg = 5;
rnd = 2;
crit = 30;
require_param = "DEX";
require_value = 15;
price = 500;
}
function WeaponStaffJap2() {
NAME = "Master Staff";
dmg = 6;
rnd = 3;
crit = 32;
require_param = "DEX";
require_value = 25;
price = 850;
}
function WeaponStaffJap3() {
NAME = "Spiked Staff";
dmg = 8;
rnd = 4;
crit = 34;
require_param = "DEX";
require_value = 36;
price = 1250;
}
function WeaponStaffJap4() {
NAME = "Naginata";
dmg = 11;
rnd = 5;
crit = 36;
require_param = "DEX";
require_value = 47;
price = 1600;
}
function WeaponStaffJap5() {
NAME = "Golden Staff";
dmg = 14;
rnd = 7;
crit = 38;
require_param = "DEX";
require_value = 57;
price = 1950;
}
function WeaponStaffJap6() {
NAME = "Golden Naginata";
dmg = 19;
rnd = 9;
crit = 40;
require_param = "DEX";
require_value = 68;
price = 2350;
}
function WeaponStaffJap7() {
NAME = "Swordfish";
dmg = 24;
rnd = 12;
crit = 42;
require_param = "DEX";
require_value = 79;
price = 2750;
}
function WeaponStaffJap8() {
NAME = "Dark Snake";
dmg = 32;
rnd = 16;
crit = 44;
require_param = "DEX";
require_value = 90;
price = 3100;
}
function WeaponSpearViz1() {
NAME = "Infantry Spear";
dmg = 23;
rnd = 8;
crit = 56;
require_param = "STR";
require_value = 16;
price = 800;
}
function WeaponSpearViz2() {
NAME = "Improved Spear";
dmg = 37;
rnd = 13;
crit = 60;
require_param = "STR";
require_value = 37;
price = 1850;
}
function WeaponSpearViz3() {
NAME = "Chivalry Spear";
dmg = 59;
rnd = 21;
crit = 64;
require_param = "STR";
require_value = 57;
price = 2850;
}
function WeaponSpearViz4() {
NAME = "Golden Leaf";
dmg = 95;
rnd = 34;
crit = 68;
require_param = "STR";
require_value = 78;
price = 3900;
}
function WeaponSpearViz5() {
NAME = "Clover-Spike";
dmg = 153;
rnd = 54;
crit = 72;
require_param = "STR";
require_value = 99;
price = 4950;
}
function WeaponSpearGer1() {
NAME = "Militia Spear";
dmg = 19;
rnd = 7;
crit = 70;
require_param = "STR";
require_value = 15;
price = 750;
}
function WeaponSpearGer2() {
NAME = "Footman Spear";
dmg = 31;
rnd = 11;
crit = 75;
require_param = "STR";
require_value = 33;
price = 1650;
}
function WeaponSpearGer3() {
NAME = "Knight Spear";
dmg = 49;
rnd = 17;
crit = 80;
require_param = "STR";
require_value = 52;
price = 2600;
}
function WeaponSpearGer4() {
NAME = "Shark";
dmg = 79;
rnd = 28;
crit = 85;
require_param = "STR";
require_value = 71;
price = 3550;
}
function WeaponSpearGer5() {
NAME = "Crusader Spear";
dmg = 127;
rnd = 45;
crit = 90;
require_param = "STR";
require_value = 90;
price = 4500;
}
function WeaponSpearRus1() {
NAME = "Bronze Spear";
dmg = 15;
rnd = 5;
crit = 77;
require_param = "STR";
require_value = 13;
price = 650;
}
function WeaponSpearRus2() {
NAME = "Siege Spear";
dmg = 25;
rnd = 9;
crit = 83;
require_param = "STR";
require_value = 30;
price = 1500;
}
function WeaponSpearRus3() {
NAME = "Holy Spear";
dmg = 40;
rnd = 14;
crit = 88;
require_param = "STR";
require_value = 47;
price = 2350;
}
function WeaponSpearRus4() {
NAME = "Piercing Touch";
dmg = 63;
rnd = 22;
crit = 94;
require_param = "STR";
require_value = 64;
price = 3200;
}
function WeaponSpearRus5() {
NAME = "Shield Braker";
dmg = 102;
rnd = 36;
crit = 99;
require_param = "STR";
require_value = 80;
price = 4000;
}
function WeaponNinjaToJap1() {
NAME = "Short Ninja-To";
dmg = 4;
rnd = 19;
crit = 15;
require_param = "DEX";
require_value = 16;
price = 1100;
}
function WeaponNinjaToJap2() {
NAME = "Apprentice Ninja-To";
dmg = 5;
rnd = 25;
crit = 18;
require_param = "DEX";
require_value = 28;
price = 1950;
}
function WeaponNinjaToJap3() {
NAME = "Soldier Ninja-To";
dmg = 7;
rnd = 32;
crit = 21;
require_param = "DEX";
require_value = 40;
price = 2750;
}
function WeaponNinjaToJap4() {
NAME = "Rhonin Ninja-To";
dmg = 9;
rnd = 43;
crit = 24;
require_param = "DEX";
require_value = 51;
price = 3550;
}
function WeaponNinjaToJap5() {
NAME = "Holy Ninja-To";
dmg = 12;
rnd = 56;
crit = 27;
require_param = "DEX";
require_value = 63;
price = 4400;
}
function WeaponNinjaToJap6() {
NAME = "Black Hero";
dmg = 16;
rnd = 73;
crit = 30;
require_param = "DEX";
require_value = 75;
price = 5200;
}
function WeaponNinjaToJap7() {
NAME = "Crimson Ninja-To";
dmg = 21;
rnd = 96;
crit = 33;
require_param = "DEX";
require_value = 87;
price = 6050;
}
function WeaponNinjaToJap8() {
NAME = "Stellar Ninja-To";
dmg = 27;
rnd = 126;
crit = 36;
require_param = "DEX";
require_value = 99;
price = 6900;
}
function WeaponKatanaJap1() {
NAME = "Short Katana";
dmg = 6;
rnd = 28;
crit = 15;
require_param = "DEX";
require_value = 16;
price = 1650;
}
function WeaponKatanaJap2() {
NAME = "Apprentice Katana";
dmg = 8;
rnd = 37;
crit = 18;
require_param = "DEX";
require_value = 28;
price = 2900;
}
function WeaponKatanaJap3() {
NAME = "Soldier Katana";
dmg = 10;
rnd = 49;
crit = 21;
require_param = "DEX";
require_value = 40;
price = 4150;
}
function WeaponKatanaJap4() {
NAME = "Rhonin Katana";
dmg = 14;
rnd = 64;
crit = 24;
require_param = "DEX";
require_value = 51;
price = 5350;
}
function WeaponKatanaJap5() {
NAME = "Holy Katana";
dmg = 18;
rnd = 84;
crit = 27;
require_param = "DEX";
require_value = 63;
price = 6600;
}
function WeaponKatanaJap6() {
NAME = "Darkness";
dmg = 24;
rnd = 110;
crit = 30;
require_param = "DEX";
require_value = 75;
price = 7850;
}
function WeaponKatanaJap7() {
NAME = "Crimson Katana";
dmg = 31;
rnd = 144;
crit = 33;
require_param = "DEX";
require_value = 87;
price = 9100;
}
function WeaponKatanaJap8() {
NAME = "Eclipse";
dmg = 41;
rnd = 189;
crit = 36;
require_param = "DEX";
require_value = 99;
price = 10350;
}
function WeaponKatarAra1() {
NAME = "Jur";
dmg = 7;
rnd = 14;
crit = 20;
require_param = "DEX";
require_value = 16;
price = 1250;
}
function WeaponKatarAra2() {
NAME = "Slicing Jur";
dmg = 10;
rnd = 20;
crit = 23;
require_param = "DEX";
require_value = 33;
price = 2600;
}
function WeaponKatarAra3() {
NAME = "Katar";
dmg = 15;
rnd = 30;
crit = 26;
require_param = "DEX";
require_value = 49;
price = 3900;
}
function WeaponKatarAra4() {
NAME = "Night Shadow";
dmg = 22;
rnd = 44;
crit = 29;
require_param = "DEX";
require_value = 66;
price = 5250;
}
function WeaponKatarAra5() {
NAME = "Assassin Jur";
dmg = 32;
rnd = 64;
crit = 32;
require_param = "DEX";
require_value = 82;
price = 6550;
}
function WeaponKatarAra6() {
NAME = "Assassin's Might";
dmg = 47;
rnd = 93;
crit = 35;
require_param = "DEX";
require_value = 99;
price = 7900;
}
function WeaponBowViz1() {
NAME = "Long Bow";
dmg = 13;
rnd = 14;
crit = 10;
rng = 14;
require_param = "DEX";
require_value = 15;
price = 1100;
}
function WeaponBowViz2() {
NAME = "Fine Bow";
dmg = 24;
rnd = 26;
crit = 10;
rng = 14;
require_param = "DEX";
require_value = 40;
price = 3000;
}
function WeaponBowViz3() {
NAME = "Scorpio";
dmg = 45;
rnd = 48;
crit = 10;
rng = 14;
require_param = "DEX";
require_value = 65;
price = 4850;
}
function WeaponBowViz4() {
NAME = "Double Bow";
dmg = 85;
rnd = 91;
crit = 10;
rng = 14;
require_param = "DEX";
require_value = 90;
price = 6750;
}
function WeaponBowGer1() {
NAME = "Infantry Bow";
dmg = 10;
rnd = 11;
crit = 10;
rng = 14;
require_param = "DEX";
require_value = 13;
price = 950;
}
function WeaponBowGer2() {
NAME = "Forged Bow";
dmg = 19;
rnd = 21;
crit = 10;
rng = 14;
require_param = "DEX";
require_value = 35;
price = 2600;
}
function WeaponBowGer3() {
NAME = "Bonebow";
dmg = 36;
rnd = 39;
crit = 10;
rng = 14;
require_param = "DEX";
require_value = 58;
price = 4350;
}
function WeaponBowGer4() {
NAME = "Golden Bones";
dmg = 68;
rnd = 73;
crit = 10;
rng = 14;
require_param = "DEX";
require_value = 80;
price = 6000;
}
function WeaponBowRus1() {
NAME = "Guard Bow";
dmg = 15;
rnd = 16;
crit = 10;
rng = 14;
require_param = "DEX";
require_value = 16;
price = 1200;
}
function WeaponBowRus2() {
NAME = "Holy Bow";
dmg = 29;
rnd = 31;
crit = 10;
rng = 14;
require_param = "DEX";
require_value = 44;
price = 3300;
}
function WeaponBowRus3() {
NAME = "Antelope";
dmg = 54;
rnd = 58;
crit = 10;
rng = 14;
require_param = "DEX";
require_value = 71;
price = 5300;
}
function WeaponBowRus4() {
NAME = "Bladebow";
dmg = 101;
rnd = 109;
crit = 10;
rng = 14;
require_param = "DEX";
require_value = 99;
price = 7400;
}
function WeaponBowJap1() {
NAME = "Hunter Bow";
dmg = 11;
rnd = 12;
crit = 15;
aspd_bonus = 5;
rng = 14;
require_param = "DEX";
require_value = 14;
price = 1050;
}
function WeaponBowJap2() {
NAME = "Soldier Bow";
dmg = 21;
rnd = 23;
crit = 15;
aspd_bonus = 5;
rng = 14;
require_param = "DEX";
require_value = 37;
price = 2750;
}
function WeaponBowJap3() {
NAME = "Ninja Bow";
dmg = 40;
rnd = 44;
crit = 15;
aspd_bonus = 5;
rng = 14;
require_param = "DEX";
require_value = 61;
price = 4550;
}
function WeaponBowJap4() {
NAME = "Samurai Bow";
dmg = 76;
rnd = 82;
crit = 15;
aspd_bonus = 5;
rng = 14;
require_param = "DEX";
require_value = 85;
price = 6350;
}
function WeaponBowMon1() {
NAME = "Wooden Bow";
dmg = 14;
rnd = 15;
crit = 20;
aspd_bonus = 10;
rng = 14;
require_param = "DEX";
require_value = 15;
price = 1100;
}
function WeaponBowMon2() {
NAME = "Horseman Bow";
dmg = 26;
rnd = 28;
crit = 20;
aspd_bonus = 10;
rng = 14;
require_param = "DEX";
require_value = 41;
price = 3050;
}
function WeaponBowMon3() {
NAME = "Wanderer Bow";
dmg = 49;
rnd = 53;
crit = 20;
aspd_bonus = 10;
rng = 14;
require_param = "DEX";
require_value = 68;
price = 5100;
}
function WeaponBowMon4() {
NAME = "Khan's Bow";
dmg = 93;
rnd = 100;
crit = 20;
aspd_bonus = 10;
rng = 14;
require_param = "DEX";
require_value = 94;
price = 7050;
}
function WeaponCrossbowViz1() {
NAME = "Light Crossbow";
dmg = 18;
rnd = 36;
crit = 72;
rng = 18;
require_param = "DEX";
require_value = 16;
price = 1400;
}
function WeaponCrossbowViz2() {
NAME = "Medium Crossbow";
dmg = 34;
rnd = 68;
crit = 83;
rng = 18;
require_param = "DEX";
require_value = 44;
price = 3950;
}
function WeaponCrossbowViz3() {
NAME = "Elite Crossbow";
dmg = 64;
rnd = 128;
crit = 94;
rng = 18;
require_param = "DEX";
require_value = 71;
price = 6350;
}
function WeaponCrossbowViz4() {
NAME = "Spiky Crossbow";
dmg = 120;
rnd = 240;
crit = 105;
rng = 18;
require_param = "DEX";
require_value = 99;
price = 8900;
}
function WeaponCrossbowGer1() {
NAME = "Long Crossbow";
dmg = 15;
rnd = 30;
crit = 65;
rng = 18;
require_param = "DEX";
require_value = 15;
price = 1300;
}
function WeaponCrossbowGer2() {
NAME = "Steel Crossbow";
dmg = 28;
rnd = 56;
crit = 75;
rng = 18;
require_param = "DEX";
require_value = 40;
price = 3550;
}
function WeaponCrossbowGer3() {
NAME = "Forged Crossbow";
dmg = 53;
rnd = 106;
crit = 85;
rng = 18;
require_param = "DEX";
require_value = 65;
price = 5800;
}
function WeaponCrossbowGer4() {
NAME = "Dead Crossbow";
dmg = 100;
rnd = 200;
crit = 95;
rng = 18;
require_param = "DEX";
require_value = 90;
price = 8050;
}
function WeaponCrossbowRus1() {
NAME = "Hunter Crossbow";
dmg = 12;
rnd = 24;
crit = 52;
aspd_bonus = 5;
rng = 18;
require_param = "DEX";
require_value = 13;
price = 1150;
}
function WeaponCrossbowRus2() {
NAME = "Soldier Crossbow";
dmg = 23;
rnd = 45;
crit = 60;
aspd_bonus = 5;
rng = 18;
require_param = "DEX";
require_value = 35;
price = 3100;
}
function WeaponCrossbowRus3() {
NAME = "Guard Crossbow";
dmg = 43;
rnd = 85;
crit = 68;
aspd_bonus = 5;
rng = 18;
require_param = "DEX";
require_value = 58;
price = 5200;
}
function WeaponCrossbowRus4() {
NAME = "Shining Crossbow";
dmg = 80;
rnd = 160;
crit = 76;
aspd_bonus = 5;
rng = 18;
require_param = "DEX";
require_value = 80;
price = 7150;
}
function WeaponThrowingViz1() {
NAME = "Oil";
dmg = 43;
rnd = 58;
crit = 20;
aspd_bonus = -20;
rng = 8;
require_param = "STR";
require_value = 45;
price = 2900;
}
function WeaponThrowingViz2() {
NAME = "Greek Fire";
dmg = 59;
rnd = 79;
crit = 20;
aspd_bonus = -20;
rng = 8;
require_param = "STR";
require_value = 82;
price = 5300;
}
function WeaponThrowingGer1() {
NAME = "Steel Throwing Knife";
dmg = 16;
rnd = 22;
crit = 15;
aspd_bonus = 10;
rng = 8;
require_param = "DEX";
require_value = 15;
price = 950;
}
function WeaponThrowingGer2() {
NAME = "Silver Throwing Knife";
dmg = 22;
rnd = 30;
crit = 15;
aspd_bonus = 10;
rng = 8;
require_param = "DEX";
require_value = 27;
price = 1750;
}
function WeaponThrowingGer3() {
NAME = "Sinners";
dmg = 30;
rnd = 41;
crit = 15;
aspd_bonus = 10;
rng = 8;
require_param = "DEX";
require_value = 40;
price = 2550;
}
function WeaponThrowingGer4() {
NAME = "Holy Touches";
dmg = 42;
rnd = 56;
crit = 15;
aspd_bonus = 10;
rng = 8;
require_param = "DEX";
require_value = 52;
price = 3350;
}
function WeaponThrowingGer5() {
NAME = "Holy Thorns";
dmg = 57;
rnd = 77;
crit = 15;
aspd_bonus = 10;
rng = 8;
require_param = "DEX";
require_value = 65;
price = 4200;
}
function WeaponThrowingGer6() {
NAME = "Saint Spikes";
dmg = 79;
rnd = 105;
crit = 15;
aspd_bonus = 10;
rng = 8;
require_param = "DEX";
require_value = 77;
price = 5000;
}
function WeaponThrowingRus1() {
NAME = "Small Throwing Axe";
dmg = 22;
rnd = 29;
crit = 2;
rng = 8;
require_param = "STR";
require_value = 15;
price = 950;
}
function WeaponThrowingRus2() {
NAME = "Rounded Throwing Axe";
dmg = 30;
rnd = 40;
crit = 2;
rng = 8;
require_param = "STR";
require_value = 27;
price = 1750;
}
function WeaponThrowingRus3() {
NAME = "Tomahawks";
dmg = 41;
rnd = 54;
crit = 2;
rng = 8;
require_param = "STR";
require_value = 40;
price = 2550;
}
function WeaponThrowingRus4() {
NAME = "Holy Punches";
dmg = 56;
rnd = 74;
crit = 2;
rng = 8;
require_param = "STR";
require_value = 52;
price = 3350;
}
function WeaponThrowingRus5() {
NAME = "Saw-like Throwing Axe";
dmg = 77;
rnd = 102;
crit = 2;
rng = 8;
require_param = "STR";
require_value = 65;
price = 4200;
}
function WeaponThrowingRus6() {
NAME = "Bear Claws";
dmg = 105;
rnd = 140;
crit = 2;
rng = 8;
require_param = "STR";
require_value = 77;
price = 5000;
}
function WeaponThrowingJap1() {
NAME = "Suriken";
dmg = 14;
rnd = 19;
crit = 25;
aspd_bonus = 20;
rng = 8;
require_param = "DEX";
require_value = 15;
price = 950;
}
function WeaponThrowingJap2() {
NAME = "Silver Suriken";
dmg = 19;
rnd = 26;
crit = 25;
aspd_bonus = 20;
rng = 8;
require_param = "DEX";
require_value = 27;
price = 1750;
}
function WeaponThrowingJap3() {
NAME = "Rhonin Suriken";
dmg = 26;
rnd = 35;
crit = 25;
aspd_bonus = 20;
rng = 8;
require_param = "DEX";
require_value = 40;
price = 2550;
}
function WeaponThrowingJap4() {
NAME = "Shining Suriken";
dmg = 36;
rnd = 48;
crit = 25;
aspd_bonus = 20;
rng = 8;
require_param = "DEX";
require_value = 52;
price = 3350;
}
function WeaponThrowingJap5() {
NAME = "Black Spirits";
dmg = 50;
rnd = 66;
crit = 25;
aspd_bonus = 20;
rng = 8;
require_param = "DEX";
require_value = 65;
price = 4200;
}
function WeaponThrowingJap6() {
NAME = "Stormy Spirits";
dmg = 68;
rnd = 91;
crit = 25;
aspd_bonus = 20;
rng = 8;
require_param = "DEX";
require_value = 77;
price = 5000;
}
function WeaponThrowingJap7() {
NAME = "White Ghosts";
dmg = 94;
rnd = 125;
crit = 25;
aspd_bonus = 20;
rng = 8;
require_param = "DEX";
require_value = 90;
price = 5800;
}
function WeaponOnehandedSwordRog1() {
NAME = "Cheap Sword";
dmg = 7;
rnd = 6;
crit = 4;
price = 20;
}
function WeaponOnehandedSwordRog2() {
NAME = "Rusty Sabre";
dmg = 8;
rnd = 7;
crit = 4;
price = 20;
}
function WeaponTwohandedSwordRog1() {
NAME = "Cheap Twohanded Sword";
dmg = 10;
rnd = 9;
crit = 4;
price = 20;
}
function WeaponTwohandedSwordRog2() {
NAME = "Rusty Twohanded Sword";
dmg = 13;
rnd = 11;
crit = 4;
price = 20;
}
function WeaponOnehandedAxeRog1() {
NAME = "Cheap Axe";
dmg = 10;
rnd = 6;
crit = 3;
price = 20;
}
function WeaponOnehandedAxeRog2() {
NAME = "Bronze Axe";
dmg = 12;
rnd = 7;
crit = 2;
price = 20;
}
function WeaponTwohandedAxeRog1() {
NAME = "Splitter";
dmg = 15;
rnd = 8;
crit = 3;
price = 20;
}
function WeaponTwohandedAxeRog2() {
NAME = "Rusty Twohanded Axe";
dmg = 18;
rnd = 10;
crit = 2;
price = 20;
}
function WeaponOnehandedMaceRog1() {
NAME = "Wooden Club";
dmg = 6;
rnd = 2;
crit = 30;
price = 20;
}
function WeaponOnehandedMaceRog2() {
NAME = "Cheap Club";
dmg = 7;
rnd = 3;
crit = 25;
price = 20;
}
function WeaponTwohandedMaceRog1() {
NAME = "Rusty Twohanded Mace";
dmg = 8;
rnd = 4;
crit = 30;
price = 20;
}
function WeaponTwohandedMaceRog2() {
NAME = "Wooden Twohanded Club";
dmg = 10;
rnd = 5;
crit = 25;
price = 20;
}
function WeaponNinjaToRog1() {
NAME = "Rusty Ninja-To";
dmg = 3;
rnd = 12;
crit = 13;
price = 20;
}
function WeaponNinjaToRog2() {
NAME = "Cheap Ninja-To";
dmg = 3;
rnd = 15;
crit = 11;
price = 20;
}
function WeaponKatanaRog1() {
NAME = "Rusty Katana";
dmg = 4;
rnd = 18;
crit = 13;
price = 20;
}
function WeaponKatanaRog2() {
NAME = "Cheap Katana";
dmg = 5;
rnd = 23;
crit = 11;
price = 20;
}
function WeaponShieldViz1() {
NAME = "Guard";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
require_param = "CON";
require_value = 15;
crit = 10;
price = 200;
}
function WeaponShieldViz2() {
NAME = "Infantry Shield";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
require_param = "CON";
require_value = 35;
crit = 15;
price = 450;
}
function WeaponShieldViz3() {
NAME = "Chivalery Shield";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
require_param = "CON";
require_value = 55;
crit = 20;
price = 900;
}
function WeaponShieldViz4() {
NAME = "Commander Shield";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
require_param = "CON";
require_value = 75;
crit = 25;
price = 2000;
}
function WeaponShieldGer1() {
NAME = "Small Buckler";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
require_param = "CON";
require_value = 25;
crit = 12;
price = 250;
}
function WeaponShieldGer2() {
NAME = "Footman Shield";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
require_param = "CON";
require_value = 45;
crit = 17;
price = 600;
}
function WeaponShieldGer3() {
NAME = "Knight Shield";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
require_param = "CON";
require_value = 85;
crit = 22;
price = 1500;
}
function WeaponShieldGer4() {
NAME = "Crusader Shield";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
require_param = "CON";
require_value = 95;
crit = 27;
price = 2500;
}
function WeaponShieldRus1() {
NAME = "Wooden Buckler";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
require_param = "CON";
require_value = 10;
crit = 8;
price = 100;
}
function WeaponShieldRus2() {
NAME = "Iron Buckler";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
require_param = "CON";
require_value = 28;
crit = 13;
price = 300;
}
function WeaponShieldRus3() {
NAME = "Hero Shield";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
require_param = "CON";
require_value = 70;
crit = 21;
price = 1300;
}
function WeaponShieldRus4() {
NAME = "Holy Shield";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
require_param = "CON";
require_value = 100;
crit = 30;
price = 10000;
}
function WeaponShieldMon1() {
NAME = "Iron Buckler";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
require_param = "DEX";
require_value = 12;
crit = 9;
price = 100;
}
function WeaponShieldMon2() {
NAME = "Strong Buckler";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
require_param = "DEX";
require_value = 24;
crit = 14;
price = 300;
}
function WeaponShieldMon3() {
NAME = "Horseman Shield";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
require_param = "DEX";
require_value = 50;
crit = 21;
price = 1300;
}
function WeaponShieldMon4() {
NAME = "Wanderer Shield";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
require_param = "DEX";
require_value = 80;
crit = 24;
price = 10000;
}
var rng = 0;
var aspd_bonus = 0;
}
Symbol 3143 MovieClip [__Packages.Horse] Frame 0
class Horse extends Object
{
var skin_color, bonus_HP, bonus_DEF, bonus_speed, price;
function Horse (clr, bhp, bdf, bsp, prc) {
super();
if (clr == "any") {
var _local4 = ["red", "brown", "grey", "white", "black"];
skin_color = _local4[_root.dice(4)];
} else {
skin_color = clr;
}
bonus_HP = bhp;
bonus_DEF = bdf;
bonus_speed = bsp;
price = (prc ? (prc) : 0);
}
}
Symbol 3144 MovieClip [__Packages.Unit] Frame 0
class Unit extends Hero
{
var ID, TYPE, NATION, GENDER, LEVEL, price, ACTIVE_SKILLS, NAME, STR, CON, DEX, SPR, WEAPON_PRI, WEAPON_SEC, ARMOR, HELMET, primary_skill, SKILL, secondary_skill, HORSE, AURA_SKILLS;
function Unit (nt, tp, lv) {
super();
ID = lv;
TYPE = tp;
if (nt != "Rog") {
NATION = nt;
GENDER = (_root.percent(70) ? "m" : "f");
} else {
var _local4 = ["Viz", "Ger", "Rus", "Jap", "Mon", "Ara"];
NATION = String(_local4[_root.dice(4)]);
GENDER = "m";
}
LEVEL = (ID + 1) * 3;
this[((("Unit" + nt) + "_") + tp) + lv]();
price = getPrice();
}
function getUnitInfo() {
return(new UnitInfo(NATION, TYPE, ID));
}
function setActiveSkills(atk_anim, lv1, lv2, lv3) {
ACTIVE_SKILLS[atk_anim] = [lv1, lv2, lv3];
}
function getPrice() {
if (!(NAME === "Shogun Ghost")) {
} else {
return(100000);
}
var _local2 = 0;
_local2 = _local2 + (STR * 5);
_local2 = _local2 + (CON * 5);
_local2 = _local2 + (DEX * 5);
_local2 = _local2 + (SPR * 5);
if (WEAPON_PRI != null) {
_local2 = _local2 + (WEAPON_PRI.price / 10);
}
if (WEAPON_SEC != null) {
_local2 = _local2 + (WEAPON_SEC.price / 10);
}
if (ARMOR != null) {
_local2 = _local2 + (ARMOR.price / 10);
}
if (HELMET != null) {
_local2 = _local2 + (HELMET.price / 10);
}
_local2 = _local2 + (LEVEL * 50);
if (TYPE == "caster") {
_local2 = _local2 + ((1000 * ID) * ID);
}
return(Math.round(_local2));
}
function UnitViz_shield0() {
NAME = "Caravan Guard";
STR = 15;
DEX = 4;
CON = 9;
SPR = 4;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Viz", 1);
primary_skill = "Sword";
SKILL[primary_skill] = 55;
WEAPON_SEC = new WeaponClass("Shield", "Viz", 1);
secondary_skill = "Shield";
SKILL[secondary_skill] = 45;
ARMOR = null;
HELMET = null;
HORSE = null;
setActiveSkills("shield", 0, 1, 0);
}
function UnitViz_shield3() {
NAME = "Legionary";
STR = 32;
DEX = 10;
CON = 19;
SPR = 10;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Viz", 3);
primary_skill = "Sword";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("Shield", "Viz", 2);
secondary_skill = "Shield";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Viz", 3);
HELMET = new Armor("Helmet", "Viz", 3);
HORSE = null;
setActiveSkills("shield", 2, 0, 0);
}
function UnitViz_shield4() {
NAME = "Light Chivalry";
STR = 44;
DEX = 13;
CON = 26;
SPR = 13;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Viz", 4);
primary_skill = "Sword";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("Shield", "Viz", 3);
secondary_skill = "Shield";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Viz", 4);
HELMET = new Armor("Helmet", "Viz", 4);
HORSE = new Horse("any", 15, 1, 5);
}
function UnitViz_shield7() {
NAME = "Heavy Chivalry";
STR = 85;
DEX = 26;
CON = 51;
SPR = 26;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Viz", 6);
primary_skill = "Sword";
SKILL[primary_skill] = 97;
WEAPON_SEC = new WeaponClass("Shield", "Viz", 4);
secondary_skill = "Shield";
SKILL[secondary_skill] = 94;
ARMOR = new Armor("Clothes", "Viz", 7);
HELMET = new Armor("Helmet", "Viz", 7);
HORSE = new Horse("white", 220, 12, 1);
}
function UnitViz_2H_sword5() {
NAME = "Moon Warrior";
STR = 50;
DEX = 10;
CON = 30;
SPR = 20;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Viz", 4);
primary_skill = "Sword";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("Crossbow", "Viz", 3);
secondary_skill = "Crossbow";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Viz", 5);
HELMET = new Armor("Helmet", "Viz", 5);
HORSE = null;
setActiveSkills("2H_sword", 0, 3, 0);
}
function UnitViz_2H_sword6() {
NAME = "Golden Rider";
STR = 65;
DEX = 13;
CON = 39;
SPR = 26;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Viz", 5);
primary_skill = "Sword";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("Crossbow", "Viz", 3);
secondary_skill = "Crossbow";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Viz", 6);
HELMET = new Armor("Helmet", "Viz", 6);
HORSE = new Horse("white", 200, 10, 2);
}
function UnitViz_2H_sword7() {
NAME = "Elite Chivalry";
STR = 85;
DEX = 17;
CON = 51;
SPR = 34;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Viz", 6);
primary_skill = "Sword";
SKILL[primary_skill] = 97;
WEAPON_SEC = new WeaponClass("Crossbow", "Viz", 4);
secondary_skill = "Crossbow";
SKILL[secondary_skill] = 94;
ARMOR = new Armor("Clothes", "Viz", 7);
HELMET = new Armor("Helmet", "Viz", 7);
HORSE = new Horse("white", 250, 10, 2);
}
function UnitViz_2H_axe2() {
NAME = "Town Guard";
STR = 25;
DEX = 8;
CON = 12;
SPR = 10;
WEAPON_PRI = new WeaponClass("TwohandedAxe", "Viz", 2);
primary_skill = "Axe";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("Bow", "Viz", 1);
secondary_skill = "Bow";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Viz", 2);
HELMET = new Armor("Helmet", "Viz", 1);
HORSE = null;
setActiveSkills("2H_axe", 0, 1, 0);
}
function UnitViz_spear1() {
NAME = "Light Pikeman";
STR = 25;
DEX = 10;
CON = 10;
SPR = 10;
WEAPON_PRI = new WeaponClass("Spear", "Viz", 2);
primary_skill = "Spear";
SKILL[primary_skill] = 61;
WEAPON_SEC = new WeaponClass("Bow", "Viz", 1);
secondary_skill = "Bow";
SKILL[secondary_skill] = 52;
ARMOR = new Armor("Clothes", "Viz", 1);
HELMET = new Armor("Helmet", "Viz", 1);
HORSE = null;
setActiveSkills("spear", 0, 1, 0);
}
function UnitViz_spear3() {
NAME = "Line Infantry";
STR = 37;
DEX = 15;
CON = 15;
SPR = 15;
WEAPON_PRI = new WeaponClass("Spear", "Viz", 3);
primary_skill = "Spear";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("Bow", "Viz", 2);
secondary_skill = "Bow";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Viz", 3);
HELMET = new Armor("Helmet", "Viz", 3);
HORSE = null;
setActiveSkills("spear", 2, 0, 0);
}
function UnitViz_spear4() {
NAME = "Elite Phalax";
STR = 40;
DEX = 16;
CON = 16;
SPR = 16;
WEAPON_PRI = new WeaponClass("Spear", "Viz", 3);
primary_skill = "Spear";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("Bow", "Viz", 2);
secondary_skill = "Bow";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Viz", 4);
HELMET = new Armor("Helmet", "Viz", 4);
HORSE = null;
setActiveSkills("spear", 1, 2, 0);
}
function UnitViz_spear5() {
NAME = "Field Commander";
STR = 58;
DEX = 23;
CON = 23;
SPR = 23;
WEAPON_PRI = new WeaponClass("Spear", "Viz", 4);
primary_skill = "Spear";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("Bow", "Viz", 3);
secondary_skill = "Bow";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Viz", 5);
HELMET = new Armor("Helmet", "Viz", 5);
HORSE = new Horse("any", 60, 5, 3);
}
function UnitViz_dual2() {
NAME = "Mercenary";
STR = 25;
DEX = 10;
CON = 12;
SPR = 8;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Viz", 2);
primary_skill = "Sword";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Viz", 2);
secondary_skill = "Sword";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Viz", 2);
HELMET = new Armor("Helmet", "Viz", 1);
HORSE = null;
setActiveSkills("dual", 1, 0, 0);
}
function UnitViz_dual5() {
NAME = "Blademaster";
STR = 50;
DEX = 20;
CON = 25;
SPR = 15;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Viz", 4);
primary_skill = "Sword";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Viz", 4);
secondary_skill = "Sword";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Viz", 5);
HELMET = new Armor("Helmet", "Viz", 4);
HORSE = null;
setActiveSkills("dual", 2, 2, 0);
}
function UnitViz_dagger3() {
NAME = "Rogue";
STR = 13;
DEX = 32;
CON = 10;
SPR = 16;
WEAPON_PRI = new WeaponClass("Dagger", "Viz", 3);
primary_skill = "Dagger";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("Crossbow", "Viz", 2);
secondary_skill = "Crossbow";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Viz", 2);
HELMET = new Armor("Helmet", "Viz", 2);
HORSE = null;
}
function UnitViz_dagger6() {
NAME = "Dark Rogue";
STR = 27;
DEX = 68;
CON = 20;
SPR = 34;
WEAPON_PRI = new WeaponClass("Dagger", "Viz", 6);
primary_skill = "Dagger";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("Crossbow", "Viz", 4);
secondary_skill = "Crossbow";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Viz", 4);
HELMET = new Armor("Helmet", "Viz", 5);
HORSE = null;
setActiveSkills("dagger", 1, 3, 0);
}
function UnitViz_bow0() {
NAME = "Bowman";
STR = 4;
DEX = 15;
CON = 6;
SPR = 8;
WEAPON_PRI = new WeaponClass("Bow", "Viz", 1);
primary_skill = "Bow";
SKILL[primary_skill] = 55;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Viz", 1);
secondary_skill = "Sword";
SKILL[secondary_skill] = 45;
ARMOR = null;
HELMET = null;
HORSE = null;
setActiveSkills("bow", 1, 0, 0);
}
function UnitViz_bow2() {
NAME = "Archer Master";
STR = 8;
DEX = 28;
CON = 11;
SPR = 14;
WEAPON_PRI = new WeaponClass("Bow", "Viz", 2);
primary_skill = "Bow";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Viz", 2);
secondary_skill = "Sword";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Viz", 1);
HELMET = null;
HORSE = null;
setActiveSkills("bow", 0, 2, 0);
}
function UnitViz_bow4() {
NAME = "Chivalry Archer";
STR = 15;
DEX = 50;
CON = 20;
SPR = 25;
WEAPON_PRI = new WeaponClass("Bow", "Viz", 3);
primary_skill = "Bow";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Viz", 3);
secondary_skill = "Sword";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Viz", 3);
HELMET = new Armor("Helmet", "Viz", 2);
HORSE = new Horse("any", 5, 5, 5);
setActiveSkills("bow", 1, 2, 0);
}
function UnitViz_bow6() {
NAME = "Elite Archer";
STR = 27;
DEX = 90;
CON = 36;
SPR = 45;
WEAPON_PRI = new WeaponClass("Bow", "Viz", 4);
primary_skill = "Bow";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Viz", 4);
secondary_skill = "Sword";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Viz", 4);
HELMET = new Armor("Helmet", "Viz", 3);
HORSE = new Horse("any", 20, 5, 4);
setActiveSkills("bow", 0, 4, 0);
}
function UnitViz_crossbow0() {
NAME = "Crossbowman";
STR = 9;
DEX = 15;
CON = 3;
SPR = 6;
WEAPON_PRI = new WeaponClass("Crossbow", "Viz", 1);
primary_skill = "Crossbow";
SKILL[primary_skill] = 55;
WEAPON_SEC = new WeaponClass("TwohandedAxe", "Viz", 1);
secondary_skill = "Axe";
SKILL[secondary_skill] = 45;
ARMOR = null;
HELMET = null;
HORSE = null;
setActiveSkills("crossbow", 1, 0, 0);
}
function UnitViz_crossbow2() {
NAME = "Sharpshooter";
STR = 17;
DEX = 28;
CON = 6;
SPR = 11;
WEAPON_PRI = new WeaponClass("Crossbow", "Viz", 2);
primary_skill = "Crossbow";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("TwohandedAxe", "Viz", 2);
secondary_skill = "Axe";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Viz", 1);
HELMET = null;
HORSE = null;
setActiveSkills("crossbow", 0, 1, 0);
}
function UnitViz_crossbow4() {
NAME = "Sniper";
STR = 30;
DEX = 50;
CON = 10;
SPR = 20;
WEAPON_PRI = new WeaponClass("Crossbow", "Viz", 3);
primary_skill = "Crossbow";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("TwohandedAxe", "Viz", 3);
secondary_skill = "Axe";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Viz", 3);
HELMET = new Armor("Helmet", "Viz", 2);
HORSE = null;
setActiveSkills("crossbow", 0, 2, 1);
}
function UnitViz_crossbow6() {
NAME = "Elite Sniper";
STR = 54;
DEX = 90;
CON = 18;
SPR = 36;
WEAPON_PRI = new WeaponClass("Crossbow", "Viz", 4);
primary_skill = "Crossbow";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("TwohandedAxe", "Viz", 4);
secondary_skill = "Axe";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Viz", 4);
HELMET = new Armor("Helmet", "Viz", 3);
HORSE = new Horse("any", 20, 5, 4);
setActiveSkills("crossbow", 1, 4, 0);
}
function UnitViz_throwing0() {
NAME = "Fire Thrower";
STR = 18;
DEX = 30;
CON = 12;
SPR = 2;
WEAPON_PRI = new WeaponClass("Throwing", "Viz", 1);
primary_skill = "Throwing";
SKILL[primary_skill] = 55;
WEAPON_SEC = new WeaponClass("TwohandedSword", "Viz", 1);
secondary_skill = "Sword";
SKILL[secondary_skill] = 45;
ARMOR = null;
HELMET = null;
HORSE = null;
}
function UnitViz_throwing2() {
NAME = "Demolisher";
STR = 30;
DEX = 50;
CON = 20;
SPR = 2;
WEAPON_PRI = new WeaponClass("Throwing", "Viz", 2);
primary_skill = "Throwing";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("TwohandedSword", "Viz", 2);
secondary_skill = "Sword";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Viz", 1);
HELMET = null;
HORSE = null;
}
function UnitGer_shield1() {
NAME = "Maceman";
STR = 16;
DEX = 2;
CON = 20;
SPR = 6;
WEAPON_PRI = new WeaponClass("OnehandedMace", "Ger", 1);
primary_skill = "Mace";
SKILL[primary_skill] = 61;
WEAPON_SEC = new WeaponClass("Shield", "Ger", 1);
secondary_skill = "Shield";
SKILL[secondary_skill] = 52;
ARMOR = new Armor("Clothes", "Ger", 1);
HELMET = new Armor("Helmet", "Ger", 1);
HORSE = null;
setActiveSkills("shield", 1, 0, 0);
}
function UnitGer_shield2() {
NAME = "Footman";
STR = 20;
DEX = 2;
CON = 25;
SPR = 8;
WEAPON_PRI = new WeaponClass("OnehandedMace", "Ger", 2);
primary_skill = "Mace";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("Shield", "Ger", 2);
secondary_skill = "Shield";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Ger", 2);
HELMET = new Armor("Helmet", "Ger", 2);
HORSE = null;
setActiveSkills("shield", 1, 1, 0);
}
function UnitGer_shield3() {
NAME = "Heavy Maceman";
STR = 26;
DEX = 3;
CON = 32;
SPR = 10;
WEAPON_PRI = new WeaponClass("OnehandedMace", "Ger", 3);
primary_skill = "Mace";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("Shield", "Ger", 2);
secondary_skill = "Shield";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Ger", 3);
HELMET = new Armor("Helmet", "Ger", 3);
HORSE = null;
setActiveSkills("shield", 2, 0, 0);
}
function UnitGer_shield5() {
NAME = "Knight";
STR = 40;
DEX = 5;
CON = 50;
SPR = 15;
WEAPON_PRI = new WeaponClass("OnehandedMace", "Ger", 4);
primary_skill = "Mace";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("Shield", "Ger", 3);
secondary_skill = "Shield";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Ger", 5);
HELMET = new Armor("Helmet", "Ger", 5);
HORSE = new Horse("white", 70, 7, 2);
}
function UnitGer_shield6() {
NAME = "Crusader";
STR = 52;
DEX = 6;
CON = 65;
SPR = 20;
WEAPON_PRI = new WeaponClass("OnehandedMace", "Ger", 5);
primary_skill = "Mace";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("Shield", "Ger", 4);
secondary_skill = "Shield";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Ger", 6);
HELMET = new Armor("Helmet", "Ger", 6);
HORSE = new Horse("black", 100, 15, 0);
}
function UnitGer_2H_sword0() {
NAME = "Light Fighter";
STR = 15;
DEX = 2;
CON = 12;
SPR = 4;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Ger", 1);
primary_skill = "Sword";
SKILL[primary_skill] = 55;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = null;
HELMET = null;
HORSE = null;
}
function UnitGer_2H_sword4() {
NAME = "Paladin";
STR = 44;
DEX = 4;
CON = 35;
SPR = 13;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Ger", 4);
primary_skill = "Sword";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("Crossbow", "Ger", 2);
secondary_skill = "Crossbow";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Ger", 4);
HELMET = new Armor("Helmet", "Ger", 3);
HORSE = null;
setActiveSkills("2H_sword", 0, 3, 0);
}
function UnitGer_2H_sword7() {
NAME = "Serafim";
STR = 85;
DEX = 8;
CON = 68;
SPR = 26;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Ger", 6);
primary_skill = "Sword";
SKILL[primary_skill] = 97;
WEAPON_SEC = new WeaponClass("Crossbow", "Ger", 4);
secondary_skill = "Crossbow";
SKILL[secondary_skill] = 94;
ARMOR = new Armor("Clothes", "Ger", 7);
HELMET = new Armor("Helmet", "Ger", 7);
HORSE = new Horse("white", 300, 5, 3);
}
function UnitGer_2H_axe1() {
NAME = "Monk";
STR = 22;
DEX = 2;
CON = 22;
SPR = 2;
WEAPON_PRI = new WeaponClass("TwohandedMace", "Ger", 1);
primary_skill = "Mace";
SKILL[primary_skill] = 61;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Ger", 1);
HELMET = null;
HORSE = null;
setActiveSkills("2H_axe", 2, 0, 0);
}
function UnitGer_2H_axe2() {
NAME = "Town Guard";
STR = 25;
DEX = 2;
CON = 25;
SPR = 2;
WEAPON_PRI = new WeaponClass("TwohandedMace", "Ger", 2);
primary_skill = "Mace";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("Bow", "Ger", 1);
secondary_skill = "Bow";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Ger", 2);
HELMET = new Armor("Helmet", "Ger", 1);
HORSE = null;
setActiveSkills("2H_axe", 0, 0, 1);
}
function UnitGer_2H_axe6() {
NAME = "Dark Priest";
STR = 65;
DEX = 6;
CON = 65;
SPR = 6;
WEAPON_PRI = new WeaponClass("TwohandedMace", "Ger", 5);
primary_skill = "Mace";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("Bow", "Ger", 3);
secondary_skill = "Bow";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Ger", 6);
HELMET = new Armor("Helmet", "Ger", 6);
HORSE = null;
setActiveSkills("2H_axe", 0, 0, 4);
}
function UnitGer_spear2() {
NAME = "Guard Infantry";
STR = 28;
DEX = 6;
CON = 17;
SPR = 11;
WEAPON_PRI = new WeaponClass("Spear", "Ger", 2);
primary_skill = "Spear";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("Bow", "Ger", 1);
secondary_skill = "Bow";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Ger", 2);
HELMET = new Armor("Helmet", "Ger", 2);
HORSE = null;
setActiveSkills("spear", 0, 1, 0);
}
function UnitGer_spear3() {
NAME = "Grey Infantry";
STR = 37;
DEX = 7;
CON = 22;
SPR = 15;
WEAPON_PRI = new WeaponClass("Spear", "Ger", 3);
primary_skill = "Spear";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("Bow", "Ger", 2);
secondary_skill = "Bow";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Ger", 3);
HELMET = new Armor("Helmet", "Ger", 3);
HORSE = null;
setActiveSkills("spear", 1, 2, 0);
}
function UnitGer_spear4() {
NAME = "Elite Infantry";
STR = 40;
DEX = 8;
CON = 24;
SPR = 16;
WEAPON_PRI = new WeaponClass("Spear", "Ger", 3);
primary_skill = "Spear";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("Bow", "Ger", 2);
secondary_skill = "Bow";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Ger", 4);
HELMET = new Armor("Helmet", "Ger", 4);
HORSE = null;
setActiveSkills("spear", 2, 0, 1);
}
function UnitGer_spear7() {
NAME = "Holy Rider";
STR = 85;
DEX = 17;
CON = 51;
SPR = 34;
WEAPON_PRI = new WeaponClass("Spear", "Ger", 5);
primary_skill = "Spear";
SKILL[primary_skill] = 97;
WEAPON_SEC = new WeaponClass("Bow", "Ger", 4);
secondary_skill = "Bow";
SKILL[secondary_skill] = 94;
ARMOR = new Armor("Clothes", "Ger", 7);
HELMET = new Armor("Helmet", "Ger", 7);
HORSE = new Horse("white", 200, 20, 0);
}
function UnitGer_dual4() {
NAME = "Macemaster";
STR = 18;
DEX = 18;
CON = 44;
SPR = 18;
WEAPON_PRI = new WeaponClass("OnehandedMace", "Ger", 4);
primary_skill = "Mace";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("OnehandedMace", "Ger", 4);
secondary_skill = "Mace";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Ger", 4);
HELMET = new Armor("Helmet", "Ger", 3);
HORSE = null;
setActiveSkills("dual", 2, 0, 0);
}
function UnitGer_bow1() {
NAME = "Hunter";
STR = 2;
DEX = 18;
CON = 11;
SPR = 9;
WEAPON_PRI = new WeaponClass("Bow", "Ger", 1);
primary_skill = "Bow";
SKILL[primary_skill] = 61;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Ger", 1);
secondary_skill = "Sword";
SKILL[secondary_skill] = 52;
ARMOR = null;
HELMET = null;
HORSE = null;
setActiveSkills("bow", 0, 0, 1);
}
function UnitGer_bow3() {
NAME = "Sr. Bowman";
STR = 3;
DEX = 28;
CON = 17;
SPR = 14;
WEAPON_PRI = new WeaponClass("Bow", "Ger", 2);
primary_skill = "Bow";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Ger", 2);
secondary_skill = "Sword";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Ger", 2);
HELMET = new Armor("Helmet", "Ger", 1);
HORSE = null;
setActiveSkills("bow", 1, 0, 1);
}
function UnitGer_crossbow2() {
NAME = "Castle Defender";
STR = 3;
DEX = 28;
CON = 22;
SPR = 8;
WEAPON_PRI = new WeaponClass("Crossbow", "Ger", 2);
primary_skill = "Crossbow";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("TwohandedSword", "Ger", 2);
secondary_skill = "Sword";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Ger", 1);
HELMET = null;
HORSE = null;
setActiveSkills("crossbow", 0, 0, 1);
}
function UnitGer_crossbow4() {
NAME = "Castle Keeper";
STR = 5;
DEX = 50;
CON = 40;
SPR = 15;
WEAPON_PRI = new WeaponClass("Crossbow", "Ger", 3);
primary_skill = "Crossbow";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("TwohandedSword", "Ger", 3);
secondary_skill = "Sword";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Ger", 3);
HELMET = new Armor("Helmet", "Ger", 2);
HORSE = null;
setActiveSkills("crossbow", 2, 0, 1);
}
function UnitGer_crossbow6() {
NAME = "Dark Shooter";
STR = 9;
DEX = 90;
CON = 72;
SPR = 27;
WEAPON_PRI = new WeaponClass("Crossbow", "Ger", 4);
primary_skill = "Crossbow";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("TwohandedSword", "Ger", 4);
secondary_skill = "Sword";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Ger", 4);
HELMET = new Armor("Helmet", "Ger", 3);
HORSE = new Horse("black", 20, 15, 1);
setActiveSkills("crossbow", 1, 1, 3);
}
function UnitGer_throwing1() {
NAME = "Recon";
STR = 4;
DEX = 20;
CON = 8;
SPR = 12;
WEAPON_PRI = new WeaponClass("Throwing", "Ger", 2);
primary_skill = "Throwing";
SKILL[primary_skill] = 61;
WEAPON_SEC = new WeaponClass("TwohandedSword", "Ger", 1);
secondary_skill = "Sword";
SKILL[secondary_skill] = 52;
ARMOR = null;
HELMET = null;
HORSE = null;
setActiveSkills("throwing", 1, 0, 0);
}
function UnitGer_throwing3() {
NAME = "Master Recon";
STR = 6;
DEX = 28;
CON = 11;
SPR = 17;
WEAPON_PRI = new WeaponClass("Throwing", "Ger", 3);
primary_skill = "Throwing";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("TwohandedSword", "Ger", 3);
secondary_skill = "Sword";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Ger", 2);
HELMET = new Armor("Helmet", "Ger", 1);
HORSE = null;
setActiveSkills("throwing", 1, 1, 0);
}
function UnitGer_throwing5() {
NAME = "Inquisitor";
STR = 10;
DEX = 50;
CON = 20;
SPR = 30;
WEAPON_PRI = new WeaponClass("Throwing", "Ger", 5);
primary_skill = "Throwing";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("TwohandedSword", "Ger", 4);
secondary_skill = "Sword";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Ger", 4);
HELMET = new Armor("Helmet", "Ger", 3);
HORSE = new Horse("black", 50, 5, 3);
setActiveSkills("throwing", 0, 3, 1);
}
function UnitRus_shield2() {
NAME = "Warrior";
STR = 28;
DEX = 10;
CON = 10;
SPR = 8;
WEAPON_PRI = new WeaponClass("OnehandedAxe", "Rus", 2);
primary_skill = "Axe";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("Shield", "Rus", 2);
secondary_skill = "Shield";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Rus", 2);
HELMET = new Armor("Helmet", "Rus", 2);
HORSE = null;
setActiveSkills("shield", 1, 0, 1);
}
function UnitRus_shield3() {
NAME = "Veteran Warrior";
STR = 35;
DEX = 13;
CON = 13;
SPR = 10;
WEAPON_PRI = new WeaponClass("OnehandedAxe", "Rus", 3);
primary_skill = "Axe";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("Shield", "Rus", 2);
secondary_skill = "Shield";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Rus", 3);
HELMET = new Armor("Helmet", "Rus", 3);
HORSE = null;
setActiveSkills("shield", 1, 0, 2);
}
function UnitRus_shield4() {
NAME = "Elite Warrior";
STR = 48;
DEX = 18;
CON = 18;
SPR = 13;
WEAPON_PRI = new WeaponClass("OnehandedAxe", "Rus", 4);
primary_skill = "Axe";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("Shield", "Rus", 3);
secondary_skill = "Shield";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Rus", 4);
HELMET = new Armor("Helmet", "Rus", 4);
HORSE = null;
setActiveSkills("shield", 1, 0, 3);
}
function UnitRus_2H_sword0() {
NAME = "Militia Commander";
STR = 16;
DEX = 9;
CON = 3;
SPR = 2;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Rus", 1);
primary_skill = "Sword";
SKILL[primary_skill] = 55;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = null;
HELMET = null;
HORSE = null;
setActiveSkills("2H_sword", 1, 0, 0);
}
function UnitRus_2H_sword7() {
NAME = "Holy Warrior";
STR = 94;
DEX = 51;
CON = 17;
SPR = 8;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Rus", 6);
primary_skill = "Sword";
SKILL[primary_skill] = 97;
WEAPON_SEC = new WeaponClass("Bow", "Rus", 4);
secondary_skill = "Bow";
SKILL[secondary_skill] = 94;
ARMOR = new Armor("Clothes", "Rus", 7);
HELMET = new Armor("Helmet", "Rus", 7);
HORSE = new Horse("white", 300, 10, 0);
}
function UnitRus_2H_axe0() {
NAME = "Militia";
STR = 16;
DEX = 2;
CON = 9;
SPR = 3;
WEAPON_PRI = new WeaponClass("TwohandedAxe", "Rus", 1);
primary_skill = "Axe";
SKILL[primary_skill] = 55;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = null;
HELMET = null;
HORSE = null;
setActiveSkills("2H_axe", 0, 1, 0);
}
function UnitRus_2H_axe1() {
NAME = "Village Guard";
STR = 24;
DEX = 2;
CON = 13;
SPR = 4;
WEAPON_PRI = new WeaponClass("TwohandedAxe", "Rus", 1);
primary_skill = "Axe";
SKILL[primary_skill] = 61;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Rus", 1);
HELMET = null;
HORSE = null;
setActiveSkills("2H_axe", 0, 0, 1);
}
function UnitRus_2H_axe6() {
NAME = "Great Guard";
STR = 72;
DEX = 6;
CON = 39;
SPR = 13;
WEAPON_PRI = new WeaponClass("TwohandedAxe", "Rus", 5);
primary_skill = "Axe";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("Crossbow", "Rus", 3);
secondary_skill = "Crossbow";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Rus", 6);
HELMET = new Armor("Helmet", "Rus", 6);
HORSE = new Horse("any", 250, 5, 1);
setActiveSkills("2H_axe", 0, 4, 0);
}
function UnitRus_2H_axe7() {
NAME = "Great Hero";
STR = 94;
DEX = 8;
CON = 51;
SPR = 17;
WEAPON_PRI = new WeaponClass("TwohandedAxe", "Rus", 6);
primary_skill = "Axe";
SKILL[primary_skill] = 97;
WEAPON_SEC = new WeaponClass("Crossbow", "Rus", 4);
secondary_skill = "Crossbow";
SKILL[secondary_skill] = 94;
ARMOR = new Armor("Clothes", "Rus", 7);
HELMET = new Armor("Helmet", "Rus", 7);
HORSE = new Horse("white", 350, 5, 0);
}
function UnitRus_spear4() {
NAME = "Light Rider";
STR = 40;
DEX = 16;
CON = 24;
SPR = 8;
WEAPON_PRI = new WeaponClass("Spear", "Rus", 3);
primary_skill = "Spear";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("Bow", "Rus", 2);
secondary_skill = "Bow";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Rus", 4);
HELMET = new Armor("Helmet", "Rus", 4);
HORSE = new Horse("any", 20, 5, 4);
}
function UnitRus_spear5() {
NAME = "Elite Guard";
STR = 58;
DEX = 23;
CON = 35;
SPR = 12;
WEAPON_PRI = new WeaponClass("Spear", "Rus", 4);
primary_skill = "Spear";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("Bow", "Rus", 3);
secondary_skill = "Bow";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Rus", 5);
HELMET = new Armor("Helmet", "Rus", 5);
HORSE = new Horse("any", 100, 7, 2);
}
function UnitRus_dual3() {
NAME = "Axemaster";
STR = 35;
DEX = 3;
CON = 22;
SPR = 10;
WEAPON_PRI = new WeaponClass("OnehandedAxe", "Rus", 3);
primary_skill = "Axe";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("OnehandedAxe", "Rus", 3);
secondary_skill = "Axe";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Rus", 3);
HELMET = new Armor("Helmet", "Rus", 2);
HORSE = null;
setActiveSkills("dual", 0, 3, 0);
}
function UnitRus_dual5() {
NAME = "Berserker";
STR = 55;
DEX = 5;
CON = 35;
SPR = 15;
WEAPON_PRI = new WeaponClass("OnehandedAxe", "Rus", 4);
primary_skill = "Axe";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("OnehandedAxe", "Rus", 4);
secondary_skill = "Axe";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Rus", 5);
HELMET = new Armor("Helmet", "Rus", 4);
HORSE = null;
setActiveSkills("dual", 4, 0, 0);
}
function UnitRus_bow2() {
NAME = "Forest Guard";
STR = 14;
DEX = 28;
CON = 3;
SPR = 17;
WEAPON_PRI = new WeaponClass("Bow", "Rus", 2);
primary_skill = "Bow";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("TwohandedMace", "Rus", 2);
secondary_skill = "Mace";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Rus", 1);
HELMET = null;
HORSE = null;
setActiveSkills("bow", 0, 2, 0);
}
function UnitRus_bow4() {
NAME = "Forest Keeper";
STR = 25;
DEX = 50;
CON = 5;
SPR = 30;
WEAPON_PRI = new WeaponClass("Bow", "Rus", 3);
primary_skill = "Bow";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("TwohandedMace", "Rus", 3);
secondary_skill = "Mace";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Rus", 3);
HELMET = new Armor("Helmet", "Rus", 2);
HORSE = null;
setActiveSkills("bow", 1, 3, 0);
}
function UnitRus_bow6() {
NAME = "Elder";
STR = 45;
DEX = 90;
CON = 9;
SPR = 54;
WEAPON_PRI = new WeaponClass("Bow", "Rus", 4);
primary_skill = "Bow";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("TwohandedMace", "Rus", 4);
secondary_skill = "Mace";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Rus", 4);
HELMET = new Armor("Helmet", "Rus", 3);
HORSE = new Horse("white", 80, 5, 3);
setActiveSkills("bow", 0, 4, 1);
}
function UnitRus_crossbow1() {
NAME = "Crossbow Master";
STR = 2;
DEX = 18;
CON = 11;
SPR = 9;
WEAPON_PRI = new WeaponClass("Crossbow", "Rus", 1);
primary_skill = "Crossbow";
SKILL[primary_skill] = 61;
WEAPON_SEC = new WeaponClass("TwohandedMace", "Rus", 1);
secondary_skill = "Mace";
SKILL[secondary_skill] = 52;
ARMOR = null;
HELMET = null;
HORSE = null;
setActiveSkills("crossbow", 1, 0, 0);
}
function UnitRus_throwing3() {
NAME = "Axe Thrower";
STR = 28;
DEX = 6;
CON = 22;
SPR = 6;
WEAPON_PRI = new WeaponClass("Throwing", "Rus", 3);
primary_skill = "Throwing";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("TwohandedAxe", "Rus", 3);
secondary_skill = "Axe";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Rus", 2);
HELMET = new Armor("Helmet", "Rus", 1);
HORSE = null;
setActiveSkills("throwing", 0, 2, 0);
}
function UnitRus_throwing5() {
NAME = "Elite Axe Thrower";
STR = 50;
DEX = 10;
CON = 40;
SPR = 10;
WEAPON_PRI = new WeaponClass("Throwing", "Rus", 5);
primary_skill = "Throwing";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("TwohandedAxe", "Rus", 4);
secondary_skill = "Axe";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Rus", 4);
HELMET = new Armor("Helmet", "Rus", 3);
HORSE = null;
setActiveSkills("throwing", 2, 3, 0);
}
function UnitJap_katana2() {
NAME = "Ninja";
STR = 21;
DEX = 26;
CON = 5;
SPR = 13;
WEAPON_PRI = new WeaponClass("Katana", "Jap", 2);
primary_skill = "FarEast";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("Throwing", "Jap", 1);
secondary_skill = "Throwing";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Jap", 2);
HELMET = new Armor("Helmet", "Jap", 2);
HORSE = null;
setActiveSkills("katana", 2, 0, 0);
}
function UnitJap_katana3() {
NAME = "Rhonin";
STR = 26;
DEX = 33;
CON = 7;
SPR = 16;
WEAPON_PRI = new WeaponClass("Katana", "Jap", 3);
primary_skill = "FarEast";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("Throwing", "Jap", 2);
secondary_skill = "Throwing";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Jap", 3);
HELMET = new Armor("Helmet", "Jap", 3);
HORSE = null;
setActiveSkills("katana", 2, 2, 0);
}
function UnitJap_katana4() {
NAME = "Rhonin Rider";
STR = 34;
DEX = 42;
CON = 8;
SPR = 21;
WEAPON_PRI = new WeaponClass("Katana", "Jap", 4);
primary_skill = "FarEast";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("Throwing", "Jap", 3);
secondary_skill = "Throwing";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Jap", 4);
HELMET = new Armor("Helmet", "Jap", 4);
HORSE = new Horse("any", 150, 15, 4);
}
function UnitJap_katana5() {
NAME = "Samurai";
STR = 43;
DEX = 54;
CON = 11;
SPR = 27;
WEAPON_PRI = new WeaponClass("Katana", "Jap", 5);
primary_skill = "FarEast";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("Throwing", "Jap", 4);
secondary_skill = "Throwing";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Jap", 5);
HELMET = new Armor("Helmet", "Jap", 5);
HORSE = null;
setActiveSkills("katana", 4, 2, 0);
}
function UnitJap_katana6() {
NAME = "Black Samurai";
STR = 52;
DEX = 65;
CON = 13;
SPR = 32;
WEAPON_PRI = new WeaponClass("Katana", "Jap", 6);
primary_skill = "FarEast";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("Throwing", "Jap", 6);
secondary_skill = "Throwing";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Jap", 6);
HELMET = new Armor("Helmet", "Jap", 6);
HORSE = null;
setActiveSkills("katana", 4, 2, 1);
}
function UnitJap_katana7() {
NAME = "Shogun";
STR = 68;
DEX = 85;
CON = 17;
SPR = 42;
WEAPON_PRI = new WeaponClass("Katana", "Jap", 7);
primary_skill = "FarEast";
SKILL[primary_skill] = 97;
WEAPON_SEC = new WeaponClass("Throwing", "Jap", 7);
secondary_skill = "Throwing";
SKILL[secondary_skill] = 94;
ARMOR = new Armor("Clothes", "Jap", 7);
HELMET = new Armor("Helmet", "Jap", 7);
HORSE = null;
setActiveSkills("katana", 4, 3, 2);
}
function UnitJap_katana8() {
NAME = "Shogun Ghost";
STR = 80;
DEX = 100;
CON = 20;
SPR = 50;
WEAPON_PRI = new WeaponClass("Katana", "Jap", 8);
primary_skill = "FarEast";
SKILL[primary_skill] = 100;
WEAPON_SEC = new WeaponClass("Throwing", "Jap", 7);
secondary_skill = "Throwing";
SKILL[secondary_skill] = 100;
ARMOR = new Armor("Clothes", "Jap", 8);
HELMET = new Armor("Helmet", "Jap", 8);
HORSE = null;
setActiveSkills("katana", 0, 0, 5);
}
function UnitJap_dual3() {
NAME = "Elite Ninja";
STR = 29;
DEX = 29;
CON = 10;
SPR = 13;
WEAPON_PRI = new WeaponClass("NinjaTo", "Jap", 3);
primary_skill = "FarEast";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("NinjaTo", "Jap", 3);
secondary_skill = "FarEast";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Jap", 3);
HELMET = new Armor("Helmet", "Jap", 2);
HORSE = null;
setActiveSkills("dual", 2, 2, 0);
}
function UnitJap_dual4() {
NAME = "Master Ninja";
STR = 40;
DEX = 40;
CON = 13;
SPR = 18;
WEAPON_PRI = new WeaponClass("NinjaTo", "Jap", 4);
primary_skill = "FarEast";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("NinjaTo", "Jap", 4);
secondary_skill = "FarEast";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Jap", 4);
HELMET = new Armor("Helmet", "Jap", 3);
HORSE = null;
setActiveSkills("dual", 2, 0, 3);
}
function UnitJap_dual5() {
NAME = "Ninja Ghost";
STR = 45;
DEX = 45;
CON = 15;
SPR = 20;
WEAPON_PRI = new WeaponClass("NinjaTo", "Jap", 4);
primary_skill = "FarEast";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("NinjaTo", "Jap", 4);
secondary_skill = "FarEast";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Jap", 5);
HELMET = new Armor("Helmet", "Jap", 4);
HORSE = null;
setActiveSkills("dual", 0, 4, 4);
}
function UnitJap_staff1() {
NAME = "Apprentice";
STR = 8;
DEX = 24;
CON = 6;
SPR = 12;
WEAPON_PRI = new WeaponClass("Staff", "Jap", 2);
primary_skill = "Staff";
SKILL[primary_skill] = 61;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Jap", 1);
HELMET = new Armor("Helmet", "Jap", 1);
HORSE = null;
setActiveSkills("staff", 1, 0, 0);
}
function UnitJap_staff2() {
NAME = "High Apprentice";
STR = 10;
DEX = 31;
CON = 8;
SPR = 16;
WEAPON_PRI = new WeaponClass("Staff", "Jap", 3);
primary_skill = "Staff";
SKILL[primary_skill] = 67;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Jap", 2);
HELMET = new Armor("Helmet", "Jap", 2);
HORSE = null;
setActiveSkills("staff", 3, 0, 0);
}
function UnitJap_staff3() {
NAME = "Samurai Guard";
STR = 13;
DEX = 40;
CON = 10;
SPR = 20;
WEAPON_PRI = new WeaponClass("Staff", "Jap", 4);
primary_skill = "Staff";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("Bow", "Jap", 1);
secondary_skill = "Bow";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Jap", 3);
HELMET = new Armor("Helmet", "Jap", 3);
HORSE = null;
setActiveSkills("staff", 3, 1, 0);
}
function UnitJap_staff4() {
NAME = "Samurai Soldier";
STR = 17;
DEX = 50;
CON = 13;
SPR = 25;
WEAPON_PRI = new WeaponClass("Staff", "Jap", 5);
primary_skill = "Staff";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("Bow", "Jap", 2);
secondary_skill = "Bow";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Jap", 4);
HELMET = new Armor("Helmet", "Jap", 4);
HORSE = null;
setActiveSkills("staff", 0, 3, 2);
}
function UnitJap_staff5() {
NAME = "Shogun Guard";
STR = 22;
DEX = 65;
CON = 16;
SPR = 32;
WEAPON_PRI = new WeaponClass("Staff", "Jap", 6);
primary_skill = "Staff";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("Bow", "Jap", 2);
secondary_skill = "Bow";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Jap", 5);
HELMET = new Armor("Helmet", "Jap", 5);
HORSE = null;
setActiveSkills("staff", 2, 4, 0);
}
function UnitJap_staff6() {
NAME = "Secret Elites";
STR = 28;
DEX = 84;
CON = 21;
SPR = 42;
WEAPON_PRI = new WeaponClass("Staff", "Jap", 7);
primary_skill = "Staff";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("Bow", "Jap", 3);
secondary_skill = "Bow";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Jap", 6);
HELMET = new Armor("Helmet", "Jap", 6);
HORSE = null;
setActiveSkills("staff", 0, 4, 3);
}
function UnitJap_bow1() {
NAME = "Shadow Bowman";
STR = 11;
DEX = 18;
CON = 2;
SPR = 14;
WEAPON_PRI = new WeaponClass("Bow", "Jap", 1);
primary_skill = "Bow";
SKILL[primary_skill] = 61;
WEAPON_SEC = new WeaponClass("Staff", "Jap", 1);
secondary_skill = "Staff";
SKILL[secondary_skill] = 52;
ARMOR = null;
HELMET = null;
HORSE = null;
setActiveSkills("bow", 0, 1, 0);
}
function UnitJap_bow2() {
NAME = "Ghost Bowman";
STR = 17;
DEX = 28;
CON = 3;
SPR = 22;
WEAPON_PRI = new WeaponClass("Bow", "Jap", 2);
primary_skill = "Bow";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("Staff", "Jap", 2);
secondary_skill = "Staff";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Jap", 1);
HELMET = null;
HORSE = null;
setActiveSkills("bow", 1, 2, 0);
}
function UnitJap_bow3() {
NAME = "Phantom Bowman";
STR = 17;
DEX = 28;
CON = 3;
SPR = 22;
WEAPON_PRI = new WeaponClass("Bow", "Jap", 2);
primary_skill = "Bow";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("Staff", "Jap", 2);
secondary_skill = "Staff";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Jap", 2);
HELMET = new Armor("Helmet", "Jap", 1);
HORSE = null;
setActiveSkills("bow", 4, 0, 0);
}
function UnitJap_bow5() {
NAME = "Whisper Bowman";
STR = 36;
DEX = 60;
CON = 6;
SPR = 48;
WEAPON_PRI = new WeaponClass("Bow", "Jap", 3);
primary_skill = "Bow";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("Staff", "Jap", 4);
secondary_skill = "Staff";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Jap", 3);
HELMET = new Armor("Helmet", "Jap", 2);
HORSE = null;
setActiveSkills("bow", 4, 4, 0);
}
function UnitJap_throwing0() {
NAME = "Suriken Thrower";
STR = 12;
DEX = 15;
CON = 2;
SPR = 9;
WEAPON_PRI = new WeaponClass("Throwing", "Jap", 1);
primary_skill = "Throwing";
SKILL[primary_skill] = 55;
WEAPON_SEC = new WeaponClass("Staff", "Jap", 1);
secondary_skill = "Staff";
SKILL[secondary_skill] = 45;
ARMOR = null;
HELMET = null;
HORSE = null;
setActiveSkills("throwing", 1, 0, 0);
}
function UnitJap_throwing1() {
NAME = "Suriken Master";
STR = 16;
DEX = 20;
CON = 2;
SPR = 12;
WEAPON_PRI = new WeaponClass("Throwing", "Jap", 2);
primary_skill = "Throwing";
SKILL[primary_skill] = 61;
WEAPON_SEC = new WeaponClass("Staff", "Jap", 1);
secondary_skill = "Staff";
SKILL[secondary_skill] = 52;
ARMOR = null;
HELMET = null;
HORSE = null;
setActiveSkills("throwing", 0, 1, 0);
}
function UnitJap_throwing3() {
NAME = "Elite Suriken Thrower";
STR = 22;
DEX = 28;
CON = 3;
SPR = 17;
WEAPON_PRI = new WeaponClass("Throwing", "Jap", 3);
primary_skill = "Throwing";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("Staff", "Jap", 3);
secondary_skill = "Staff";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Jap", 2);
HELMET = new Armor("Helmet", "Jap", 1);
HORSE = null;
setActiveSkills("throwing", 2, 1, 1);
}
function UnitJap_throwing4() {
NAME = "Black Suriken Thrower";
STR = 30;
DEX = 37;
CON = 4;
SPR = 22;
WEAPON_PRI = new WeaponClass("Throwing", "Jap", 4);
primary_skill = "Throwing";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("Staff", "Jap", 4);
secondary_skill = "Staff";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Jap", 3);
HELMET = new Armor("Helmet", "Jap", 2);
HORSE = null;
setActiveSkills("throwing", 2, 3, 1);
}
function UnitJap_throwing6() {
NAME = "Shadow";
STR = 54;
DEX = 67;
CON = 7;
SPR = 40;
WEAPON_PRI = new WeaponClass("Throwing", "Jap", 6);
primary_skill = "Throwing";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("Staff", "Jap", 5);
secondary_skill = "Staff";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Jap", 5);
HELMET = new Armor("Helmet", "Jap", 4);
HORSE = null;
setActiveSkills("throwing", 0, 3, 4);
}
function UnitJap_throwing7() {
NAME = "Golden Shadpw";
STR = 68;
DEX = 85;
CON = 8;
SPR = 51;
WEAPON_PRI = new WeaponClass("Throwing", "Jap", 7);
primary_skill = "Throwing";
SKILL[primary_skill] = 97;
WEAPON_SEC = new WeaponClass("Staff", "Jap", 5);
secondary_skill = "Staff";
SKILL[secondary_skill] = 94;
ARMOR = new Armor("Clothes", "Jap", 6);
HELMET = new Armor("Helmet", "Jap", 5);
HORSE = null;
setActiveSkills("throwing", 0, 4, 5);
}
function UnitJap_fists1() {
NAME = "Taekwon";
STR = 20;
DEX = 20;
CON = 8;
SPR = 2;
WEAPON_PRI = null;
primary_skill = "Fists";
SKILL[primary_skill] = 100;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Jap", 1);
HELMET = new Armor("Helmet", "Jap", 1);
HORSE = null;
}
function UnitJap_fists2() {
NAME = "Taekwon Master";
STR = 30;
DEX = 30;
CON = 12;
SPR = 3;
WEAPON_PRI = null;
primary_skill = "Fists";
SKILL[primary_skill] = 100;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Jap", 2);
HELMET = new Armor("Helmet", "Jap", 2);
HORSE = null;
}
function UnitMon_shield1() {
NAME = "Swordsman";
STR = 20;
DEX = 10;
CON = 8;
SPR = 12;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Mon", 1);
primary_skill = "Sword";
SKILL[primary_skill] = 61;
WEAPON_SEC = new WeaponClass("Shield", "Mon", 1);
secondary_skill = "Shield";
SKILL[secondary_skill] = 52;
ARMOR = new Armor("Clothes", "Mon", 1);
HELMET = new Armor("Helmet", "Mon", 1);
HORSE = null;
setActiveSkills("shield", 0, 1, 0);
}
function UnitMon_shield2() {
NAME = "Footman Guard";
STR = 25;
DEX = 12;
CON = 10;
SPR = 15;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Mon", 2);
primary_skill = "Sword";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("Shield", "Mon", 2);
secondary_skill = "Shield";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Mon", 2);
HELMET = new Armor("Helmet", "Mon", 2);
HORSE = null;
setActiveSkills("shield", 0, 2, 0);
}
function UnitMon_shield3() {
NAME = "Rider Guard";
STR = 32;
DEX = 16;
CON = 13;
SPR = 19;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Mon", 3);
primary_skill = "Sword";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("Shield", "Mon", 2);
secondary_skill = "Shield";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Mon", 3);
HELMET = new Armor("Helmet", "Mon", 3);
HORSE = new Horse("any", 20, 3, 4);
}
function UnitMon_shield4() {
NAME = "Wind Rider";
STR = 44;
DEX = 22;
CON = 18;
SPR = 26;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Mon", 4);
primary_skill = "Sword";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("Shield", "Mon", 3);
secondary_skill = "Shield";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Mon", 4);
HELMET = new Armor("Helmet", "Mon", 4);
HORSE = new Horse("any", 30, 4, 4);
}
function UnitMon_shield5() {
NAME = "Storm Rider";
STR = 50;
DEX = 25;
CON = 20;
SPR = 30;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Mon", 4);
primary_skill = "Sword";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("Shield", "Mon", 3);
secondary_skill = "Shield";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Mon", 5);
HELMET = new Armor("Helmet", "Mon", 5);
HORSE = new Horse("any", 50, 6, 4);
}
function UnitMon_shield6() {
NAME = "Hurricane Rider";
STR = 65;
DEX = 32;
CON = 26;
SPR = 39;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Mon", 5);
primary_skill = "Sword";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("Shield", "Mon", 4);
secondary_skill = "Shield";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Mon", 6);
HELMET = new Armor("Helmet", "Mon", 6);
HORSE = new Horse("any", 100, 8, 5);
}
function UnitMon_shield7() {
NAME = "Khan's Guard";
STR = 85;
DEX = 42;
CON = 34;
SPR = 51;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Mon", 6);
primary_skill = "Sword";
SKILL[primary_skill] = 97;
WEAPON_SEC = new WeaponClass("Shield", "Mon", 4);
secondary_skill = "Shield";
SKILL[secondary_skill] = 94;
ARMOR = new Armor("Clothes", "Mon", 7);
HELMET = new Armor("Helmet", "Mon", 7);
HORSE = new Horse("any", 100, 20, 6);
}
function UnitMon_2H_sword0() {
NAME = "Merchant Guard";
STR = 15;
DEX = 9;
CON = 6;
SPR = 8;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Mon", 1);
primary_skill = "Sword";
SKILL[primary_skill] = 55;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = null;
HELMET = null;
HORSE = null;
setActiveSkills("2H_sword", 1, 0, 0);
}
function UnitMon_2H_sword2() {
NAME = "Light Scout";
STR = 25;
DEX = 15;
CON = 10;
SPR = 12;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Mon", 2);
primary_skill = "Sword";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("Bow", "Mon", 1);
secondary_skill = "Bow";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Mon", 2);
HELMET = new Armor("Helmet", "Mon", 1);
HORSE = null;
setActiveSkills("2H_sword", 0, 2, 0);
}
function UnitMon_2H_sword3() {
NAME = "Scout";
STR = 32;
DEX = 19;
CON = 13;
SPR = 16;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Mon", 3);
primary_skill = "Sword";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("Bow", "Mon", 2);
secondary_skill = "Bow";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Mon", 3);
HELMET = new Armor("Helmet", "Mon", 2);
HORSE = new Horse("any", 10, 2, 5);
}
function UnitMon_2H_sword4() {
NAME = "Veteran Scout";
STR = 44;
DEX = 26;
CON = 18;
SPR = 22;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Mon", 4);
primary_skill = "Sword";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("Bow", "Mon", 2);
secondary_skill = "Bow";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Mon", 4);
HELMET = new Armor("Helmet", "Mon", 3);
HORSE = new Horse("any", 15, 5, 5);
}
function UnitMon_2H_sword5() {
NAME = "Horde Guard";
STR = 50;
DEX = 30;
CON = 20;
SPR = 25;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Mon", 4);
primary_skill = "Sword";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("Bow", "Mon", 3);
secondary_skill = "Bow";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Mon", 5);
HELMET = new Armor("Helmet", "Mon", 5);
HORSE = new Horse("any", 50, 8, 3);
}
function UnitMon_2H_sword6() {
NAME = "Elte Rider";
STR = 65;
DEX = 39;
CON = 26;
SPR = 32;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Mon", 5);
primary_skill = "Sword";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("Bow", "Mon", 3);
secondary_skill = "Bow";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Mon", 6);
HELMET = new Armor("Helmet", "Mon", 6);
HORSE = new Horse("any", 120, 12, 4);
}
function UnitMon_2H_sword7() {
NAME = "Veteran Rider";
STR = 85;
DEX = 51;
CON = 34;
SPR = 42;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Mon", 6);
primary_skill = "Sword";
SKILL[primary_skill] = 97;
WEAPON_SEC = new WeaponClass("Bow", "Mon", 4);
secondary_skill = "Bow";
SKILL[secondary_skill] = 94;
ARMOR = new Armor("Clothes", "Mon", 7);
HELMET = new Armor("Helmet", "Mon", 7);
HORSE = new Horse("any", 200, 5, 6);
}
function UnitMon_dual1() {
NAME = "Skilled Nomad";
STR = 20;
DEX = 10;
CON = 12;
SPR = 8;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Mon", 1);
primary_skill = "Sword";
SKILL[primary_skill] = 61;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Mon", 1);
secondary_skill = "Sword";
SKILL[secondary_skill] = 52;
ARMOR = new Armor("Clothes", "Mon", 1);
HELMET = null;
HORSE = null;
setActiveSkills("dual", 1, 0, 0);
}
function UnitMon_dual2() {
NAME = "Fencer";
STR = 25;
DEX = 12;
CON = 15;
SPR = 10;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Mon", 2);
primary_skill = "Sword";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Mon", 2);
secondary_skill = "Sword";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Mon", 2);
HELMET = new Armor("Helmet", "Mon", 1);
HORSE = null;
setActiveSkills("dual", 2, 0, 0);
}
function UnitMon_dual3() {
NAME = "Master Fencer";
STR = 32;
DEX = 16;
CON = 19;
SPR = 13;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Mon", 3);
primary_skill = "Sword";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Mon", 3);
secondary_skill = "Sword";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Mon", 3);
HELMET = new Armor("Helmet", "Mon", 2);
HORSE = null;
setActiveSkills("dual", 3, 0, 0);
}
function UnitMon_dual4() {
NAME = "Wanderer";
STR = 44;
DEX = 22;
CON = 26;
SPR = 18;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Mon", 4);
primary_skill = "Sword";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Mon", 4);
secondary_skill = "Sword";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Mon", 4);
HELMET = new Armor("Helmet", "Mon", 3);
HORSE = null;
setActiveSkills("dual", 2, 0, 1);
}
function UnitMon_dual5() {
NAME = "Bloody Wanderer";
STR = 50;
DEX = 25;
CON = 30;
SPR = 20;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Mon", 4);
primary_skill = "Sword";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Mon", 4);
secondary_skill = "Sword";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Mon", 5);
HELMET = new Armor("Helmet", "Mon", 4);
HORSE = null;
setActiveSkills("dual", 2, 0, 2);
}
function UnitMon_dual6() {
NAME = "Swordmaster";
STR = 65;
DEX = 32;
CON = 39;
SPR = 26;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Mon", 5);
primary_skill = "Sword";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Mon", 5);
secondary_skill = "Sword";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Mon", 6);
HELMET = new Armor("Helmet", "Mon", 5);
HORSE = null;
setActiveSkills("dual", 3, 2, 0);
}
function UnitMon_dual7() {
NAME = "Dust Warrior";
STR = 85;
DEX = 42;
CON = 51;
SPR = 34;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Mon", 6);
primary_skill = "Sword";
SKILL[primary_skill] = 97;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Mon", 6);
secondary_skill = "Sword";
SKILL[secondary_skill] = 94;
ARMOR = new Armor("Clothes", "Mon", 7);
HELMET = new Armor("Helmet", "Mon", 6);
HORSE = null;
setActiveSkills("dual", 3, 1, 2);
}
function UnitMon_dagger0() {
NAME = "Poor Nomad";
STR = 3;
DEX = 15;
CON = 6;
SPR = 14;
WEAPON_PRI = new WeaponClass("Dagger", "Mon", 1);
primary_skill = "Dagger";
SKILL[primary_skill] = 55;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = null;
HELMET = null;
HORSE = null;
setActiveSkills("dagger", 0, 1, 0);
}
function UnitMon_dagger2() {
NAME = "Forest Rogue";
STR = 4;
DEX = 22;
CON = 9;
SPR = 20;
WEAPON_PRI = new WeaponClass("Dagger", "Mon", 2);
primary_skill = "Dagger";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("Bow", "Mon", 1);
secondary_skill = "Bow";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Mon", 2);
HELMET = new Armor("Helmet", "Mon", 1);
HORSE = null;
setActiveSkills("dagger", 1, 1, 0);
}
function UnitMon_dagger3() {
NAME = "Town Rogue";
STR = 6;
DEX = 32;
CON = 13;
SPR = 29;
WEAPON_PRI = new WeaponClass("Dagger", "Mon", 3);
primary_skill = "Dagger";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("Bow", "Mon", 2);
secondary_skill = "Bow";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Mon", 2);
HELMET = new Armor("Helmet", "Mon", 2);
HORSE = null;
setActiveSkills("dagger", 2, 0, 1);
}
function UnitMon_dagger4() {
NAME = "Headhunter";
STR = 8;
DEX = 40;
CON = 16;
SPR = 36;
WEAPON_PRI = new WeaponClass("Dagger", "Mon", 4);
primary_skill = "Dagger";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("Bow", "Mon", 2);
secondary_skill = "Bow";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Mon", 3);
HELMET = new Armor("Helmet", "Mon", 3);
HORSE = null;
setActiveSkills("dagger", 2, 2, 0);
}
function UnitMon_dagger5() {
NAME = "Chaos Rogue";
STR = 10;
DEX = 50;
CON = 20;
SPR = 45;
WEAPON_PRI = new WeaponClass("Dagger", "Mon", 5);
primary_skill = "Dagger";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("Bow", "Mon", 3);
secondary_skill = "Bow";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Mon", 3);
HELMET = new Armor("Helmet", "Mon", 4);
HORSE = null;
setActiveSkills("dagger", 2, 2, 1);
}
function UnitMon_dagger6() {
NAME = "Grimkeeper";
STR = 14;
DEX = 68;
CON = 27;
SPR = 61;
WEAPON_PRI = new WeaponClass("Dagger", "Mon", 6);
primary_skill = "Dagger";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("Bow", "Mon", 4);
secondary_skill = "Bow";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Mon", 4);
HELMET = new Armor("Helmet", "Mon", 5);
HORSE = null;
setActiveSkills("dagger", 2, 3, 2);
}
function UnitMon_bow0() {
NAME = "Light Bowman";
STR = 3;
DEX = 15;
CON = 4;
SPR = 15;
WEAPON_PRI = new WeaponClass("Bow", "Mon", 1);
primary_skill = "Bow";
SKILL[primary_skill] = 55;
WEAPON_SEC = new WeaponClass("TwohandedSword", "Mon", 1);
secondary_skill = "Sword";
SKILL[secondary_skill] = 45;
ARMOR = null;
HELMET = null;
HORSE = new Horse("any", 5, 0, 3);
setActiveSkills("bow", 2, 0, 1);
}
function UnitMon_bow2() {
NAME = "Light Horseman";
STR = 6;
DEX = 28;
CON = 8;
SPR = 28;
WEAPON_PRI = new WeaponClass("Bow", "Mon", 2);
primary_skill = "Bow";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("TwohandedSword", "Mon", 2);
secondary_skill = "Sword";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Mon", 1);
HELMET = null;
HORSE = new Horse("any", 10, 3, 3);
setActiveSkills("bow", 0, 2, 1);
}
function UnitMon_bow4() {
NAME = "Master Archer";
STR = 10;
DEX = 50;
CON = 15;
SPR = 50;
WEAPON_PRI = new WeaponClass("Bow", "Mon", 3);
primary_skill = "Bow";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("TwohandedSword", "Mon", 3);
secondary_skill = "Sword";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Mon", 3);
HELMET = new Armor("Helmet", "Mon", 2);
HORSE = new Horse("any", 15, 5, 4);
setActiveSkills("bow", 0, 0, 4);
}
function UnitMon_bow6() {
NAME = "Creepy Archer";
STR = 18;
DEX = 90;
CON = 27;
SPR = 90;
WEAPON_PRI = new WeaponClass("Bow", "Mon", 4);
primary_skill = "Bow";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("TwohandedSword", "Mon", 4);
secondary_skill = "Sword";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Mon", 4);
HELMET = new Armor("Helmet", "Mon", 3);
HORSE = new Horse("any", 30, 10, 4);
setActiveSkills("bow", 0, 2, 4);
}
function UnitAra_2H_sword1() {
NAME = "Light Swordsman";
STR = 22;
DEX = 18;
CON = 9;
SPR = 7;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Ara", 1);
primary_skill = "Sword";
SKILL[primary_skill] = 61;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Ara", 1);
HELMET = null;
HORSE = null;
setActiveSkills("2H_sword", 1, 0, 0);
}
function UnitAra_2H_sword2() {
NAME = "Sr. Swordsman";
STR = 25;
DEX = 20;
CON = 10;
SPR = 8;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Ara", 2);
primary_skill = "Sword";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("Crossbow", "Viz", 1);
secondary_skill = "Crossbow";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Ara", 2);
HELMET = new Armor("Helmet", "Ara", 1);
HORSE = null;
setActiveSkills("2H_sword", 2, 0, 0);
}
function UnitAra_2H_sword3() {
NAME = "Scimitar Master";
STR = 32;
DEX = 26;
CON = 13;
SPR = 10;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Ara", 3);
primary_skill = "Sword";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("Crossbow", "Viz", 2);
secondary_skill = "Crossbow";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Ara", 3);
HELMET = new Armor("Helmet", "Ara", 2);
HORSE = null;
setActiveSkills("2H_sword", 0, 2, 0);
}
function UnitAra_2H_sword4() {
NAME = "Light Janissary";
STR = 44;
DEX = 35;
CON = 18;
SPR = 13;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Ara", 4);
primary_skill = "Sword";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("Crossbow", "Viz", 2);
secondary_skill = "Crossbow";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Ara", 4);
HELMET = new Armor("Helmet", "Ara", 3);
HORSE = null;
setActiveSkills("2H_sword", 0, 2, 1);
}
function UnitAra_2H_sword5() {
NAME = "Janissary";
STR = 50;
DEX = 40;
CON = 20;
SPR = 15;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Ara", 4);
primary_skill = "Sword";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("Crossbow", "Viz", 3);
secondary_skill = "Crossbow";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Ara", 5);
HELMET = new Armor("Helmet", "Ara", 5);
HORSE = null;
setActiveSkills("2H_sword", 0, 2, 2);
}
function UnitAra_2H_sword6() {
NAME = "Janissary Master";
STR = 65;
DEX = 52;
CON = 26;
SPR = 20;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Ara", 5);
primary_skill = "Sword";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("Crossbow", "Viz", 3);
secondary_skill = "Crossbow";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Ara", 6);
HELMET = new Armor("Helmet", "Ara", 6);
HORSE = null;
setActiveSkills("2H_sword", 3, 0, 2);
}
function UnitAra_2H_sword7() {
NAME = "Elite Janissary";
STR = 85;
DEX = 68;
CON = 34;
SPR = 26;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Ara", 6);
primary_skill = "Sword";
SKILL[primary_skill] = 97;
WEAPON_SEC = new WeaponClass("Crossbow", "Viz", 4);
secondary_skill = "Crossbow";
SKILL[secondary_skill] = 94;
ARMOR = new Armor("Clothes", "Ara", 7);
HELMET = new Armor("Helmet", "Ara", 7);
HORSE = null;
setActiveSkills("2H_sword", 0, 4, 3);
}
function UnitAra_dual0() {
NAME = "Slave";
STR = 15;
DEX = 10;
CON = 8;
SPR = 4;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Ara", 1);
primary_skill = "Sword";
SKILL[primary_skill] = 55;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Ara", 1);
secondary_skill = "Sword";
SKILL[secondary_skill] = 45;
ARMOR = null;
HELMET = null;
HORSE = null;
setActiveSkills("dual", 0, 1, 0);
}
function UnitAra_dual2() {
NAME = "Sailor";
STR = 25;
DEX = 18;
CON = 12;
SPR = 8;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Ara", 2);
primary_skill = "Sword";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Ara", 2);
secondary_skill = "Sword";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Ara", 2);
HELMET = new Armor("Helmet", "Ara", 1);
HORSE = null;
setActiveSkills("dual", 2, 0, 0);
}
function UnitAra_dual3() {
NAME = "Pirate";
STR = 32;
DEX = 22;
CON = 16;
SPR = 10;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Ara", 3);
primary_skill = "Sword";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Ara", 3);
secondary_skill = "Sword";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Ara", 3);
HELMET = new Armor("Helmet", "Ara", 2);
HORSE = null;
setActiveSkills("dual", 2, 1, 0);
}
function UnitAra_dual4() {
NAME = "Sea Dog";
STR = 44;
DEX = 31;
CON = 22;
SPR = 13;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Ara", 4);
primary_skill = "Sword";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Ara", 4);
secondary_skill = "Sword";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Ara", 4);
HELMET = new Armor("Helmet", "Ara", 3);
HORSE = null;
setActiveSkills("dual", 2, 0, 1);
}
function UnitAra_dual5() {
NAME = "Corsair";
STR = 50;
DEX = 35;
CON = 25;
SPR = 15;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Ara", 4);
primary_skill = "Sword";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Ara", 4);
secondary_skill = "Sword";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Ara", 5);
HELMET = new Armor("Helmet", "Ara", 4);
HORSE = null;
setActiveSkills("dual", 3, 0, 2);
}
function UnitAra_dual6() {
NAME = "Captain";
STR = 65;
DEX = 46;
CON = 32;
SPR = 20;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Ara", 5);
primary_skill = "Sword";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Ara", 5);
secondary_skill = "Sword";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Ara", 6);
HELMET = new Armor("Helmet", "Ara", 5);
HORSE = null;
setActiveSkills("dual", 3, 0, 3);
}
function UnitAra_dual7() {
NAME = "Pirate Captain";
STR = 85;
DEX = 59;
CON = 42;
SPR = 26;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Ara", 6);
primary_skill = "Sword";
SKILL[primary_skill] = 97;
WEAPON_SEC = new WeaponClass("OnehandedSword", "Ara", 6);
secondary_skill = "Sword";
SKILL[secondary_skill] = 94;
ARMOR = new Armor("Clothes", "Ara", 7);
HELMET = new Armor("Helmet", "Ara", 6);
HORSE = null;
setActiveSkills("dual", 4, 3, 0);
}
function UnitAra_katar1() {
NAME = "Theif";
STR = 18;
DEX = 18;
CON = 8;
SPR = 6;
WEAPON_PRI = new WeaponClass("Katar", "Ara", 1);
primary_skill = "Katar";
SKILL[primary_skill] = 61;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Ara", 1);
HELMET = new Armor("Helmet", "Ara", 1);
HORSE = null;
setActiveSkills("katar", 1, 0, 0);
}
function UnitAra_katar3() {
NAME = "Assassin";
STR = 29;
DEX = 29;
CON = 13;
SPR = 10;
WEAPON_PRI = new WeaponClass("Katar", "Ara", 3);
primary_skill = "Katar";
SKILL[primary_skill] = 73;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Ara", 3);
HELMET = new Armor("Helmet", "Ara", 3);
HORSE = null;
setActiveSkills("katar", 1, 2, 0);
}
function UnitAra_katar4() {
NAME = "Shadow Assassin";
STR = 40;
DEX = 40;
CON = 18;
SPR = 13;
WEAPON_PRI = new WeaponClass("Katar", "Ara", 4);
primary_skill = "Katar";
SKILL[primary_skill] = 79;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Ara", 4);
HELMET = new Armor("Helmet", "Ara", 4);
HORSE = null;
setActiveSkills("katar", 0, 3, 0);
}
function UnitAra_katar5() {
NAME = "Master Assassin";
STR = 45;
DEX = 45;
CON = 20;
SPR = 15;
WEAPON_PRI = new WeaponClass("Katar", "Ara", 4);
primary_skill = "Katar";
SKILL[primary_skill] = 85;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Ara", 5);
HELMET = new Armor("Helmet", "Ara", 5);
HORSE = null;
setActiveSkills("katar", 0, 3, 1);
}
function UnitAra_katar6() {
NAME = "Ghost Assassin";
STR = 58;
DEX = 58;
CON = 26;
SPR = 20;
WEAPON_PRI = new WeaponClass("Katar", "Ara", 5);
primary_skill = "Katar";
SKILL[primary_skill] = 91;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Ara", 6);
HELMET = new Armor("Helmet", "Ara", 6);
HORSE = null;
setActiveSkills("katar", 2, 3, 1);
}
function UnitAra_katar7() {
NAME = "Elite Assassin";
STR = 81;
DEX = 81;
CON = 36;
SPR = 27;
WEAPON_PRI = new WeaponClass("Katar", "Ara", 6);
primary_skill = "Katar";
SKILL[primary_skill] = 97;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Ara", 7);
HELMET = new Armor("Helmet", "Ara", 7);
HORSE = null;
setActiveSkills("katar", 0, 4, 3);
}
function UnitAra_crossbow0() {
NAME = "Light Archer";
STR = 9;
DEX = 15;
CON = 8;
SPR = 6;
WEAPON_PRI = new WeaponClass("Crossbow", "Viz", 1);
primary_skill = "Crossbow";
SKILL[primary_skill] = 55;
WEAPON_SEC = new WeaponClass("TwohandedSword", "Ara", 1);
secondary_skill = "Sword";
SKILL[secondary_skill] = 45;
ARMOR = null;
HELMET = null;
HORSE = null;
setActiveSkills("crossbow", 0, 0, 1);
}
function UnitAra_crossbow2() {
NAME = "Siege Archer";
STR = 17;
DEX = 28;
CON = 14;
SPR = 11;
WEAPON_PRI = new WeaponClass("Crossbow", "Viz", 2);
primary_skill = "Crossbow";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("TwohandedSword", "Ara", 2);
secondary_skill = "Sword";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Ara", 1);
HELMET = null;
HORSE = null;
setActiveSkills("crossbow", 0, 0, 2);
}
function UnitAra_crossbow4() {
NAME = "Castle Guard";
STR = 30;
DEX = 50;
CON = 25;
SPR = 20;
WEAPON_PRI = new WeaponClass("Crossbow", "Viz", 3);
primary_skill = "Crossbow";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("TwohandedSword", "Ara", 3);
secondary_skill = "Sword";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Ara", 3);
HELMET = new Armor("Helmet", "Ara", 2);
HORSE = null;
setActiveSkills("crossbow", 3, 0, 0);
}
function UnitAra_crossbow6() {
NAME = "Stalker";
STR = 54;
DEX = 90;
CON = 45;
SPR = 36;
WEAPON_PRI = new WeaponClass("Crossbow", "Viz", 4);
primary_skill = "Crossbow";
SKILL[primary_skill] = 91;
WEAPON_SEC = new WeaponClass("TwohandedSword", "Ara", 4);
secondary_skill = "Sword";
SKILL[secondary_skill] = 87;
ARMOR = new Armor("Clothes", "Ara", 4);
HELMET = new Armor("Helmet", "Ara", 3);
HORSE = null;
setActiveSkills("crossbow", 2, 0, 2);
}
function UnitViz_caster1() {
NAME = "Protector";
STR = 32;
DEX = 10;
CON = 19;
SPR = 10;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Viz", 3);
primary_skill = "Sword";
SKILL[primary_skill] = 73;
WEAPON_SEC = new WeaponClass("Shield", "Viz", 2);
secondary_skill = "Shield";
SKILL[secondary_skill] = 66;
ARMOR = new Armor("Clothes", "Viz", 3);
HELMET = new Armor("Helmet", "Viz", 3);
HORSE = null;
AURA_SKILLS.push(["Barrier", 3]);
SPR = 30;
}
function UnitViz_caster2() {
NAME = "Healer";
STR = 50;
DEX = 15;
CON = 25;
SPR = 20;
WEAPON_PRI = new WeaponClass("TwohandedAxe", "Viz", 4);
primary_skill = "Axe";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("Bow", "Viz", 3);
secondary_skill = "Bow";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Viz", 5);
HELMET = new Armor("Helmet", "Viz", 5);
HORSE = null;
AURA_SKILLS.push(["DivineHelp", 4]);
SPR = 60;
}
function UnitGer_caster1() {
NAME = "Acolyte";
STR = 22;
DEX = 2;
CON = 22;
SPR = 2;
WEAPON_PRI = new WeaponClass("TwohandedMace", "Ger", 1);
primary_skill = "Mace";
SKILL[primary_skill] = 61;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Ger", 1);
HELMET = null;
HORSE = null;
AURA_SKILLS.push(["DivineHelp", 3]);
SPR = 30;
}
function UnitGer_caster2() {
NAME = "Priest";
STR = 22;
DEX = 2;
CON = 22;
SPR = 2;
WEAPON_PRI = new WeaponClass("TwohandedMace", "Ger", 1);
primary_skill = "Mace";
SKILL[primary_skill] = 61;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Ger", 1);
HELMET = null;
HORSE = null;
AURA_SKILLS.push(["Devotion", 3]);
SPR = 60;
}
function UnitRus_caster1() {
NAME = "Dryad";
STR = 24;
DEX = 13;
CON = 4;
SPR = 2;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Rus", 1);
primary_skill = "Sword";
SKILL[primary_skill] = 61;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Rus", 1);
HELMET = null;
HORSE = null;
AURA_SKILLS.push(["HolyTribunal", 3]);
SPR = 30;
}
function UnitRus_caster2() {
NAME = "Forest Soul";
STR = 58;
DEX = 23;
CON = 35;
SPR = 12;
WEAPON_PRI = new WeaponClass("Spear", "Rus", 4);
primary_skill = "Spear";
SKILL[primary_skill] = 85;
WEAPON_SEC = new WeaponClass("Bow", "Rus", 3);
secondary_skill = "Bow";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Rus", 5);
HELMET = new Armor("Helmet", "Rus", 5);
HORSE = null;
AURA_SKILLS.push(["DivineHelp", 3]);
SPR = 60;
}
function UnitJap_caster1() {
NAME = "White Monk";
STR = 8;
DEX = 24;
CON = 6;
SPR = 12;
WEAPON_PRI = new WeaponClass("Staff", "Jap", 2);
primary_skill = "Staff";
SKILL[primary_skill] = 61;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = new Armor("Clothes", "Jap", 1);
HELMET = new Armor("Helmet", "Jap", 1);
HORSE = null;
AURA_SKILLS.push(["Barrier", 4]);
SPR = 30;
}
function UnitJap_caster2() {
NAME = "Mentor";
STR = 17;
DEX = 50;
CON = 13;
SPR = 25;
WEAPON_PRI = new WeaponClass("Staff", "Jap", 5);
primary_skill = "Staff";
SKILL[primary_skill] = 79;
WEAPON_SEC = new WeaponClass("Bow", "Jap", 2);
secondary_skill = "Bow";
SKILL[secondary_skill] = 73;
ARMOR = new Armor("Clothes", "Jap", 4);
HELMET = new Armor("Helmet", "Jap", 4);
HORSE = null;
AURA_SKILLS.push(["NationJap", 3]);
SPR = 60;
}
function UnitMon_caster1() {
NAME = "Shaman";
STR = 4;
DEX = 18;
CON = 5;
SPR = 18;
WEAPON_PRI = new WeaponClass("Bow", "Mon", 1);
primary_skill = "Bow";
SKILL[primary_skill] = 61;
WEAPON_SEC = new WeaponClass("TwohandedSword", "Mon", 1);
secondary_skill = "Sword";
SKILL[secondary_skill] = 52;
ARMOR = null;
HELMET = null;
HORSE = null;
AURA_SKILLS.push(["Devotion", 3]);
SPR = 30;
}
function UnitMon_caster2() {
NAME = "Sage";
STR = 4;
DEX = 22;
CON = 9;
SPR = 20;
WEAPON_PRI = new WeaponClass("Dagger", "Mon", 2);
primary_skill = "Dagger";
SKILL[primary_skill] = 67;
WEAPON_SEC = new WeaponClass("Bow", "Mon", 1);
secondary_skill = "Bow";
SKILL[secondary_skill] = 59;
ARMOR = new Armor("Clothes", "Mon", 2);
HELMET = new Armor("Helmet", "Mon", 1);
HORSE = null;
AURA_SKILLS.push(["ForceBalance", 3]);
SPR = 60;
}
function UnitAra_caster1() {
NAME = "Mullah";
STR = 15;
DEX = 6;
CON = 15;
SPR = 2;
WEAPON_PRI = null;
primary_skill = "Fists";
SKILL[primary_skill] = 100;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = null;
HELMET = null;
HORSE = null;
AURA_SKILLS.push(["Devotion", 3]);
SPR = 30;
}
function UnitAra_caster2() {
NAME = "Virgin";
STR = 15;
DEX = 12;
CON = 6;
SPR = 4;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Ara", 1);
primary_skill = "Sword";
SKILL[primary_skill] = 55;
WEAPON_SEC = null;
secondary_skill = "Fists";
SKILL[secondary_skill] = 80;
ARMOR = null;
HELMET = null;
HORSE = null;
AURA_SKILLS.push(["BansheeCry", 2]);
SPR = 60;
GENDER = "f";
}
static function getMeleeRogue(lv) {
var _local6 = ["shield", "2H_sword", "2H_axe", "staff", "dagger", "dual"];
var _local2 = new Unit("Rog", _local6[_root.dice(5)], Math.floor(lv / 10));
_local2.NAME = ("Rogue (" + _local2.TYPE) + ")";
_local2.STR = 16 + lv;
_local2.DEX = 5 + Math.floor(lv / 2);
_local2.CON = 10 + Math.floor(lv / 2);
_local2.SPR = 1;
switch (_local2.TYPE) {
case "dual" :
var _local4 = ["OnehandedSword", "OnehandedAxe", "OnehandedMace", "NinjaTo"];
_local2.WEAPON_PRI = new WeaponClass(_local4[_root.dice(4)], "Rog", _root.d(2));
_local2.WEAPON_SEC = new WeaponClass(_local4[_root.dice(4)], "Rog", _root.d(2));
break;
case "shield" :
var _local5 = ["Viz", "Ger", "Rus"];
_local4 = ["OnehandedSword", "OnehandedAxe", "OnehandedMace"];
_local2.WEAPON_PRI = new WeaponClass(_local4[_root.dice(3)], "Rog", _root.d(2));
_local2.WEAPON_SEC = new WeaponClass("Shield", _local5[_root.dice(3)], 1);
break;
case "2H_sword" :
_local4 = ["TwohandedSword", "Katana"];
_local2.WEAPON_PRI = new WeaponClass("TwohandedSword", "Rog", _root.d(2));
_local2.WEAPON_SEC = null;
break;
case "2H_axe" :
_local4 = ["TwohandedAxe", "TwohandedMace"];
_local2.WEAPON_PRI = new WeaponClass(_local4[_root.dice(2)], "Rog", _root.d(2));
_local2.WEAPON_SEC = null;
break;
case "staff" :
_local2.WEAPON_PRI = new WeaponClass("Staff", "Jap", 1);
_local2.WEAPON_SEC = null;
break;
case "dagger" :
_local5 = ["Viz", "Mon"];
_local2.WEAPON_PRI = new WeaponClass("Dagger", _local5[_root.dice(2)], 1);
_local2.WEAPON_SEC = null;
}
_local2.ARMOR = ((lv > 8) ? (new Armor("Clothes", _local2.NATION, Math.floor(lv / 8))) : null);
_local2.HELMET = ((lv > 8) ? (new Armor("Helmet", _local2.NATION, Math.floor(lv / 8))) : null);
_local2.primary_skill = _local2.WEAPON_PRI.skill;
_local2.secondary_skill = "none";
_local2.SKILL[_local2.primary_skill] = 40 + lv;
_local2.price = 10 * lv;
return(_local2);
}
static function getRangedRogue(lv) {
var _local5 = ["bow", "crossbow", "throwing"];
var _local2 = new Unit("Rog", _local5[_root.dice(3)], Math.floor(lv / 10));
_local2.NAME = ("Rogue (" + _local2.TYPE) + ")";
_local2.STR = 10 + Math.floor(lv / 2);
_local2.DEX = 15 + lv;
_local2.CON = 5 + Math.floor(lv / 2);
_local2.SPR = 1;
switch (_local2.TYPE) {
case "bow" :
var _local4 = ["Viz", "Ger", "Rus", "Jap", "Mon"];
_local2.WEAPON_PRI = new WeaponClass("Bow", _local4[_root.dice(5)], 1);
break;
case "crossbow" :
_local4 = ["Viz", "Ger", "Rus"];
_local2.WEAPON_PRI = new WeaponClass("Crossbow", _local4[_root.dice(3)], 1);
break;
case "throwing" :
_local4 = ["Ger", "Rus"];
_local2.WEAPON_PRI = new WeaponClass("Throwing", _local4[_root.dice(2)], 1);
}
_local2.WEAPON_SEC = null;
_local2.ARMOR = ((lv > 10) ? (new Armor("Clothes", _local2.NATION, Math.floor(lv / 10))) : null);
_local2.HELMET = ((lv > 10) ? (new Armor("Helmet", _local2.NATION, Math.floor(lv / 10))) : null);
_local2.primary_skill = _local2.WEAPON_PRI.skill;
_local2.secondary_skill = "none";
_local2.SKILL[_local2.primary_skill] = 40 + lv;
_local2.price = 10 * lv;
return(_local2);
}
static function getMeleeMilitia(nation, sub_lv) {
if (!sub_lv) {
sub_lv = 0;
}
if ((sub_lv < 0) || (sub_lv > 7)) {
trace("Inacceptable militia level:" + sub_lv);
}
switch (nation) {
case "Viz" :
switch (sub_lv) {
case 0 :
return(new Unit(nation, "shield", sub_lv));
case 1 :
return(new Unit(nation, "spear", sub_lv));
case 2 :
return(new Unit(nation, "2H_axe", sub_lv));
case 3 :
return(new Unit(nation, "spear", sub_lv));
case 4 :
return(new Unit(nation, "shield", sub_lv));
case 5 :
return(new Unit(nation, "2H_sword", sub_lv));
case 6 :
return(new Unit(nation, "2H_sword", sub_lv));
case 7 :
return(new Unit(nation, "shield", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "2H_sword", sub_lv));
case 1 :
return(new Unit(nation, "shield", sub_lv));
case 2 :
return(new Unit(nation, "shield", sub_lv));
case 3 :
return(new Unit(nation, "shield", sub_lv));
case 4 :
return(new Unit(nation, "2H_sword", sub_lv));
case 5 :
return(new Unit(nation, "shield", sub_lv));
case 6 :
return(new Unit(nation, "2H_axe", sub_lv));
case 7 :
return(new Unit(nation, "2H_sword", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "2H_axe", sub_lv));
case 1 :
return(new Unit(nation, "2H_axe", sub_lv));
case 2 :
return(new Unit(nation, "shield", sub_lv));
case 3 :
return(new Unit(nation, "shield", sub_lv));
case 4 :
return(new Unit(nation, "shield", sub_lv));
case 5 :
return(new Unit(nation, "dual", sub_lv));
case 6 :
return(new Unit(nation, "2H_axe", sub_lv));
case 7 :
return(new Unit(nation, "2H_axe", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "fists", sub_lv + 1));
case 1 :
return(new Unit(nation, "staff", sub_lv));
case 2 :
return(new Unit(nation, "staff", sub_lv));
case 3 :
return(new Unit(nation, "staff", sub_lv));
case 4 :
return(new Unit(nation, "staff", sub_lv));
case 5 :
return(new Unit(nation, "staff", sub_lv));
case 6 :
return(new Unit(nation, "staff", sub_lv));
case 7 :
return(new Unit(nation, "katana", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "dagger", sub_lv));
case 1 :
return(new Unit(nation, "shield", sub_lv));
case 2 :
return(new Unit(nation, "2H_sword", sub_lv));
case 3 :
return(new Unit(nation, "dual", sub_lv));
case 4 :
return(new Unit(nation, "shield", sub_lv));
case 5 :
return(new Unit(nation, "2H_sword", sub_lv));
case 6 :
return(new Unit(nation, "dual", sub_lv));
case 7 :
return(new Unit(nation, "2H_sword", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "dual", sub_lv));
case 1 :
return(new Unit(nation, "2H_sword", sub_lv));
case 2 :
return(new Unit(nation, "dual", sub_lv));
case 3 :
return(new Unit(nation, "katar", sub_lv));
case 4 :
return(new Unit(nation, "katar", sub_lv));
case 5 :
return(new Unit(nation, "2H_sword", sub_lv));
case 6 :
return(new Unit(nation, "katar", sub_lv));
case 7 :
return(new Unit(nation, "katar", sub_lv));
}
}
}
}
}
}
case "Ger" :
switch (sub_lv) {
case 0 :
return(new Unit(nation, "2H_sword", sub_lv));
case 1 :
return(new Unit(nation, "shield", sub_lv));
case 2 :
return(new Unit(nation, "shield", sub_lv));
case 3 :
return(new Unit(nation, "shield", sub_lv));
case 4 :
return(new Unit(nation, "2H_sword", sub_lv));
case 5 :
return(new Unit(nation, "shield", sub_lv));
case 6 :
return(new Unit(nation, "2H_axe", sub_lv));
case 7 :
return(new Unit(nation, "2H_sword", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "2H_axe", sub_lv));
case 1 :
return(new Unit(nation, "2H_axe", sub_lv));
case 2 :
return(new Unit(nation, "shield", sub_lv));
case 3 :
return(new Unit(nation, "shield", sub_lv));
case 4 :
return(new Unit(nation, "shield", sub_lv));
case 5 :
return(new Unit(nation, "dual", sub_lv));
case 6 :
return(new Unit(nation, "2H_axe", sub_lv));
case 7 :
return(new Unit(nation, "2H_axe", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "fists", sub_lv + 1));
case 1 :
return(new Unit(nation, "staff", sub_lv));
case 2 :
return(new Unit(nation, "staff", sub_lv));
case 3 :
return(new Unit(nation, "staff", sub_lv));
case 4 :
return(new Unit(nation, "staff", sub_lv));
case 5 :
return(new Unit(nation, "staff", sub_lv));
case 6 :
return(new Unit(nation, "staff", sub_lv));
case 7 :
return(new Unit(nation, "katana", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "dagger", sub_lv));
case 1 :
return(new Unit(nation, "shield", sub_lv));
case 2 :
return(new Unit(nation, "2H_sword", sub_lv));
case 3 :
return(new Unit(nation, "dual", sub_lv));
case 4 :
return(new Unit(nation, "shield", sub_lv));
case 5 :
return(new Unit(nation, "2H_sword", sub_lv));
case 6 :
return(new Unit(nation, "dual", sub_lv));
case 7 :
return(new Unit(nation, "2H_sword", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "dual", sub_lv));
case 1 :
return(new Unit(nation, "2H_sword", sub_lv));
case 2 :
return(new Unit(nation, "dual", sub_lv));
case 3 :
return(new Unit(nation, "katar", sub_lv));
case 4 :
return(new Unit(nation, "katar", sub_lv));
case 5 :
return(new Unit(nation, "2H_sword", sub_lv));
case 6 :
return(new Unit(nation, "katar", sub_lv));
case 7 :
return(new Unit(nation, "katar", sub_lv));
}
}
}
}
}
case "Rus" :
switch (sub_lv) {
case 0 :
return(new Unit(nation, "2H_axe", sub_lv));
case 1 :
return(new Unit(nation, "2H_axe", sub_lv));
case 2 :
return(new Unit(nation, "shield", sub_lv));
case 3 :
return(new Unit(nation, "shield", sub_lv));
case 4 :
return(new Unit(nation, "shield", sub_lv));
case 5 :
return(new Unit(nation, "dual", sub_lv));
case 6 :
return(new Unit(nation, "2H_axe", sub_lv));
case 7 :
return(new Unit(nation, "2H_axe", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "fists", sub_lv + 1));
case 1 :
return(new Unit(nation, "staff", sub_lv));
case 2 :
return(new Unit(nation, "staff", sub_lv));
case 3 :
return(new Unit(nation, "staff", sub_lv));
case 4 :
return(new Unit(nation, "staff", sub_lv));
case 5 :
return(new Unit(nation, "staff", sub_lv));
case 6 :
return(new Unit(nation, "staff", sub_lv));
case 7 :
return(new Unit(nation, "katana", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "dagger", sub_lv));
case 1 :
return(new Unit(nation, "shield", sub_lv));
case 2 :
return(new Unit(nation, "2H_sword", sub_lv));
case 3 :
return(new Unit(nation, "dual", sub_lv));
case 4 :
return(new Unit(nation, "shield", sub_lv));
case 5 :
return(new Unit(nation, "2H_sword", sub_lv));
case 6 :
return(new Unit(nation, "dual", sub_lv));
case 7 :
return(new Unit(nation, "2H_sword", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "dual", sub_lv));
case 1 :
return(new Unit(nation, "2H_sword", sub_lv));
case 2 :
return(new Unit(nation, "dual", sub_lv));
case 3 :
return(new Unit(nation, "katar", sub_lv));
case 4 :
return(new Unit(nation, "katar", sub_lv));
case 5 :
return(new Unit(nation, "2H_sword", sub_lv));
case 6 :
return(new Unit(nation, "katar", sub_lv));
case 7 :
return(new Unit(nation, "katar", sub_lv));
}
}
}
}
case "Jap" :
switch (sub_lv) {
case 0 :
return(new Unit(nation, "fists", sub_lv + 1));
case 1 :
return(new Unit(nation, "staff", sub_lv));
case 2 :
return(new Unit(nation, "staff", sub_lv));
case 3 :
return(new Unit(nation, "staff", sub_lv));
case 4 :
return(new Unit(nation, "staff", sub_lv));
case 5 :
return(new Unit(nation, "staff", sub_lv));
case 6 :
return(new Unit(nation, "staff", sub_lv));
case 7 :
return(new Unit(nation, "katana", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "dagger", sub_lv));
case 1 :
return(new Unit(nation, "shield", sub_lv));
case 2 :
return(new Unit(nation, "2H_sword", sub_lv));
case 3 :
return(new Unit(nation, "dual", sub_lv));
case 4 :
return(new Unit(nation, "shield", sub_lv));
case 5 :
return(new Unit(nation, "2H_sword", sub_lv));
case 6 :
return(new Unit(nation, "dual", sub_lv));
case 7 :
return(new Unit(nation, "2H_sword", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "dual", sub_lv));
case 1 :
return(new Unit(nation, "2H_sword", sub_lv));
case 2 :
return(new Unit(nation, "dual", sub_lv));
case 3 :
return(new Unit(nation, "katar", sub_lv));
case 4 :
return(new Unit(nation, "katar", sub_lv));
case 5 :
return(new Unit(nation, "2H_sword", sub_lv));
case 6 :
return(new Unit(nation, "katar", sub_lv));
case 7 :
return(new Unit(nation, "katar", sub_lv));
}
}
}
case "Mon" :
switch (sub_lv) {
case 0 :
return(new Unit(nation, "dagger", sub_lv));
case 1 :
return(new Unit(nation, "shield", sub_lv));
case 2 :
return(new Unit(nation, "2H_sword", sub_lv));
case 3 :
return(new Unit(nation, "dual", sub_lv));
case 4 :
return(new Unit(nation, "shield", sub_lv));
case 5 :
return(new Unit(nation, "2H_sword", sub_lv));
case 6 :
return(new Unit(nation, "dual", sub_lv));
case 7 :
return(new Unit(nation, "2H_sword", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "dual", sub_lv));
case 1 :
return(new Unit(nation, "2H_sword", sub_lv));
case 2 :
return(new Unit(nation, "dual", sub_lv));
case 3 :
return(new Unit(nation, "katar", sub_lv));
case 4 :
return(new Unit(nation, "katar", sub_lv));
case 5 :
return(new Unit(nation, "2H_sword", sub_lv));
case 6 :
return(new Unit(nation, "katar", sub_lv));
case 7 :
return(new Unit(nation, "katar", sub_lv));
}
}
case "Ara" :
switch (sub_lv) {
case 0 :
return(new Unit(nation, "dual", sub_lv));
case 1 :
return(new Unit(nation, "2H_sword", sub_lv));
case 2 :
return(new Unit(nation, "dual", sub_lv));
case 3 :
return(new Unit(nation, "katar", sub_lv));
case 4 :
return(new Unit(nation, "katar", sub_lv));
case 5 :
return(new Unit(nation, "2H_sword", sub_lv));
case 6 :
return(new Unit(nation, "katar", sub_lv));
case 7 :
return(new Unit(nation, "katar", sub_lv));
}
}
}
static function getRangedMilitia(nation, sub_lv) {
if (!sub_lv) {
sub_lv = 0;
}
if ((sub_lv < 0) || (sub_lv > 7)) {
trace("Inacceptable militia level:" + sub_lv);
}
switch (nation) {
case "Viz" :
switch (sub_lv) {
case 0 :
return(new Unit(nation, "bow", sub_lv));
case 1 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 2 :
return(new Unit(nation, "bow", sub_lv));
case 3 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 4 :
return(new Unit(nation, "bow", sub_lv));
case 5 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 6 :
return(new Unit(nation, "throwing", 0));
case 7 :
return(new Unit(nation, "throwing", 2));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "bow", sub_lv + 1));
case 1 :
return(new Unit(nation, "throwing", sub_lv));
case 2 :
return(new Unit(nation, "crossbow", sub_lv));
case 3 :
return(new Unit(nation, "bow", sub_lv));
case 4 :
return(new Unit(nation, "crossbow", sub_lv));
case 5 :
return(new Unit(nation, "throwing", sub_lv));
case 6 :
return(new Unit(nation, "crossbow", sub_lv));
case 7 :
return(new Unit(nation, "crossbow", sub_lv - 1));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "crossbow", sub_lv + 1));
case 1 :
return(new Unit(nation, "crossbow", sub_lv));
case 2 :
return(new Unit(nation, "bow", sub_lv));
case 3 :
return(new Unit(nation, "throwing", sub_lv));
case 4 :
return(new Unit(nation, "bow", sub_lv));
case 5 :
return(new Unit(nation, "throwing", sub_lv));
case 6 :
return(new Unit(nation, "bow", sub_lv));
case 7 :
return(new Unit(nation, "bow", sub_lv - 1));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "throwing", sub_lv + 1));
case 1 :
return(new Unit(nation, "bow", sub_lv));
case 2 :
return(new Unit(nation, "bow", sub_lv));
case 3 :
return(new Unit(nation, "bow", sub_lv));
case 4 :
return(new Unit(nation, "throwing", sub_lv));
case 5 :
return(new Unit(nation, "bow", sub_lv));
case 6 :
return(new Unit(nation, "throwing", sub_lv));
case 7 :
return(new Unit(nation, "throwing", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "bow", sub_lv));
case 1 :
return(new Unit(nation, "bow", sub_lv - 1));
case 2 :
return(new Unit(nation, "bow", sub_lv));
case 3 :
return(new Unit(nation, "bow", sub_lv - 1));
case 4 :
return(new Unit(nation, "bow", sub_lv));
case 5 :
return(new Unit(nation, "bow", sub_lv - 1));
case 6 :
return(new Unit(nation, "bow", sub_lv));
case 7 :
return(new Unit(nation, "bow", sub_lv - 1));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "crossbow", sub_lv));
case 1 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 2 :
return(new Unit(nation, "crossbow", sub_lv));
case 3 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 4 :
return(new Unit(nation, "crossbow", sub_lv));
case 5 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 6 :
return(new Unit(nation, "crossbow", sub_lv));
case 7 :
return(new Unit(nation, "crossbow", sub_lv - 1));
}
}
}
}
}
}
case "Ger" :
switch (sub_lv) {
case 0 :
return(new Unit(nation, "bow", sub_lv + 1));
case 1 :
return(new Unit(nation, "throwing", sub_lv));
case 2 :
return(new Unit(nation, "crossbow", sub_lv));
case 3 :
return(new Unit(nation, "bow", sub_lv));
case 4 :
return(new Unit(nation, "crossbow", sub_lv));
case 5 :
return(new Unit(nation, "throwing", sub_lv));
case 6 :
return(new Unit(nation, "crossbow", sub_lv));
case 7 :
return(new Unit(nation, "crossbow", sub_lv - 1));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "crossbow", sub_lv + 1));
case 1 :
return(new Unit(nation, "crossbow", sub_lv));
case 2 :
return(new Unit(nation, "bow", sub_lv));
case 3 :
return(new Unit(nation, "throwing", sub_lv));
case 4 :
return(new Unit(nation, "bow", sub_lv));
case 5 :
return(new Unit(nation, "throwing", sub_lv));
case 6 :
return(new Unit(nation, "bow", sub_lv));
case 7 :
return(new Unit(nation, "bow", sub_lv - 1));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "throwing", sub_lv + 1));
case 1 :
return(new Unit(nation, "bow", sub_lv));
case 2 :
return(new Unit(nation, "bow", sub_lv));
case 3 :
return(new Unit(nation, "bow", sub_lv));
case 4 :
return(new Unit(nation, "throwing", sub_lv));
case 5 :
return(new Unit(nation, "bow", sub_lv));
case 6 :
return(new Unit(nation, "throwing", sub_lv));
case 7 :
return(new Unit(nation, "throwing", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "bow", sub_lv));
case 1 :
return(new Unit(nation, "bow", sub_lv - 1));
case 2 :
return(new Unit(nation, "bow", sub_lv));
case 3 :
return(new Unit(nation, "bow", sub_lv - 1));
case 4 :
return(new Unit(nation, "bow", sub_lv));
case 5 :
return(new Unit(nation, "bow", sub_lv - 1));
case 6 :
return(new Unit(nation, "bow", sub_lv));
case 7 :
return(new Unit(nation, "bow", sub_lv - 1));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "crossbow", sub_lv));
case 1 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 2 :
return(new Unit(nation, "crossbow", sub_lv));
case 3 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 4 :
return(new Unit(nation, "crossbow", sub_lv));
case 5 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 6 :
return(new Unit(nation, "crossbow", sub_lv));
case 7 :
return(new Unit(nation, "crossbow", sub_lv - 1));
}
}
}
}
}
case "Rus" :
switch (sub_lv) {
case 0 :
return(new Unit(nation, "crossbow", sub_lv + 1));
case 1 :
return(new Unit(nation, "crossbow", sub_lv));
case 2 :
return(new Unit(nation, "bow", sub_lv));
case 3 :
return(new Unit(nation, "throwing", sub_lv));
case 4 :
return(new Unit(nation, "bow", sub_lv));
case 5 :
return(new Unit(nation, "throwing", sub_lv));
case 6 :
return(new Unit(nation, "bow", sub_lv));
case 7 :
return(new Unit(nation, "bow", sub_lv - 1));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "throwing", sub_lv + 1));
case 1 :
return(new Unit(nation, "bow", sub_lv));
case 2 :
return(new Unit(nation, "bow", sub_lv));
case 3 :
return(new Unit(nation, "bow", sub_lv));
case 4 :
return(new Unit(nation, "throwing", sub_lv));
case 5 :
return(new Unit(nation, "bow", sub_lv));
case 6 :
return(new Unit(nation, "throwing", sub_lv));
case 7 :
return(new Unit(nation, "throwing", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "bow", sub_lv));
case 1 :
return(new Unit(nation, "bow", sub_lv - 1));
case 2 :
return(new Unit(nation, "bow", sub_lv));
case 3 :
return(new Unit(nation, "bow", sub_lv - 1));
case 4 :
return(new Unit(nation, "bow", sub_lv));
case 5 :
return(new Unit(nation, "bow", sub_lv - 1));
case 6 :
return(new Unit(nation, "bow", sub_lv));
case 7 :
return(new Unit(nation, "bow", sub_lv - 1));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "crossbow", sub_lv));
case 1 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 2 :
return(new Unit(nation, "crossbow", sub_lv));
case 3 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 4 :
return(new Unit(nation, "crossbow", sub_lv));
case 5 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 6 :
return(new Unit(nation, "crossbow", sub_lv));
case 7 :
return(new Unit(nation, "crossbow", sub_lv - 1));
}
}
}
}
case "Jap" :
switch (sub_lv) {
case 0 :
return(new Unit(nation, "throwing", sub_lv + 1));
case 1 :
return(new Unit(nation, "bow", sub_lv));
case 2 :
return(new Unit(nation, "bow", sub_lv));
case 3 :
return(new Unit(nation, "bow", sub_lv));
case 4 :
return(new Unit(nation, "throwing", sub_lv));
case 5 :
return(new Unit(nation, "bow", sub_lv));
case 6 :
return(new Unit(nation, "throwing", sub_lv));
case 7 :
return(new Unit(nation, "throwing", sub_lv));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "bow", sub_lv));
case 1 :
return(new Unit(nation, "bow", sub_lv - 1));
case 2 :
return(new Unit(nation, "bow", sub_lv));
case 3 :
return(new Unit(nation, "bow", sub_lv - 1));
case 4 :
return(new Unit(nation, "bow", sub_lv));
case 5 :
return(new Unit(nation, "bow", sub_lv - 1));
case 6 :
return(new Unit(nation, "bow", sub_lv));
case 7 :
return(new Unit(nation, "bow", sub_lv - 1));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "crossbow", sub_lv));
case 1 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 2 :
return(new Unit(nation, "crossbow", sub_lv));
case 3 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 4 :
return(new Unit(nation, "crossbow", sub_lv));
case 5 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 6 :
return(new Unit(nation, "crossbow", sub_lv));
case 7 :
return(new Unit(nation, "crossbow", sub_lv - 1));
}
}
}
case "Mon" :
switch (sub_lv) {
case 0 :
return(new Unit(nation, "bow", sub_lv));
case 1 :
return(new Unit(nation, "bow", sub_lv - 1));
case 2 :
return(new Unit(nation, "bow", sub_lv));
case 3 :
return(new Unit(nation, "bow", sub_lv - 1));
case 4 :
return(new Unit(nation, "bow", sub_lv));
case 5 :
return(new Unit(nation, "bow", sub_lv - 1));
case 6 :
return(new Unit(nation, "bow", sub_lv));
case 7 :
return(new Unit(nation, "bow", sub_lv - 1));
switch (sub_lv) {
case 0 :
return(new Unit(nation, "crossbow", sub_lv));
case 1 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 2 :
return(new Unit(nation, "crossbow", sub_lv));
case 3 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 4 :
return(new Unit(nation, "crossbow", sub_lv));
case 5 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 6 :
return(new Unit(nation, "crossbow", sub_lv));
case 7 :
return(new Unit(nation, "crossbow", sub_lv - 1));
}
}
case "Ara" :
switch (sub_lv) {
case 0 :
return(new Unit(nation, "crossbow", sub_lv));
case 1 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 2 :
return(new Unit(nation, "crossbow", sub_lv));
case 3 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 4 :
return(new Unit(nation, "crossbow", sub_lv));
case 5 :
return(new Unit(nation, "crossbow", sub_lv - 1));
case 6 :
return(new Unit(nation, "crossbow", sub_lv));
case 7 :
return(new Unit(nation, "crossbow", sub_lv - 1));
}
}
}
}
Symbol 3145 MovieClip [__Packages.UnitInfo] Frame 0
class UnitInfo extends Object
{
var TYPE, NATION, ID, COUNT;
function UnitInfo (nt, tp, id, cn) {
super();
TYPE = tp;
NATION = nt;
ID = id;
COUNT = ((cn == undefined) ? 1 : (cn));
}
function getUnit(gender) {
var _local2 = new Unit(NATION, TYPE, ID);
if (gender != undefined) {
_local2.GENDER = gender;
}
return(_local2);
}
function toString() {
return(((((((NATION + "_") + TYPE) + "_") + ID) + "(") + COUNT) + ")");
}
}
Symbol 3146 MovieClip [__Packages.Cage] Frame 0
class Cage extends Object
{
var X, Y, free, empty;
function Cage (xx, yy) {
super();
X = xx;
Y = yy;
free = true;
empty = true;
}
}
Symbol 3147 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.6");
}
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 () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, 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;
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) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + 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) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
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 () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, 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) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + 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 () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, 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;
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) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + 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) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
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 _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
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;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_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);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
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") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
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);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
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);
}
}
Symbol 3148 MovieClip [__Packages.BarnIcon] Frame 0
class BarnIcon extends MovieClip
{
var is_user, _name, stop, anim, enabled, horse, _parent;
function BarnIcon () {
super();
is_user = _name.substr(0, 4) != "unit";
(stop());// not popped
}
function setHorse(horse_ref) {
anim.removeMovieClip();
if ((horse_ref == undefined) && (horse_ref == null)) {
enabled = false;
anim._visible = false;
return(undefined);
}
enabled = true;
anim._visible = true;
horse = horse_ref;
anim.horse.gotoAndStop(horse.skin_color);
anim.morda.gotoAndStop(horse.skin_color);
anim.lgL1.gotoAndStop(horse.skin_color);
anim.lgL2.gotoAndStop(horse.skin_color);
anim.lgR1.gotoAndStop(horse.skin_color);
anim.lgR2.gotoAndStop(horse.skin_color);
anim.ftL1.gotoAndStop(horse.skin_color);
anim.ftL2.gotoAndStop(horse.skin_color);
anim.ftR1.gotoAndStop(horse.skin_color);
anim.ftR2.gotoAndStop(horse.skin_color);
}
function onRollOver() {
_parent.unit_stats_txt.text = ("Hit Points bonus: " + horse.bonus_HP) + newline;
_parent.unit_stats_txt.text = _parent.unit_stats_txt.text + (("Defence bonus: " + horse.bonus_DEF) + newline);
_parent.unit_stats_txt.text = _parent.unit_stats_txt.text + (("Speed bonus: " + horse.bonus_speed) + "\n\n");
_parent.unit_stats_txt.text = _parent.unit_stats_txt.text + (("Cost " + horse.price) + " gp.");
}
function onRelease() {
if (_global.GOLD >= horse.price) {
var _local4 = ((_global.MAIN_HERO.HORSE != null) ? (_global.MAIN_HERO.HORSE.price) : 0);
var _local3 = _global.MAIN_HERO.equipHorse(horse);
if (_local3 == "OK") {
_global.GOLD = _global.GOLD - (horse.price - Math.round(_local4 / 3));
} else {
_parent.error_txt.text = _local3;
}
}
_parent._parent.barnShowTrader();
}
}
Symbol 3149 MovieClip [__Packages.Screen] Frame 0
class Screen extends MovieClip
{
var rage_timer, rage_anim, portrait, hint, potion_1_txt, potion_2_txt, control_shower, control_wall, unit_hp_txt, hp_txt, hp_bottle, sp_txt, sp_bottle;
function Screen () {
super();
rage_timer = 0;
rage_anim._visible = false;
portrait._visible = false;
hint._xscale = 130;
hint._yscale = 130;
potion_1_txt.text = _global.POTION_HealSmall;
potion_2_txt.text = _global.POTION_HealMedium;
portrait.head.stun_anim._visible = false;
portrait.head.stun_anim.stop();
reinitArrowStorm();
Key.addListener(this);
}
function makeThemGo(xx, yy) {
var _local2 = 0;
while (_local2 < _global.SELECTED.length) {
_global.SELECTED[_local2].mustMoveOut = true;
_global.SELECTED[_local2].gox = xx;
_global.SELECTED[_local2].goy = yy;
_local2++;
}
}
function makeThemAttack(xx, yy) {
var _local3 = _global.field[xx][yy].who;
var _local2 = 0;
while (_local2 < _global.SELECTED.length) {
_global.SELECTED[_local2].attacking = _local3;
_global.SELECTED[_local2].gox = null;
_global.SELECTED[_local2].goy = null;
_local2++;
}
}
function screenOnPress() {
switch (_root.cursor._currentframe) {
case 1 :
_root.attachMovie("SelectBorder", "select_border", 6001, {_x:_root._xmouse, _y:_root._ymouse});
return(undefined);
case 2 :
makeArrowShower(_root.getX(_root._xmouse), _root.getY(_root._ymouse));
_root.cursor.gotoAndStop(1);
control_shower.gotoAndPlay(1);
return(undefined);
case 3 :
makeArrowWall(_root.getX(_root._xmouse), _root.getY(_root._ymouse));
_root.cursor.gotoAndStop(1);
control_wall.gotoAndPlay(1);
return(undefined);
}
}
function screenOnRelease() {
if ((_root.select_border == undefined) | ((_root.select_border._width <= 10) && (_root.select_border._height <= 10))) {
var _local5 = _root.getX(_root._xmouse);
var _local4 = _root.getY(_root._ymouse);
if (_global.field[_local5][_local4].free) {
if (_global.field[_local5][_local4].empty) {
makeThemGo(_local5, _local4);
} else if ((_global.field[_local5][_local4].who.HP > 0) && (_global.field[_local5][_local4].who._name != "hero0")) {
if (_global.field[_local5][_local4].who.team == 0) {
_root.deselectUnits();
_global.SELECTED[0] = _global.field[_local5][_local4].who;
_global.field[_local5][_local4].who.borders._visible = true;
reloadPortrait(true);
} else {
makeThemAttack(_local5, _local4);
}
}
}
}
}
function reloadPortrait(option) {
if (option) {
portrait.head.gotoAndStop(_global.SELECTED[0].body.head._currentframe);
portrait.head.armor._visible = _global.SELECTED[0].body.head.armor._visible;
portrait.head.armor.gotoAndStop(_global.SELECTED[0].body.head.armor._currentframe);
portrait._visible = true;
} else {
portrait._visible = false;
}
}
function onEnterFrame() {
if ((_global.SELECTED.length > 0) && (_global.SELECTED[0].HP > 0)) {
unit_hp_txt.text = (_global.SELECTED[0].HP + "/") + _global.SELECTED[0].MAX_HP;
} else {
unit_hp_txt.text = "";
}
hp_txt.text = (_root.hero0.HP + "/") + _root.hero0.MAX_HP;
hp_bottle.hp_bar._yscale = (_root.hero0.HP / _root.hero0.MAX_HP) * 100;
sp_txt.text = (_root.hero0.SP + "/") + _root.hero0.MAX_SP;
sp_bottle.sp_bar._yscale = (_root.hero0.SP / _root.hero0.MAX_SP) * 100;
if (_global.times == 0) {
if (rage_timer > 0) {
rage_timer--;
if (rage_timer == 0) {
rage_anim._visible = false;
_global.RAGE[0] = false;
}
}
}
}
function makeThemHoldPosition() {
var _local3 = !_global.SELECTED[0].holdPosition;
var _local2 = 0;
while (_local2 < _global.SELECTED.length) {
_global.SELECTED[_local2].holdPosition = _local3;
_local2++;
}
}
function makeThemSwapWeapons() {
var _local2 = 0;
while (_local2 < _global.SELECTED.length) {
if (_global.SELECTED[_local2].secAtkAnim != "No") {
_global.SELECTED[_local2].mustMoveOut = false;
_global.SELECTED[_local2].gox = null;
_global.SELECTED[_local2].goy = null;
_global.SELECTED[_local2].attacking = null;
_global.SELECTED[_local2].mustSwapGuns = true;
_global.SELECTED[_local2].preferRanged = !_global.SELECTED[_local2].preferRanged;
}
_local2++;
}
}
function makeThemStop() {
var _local2 = 0;
while (_local2 < _global.SELECTED.length) {
_global.SELECTED[_local2].mustMoveOut = false;
_global.SELECTED[_local2].gox = null;
_global.SELECTED[_local2].goy = null;
_global.SELECTED[_local2].attacking = null;
_local2++;
}
}
function makeThemHealHero(heal_amount) {
if ((_global.mana[0] >= _global.PRICES.SPELL_HealHero) && (_root.hero0.HP < _root.hero0.MAX_HP)) {
_global.mana[0] = _global.mana[0] - _global.PRICES.SPELL_HealHero;
_root.hero0.HP = _root.hero0.HP + heal_amount;
if (_root.hero0.HP > _root.hero0.MAX_HP) {
_root.hero0.HP = _root.hero0.MAX_HP;
}
_root.hero0.redrawHealthBar();
_root.hero0.attachMovie("HealAnim", "anim", 1);
}
}
function makeThemHealUnits(amount) {
var _local3 = 0;
while (_local3 < _global.HERO) {
if ((_root["hero" + _local3].HP > 0) && (_root["hero" + _local3].team == 0)) {
_root["hero" + _local3].HP = _root["hero" + _local3].HP + Math.round(_root["hero" + _local3].MAX_HP * amount);
if (_root["hero" + _local3].HP > _root["hero" + _local3].MAX_HP) {
_root["hero" + _local3].HP = _root["hero" + _local3].MAX_HP;
}
_root["hero" + _local3].attachMovie("HealAnim", "anim", 1);
}
_local3++;
}
}
function makeThemRage() {
rage_anim._visible = true;
_global.RAGE[0] = true;
rage_timer = 60;
}
function makeArrowShower(xx, yy) {
var _local6 = 0;
var _local3 = 0;
while (_local3 < _global.FRIENDS.length) {
if (_global.FRIENDS[_local3].WEAPON_PRI.TYPE == "Bow") {
_local6++;
var _local5 = _global.FRIENDS[_local3].WEAPON_PRI.dmg + _root.dice(_global.FRIENDS[_local3].WEAPON_PRI.rnd);
var _local4 = new DamageData(null, _local5, 100, _global.FRIENDS[_local3].WEAPON_PRI.crit);
_root.addArrowShower(xx + _root.dd(2), yy + _root.dd(2), _local4);
_root.addArrowShower(xx + _root.dd(2), yy + _root.dd(2), _local4);
if (_local6 >= 8) {
break;
}
}
_local3++;
}
}
function makeArrowWall(xx, yy) {
var _local6 = 0;
var _local3 = 0;
while (_local3 < _global.FRIENDS.length) {
if (_global.FRIENDS[_local3].WEAPON_PRI.TYPE == "Crossbow") {
_local6++;
var _local4 = _global.FRIENDS[_local3].WEAPON_PRI.dmg + _root.dice(_global.FRIENDS[_local3].WEAPON_PRI.rnd);
var _local5 = new DamageData(null, _local4, 100, _global.FRIENDS[_local3].WEAPON_PRI.crit);
_root.addArrowWall(xx, yy + _root.dd(2), _local5);
if (_local6 >= 5) {
break;
}
}
_local3++;
}
}
function reinitArrowStorm() {
var _local5 = 0;
var _local6 = 0;
var _local4 = _global.MAX_UNIT_AMOUNT - _root.getTeamCount(0);
while (_local4 < _global.FRIENDS.length) {
if (_global.FRIENDS[_local4].WEAPON_PRI.TYPE == "Bow") {
_local5++;
}
if (_global.FRIENDS[_local4].WEAPON_PRI.TYPE == "Crossbow") {
_local6++;
}
_local4++;
}
if (_local5 == 0) {
control_shower.gotoAndStop(46);
}
if (_local6 == 0) {
control_wall.gotoAndStop(66);
}
}
function resetCurrSkill(skill_id) {
var _local2 = 1;
while (_local2 <= 3) {
if (this["active_" + _local2].shade._currentframe == 2) {
this["active_" + _local2].shade.gotoAndStop(3);
}
_local2++;
}
if (skill_id != 0) {
this["active_" + skill_id].shade.gotoAndStop(2);
}
}
function resetCurrAura(aura_id, enable) {
this["aura_" + aura_id].shade.gotoAndStop((enable ? 2 : 3));
}
function onKeyDown() {
var _local4 = Key.getCode();
if (!_local4) {
return(undefined);
}
switch (_local4) {
case 49 :
_root.hero0.setCurrentSkill(1);
break;
case 50 :
_root.hero0.setCurrentSkill(2);
break;
case 51 :
_root.hero0.setCurrentSkill(3);
break;
case 52 :
_root.hero0.clickAura(1);
break;
case 53 :
_root.hero0.clickAura(2);
break;
case 54 :
_root.hero0.clickAura(3);
break;
case 90 :
if (_global.POTION_HealSmall > 0) {
_global.POTION_HealSmall--;
potion_1_txt.text = _global.POTION_HealSmall;
makeThemHealHero(40);
}
break;
case 88 :
if (_global.POTION_HealMedium <= 0) {
break;
}
_global.POTION_HealMedium--;
potion_2_txt.text = _global.POTION_HealMedium;
makeThemHealHero(300);
}
}
}
Symbol 3150 MovieClip [__Packages.Soldier] Frame 0
class Soldier extends Creature
{
var CreatureInit, light_circle, team, skills_available, holdPosition, borders, mustSwapGuns, mustMoveOut, auraOn, moveX, moveY, aspd_timer, getNearestCreatureInSight, attacking, preferRanged, switchWeapons, X, Y, dist, wpnPri, body, getAttackDelay, aspd_delay, atkAnim, SP, gox, goy, moveOnX, moveOnY, moveNewStep, moveComplete, stopMove, continueMove, isSwitchingWeapons, startMove, canHitMelee, HP, active_skills, MAX_SP, aura_skills, unit_ref, startAura;
function Soldier () {
super();
CreatureInit();
light_circle.gotoAndStop(team + 1);
light_circle._visible = _global.HIGHLIGHT_TROOPS;
skills_available = new Array();
holdPosition = false;
borders._visible = false;
mustSwapGuns = false;
mustMoveOut = false;
auraOn = false;
}
function readyForAction() {
return(((moveX == 0) && (moveY == 0)) && (aspd_timer == 0));
}
function chooseEnemyRanged() {
var _local5 = getNearestCreatureInSight(false);
if (_local5 == null) {
var _local4 = 0;
while (_local4 < _global.HERO) {
if ((_root["hero" + _local4].HP > 0) && (_root["hero" + _local4].team != team)) {
_local5 = _root["hero" + _local4];
}
_local4++;
}
}
attacking = _local5;
}
function chooseEnemyMelee() {
if (preferRanged) {
switchWeapons();
return(undefined);
}
var _local9 = null;
var _local8 = 10000;
var _local4 = 0;
while (_local4 < _global.HERO) {
var _local6 = (((_root["hero" + _local4].X - 1) >= 0) && (_global.field[_root["hero" + _local4].X - 1][_root["hero" + _local4].Y].empty)) || (((_root["hero" + _local4].X - 1) == X) && (_root["hero" + _local4].Y == Y));
var _local7 = (((_root["hero" + _local4].X + 1) < _global.F_WIDTH) && (_global.field[_root["hero" + _local4].X + 1][_root["hero" + _local4].Y].empty)) || (((_root["hero" + _local4].X + 1) == X) && (_root["hero" + _local4].Y == Y));
if (((_root["hero" + _local4].HP > 0) && (_root["hero" + _local4].team != team)) && (_local6 || (_local7))) {
var _local5 = dist(_root["hero" + _local4]);
if (_local5 < _local8) {
_local9 = _root["hero" + _local4];
_local8 = _local5;
}
}
_local4++;
}
attacking = _local9;
}
function comeCloserRanged() {
var _local5 = Math.abs((X - attacking.X) / (Y - attacking.Y)) >= _global.S_ANGLE;
var _local4 = dist(attacking) <= wpnPri.rng;
if (_local5 && (_local4)) {
if (Math.abs(attacking.X - X) >= 1) {
moveX = _root.znak(attacking.X - X);
}
if ((attacking.Y - Y) != 0) {
moveY = _root.znak(attacking.Y - Y);
}
} else {
if (!_local5) {
moveY = _root.znak(attacking.Y - Y);
}
if (!_local4) {
if (Math.abs(attacking.X - X) >= 1) {
moveX = _root.znak(attacking.X - X);
}
}
}
}
function comeCloserMelee() {
if (Math.abs(attacking.X - X) >= 1) {
moveX = _root.znak(attacking.X - X);
}
if ((attacking.Y - Y) != 0) {
moveY = _root.znak(attacking.Y - Y);
}
}
function attackEnemy() {
body._xscale = _root.znak(X - attacking.X) * 100;
var _local6 = (_global.RAGE[team] ? ((getAttackDelay() - aspd_delay) + 1) : (getAttackDelay()));
var _local4 = 0;
while (_local4 < skills_available.length) {
var _local5 = Skill.getCostSP(atkAnim, skills_available[_local4].rf);
if ((SP >= _local5) && (_root.percent(skills_available[_local4].ch))) {
SP = SP - _local5;
aspd_timer = _local6 + 10;
body.gotoAndPlay((atkAnim + "_") + skills_available[_local4].rf);
return(undefined);
}
_local4++;
}
aspd_timer = _local6;
body.play();
}
function moveOnDestination() {
if ((gox != null) && (goy != null)) {
if (gox != X) {
moveX = _root.znak(gox - X);
}
if (goy != Y) {
moveY = _root.znak(goy - Y);
}
if ((gox == X) && (goy == Y)) {
gox = null;
goy = null;
}
} else if ((attacking != null) && (attacking.HP > 0)) {
if (this["canHit" + wpnPri.TYPE](attacking)) {
moveX = 0;
moveY = 0;
} else if (!holdPosition) {
this["comeCloser" + wpnPri.TYPE]();
} else {
moveX = 0;
moveY = 0;
}
} else {
moveX = 0;
moveY = 0;
}
}
function moveOn() {
moveOnX();
moveOnY();
moveNewStep();
if (moveComplete()) {
if ((((gox != null) && (goy != null)) && (!_global.field[gox][goy].empty)) && (dist({X:gox, Y:goy}) == 1)) {
stopMove();
return(undefined);
}
moveX = 0;
moveY = 0;
moveOnDestination();
if ((moveX != 0) || (moveY != 0)) {
if (((moveY == 0) && (_global.field[X + moveX][Y].who != null)) && (_global.field[X + moveX][Y].who.team != team)) {
attacking = _global.field[X + moveX][Y].who;
_global.field[X + moveX][Y].who.attacking = this;
stopMove();
return(undefined);
}
if (!continueMove()) {
findMove();
continueMove();
}
} else {
stopMove();
}
}
}
function findMove() {
var _local6 = 6;
var _local5 = 0;
var _local8;
var _local7;
var _local4 = -1;
while (_local4 <= 1) {
var _local3 = -1;
while (_local3 <= 1) {
if (_global.field[X + _local4][Y + _local3].empty && (_global.field[X + _local4][Y + _local3].free)) {
_local5 = Math.abs(_local4 - moveX) + Math.abs(_local3 - moveY);
if (_local5 < _local6) {
_local6 = _local5;
_local8 = _local4;
_local7 = _local3;
}
}
_local3++;
}
_local4++;
}
moveX = _local8;
moveY = _local7;
}
function AI() {
if (isSwitchingWeapons) {
return(undefined);
}
if (readyForAction()) {
if (mustMoveOut) {
mustMoveOut = false;
moveOnDestination();
if (!startMove()) {
findMove();
startMove();
}
return(undefined);
}
if (mustSwapGuns) {
mustSwapGuns = false;
switchWeapons();
return(undefined);
}
if (attacking != null) {
if (attacking.HP <= 0) {
attacking = null;
return(undefined);
}
if ((wpnPri.TYPE == "Ranged") && (canHitMelee(attacking))) {
switchWeapons();
return(undefined);
}
if (this["canHit" + wpnPri.TYPE](attacking)) {
attackEnemy();
} else if (!holdPosition) {
this["comeCloser" + wpnPri.TYPE]();
if (!startMove()) {
findMove();
startMove();
}
}
} else {
checkAura();
this["chooseEnemy" + wpnPri.TYPE]();
}
} else if ((moveX == 0) && (moveY == 0)) {
aspd_timer--;
} else {
moveOn();
}
}
function onEnterFrame() {
if (HP > 0) {
AI();
}
}
function initSkills() {
delete skills_available;
skills_available = new Array();
if (!active_skills[atkAnim]) {
return(undefined);
}
var _local2 = 0;
while (_local2 < active_skills[atkAnim].length) {
if (active_skills[atkAnim][_local2] > 0) {
var _local3 = 50 - ((Skill.getCostSP(atkAnim, _local2 + 1) / MAX_SP) * 50);
skills_available.push({ch:_local3, rf:_local2 + 1});
}
_local2++;
}
}
function checkAura() {
if (aura_skills.length > 0) {
if (unit_ref != _global.EVIL_HERO) {
holdPosition = startAura(1);
} else {
startAura(1);
}
}
}
}
Symbol 3151 MovieClip [__Packages.Player] Frame 0
class Player extends Creature
{
var team, CreatureInit, speed, moveX, moveY, startMove, nextX, X, canGo, nextY, Y, _y, _x, moveOnX, moveOnY, moveNewStep, moveComplete, continueMove, stopMove, isSwitchingWeapons, agi_delay, aspd_timer, attacking, wpnPri, body, aspd_delay, atkAnim, SP, switchWeapons, getNearestCreatureInSight, HP, aura_skills, isHorseman, active_skills, endAura, startAura;
function Player () {
super();
team = 0;
CreatureInit();
speed = 4;
}
function moveOnDestination() {
if (Key.isDown(_global.CO_LEFT_1) || (Key.isDown(_global.CO_LEFT_2))) {
moveX = -1;
}
if (Key.isDown(_global.CO_RIGHT_1) || (Key.isDown(_global.CO_RIGHT_2))) {
moveX = 1;
}
if (Key.isDown(_global.CO_UP_1) || (Key.isDown(_global.CO_UP_2))) {
moveY = -1;
}
if (Key.isDown(_global.CO_DOWN_1) || (Key.isDown(_global.CO_DOWN_2))) {
moveY = 1;
}
}
function moveOn() {
if ((moveX == 0) && (moveY == 0)) {
moveOnDestination();
if ((moveX != 0) || (moveY != 0)) {
startMove();
}
} else {
if (((moveX != 0) && (moveY == 0)) && (X != nextX)) {
if ((Key.isDown(_global.CO_UP_1) || (Key.isDown(_global.CO_UP_2))) && (canGo(nextX, nextY - 1))) {
moveY = -1;
_global.field[nextX][nextY].empty = true;
nextY = Y + moveY;
_global.field[nextX][nextY].empty = false;
_y = _y - (Math.abs(_root.stgX(X) - _x) / (_global.CAGE_W / _global.CAGE_H));
}
if ((Key.isDown(_global.CO_DOWN_1) || (Key.isDown(_global.CO_DOWN_2))) && (canGo(nextX, nextY + 1))) {
moveY = 1;
_global.field[nextX][nextY].empty = true;
nextY = Y + moveY;
_global.field[nextX][nextY].empty = false;
_y = _y + (Math.abs(_root.stgX(X) - _x) / (_global.CAGE_W / _global.CAGE_H));
}
}
if (((moveY != 0) && (moveX == 0)) && (Y != nextY)) {
if ((Key.isDown(_global.CO_LEFT_1) || (Key.isDown(_global.CO_LEFT_2))) && (canGo(nextX - 1, nextY))) {
moveX = -1;
_global.field[nextX][nextY].empty = true;
nextX = X + moveX;
_global.field[nextX][nextY].empty = false;
_x = _x - (Math.abs(_root.stgY(Y) - _y) / (_global.CAGE_H / _global.CAGE_W));
}
if ((Key.isDown(_global.CO_RIGHT_1) || (Key.isDown(_global.CO_RIGHT_2))) && (canGo(nextX + 1, nextY))) {
moveX = 1;
_global.field[nextX][nextY].empty = true;
nextX = X + moveX;
_global.field[nextX][nextY].empty = false;
_x = _x + (Math.abs(_root.stgY(Y) - _y) / (_global.CAGE_H / _global.CAGE_W));
}
}
moveOnX();
moveOnY();
moveNewStep();
if (moveComplete()) {
moveX = 0;
moveY = 0;
moveOnDestination();
if ((moveX != 0) || (moveY != 0)) {
if (!continueMove()) {
stopMove();
}
} else {
stopMove();
}
}
}
}
function readyToGo() {
return((!isSwitchingWeapons) && (aspd_timer <= agi_delay));
}
function readyForAction() {
return((((!isSwitchingWeapons) && (aspd_timer == 0)) && (moveX == 0)) && (moveY == 0));
}
function noEnemy(i, j) {
return((_global.field[i][j].empty || (_global.field[i][j].who.team == 0)) || (_global.field[i][j].who.HP <= 0));
}
function attack() {
if (Key.isDown(_global.CO_ATTACK_1) || (Key.isDown(_global.CO_ATTACK_2))) {
attacking = this["getEnemy" + wpnPri.TYPE]();
if (attacking != null) {
body._xscale = _root.znak(X - attacking.X) * 100;
}
aspd_timer = aspd_delay;
if (curr_skill != 0) {
var _local4 = Skill.getCostSP(atkAnim, curr_skill);
if (SP >= _local4) {
SP = SP - _local4;
body.gotoAndPlay((atkAnim + "_") + curr_skill);
} else {
setCurrentSkill(0);
body.gotoAndPlay(atkAnim);
}
} else {
body.gotoAndPlay(atkAnim);
}
} else if (Key.isDown(_global.CO_SWITCH)) {
switchWeapons();
}
}
function directHit(useSecondWeapon) {
if (useSecondWeapon == undefined) {
useSecondWeapon = false;
}
this["hit" + wpnPri.TYPE](useSecondWeapon);
}
function getEnemyMelee() {
var _local4 = null;
switch (true) {
case _global.field[X - _root.znak(body._xscale)][Y].who != null :
_local4 = _global.field[X - _root.znak(body._xscale)][Y].who;
break;
case _global.field[X + _root.znak(body._xscale)][Y].who != null :
_local4 = _global.field[X + _root.znak(body._xscale)][Y].who;
break;
default :
return(null);
}
if (_local4 instanceof Creature) {
return(_local4);
}
return(null);
}
function getEnemyRanged() {
return(getNearestCreatureInSight(false));
}
function onEnterFrame() {
if (HP > 0) {
if (aspd_timer > 0) {
aspd_timer--;
}
if (readyForAction()) {
attack();
}
if (readyToGo()) {
moveOn();
}
}
}
function initSkills() {
var _local3 = 0;
while (_local3 < 3) {
_root.scr["aura_" + (_local3 + 1)].gotoAndStop(Aura.getFrame(aura_skills[_local3][0]));
if (!aura_skills[_local3]) {
trace((("Hero aura #" + _local3) + " is missing! - ") + aura_skills[_local3]);
return(undefined);
}
if (aura_skills[_local3][1] > 0) {
_root.scr["aura_" + (_local3 + 1)].shade.gotoAndStop(3);
_root.scr["aura_" + (_local3 + 1)].amount_txt.text = aura_skills[_local3][1];
} else {
_root.scr["aura_" + (_local3 + 1)].shade.gotoAndStop(1);
_root.scr["aura_" + (_local3 + 1)].amount_txt.text = "";
}
_local3++;
}
if (isHorseman && (wpnPri.TYPE == "Melee")) {
_local3 = 1;
while (_local3 <= 3) {
_root.scr["active_" + _local3].shade.gotoAndStop(3);
_root.scr["active_" + _local3].amount_txt.text = "";
_root.scr["active_" + _local3].gotoAndStop("none");
_local3++;
}
return(undefined);
}
if (active_skills[atkAnim]) {
_local3 = 0;
while (_local3 < active_skills[atkAnim].length) {
_root.scr["active_" + (_local3 + 1)].gotoAndStop(Skill.getActiveSkillFrame(atkAnim, _local3 + 1));
if (active_skills[atkAnim][_local3] > 0) {
_root.scr["active_" + (_local3 + 1)].shade.gotoAndStop(3);
_root.scr["active_" + (_local3 + 1)].amount_txt.text = active_skills[atkAnim][_local3];
} else {
_root.scr["active_" + (_local3 + 1)].shade.gotoAndStop(1);
_root.scr["active_" + (_local3 + 1)].amount_txt.text = "";
}
_local3++;
}
} else {
_local3 = 0;
while (_local3 < 3) {
_root.scr["active_" + (_local3 + 1)].amount_txt.text = "";
_root.scr["active_" + (_local3 + 1)].gotoAndStop("none");
_root.scr["active_" + (_local3 + 1)].shade.gotoAndStop(3);
_local3++;
}
}
setCurrentSkill(0);
}
function setCurrentSkill(skill_id) {
if (!active_skills[atkAnim]) {
return(undefined);
}
if ((skill_id != 0) && (active_skills[atkAnim][skill_id - 1] <= 0)) {
return(undefined);
}
if (isHorseman && (wpnPri.TYPE == "Melee")) {
return(undefined);
}
if (skill_id != curr_skill) {
curr_skill = skill_id;
} else {
curr_skill = 0;
}
_root.scr.resetCurrSkill(curr_skill);
}
function clickAura(aura_id) {
if (aura_skills[aura_id - 1][1] <= 0) {
return(undefined);
}
if (endAura(aura_id)) {
_root.scr.resetCurrAura(aura_id, false);
return(undefined);
}
startAura(aura_id);
_root.scr.resetCurrAura(aura_id, true);
}
var curr_skill = 0;
}
Symbol 3152 MovieClip [__Packages.SelectBorder] Frame 0
class SelectBorder extends MovieClip
{
var XX, YY, _width, _height, _x, _y, hitTest, play;
function SelectBorder () {
super();
XX = _root._xmouse;
YY = _root._ymouse;
_width = 0;
_height = 0;
}
function onMouseMove() {
var _local3 = _root._xmouse - XX;
var _local4 = _root._ymouse - YY;
if (_local3 >= 0) {
_x = XX;
_width = _local3;
} else {
_x = _root._xmouse;
_width = -_local3;
}
if (_local4 >= 0) {
_y = YY;
_height = _local4;
} else {
_y = _root._ymouse;
_height = -_local4;
}
}
function onMouseUp() {
if ((_width > 10) || (_height > 10)) {
_root.deselectUnits();
var _local4 = 1;
while (_local4 < _global.HERO) {
if (((_root["hero" + _local4].team == 0) && (_root["hero" + _local4].HP > 0)) && (hitTest(_root["hero" + _local4]._x, _root["hero" + _local4]._y, false))) {
_global.SELECTED.push(_root["hero" + _local4]);
_root["hero" + _local4].borders._visible = true;
}
_local4++;
}
_root.scr.reloadPortrait(_global.SELECTED.length > 0);
}
play();
}
}
Symbol 3153 MovieClip [__Packages.Projectile] Frame 0
class Projectile extends MovieClip
{
var _xscale, _yscale, moving, dstX, dstY, X, Y, plusX, speed, plusY, _x, _y, removeMovieClip, swapDepths;
function Projectile () {
super();
_xscale = 50;
_yscale = 50;
moving = true;
if ((dstX == undefined) || (dstY == undefined)) {
dstX = X;
dstY = Y;
}
}
function init() {
var _local2 = Math.atan2(dstY - Y, dstX - X);
plusX = speed * Math.cos(_local2);
plusY = speed * Math.sin(_local2);
}
function endMove() {
}
function moveOn() {
_x = _x + plusX;
_y = _y + (plusY / 1.6);
var _local5 = _root.getX(_x);
var _local4 = _root.getY(_y);
if ((_local5 != X) || (_local4 != Y)) {
if ((((_local5 < 0) || (_local5 >= _global.F_WIDTH)) || (_local4 < 0)) || (_local4 >= _global.F_HEIGHT)) {
removeMovieClip();
return(true);
}
X = _local5;
Y = _local4;
swapDepths(_root.getDepthMan(_local5, _local4) + 2);
if ((_local5 == dstX) && (_local4 == dstY)) {
endMove();
}
return(true);
}
return(false);
}
var is_throwing = false;
var pierce = 0;
}
Symbol 3154 MovieClip [__Packages.Grenade] Frame 0
class Grenade extends Projectile
{
var speed, init, gren, dst_x, dstX, dst_y, dstY, len, _y, _x, moving, gotoAndPlay, dmg_data, X, Y, moveOn;
function Grenade () {
super();
speed = 10;
init();
gren.gotoAndStop(231);
dst_x = _root.stgX(dstX);
dst_y = _root.stgY(dstY);
len = Math.sqrt(((_x - dst_x) * (_x - dst_x)) + ((_y - dst_y) * (_y - dst_y)));
}
function endMove() {
moving = false;
explode();
gotoAndPlay(2);
}
function explode() {
dmg_data.hit = 100;
dmg_data.damage = dmg_data.damage * 2;
var _local4 = X - 2;
while (_local4 <= (X + 2)) {
var _local3 = Y - 2;
while (_local3 <= (Y + 2)) {
if (_global.field[_local4][_local3].who != null) {
_global.field[_local4][_local3].who.takeDamage(dmg_data, null);
}
_local3++;
}
_local4++;
}
}
function onEnterFrame() {
if (moving) {
gren._rotation = gren._rotation + 2;
var _local2 = (Math.sqrt(((_x - dst_x) * (_x - dst_x)) + ((_y - dst_y) * (_y - dst_y))) / len) * 100;
_local2 = _local2 - 50;
gren._y = (Math.abs(_local2) * 3) - 230;
moveOn();
}
}
}
Symbol 3155 MovieClip [__Packages.ArrowStorm] Frame 0
class ArrowStorm extends MovieClip
{
var play_count, dmg;
function ArrowStorm () {
super();
play_count = 0;
dmg = new Array();
}
function addDamage(dmg_data) {
dmg.push(dmg_data);
}
}
Symbol 3156 MovieClip [__Packages.MovieDummy] Frame 0
class MovieDummy extends Creature
{
var body, initUnit;
function MovieDummy () {
super();
body.head.stun_anim._visible = false;
}
function dress(unit_nat, unit_type, unit_id) {
initUnit(new Unit(unit_nat, unit_type, unit_id));
}
function playAnim(anim_name) {
body.gotoAndPlay(anim_name);
}
function stopAt(anim_name) {
body.gotoAndStop(anim_name);
}
function meleeHit(skill_id, useSecondWeapon, dmg_mod, skill_flag) {
}
function rangedHit(skill_id, useSecondWeapon, dmg_mod, skill_flag) {
}
}
Symbol 3157 MovieClip [__Packages.Tree] Frame 0
class Tree extends MovieClip
{
var _x, _y, swapDepths;
function Tree () {
super();
}
function init() {
var _local5 = _root.getX(_x);
var _local4 = _root.getY(_y);
swapDepths(_root.getDepthMan(_local5, _local4));
_x = _root.stgX(_local5);
_y = _root.stgY(_local4);
_global.field[_local5][_local4].free = false;
_global.field[_local5][_local4].who = this;
}
}
Symbol 3158 MovieClip [__Packages.Arrow] Frame 0
class Arrow extends Projectile
{
var speed, init, pierce, moving, removeMovieClip, Y, X, team, dmg_data, is_throwing, dstX, dstY, moveOn;
function Arrow () {
super();
speed = 20;
init();
}
function endMove() {
if (!pierce) {
moving = false;
checkHit();
removeMovieClip();
}
}
function checkHit() {
var _local3 = _global.field[X][Y].who;
if (((_local3 != null) && (_local3.HP > 0)) && (_local3.team != team)) {
_local3.takeDamage(dmg_data, null);
if (pierce == 0) {
moving = false;
removeMovieClip();
return(undefined);
}
if (is_throwing) {
var _local4 = _local3.getNearestCreatureInSight(true, true);
if (!_local4) {
moving = false;
removeMovieClip();
return(undefined);
}
dstX = _local4.X;
dstY = _local4.Y;
init();
} else {
dstX = null;
dstY = null;
dmg_data.damage = dmg_data.damage * 0.7;
}
pierce--;
}
if (!_global.field[X][Y].free) {
removeMovieClip();
}
}
function onEnterFrame() {
if (moving && (moveOn())) {
checkHit();
}
}
}
Symbol 3159 MovieClip [__Packages.MouseHint] Frame 0
class MouseHint extends MovieClip
{
var getDepth, _x, _parent, _y, _width, _height, gotoAndStop, name_txt, stats_txt, descr_txt, nation_mc, aura_mc, type_txt, cost_txt, type_mc;
function MouseHint () {
super();
if (getDepth() < 0) {
no_moving = true;
} else {
_x = _parent._xmouse;
_y = _parent._ymouse;
if ((_x + _width) > 800) {
_x = 800 - _width;
}
if ((_y + _height) > 600) {
_y = 600 - _height;
}
}
}
function showUnitInfo(unit_mc) {
gotoAndStop("unit_descr");
var _local4 = unit_mc.unit_ref;
name_txt.text = _local4.NAME;
stats_txt.text = (((((((("STR: " + _local4.STR) + "\nDEX: ") + _local4.DEX) + "\nCON: ") + _local4.CON) + "\nSPR: ") + _local4.SPR) + "\n\nPrice: ") + _local4.price;
descr_txt.text = ((("HP: " + unit_mc.MAX_HP) + " SP: ") + unit_mc.MAX_SP) + newline;
descr_txt.text = descr_txt.text + (((("Defense: " + unit_mc.DEF) + " Dodge: ") + Math.floor(unit_mc.DODGE)) + newline);
descr_txt.text = descr_txt.text + (((((("Damage: " + unit_mc.wpnPri.dmg) + "-") + (unit_mc.wpnPri.dmg + unit_mc.wpnPri.rnd)) + " (") + unit_mc.wpnPri.CRIT) + "% crit)\n");
descr_txt.text = descr_txt.text + (("Attack speed: " + (Math.round(12000 / unit_mc.aspd_delay) / 100)) + newline);
descr_txt.text = descr_txt.text + (((_local4.primary_skill + " mastery: ") + _local4.SKILL[_local4.primary_skill]) + newline);
nation_mc.gotoAndStop(_local4.NATION);
var _local2 = 0;
while (_local2 < 3) {
if (_local4.ACTIVE_SKILLS[unit_mc.atkAnim][_local2] > 0) {
this["skill_" + (_local2 + 1)]._visible = true;
this["skill_" + (_local2 + 1)].gotoAndStop(Skill.getActiveSkillFrame(unit_mc.atkAnim, _local2 + 1));
this["skill_" + (_local2 + 1)].amount_txt.text = _local4.ACTIVE_SKILLS[unit_mc.atkAnim][_local2];
this["skill_" + (_local2 + 1)].shade.gotoAndStop(3);
} else {
this["skill_" + (_local2 + 1)]._visible = false;
}
_local2++;
}
if (_local4.AURA_SKILLS[0]) {
aura_mc._visible = true;
aura_mc.gotoAndStop(Aura.getFrame(_local4.AURA_SKILLS[0][0]));
aura_mc.amount_txt.text = _local4.AURA_SKILLS[0][1];
aura_mc.shade.gotoAndStop(3);
} else {
aura_mc._visible = false;
}
}
function showItemInfo(item_info) {
gotoAndStop("item_descr");
var _local2 = item_info.getItem();
name_txt.text = _local2.NAME;
switch (_local2.TYPE) {
case "Clothes" :
case "Helmet" :
type_txt.text = "Armor";
descr_txt.text = ("Defense: " + _local2.value) + newline;
if (_local2.HP_mod != 0) {
descr_txt.text = descr_txt.text + ((("HP " + ((_local2.HP_mod >= 0) ? "+ " : "- ")) + Math.abs(_local2.HP_mod)) + newline);
}
if (_local2.SP_mod != 0) {
descr_txt.text = descr_txt.text + ((("SP " + ((_local2.SP_mod >= 0) ? "+ " : "- ")) + Math.abs(_local2.SP_mod)) + newline);
}
break;
case "Rune" :
type_txt.text = "Enchant Rune";
descr_txt.text = Rune.getRuneDescription(_local2.ENCH_ID);
break;
default :
type_txt.text = _local2.TYPE;
if (_local2.TYPE == "Shield") {
descr_txt.text = ("Block chance: " + _local2.crit) + newline;
} else {
descr_txt.text = ((("Damage: " + _local2.dmg) + "-") + (_local2.dmg + _local2.rnd)) + newline;
descr_txt.text = descr_txt.text + (("Critical rate: " + _local2.crit) + newline);
if (_local2.aspd_bonus == 0) {
break;
}
descr_txt.text = descr_txt.text + (("Attack speed +" + _local2.aspd_bonus) + "%\n");
}
}
if (_local2.require_param) {
descr_txt.text = descr_txt.text + (((("Requires " + _local2.require_value) + " ") + _local2.require_param) + newline);
}
descr_txt.text = descr_txt.text + ("\nPrice: " + _local2.price);
if (_local2.NATION) {
nation_mc.gotoAndStop(_local2.NATION);
var _local4 = _local2.getMaxLevel();
if (_local2.NATION == "Rog") {
var _local3 = 1;
while (_local3 <= 8) {
this["star_" + _local3]._visible = false;
_local3++;
}
} else {
var _local3 = 1;
while (_local3 <= 8) {
if (_local3 > _local4) {
this["star_" + _local3]._visible = false;
} else {
this["star_" + _local3]._visible = true;
this["star_" + _local3].gotoAndStop(((_local3 <= _local2.LEVEL) ? "on" : "off"));
}
_local3++;
}
}
} else {
nation_mc.gotoAndStop("none");
var _local3 = 1;
while (_local3 <= 8) {
this["star_" + _local3]._visible = false;
_local3++;
}
}
}
function showSkillInfo(skill_name, skill_id) {
gotoAndStop("skill_descr");
if (skill_id < 0) {
name_txt.text = Aura.getName(skill_name);
type_txt.text = "Aura";
cost_txt.text = ("SP cost: " + Aura.getCostSP(skill_name)) + " per second";
descr_txt.text = Aura.getDescription(skill_name);
type_mc.gotoAndStop("aura");
} else {
if (skill_id == 0) {
type_txt.text = "Passive skill";
cost_txt.text = "";
type_mc.gotoAndStop("passive");
} else {
type_txt.text = "Active skill";
cost_txt.text = "SP cost: " + Skill.getCostSP(skill_name, skill_id);
type_mc.gotoAndStop(skill_name);
}
name_txt.text = Skill.getSkillName(skill_name, skill_id);
descr_txt.text = Skill.getSkillDescription(skill_name, skill_id);
}
}
function showSmallDescr(msg) {
gotoAndStop("small_descr");
descr_txt.text = msg;
}
function onEnterFrame() {
if (!no_moving) {
_x = _parent._xmouse;
_y = _parent._ymouse;
if ((_x + _width) > 800) {
_x = 800 - _width;
}
if ((_y + _height) > 600) {
_y = 600 - _height;
}
}
}
var no_moving = false;
}
Symbol 3160 MovieClip [__Packages.SkillChooser] Frame 0
class SkillChooser extends MovieClip
{
var _parent, curr_value;
function SkillChooser () {
super();
}
function showSkillInfo(id) {
_parent.attachMovie("MouseHint", "mouse_hint", 90, {_x:_parent._xmouse, _y:_parent._ymouse});
_parent.mouse_hint.showSkillInfo(curr_value, id);
}
function removeSkillInfo() {
_parent.mouse_hint.removeMovieClip();
}
}
Symbol 3161 MovieClip [__Packages.NationChooser] Frame 0
class NationChooser extends SkillChooser
{
var curr_value, sign, _parent;
function NationChooser () {
super();
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.GENDER = "m";
curr_value = "Viz";
showChosen();
}
function showChosen() {
sign.gotoAndStop(curr_value);
_global.MAIN_HERO.NATION = curr_value;
_parent.hero_ico.setUnitView(_global.MAIN_HERO, false);
}
function goRight() {
if (sign._currentframe == 6) {
sign.gotoAndStop(1);
} else {
sign.gotoAndStop(sign._currentframe + 1);
}
curr_value = arr[sign._currentframe - 1];
showChosen();
}
function goLeft() {
if (sign._currentframe == 1) {
sign.gotoAndStop(6);
} else {
sign.gotoAndStop(sign._currentframe - 1);
}
curr_value = arr[sign._currentframe - 1];
showChosen();
}
static var arr = ["Viz", "Ger", "Rus", "Jap", "Mon", "Ara"];
}
Symbol 3162 MovieClip [__Packages.ActiveSkillChooser] Frame 0
class ActiveSkillChooser extends SkillChooser
{
var type_mc, curr_value, ID, _parent;
function ActiveSkillChooser () {
super();
var _local3 = 1;
while (_local3 <= 3) {
this["ico_" + _local3].shade.gotoAndStop(3);
this["ico_" + _local3].amount_txt.text = "";
_local3++;
}
showChosen();
}
function showChosen() {
type_mc.gotoAndStop(curr_value);
var _local2 = 1;
while (_local2 <= 3) {
this["ico_" + _local2].gotoAndStop(Skill.getActiveSkillFrame(curr_value, _local2));
_local2++;
}
}
function goRight() {
var _local2 = (Skill.getActiveSkillFrame(curr_value, 3) / 3) - 1;
_local2++;
if (_local2 >= arr.length) {
_local2 = 0;
}
curr_value = arr[_local2];
if (same()) {
goRight();
} else {
showChosen();
}
}
function goLeft() {
var _local2 = (Skill.getActiveSkillFrame(curr_value, 3) / 3) - 1;
_local2--;
if (_local2 < 0) {
_local2 = arr.length - 1;
}
curr_value = arr[_local2];
if (same()) {
goLeft();
} else {
showChosen();
}
}
function same() {
var _local2 = 0;
while (_local2 < 3) {
if ((_local2 != ID) && (_parent["active_" + _local2].curr_value == curr_value)) {
return(true);
}
_local2++;
}
return(false);
}
static var arr = ["shield", "2H_sword", "2H_axe", "dual", "spear", "dagger", "katana", "staff", "katar", "bow", "crossbow", "throwing"];
}
Symbol 3163 MovieClip [__Packages.AuraSkillChooser] Frame 0
class AuraSkillChooser extends SkillChooser
{
var ico, curr_value, ID, _parent;
function AuraSkillChooser () {
super();
ico.shade.gotoAndStop(3);
ico.amount_txt.text = "";
showChosen();
}
function showChosen() {
ico.gotoAndStop(Aura.getFrame(curr_value));
}
function goRight() {
var _local2 = Aura.getFrame(curr_value) - 60;
_local2++;
if (_local2 >= arr.length) {
_local2 = 0;
}
curr_value = arr[_local2];
if (same()) {
goRight();
} else {
showChosen();
}
}
function goLeft() {
var _local2 = Aura.getFrame(curr_value) - 60;
_local2--;
if (_local2 < 0) {
_local2 = arr.length - 1;
}
curr_value = arr[_local2];
if (same()) {
goLeft();
} else {
showChosen();
}
}
function same() {
var _local2 = 0;
while (_local2 < 3) {
if ((_local2 != ID) && (_parent["aura_" + _local2].curr_value == curr_value)) {
return(true);
}
_local2++;
}
return(false);
}
static var arr = ["Devotion", "DivineHelp", "Barrier", "Sacrifice", "ForceBalance", "VenomCloud", "HolyTribunal", "UnholyBreath", "LifeLeech", "SoulDrain", "Healing", "BansheeCry", "NationViz", "NationGer", "NationRus", "NationJap", "NationMon", "NationAra"];
}
Symbol 3164 MovieClip [__Packages.PassiveSkillChooser] Frame 0
class PassiveSkillChooser extends SkillChooser
{
var ico, curr_value, ID, _parent;
function PassiveSkillChooser () {
super();
ico.shade.gotoAndStop(3);
ico.amount_txt.text = "";
showChosen();
}
function showChosen() {
ico.gotoAndStop(Skill.getPassiveSkillFrame(curr_value));
}
function goRight() {
var _local2 = Skill.getPassiveSkillFrame(curr_value) - 37;
_local2++;
if (_local2 >= arr.length) {
_local2 = 0;
}
curr_value = arr[_local2];
if (same()) {
goRight();
} else {
showChosen();
}
}
function goLeft() {
var _local2 = Skill.getPassiveSkillFrame(curr_value) - 37;
_local2--;
if (_local2 < 0) {
_local2 = arr.length - 1;
}
curr_value = arr[_local2];
if (same()) {
goLeft();
} else {
showChosen();
}
}
function same() {
var _local2 = 0;
while (_local2 < 6) {
if ((_local2 != ID) && (_parent["passive_" + _local2].curr_value == curr_value)) {
return(true);
}
_local2++;
}
return(false);
}
static var arr = ["Bowmen_1", "Bowmen_2", "Bowmen_3", "Infantry_1", "Infantry_2", "Infantry_3", "Horsemen_1", "Horsemen_2", "Horsemen_3", "Swordsmen_1", "Swordsmen_2", "Swordsmen_3", "Meditate", "FarEastWarTraining", "AssassinTraining", "BerserkerTraining", "KungFuSecrets", "FindWeakPoint"];
}
Symbol 3165 MovieClip [__Packages.BarracksIcon] Frame 0
class BarracksIcon extends MovieClip
{
var is_user, _name, enabled, stop, anim, attachMovie, _parent, pos;
function BarracksIcon () {
super();
is_user = _name.substr(0, 4) != "unit";
enabled = false;
(stop());// not popped
}
function setUnit(unit_ref) {
unit = unit_ref;
setUnitView(unit_ref.getUnit(), false);
enabled = true;
}
function setUnitClass(unit_ref) {
unit = unit_ref.getUnitInfo();
setUnitView(unit_ref, false);
enabled = true;
}
function setUnitView(unit_ref, look_right) {
anim.removeMovieClip();
if ((unit_ref == undefined) && (unit_ref == null)) {
enabled = false;
return(undefined);
}
var _local3 = (look_right ? -1 : 1);
attachMovie(((unit_ref.HORSE == null) ? "Human" : "Horseman"), "anim", 1, {_x:0, _y:0});
anim._xscale = 45 * _local3;
anim._yscale = 45;
anim.light_circle._visible = false;
anim._x = 0;
anim._y = 0;
anim.onEnterFrame = null;
anim.initUnit(unit_ref);
}
function setHero(hero_ref) {
anim.removeMovieClip();
enabled = false;
if ((hero_ref == undefined) && (hero_ref == null)) {
return(undefined);
}
unit = null;
attachMovie(((hero_ref.HORSE == null) ? "Human" : "Horseman"), "anim", 1, {_x:0, _y:0});
anim._xscale = 45;
anim._yscale = 45;
anim.light_circle._visible = false;
anim._x = 0;
anim._y = 0;
anim.onEnterFrame = null;
anim.initUnit(hero_ref);
}
function onRollOver() {
if (unit) {
_parent._parent.showUnitDescription(anim);
}
}
function onPress() {
_parent._parent.removeDescription();
if (unit == null) {
return(undefined);
}
if (!is_user) {
if (anim.unit_ref.price > _global.GOLD) {
_parent.unit_name_txt.text = "Not enough gold!";
} else if (_root.getSoldiersAmount() >= MAX_ARMY) {
_parent.unit_name_txt.text = "Your army is too big!";
} else {
_parent._parent.dragUnitOn(this);
}
} else {
_parent._parent.dragUnitOn(this);
}
}
function onRelease() {
_parent._parent.dragUnitOff();
}
function onReleaseOutside() {
if (!unit) {
return(undefined);
}
var _local5 = "NONE";
var _local4 = 0;
while (_local4 < 8) {
if (_parent["unit_" + _local4].hitTest(_parent._xmouse, _parent._ymouse, false)) {
_local5 = "unit_" + _local4;
break;
}
_local4++;
}
if (_local5 == "NONE") {
_local4 = 0;
while (_local4 < 10) {
if (_parent["army_" + _local4].hitTest(_parent._xmouse, _parent._ymouse, false)) {
_local5 = "army_" + _local4;
break;
}
_local4++;
}
if (_local5 == "NONE") {
_local4 = 0;
while (_local4 < 8) {
if (_parent["reserve_" + _local4].hitTest(_parent._xmouse, _parent._ymouse, false)) {
_local5 = "reserve_" + _local4;
break;
}
_local4++;
}
}
}
if (_local5 != "NONE") {
if (is_user) {
if (!_parent[_local5].is_user) {
_global.GOLD = _global.GOLD + Math.floor(anim.unit_ref.price / 4);
_global.FRIENDS.splice(pos, 1);
} else {
var _local6 = _global.FRIENDS[pos];
_global.FRIENDS[pos] = _global.FRIENDS[_parent[_local5].pos];
_global.FRIENDS[_parent[_local5].pos] = _local6;
}
} else if ((_parent[_local5].is_user && (anim.unit_ref.price <= _global.GOLD)) && (_root.getSoldiersAmount() < MAX_ARMY)) {
_global.GOLD = _global.GOLD - anim.unit_ref.price;
if (_global.FRIENDS[_parent[_local5].pos]) {
_global.FRIENDS.splice(_parent[_local5].pos, 0, unit.getUnit());
} else {
_global.FRIENDS[_parent[_local5].pos] = unit.getUnit();
}
}
}
_parent.money_txt.text = _global.GOLD + " gold";
_parent._parent.barracksShowUser();
_parent._parent.dragUnitOff();
}
function onRollOut() {
}
var unit = null;
static var MAX_ARMY = 30;
}
Symbol 3166 MovieClip [__Packages.StoreIcon] Frame 0
class StoreIcon extends MovieClip
{
var _name, TYPE, stop, item, _visible, amount_txt, ench_back, gotoAndStop, _parent, pos;
function StoreIcon () {
super();
switch (_name.charAt(0)) {
case "u" :
TYPE = "user";
break;
case "t" :
TYPE = "trader";
break;
case "r" :
TYPE = "refine";
break;
default :
TYPE = "inventory";
}
(stop());// not popped
}
function setItem(item_ref) {
item = item_ref;
if (item_ref) {
_visible = true;
var _local2 = item.getItem();
amount_txt.text = ((TYPE == "user") ? (String(item.COUNT)) : "");
ench_back._visible = item.ENCH_ID != null;
gotoAndStop(_local2.getIconFrame());
} else {
_visible = false;
}
}
function onRollOver() {
_parent.msg_txt.text = "";
if (item) {
_parent._parent.showItemDescription(item);
}
}
function onPress() {
_parent._parent.removeDescription();
var _local3 = item.getItem();
if ((TYPE == "trader") && (_local3.price > _global.GOLD)) {
_parent.msg_txt.text = "Not enough gold!";
} else {
_parent._parent.dragItemOn(item);
}
}
function onRelease() {
_parent._parent.dragItemOff();
}
function onReleaseOutside() {
if (!item) {
return(undefined);
}
switch (TYPE) {
case "user" :
if (_parent.refine_anvil.hitTest(_parent._xmouse, _parent._ymouse, false)) {
if ((item.CATEGORY == "WeaponClass") && (item.TYPE != "Shield")) {
_parent.refine_anvil.setItem(item.getSingleCopy());
if (item.COUNT > 1) {
item.COUNT--;
} else {
_global.INVENTORY.splice(pos, 1);
}
_parent.refine_lvl_txt.text = item.REFINE + 1;
_parent._parent.forgeUpdateData();
}
} else if (_parent.refine_scroll.hitTest(_parent._xmouse, _parent._ymouse, false)) {
if (item.CATEGORY == "Rune") {
_parent.refine_scroll.setItem(item);
if (item.COUNT > 1) {
item.COUNT--;
} else {
_global.INVENTORY.splice(pos, 1);
}
}
} else {
var _local5 = false;
var _local4 = 0;
while (_local4 < 7) {
if (_parent["trader_" + _local4].hitTest(_parent._xmouse, _parent._ymouse, false)) {
_local5 = true;
break;
}
_local4++;
}
if (_local5) {
var _local6 = item.getItem();
if ((item.COUNT > 1) && (!_global.STORE_DONT_ASK_AMOUNT)) {
_parent.attachMovie("Amount window", "am_wnd", 150, {_x:200, _y:150});
_parent.am_wnd.pos = pos;
_parent.am_wnd.price = _local6.price;
_parent.am_wnd.max_amount = item.COUNT;
_parent.am_wnd.amount = _parent.am_wnd.max_amount;
_parent.am_wnd.amount_txt.text = _parent.am_wnd.amount;
_parent.am_wnd.item_ico.gotoAndStop(_local6.getIconFrame());
} else {
_global.GOLD = _global.GOLD + (Math.floor(_local6.price / 2) * item.COUNT);
_global.INVENTORY.splice(pos, 1);
}
_parent.money_txt.text = ("Money: " + _global.GOLD) + " gold";
}
}
break;
case "trader" :
var _local5 = false;
var _local4 = 0;
while (_local4 < 7) {
if (_parent["user_" + _local4].hitTest(_parent._xmouse, _parent._ymouse, false)) {
_local5 = true;
break;
}
_local4++;
}
if (_local5) {
var _local6 = item.getItem();
if (_global.GOLD >= _local6.price) {
_global.GOLD = _global.GOLD - _local6.price;
_root.addItemInfoTo(_global.INVENTORY, item.getCopy());
}
_parent.money_txt.text = ("Money: " + _global.GOLD) + " gold";
}
break;
case "refine" :
_local5 = false;
_local4 = 0;
while (_local4 < 7) {
if (_parent["user_" + _local4].hitTest(_parent._xmouse, _parent._ymouse, false)) {
_local5 = true;
break;
}
_local4++;
}
_root.addItemInfoTo(_global.INVENTORY, item);
setItem(null);
}
_parent._parent.storeShowUser();
_parent._parent.dragItemOff();
}
function onRollOut() {
_parent._parent.removeDescription();
}
}
Symbol 3167 MovieClip [__Packages.EquipmentIcon] Frame 0
class EquipmentIcon extends StoreIcon
{
var StoreIcon, hitArea, rect_hit_area, _visible, item, ench_back, TYPE, amount_txt, gotoAndStop, _parent, pos;
function EquipmentIcon () {
super();
StoreIcon();
hitArea = rect_hit_area;
}
function setItem(item_ref) {
if (!item_ref) {
_visible = false;
return(undefined);
}
_visible = true;
item = item_ref;
ench_back._visible = item.ENCH_ID != null;
var _local2 = item.getItem();
amount_txt.text = ((TYPE == "user") ? (String(item.COUNT)) : "");
gotoAndStop(_local2.getIconFrame());
}
function onPress() {
_parent._parent.dragItemOn(item);
}
function onReleaseOutside() {
if (TYPE == "user") {
var _local5 = "none";
switch (true) {
case _parent.ARMOR_hit.hitTest(_parent._xmouse, _parent._ymouse, false) :
_local5 = "ARMOR";
break;
case _parent.HELMET_hit.hitTest(_parent._xmouse, _parent._ymouse, false) :
_local5 = "HELMET";
break;
case _parent.WEAPON_PRI_hit.hitTest(_parent._xmouse, _parent._ymouse, false) :
_local5 = "WEAPON_PRI";
break;
case _parent.WEAPON_SEC_hit.hitTest(_parent._xmouse, _parent._ymouse, false) :
_local5 = "WEAPON_SEC";
}
if (_local5 != "none") {
var _local8 = _global.MAIN_HERO[_local5].getItemInfo();
var _local7 = _global.MAIN_HERO.equipItemInfo(_local5, item);
if (_local7 == "OK") {
if (_global.INVENTORY[pos].COUNT == 1) {
_global.INVENTORY.splice(pos, 1);
} else {
_global.INVENTORY[pos].COUNT--;
}
_root.addItemInfoTo(_global.INVENTORY, _local8);
_parent.error_txt.text = "";
} else {
_parent.item_name_txt.text = "";
_parent.item_stats_txt.text = "";
_parent.error_txt.text = _local7;
}
}
} else {
var _local6 = -1;
var _local4 = 0;
while (_local4 < 6) {
if (_parent["user_" + _local4].hitTest(_parent._xmouse, _parent._ymouse, false)) {
_local6 = _local4;
break;
}
_local4++;
}
if (_local6 >= 0) {
_root.addItemInfoTo(_global.INVENTORY, item);
_global.MAIN_HERO[slot] = null;
if ((slot == "WEAPON_PRI") && (_global.MAIN_HERO.WEAPON_SEC.rng == 0)) {
if (_global.MAIN_HERO.WEAPON_SEC.TYPE != "Shield") {
_global.MAIN_HERO.WEAPON_PRI = _global.MAIN_HERO.WEAPON_SEC;
} else {
_root.addItemTo(_global.INVENTORY, _global.MAIN_HERO.WEAPON_SEC);
}
_global.MAIN_HERO.WEAPON_SEC = null;
}
}
}
_parent._parent.inventoryShowUser();
_parent._parent.dragItemOff();
}
var slot = "NONE";
}
Symbol 3168 MovieClip [__Packages.Cities] Frame 0
class Cities extends MovieClip
{
var barracks_btn, hall_btn, temple_btn, barn_btn, harbor_btn, forge_btn, market_btn, city, gotoAndStop, name_txt, nation_mc, wnd, active_skills_arr, _ymouse, _xmouse, hint;
function Cities () {
super();
_root.saveGame("auto");
init();
barracks_btn.onRollOver = function () {
this._parent.hint.gotoAndStop("barracks");
};
hall_btn.onRollOver = function () {
this._parent.hint.gotoAndStop("hall");
};
temple_btn.onRollOver = function () {
this._parent.hint.gotoAndStop("temple");
};
barn_btn.onRollOver = function () {
this._parent.hint.gotoAndStop("barn");
};
harbor_btn.onRollOver = function () {
this._parent.hint.gotoAndStop("harbor");
};
forge_btn.onRollOver = function () {
this._parent.hint.gotoAndStop("forge");
};
market_btn.onRollOver = function () {
this._parent.hint.gotoAndStop("market");
};
forge_btn.onRollOut = (market_btn.onRollOut = (barracks_btn.onRollOut = (hall_btn.onRollOut = (temple_btn.onRollOut = (barn_btn.onRollOut = (harbor_btn.onRollOut = function () {
this._parent.hint.gotoAndStop("empty");
}))))));
}
function init() {
city = new Town(_global.CURR_TOWN);
if (_global.SAILING_SHIP) {
_global.SHIP_LOCATION = _global.CURR_TOWN;
_global.SAILING_SHIP = false;
}
gotoAndStop(getFrame(_global.CURR_TOWN));
name_txt.text = Town.getFullName(_global.CURR_TOWN);
nation_mc.gotoAndStop(Town.getNation(_global.CURR_TOWN));
var _local4 = Town.getLevel(_global.CURR_TOWN);
var _local3 = 1;
while (_local3 <= 8) {
this["star_" + _local3]._visible = true;
this["star_" + _local3].gotoAndStop(((_local3 <= _local4) ? "on" : "off"));
_local3++;
}
if ((!_global.IS_CAPTURED[city.ID]) && (_global.IS_HOSTILE[city.NATION])) {
wnd.gotoAndStop("enemy_at_gates");
disableAll();
} else {
wnd.gotoAndStop(1);
enableAll();
}
}
function getFrame(townID) {
return(((4 * (_root.getNationNumber(Town.getNation(townID)) - 1)) + (2 * (Town.hasHarbor(townID) ? 1 : 0))) + ((Town.getLevel(townID) < 6) ? 1 : 2));
}
function leaveTown() {
_root.gotoAndStop("WORLD_MAP");
}
function storeShowTrader() {
var _local2 = 0;
while (_local2 < 7) {
if ((scrollTrader + _local2) < city.forge.length) {
wnd["trader_" + _local2].setItem(city.forge[scrollTrader + _local2]);
wnd["trader_" + _local2]._visible = scrollTrader + _local2;
wnd["trader_" + _local2]._visible = true;
} else {
wnd["trader_" + _local2]._visible = false;
}
_local2++;
}
}
function storeShowUser() {
wnd.refine_anvil.setItem(wnd.refine_anvil.item);
wnd.refine_scroll.setItem(wnd.refine_scroll.item);
var _local3 = 0;
while (_local3 < 7) {
if ((scrollUser + _local3) < _global.INVENTORY.length) {
wnd["user_" + _local3].setItem(_global.INVENTORY[scrollUser + _local3]);
wnd["user_" + _local3].pos = scrollUser + _local3;
wnd["user_" + _local3]._visible = true;
} else {
wnd["user_" + _local3]._visible = false;
}
_local3++;
}
}
function barracksShowUser() {
var _local3 = 0;
while (_local3 < 10) {
wnd["army_" + _local3].setUnitClass(_global.FRIENDS[_local3]);
wnd["army_" + _local3].pos = _local3;
_local3++;
}
_local3 = 0;
while (_local3 < 8) {
wnd["reserve_" + _local3].setUnitClass(_global.FRIENDS[(_local3 + 10) + scrollUser]);
wnd["reserve_" + _local3].pos = (_local3 + 10) + scrollUser;
_local3++;
}
}
function barracksShowTrader() {
var _local2 = 0;
while (_local2 < 8) {
wnd["unit_" + _local2].setUnit(city.barracks[scrollTrader + _local2]);
wnd["unit_" + _local2].pos = scrollTrader + _local2;
_local2++;
}
}
function barnShowTrader() {
wnd.hero_ico.setHero(_global.MAIN_HERO);
var _local3 = 0;
while (_local3 < 8) {
wnd["unit_" + _local3].setHorse(city.barn[scrollTrader + _local3]);
wnd["unit_" + _local3].pos = scrollTrader + _local3;
_local3++;
}
wnd.money_txt.text = _global.GOLD + " gp.";
}
function inventoryShowUser() {
wnd.ARMOR_ico.setItem(_global.MAIN_HERO.ARMOR.getItemInfo());
wnd.HELMET_ico.setItem(_global.MAIN_HERO.HELMET.getItemInfo());
wnd.WEAPON_PRI_ico.setItem(_global.MAIN_HERO.WEAPON_PRI.getItemInfo());
wnd.WEAPON_SEC_ico.setItem(_global.MAIN_HERO.WEAPON_SEC.getItemInfo());
wnd.ARMOR_ico.slot = "ARMOR";
wnd.HELMET_ico.slot = "HELMET";
wnd.WEAPON_PRI_ico.slot = "WEAPON_PRI";
wnd.WEAPON_SEC_ico.slot = "WEAPON_SEC";
wnd.hero_ico.setHero(_global.MAIN_HERO);
var _local3 = 0;
while (_local3 < 6) {
if ((scrollUser + _local3) < _global.INVENTORY.length) {
wnd["user_" + _local3].setItem(_global.INVENTORY[scrollUser + _local3]);
wnd["user_" + _local3].pos = scrollUser + _local3;
wnd["user_" + _local3]._visible = true;
} else {
wnd["user_" + _local3]._visible = false;
}
_local3++;
}
}
function showStats() {
wnd.STR_txt.text = _global.MAIN_HERO.STR;
wnd.DEX_txt.text = _global.MAIN_HERO.DEX;
wnd.CON_txt.text = _global.MAIN_HERO.CON;
wnd.SPR_txt.text = _global.MAIN_HERO.SPR;
var _local12 = _global.MAIN_HERO.stat_points >= 2;
var _local4 = 0;
while (_local4 < 4) {
wnd["stat_btn_" + _local4]._visible = _local12;
_local4++;
}
if ((_global.MAIN_HERO.STR >= 100) || (_global.MAIN_HERO.STR >= (30 + (_global.MAIN_HERO.LEVEL * 1.8)))) {
wnd.stat_btn_0._visible = false;
}
if ((_global.MAIN_HERO.DEX >= 100) || (_global.MAIN_HERO.DEX >= (30 + (_global.MAIN_HERO.LEVEL * 1.8)))) {
wnd.stat_btn_1._visible = false;
}
if ((_global.MAIN_HERO.CON >= 100) || (_global.MAIN_HERO.CON >= (30 + (_global.MAIN_HERO.LEVEL * 1.8)))) {
wnd.stat_btn_2._visible = false;
}
if ((_global.MAIN_HERO.SPR >= 100) || (_global.MAIN_HERO.SPR >= (30 + (_global.MAIN_HERO.LEVEL * 1.8)))) {
wnd.stat_btn_3._visible = false;
}
wnd.stat_points_txt.text = _global.MAIN_HERO.stat_points;
wnd.skill_points_txt.text = _global.MAIN_HERO.skill_points;
_local12 = _global.MAIN_HERO.stat_points >= 1;
for (_local4 in _global.MAIN_HERO.SKILL) {
wnd[_local4 + "_txt"].text = _global.MAIN_HERO.SKILL[_local4];
wnd["skill_btn_" + _local4]._visible = (_global.MAIN_HERO.SKILL[_local4] < 100) && (_local12);
}
_local4 = 1;
delete active_skills_arr;
active_skills_arr = new Array();
for (var _local13 in _global.MAIN_HERO.ACTIVE_SKILLS) {
active_skills_arr.push(_local13);
wnd[("active_" + _local4) + "_txt"].text = Skill.getSkilltypeDescr(_local13);
var _local3 = 0;
while (_local3 < 3) {
var _local6 = wnd[(("active_" + _local4) + "_ico_") + (_local3 + 1)];
_local6.useHandCursor = false;
var _local8 = _global.MAIN_HERO.ACTIVE_SKILLS[_local13][_local3];
var _local5 = Skill.getSkillRequire(_local13, _local3 + 1);
if (_local3 == 0) {
var _local7 = 0;
} else {
var _local7 = _global.MAIN_HERO.ACTIVE_SKILLS[_local13][_local3 - 1];
wnd[((("active_" + _local4) + "_pre_") + (_local3 + 1)) + "_txt"].text = "Lv. " + _local5;
}
_local6.gotoAndStop(Skill.getActiveSkillFrame(_local13, _local3 + 1));
_local6.shade.gotoAndStop(((_local5 > _local7) ? 1 : 3));
_local6.amount_txt.text = ((_local8 <= 0) ? "" : (_local8));
_local3++;
}
_local4++;
}
_local4 = 0;
while (_local4 < 6) {
var _local11 = _global.MAIN_HERO.PASSIVE_SKILLS[_local4][0];
var _local8 = _global.MAIN_HERO.PASSIVE_SKILLS[_local4][1];
var _local10 = Math.floor(_local4 / 3) + 1;
var _local9 = (_local4 % 3) + 1;
var _local6 = wnd[(("passive_" + _local10) + "_ico_") + _local9];
_local6.useHandCursor = false;
_local6.gotoAndStop(Skill.getPassiveSkillFrame(_local11));
_local6.amount_txt.text = ((_local8 <= 0) ? "" : (_local8));
_local6.shade.gotoAndStop((((_local9 == 1) || (_global.MAIN_HERO.PASSIVE_SKILLS[_local4 - 1][1] > 0)) ? 3 : 1));
_local4++;
}
_local4 = 0;
while (_local4 < 3) {
var _local11 = _global.MAIN_HERO.AURA_SKILLS[_local4][0];
var _local8 = _global.MAIN_HERO.AURA_SKILLS[_local4][1];
var _local6 = wnd["aura_ico_" + (_local4 + 1)];
_local6.useHandCursor = false;
_local6.gotoAndStop(Aura.getFrame(_local11));
_local6.amount_txt.text = ((_local8 <= 0) ? "" : (_local8));
_local6.shade.gotoAndStop((((_local4 == 0) || (_global.MAIN_HERO.AURA_SKILLS[_local4 - 1][1] >= 5)) ? 3 : 1));
_local4++;
}
}
function harborShow() {
if (_global.SHIP_LOCATION == "none") {
wnd.quest_txt.text = ("You have no ship at this time. Would you like to by it? \n\nShips's price is " + _global.SHIP_PRICE) + " gp.";
} else {
wnd.quest_txt.text = "Hi, captain! Would you like to board your ship?";
}
}
function dragItemOn(item_info) {
wnd.attachMovie("ICON Mouse", "drag_item", 100, {_x:_xmouse, _y:_ymouse});
wnd.drag_item.startDrag(wnd.drag_item);
wnd.drag_item.gotoAndStop(item_info.getItem().getIconFrame());
}
function dragItemOff() {
wnd.drag_item.stopDrag();
wnd.drag_item.removeMovieClip();
}
function dragUnitOn(unit_mc) {
wnd.attachMovie((unit_mc.anim.unit_ref.HORSE ? "Horseman" : "Human"), "drag_item", 100, {_x:_xmouse, _y:_ymouse});
wnd.drag_item.initUnit(unit_mc.anim.unit_ref);
wnd.drag_item.light_circle._visible = false;
wnd.drag_item.startDrag(wnd.drag_item);
}
function dragUnitOff() {
wnd.drag_item.stopDrag();
wnd.drag_item.removeMovieClip();
}
function startBattleForCity() {
_global.BATTLE_TYPE = "SIEGE";
if (_global.SHIP_LOCATION != _global.CURR_TOWN) {
city.setBattleMap();
} else {
_global.BATTLE_MAP = 100 + _root.d(4);
}
city.getDefenders();
_global.IS_CAPTURED[_global.CURR_TOWN] = true;
if (city.NATION != _global.MAIN_HERO.NATION) {
_global.IS_HOSTILE[city.NATION] = true;
}
_root.gotoAndStop("SPLASH_SCREEN");
}
function startChallengeForCity(with_army) {
_global.BATTLE_TYPE = (with_army ? "ARMY_CHALLENGE" : "CHALLENGE");
city.setBattleMap();
_global.EVIL_HERO = Hero.getChampion(city.NATION, Town.getLevel(city.ID));
if (with_army) {
delete _global.ENEMIES;
_global.ENEMIES = new Array();
var _local4 = 0;
while (_local4 < 5) {
_global.ENEMIES.push(Unit.getMeleeMilitia(city.NATION, Town.getLevel(city.ID) - 1));
_local4++;
}
_local4 = 0;
while (_local4 < 5) {
_global.ENEMIES.push(Unit.getRangedMilitia(city.NATION, Town.getLevel(city.ID) - 1));
_local4++;
}
}
_root.gotoAndStop("SPLASH_SCREEN");
}
function enableAll() {
barracks_btn.enabled = true;
hall_btn.enabled = true;
temple_btn.enabled = true;
barn_btn.enabled = true;
harbor_btn.enabled = true;
forge_btn.enabled = true;
market_btn.enabled = true;
removeDescription();
}
function disableAll() {
barracks_btn.enabled = false;
hall_btn.enabled = false;
temple_btn.enabled = false;
barn_btn.enabled = false;
harbor_btn.enabled = false;
forge_btn.enabled = false;
market_btn.enabled = false;
hint.gotoAndStop("empty");
}
function openForge() {
disableAll();
scrollUser = 0;
wnd.gotoAndStop("forge");
wnd.money_txt.text = ("Money: " + _global.GOLD) + " gold";
}
function openMarketplace() {
disableAll();
scrollUser = 0;
scrollTrader = 0;
wnd.gotoAndStop("market");
wnd.money_txt.text = _global.GOLD + " gold";
}
function openTemple() {
disableAll();
scrollUser = 0;
scrollTrader = 0;
wnd.gotoAndStop("temple");
wnd.money_txt.text = _global.GOLD + " gold";
}
function openBarracks() {
disableAll();
wnd.gotoAndStop("barracks");
scrollUser = 0;
scrollTrader = 0;
wnd.money_txt.text = _global.GOLD + " gold";
if (_global.IS_CAPTURED[city.ID]) {
wnd.refuser._visible = false;
wnd.unit_scroll_l._visible = true;
wnd.unit_scroll_r._visible = true;
var _local3 = 0;
while (_local3 < 8) {
wnd["unit_" + _local3]._visible = true;
_local3++;
}
} else {
wnd.refuser._visible = true;
wnd.unit_scroll_l._visible = false;
wnd.unit_scroll_r._visible = false;
var _local3 = 0;
while (_local3 < 8) {
wnd["unit_" + _local3]._visible = false;
_local3++;
}
}
hideUnitDescription();
}
function openCityHall() {
disableAll();
if (!checkReward()) {
wnd.gotoAndStop("city_hall");
if (_global.IS_CAPTURED[city.ID]) {
wnd.capture_icon.gotoAndStop(2);
} else {
wnd.capture_icon.gotoAndStop(1);
}
}
}
function openBarn() {
scrollUser = 0;
scrollTrader = 0;
disableAll();
wnd.gotoAndStop("barn");
}
function openHeroStats() {
disableAll();
scrollUser = 0;
scrollTrader = 0;
wnd.gotoAndStop("inventory");
}
function openGetQuest() {
disableAll();
wnd.gotoAndStop("get_quest");
if (_root.dice(2) == 1) {
_global.QUEST.initQuestBattle(_global.CURR_TOWN);
wnd.quest_txt.text = ("Okay, wanderer. Hope you can deal with some rogues, right? \n\nWe'll pay you " + _global.QUEST.curr_gold) + " gp.";
} else {
_global.QUEST.initQuestFedEx(city.ID, city.NATION);
wnd.quest_txt.text = ((("We need to deliver a package to the city of " + WorldMap.getTownName(_global.QUEST.deliver_to)) + ". Will you go there?\nYou'll be paid for ") + _global.QUEST.curr_gold) + " gp. once you get to the city.";
}
}
function openCaptureTown() {
disableAll();
if (_global.IS_CAPTURED[city.ID]) {
wnd.gotoAndStop("city_ours");
} else {
wnd.gotoAndStop("wanna_fight");
}
}
function checkReward() {
var _local4 = 0;
var _local3 = 0;
while (_local3 < _global.QUEST.cities.length) {
if (_global.QUEST.cities[_local3] == city.ID) {
_local4 = _global.QUEST.rewards[_local3];
_global.QUEST.rewards.splice(_local3, 1);
_global.QUEST.cities.splice(_local3, 1);
break;
}
_local3++;
}
if (_local4 > 0) {
disableAll();
wnd.gotoAndStop("town_msg");
wnd.quest_txt.text = ("Nice job, wanderer. You've done it well!\n\nHere's your reward: " + _local4) + " gp.";
_global.GOLD = _global.GOLD + _local4;
return(true);
}
return(false);
}
function openHarbor() {
disableAll();
wnd.gotoAndStop("harbor");
harborShow();
}
function openStats() {
disableAll();
wnd.gotoAndStop("stats");
showStats();
}
function goBack() {
if (wnd.refine_anvil.item) {
_root.addItemInfoTo(_global.INVENTORY, wnd.refine_anvil.item);
}
if (wnd.refine_scroll.item) {
_root.addItemInfoTo(_global.INVENTORY, wnd.refine_scroll.item);
}
enableAll();
wnd.gotoAndStop(1);
}
function showActiveSkillDescription(raw, col) {
wnd.attachMovie("MouseHint", "mouse_hint", 90, {_x:_xmouse, _y:_ymouse});
wnd.mouse_hint.showSkillInfo(active_skills_arr[raw - 1], col);
}
function showPassiveSkillDescription(raw, col) {
wnd.attachMovie("MouseHint", "mouse_hint", 90, {_x:_xmouse, _y:_ymouse});
wnd.mouse_hint.showSkillInfo(_global.MAIN_HERO.PASSIVE_SKILLS[((raw - 1) * 3) + (col - 1)][0], 0);
}
function showAuraSkillDescription(col) {
wnd.attachMovie("MouseHint", "mouse_hint", 90, {_x:_xmouse, _y:_ymouse});
wnd.mouse_hint.showSkillInfo(_global.MAIN_HERO.AURA_SKILLS[col - 1][0], -1);
}
function showItemDescription(item_info) {
wnd.attachMovie("MouseHint", "mouse_hint", 90, {_x:_xmouse, _y:_ymouse});
wnd.mouse_hint.showItemInfo(item_info);
}
function showUnitDescription(unit_mc) {
wnd.unit_hint._visible = true;
wnd.unit_hint.showUnitInfo(unit_mc);
}
function showUnitSkillDescription(frame) {
wnd.attachMovie("MouseHint", "mouse_hint", 90, {_x:_xmouse, _y:_ymouse});
var _local2 = Skill.getSkillInfoByFrame(frame);
wnd.mouse_hint.showSkillInfo(_local2.nm, _local2.id);
}
function showSmallDescr(msg) {
wnd.attachMovie("MouseHint", "mouse_hint", 90, {_x:_xmouse, _y:_ymouse});
wnd.mouse_hint.showSmallDescr(msg);
}
function removeDescription() {
wnd.mouse_hint.removeMovieClip();
}
function hideUnitDescription() {
wnd.unit_hint._visible = false;
}
function addPointToActiveSkill(raw, col) {
if (_global.MAIN_HERO.skill_points == 0) {
return(undefined);
}
if (_global.MAIN_HERO.ACTIVE_SKILLS[active_skills_arr[raw - 1]][col - 1] == 5) {
return(undefined);
}
_global.MAIN_HERO.ACTIVE_SKILLS[active_skills_arr[raw - 1]][col - 1]++;
_global.MAIN_HERO.skill_points--;
showStats();
}
function addPointToPassiveSkill(raw, col) {
if (_global.MAIN_HERO.skill_points == 0) {
return(undefined);
}
if (_global.MAIN_HERO.PASSIVE_SKILLS[((raw - 1) * 3) + (col - 1)][1] == 5) {
return(undefined);
}
_global.MAIN_HERO.PASSIVE_SKILLS[((raw - 1) * 3) + (col - 1)][1]++;
_global.MAIN_HERO.skill_points--;
showStats();
}
function addPointToAuraSkill(col) {
if (_global.MAIN_HERO.skill_points == 0) {
return(undefined);
}
if (_global.MAIN_HERO.AURA_SKILLS[col - 1][1] == 5) {
return(undefined);
}
_global.MAIN_HERO.AURA_SKILLS[col - 1][1]++;
_global.MAIN_HERO.skill_points--;
showStats();
}
function forgeGetChance(curr_lv, need_lv) {
var _local2 = 100;
var _local1 = curr_lv;
while (_local1 < need_lv) {
_local2 = _local2 * (1 - (0.07 * _local1));
_local1++;
}
return(Math.ceil(_local2));
}
function forgeGetPrice(curr_lv, need_lv) {
return((need_lv - curr_lv) * 200);
}
function forgeRefine() {
if (!wnd.refine_anvil.item) {
return(null);
}
var _local5 = wnd.refine_anvil.item.REFINE;
var _local4 = Number(wnd.refine_lvl_txt.text);
if ((_local5 >= _local4) || (_local5 >= 10)) {
wnd.msg_txt.text = "Can't refine to that high level!";
return(undefined);
}
var _local7 = forgeGetChance(_local5, _local4);
var _local6 = forgeGetPrice(_local5, _local4);
if (_local6 > _global.GOLD) {
wnd.msg_txt.text = "Not enough gold!";
} else {
_global.GOLD = _global.GOLD - _local6;
wnd.money_txt.text = ("Money: " + _global.GOLD) + " gold";
if (_root.percent(_local7)) {
wnd.refine_anvil.item.REFINE = _local4;
wnd.refine_anvil.setItem(wnd.refine_anvil.item);
wnd.anvil_mc.gotoAndPlay("success");
wnd.refine_lvl_txt.text = _local4 + 1;
_root.kongregateStats.submit("MaxRefineRate", _local4);
} else {
wnd.refine_anvil.setItem(null);
wnd.anvil_mc.gotoAndPlay("failure");
wnd.refine_lvl_txt.text = "";
}
forgeUpdateData();
}
}
function forgeEnchant() {
if (!wnd.refine_anvil.item) {
return(undefined);
}
if (!wnd.refine_scroll.item) {
return(undefined);
}
if (wnd.refine_anvil.item.ENCH_ID) {
wnd.msg_txt.text = "The item is already refined!";
return(undefined);
}
wnd.refine_anvil.item.ENCH_ID = wnd.refine_scroll.item.ENCH_ID;
wnd.refine_anvil.setItem(wnd.refine_anvil.item);
wnd.refine_scroll.setItem(null);
}
function forgeUpdateData() {
if (wnd.refine_anvil.item) {
var _local2 = wnd.refine_anvil.item.REFINE;
var _local3 = Number(wnd.refine_lvl_txt.text);
var _local4 = forgeGetChance(_local2, _local3);
var _local5 = forgeGetPrice(_local2, _local3);
wnd.success_txt.text = ("Success chance: " + _local4) + "%\n";
wnd.success_txt.text = wnd.success_txt.text + (("Price: " + _local5) + " gold");
} else {
wnd.success_txt.text = "";
wnd.refine_lvl_txt.text = "";
}
}
function sellAll() {
var _local3 = 0;
while (_local3 < _global.INVENTORY.length) {
if ((!_global.INVENTORY[_local3].ENCH_ID) && (_global.INVENTORY[_local3].REFINE == 0)) {
var _local4 = _global.INVENTORY[_local3].getItem();
_global.GOLD = _global.GOLD + (Math.floor(_local4.price / 2) * _global.INVENTORY[_local3].COUNT);
_global.INVENTORY.splice(_local3, 1);
_local3--;
}
_local3++;
}
scrollUser = 0;
wnd.money_txt.text = ("Money: " + _global.GOLD) + " gold";
storeShowUser();
}
function addStatTo(stat) {
if ((_global.MAIN_HERO.stat_points >= 2) && (_global.MAIN_HERO[stat] < (30 + (_global.MAIN_HERO.LEVEL * 1.8)))) {
_global.MAIN_HERO[stat]++;
_global.MAIN_HERO.stat_points = _global.MAIN_HERO.stat_points - 2;
showStats();
}
}
var scrollTrader = 0;
var scrollUser = 0;
}
Symbol 3169 MovieClip [__Packages.Town] Frame 0
class Town extends Object
{
var barracks, forge, barn, defenders, adv_defenders, ID, NATION, NAME;
function Town (townID) {
super();
barracks = new Array();
forge = new Array();
barn = new Array();
defenders = new Array();
adv_defenders = new Array();
ID = townID;
NATION = getNation(townID);
NAME = WorldMap.getTownName(townID);
this["Town" + townID]();
var _local3 = getLevel(ID);
addArmorToStore(_local3);
if (_local3 > 2) {
addUnitToBarracks("caster", 1);
}
if (_local3 > 4) {
addUnitToBarracks("caster", 2);
}
barn.push(new Horse("any", 10 * _local3, Math.floor(_local3 / 2), 2 + Math.floor(_local3 / 2), 1000 * _local3));
barn.push(new Horse("any", 20 * _local3, Math.floor(_local3 / 1.7), Math.floor(_local3 / 2), (750 * _local3) * _local3));
barn.push(new Horse("black", 75 * _local3, Math.floor(_local3 * 1.1), 1, (2000 * _local3) * _local3));
barn.push(new Horse("white", 50 * _local3, Math.floor(_local3 * 0.6), _local3, (1900 * _local3) * _local3));
}
function getDefenders() {
delete _global.ENEMIES;
_global.ENEMIES = new Array();
var _local4 = 0;
while (_local4 < defenders.length) {
var _local3 = 0;
while (_local3 < defenders[_local4].COUNT) {
_global.ENEMIES.push(defenders[_local4].getUnit());
_local3++;
}
_local4++;
}
}
function getAdvDefenders() {
delete _global.ENEMIES;
_global.ENEMIES = new Array();
var _local5 = 0;
while (_local5 < adv_defenders.length) {
var _local4 = 0;
while (_local4 < adv_defenders[_local5].COUNT) {
_global.ENEMIES.push(adv_defenders[_local5].getUnit());
_local4++;
}
_local5++;
}
var _local6 = getLevel(ID);
if ((((_local6 == 6) && (_root.percent(25))) || ((_local6 == 7) && (_root.percent(50)))) || (_local6 == 8)) {
_global.EVIL_HERO = new Hero();
_global.EVIL_HERO[("enemy" + NATION) + "King"]();
}
}
function setBattleMap() {
switch (ID) {
case "Caesarea" :
case "Veii" :
case "Palmyra" :
_global.BATTLE_MAP = 16;
break;
case "Tyrus" :
case "Artaxata" :
case "Seleucia" :
case "Treveri" :
case "Curia" :
_global.BATTLE_MAP = 20;
break;
case "Grobben" :
case "Torburg" :
case "Dortmund" :
_global.BATTLE_MAP = 0;
break;
case "Odense" :
case "Holmgard" :
case "Skara" :
case "Lunde" :
case "Risby" :
_global.BATTLE_MAP = 4;
break;
case "RaGorod" :
case "Zlatograd" :
case "Dobrov" :
_global.BATTLE_MAP = 8;
break;
case "Grouzeno" :
case "Krasnodolye" :
case "Svetlolesye" :
case "Staroe" :
case "Elki" :
_global.BATTLE_MAP = 12;
break;
case "Nagoya" :
case "Izumo" :
case "Matsuyama" :
_global.BATTLE_MAP = 24;
break;
case "Omi" :
case "Echigo" :
case "Sapporo" :
case "Suo" :
case "Nara" :
_global.BATTLE_MAP = 28;
break;
case "Cardiff" :
case "Armagh" :
case "Kells" :
_global.BATTLE_MAP = 32;
break;
case "Iona" :
case "Tara" :
case "Swansea" :
case "Llanelli" :
case "Neath" :
_global.BATTLE_MAP = 36;
break;
case "Tiflis" :
case "Medina" :
case "Mosul" :
_global.BATTLE_MAP = 40;
break;
case "Samarra" :
case "Mahdia" :
case "Shiraz" :
case "Rabat" :
case "Aden" :
_global.BATTLE_MAP = 44;
}
_global.BATTLE_MAP = _global.BATTLE_MAP + _root.d(4);
}
static function getNation(townID) {
switch (townID) {
case "Caesarea" :
case "Veii" :
case "Palmyra" :
case "Tyrus" :
case "Artaxata" :
case "Seleucia" :
case "Treveri" :
case "Curia" :
return("Viz");
case "Grobben" :
case "Torburg" :
case "Dortmund" :
case "Odense" :
case "Holmgard" :
case "Skara" :
case "Lunde" :
case "Risby" :
return("Ger");
case "RaGorod" :
case "Zlatograd" :
case "Dobrov" :
case "Grouzeno" :
case "Krasnodolye" :
case "Svetlolesye" :
case "Staroe" :
case "Elki" :
return("Rus");
case "Nagoya" :
case "Izumo" :
case "Matsuyama" :
case "Omi" :
case "Echigo" :
case "Sapporo" :
case "Suo" :
case "Nara" :
return("Jap");
case "Cardiff" :
case "Armagh" :
case "Kells" :
case "Iona" :
case "Tara" :
case "Swansea" :
case "Llanelli" :
case "Neath" :
return("Mon");
case "Tiflis" :
case "Medina" :
case "Mosul" :
case "Samarra" :
case "Mahdia" :
case "Shiraz" :
case "Rabat" :
case "Aden" :
return("Ara");
}
}
static function getFullName(townID) {
switch (townID) {
case "Caesarea" :
return("Glorious city of Caesarea, capital of Great Trade Republic");
case "Veii" :
return("Amazing city of Veii, Republic's culture center");
case "Palmyra" :
return("Great town of Palmyra, the Republic's east port");
case "Tyrus" :
return("Town of Tyrus, Republic's north outpost");
case "Artaxata" :
return("Big trade camp of Artaxata");
case "Seleucia" :
return("Trade camp of Seleucia");
case "Treveri" :
return("Small harbor of Treveri");
case "Curia" :
return("Tiny camp of Curia");
case "Grobben" :
return("Glorious city of Grobben, capital of the Order");
case "Torburg" :
return("Great city of Torburg, Order's trade center");
case "Dortmund" :
return("Nothen town of Dortmund, Order's keep");
case "Odense" :
return("Trade town of Odense");
case "Holmgard" :
return("Town of Holmgard, mountain guard post");
case "Skara" :
return("Village of Skara, east guard post");
case "Lunde" :
return("Small village of Lunde, south guard post");
case "Risby" :
return("Tiny village of Risby");
case "RaGorod" :
return("Glorious city of RaGorod, capital of Forest Lands");
case "Zlatograd" :
return("Great city of Zlatograd, Lands' trade center");
case "Dobrov" :
return("Town of Dobrov, Lands' west keep");
case "Grouzeno" :
return("Huge Village of Grouzeno, Lands' east keep");
case "Krasnodolye" :
return("Big village of Krasnodolye");
case "Svetlolesye" :
return("Village of Svetlolesye, Lands' east harbor");
case "Staroe" :
return("Small village of Staroe");
case "Elki" :
return("Tiny fisher village of Elki");
case "Nagoya" :
return("Glorious city of Nagoya, capital of East Empire");
case "Izumo" :
return("Great City of Izumo, Empire trade center");
case "Matsuyama" :
return("City of Matsuyama, ninja training center");
case "Omi" :
return("Small town of Omi, Empire's martial arts center");
case "Echigo" :
return("Big Village of Echigo, Empire's soth harbor");
case "Sapporo" :
return("Village of Sapporo, Empire's north harbor");
case "Suo" :
return("Small village of Suo");
case "Nara" :
return("Tiny fisher village of Nara");
case "Cardiff" :
return("Glorious camp of Cardiff, capital of Black Horde");
case "Armagh" :
return("Large camp of Armagh, Horde's main harbor");
case "Kells" :
return("Large trading camp of Kells");
case "Iona" :
return("Camp of Iona, Horde's east keep");
case "Tara" :
return("Camp of Tara, Horde's training center");
case "Swansea" :
return("Camp of Swansea, Horde's harbor");
case "Llanelli" :
return("Small fisher village of Llanelli");
case "Neath" :
return("Tiny camp of Neath, Horde's north outpost");
case "Tiflis" :
return("Glorious city of Tiflis, capital of South Desert");
case "Medina" :
return("Amazing city of Medina, South Desert's culture center");
case "Mosul" :
return("Great town of Mosul, assassin's academy");
case "Samarra" :
return("Harbor town of Samarra");
case "Mahdia" :
return("Oasis of Mahdia, South Desert's trading outpost");
case "Shiraz" :
return("Village of Shiraz, small oasis lost in sands");
case "Rabat" :
return("Small harbor of Rabat");
case "Aden" :
return("Tiny desert village of Aden");
}
}
static function hasHarbor(townID) {
switch (townID) {
case "Veii" :
case "Palmyra" :
case "Artaxata" :
case "Treveri" :
case "Zlatograd" :
case "Krasnodolye" :
case "Svetlolesye" :
case "Staroe" :
case "Elki" :
case "Nagoya" :
case "Izumo" :
case "Matsuyama" :
case "Omi" :
case "Echigo" :
case "Sapporo" :
case "Suo" :
case "Nara" :
case "Armagh" :
case "Tara" :
case "Swansea" :
case "Llanelli" :
case "Neath" :
case "Medina" :
case "Mosul" :
case "Samarra" :
case "Rabat" :
return(true);
}
return(false);
}
static function getLevel(townID) {
switch (townID) {
case "Caesarea" :
case "Grobben" :
case "RaGorod" :
case "Nagoya" :
case "Cardiff" :
case "Tiflis" :
return(8);
case "Veii" :
case "Torburg" :
case "Zlatograd" :
case "Izumo" :
case "Armagh" :
case "Medina" :
return(7);
case "Palmyra" :
case "Dortmund" :
case "Dobrov" :
case "Matsuyama" :
case "Kells" :
case "Mosul" :
return(6);
case "Tyrus" :
case "Odense" :
case "Grouzeno" :
case "Omi" :
case "Iona" :
case "Samarra" :
return(5);
case "Artaxata" :
case "Holmgard" :
case "Krasnodolye" :
case "Echigo" :
case "Tara" :
case "Mahdia" :
return(4);
case "Seleucia" :
case "Skara" :
case "Svetlolesye" :
case "Sapporo" :
case "Swansea" :
case "Shiraz" :
return(3);
case "Treveri" :
case "Lunde" :
case "Staroe" :
case "Suo" :
case "Llanelli" :
case "Rabat" :
return(2);
case "Curia" :
case "Risby" :
case "Elki" :
case "Nara" :
case "Neath" :
case "Aden" :
return(1);
}
}
function addUnitToBarracks(tp, id) {
barracks.push(new UnitInfo(getNation(ID), tp, id));
}
function addWeaponsToStore(arr, lv) {
var _local2 = 0;
while (_local2 < arr.length) {
forge.push(new ItemInfo("WeaponClass", arr[_local2], getNation(ID), lv));
_local2++;
}
}
function addArmorToStore(lv) {
forge.push(new ItemInfo("Armor", "Clothes", getNation(ID), lv));
forge.push(new ItemInfo("Armor", "Helmet", getNation(ID), lv));
}
function addDefenders(tp, id, am) {
defenders.push(new UnitInfo(getNation(ID), tp, id, am));
}
function addAdvDefenders(tp, id, am) {
adv_defenders.push(new UnitInfo(getNation(ID), tp, id, am));
}
function TownCaesarea() {
addUnitToBarracks("2H_sword", 7);
addUnitToBarracks("shield", 7);
addUnitToBarracks("throwing", 2);
addUnitToBarracks("bow", 6);
addUnitToBarracks("crossbow", 6);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Dagger"], 7);
addWeaponsToStore(["OnehandedAxe", "OnehandedMace", "TwohandedAxe", "TwohandedMace"], 6);
addWeaponsToStore(["Spear"], 5);
addWeaponsToStore(["Throwing"], 2);
addWeaponsToStore(["Bow", "Crossbow", "Shield"], 4);
addDefenders("shield", 7, 5);
addDefenders("bow", 6, 5);
addDefenders("2H_sword", 7, 5);
addDefenders("crossbow", 6, 5);
addDefenders("shield", 7, 5);
addDefenders("dagger", 6, 5);
addDefenders("bow", 6, 5);
addDefenders("2H_sword", 7, 5);
addAdvDefenders("2H_sword", 7, 5);
addAdvDefenders("crossbow", 6, 4);
}
function TownVeii() {
addUnitToBarracks("2H_sword", 6);
addUnitToBarracks("dagger", 6);
addUnitToBarracks("throwing", 2);
addUnitToBarracks("bow", 6);
addUnitToBarracks("crossbow", 6);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "OnehandedAxe", "TwohandedAxe", "OnehandedMace", "TwohandedMace", "Dagger"], 6);
addWeaponsToStore(["Spear"], 5);
addWeaponsToStore(["Bow", "Crossbow", "Shield"], 4);
addDefenders("2H_sword", 6, 5);
addDefenders("bow", 6, 5);
addDefenders("dual", 5, 10);
addDefenders("crossbow", 6, 5);
addDefenders("dagger", 6, 5);
addDefenders("bow", 6, 5);
addAdvDefenders("2H_sword", 7, 5);
addAdvDefenders("bow", 6, 5);
}
function TownPalmyra() {
addUnitToBarracks("2H_sword", 5);
addUnitToBarracks("dual", 5);
addUnitToBarracks("spear", 5);
addUnitToBarracks("throwing", 0);
addUnitToBarracks("bow", 4);
addUnitToBarracks("crossbow", 4);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "OnehandedAxe", "TwohandedAxe", "OnehandedMace", "TwohandedMace", "Dagger"], 5);
addWeaponsToStore(["Spear", "Bow", "Crossbow", "Shield"], 4);
addDefenders("spear", 5, 5);
addDefenders("bow", 4, 5);
addDefenders("2H_sword", 5, 5);
addDefenders("crossbow", 4, 5);
addDefenders("dual", 5, 5);
addDefenders("bow", 4, 5);
addAdvDefenders("2H_sword", 6, 5);
addAdvDefenders("bow", 4, 5);
}
function TownTyrus() {
addUnitToBarracks("shield", 4);
addUnitToBarracks("spear", 4);
addUnitToBarracks("bow", 4);
addUnitToBarracks("crossbow", 4);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "OnehandedAxe", "TwohandedAxe", "OnehandedMace", "TwohandedMace", "Dagger"], 4);
addWeaponsToStore(["Spear", "Bow", "Crossbow", "Shield"], 3);
addDefenders("shield", 4, 5);
addDefenders("bow", 4, 5);
addDefenders("spear", 4, 5);
addDefenders("crossbow", 4, 5);
addDefenders("dagger", 3, 5);
addDefenders("crossbow", 4, 5);
}
function TownArtaxata() {
addUnitToBarracks("shield", 3);
addUnitToBarracks("spear", 3);
addUnitToBarracks("dagger", 3);
addUnitToBarracks("bow", 2);
addUnitToBarracks("crossbow", 2);
addWeaponsToStore(["Spear"], 2);
addWeaponsToStore(["OnehandedSword", "OnehandedAxe", "OnehandedMace", "TwohandedSword", "TwohandedAxe", "TwohandedMace", "Dagger", "Bow", "Crossbow", "Shield"], 3);
addDefenders("shield", 3, 5);
addDefenders("bow", 2, 5);
addDefenders("spear", 3, 5);
addDefenders("crossbow", 2, 5);
addDefenders("dagger", 3, 5);
addDefenders("crossbow", 2, 5);
}
function TownSeleucia() {
addUnitToBarracks("dagger", 3);
addUnitToBarracks("2H_axe", 2);
addUnitToBarracks("dual", 2);
addUnitToBarracks("spear", 1);
addUnitToBarracks("bow", 2);
addUnitToBarracks("crossbow", 2);
addWeaponsToStore(["OnehandedSword", "TwohandedSword"], 3);
addWeaponsToStore(["OnehandedAxe", "TwohandedAxe", "TwohandedMace", "OnehandedMace", "Spear", "Dagger", "Bow", "Crossbow", "Shield"], 2);
addDefenders("2H_axe", 2, 5);
addDefenders("bow", 2, 5);
addDefenders("dual", 2, 5);
addDefenders("crossbow", 2, 5);
addDefenders("dagger", 3, 2);
}
function TownTreveri() {
addUnitToBarracks("2H_axe", 2);
addUnitToBarracks("dagger", 3);
addUnitToBarracks("shield", 0);
addUnitToBarracks("spear", 1);
addUnitToBarracks("bow", 0);
addUnitToBarracks("crossbow", 0);
addWeaponsToStore(["Spear"], 1);
addWeaponsToStore(["OnehandedSword", "OnehandedAxe", "OnehandedMace", "TwohandedSword", "TwohandedAxe", "TwohandedMace", "Dagger", "Bow", "Crossbow", "Shield"], 2);
addDefenders("shield", 0, 5);
addDefenders("bow", 0, 5);
addDefenders("spear", 1, 4);
addDefenders("crossbow", 0, 4);
addDefenders("2H_axe", 2, 2);
}
function TownCuria() {
addUnitToBarracks("shield", 0);
addUnitToBarracks("bow", 0);
addUnitToBarracks("crossbow", 0);
addWeaponsToStore(["OnehandedSword", "OnehandedAxe", "OnehandedMace", "TwohandedSword", "TwohandedAxe", "TwohandedMace", "Dagger", "Bow", "Crossbow", "Shield"], 1);
addDefenders("shield", 0, 5);
addDefenders("bow", 0, 5);
addDefenders("spear", 1, 5);
addDefenders("bow", 0, 5);
}
function TownGrobben() {
addUnitToBarracks("2H_sword", 7);
addUnitToBarracks("spear", 7);
addUnitToBarracks("shield", 6);
addUnitToBarracks("2H_axe", 6);
addUnitToBarracks("throwing", 5);
addUnitToBarracks("crossbow", 6);
addWeaponsToStore(["OnehandedSword", "TwohandedSword"], 7);
addWeaponsToStore(["OnehandedAxe", "OnehandedMace", "TwohandedAxe", "TwohandedMace", "Throwing"], 6);
addWeaponsToStore(["Bow", "Crossbow", "Shield"], 4);
addDefenders("2H_axe", 6, 5);
addDefenders("spear", 7, 5);
addDefenders("crossbow", 6, 5);
addDefenders("2H_sword", 7, 10);
addDefenders("crossbow", 6, 5);
addAdvDefenders("2H_sword", 7, 5);
addAdvDefenders("spear", 7, 5);
}
function TownTorburg() {
addUnitToBarracks("shield", 6);
addUnitToBarracks("2H_axe", 6);
addUnitToBarracks("spear", 4);
addUnitToBarracks("throwing", 5);
addUnitToBarracks("crossbow", 6);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Throwing"], 6);
addWeaponsToStore(["OnehandedAxe", "OnehandedMace", "TwohandedAxe", "TwohandedMace"], 6);
addWeaponsToStore(["Bow", "Crossbow", "Shield"], 4);
addDefenders("shield", 6, 5);
addDefenders("crossbow", 6, 5);
addDefenders("shield", 5, 5);
addDefenders("crossbow", 6, 5);
addDefenders("2H_axe", 6, 5);
addDefenders("crossbow", 6, 5);
addAdvDefenders("2H_sword", 7, 5);
addDefenders("crossbow", 6, 5);
}
function TownDortmund() {
addUnitToBarracks("shield", 5);
addUnitToBarracks("2H_sword", 4);
addUnitToBarracks("spear", 4);
addUnitToBarracks("dual", 4);
addUnitToBarracks("throwing", 5);
addUnitToBarracks("bow", 3);
addUnitToBarracks("crossbow", 4);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Throwing"], 5);
addWeaponsToStore(["OnehandedAxe", "OnehandedMace", "TwohandedAxe", "TwohandedMace"], 5);
addWeaponsToStore(["Bow", "Crossbow", "Shield"], 3);
addDefenders("shield", 5, 5);
addDefenders("spear", 4, 5);
addDefenders("crossbow", 4, 5);
addDefenders("2H_sword", 4, 5);
addDefenders("throwing", 5, 5);
addDefenders("dual", 4, 5);
addAdvDefenders("shield", 6, 5);
addAdvDefenders("throwing", 5, 5);
}
function TownOdense() {
addUnitToBarracks("2H_sword", 4);
addUnitToBarracks("spear", 4);
addUnitToBarracks("dual", 4);
addUnitToBarracks("throwing", 3);
addUnitToBarracks("bow", 3);
addUnitToBarracks("crossbow", 4);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Throwing"], 4);
addWeaponsToStore(["OnehandedAxe", "OnehandedMace", "TwohandedAxe", "TwohandedMace"], 4);
addWeaponsToStore(["Bow", "Crossbow", "Shield"], 3);
addDefenders("spear", 4, 5);
addDefenders("crossbow", 4, 5);
addDefenders("2H_sword", 4, 5);
addDefenders("crossbow", 4, 5);
addDefenders("dual", 4, 5);
}
function TownHolmgard() {
addUnitToBarracks("shield", 3);
addUnitToBarracks("spear", 3);
addUnitToBarracks("throwing", 3);
addUnitToBarracks("bow", 3);
addUnitToBarracks("crossbow", 2);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Throwing"], 3);
addWeaponsToStore(["OnehandedAxe", "OnehandedMace", "TwohandedAxe", "TwohandedMace"], 4);
addWeaponsToStore(["Bow", "Crossbow", "Shield"], 2);
addDefenders("spear", 3, 5);
addDefenders("bow", 3, 5);
addDefenders("shield", 3, 5);
addDefenders("throwing", 3, 5);
addDefenders("spear", 2, 5);
}
function TownSkara() {
addUnitToBarracks("shield", 2);
addUnitToBarracks("2H_axe", 2);
addUnitToBarracks("spear", 2);
addUnitToBarracks("throwing", 1);
addUnitToBarracks("bow", 1);
addUnitToBarracks("crossbow", 2);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Throwing"], 2);
addWeaponsToStore(["OnehandedAxe", "OnehandedMace", "TwohandedAxe", "TwohandedMace"], 3);
addWeaponsToStore(["Bow", "Crossbow", "Shield"], 2);
addDefenders("spear", 2, 5);
addDefenders("crossbow", 2, 5);
addDefenders("shield", 2, 5);
addDefenders("crossbow", 2, 5);
addDefenders("2H_axe", 2, 5);
}
function TownLunde() {
addUnitToBarracks("shield", 1);
addUnitToBarracks("2H_axe", 1);
addUnitToBarracks("throwing", 1);
addUnitToBarracks("bow", 1);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Throwing"], 2);
addWeaponsToStore(["OnehandedAxe", "OnehandedMace", "TwohandedAxe", "TwohandedMace"], 2);
addWeaponsToStore(["Bow", "Crossbow", "Shield"], 1);
addDefenders("2H_sword", 0, 5);
addDefenders("bow", 1, 5);
addDefenders("shield", 1, 5);
addDefenders("throwing", 1, 5);
addDefenders("2H_axe", 1, 5);
}
function TownRisby() {
addUnitToBarracks("2H_sword", 0);
addUnitToBarracks("bow", 1);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Throwing"], 1);
addWeaponsToStore(["OnehandedAxe", "OnehandedMace", "TwohandedAxe", "TwohandedMace"], 1);
addWeaponsToStore(["Bow", "Crossbow", "Shield"], 1);
addDefenders("2H_sword", 0, 5);
addDefenders("bow", 1, 5);
addDefenders("shield", 1, 5);
addDefenders("throwing", 1, 5);
addDefenders("2H_axe", 1, 5);
}
function TownRaGorod() {
addUnitToBarracks("2H_sword", 7);
addUnitToBarracks("2H_axe", 7);
addUnitToBarracks("spear", 5);
addUnitToBarracks("dual", 5);
addUnitToBarracks("bow", 6);
addUnitToBarracks("throwing", 5);
addWeaponsToStore(["OnehandedSword", "TwohandedSword"], 7);
addWeaponsToStore(["OnehandedAxe", "OnehandedMace", "TwohandedAxe", "TwohandedMace", "Throwing"], 6);
addWeaponsToStore(["Bow", "Crossbow", "Shield"], 4);
addDefenders("2H_axe", 7, 5);
addDefenders("2H_sword", 7, 5);
addDefenders("bow", 6, 5);
addDefenders("2H_sword", 7, 5);
addDefenders("bow", 6, 5);
addDefenders("2H_axe", 7, 5);
addDefenders("bow", 6, 5);
addAdvDefenders("2H_axe", 7, 10);
addAdvDefenders("2H_sword", 7, 5);
}
function TownZlatograd() {
addUnitToBarracks("2H_axe", 6);
addUnitToBarracks("spear", 5);
addUnitToBarracks("dual", 5);
addUnitToBarracks("bow", 6);
addUnitToBarracks("throwing", 5);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Throwing"], 6);
addWeaponsToStore(["OnehandedAxe", "OnehandedMace", "TwohandedAxe", "TwohandedMace"], 6);
addWeaponsToStore(["Bow", "Crossbow", "Shield"], 4);
addDefenders("2H_axe", 6, 5);
addDefenders("bow", 6, 5);
addDefenders("2H_axe", 6, 5);
addDefenders("bow", 6, 5);
addDefenders("dual", 5, 5);
addDefenders("bow", 6, 5);
addAdvDefenders("2H_sword", 7, 5);
addAdvDefenders("bow", 4, 5);
}
function TownDobrov() {
addUnitToBarracks("shield", 4);
addUnitToBarracks("spear", 5);
addUnitToBarracks("dual", 5);
addUnitToBarracks("bow", 4);
addUnitToBarracks("throwing", 5);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Throwing"], 5);
addWeaponsToStore(["OnehandedAxe", "OnehandedMace", "TwohandedAxe", "TwohandedMace"], 5);
addWeaponsToStore(["Bow", "Crossbow", "Shield"], 3);
addDefenders("spear", 5, 5);
addDefenders("throwing", 5, 5);
addDefenders("dual", 5, 5);
addDefenders("throwing", 5, 5);
addDefenders("dual", 5, 5);
addDefenders("throwing", 5, 5);
addAdvDefenders("2H_axe", 6, 5);
addAdvDefenders("bow", 6, 5);
}
function TownGrouzeno() {
addUnitToBarracks("shield", 4);
addUnitToBarracks("spear", 4);
addUnitToBarracks("bow", 4);
addUnitToBarracks("throwing", 3);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Throwing"], 4);
addWeaponsToStore(["OnehandedAxe", "OnehandedMace", "TwohandedAxe", "TwohandedMace"], 4);
addWeaponsToStore(["Bow", "Crossbow", "Shield"], 3);
addDefenders("spear", 4, 5);
addDefenders("shield", 4, 5);
addDefenders("bow", 4, 5);
addDefenders("spear", 4, 5);
addDefenders("bow", 4, 5);
addDefenders("shield", 4, 5);
}
function TownKrasnodolye() {
addUnitToBarracks("shield", 3);
addUnitToBarracks("dual", 3);
addUnitToBarracks("crossbow", 1);
addUnitToBarracks("bow", 2);
addUnitToBarracks("throwing", 3);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Throwing"], 3);
addWeaponsToStore(["OnehandedAxe", "OnehandedMace", "TwohandedAxe", "TwohandedMace"], 4);
addWeaponsToStore(["Bow", "Crossbow", "Shield"], 2);
addDefenders("shield", 3, 5);
addDefenders("throwing", 3, 5);
addDefenders("dual", 3, 5);
addDefenders("throwing", 3, 5);
addDefenders("dual", 3, 5);
}
function TownSvetlolesye() {
addUnitToBarracks("shield", 2);
addUnitToBarracks("2H_axe", 1);
addUnitToBarracks("crossbow", 1);
addUnitToBarracks("bow", 2);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Throwing"], 2);
addWeaponsToStore(["OnehandedAxe", "OnehandedMace", "TwohandedAxe", "TwohandedMace"], 3);
addWeaponsToStore(["Bow", "Crossbow", "Shield"], 2);
addDefenders("shield", 2, 5);
addDefenders("bow", 2, 5);
addDefenders("shield", 2, 5);
addDefenders("bow", 2, 5);
addDefenders("shield", 2, 5);
addDefenders("bow", 2, 5);
}
function TownStaroe() {
addUnitToBarracks("2H_sword", 0);
addUnitToBarracks("2H_axe", 0);
addUnitToBarracks("2H_axe", 1);
addUnitToBarracks("crossbow", 1);
addUnitToBarracks("bow", 2);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Throwing"], 2);
addWeaponsToStore(["OnehandedAxe", "OnehandedMace", "TwohandedAxe", "TwohandedMace"], 2);
addWeaponsToStore(["Bow", "Crossbow", "Shield"], 1);
addDefenders("2H_sword", 0, 10);
addDefenders("crossbow", 1, 5);
addDefenders("2H_axe", 0, 5);
addDefenders("crossbow", 1, 5);
addDefenders("2H_axe", 1, 5);
}
function TownElki() {
addUnitToBarracks("2H_sword", 0);
addUnitToBarracks("2H_axe", 0);
addUnitToBarracks("bow", 2);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Throwing"], 1);
addWeaponsToStore(["OnehandedAxe", "OnehandedMace", "TwohandedAxe", "TwohandedMace"], 1);
addWeaponsToStore(["Bow", "Crossbow", "Shield"], 1);
addDefenders("2H_sword", 0, 10);
addDefenders("crossbow", 1, 5);
addDefenders("2H_axe", 0, 5);
addDefenders("crossbow", 1, 5);
addDefenders("2H_axe", 1, 5);
}
function TownNagoya() {
addUnitToBarracks("katana", 7);
addUnitToBarracks("katana", 8);
addUnitToBarracks("dual", 5);
addUnitToBarracks("staff", 6);
addUnitToBarracks("bow", 5);
addUnitToBarracks("throwing", 7);
addWeaponsToStore(["Katana", "NinjaTo", "Staff"], 8);
addWeaponsToStore(["Throwing"], 7);
addWeaponsToStore(["Bow"], 4);
addDefenders("katana", 7, 5);
addDefenders("throwing", 7, 5);
addDefenders("staff", 6, 5);
addDefenders("throwing", 7, 5);
addDefenders("staff", 6, 15);
addDefenders("katana", 7, 5);
addAdvDefenders("katana", 8, 9);
}
function TownIzumo() {
addUnitToBarracks("katana", 6);
addUnitToBarracks("dual", 5);
addUnitToBarracks("staff", 6);
addUnitToBarracks("bow", 5);
addUnitToBarracks("throwing", 6);
addWeaponsToStore(["Katana", "NinjaTo", "Staff"], 7);
addWeaponsToStore(["Throwing"], 6);
addWeaponsToStore(["Bow"], 4);
addDefenders("katana", 6, 5);
addDefenders("throwing", 6, 5);
addDefenders("staff", 6, 5);
addDefenders("throwing", 6, 5);
addDefenders("katana", 6, 5);
addDefenders("staff", 6, 5);
addAdvDefenders("katana", 7, 5);
addAdvDefenders("throwing", 6, 5);
}
function TownMatsuyama() {
addUnitToBarracks("katana", 5);
addUnitToBarracks("dual", 5);
addUnitToBarracks("staff", 5);
addUnitToBarracks("bow", 5);
addUnitToBarracks("throwing", 4);
addWeaponsToStore(["Katana", "NinjaTo", "Staff"], 6);
addWeaponsToStore(["Throwing"], 5);
addWeaponsToStore(["Bow"], 3);
addDefenders("katana", 5, 5);
addDefenders("bow", 5, 5);
addDefenders("dual", 5, 5);
addDefenders("bow", 5, 5);
addDefenders("staff", 5, 5);
addAdvDefenders("katana", 6, 5);
}
function TownOmi() {
addUnitToBarracks("katana", 4);
addUnitToBarracks("dual", 4);
addUnitToBarracks("staff", 4);
addUnitToBarracks("bow", 3);
addUnitToBarracks("throwing", 4);
addWeaponsToStore(["Katana", "NinjaTo", "Staff"], 5);
addWeaponsToStore(["Throwing"], 5);
addWeaponsToStore(["Bow"], 3);
addDefenders("katana", 4, 5);
addDefenders("throwing", 4, 5);
addDefenders("dual", 4, 5);
addDefenders("throwing", 4, 5);
addDefenders("staff", 4, 5);
}
function TownEchigo() {
addUnitToBarracks("katana", 3);
addUnitToBarracks("dual", 3);
addUnitToBarracks("staff", 3);
addUnitToBarracks("bow", 3);
addUnitToBarracks("throwing", 3);
addWeaponsToStore(["Katana", "NinjaTo", "Staff"], 4);
addWeaponsToStore(["Throwing"], 4);
addWeaponsToStore(["Bow"], 2);
addDefenders("katana", 3, 3);
addDefenders("bow", 3, 3);
addDefenders("dual", 3, 4);
addDefenders("throwing", 3, 5);
addDefenders("staff", 3, 5);
}
function TownSapporo() {
addUnitToBarracks("katana", 2);
addUnitToBarracks("staff", 2);
addUnitToBarracks("bow", 2);
addUnitToBarracks("throwing", 1);
addWeaponsToStore(["Katana", "NinjaTo", "Staff"], 3);
addWeaponsToStore(["Throwing"], 3);
addWeaponsToStore(["Bow"], 2);
addDefenders("katana", 2, 5);
addDefenders("throwing", 1, 5);
addDefenders("staff", 2, 5);
addDefenders("bow", 2, 5);
}
function TownSuo() {
addUnitToBarracks("fists", 1);
addUnitToBarracks("staff", 1);
addUnitToBarracks("bow", 1);
addUnitToBarracks("throwing", 1);
addWeaponsToStore(["Katana", "NinjaTo", "Staff"], 2);
addWeaponsToStore(["Throwing"], 2);
addWeaponsToStore(["Bow"], 1);
addDefenders("fists", 2, 5);
addDefenders("throwing", 1, 5);
addDefenders("staff", 1, 3);
addDefenders("bow", 1, 2);
}
function TownNara() {
addUnitToBarracks("fists", 1);
addUnitToBarracks("staff", 1);
addUnitToBarracks("throwing", 0);
addWeaponsToStore(["Katana", "NinjaTo", "Staff"], 1);
addWeaponsToStore(["Throwing"], 1);
addDefenders("fists", 1, 5);
addDefenders("throwing", 0, 5);
addDefenders("staff", 1, 5);
addDefenders("bow", 1, 5);
}
function TownCardiff() {
addUnitToBarracks("shield", 7);
addUnitToBarracks("2H_sword", 7);
addUnitToBarracks("dual", 7);
addUnitToBarracks("dagger", 6);
addUnitToBarracks("bow", 6);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Dagger"], 7);
addWeaponsToStore(["Bow", "Shield"], 4);
addDefenders("shield", 7, 5);
addDefenders("bow", 6, 5);
addDefenders("2H_sword", 7, 5);
addDefenders("bow", 6, 5);
addDefenders("dual", 7, 5);
addDefenders("bow", 6, 5);
addDefenders("dual", 7, 5);
addDefenders("2H_sword", 7, 5);
addAdvDefenders("shield", 7, 5);
addAdvDefenders("bow", 6, 5);
addAdvDefenders("shield", 7, 5);
addAdvDefenders("bow", 6, 5);
}
function TownArmagh() {
addUnitToBarracks("shield", 6);
addUnitToBarracks("2H_sword", 6);
addUnitToBarracks("dual", 6);
addUnitToBarracks("dagger", 6);
addUnitToBarracks("bow", 6);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Dagger"], 6);
addWeaponsToStore(["Bow", "Shield"], 4);
addDefenders("shield", 6, 5);
addDefenders("bow", 6, 5);
addDefenders("2H_sword", 6, 5);
addDefenders("dagger", 6, 5);
addDefenders("bow", 6, 5);
addDefenders("dual", 6, 5);
addAdvDefenders("shield", 7, 5);
addAdvDefenders("bow", 6, 5);
}
function TownKells() {
addUnitToBarracks("shield", 5);
addUnitToBarracks("2H_sword", 5);
addUnitToBarracks("dual", 5);
addUnitToBarracks("dagger", 5);
addUnitToBarracks("bow", 4);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Dagger"], 5);
addWeaponsToStore(["Bow", "Shield"], 3);
addDefenders("shield", 5, 5);
addDefenders("bow", 4, 5);
addDefenders("2H_sword", 5, 5);
addDefenders("dagger", 5, 5);
addDefenders("bow", 4, 5);
addDefenders("dual", 5, 5);
addAdvDefenders("shield", 6, 5);
addAdvDefenders("bow", 4, 5);
}
function TownIona() {
addUnitToBarracks("shield", 4);
addUnitToBarracks("2H_sword", 4);
addUnitToBarracks("dual", 4);
addUnitToBarracks("dagger", 4);
addUnitToBarracks("bow", 4);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Dagger"], 4);
addWeaponsToStore(["Bow", "Shield"], 3);
addDefenders("shield", 4, 5);
addDefenders("bow", 4, 5);
addDefenders("2H_sword", 4, 5);
addDefenders("dagger", 4, 5);
addDefenders("bow", 4, 5);
addDefenders("dual", 4, 5);
}
function TownTara() {
addUnitToBarracks("shield", 3);
addUnitToBarracks("2H_sword", 3);
addUnitToBarracks("dual", 3);
addUnitToBarracks("dagger", 3);
addUnitToBarracks("bow", 2);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Dagger"], 4);
addWeaponsToStore(["Bow", "Shield"], 2);
addDefenders("shield", 3, 5);
addDefenders("bow", 2, 5);
addDefenders("2H_sword", 3, 5);
addDefenders("dagger", 3, 5);
addDefenders("bow", 2, 5);
addDefenders("dual", 3, 5);
}
function TownSwansea() {
addUnitToBarracks("shield", 2);
addUnitToBarracks("2H_sword", 2);
addUnitToBarracks("dual", 2);
addUnitToBarracks("dagger", 2);
addUnitToBarracks("bow", 2);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Dagger"], 3);
addWeaponsToStore(["Bow", "Shield"], 2);
addDefenders("shield", 2, 5);
addDefenders("bow", 2, 5);
addDefenders("2H_sword", 2, 5);
addDefenders("dagger", 2, 5);
addDefenders("bow", 2, 5);
addDefenders("dual", 2, 5);
}
function TownLlanelli() {
addUnitToBarracks("shield", 1);
addUnitToBarracks("dual", 1);
addUnitToBarracks("2H_sword", 0);
addUnitToBarracks("dagger", 0);
addUnitToBarracks("bow", 0);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Dagger"], 2);
addWeaponsToStore(["Bow", "Shield"], 1);
addDefenders("2H_sword", 0, 4);
addDefenders("bow", 0, 4);
addDefenders("shield", 1, 3);
addDefenders("dagger", 0, 2);
addDefenders("bow", 0, 3);
addDefenders("dual", 1, 3);
}
function TownNeath() {
addUnitToBarracks("2H_sword", 0);
addUnitToBarracks("dagger", 0);
addUnitToBarracks("bow", 0);
addWeaponsToStore(["OnehandedSword", "TwohandedSword", "Dagger"], 1);
addWeaponsToStore(["Bow", "Shield"], 1);
addDefenders("2H_sword", 0, 4);
addDefenders("bow", 0, 4);
addDefenders("shield", 1, 3);
addDefenders("dagger", 0, 2);
addDefenders("bow", 0, 3);
addDefenders("dual", 1, 5);
}
function TownTiflis() {
addUnitToBarracks("2H_sword", 7);
addUnitToBarracks("dual", 7);
addUnitToBarracks("katar", 7);
addUnitToBarracks("crossbow", 6);
addWeaponsToStore(["OnehandedSword", "TwohandedSword"], 7);
addWeaponsToStore(["Katar"], 6);
addDefenders("dual", 7, 5);
addDefenders("katar", 7, 5);
addDefenders("crossbow", 6, 5);
addDefenders("2H_sword", 7, 10);
addDefenders("crossbow", 6, 5);
addDefenders("katar", 7, 5);
addAdvDefenders("katar", 7, 10);
addAdvDefenders("dual", 7, 5);
addAdvDefenders("2H_sword", 7, 5);
}
function TownMedina() {
addUnitToBarracks("2H_sword", 6);
addUnitToBarracks("dual", 6);
addUnitToBarracks("katar", 6);
addUnitToBarracks("crossbow", 6);
addWeaponsToStore(["OnehandedSword", "TwohandedSword"], 6);
addWeaponsToStore(["Katar"], 5);
addDefenders("dual", 6, 5);
addDefenders("crossbow", 6, 5);
addDefenders("2H_sword", 6, 5);
addDefenders("crossbow", 6, 5);
addDefenders("katar", 6, 10);
addAdvDefenders("katar", 7, 10);
}
function TownMosul() {
addUnitToBarracks("2H_sword", 5);
addUnitToBarracks("dual", 5);
addUnitToBarracks("katar", 5);
addUnitToBarracks("crossbow", 4);
addWeaponsToStore(["OnehandedSword", "TwohandedSword"], 5);
addWeaponsToStore(["Katar"], 5);
addDefenders("dual", 5, 5);
addDefenders("crossbow", 4, 5);
addDefenders("2H_sword", 5, 5);
addDefenders("crossbow", 4, 10);
addDefenders("katar", 5, 5);
addAdvDefenders("dual", 6, 5);
addAdvDefenders("crossbow", 6, 5);
}
function TownSamarra() {
addUnitToBarracks("2H_sword", 4);
addUnitToBarracks("dual", 4);
addUnitToBarracks("katar", 4);
addUnitToBarracks("crossbow", 4);
addWeaponsToStore(["OnehandedSword", "TwohandedSword"], 4);
addWeaponsToStore(["Katar"], 4);
addDefenders("dual", 4, 10);
addDefenders("crossbow", 4, 5);
addDefenders("2H_sword", 4, 5);
addDefenders("crossbow", 4, 5);
addDefenders("katar", 4, 5);
}
function TownMahdia() {
addUnitToBarracks("2H_sword", 3);
addUnitToBarracks("dual", 3);
addUnitToBarracks("katar", 3);
addUnitToBarracks("crossbow", 2);
addWeaponsToStore(["OnehandedSword", "TwohandedSword"], 3);
addWeaponsToStore(["Katar"], 3);
addDefenders("dual", 3, 5);
addDefenders("crossbow", 2, 5);
addDefenders("2H_sword", 3, 5);
addDefenders("crossbow", 2, 10);
addDefenders("katar", 3, 5);
}
function TownShiraz() {
addUnitToBarracks("2H_sword", 2);
addUnitToBarracks("dual", 2);
addUnitToBarracks("katar", 1);
addUnitToBarracks("crossbow", 2);
addWeaponsToStore(["OnehandedSword", "TwohandedSword"], 2);
addWeaponsToStore(["Katar"], 3);
addDefenders("dual", 2, 5);
addDefenders("crossbow", 2, 5);
addDefenders("2H_sword", 2, 5);
addDefenders("crossbow", 2, 5);
addDefenders("katar", 1, 5);
}
function TownRabat() {
addUnitToBarracks("2H_sword", 1);
addUnitToBarracks("dual", 0);
addUnitToBarracks("katar", 1);
addUnitToBarracks("crossbow", 0);
addWeaponsToStore(["OnehandedSword", "TwohandedSword"], 2);
addWeaponsToStore(["Katar"], 2);
addDefenders("dual", 0, 3);
addDefenders("2H_sword", 1, 2);
addDefenders("crossbow", 0, 5);
addDefenders("katar", 1, 4);
}
function TownAden() {
addUnitToBarracks("dual", 0);
addUnitToBarracks("crossbow", 0);
addWeaponsToStore(["OnehandedSword", "TwohandedSword"], 1);
addWeaponsToStore(["Katar"], 1);
addDefenders("dual", 0, 5);
addDefenders("2H_sword", 1, 5);
addDefenders("crossbow", 0, 5);
addDefenders("katar", 1, 5);
}
}
Symbol 3170 MovieClip [__Packages.WorldMap] Frame 0
class WorldMap extends MovieClip
{
var speed, TOWNS, LANDS, attachMovie, temp_hero, gox, goy, avatar, gui, _x, _y, _xmouse, _ymouse, seashore, landAra, landMon, ground, sea;
function WorldMap () {
super();
speed = 2;
hideIcons();
TOWNS = new Array();
TOWNS.push("Caesarea");
TOWNS.push("Veii");
TOWNS.push("Palmyra");
TOWNS.push("Tyrus");
TOWNS.push("Artaxata");
TOWNS.push("Seleucia");
TOWNS.push("Treveri");
TOWNS.push("Curia");
TOWNS.push("Grobben");
TOWNS.push("Torburg");
TOWNS.push("Dortmund");
TOWNS.push("Odense");
TOWNS.push("Holmgard");
TOWNS.push("Skara");
TOWNS.push("Lunde");
TOWNS.push("Risby");
TOWNS.push("RaGorod");
TOWNS.push("Zlatograd");
TOWNS.push("Dobrov");
TOWNS.push("Grouzeno");
TOWNS.push("Krasnodolye");
TOWNS.push("Svetlolesye");
TOWNS.push("Staroe");
TOWNS.push("Elki");
TOWNS.push("Nagoya");
TOWNS.push("Izumo");
TOWNS.push("Matsuyama");
TOWNS.push("Omi");
TOWNS.push("Echigo");
TOWNS.push("Sapporo");
TOWNS.push("Suo");
TOWNS.push("Nara");
TOWNS.push("Cardiff");
TOWNS.push("Armagh");
TOWNS.push("Kells");
TOWNS.push("Iona");
TOWNS.push("Tara");
TOWNS.push("Swansea");
TOWNS.push("Llanelli");
TOWNS.push("Neath");
TOWNS.push("Tiflis");
TOWNS.push("Medina");
TOWNS.push("Mosul");
TOWNS.push("Samarra");
TOWNS.push("Mahdia");
TOWNS.push("Shiraz");
TOWNS.push("Rabat");
TOWNS.push("Aden");
LANDS = new Array();
LANDS.push("Viz");
LANDS.push("Ger");
LANDS.push("Rus");
LANDS.push("Jap");
LANDS.push("Mon");
LANDS.push("Ara");
var _local3 = 0;
while (_local3 < LANDS.length) {
this["land" + LANDS[_local3]].stop();
_local3++;
}
sendData();
}
function sendData() {
attachMovie(((_global.MAIN_HERO.HORSE != null) ? "Horseman_Player" : "Human_Player"), "temp_hero", 1, {_x:1000, _y:1000, _visible:false});
temp_hero.initUnit(_global.MAIN_HERO);
var _local5 = 0;
var _local4 = 0;
while (_local4 < TOWNS.length) {
if (_global.IS_CAPTURED[TOWNS[_local4]]) {
_local5++;
}
_local4++;
}
if ((((!isNaN(_global.MAIN_HERO.LEVEL)) && (!isNaN(_global.GOLD))) && (!isNaN(temp_hero.wpn.dmg + temp_hero.wpn.rnd))) && (!isNaN(temp_hero.MAX_HP))) {
_root.kongregateStats.submit("MaxLevel", _global.MAIN_HERO.LEVEL);
_root.kongregateStats.submit("MaxGold", _global.GOLD);
_root.kongregateStats.submit("Max HP", temp_hero.MAX_HP);
_root.kongregateStats.submit("TownsControlled", _local5);
}
}
static function getTownName(townID) {
if (!(townID === "RaGorod")) {
} else {
return("Ra Gorod");
}
return(townID);
}
static function getTownNation(townID) {
return(Town.getNation(townID));
}
function init() {
gox = null;
goy = null;
if (_global.CURR_TOWN != null) {
avatar._x = this[_global.CURR_TOWN]._x;
avatar._y = this[_global.CURR_TOWN]._y;
} else {
avatar._x = _global.WORLD_MAP_X;
avatar._y = _global.WORLD_MAP_Y;
}
var _local3 = 0;
while (_local3 < 34) {
this["quest_avatar_" + _local3]._visible = _local3 == _global.QUEST.avatar_id;
_local3++;
}
_local3 = 0;
while (_local3 < TOWNS.length) {
if (!_global.IS_CAPTURED[TOWNS[_local3]]) {
if (_global.IS_HOSTILE[getTownNation(TOWNS[_local3])]) {
this[TOWNS[_local3]].name_txt.textColor = 16711680 /* 0xFF0000 */;
} else {
this[TOWNS[_local3]].name_txt.textColor = 16777215 /* 0xFFFFFF */;
}
} else {
this[TOWNS[_local3]].name_txt.textColor = 65280;
}
_local3++;
}
if (_global.IS_HOSTILE.Viz) {
var _local4 = true;
_local3 = 0;
while (_local3 < 8) {
if (!_global.IS_CAPTURED[TOWNS[_local3]]) {
_local4 = false;
break;
}
_local3++;
}
if (_local4) {
_global.IS_HOSTILE.Viz = false;
}
}
if (_global.IS_HOSTILE.Ger) {
var _local4 = true;
_local3 = 8;
while (_local3 < 16) {
if (!_global.IS_CAPTURED[TOWNS[_local3]]) {
_local4 = false;
break;
}
_local3++;
}
if (_local4) {
_global.IS_HOSTILE.Ger = false;
}
}
if (_global.IS_HOSTILE.Rus) {
var _local4 = true;
_local3 = 16;
while (_local3 < 24) {
if (!_global.IS_CAPTURED[TOWNS[_local3]]) {
_local4 = false;
break;
}
_local3++;
}
if (_local4) {
_global.IS_HOSTILE.Rus = false;
}
}
if (_global.IS_HOSTILE.Jap) {
var _local4 = true;
_local3 = 24;
while (_local3 < 32) {
if (!_global.IS_CAPTURED[TOWNS[_local3]]) {
_local4 = false;
break;
}
_local3++;
}
if (_local4) {
_global.IS_HOSTILE.Jap = false;
}
}
if (!_global.GAME_ENDED) {
var _local4 = true;
_local3 = 0;
while (_local3 < TOWNS.length) {
if (!_global.IS_CAPTURED[TOWNS[_local3]]) {
_local4 = false;
break;
}
_local3++;
}
if (_local4) {
_global.GAME_ENDED = true;
gui.congrats.gotoAndPlay(2);
}
}
avatar.gotoAndStop((_global.SAILING_SHIP ? 1 : 2));
_x = 400 - avatar._x;
_y = 300 - avatar._y;
if (_x < -400) {
_x = -400;
}
if (_x > 0) {
_x = 0;
}
if (_y < -300) {
_y = -300;
}
if (_y > 0) {
_y = 0;
}
gui._x = -_x;
gui._y = -_y;
}
function onMousePress() {
gox = _xmouse;
goy = _ymouse;
}
function stopMoving() {
gox = null;
goy = null;
if (this["quest_avatar_" + _global.QUEST.avatar_id].hitTest(avatar._x + _x, avatar._y + _y, false)) {
_global.QUEST.prepareBattle();
_global.BATTLE_TYPE = "QUEST";
startBattle(48 + _root.d(8));
}
var _local4 = 0;
while (_local4 < TOWNS.length) {
if (this[TOWNS[_local4]].hitTest(avatar._x + _x, avatar._y + _y, false)) {
_root.openCity(TOWNS[_local4]);
return(undefined);
}
_local4++;
}
}
function randomEncounter() {
if (_root.dice(150) == 0) {
var _local7 = 5 + _root.d(_global.MAIN_HERO.LEVEL / 3);
var _local8 = Math.ceil(_global.MAIN_HERO.LEVEL * 0.8);
if (_local7 > 20) {
_local7 = 20;
}
delete _global.ENEMIES;
_global.ENEMIES = new Array();
var _local5 = 0;
while (_local5 < _local7) {
_global.ENEMIES.push(((_root.dice(2) == 0) ? (Unit.getRangedRogue(_local8)) : (Unit.getMeleeRogue(_local8))));
_local5++;
}
startEncounter();
return(undefined);
}
if (!_global.SAILING_SHIP) {
var _local6 = "";
var _local4 = 0;
while (_local4 < LANDS.length) {
if (this["land" + LANDS[_local4]].hitTest(avatar._x + _x, avatar._y + _y, true)) {
_local6 = LANDS[_local4];
break;
}
_local4++;
}
if (_global.IS_HOSTILE[_local6] && (_root.dice(150) == 0)) {
var _local7 = Math.round(5 + (_root.d(_global.MAIN_HERO.LEVEL) / 2));
if (_local7 > 25) {
_local7 = 25;
}
delete _global.ENEMIES;
_global.ENEMIES = new Array();
var _local5 = 0;
while (_local5 < Math.min(_local7, 6)) {
_global.ENEMIES.push(Unit.getMeleeMilitia(_local6, Math.floor(_global.MAIN_HERO.LEVEL / 8)));
_local5++;
}
_local5 = 0;
while (_local5 < (_local7 - 6)) {
_global.ENEMIES.push(Unit.getRangedMilitia(_local6, Math.floor(_global.MAIN_HERO.LEVEL / 8)));
_local5++;
}
startEncounter();
}
}
}
function startEncounter() {
_global.BATTLE_TYPE = "ENCOUNTER";
var _local4;
if (!_global.SAILING_SHIP) {
switch (true) {
case seashore.hitTest(avatar._x + _x, avatar._y + _y, true) :
_local4 = 80;
break;
case landAra.hitTest(avatar._x + _x, avatar._y + _y, true) :
_local4 = 68;
break;
case landMon.hitTest(avatar._x + _x, avatar._y + _y, true) :
_local4 = 72;
break;
default :
var _local5 = [54, 60, 64, 88, 92, 96];
_local4 = _local5[_root.dice(6)];
}
} else {
_local4 = 76;
}
_local4 = _local4 + _root.d(4);
startBattle(_local4);
}
function startBattle(battle_map) {
_global.BATTLE_MAP = battle_map;
_global.CURR_TOWN = null;
_global.WORLD_MAP_X = avatar._x;
_global.WORLD_MAP_Y = avatar._y;
_root.gotoAndStop("SPLASH_SCREEN");
}
function checkPosition() {
var _local3 = 40;
var _local4 = 15;
if (_root._xmouse > (800 - _local3)) {
_x = _x - _local4;
if (_x < -400) {
_x = -400;
}
}
if (_root._xmouse < _local3) {
_x = _x + _local4;
if (_x > 0) {
_x = 0;
}
}
if (_root._ymouse > (600 - _local3)) {
_y = _y - _local4;
if (_y < -300) {
_y = -300;
}
}
if (_root._ymouse < _local3) {
_y = _y + _local4;
if (_y > 0) {
_y = 0;
}
}
gui._x = -_x;
gui._y = -_y;
}
function showIcon(icon_name) {
gui.sign.gotoAndStop(icon_name);
}
function hideIcons() {
gui.sign.gotoAndStop("none");
}
function onEnterFrame() {
checkPosition();
if ((gox != null) && (goy != null)) {
var _local5 = Math.atan2(goy - avatar._y, gox - avatar._x);
var _local4 = avatar._x + (speed * Math.cos(_local5));
var _local3 = avatar._y + (speed * Math.sin(_local5));
if ((Math.abs(avatar._x - gox) < speed) && (Math.abs(avatar._y - goy) < speed)) {
stopMoving();
}
if ((_global.SAILING_SHIP ? (sea.hitTest(_local4 + _x, _local3 + _y, true)) : (ground.hitTest(_local4 + _x, _local3 + _y, true)))) {
randomEncounter();
avatar._x = _local4;
avatar._y = _local3;
} else {
gox = null;
goy = null;
}
}
}
}
Symbol 3171 MovieClip [__Packages.Tutorial] Frame 0
class Tutorial extends MovieClip
{
var added_things, swapDepths, curr_lesson, old_friends, _ymouse, _xmouse, wnd, removeMovieClip, gotoAndStop;
function Tutorial () {
super();
added_things = new Array();
swapDepths(7010);
curr_lesson = 1;
old_friends = _global.FRIENDS;
_global.FRIENDS = new Array();
var _local7 = new Unit("Mon", "bow", 0);
var _local6 = 0;
while (_local6 < 15) {
_global.FRIENDS.push(_local7);
_local6++;
}
_global.HERO = 1;
delete _global.LOOT;
_global.LOOT = new Array();
_global.AURAS = new Array();
_global.EXP_GOT = 0;
_global.GOLD_GOT = 0;
_root.attachMovie("BattleCursor", "_cursor", 7001, {_x:_xmouse, _y:_ymouse});
_root.attachMovie("Screen", "scr", 6002, {_x:0, _y:0});
_local6 = 0;
while (_local6 < _global.F_WIDTH) {
var _local5 = 0;
while (_local5 < _global.F_HEIGHT) {
_global.field[_local6][_local5].empty = true;
_global.field[_local6][_local5].free = true;
_global.field[_local6][_local5].who = null;
_local5++;
}
_local6++;
}
_root._quality = _global.SAVED_QUALITY;
_root.onEnterFrame = _root.tutorialEnterFrame;
var _local8 = new Hero();
_local8.playerTutorialDummy();
_root.addHero(22, 415, _local8, 0);
lessonStart1();
}
function showMsg(msg) {
wnd.msg_txt.text = msg;
}
function endTutorial() {
_root.unloadMap();
var _local4 = 0;
while (_local4 < added_things.length) {
added_things[_local4].removeMovieClip();
_local4++;
}
_global.FRIENDS = old_friends;
_root.gotoAndStop("TOWN_SCREEN");
removeMovieClip();
}
function addPositionMark(xx, yy) {
var _local3 = _root.getDepthDown(xx, yy);
added_things.push(_root.attachMovie("Position mark", "dw_" + _local3, _local3, {_x:_root.stgX(xx), _y:_root.stgY(yy)}));
}
function addDummy(xx, yy, tm) {
if ((_root.hero0.X == xx) && (_root.hero0.Y == yy)) {
return(false);
}
var _local2 = new Hero();
_local2.enemyTutorialDummy();
_root.addUnit(_root.stgX(xx), _root.stgY(yy), _local2, tm);
return(true);
}
function delPositionMark(xx, yy) {
var _local2 = _root.getDepthDown(xx, yy);
_root["dw_" + _local2].removeMovieClip();
}
function lessonStart1() {
addPositionMark(3, 3);
showMsg("Move your hero with WASD or arrow keys. Come to this spot.");
}
function lessonStart2() {
delPositionMark(3, 3);
addDummy(19, 4, 1);
_root.hero1.holdPosition = true;
showMsg("Attack with space. Come closer to enemy and shoot him with your bow.");
}
function lessonStart3() {
_root.hero1.die();
showMsg("Switch weapons with Shift. Press Shift to switch to take sword.");
}
function lessonStart4() {
showMsg("You also can use skills instead of normal attack if you've mastered them. To switch to skill, click on its icon at the bottom of screen. Or press hotkey - 1.");
}
function lessonStart5() {
var _local3 = new Hero();
_local3.enemyTutorialDummy();
if (!addDummy(19, 3, 1)) {
addDummy(19, 5, 1);
}
_root.hero2.holdPosition = true;
showMsg("To use chosen skill press space. Now come close to enemy and hit him with the skill attack. You'll see that the damage is increased greately.");
}
function lessonStart6() {
showMsg("If you have some men with bows or crossbows in your reserve, it's possblie to order them to shoot at enemy position. Now Click on Arrow Shower icon and then click on ground.");
}
function lessonStart7() {
if (_root.hero2.HP > 0) {
_root.hero2.die();
}
var _local3 = 0;
while (_local3 < 5) {
addDummy(19, _local3, 1);
addDummy(0, _local3, 0);
addDummy(4, _local3, 0);
_local3++;
}
showMsg("You will not fight alone - your army is a great help in battle. But you'd better help them a little too.");
}
function lessonStart8() {
showMsg("Great, you've finished with tutorial. Good luck on your journey!");
gotoAndStop(2);
}
function lessonCheck1() {
return((_root.hero0.X == 3) && (_root.hero0.Y == 3));
}
function lessonCheck2() {
return(_root.hero1.HP < _root.hero1.MAX_HP);
}
function lessonCheck3() {
return(_root.hero0.atkAnim == "2H_sword");
}
function lessonCheck4() {
return(_root.hero0.curr_skill != 0);
}
function lessonCheck5() {
return(_root.hero0.SP < _root.hero0.MAX_SP);
}
function lessonCheck6() {
return(!_root.scr.control_shower.is_ready);
}
function lessonCheck7() {
return(_root.getTeamCount(1) == 0);
}
function onEnterFrame() {
if (this["lessonCheck" + curr_lesson]()) {
curr_lesson++;
this["lessonStart" + curr_lesson]();
}
}
}
Symbol 49 MovieClip [__Packages.mx.core.UIObject] Frame 0
class mx.core.UIObject extends MovieClip
{
var _width, _height, _x, _y, _parent, _minHeight, _minWidth, _visible, dispatchEvent, _xscale, _yscale, methodTable, onEnterFrame, tfList, __width, __height, moveTo, lineTo, createTextField, attachMovie, buildDepthTable, findNextAvailableDepth, idNames, childrenCreated, _name, createAccessibilityImplementation, _endInit, validateNow, hasOwnProperty, initProperties, stylecache, className, ignoreClassStyleDeclaration, _tf, fontFamily, fontSize, color, marginLeft, marginRight, fontStyle, fontWeight, textAlign, textIndent, textDecoration, embedFonts, styleName, enabled;
function UIObject () {
super();
constructObject();
}
function get width() {
return(_width);
}
function get height() {
return(_height);
}
function get left() {
return(_x);
}
function get x() {
return(_x);
}
function get top() {
return(_y);
}
function get y() {
return(_y);
}
function get right() {
return(_parent.width - (_x + width));
}
function get bottom() {
return(_parent.height - (_y + height));
}
function getMinHeight(Void) {
return(_minHeight);
}
function setMinHeight(h) {
_minHeight = h;
}
function get minHeight() {
return(getMinHeight());
}
function set minHeight(h) {
setMinHeight(h);
//return(minHeight);
}
function getMinWidth(Void) {
return(_minWidth);
}
function setMinWidth(w) {
_minWidth = w;
}
function get minWidth() {
return(getMinWidth());
}
function set minWidth(w) {
setMinWidth(w);
//return(minWidth);
}
function setVisible(x, noEvent) {
if (x != _visible) {
_visible = x;
if (noEvent != true) {
dispatchEvent({type:(x ? "reveal" : "hide")});
}
}
}
function get visible() {
return(_visible);
}
function set visible(x) {
setVisible(x, false);
//return(visible);
}
function get scaleX() {
return(_xscale);
}
function set scaleX(x) {
_xscale = x;
//return(scaleX);
}
function get scaleY() {
return(_yscale);
}
function set scaleY(y) {
_yscale = y;
//return(scaleY);
}
function doLater(obj, fn) {
if (methodTable == undefined) {
methodTable = new Array();
}
methodTable.push({obj:obj, fn:fn});
onEnterFrame = doLaterDispatcher;
}
function doLaterDispatcher(Void) {
delete onEnterFrame;
if (invalidateFlag) {
redraw();
}
var _local3 = methodTable;
methodTable = new Array();
if (_local3.length > 0) {
var _local2;
while (_local2 = _local3.shift() , _local2 != undefined) {
_local2.obj[_local2.fn]();
}
}
}
function cancelAllDoLaters(Void) {
delete onEnterFrame;
methodTable = new Array();
}
function invalidate(Void) {
invalidateFlag = true;
onEnterFrame = doLaterDispatcher;
}
function invalidateStyle(Void) {
invalidate();
}
function redraw(bAlways) {
if (invalidateFlag || (bAlways)) {
invalidateFlag = false;
var _local2;
for (_local2 in tfList) {
tfList[_local2].draw();
}
draw();
dispatchEvent({type:"draw"});
}
}
function draw(Void) {
}
function move(x, y, noEvent) {
var _local3 = _x;
var _local2 = _y;
_x = x;
_y = y;
if (noEvent != true) {
dispatchEvent({type:"move", oldX:_local3, oldY:_local2});
}
}
function setSize(w, h, noEvent) {
var _local2 = __width;
var _local3 = __height;
__width = w;
__height = h;
size();
if (noEvent != true) {
dispatchEvent({type:"resize", oldWidth:_local2, oldHeight:_local3});
}
}
function size(Void) {
_width = __width;
_height = __height;
}
function drawRect(x1, y1, x2, y2) {
moveTo(x1, y1);
lineTo(x2, y1);
lineTo(x2, y2);
lineTo(x1, y2);
lineTo(x1, y1);
}
function createLabel(name, depth, text) {
createTextField(name, depth, 0, 0, 0, 0);
var _local2 = this[name];
_local2._color = textColorList;
_local2._visible = false;
_local2.__text = text;
if (tfList == undefined) {
tfList = new Object();
}
tfList[name] = _local2;
_local2.invalidateStyle();
invalidate();
_local2.styleName = this;
return(_local2);
}
function createObject(linkageName, id, depth, initobj) {
return(attachMovie(linkageName, id, depth, initobj));
}
function createClassObject(className, id, depth, initobj) {
var _local3 = className.symbolName == undefined;
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className);
}
var _local4 = createObject(className.symbolOwner.symbolName, id, depth, initobj);
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className.symbolOwner);
}
return(_local4);
}
function createEmptyObject(id, depth) {
return(createClassObject(mx.core.UIObject, id, depth));
}
function destroyObject(id) {
var _local2 = this[id];
if (_local2.getDepth() < 0) {
var _local4 = buildDepthTable();
var _local5 = findNextAvailableDepth(0, _local4, "up");
var _local3 = _local5;
_local2.swapDepths(_local3);
}
_local2.removeMovieClip();
delete this[id];
}
function getSkinIDName(tag) {
return(idNames[tag]);
}
function setSkin(tag, linkageName, initObj) {
if (_global.skinRegistry[linkageName] == undefined) {
mx.skins.SkinElement.registerElement(linkageName, mx.skins.SkinElement);
}
return(createObject(linkageName, getSkinIDName(tag), tag, initObj));
}
function createSkin(tag) {
var _local2 = getSkinIDName(tag);
createEmptyObject(_local2, tag);
return(this[_local2]);
}
function createChildren(Void) {
}
function _createChildren(Void) {
createChildren();
childrenCreated = true;
}
function constructObject(Void) {
if (_name == undefined) {
return(undefined);
}
init();
_createChildren();
createAccessibilityImplementation();
_endInit();
if (validateNow) {
redraw(true);
} else {
invalidate();
}
}
function initFromClipParameters(Void) {
var _local4 = false;
var _local2;
for (_local2 in clipParameters) {
if (hasOwnProperty(_local2)) {
_local4 = true;
this["def_" + _local2] = this[_local2];
delete this[_local2];
}
}
if (_local4) {
for (_local2 in clipParameters) {
var _local3 = this["def_" + _local2];
if (_local3 != undefined) {
this[_local2] = _local3;
}
}
}
}
function init(Void) {
__width = _width;
__height = _height;
if (initProperties == undefined) {
initFromClipParameters();
} else {
initProperties();
}
if (_global.cascadingStyles == true) {
stylecache = new Object();
}
}
function getClassStyleDeclaration(Void) {
var _local4 = this;
var _local3 = className;
while (_local3 != undefined) {
if (ignoreClassStyleDeclaration[_local3] == undefined) {
if (_global.styles[_local3] != undefined) {
return(_global.styles[_local3]);
}
}
_local4 = _local4.__proto__;
_local3 = _local4.className;
}
}
function setColor(color) {
}
function __getTextFormat(tf, bAll) {
var _local8 = stylecache.tf;
if (_local8 != undefined) {
var _local3;
for (_local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
tf[_local3] = _local8[_local3];
}
}
}
return(false);
}
var _local6 = false;
for (var _local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
var _local5 = _tf[_local3];
if (_local5 != undefined) {
tf[_local3] = _local5;
} else if ((_local3 == "font") && (fontFamily != undefined)) {
tf[_local3] = fontFamily;
} else if ((_local3 == "size") && (fontSize != undefined)) {
tf[_local3] = fontSize;
} else if ((_local3 == "color") && (color != undefined)) {
tf[_local3] = color;
} else if ((_local3 == "leftMargin") && (marginLeft != undefined)) {
tf[_local3] = marginLeft;
} else if ((_local3 == "rightMargin") && (marginRight != undefined)) {
tf[_local3] = marginRight;
} else if ((_local3 == "italic") && (fontStyle != undefined)) {
tf[_local3] = fontStyle == _local3;
} else if ((_local3 == "bold") && (fontWeight != undefined)) {
tf[_local3] = fontWeight == _local3;
} else if ((_local3 == "align") && (textAlign != undefined)) {
tf[_local3] = textAlign;
} else if ((_local3 == "indent") && (textIndent != undefined)) {
tf[_local3] = textIndent;
} else if ((_local3 == "underline") && (textDecoration != undefined)) {
tf[_local3] = textDecoration == _local3;
} else if ((_local3 == "embedFonts") && (embedFonts != undefined)) {
tf[_local3] = embedFonts;
} else {
_local6 = true;
}
}
}
}
if (_local6) {
var _local9 = styleName;
if (_local9 != undefined) {
if (typeof(_local9) != "string") {
_local6 = _local9.__getTextFormat(tf, true, this);
} else if (_global.styles[_local9] != undefined) {
_local6 = _global.styles[_local9].__getTextFormat(tf, true, this);
}
}
}
if (_local6) {
var _local10 = getClassStyleDeclaration();
if (_local10 != undefined) {
_local6 = _local10.__getTextFormat(tf, true, this);
}
}
if (_local6) {
if (_global.cascadingStyles) {
if (_parent != undefined) {
_local6 = _parent.__getTextFormat(tf, false);
}
}
}
if (_local6) {
_local6 = _global.style.__getTextFormat(tf, true, this);
}
return(_local6);
}
function _getTextFormat(Void) {
var _local2 = stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
__getTextFormat(_local2, true);
stylecache.tf = _local2;
if (enabled == false) {
var _local3 = getStyle("disabledColor");
_local2.color = _local3;
}
return(_local2);
}
function getStyleName(Void) {
var _local2 = styleName;
if (_local2 != undefined) {
if (typeof(_local2) != "string") {
return(_local2.getStyleName());
}
return(_local2);
}
if (_parent != undefined) {
return(_parent.getStyleName());
}
return(undefined);
}
function getStyle(styleProp) {
var _local3;
_global.getStyleCounter++;
if (this[styleProp] != undefined) {
return(this[styleProp]);
}
var _local6 = styleName;
if (_local6 != undefined) {
if (typeof(_local6) != "string") {
_local3 = _local6.getStyle(styleProp);
} else {
var _local7 = _global.styles[_local6];
_local3 = _local7.getStyle(styleProp);
}
}
if (_local3 != undefined) {
return(_local3);
}
var _local7 = getClassStyleDeclaration();
if (_local7 != undefined) {
_local3 = _local7[styleProp];
}
if (_local3 != undefined) {
return(_local3);
}
if (_global.cascadingStyles) {
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (mx.styles.StyleManager.isColorStyle(styleProp))) {
var _local5 = stylecache;
if (_local5 != undefined) {
if (_local5[styleProp] != undefined) {
return(_local5[styleProp]);
}
}
if (_parent != undefined) {
_local3 = _parent.getStyle(styleProp);
} else {
_local3 = _global.style[styleProp];
}
if (_local5 != undefined) {
_local5[styleProp] = _local3;
}
return(_local3);
}
}
if (_local3 == undefined) {
_local3 = _global.style[styleProp];
}
return(_local3);
}
static function mergeClipParameters(o, p) {
for (var _local3 in p) {
o[_local3] = p[_local3];
}
return(true);
}
static var symbolName = "UIObject";
static var symbolOwner = mx.core.UIObject;
static var version = "2.0.2.126";
static var textColorList = {color:1, disabledColor:1};
var invalidateFlag = false;
var lineWidth = 1;
var lineColor = 0;
var tabEnabled = false;
var clipParameters = {visible:1, minHeight:1, minWidth:1, maxHeight:1, maxWidth:1, preferredHeight:1, preferredWidth:1};
}
Symbol 50 MovieClip [__Packages.mx.core.UIComponent] Frame 0
class mx.core.UIComponent extends mx.core.UIObject
{
var __width, __height, invalidate, stylecache, removeEventListener, dispatchEvent, drawFocus, addEventListener, _xscale, _yscale, _focusrect, watch, enabled;
function UIComponent () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
}
function enabledChanged(id, oldValue, newValue) {
setEnabled(newValue);
invalidate();
delete stylecache.tf;
return(newValue);
}
function setEnabled(enabled) {
invalidate();
}
function getFocus() {
var selFocus = Selection.getFocus();
return(((selFocus === null) ? null : (eval (selFocus))));
}
function setFocus() {
Selection.setFocus(this);
}
function getFocusManager() {
var _local2 = this;
while (_local2 != undefined) {
if (_local2.focusManager != undefined) {
return(_local2.focusManager);
}
_local2 = _local2._parent;
}
return(undefined);
}
function onKillFocus(newFocus) {
removeEventListener("keyDown", this);
removeEventListener("keyUp", this);
dispatchEvent({type:"focusOut"});
drawFocus(false);
}
function onSetFocus(oldFocus) {
addEventListener("keyDown", this);
addEventListener("keyUp", this);
dispatchEvent({type:"focusIn"});
if (getFocusManager().bDrawFocus != false) {
drawFocus(true);
}
}
function findFocusInChildren(o) {
if (o.focusTextField != undefined) {
return(o.focusTextField);
}
if (o.tabEnabled == true) {
return(o);
}
return(undefined);
}
function findFocusFromObject(o) {
if (o.tabEnabled != true) {
if (o._parent == undefined) {
return(undefined);
}
if (o._parent.tabEnabled == true) {
o = o._parent;
} else if (o._parent.tabChildren) {
o = findFocusInChildren(o._parent);
} else {
o = findFocusFromObject(o._parent);
}
}
return(o);
}
function pressFocus() {
var _local3 = findFocusFromObject(this);
var _local2 = getFocus();
if (_local3 != _local2) {
_local2.drawFocus(false);
if (getFocusManager().bDrawFocus != false) {
_local3.drawFocus(true);
}
}
}
function releaseFocus() {
var _local2 = findFocusFromObject(this);
if (_local2 != getFocus()) {
_local2.setFocus();
}
}
function isParent(o) {
while (o != undefined) {
if (o == this) {
return(true);
}
o = o._parent;
}
return(false);
}
function size() {
}
function init() {
super.init();
_xscale = 100;
_yscale = 100;
_focusrect = _global.useFocusRect == false;
watch("enabled", enabledChanged);
if (enabled == false) {
setEnabled(false);
}
}
function dispatchValueChangedEvent(value) {
dispatchEvent({type:"valueChanged", value:value});
}
static var symbolName = "UIComponent";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.126";
static var kStretch = 5000;
var focusEnabled = true;
var tabEnabled = true;
var origBorderStyles = {themeColor:16711680};
var clipParameters = {};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.core.UIComponent.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
}
Symbol 51 MovieClip [__Packages.mx.controls.NumericStepper] Frame 0
class mx.controls.NumericStepper extends mx.core.UIComponent
{
var boundingBox_mc, _visible, tabEnabled, tabChildren, nextButton_mc, __width, prevButton_mc, __height, inputField, StepTrack_mc, focusTextField, createObject, enabled, __set__visible, setSize, createClassObject, __maxChars, dispatchEvent;
function NumericStepper () {
super();
}
function init() {
super.init();
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
_visible = false;
tabEnabled = false;
tabChildren = true;
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
if (initializing) {
__visible = x;
}
}
function layoutControl() {
nextButton_mc._x = __width - nextButton_mc.__width;
nextButton_mc._y = 0;
prevButton_mc._x = __width - prevButton_mc.__width;
prevButton_mc._y = __height - prevButton_mc.__height;
inputField.setSize(__width - nextButton_mc.__width, __height);
StepTrack_mc._width = Math.max(nextButton_mc.__width, prevButton_mc.__width);
StepTrack_mc._x = __width - StepTrack_mc._width;
StepTrack_mc._height = __height - (nextButton_mc._height + prevButton_mc._height);
StepTrack_mc._y = nextButton_mc.__height;
}
function createChildren() {
super.createChildren();
addAsset("nextButton_mc", skinIDUpArrow);
addAsset("prevButton_mc", skinIDDownArrow);
addAsset("inputField", skinIDInput);
focusTextField = inputField.label;
createObject("StepTrack", "StepTrack_mc", 2);
size();
}
function draw() {
prevButton_mc.enabled = enabled;
nextButton_mc.enabled = enabled;
inputField.enabled = enabled;
size();
initializing = false;
__set__visible(__visible);
}
function size() {
var _local2 = calcMinHeight();
var _local3 = calcMinWidth();
if (__height < _local2) {
setSize(__width, _local2);
}
if (__width < _local3) {
setSize(_local3, __height);
}
layoutControl();
}
function calcMinHeight() {
return(22);
}
function calcMinWidth() {
return(40);
}
function addAsset(id, skinID) {
var _local2 = new Object();
_local2.styleName = this;
if (skinID == 10) {
_local2.falseUpSkin = upArrowUp;
_local2.falseOverSkin = upArrowOver;
_local2.falseDownSkin = upArrowDown;
_local2.falseDisabledSkin = upArrowDisabled;
createClassObject(mx.controls.SimpleButton, id, skinID, _local2);
var _local5 = nextButton_mc;
_local5.tabEnabled = false;
_local5.styleName = this;
_local5._x = __width - _local5.__width;
_local5._y = 0;
_local5.owner = this;
_local5.autoRepeat = true;
_local5.clickHandler = function () {
Selection.setSelection(0, 0);
};
_local5.buttonDownHandler = function () {
this.owner.buttonPress(this);
};
} else if (skinID == 11) {
_local2.falseUpSkin = downArrowUp;
_local2.falseOverSkin = downArrowOver;
_local2.falseDownSkin = downArrowDown;
_local2.falseDisabledSkin = downArrowDisabled;
createClassObject(mx.controls.SimpleButton, id, skinID, _local2);
var _local3 = prevButton_mc;
_local3.tabEnabled = false;
_local3.styleName = this;
_local3._x = __width - _local3.__width;
_local3._y = __height - _local3.__height;
_local3.owner = this;
_local3.autoRepeat = true;
_local3.clickHandler = function () {
Selection.setSelection(0, 0);
};
_local3.buttonDownHandler = function () {
this.owner.buttonPress(this);
};
} else if (skinID == 9) {
createClassObject(mx.controls.TextInput, id, skinID);
var _local4 = inputField;
_local4.styleName = this;
_local4.setSize(__width - nextButton_mc.__width, __height);
_local4.restrict = "0-9\\-\\.\\,";
_local4.maxChars = __maxChars;
_local4.text = value;
_local4.onSetFocus = function () {
this._parent.onSetFocus();
};
_local4.onKillFocus = function () {
this._parent.onKillFocus();
};
_local4.drawFocus = function (b) {
this._parent.drawFocus(b);
};
_local4.onKeyDown = function () {
this._parent.onFieldKeyDown();
};
}
}
function setFocus() {
Selection.setFocus(inputField);
}
function onKillFocus() {
mx.managers.SystemManager.form.focusManager.defaultPushButtonEnabled = true;
super.onKillFocus();
Key.removeListener(inputField);
if (Number(inputField.text) != value) {
var _local3 = checkValidValue(Number(inputField.text));
inputField.text = _local3;
value = (_local3);
dispatchEvent({type:"change"});
}
}
function onSetFocus() {
super.onSetFocus();
Key.addListener(inputField);
mx.managers.SystemManager.form.focusManager.defaultPushButtonEnabled = false;
}
function onFieldKeyDown() {
var _local2 = value;
switch (Key.getCode()) {
case 40 :
var _local3 = value - stepSize;
value = (_local3);
if (_local2 != value) {
dispatchEvent({type:"change"});
}
break;
case 38 :
_local3 = stepSize + value;
value = (_local3);
if (_local2 != value) {
dispatchEvent({type:"change"});
}
break;
case 36 :
inputField.text = minimum;
value = (minimum);
if (_local2 != value) {
dispatchEvent({type:"change"});
}
break;
case 35 :
inputField.text = maximum;
value = (maximum);
if (_local2 != value) {
dispatchEvent({type:"change"});
}
break;
case 13 :
value = (Number(inputField.text));
if (_local2 == value) {
break;
}
dispatchEvent({type:"change"});
}
}
function get nextValue() {
if (checkRange(value + stepSize)) {
__nextValue = value + stepSize;
return(__nextValue);
}
}
function get previousValue() {
if (checkRange(__value - stepSize)) {
__previousValue = value - stepSize;
return(__previousValue);
}
}
function set maxChars(num) {
__maxChars = num;
inputField.maxChars = __maxChars;
//return(maxChars);
}
function get maxChars() {
return(__maxChars);
}
function get value() {
return(__value);
}
function set value(v) {
var _local2 = checkValidValue(v);
if (_local2 == __value) {
return;
}
inputField.text = (__value = _local2);
//return(value);
}
function get minimum() {
return(__minimum);
}
function set minimum(v) {
__minimum = v;
//return(minimum);
}
function get maximum() {
return(__maximum);
}
function set maximum(v) {
__maximum = v;
//return(maximum);
}
function get stepSize() {
return(__stepSize);
}
function set stepSize(v) {
__stepSize = v;
//return(stepSize);
}
function onFocus() {
}
function buttonPress(button) {
var _local2 = value;
if (button._name == "nextButton_mc") {
value = value + stepSize;
} else {
value = value - stepSize;
}
if (_local2 != value) {
dispatchEvent({type:"change"});
Selection.setSelection(0, 0);
}
}
function checkRange(v) {
return((v >= minimum) and (v <= maximum));
}
function checkValidValue(val) {
var _local7 = val / stepSize;
var _local9 = Math.floor(_local7);
var _local2 = stepSize;
var _local6 = minimum;
var _local5 = maximum;
if ((val > _local6) and (val < _local5)) {
if ((_local7 - _local9) == 0) {
return(val);
}
var _local8 = Math.floor(val / _local2);
var _local4 = _local8 * _local2;
if (((((val - _local4) >= (_local2 / 2)) && (_local5 >= (_local4 + _local2))) && (_local6 <= (_local4 - _local2))) || (((val + _local2) == _local5) && (((_local5 - _local4) - _local2) > 1E-14))) {
_local4 = _local4 + _local2;
}
return(_local4);
}
if (val >= _local5) {
return(_local5);
}
return(_local6);
}
function onLabelChanged(o) {
var _local2 = checkValidValue(Number(o.__get__text()));
o.__set__text(_local2);
value = (_local2);
}
function get tabIndex() {
return(inputField.tabIndex);
}
function set tabIndex(w) {
inputField.tabIndex = w;
//return(tabIndex);
}
static var symbolName = "NumericStepper";
static var symbolOwner = mx.controls.NumericStepper;
static var version = "2.0.2.126";
var className = "NumericStepper";
var upArrowUp = "StepUpArrowUp";
var upArrowDown = "StepUpArrowDown";
var upArrowOver = "StepUpArrowOver";
var upArrowDisabled = "StepUpArrowDisabled";
var downArrowUp = "StepDownArrowUp";
var downArrowDown = "StepDownArrowDown";
var downArrowOver = "StepDownArrowOver";
var downArrowDisabled = "StepDownArrowDisabled";
var skinIDUpArrow = 10;
var skinIDDownArrow = 11;
var skinIDInput = 9;
var initializing = true;
var __visible = true;
var __minimum = 0;
var __maximum = 10;
var __stepSize = 1;
var __value = 0;
var __nextValue = 0;
var __previousValue = 0;
var clipParameters = {minimum:1, maximum:1, stepSize:1, value:1, maxChars:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.NumericStepper.prototype.clipParameters, mx.core.UIComponent.prototype.clipParameters);
}
Symbol 101 MovieClip [__Packages.mx.skins.SkinElement] Frame 0
class mx.skins.SkinElement extends MovieClip
{
var _visible, _x, _y, _width, _height;
function SkinElement () {
super();
}
static function registerElement(name, className) {
Object.registerClass(name, ((className == undefined) ? (mx.skins.SkinElement) : (className)));
_global.skinRegistry[name] = true;
}
function __set__visible(visible) {
_visible = visible;
}
function move(x, y) {
_x = x;
_y = y;
}
function setSize(w, h) {
_width = w;
_height = h;
}
}
Symbol 102 MovieClip [__Packages.mx.styles.CSSTextStyles] Frame 0
class mx.styles.CSSTextStyles
{
function CSSTextStyles () {
}
static function addTextStyles(o, bColor) {
o.addProperty("textAlign", function () {
return(this._tf.align);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.align = x;
});
o.addProperty("fontWeight", function () {
return(((this._tf.bold != undefined) ? ((this._tf.bold ? "bold" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.bold = x == "bold";
});
if (bColor) {
o.addProperty("color", function () {
return(this._tf.color);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.color = x;
});
}
o.addProperty("fontFamily", function () {
return(this._tf.font);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.font = x;
});
o.addProperty("textIndent", function () {
return(this._tf.indent);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.indent = x;
});
o.addProperty("fontStyle", function () {
return(((this._tf.italic != undefined) ? ((this._tf.italic ? "italic" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.italic = x == "italic";
});
o.addProperty("marginLeft", function () {
return(this._tf.leftMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.leftMargin = x;
});
o.addProperty("marginRight", function () {
return(this._tf.rightMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.rightMargin = x;
});
o.addProperty("fontSize", function () {
return(this._tf.size);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.size = x;
});
o.addProperty("textDecoration", function () {
return(((this._tf.underline != undefined) ? ((this._tf.underline ? "underline" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.underline = x == "underline";
});
o.addProperty("embedFonts", function () {
return(this._tf.embedFonts);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.embedFonts = x;
});
}
}
Symbol 103 MovieClip [__Packages.mx.styles.StyleManager] Frame 0
class mx.styles.StyleManager
{
function StyleManager () {
}
static function registerInheritingStyle(styleName) {
inheritingStyles[styleName] = true;
}
static function isInheritingStyle(styleName) {
return(inheritingStyles[styleName] == true);
}
static function registerColorStyle(styleName) {
colorStyles[styleName] = true;
}
static function isColorStyle(styleName) {
return(colorStyles[styleName] == true);
}
static function registerColorName(colorName, colorValue) {
colorNames[colorName] = colorValue;
}
static function isColorName(colorName) {
return(colorNames[colorName] != undefined);
}
static function getColorName(colorName) {
return(colorNames[colorName]);
}
static var inheritingStyles = {color:true, direction:true, fontFamily:true, fontSize:true, fontStyle:true, fontWeight:true, textAlign:true, textIndent:true};
static var colorStyles = {barColor:true, trackColor:true, borderColor:true, buttonColor:true, color:true, dateHeaderColor:true, dateRollOverColor:true, disabledColor:true, fillColor:true, highlightColor:true, scrollTrackColor:true, selectedDateColor:true, shadowColor:true, strokeColor:true, symbolBackgroundColor:true, symbolBackgroundDisabledColor:true, symbolBackgroundPressedColor:true, symbolColor:true, symbolDisabledColor:true, themeColor:true, todayIndicatorColor:true, shadowCapColor:true, borderCapColor:true, focusColor:true};
static var colorNames = {black:0, white:16777215, red:16711680, green:65280, blue:255, magenta:16711935, yellow:16776960, cyan:65535, haloGreen:8453965, haloBlue:2881013, haloOrange:16761344};
static var TextFormatStyleProps = {font:true, size:true, color:true, leftMargin:false, rightMargin:false, italic:true, bold:true, align:true, indent:true, underline:false, embedFonts:false};
static var TextStyleMap = {textAlign:true, fontWeight:true, color:true, fontFamily:true, textIndent:true, fontStyle:true, lineHeight:true, marginLeft:true, marginRight:true, fontSize:true, textDecoration:true, embedFonts:true};
}
Symbol 104 MovieClip [__Packages.mx.styles.CSSStyleDeclaration] Frame 0
class mx.styles.CSSStyleDeclaration
{
var _tf;
function CSSStyleDeclaration () {
}
function __getTextFormat(tf, bAll) {
var _local5 = false;
if (_tf != undefined) {
var _local2;
for (_local2 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local2])) {
if (tf[_local2] == undefined) {
var _local3 = _tf[_local2];
if (_local3 != undefined) {
tf[_local2] = _local3;
} else {
_local5 = true;
}
}
}
}
} else {
_local5 = true;
}
return(_local5);
}
function getStyle(styleProp) {
var _local2 = this[styleProp];
var _local3 = mx.styles.StyleManager.getColorName(_local2);
return(((_local3 == undefined) ? (_local2) : (_local3)));
}
static function classConstruct() {
mx.styles.CSSTextStyles.addTextStyles(mx.styles.CSSStyleDeclaration.prototype, true);
return(true);
}
static var classConstructed = classConstruct();
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
}
Symbol 105 MovieClip [__Packages.mx.controls.SimpleButton] Frame 0
class mx.controls.SimpleButton extends mx.core.UIComponent
{
static var emphasizedStyleDeclaration;
var preset, boundingBox_mc, useHandCursor, skinName, linkLength, iconName, destroyObject, __width, _width, __height, _height, __emphaticStyleName, styleName, enabled, invalidate, pressFocus, dispatchEvent, autoRepeat, interval, getStyle, releaseFocus, createLabel, invalidateStyle;
function SimpleButton () {
super();
}
function init(Void) {
super.init();
if (preset == undefined) {
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
useHandCursor = false;
}
function createChildren(Void) {
if (preset != undefined) {
var _local2 = this[idNames[preset]];
this[refNames[preset]] = _local2;
skinName = _local2;
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
initializing = false;
} else if (__state == true) {
setStateVar(true);
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
}
}
function setIcon(tag, linkageName) {
return(setSkin(tag + 8, linkageName));
}
function changeIcon(tag, linkageName) {
linkLength = linkageName.length;
var _local2 = stateNames[tag] + "Icon";
this[_local2] = linkageName;
this[idNames[tag + 8]] = _local2;
setStateVar(getState());
}
function changeSkin(tag, linkageName) {
var _local2 = stateNames[tag] + "Skin";
this[_local2] = linkageName;
this[idNames[tag]] = _local2;
setStateVar(getState());
}
function viewIcon(varName) {
var _local4 = varName + "Icon";
var _local3 = this[_local4];
if (typeof(_local3) == "string") {
var _local5 = _local3;
if (__emphasized) {
if (this[_local3 + "Emphasized"].length > 0) {
_local3 = _local3 + "Emphasized";
}
}
if (this[_local3].length == 0) {
return(undefined);
}
_local3 = setIcon(tagMap[_local5], this[_local3]);
if ((_local3 == undefined) && (_global.isLivePreview)) {
_local3 = setIcon(0, "ButtonIcon");
}
this[_local4] = _local3;
}
iconName._visible = false;
iconName = _local3;
iconName._visible = true;
}
function removeIcons() {
var _local3 = 0;
while (_local3 < 2) {
var _local2 = 8;
while (_local2 < 16) {
destroyObject(idNames[_local2]);
this[stateNames[_local2 - 8] + "Icon"] = "";
_local2++;
}
_local3++;
}
refresh();
}
function setSkin(tag, linkageName, initobj) {
var _local3 = super.setSkin(tag, linkageName, ((initobj != undefined) ? (initobj) : ({styleName:this})));
calcSize(tag, _local3);
return(_local3);
}
function calcSize(Void) {
__width = _width;
__height = _height;
}
function viewSkin(varName, initObj) {
var _local3 = varName + "Skin";
var _local2 = this[_local3];
if (typeof(_local2) == "string") {
var _local4 = _local2;
if (__emphasized) {
if (this[_local2 + "Emphasized"].length > 0) {
_local2 = _local2 + "Emphasized";
}
}
if (this[_local2].length == 0) {
return(undefined);
}
_local2 = setSkin(tagMap[_local4], this[_local2], ((initObj != undefined) ? (initObj) : ({styleName:this})));
this[_local3] = _local2;
}
skinName._visible = false;
skinName = _local2;
skinName._visible = true;
}
function showEmphasized(e) {
if (e && (!__emphatic)) {
if (emphasizedStyleDeclaration != undefined) {
__emphaticStyleName = styleName;
styleName = emphasizedStyleDeclaration;
}
__emphatic = true;
} else {
if (__emphatic) {
styleName = __emphaticStyleName;
}
__emphatic = false;
}
}
function refresh(Void) {
var _local2 = getState();
if (enabled == false) {
viewIcon("disabled");
viewSkin("disabled");
} else {
viewSkin(phase);
viewIcon(phase);
}
setView(phase == "down");
iconName.enabled = enabled;
}
function setView(offset) {
if (iconName == undefined) {
return(undefined);
}
var _local2 = (offset ? (btnOffset) : 0);
iconName._x = ((__width - iconName._width) / 2) + _local2;
iconName._y = ((__height - iconName._height) / 2) + _local2;
}
function setStateVar(state) {
if (state) {
if (trueOverSkin.length == 0) {
rolloverSkin = tus;
} else {
rolloverSkin = trs;
}
if (trueOverIcon.length == 0) {
rolloverIcon = tui;
} else {
rolloverIcon = tri;
}
upSkin = tus;
downSkin = tds;
disabledSkin = dts;
upIcon = tui;
downIcon = tdi;
disabledIcon = dti;
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
} else {
rolloverSkin = frs;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
} else {
rolloverIcon = fri;
}
upSkin = fus;
downSkin = fds;
disabledSkin = dfs;
upIcon = fui;
downIcon = fdi;
disabledIcon = dfi;
}
__state = state;
}
function setState(state) {
if (state != __state) {
setStateVar(state);
invalidate();
}
}
function size(Void) {
refresh();
}
function draw(Void) {
if (initializing) {
initializing = false;
skinName.visible = true;
iconName.visible = true;
}
size();
}
function getState(Void) {
return(__state);
}
function setToggle(val) {
__toggle = val;
if (__toggle == false) {
setState(false);
}
}
function getToggle(Void) {
return(__toggle);
}
function set toggle(val) {
setToggle(val);
//return(toggle);
}
function get toggle() {
return(getToggle());
}
function set value(val) {
setSelected(val);
//return(value);
}
function get value() {
return(getSelected());
}
function set selected(val) {
setSelected(val);
//return(selected);
}
function get selected() {
return(getSelected());
}
function setSelected(val) {
if (__toggle) {
setState(val);
} else {
setState((initializing ? (val) : (__state)));
}
}
function getSelected() {
return(__state);
}
function setEnabled(val) {
if (enabled != val) {
super.setEnabled(val);
invalidate();
}
}
function onPress(Void) {
pressFocus();
phase = "down";
refresh();
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
interval = setInterval(this, "onPressDelay", getStyle("repeatDelay"));
}
}
function onPressDelay(Void) {
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
clearInterval(interval);
interval = setInterval(this, "onPressRepeat", getStyle("repeatInterval"));
}
}
function onPressRepeat(Void) {
dispatchEvent({type:"buttonDown"});
updateAfterEvent();
}
function onRelease(Void) {
releaseFocus();
phase = "rollover";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
if (getToggle()) {
setState(!getState());
} else {
refresh();
}
dispatchEvent({type:"click"});
}
function onDragOut(Void) {
phase = "up";
refresh();
dispatchEvent({type:"buttonDragOut"});
}
function onDragOver(Void) {
if (phase != "up") {
onPress();
return(undefined);
}
phase = "down";
refresh();
}
function onReleaseOutside(Void) {
releaseFocus();
phase = "up";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
}
function onRollOver(Void) {
phase = "rollover";
refresh();
}
function onRollOut(Void) {
phase = "up";
refresh();
}
function getLabel(Void) {
return(fui.text);
}
function setLabel(val) {
if (typeof(fui) == "string") {
createLabel("fui", 8, val);
fui.styleName = this;
} else {
fui.text = val;
}
var _local4 = fui._getTextFormat();
var _local2 = _local4.getTextExtent2(val);
fui._width = _local2.width + 5;
fui._height = _local2.height + 5;
iconName = fui;
setView(__state);
}
function get emphasized() {
return(__emphasized);
}
function set emphasized(val) {
__emphasized = val;
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]] = stateNames[_local2] + "Skin";
if (typeof(this[idNames[_local2 + 8]]) == "movieclip") {
this[idNames[_local2 + 8]] = stateNames[_local2] + "Icon";
}
_local2++;
}
showEmphasized(__emphasized);
setStateVar(__state);
invalidateStyle();
//return(emphasized);
}
function keyDown(e) {
if (e.code == 32) {
onPress();
}
}
function keyUp(e) {
if (e.code == 32) {
onRelease();
}
}
function onKillFocus(newFocus) {
super.onKillFocus();
if (phase != "up") {
phase = "up";
refresh();
}
}
static var symbolName = "SimpleButton";
static var symbolOwner = mx.controls.SimpleButton;
static var version = "2.0.2.126";
var className = "SimpleButton";
var style3dInset = 4;
var btnOffset = 1;
var __toggle = false;
var __state = false;
var __emphasized = false;
var __emphatic = false;
static var falseUp = 0;
static var falseDown = 1;
static var falseOver = 2;
static var falseDisabled = 3;
static var trueUp = 4;
static var trueDown = 5;
static var trueOver = 6;
static var trueDisabled = 7;
var falseUpSkin = "SimpleButtonUp";
var falseDownSkin = "SimpleButtonIn";
var falseOverSkin = "";
var falseDisabledSkin = "SimpleButtonUp";
var trueUpSkin = "SimpleButtonIn";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "SimpleButtonIn";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var phase = "up";
var fui = "falseUpIcon";
var fus = "falseUpSkin";
var fdi = "falseDownIcon";
var fds = "falseDownSkin";
var frs = "falseOverSkin";
var fri = "falseOverIcon";
var dfi = "falseDisabledIcon";
var dfs = "falseDisabledSkin";
var tui = "trueUpIcon";
var tus = "trueUpSkin";
var tdi = "trueDownIcon";
var tds = "trueDownSkin";
var trs = "trueOverSkin";
var tri = "trueOverIcon";
var dts = "trueDisabledSkin";
var dti = "trueDisabledIcon";
var rolloverSkin = mx.controls.SimpleButton.prototype.frs;
var rolloverIcon = mx.controls.SimpleButton.prototype.fri;
var upSkin = mx.controls.SimpleButton.prototype.fus;
var downSkin = mx.controls.SimpleButton.prototype.fds;
var disabledSkin = mx.controls.SimpleButton.prototype.dfs;
var upIcon = mx.controls.SimpleButton.prototype.fui;
var downIcon = mx.controls.SimpleButton.prototype.fdi;
var disabledIcon = mx.controls.SimpleButton.prototype.dfi;
var initializing = true;
var idNames = ["fus", "fds", "frs", "dfs", "tus", "tds", "trs", "dts", "fui", "fdi", "fri", "dfi", "tui", "tdi", "tri", "dti"];
var stateNames = ["falseUp", "falseDown", "falseOver", "falseDisabled", "trueUp", "trueDown", "trueOver", "trueDisabled"];
var refNames = ["upSkin", "downSkin", "rolloverSkin", "disabledSkin"];
var tagMap = {falseUpSkin:0, falseDownSkin:1, falseOverSkin:2, falseDisabledSkin:3, trueUpSkin:4, trueDownSkin:5, trueOverSkin:6, trueDisabledSkin:7, falseUpIcon:0, falseDownIcon:1, falseOverIcon:2, falseDisabledIcon:3, trueUpIcon:4, trueDownIcon:5, trueOverIcon:6, trueDisabledIcon:7};
}
Symbol 106 MovieClip [__Packages.mx.skins.Border] Frame 0
class mx.skins.Border extends mx.core.UIObject
{
function Border () {
super();
}
function init(Void) {
super.init();
}
static var symbolName = "Border";
static var symbolOwner = mx.skins.Border;
var className = "Border";
var tagBorder = 0;
var idNames = new Array("border_mc");
}
Symbol 107 MovieClip [__Packages.mx.skins.RectBorder] Frame 0
class mx.skins.RectBorder extends mx.skins.Border
{
var __width, __height, offset, __borderMetrics;
function RectBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function draw(Void) {
size();
}
function getBorderMetrics(Void) {
var _local2 = offset;
if (__borderMetrics == undefined) {
__borderMetrics = {left:_local2, top:_local2, right:_local2, bottom:_local2};
} else {
__borderMetrics.left = _local2;
__borderMetrics.top = _local2;
__borderMetrics.right = _local2;
__borderMetrics.bottom = _local2;
}
return(__borderMetrics);
}
function get borderMetrics() {
return(getBorderMetrics());
}
function drawBorder(Void) {
}
function size(Void) {
drawBorder();
}
function setColor(Void) {
drawBorder();
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.RectBorder;
static var version = "2.0.2.126";
var className = "RectBorder";
var borderStyleName = "borderStyle";
var borderColorName = "borderColor";
var shadowColorName = "shadowColor";
var highlightColorName = "highlightColor";
var buttonColorName = "buttonColor";
var backgroundColorName = "backgroundColor";
}
Symbol 108 MovieClip [__Packages.mx.controls.TextInput] Frame 0
class mx.controls.TextInput extends mx.core.UIComponent
{
var owner, enterListener, label, tabChildren, tabEnabled, focusTextField, _color, _parent, border_mc, createClassObject, dispatchValueChangedEvent, __get__width, __get__height, tfx, tfy, tfw, tfh, getStyle, bind, updateModel, _getTextFormat, enabled;
function TextInput () {
super();
}
function addEventListener(event, handler) {
if (event == "enter") {
addEnterEvents();
}
super.addEventListener(event, handler);
}
function enterOnKeyDown() {
if (Key.getAscii() == 13) {
owner.dispatchEvent({type:"enter"});
}
}
function addEnterEvents() {
if (enterListener == undefined) {
enterListener = new Object();
enterListener.owner = this;
enterListener.onKeyDown = enterOnKeyDown;
}
}
function init(Void) {
super.init();
label.styleName = this;
tabChildren = true;
tabEnabled = false;
focusTextField = label;
_color = mx.core.UIObject.textColorList;
label.onSetFocus = function () {
this._parent.onSetFocus();
};
label.onKillFocus = function (n) {
this._parent.onKillFocus(n);
};
label.drawFocus = function (b) {
this._parent.drawFocus(b);
};
label.onChanged = onLabelChanged;
}
function setFocus() {
Selection.setFocus(label);
}
function onLabelChanged(Void) {
_parent.dispatchEvent({type:"change"});
_parent.dispatchValueChangedEvent(text);
}
function createChildren(Void) {
super.createChildren();
if (border_mc == undefined) {
createClassObject(_global.styles.rectBorderClass, "border_mc", 0, {styleName:this});
}
border_mc.swapDepths(label);
label.autoSize = "none";
}
function get html() {
return(getHtml());
}
function set html(value) {
setHtml(value);
//return(html);
}
function getHtml() {
return(label.html);
}
function setHtml(value) {
if (value != label.html) {
label.html = value;
}
}
function get text() {
return(getText());
}
function set text(t) {
setText(t);
//return(text);
}
function getText() {
if (initializing) {
return(initText);
}
if (label.html == true) {
return(label.htmlText);
}
return(label.text);
}
function setText(t) {
if (initializing) {
initText = t;
} else {
var _local2 = label;
if (_local2.html == true) {
_local2.htmlText = t;
} else {
_local2.text = t;
}
}
dispatchValueChangedEvent(t);
}
function size(Void) {
border_mc.setSize(__get__width(), __get__height());
var _local2 = border_mc.__get__borderMetrics();
var _local6 = _local2.left + _local2.right;
var _local3 = _local2.top + _local2.bottom;
var _local5 = _local2.left;
var _local4 = _local2.top;
tfx = _local5;
tfy = _local4;
tfw = __get__width() - _local6;
tfh = __get__height() - _local3;
label.move(tfx, tfy);
label.setSize(tfw, tfh + 1);
}
function setEnabled(enable) {
label.type = (((__editable == true) || (enable == false)) ? "input" : "dynamic");
label.selectable = enable;
var _local2 = getStyle((enable ? "color" : "disabledColor"));
if (_local2 == undefined) {
_local2 = (enable ? 0 : 8947848);
}
setColor(_local2);
}
function setColor(col) {
label.textColor = col;
}
function onKillFocus(newFocus) {
if (enterListener != undefined) {
Key.removeListener(enterListener);
}
if (bind != undefined) {
updateModel(text);
}
super.onKillFocus(newFocus);
}
function onSetFocus(oldFocus) {
var f = Selection.getFocus();
var o = eval (f);
if (o != label) {
Selection.setFocus(label);
return(undefined);
}
if (enterListener != undefined) {
Key.addListener(enterListener);
}
super.onSetFocus(oldFocus);
}
function draw(Void) {
var _local2 = label;
var _local4 = getText();
if (initializing) {
initializing = false;
delete initText;
}
var _local3 = _getTextFormat();
_local2.embedFonts = _local3.embedFonts == true;
if (_local3 != undefined) {
_local2.setTextFormat(_local3);
_local2.setNewTextFormat(_local3);
}
_local2.multiline = false;
_local2.wordWrap = false;
if (_local2.html == true) {
_local2.setTextFormat(_local3);
_local2.htmlText = _local4;
} else {
_local2.text = _local4;
}
_local2.type = (((__editable == true) || (enabled == false)) ? "input" : "dynamic");
size();
}
function setEditable(s) {
__editable = s;
label.type = (s ? "input" : "dynamic");
}
function get maxChars() {
return(label.maxChars);
}
function set maxChars(w) {
label.maxChars = w;
//return(maxChars);
}
function get length() {
return(label.length);
}
function get restrict() {
return(label.restrict);
}
function set restrict(w) {
label.restrict = ((w == "") ? null : (w));
//return(restrict);
}
function get hPosition() {
return(label.hscroll);
}
function set hPosition(w) {
label.hscroll = w;
//return(hPosition);
}
function get maxHPosition() {
return(label.maxhscroll);
}
function get editable() {
return(__editable);
}
function set editable(w) {
setEditable(w);
//return(editable);
}
function get password() {
return(label.password);
}
function set password(w) {
label.password = w;
//return(password);
}
function get tabIndex() {
return(label.tabIndex);
}
function set tabIndex(w) {
label.tabIndex = w;
//return(tabIndex);
}
function set _accProps(val) {
label._accProps = val;
//return(_accProps);
}
function get _accProps() {
return(label._accProps);
}
static var symbolName = "TextInput";
static var symbolOwner = mx.controls.TextInput;
static var version = "2.0.2.126";
var className = "TextInput";
var initializing = true;
var clipParameters = {text:1, editable:1, password:1, maxChars:1, restrict:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.TextInput.prototype.clipParameters, mx.core.UIComponent.prototype.clipParameters);
var _maxWidth = mx.core.UIComponent.kStretch;
var __editable = true;
var initText = "";
}
Symbol 109 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 110 MovieClip [__Packages.mx.managers.SystemManager] Frame 0
class mx.managers.SystemManager
{
static var _xAddEventListener, addEventListener, __addEventListener, _xRemoveEventListener, removeEventListener, __removeEventListener, form, __screen, dispatchEvent;
function SystemManager () {
}
static function init(Void) {
if (_initialized == false) {
_initialized = true;
mx.events.EventDispatcher.initialize(mx.managers.SystemManager);
Mouse.addListener(mx.managers.SystemManager);
Stage.addListener(mx.managers.SystemManager);
_xAddEventListener = addEventListener;
addEventListener = __addEventListener;
_xRemoveEventListener = removeEventListener;
removeEventListener = __removeEventListener;
}
}
static function addFocusManager(f) {
form = f;
f.focusManager.activate();
}
static function removeFocusManager(f) {
}
static function onMouseDown(Void) {
var _local1 = form;
_local1.focusManager._onMouseDown();
}
static function onResize(Void) {
var _local7 = Stage.width;
var _local6 = Stage.height;
var _local9 = _global.origWidth;
var _local8 = _global.origHeight;
var _local3 = Stage.align;
var _local5 = (_local9 - _local7) / 2;
var _local4 = (_local8 - _local6) / 2;
if (_local3 == "T") {
_local4 = 0;
} else if (_local3 == "B") {
_local4 = _local8 - _local6;
} else if (_local3 == "L") {
_local5 = 0;
} else if (_local3 == "R") {
_local5 = _local9 - _local7;
} else if (_local3 == "LT") {
_local4 = 0;
_local5 = 0;
} else if (_local3 == "TR") {
_local4 = 0;
_local5 = _local9 - _local7;
} else if (_local3 == "LB") {
_local4 = _local8 - _local6;
_local5 = 0;
} else if (_local3 == "RB") {
_local4 = _local8 - _local6;
_local5 = _local9 - _local7;
}
if (__screen == undefined) {
__screen = new Object();
}
__screen.x = _local5;
__screen.y = _local4;
__screen.width = _local7;
__screen.height = _local6;
_root.focusManager.relocate();
dispatchEvent({type:"resize"});
}
static function get screen() {
init();
if (__screen == undefined) {
onResize();
}
return(__screen);
}
static var _initialized = false;
static var idleFrames = 0;
static var isMouseDown = false;
static var forms = new Array();
}
Symbol 111 MovieClip [__Packages.mx.events.UIEventDispatcher] Frame 0
class mx.events.UIEventDispatcher extends mx.events.EventDispatcher
{
var dispatchQueue, owner, __sentLoadEvent, __origAddEventListener;
function UIEventDispatcher () {
super();
}
static function addKeyEvents(obj) {
if (obj.keyHandler == undefined) {
var _local1 = (obj.keyHandler = new Object());
_local1.owner = obj;
_local1.onKeyDown = _fEventDispatcher.onKeyDown;
_local1.onKeyUp = _fEventDispatcher.onKeyUp;
}
Key.addListener(obj.keyHandler);
}
static function removeKeyEvents(obj) {
Key.removeListener(obj.keyHandler);
}
static function addLoadEvents(obj) {
if (obj.onLoad == undefined) {
obj.onLoad = _fEventDispatcher.onLoad;
obj.onUnload = _fEventDispatcher.onUnload;
if (obj.getBytesTotal() == obj.getBytesLoaded()) {
obj.doLater(obj, "onLoad");
}
}
}
static function removeLoadEvents(obj) {
delete obj.onLoad;
delete obj.onUnload;
}
static function initialize(obj) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.UIEventDispatcher();
}
obj.addEventListener = _fEventDispatcher.__addEventListener;
obj.__origAddEventListener = _fEventDispatcher.addEventListener;
obj.removeEventListener = _fEventDispatcher.removeEventListener;
obj.dispatchEvent = _fEventDispatcher.dispatchEvent;
obj.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(mx.events.EventDispatcher, eventObj);
dispatchQueue(this, eventObj);
}
function onKeyDown(Void) {
owner.dispatchEvent({type:"keyDown", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onKeyUp(Void) {
owner.dispatchEvent({type:"keyUp", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onLoad(Void) {
if (__sentLoadEvent != true) {
dispatchEvent({type:"load"});
}
__sentLoadEvent = true;
}
function onUnload(Void) {
dispatchEvent({type:"unload"});
}
function __addEventListener(event, handler) {
__origAddEventListener(event, handler);
var _local3 = lowLevelEvents;
for (var _local5 in _local3) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local2 = _local3[_local5][0];
mx.events.UIEventDispatcher[_local2](this);
}
}
}
function removeEventListener(event, handler) {
var _local6 = "__q_" + event;
mx.events.EventDispatcher._removeEventListener(this[_local6], event, handler);
if (this[_local6].length == 0) {
var _local2 = lowLevelEvents;
for (var _local5 in _local2) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local3 = _local2[_local5][1];
mx.events.UIEventDispatcher[_local2[_local5][1]](this);
}
}
}
}
static var keyEvents = {keyDown:1, keyUp:1};
static var loadEvents = {load:1, unload:1};
static var lowLevelEvents = {keyEvents:["addKeyEvents", "removeKeyEvents"], loadEvents:["addLoadEvents", "removeLoadEvents"]};
static var _fEventDispatcher = undefined;
}
Symbol 112 MovieClip [__Packages.mx.skins.ColoredSkinElement] Frame 0
class mx.skins.ColoredSkinElement
{
var getStyle, _color, onEnterFrame;
function ColoredSkinElement () {
}
function setColor(c) {
if (c != undefined) {
var _local2 = new Color(this);
_local2.setRGB(c);
}
}
function draw(Void) {
setColor(getStyle(_color));
onEnterFrame = undefined;
}
function invalidateStyle(Void) {
onEnterFrame = draw;
}
static function setColorStyle(p, colorStyle) {
if (p._color == undefined) {
p._color = colorStyle;
}
p.setColor = mixins.setColor;
p.invalidateStyle = mixins.invalidateStyle;
p.draw = mixins.draw;
p.setColor(p.getStyle(colorStyle));
}
static var mixins = new mx.skins.ColoredSkinElement();
}
Symbol 113 MovieClip [__Packages.mx.core.ext.UIObjectExtensions] Frame 0
class mx.core.ext.UIObjectExtensions
{
function UIObjectExtensions () {
}
static function addGeometry(tf, ui) {
tf.addProperty("width", ui.__get__width, null);
tf.addProperty("height", ui.__get__height, null);
tf.addProperty("left", ui.__get__left, null);
tf.addProperty("x", ui.__get__x, null);
tf.addProperty("top", ui.__get__top, null);
tf.addProperty("y", ui.__get__y, null);
tf.addProperty("right", ui.__get__right, null);
tf.addProperty("bottom", ui.__get__bottom, null);
tf.addProperty("visible", ui.__get__visible, ui.__set__visible);
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
var _local6 = mx.core.UIObject.prototype;
var _local9 = mx.skins.SkinElement.prototype;
addGeometry(_local9, _local6);
mx.events.UIEventDispatcher.initialize(_local6);
var _local13 = mx.skins.ColoredSkinElement;
mx.styles.CSSTextStyles.addTextStyles(_local6);
var _local5 = MovieClip.prototype;
_local5.getTopLevel = _local6.getTopLevel;
_local5.createLabel = _local6.createLabel;
_local5.createObject = _local6.createObject;
_local5.createClassObject = _local6.createClassObject;
_local5.createEmptyObject = _local6.createEmptyObject;
_local5.destroyObject = _local6.destroyObject;
_global.ASSetPropFlags(_local5, "getTopLevel", 1);
_global.ASSetPropFlags(_local5, "createLabel", 1);
_global.ASSetPropFlags(_local5, "createObject", 1);
_global.ASSetPropFlags(_local5, "createClassObject", 1);
_global.ASSetPropFlags(_local5, "createEmptyObject", 1);
_global.ASSetPropFlags(_local5, "destroyObject", 1);
_local5.__getTextFormat = _local6.__getTextFormat;
_local5._getTextFormat = _local6._getTextFormat;
_local5.getStyleName = _local6.getStyleName;
_local5.getStyle = _local6.getStyle;
_global.ASSetPropFlags(_local5, "__getTextFormat", 1);
_global.ASSetPropFlags(_local5, "_getTextFormat", 1);
_global.ASSetPropFlags(_local5, "getStyleName", 1);
_global.ASSetPropFlags(_local5, "getStyle", 1);
var _local7 = TextField.prototype;
addGeometry(_local7, _local6);
_local7.addProperty("enabled", function () {
return(this.__enabled);
}, function (x) {
this.__enabled = x;
this.invalidateStyle();
});
_local7.move = _local9.move;
_local7.setSize = _local9.setSize;
_local7.invalidateStyle = function () {
this.invalidateFlag = true;
};
_local7.draw = function () {
if (this.invalidateFlag) {
this.invalidateFlag = false;
var _local2 = this._getTextFormat();
this.setTextFormat(_local2);
this.setNewTextFormat(_local2);
this.embedFonts = _local2.embedFonts == true;
if (this.__text != undefined) {
if (this.text == "") {
this.text = this.__text;
}
delete this.__text;
}
this._visible = true;
}
};
_local7.setColor = function (color) {
this.textColor = color;
};
_local7.getStyle = _local5.getStyle;
_local7.__getTextFormat = _local6.__getTextFormat;
_local7.setValue = function (v) {
this.text = v;
};
_local7.getValue = function () {
return(this.text);
};
_local7.addProperty("value", function () {
return(this.getValue());
}, function (v) {
this.setValue(v);
});
_local7._getTextFormat = function () {
var _local2 = this.stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
this.__getTextFormat(_local2);
this.stylecache.tf = _local2;
if (this.__enabled == false) {
if (this.enabledColor == undefined) {
var _local4 = this.getTextFormat();
this.enabledColor = _local4.color;
}
var _local3 = this.getStyle("disabledColor");
_local2.color = _local3;
} else if (this.enabledColor != undefined) {
if (_local2.color == undefined) {
_local2.color = this.enabledColor;
}
}
return(_local2);
};
_local7.getPreferredWidth = function () {
this.draw();
return(this.textWidth + 4);
};
_local7.getPreferredHeight = function () {
this.draw();
return(this.textHeight + 4);
};
TextFormat.prototype.getTextExtent2 = function (s) {
var _local3 = _root._getTextExtent;
if (_local3 == undefined) {
_root.createTextField("_getTextExtent", -2, 0, 0, 1000, 100);
_local3 = _root._getTextExtent;
_local3._visible = false;
}
_root._getTextExtent.text = s;
var _local4 = this.align;
this.align = "left";
_root._getTextExtent.setTextFormat(this);
this.align = _local4;
return({width:_local3.textWidth, height:_local3.textHeight});
};
if (_global.style == undefined) {
_global.style = new mx.styles.CSSStyleDeclaration();
_global.cascadingStyles = true;
_global.styles = new Object();
_global.skinRegistry = new Object();
if (_global._origWidth == undefined) {
_global.origWidth = Stage.width;
_global.origHeight = Stage.height;
}
}
var _local4 = _root;
while (_local4._parent != undefined) {
_local4 = _local4._parent;
}
_local4.addProperty("width", function () {
return(Stage.width);
}, null);
_local4.addProperty("height", function () {
return(Stage.height);
}, null);
_global.ASSetPropFlags(_local4, "width", 1);
_global.ASSetPropFlags(_local4, "height", 1);
return(true);
}
static var bExtended = false;
static var UIObjectExtended = Extensions();
static var UIObjectDependency = mx.core.UIObject;
static var SkinElementDependency = mx.skins.SkinElement;
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
static var UIEventDispatcherDependency = mx.events.UIEventDispatcher;
}
Symbol 114 MovieClip [__Packages.mx.skins.halo.Defaults] Frame 0
class mx.skins.halo.Defaults
{
var beginGradientFill, beginFill, moveTo, lineTo, curveTo, endFill;
function Defaults () {
}
static function setThemeDefaults() {
var _local2 = _global.style;
_local2.themeColor = 8453965 /* 0x80FF4D */;
_local2.disabledColor = 8684164 /* 0x848284 */;
_local2.modalTransparency = 0;
_local2.filled = true;
_local2.stroked = true;
_local2.strokeWidth = 1;
_local2.strokeColor = 0;
_local2.fillColor = 16777215 /* 0xFFFFFF */;
_local2.repeatInterval = 35;
_local2.repeatDelay = 500;
_local2.fontFamily = "_sans";
_local2.fontSize = 12;
_local2.selectionColor = 13500353 /* 0xCDFFC1 */;
_local2.rollOverColor = 14942166 /* 0xE3FFD6 */;
_local2.useRollOver = true;
_local2.backgroundDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDuration = 200;
_local2.openDuration = 250;
_local2.borderStyle = "inset";
_local2.color = 734012 /* 0x0B333C */;
_local2.textSelectedColor = 24371;
_local2.textRollOverColor = 2831164 /* 0x2B333C */;
_local2.textDisabledColor = 16777215 /* 0xFFFFFF */;
_local2.vGridLines = true;
_local2.hGridLines = false;
_local2.vGridLineColor = 6710886 /* 0x666666 */;
_local2.hGridLineColor = 6710886 /* 0x666666 */;
_local2.headerColor = 15395562 /* 0xEAEAEA */;
_local2.indentation = 17;
_local2.folderOpenIcon = "TreeFolderOpen";
_local2.folderClosedIcon = "TreeFolderClosed";
_local2.defaultLeafIcon = "TreeNodeIcon";
_local2.disclosureOpenIcon = "TreeDisclosureOpen";
_local2.disclosureClosedIcon = "TreeDisclosureClosed";
_local2.popupDuration = 150;
_local2.todayColor = 6710886 /* 0x666666 */;
_local2 = (_global.styles.ScrollSelectList = new mx.styles.CSSStyleDeclaration());
_local2.backgroundColor = 16777215 /* 0xFFFFFF */;
_local2.borderColor = 13290186 /* 0xCACACA */;
_local2.borderStyle = "inset";
_local2 = (_global.styles.ComboBox = new mx.styles.CSSStyleDeclaration());
_local2.borderStyle = "inset";
_local2 = (_global.styles.NumericStepper = new mx.styles.CSSStyleDeclaration());
_local2.textAlign = "center";
_local2 = (_global.styles.RectBorder = new mx.styles.CSSStyleDeclaration());
_local2.borderColor = 14015965 /* 0xD5DDDD */;
_local2.buttonColor = 7305079 /* 0x6F7777 */;
_local2.shadowColor = 15658734 /* 0xEEEEEE */;
_local2.highlightColor = 12897484 /* 0xC4CCCC */;
_local2.shadowCapColor = 14015965 /* 0xD5DDDD */;
_local2.borderCapColor = 9542041 /* 0x919999 */;
var _local4 = new Object();
_local4.borderColor = 16711680 /* 0xFF0000 */;
_local4.buttonColor = 16711680 /* 0xFF0000 */;
_local4.shadowColor = 16711680 /* 0xFF0000 */;
_local4.highlightColor = 16711680 /* 0xFF0000 */;
_local4.shadowCapColor = 16711680 /* 0xFF0000 */;
_local4.borderCapColor = 16711680 /* 0xFF0000 */;
mx.core.UIComponent.prototype.origBorderStyles = _local4;
var _local3;
_local3 = (_global.styles.TextInput = new mx.styles.CSSStyleDeclaration());
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderStyle = "inset";
_global.styles.TextArea = _global.styles.TextInput;
_local3 = (_global.styles.Window = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "default";
_local3 = (_global.styles.windowStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.dataGridStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.Alert = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "alert";
_local3 = (_global.styles.ScrollView = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "inset";
_local3 = (_global.styles.View = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "none";
_local3 = (_global.styles.ProgressBar = new mx.styles.CSSStyleDeclaration());
_local3.color = 11187123 /* 0xAAB3B3 */;
_local3.fontWeight = "bold";
_local3 = (_global.styles.AccordionHeader = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = "11";
_local3 = (_global.styles.Accordion = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "solid";
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderColor = 9081738 /* 0x8A938A */;
_local3.headerHeight = 22;
_local3.marginLeft = (_local3.marginRight = (_local3.marginTop = (_local3.marginBottom = -1)));
_local3.verticalGap = -1;
_local3 = (_global.styles.DateChooser = new mx.styles.CSSStyleDeclaration());
_local3.borderColor = 9542041 /* 0x919999 */;
_local3.headerColor = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.CalendarLayout = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 10;
_local3.textAlign = "right";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.WeekDayStyle = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = 11;
_local3.textAlign = "center";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.TodayStyle = new mx.styles.CSSStyleDeclaration());
_local3.color = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.HeaderDateText = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 12;
_local3.fontWeight = "bold";
_local3.textAlign = "center";
}
function drawRoundRect(x, y, w, h, r, c, alpha, rot, gradient, ratios) {
if (typeof(r) == "object") {
var _local18 = r.br;
var _local16 = r.bl;
var _local15 = r.tl;
var _local10 = r.tr;
} else {
var _local10 = r;
var _local15 = _local10;
var _local16 = _local15;
var _local18 = _local16;
}
if (typeof(c) == "object") {
if (typeof(alpha) != "object") {
var _local9 = [alpha, alpha];
} else {
var _local9 = alpha;
}
if (ratios == undefined) {
ratios = [0, 255];
}
var _local14 = h * 0.7;
if (typeof(rot) != "object") {
var _local11 = {matrixType:"box", x:-_local14, y:_local14, w:w * 2, h:h * 4, r:rot * 0.0174532925199433 /* Math.PI/180 */};
} else {
var _local11 = rot;
}
if (gradient == "radial") {
beginGradientFill("radial", c, _local9, ratios, _local11);
} else {
beginGradientFill("linear", c, _local9, ratios, _local11);
}
} else if (c != undefined) {
beginFill(c, alpha);
}
r = _local18;
var _local13 = r - (r * 0.707106781186547);
var _local12 = r - (r * 0.414213562373095);
moveTo(x + w, (y + h) - r);
lineTo(x + w, (y + h) - r);
curveTo(x + w, (y + h) - _local12, (x + w) - _local13, (y + h) - _local13);
curveTo((x + w) - _local12, y + h, (x + w) - r, y + h);
r = _local16;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x + r, y + h);
curveTo(x + _local12, y + h, x + _local13, (y + h) - _local13);
curveTo(x, (y + h) - _local12, x, (y + h) - r);
r = _local15;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x, y + r);
curveTo(x, y + _local12, x + _local13, y + _local13);
curveTo(x + _local12, y, x + r, y);
r = _local10;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo((x + w) - r, y);
curveTo((x + w) - _local12, y, (x + w) - _local13, y + _local13);
curveTo(x + w, y + _local12, x + w, y + r);
lineTo(x + w, (y + h) - r);
if (c != undefined) {
endFill();
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
setThemeDefaults();
mx.core.UIObject.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
static var UIObjectDependency = mx.core.UIObject;
}
Symbol 115 MovieClip [__Packages.mx.managers.DepthManager] Frame 0
class mx.managers.DepthManager
{
var _childCounter, createClassObject, createObject, _parent, swapDepths, _topmost, getDepth;
function DepthManager () {
MovieClip.prototype.createClassChildAtDepth = createClassChildAtDepth;
MovieClip.prototype.createChildAtDepth = createChildAtDepth;
MovieClip.prototype.setDepthTo = setDepthTo;
MovieClip.prototype.setDepthAbove = setDepthAbove;
MovieClip.prototype.setDepthBelow = setDepthBelow;
MovieClip.prototype.findNextAvailableDepth = findNextAvailableDepth;
MovieClip.prototype.shuffleDepths = shuffleDepths;
MovieClip.prototype.getDepthByFlag = getDepthByFlag;
MovieClip.prototype.buildDepthTable = buildDepthTable;
_global.ASSetPropFlags(MovieClip.prototype, "createClassChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "createChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthTo", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthAbove", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthBelow", 1);
_global.ASSetPropFlags(MovieClip.prototype, "findNextAvailableDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "shuffleDepths", 1);
_global.ASSetPropFlags(MovieClip.prototype, "getDepthByFlag", 1);
_global.ASSetPropFlags(MovieClip.prototype, "buildDepthTable", 1);
}
static function sortFunction(a, b) {
if (a.getDepth() > b.getDepth()) {
return(1);
}
return(-1);
}
static function test(depth) {
if (depth == reservedDepth) {
return(false);
}
return(true);
}
static function createClassObjectAtDepth(className, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createClassChildAtDepth(className, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createClassChildAtDepth(className, kTop, initObj);
break;
}
return(_local1);
}
static function createObjectAtDepth(linkageName, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createChildAtDepth(linkageName, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createChildAtDepth(linkageName, kTop, initObj);
break;
}
return(_local1);
}
function createClassChildAtDepth(className, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createClassObject(className, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function createChildAtDepth(linkageName, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createObject(linkageName, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function setDepthTo(depthFlag) {
var _local2 = _parent.buildDepthTable();
var _local3 = _parent.getDepthByFlag(depthFlag, _local2);
if (_local2[_local3] != undefined) {
shuffleDepths(this, _local3, _local2, undefined);
} else {
swapDepths(_local3);
}
if (depthFlag == kTopmost) {
_topmost = true;
} else {
delete _topmost;
}
}
function setDepthAbove(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local2 = targetInstance.getDepth() + 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local2] != undefined) && (getDepth() < _local2)) {
_local2 = _local2 - 1;
}
if (_local2 > highestDepth) {
_local2 = highestDepth;
}
if (_local2 == highestDepth) {
_parent.shuffleDepths(this, _local2, _local3, "down");
} else if (_local3[_local2] != undefined) {
_parent.shuffleDepths(this, _local2, _local3, undefined);
} else {
swapDepths(_local2);
}
}
function setDepthBelow(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local6 = targetInstance.getDepth() - 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local6] != undefined) && (getDepth() > _local6)) {
_local6 = _local6 + 1;
}
var _local4 = lowestDepth + numberOfAuthortimeLayers;
var _local5;
for (_local5 in _local3) {
var _local2 = _local3[_local5];
if (_local2._parent != undefined) {
_local4 = Math.min(_local4, _local2.getDepth());
}
}
if (_local6 < _local4) {
_local6 = _local4;
}
if (_local6 == _local4) {
_parent.shuffleDepths(this, _local6, _local3, "up");
} else if (_local3[_local6] != undefined) {
_parent.shuffleDepths(this, _local6, _local3, undefined);
} else {
swapDepths(_local6);
}
}
function findNextAvailableDepth(targetDepth, depthTable, direction) {
var _local5 = lowestDepth + numberOfAuthortimeLayers;
if (targetDepth < _local5) {
targetDepth = _local5;
}
if (depthTable[targetDepth] == undefined) {
return(targetDepth);
}
var _local2 = targetDepth;
var _local1 = targetDepth;
if (direction == "down") {
while (depthTable[_local1] != undefined) {
_local1--;
}
return(_local1);
}
while (depthTable[_local2] != undefined) {
_local2++;
}
return(_local2);
}
function shuffleDepths(subject, targetDepth, depthTable, direction) {
var _local9 = lowestDepth + numberOfAuthortimeLayers;
var _local8 = _local9;
var _local5;
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local9 = Math.min(_local9, _local7.getDepth());
}
}
if (direction == undefined) {
if (subject.getDepth() > targetDepth) {
direction = "up";
} else {
direction = "down";
}
}
var _local1 = new Array();
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local1.push(_local7);
}
}
_local1.sort(sortFunction);
if (direction == "up") {
var _local3;
var _local11;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.pop();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
_local11 = subject.getDepth();
_local3 = _local1.pop();
var _local4 = _local3.getDepth();
if (_local11 > (_local4 + 1)) {
if (_local4 >= 0) {
subject.swapDepths(_local4 + 1);
} else if ((_local11 > _local8) && (_local4 < _local8)) {
subject.swapDepths(_local8);
}
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
} else if (direction == "down") {
var _local3;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.shift();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
var _local11 = _local3.getDepth();
_local3 = _local1.shift();
var _local4 = _local3.getDepth();
if ((_local11 < (_local4 - 1)) && (_local4 > 0)) {
subject.swapDepths(_local4 - 1);
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
}
}
function getDepthByFlag(depthFlag, depthTable) {
var _local2 = 0;
if ((depthFlag == kTop) || (depthFlag == kNotopmost)) {
var _local5 = 0;
var _local7 = false;
var _local8;
for (_local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
if (!_local9._topmost) {
_local2 = Math.max(_local2, _local9.getDepth());
} else if (!_local7) {
_local5 = _local9.getDepth();
_local7 = true;
} else {
_local5 = Math.min(_local5, _local9.getDepth());
}
}
}
}
_local2 = _local2 + 20;
if (_local7) {
if (_local2 >= _local5) {
_local2 = _local5 - 1;
}
}
} else if (depthFlag == kBottom) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.min(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 - 20;
} else if (depthFlag == kTopmost) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.max(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 + 100;
}
if (_local2 >= highestDepth) {
_local2 = highestDepth;
}
var _local6 = lowestDepth + numberOfAuthortimeLayers;
for (var _local9 in depthTable) {
var _local4 = depthTable[_local9];
if (_local4._parent != undefined) {
_local6 = Math.min(_local6, _local4.getDepth());
}
}
if (_local2 <= _local6) {
_local2 = _local6;
}
return(_local2);
}
function buildDepthTable(Void) {
var _local5 = new Array();
var _local4;
for (_local4 in this) {
var _local2 = this[_local4];
var _local3 = typeof(_local2);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local2.__getTextFormat != undefined))) {
if (_local2._parent == this) {
_local5[_local2.getDepth()] = _local2;
}
}
}
return(_local5);
}
static var reservedDepth = 1048575;
static var highestDepth = 1048574;
static var lowestDepth = -16383;
static var numberOfAuthortimeLayers = 383;
static var kCursor = 101;
static var kTooltip = 102;
static var kTop = 201;
static var kBottom = 202;
static var kTopmost = 203;
static var kNotopmost = 204;
static var holder = _root.createEmptyMovieClip("reserved", reservedDepth);
static var __depthManager = new mx.managers.DepthManager();
}
Symbol 116 MovieClip [__Packages.mx.managers.FocusManager] Frame 0
class mx.managers.FocusManager extends mx.core.UIComponent
{
var __defaultPushButton, defPushButton, form, move, tabEnabled, _width, _height, _x, _y, _alpha, _parent, tabCapture, watch, lastMouse, _visible, lastFocus, doLater, lastSelFocus, cancelAllDoLaters, _searchKey, _lastTarget, _firstNode, _nextIsNext, _nextNode, _lastx, _prevNode, _needPrev, _foundList, _prevObj, _nextObj, _firstObj, _lastObj, _lastNode, lastTabFocus, findFocusFromObject;
function FocusManager () {
super();
}
function get defaultPushButton() {
return(__defaultPushButton);
}
function set defaultPushButton(x) {
if (x != __defaultPushButton) {
__defaultPushButton.__set__emphasized(false);
__defaultPushButton = x;
defPushButton = x;
x.__set__emphasized(true);
}
//return(defaultPushButton);
}
function getMaxTabIndex(o) {
var _local3 = 0;
var _local6;
for (_local6 in o) {
var _local2 = o[_local6];
if (_local2._parent == o) {
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex > _local3) {
_local3 = _local2.tabIndex;
}
}
if (_local2.tabChildren == true) {
var _local4 = getMaxTabIndex(_local2);
if (_local4 > _local3) {
_local3 = _local4;
}
}
}
}
return(_local3);
}
function getNextTabIndex(Void) {
return(getMaxTabIndex(form) + 1);
}
function get nextTabIndex() {
return(getNextTabIndex());
}
function relocate(Void) {
var _local2 = mx.managers.SystemManager.__get__screen();
move(_local2.x - 1, _local2.y - 1);
}
function init(Void) {
super.init();
tabEnabled = false;
_width = (_height = 1);
_x = (_y = -1);
_alpha = 0;
_parent.focusManager = this;
_parent.tabChildren = true;
_parent.tabEnabled = false;
form = _parent;
_parent.addEventListener("hide", this);
_parent.addEventListener("reveal", this);
mx.managers.SystemManager.init();
mx.managers.SystemManager.addFocusManager(form);
tabCapture.tabIndex = 0;
watch("enabled", enabledChanged);
Selection.addListener(this);
lastMouse = new Object();
_global.ASSetPropFlags(_parent, "focusManager", 1);
_global.ASSetPropFlags(_parent, "tabChildren", 1);
_global.ASSetPropFlags(_parent, "tabEnabled", 1);
}
function enabledChanged(id, oldValue, newValue) {
_visible = newValue;
return(newValue);
}
function activate(Void) {
Key.addListener(this);
activated = (_visible = true);
if (lastFocus != undefined) {
bNeedFocus = true;
if (!mx.managers.SystemManager.isMouseDown) {
doLater(this, "restoreFocus");
}
}
}
function deactivate(Void) {
Key.removeListener(this);
activated = (_visible = false);
var _local2 = getSelectionFocus();
var _local3 = getActualFocus(_local2);
if (isOurFocus(_local3)) {
lastSelFocus = _local2;
lastFocus = _local3;
}
cancelAllDoLaters();
}
function isOurFocus(o) {
if (o.focusManager == this) {
return(true);
}
while (o != undefined) {
if (o.focusManager != undefined) {
return(false);
}
if (o._parent == _parent) {
return(true);
}
o = o._parent;
}
return(false);
}
function onSetFocus(o, n) {
if (n == null) {
if (activated) {
bNeedFocus = true;
}
} else {
var _local2 = getFocus();
if (isOurFocus(_local2)) {
bNeedFocus = false;
lastFocus = _local2;
lastSelFocus = n;
}
}
}
function restoreFocus(Void) {
var _local2 = lastSelFocus.hscroll;
if (_local2 != undefined) {
var _local5 = lastSelFocus.scroll;
var _local4 = lastSelFocus.background;
}
lastFocus.setFocus();
var _local3 = Selection;
Selection.setSelection(_local3.lastBeginIndex, _local3.lastEndIndex);
if (_local2 != undefined) {
lastSelFocus.scroll = _local5;
lastSelFocus.hscroll = _local2;
lastSelFocus.background = _local4;
}
}
function onUnload(Void) {
mx.managers.SystemManager.removeFocusManager(form);
}
function setFocus(o) {
if (o == null) {
Selection.setFocus(null);
} else if (o.setFocus == undefined) {
Selection.setFocus(o);
} else {
o.setFocus();
}
}
function getActualFocus(o) {
var _local1 = o._parent;
while (_local1 != undefined) {
if (_local1.focusTextField != undefined) {
while (_local1.focusTextField != undefined) {
o = _local1;
_local1 = _local1._parent;
if (_local1 == undefined) {
return(undefined);
}
if (_local1.focusTextField == undefined) {
return(o);
}
}
}
if (_local1.tabEnabled != true) {
return(o);
}
o = _local1;
_local1 = o._parent;
}
return(undefined);
}
function getSelectionFocus() {
var m = Selection.getFocus();
var o = eval (m);
return(o);
}
function getFocus(Void) {
var _local2 = getSelectionFocus();
return(getActualFocus(_local2));
}
function walkTree(p, index, groupName, dir, lookup, firstChild) {
var _local5 = true;
var _local11;
for (_local11 in p) {
var _local2 = p[_local11];
if ((((_local2._parent == p) && (_local2.enabled != false)) && (_local2._visible != false)) && ((_local2.tabEnabled == true) || ((_local2.tabEnabled != false) && ((((((((_local2.onPress != undefined) || (_local2.onRelease != undefined)) || (_local2.onReleaseOutside != undefined)) || (_local2.onDragOut != undefined)) || (_local2.onDragOver != undefined)) || (_local2.onRollOver != undefined)) || (_local2.onRollOut != undefined)) || (_local2 instanceof TextField))))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_local2 != _lastTarget) {
if (((_local2.groupName != undefined) || (groupName != undefined)) && (_local2.groupName == groupName)) {
continue;
}
if ((_local2 instanceof TextField) && (_local2.selectable == false)) {
continue;
}
if (_local5 || (((_local2.groupName != undefined) && (_local2.groupName == _firstNode.groupName)) && (_local2.selected == true))) {
if (firstChild) {
_firstNode = _local2;
firstChild = false;
}
}
if (_nextIsNext == true) {
if ((((_local2.groupName != undefined) && (_local2.groupName == _nextNode.groupName)) && (_local2.selected == true)) || ((_nextNode == undefined) && ((_local2.groupName == undefined) || ((_local2.groupName != undefined) && (_local2.groupName != groupName))))) {
_nextNode = _local2;
}
}
if ((_local2.groupName == undefined) || (groupName != _local2.groupName)) {
if (((_lastx.groupName != undefined) && (_local2.groupName == _lastx.groupName)) && (_lastx.selected == true)) {
} else {
_lastx = _local2;
}
}
} else {
_prevNode = _lastx;
_needPrev = false;
_nextIsNext = true;
}
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex == index) {
if (_foundList[_local2._name] == undefined) {
if (_needPrev) {
_prevObj = _local2;
_needPrev = false;
}
_nextObj = _local2;
}
}
if (dir && (_local2.tabIndex > index)) {
if (((_nextObj == undefined) || ((_nextObj.tabIndex > _local2.tabIndex) && (((_local2.groupName == undefined) || (_nextObj.groupName == undefined)) || (_local2.groupName != _nextObj.groupName)))) || ((((_nextObj.groupName != undefined) && (_nextObj.groupName == _local2.groupName)) && (_nextObj.selected != true)) && ((_local2.selected == true) || (_nextObj.tabIndex > _local2.tabIndex)))) {
_nextObj = _local2;
}
} else if ((!dir) && (_local2.tabIndex < index)) {
if (((_prevObj == undefined) || ((_prevObj.tabIndex < _local2.tabIndex) && (((_local2.groupName == undefined) || (_prevObj.groupName == undefined)) || (_local2.groupName != _prevObj.groupName)))) || ((((_prevObj.groupName != undefined) && (_prevObj.groupName == _local2.groupName)) && (_prevObj.selected != true)) && ((_local2.selected == true) || (_prevObj.tabIndex < _local2.tabIndex)))) {
_prevObj = _local2;
}
}
if (((_firstObj == undefined) || ((_local2.tabIndex < _firstObj.tabIndex) && (((_local2.groupName == undefined) || (_firstObj.groupName == undefined)) || (_local2.groupName != _firstObj.groupName)))) || ((((_firstObj.groupName != undefined) && (_firstObj.groupName == _local2.groupName)) && (_firstObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex < _firstObj.tabIndex)))) {
_firstObj = _local2;
}
if (((_lastObj == undefined) || ((_local2.tabIndex > _lastObj.tabIndex) && (((_local2.groupName == undefined) || (_lastObj.groupName == undefined)) || (_local2.groupName != _lastObj.groupName)))) || ((((_lastObj.groupName != undefined) && (_lastObj.groupName == _local2.groupName)) && (_lastObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex > _lastObj.tabIndex)))) {
_lastObj = _local2;
}
}
if (_local2.tabChildren) {
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
} else if (((_local2._parent == p) && (_local2.tabChildren == true)) && (_local2._visible != false)) {
if (_local2 == _lastTarget) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_prevNode == undefined) {
var _local3 = _lastx;
var _local7 = false;
while (_local3 != undefined) {
if (_local3 == _local2) {
_local7 = true;
break;
}
_local3 = _local3._parent;
}
if (_local7 == false) {
_prevNode = _lastx;
}
}
_needPrev = false;
if (_nextNode == undefined) {
_nextIsNext = true;
}
} else if (!((_local2.focusManager != undefined) && (_local2.focusManager._parent == _local2))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
}
}
_lastNode = _lastx;
if (lookup) {
if (p._parent != undefined) {
if (p != _parent) {
if ((_prevNode == undefined) && (dir)) {
_needPrev = true;
} else if ((_nextNode == undefined) && (!dir)) {
_nextIsNext = false;
}
_lastTarget = _lastTarget._parent;
getTabCandidate(p._parent, index, groupName, dir, true);
}
}
}
}
function getTabCandidate(o, index, groupName, dir, firstChild) {
var _local2;
var _local3 = true;
if (o == _parent) {
_local2 = o;
_local3 = false;
} else {
_local2 = o._parent;
if (_local2 == undefined) {
_local2 = o;
_local3 = false;
}
}
walkTree(_local2, index, groupName, dir, _local3, firstChild);
}
function getTabCandidateFromChildren(o, index, groupName, dir, firstChild) {
walkTree(o, index, groupName, dir, false, firstChild);
}
function getFocusManagerFromObject(o) {
while (o != undefined) {
if (o.focusManager != undefined) {
return(o.focusManager);
}
o = o._parent;
}
return(undefined);
}
function tabHandler(Void) {
bDrawFocus = true;
var _local5 = getSelectionFocus();
var _local4 = getActualFocus(_local5);
if (_local4 != _local5) {
_local5 = _local4;
}
if (getFocusManagerFromObject(_local5) != this) {
_local5 == undefined;
}
if (_local5 == undefined) {
_local5 = form;
} else if (_local5.tabIndex != undefined) {
if ((_foundList != undefined) || (_foundList.tabIndex != _local5.tabIndex)) {
_foundList = new Object();
_foundList.tabIndex = _local5.tabIndex;
}
_foundList[_local5._name] = _local5;
}
var _local3 = Key.isDown(16) != true;
_searchKey = getTimer();
_needPrev = true;
_nextIsNext = false;
_lastx = undefined;
_firstNode = undefined;
_lastNode = undefined;
_nextNode = undefined;
_prevNode = undefined;
_firstObj = undefined;
_lastObj = undefined;
_nextObj = undefined;
_prevObj = undefined;
_lastTarget = _local5;
var _local6 = _local5;
getTabCandidate(_local6, ((_local5.tabIndex == undefined) ? 0 : (_local5.tabIndex)), _local5.groupName, _local3, true);
var _local2;
if (_local3) {
if (_nextObj != undefined) {
_local2 = _nextObj;
} else {
_local2 = _firstObj;
}
} else if (_prevObj != undefined) {
_local2 = _prevObj;
} else {
_local2 = _lastObj;
}
if (_local2.tabIndex != _local5.tabIndex) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
_foundList[_local2._name] = _local2;
} else {
if (_foundList == undefined) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
}
_foundList[_local2._name] = _local2;
}
if (_local2 == undefined) {
if (_local3 == false) {
if (_nextNode != undefined) {
_local2 = _nextNode;
} else {
_local2 = _firstNode;
}
} else if ((_prevNode == undefined) || (_local5 == form)) {
_local2 = _lastNode;
} else {
_local2 = _prevNode;
}
}
if (_local2 == undefined) {
return(undefined);
}
lastTabFocus = _local2;
setFocus(_local2);
if (_local2.emphasized != undefined) {
if (defPushButton != undefined) {
_local5 = defPushButton;
defPushButton = _local2;
_local5.emphasized = false;
_local2.emphasized = true;
}
} else if ((defPushButton != undefined) && (defPushButton != __defaultPushButton)) {
_local5 = defPushButton;
defPushButton = __defaultPushButton;
_local5.emphasized = false;
__defaultPushButton.__set__emphasized(true);
}
}
function onKeyDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
if (defaultPushButtonEnabled) {
if (Key.getCode() == 13) {
if (defaultPushButton != undefined) {
doLater(this, "sendDefaultPushButtonEvent");
}
}
}
}
function sendDefaultPushButtonEvent(Void) {
defPushButton.dispatchEvent({type:"click"});
}
function getMousedComponentFromChildren(x, y, o) {
for (var _local7 in o) {
var _local2 = o[_local7];
if (((_local2._visible && (_local2.enabled)) && (_local2._parent == o)) && (_local2._searchKey != _searchKey)) {
_local2._searchKey = _searchKey;
if (_local2.hitTest(x, y, true)) {
if ((_local2.onPress != undefined) || (_local2.onRelease != undefined)) {
return(_local2);
}
var _local3 = getMousedComponentFromChildren(x, y, _local2);
if (_local3 != undefined) {
return(_local3);
}
return(_local2);
}
}
}
return(undefined);
}
function mouseActivate(Void) {
if (!bNeedFocus) {
return(undefined);
}
_searchKey = getTimer();
var _local2 = getMousedComponentFromChildren(lastMouse.x, lastMouse.y, form);
if (_local2 instanceof mx.core.UIComponent) {
return(undefined);
}
_local2 = findFocusFromObject(_local2);
if (_local2 == lastFocus) {
return(undefined);
}
if (_local2 == undefined) {
doLater(this, "restoreFocus");
return(undefined);
}
var _local3 = _local2.hscroll;
if (_local3 != undefined) {
var _local6 = _local2.scroll;
var _local5 = _local2.background;
}
setFocus(_local2);
var _local4 = Selection;
Selection.setSelection(_local4.lastBeginIndex, _local4.lastEndIndex);
if (_local3 != undefined) {
_local2.scroll = _local6;
_local2.hscroll = _local3;
_local2.background = _local5;
}
}
function _onMouseDown(Void) {
bDrawFocus = false;
if (lastFocus != undefined) {
lastFocus.drawFocus(false);
}
mx.managers.SystemManager.idleFrames = 0;
var _local3 = Selection;
_local3.lastBeginIndex = Selection.getBeginIndex();
_local3.lastEndIndex = Selection.getEndIndex();
lastMouse.x = _root._xmouse;
lastMouse.y = _root._ymouse;
_root.localToGlobal(lastMouse);
}
function onMouseUp(Void) {
if (_visible) {
doLater(this, "mouseActivate");
}
}
function handleEvent(e) {
if (e.type == "reveal") {
mx.managers.SystemManager.activate(form);
} else {
mx.managers.SystemManager.deactivate(form);
}
}
static function enableFocusManagement() {
if (!initialized) {
initialized = true;
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
}
}
static var symbolName = "FocusManager";
static var symbolOwner = mx.managers.FocusManager;
static var version = "2.0.2.126";
var className = "FocusManager";
var bNeedFocus = false;
var bDrawFocus = false;
var defaultPushButtonEnabled = true;
var activated = true;
static var initialized = false;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 117 MovieClip [__Packages.mx.skins.halo.FocusRect] Frame 0
class mx.skins.halo.FocusRect extends mx.skins.SkinElement
{
var boundingBox_mc, _xscale, _yscale, clear, beginFill, drawRoundRect, endFill, _visible;
function FocusRect () {
super();
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function draw(o) {
o.adjustFocusRect();
}
function setSize(w, h, r, a, rectCol) {
_xscale = (_yscale = 100);
clear();
if (typeof(r) == "object") {
r.br = ((r.br > 2) ? (r.br - 2) : 0);
r.bl = ((r.bl > 2) ? (r.bl - 2) : 0);
r.tr = ((r.tr > 2) ? (r.tr - 2) : 0);
r.tl = ((r.tl > 2) ? (r.tl - 2) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
r.br = ((r.br > 1) ? (r.br + 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl + 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr + 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl + 1) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(1, 1, w - 2, h - 2, r);
r.br = ((r.br > 1) ? (r.br - 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl - 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr - 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl - 1) : 0);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
} else {
var _local5;
if (r != 0) {
_local5 = r - 2;
} else {
_local5 = 0;
}
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
beginFill(rectCol, a * 0.3);
if (r != 0) {
_local5 = r - 2;
r = r - 1;
} else {
_local5 = 0;
r = 0;
}
drawRoundRect(1, 1, w - 2, h - 2, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
}
}
function handleEvent(e) {
if (e.type == "unload") {
_visible = true;
} else if (e.type == "resize") {
e.target.adjustFocusRect();
} else if (e.type == "move") {
e.target.adjustFocusRect();
}
}
static function classConstruct() {
mx.core.UIComponent.prototype.drawFocus = function (focused) {
var _local2 = this._parent.focus_mc;
if (!focused) {
_local2._visible = false;
this.removeEventListener("unload", _local2);
this.removeEventListener("move", _local2);
this.removeEventListener("resize", _local2);
} else {
if (_local2 == undefined) {
_local2 = this._parent.createChildAtDepth("FocusRect", mx.managers.DepthManager.kTop);
_local2.tabEnabled = false;
this._parent.focus_mc = _local2;
} else {
_local2._visible = true;
}
_local2.draw(this);
if (_local2.getDepth() < this.getDepth()) {
_local2.setDepthAbove(this);
}
this.addEventListener("unload", _local2);
this.addEventListener("move", _local2);
this.addEventListener("resize", _local2);
}
};
mx.core.UIComponent.prototype.adjustFocusRect = function () {
var _local2 = this.getStyle("themeColor");
if (_local2 == undefined) {
_local2 = 8453965 /* 0x80FF4D */;
}
var _local3 = this._parent.focus_mc;
_local3.setSize(this.width + 4, this.height + 4, 0, 100, _local2);
_local3.move(this.x - 2, this.y - 2);
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.adjustFocusRect = mx.core.UIComponent.prototype.adjustFocusRect;
mx.skins.halo.FocusRect.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var DefaultsDependency = mx.skins.halo.Defaults;
static var UIComponentDependency = mx.core.UIComponent;
}
Symbol 118 MovieClip [__Packages.mx.managers.OverlappedWindows] Frame 0
class mx.managers.OverlappedWindows
{
function OverlappedWindows () {
}
static function checkIdle(Void) {
if (mx.managers.SystemManager.idleFrames > 10) {
mx.managers.SystemManager.dispatchEvent({type:"idle"});
} else {
mx.managers.SystemManager.idleFrames++;
}
}
static function __addEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager.interval == undefined) {
mx.managers.SystemManager.interval = setInterval(mx.managers.SystemManager.checkIdle, 100);
}
}
mx.managers.SystemManager._xAddEventListener(e, o, l);
}
static function __removeEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager._xRemoveEventListener(e, o, l) == 0) {
clearInterval(mx.managers.SystemManager.interval);
}
} else {
mx.managers.SystemManager._xRemoveEventListener(e, o, l);
}
}
static function onMouseDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
mx.managers.SystemManager.isMouseDown = true;
var _local5 = _root;
var _local3;
var _local8 = _root._xmouse;
var _local7 = _root._ymouse;
if (mx.managers.SystemManager.form.modalWindow == undefined) {
if (mx.managers.SystemManager.forms.length > 1) {
var _local6 = mx.managers.SystemManager.forms.length;
var _local4;
_local4 = 0;
while (_local4 < _local6) {
var _local2 = mx.managers.SystemManager.forms[_local4];
if (_local2._visible) {
if (_local2.hitTest(_local8, _local7)) {
if (_local3 == undefined) {
_local3 = _local2.getDepth();
_local5 = _local2;
} else if (_local3 < _local2.getDepth()) {
_local3 = _local2.getDepth();
_local5 = _local2;
}
}
}
_local4++;
}
if (_local5 != mx.managers.SystemManager.form) {
mx.managers.SystemManager.activate(_local5);
}
}
}
var _local9 = mx.managers.SystemManager.form;
_local9.focusManager._onMouseDown();
}
static function onMouseMove(Void) {
mx.managers.SystemManager.idleFrames = 0;
}
static function onMouseUp(Void) {
mx.managers.SystemManager.isMouseDown = false;
mx.managers.SystemManager.idleFrames = 0;
}
static function activate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form != f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local1 = mx.managers.SystemManager.form;
_local1.focusManager.deactivate();
}
}
mx.managers.SystemManager.form = f;
f.focusManager.activate();
}
static function deactivate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form == f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local5 = mx.managers.SystemManager.form;
_local5.focusManager.deactivate();
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
var _local2;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
_local1 = _local1 + 1;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
mx.managers.SystemManager.form = _local2;
break;
}
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
_local5 = mx.managers.SystemManager.form;
_local5.focusManager.activate();
}
}
}
static function addFocusManager(f) {
mx.managers.SystemManager.forms.push(f);
mx.managers.SystemManager.activate(f);
}
static function removeFocusManager(f) {
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
if (mx.managers.SystemManager.form == f) {
mx.managers.SystemManager.deactivate(f);
}
mx.managers.SystemManager.forms.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
static function enableOverlappedWindows() {
if (!initialized) {
initialized = true;
mx.managers.SystemManager.checkIdle = checkIdle;
mx.managers.SystemManager.__addEventListener = __addEventListener;
mx.managers.SystemManager.__removeEventListener = __removeEventListener;
mx.managers.SystemManager.onMouseDown = onMouseDown;
mx.managers.SystemManager.onMouseMove = onMouseMove;
mx.managers.SystemManager.onMouseUp = onMouseUp;
mx.managers.SystemManager.activate = activate;
mx.managers.SystemManager.deactivate = deactivate;
mx.managers.SystemManager.addFocusManager = addFocusManager;
mx.managers.SystemManager.removeFocusManager = removeFocusManager;
}
}
static var initialized = false;
static var SystemManagerDependency = mx.managers.SystemManager;
}
Symbol 119 MovieClip [__Packages.mx.styles.CSSSetStyle] Frame 0
class mx.styles.CSSSetStyle
{
var styleName, stylecache, _color, setColor, invalidateStyle;
function CSSSetStyle () {
}
function _setStyle(styleProp, newValue) {
this[styleProp] = newValue;
if (mx.styles.StyleManager.TextStyleMap[styleProp] != undefined) {
if (styleProp == "color") {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
}
_level0.changeTextStyleInChildren(styleProp);
return(undefined);
}
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local7 = mx.styles.StyleManager.colorNames.haloBlue;
var _local6 = mx.styles.StyleManager.colorNames.haloGreen;
var _local8 = mx.styles.StyleManager.colorNames.haloOrange;
var _local4 = {};
_local4[_local7] = 12188666 /* 0xB9FBFA */;
_local4[_local6] = 13500353 /* 0xCDFFC1 */;
_local4[_local8] = 16766319 /* 0xFFD56F */;
var _local5 = {};
_local5[_local7] = 13958653 /* 0xD4FDFD */;
_local5[_local6] = 14942166 /* 0xE3FFD6 */;
_local5[_local8] = 16772787 /* 0xFFEEB3 */;
var _local9 = _local4[newValue];
var _local10 = _local5[newValue];
if (_local9 == undefined) {
_local9 = newValue;
}
if (_local10 == undefined) {
_local10 = newValue;
}
setStyle("selectionColor", _local9);
setStyle("rollOverColor", _local10);
}
_level0.changeColorStyleInChildren(styleName, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
_level0.notifyStyleChangeInChildren(styleName, styleProp, newValue);
}
}
function changeTextStyleInChildren(styleProp) {
var _local4 = getTimer();
var _local5;
for (_local5 in this) {
var _local2 = this[_local5];
if (_local2._parent == this) {
if (_local2.searchKey != _local4) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache.tf;
delete _local2.stylecache[styleProp];
}
_local2.invalidateStyle(styleProp);
_local2.changeTextStyleInChildren(styleProp);
_local2.searchKey = _local4;
}
}
}
}
function changeColorStyleInChildren(sheetName, colorStyle, newValue) {
var _local6 = getTimer();
var _local7;
for (_local7 in this) {
var _local2 = this[_local7];
if (_local2._parent == this) {
if (_local2.searchKey != _local6) {
if (((_local2.getStyleName() == sheetName) || (sheetName == undefined)) || (sheetName == "_global")) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[colorStyle];
}
if (typeof(_local2._color) == "string") {
if (_local2._color == colorStyle) {
var _local4 = _local2.getStyle(colorStyle);
if (colorStyle == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = _local4;
}
}
_local2.setColor(_local4);
}
} else if (_local2._color[colorStyle] != undefined) {
if (typeof(_local2) != "movieclip") {
_local2._parent.invalidateStyle();
} else {
_local2.invalidateStyle(colorStyle);
}
}
}
_local2.changeColorStyleInChildren(sheetName, colorStyle, newValue);
_local2.searchKey = _local6;
}
}
}
}
function notifyStyleChangeInChildren(sheetName, styleProp, newValue) {
var _local5 = getTimer();
var _local6;
for (_local6 in this) {
var _local2 = this[_local6];
if (_local2._parent == this) {
if (_local2.searchKey != _local5) {
if (((_local2.styleName == sheetName) || ((_local2.styleName != undefined) && (typeof(_local2.styleName) == "movieclip"))) || (sheetName == undefined)) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[styleProp];
delete _local2.stylecache.tf;
}
delete _local2.enabledColor;
_local2.invalidateStyle(styleProp);
}
_local2.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
_local2.searchKey = _local5;
}
}
}
}
function setStyle(styleProp, newValue) {
if (stylecache != undefined) {
delete stylecache[styleProp];
delete stylecache.tf;
}
this[styleProp] = newValue;
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local10 = mx.styles.StyleManager.colorNames.haloBlue;
var _local9 = mx.styles.StyleManager.colorNames.haloGreen;
var _local11 = mx.styles.StyleManager.colorNames.haloOrange;
var _local6 = {};
_local6[_local10] = 12188666 /* 0xB9FBFA */;
_local6[_local9] = 13500353 /* 0xCDFFC1 */;
_local6[_local11] = 16766319 /* 0xFFD56F */;
var _local7 = {};
_local7[_local10] = 13958653 /* 0xD4FDFD */;
_local7[_local9] = 14942166 /* 0xE3FFD6 */;
_local7[_local11] = 16772787 /* 0xFFEEB3 */;
var _local12 = _local6[newValue];
var _local13 = _local7[newValue];
if (_local12 == undefined) {
_local12 = newValue;
}
if (_local13 == undefined) {
_local13 = newValue;
}
setStyle("selectionColor", _local12);
setStyle("rollOverColor", _local13);
}
if (typeof(_color) == "string") {
if (_color == styleProp) {
if (styleProp == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = newValue;
}
}
setColor(newValue);
}
} else if (_color[styleProp] != undefined) {
invalidateStyle(styleProp);
}
changeColorStyleInChildren(undefined, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
invalidateStyle(styleProp);
}
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (styleProp == "styleName")) {
var _local8;
var _local5 = newValue;
if (styleProp == "styleName") {
_local8 = ((typeof(newValue) == "string") ? (_global.styles[newValue]) : (_local5));
_local5 = _local8.themeColor;
if (_local5 != undefined) {
_local8.rollOverColor = (_local8.selectionColor = _local5);
}
}
notifyStyleChangeInChildren(undefined, styleProp, newValue);
}
}
static function enableRunTimeCSS() {
}
static function classConstruct() {
var _local2 = MovieClip.prototype;
var _local3 = mx.styles.CSSSetStyle.prototype;
mx.styles.CSSStyleDeclaration.prototype.setStyle = _local3._setStyle;
_local2.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
_local2.changeColorStyleInChildren = _local3.changeColorStyleInChildren;
_local2.notifyStyleChangeInChildren = _local3.notifyStyleChangeInChildren;
_local2.setStyle = _local3.setStyle;
_global.ASSetPropFlags(_local2, "changeTextStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "changeColorStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "notifyStyleChangeInChildren", 1);
_global.ASSetPropFlags(_local2, "setStyle", 1);
var _local4 = TextField.prototype;
_local4.setStyle = _local2.setStyle;
_local4.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
}
Symbol 120 MovieClip [__Packages.mx.core.ext.UIComponentExtensions] Frame 0
class mx.core.ext.UIComponentExtensions
{
function UIComponentExtensions () {
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
TextField.prototype.setFocus = function () {
Selection.setFocus(this);
};
TextField.prototype.onSetFocus = function (oldFocus) {
if (this.tabEnabled != false) {
if (this.getFocusManager().bDrawFocus) {
this.drawFocus(true);
}
}
};
TextField.prototype.onKillFocus = function (oldFocus) {
if (this.tabEnabled != false) {
this.drawFocus(false);
}
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.getFocusManager = mx.core.UIComponent.prototype.getFocusManager;
mx.managers.OverlappedWindows.enableOverlappedWindows();
mx.styles.CSSSetStyle.enableRunTimeCSS();
mx.managers.FocusManager.enableFocusManagement();
}
static var bExtended = false;
static var UIComponentExtended = Extensions();
static var UIComponentDependency = mx.core.UIComponent;
static var FocusManagerDependency = mx.managers.FocusManager;
static var OverlappedWindowsDependency = mx.managers.OverlappedWindows;
}
Symbol 121 MovieClip [__Packages.mx.skins.halo.RectBorder] Frame 0
class mx.skins.halo.RectBorder extends mx.skins.RectBorder
{
var offset, getStyle, borderStyleName, __borderMetrics, className, borderColorName, backgroundColorName, shadowColorName, highlightColorName, buttonColorName, __get__width, __get__height, clear, _color, drawRoundRect, beginFill, drawRect, endFill;
function RectBorder () {
super();
}
function init(Void) {
borderWidths.default = 3;
super.init();
}
function getBorderMetrics(Void) {
if (offset == undefined) {
var _local3 = getStyle(borderStyleName);
offset = borderWidths[_local3];
}
if ((getStyle(borderStyleName) == "default") || (getStyle(borderStyleName) == "alert")) {
__borderMetrics = {left:3, top:1, right:3, bottom:3};
return(__borderMetrics);
}
return(super.getBorderMetrics());
}
function drawBorder(Void) {
var _local6 = _global.styles[className];
if (_local6 == undefined) {
_local6 = _global.styles.RectBorder;
}
var _local5 = getStyle(borderStyleName);
var _local7 = getStyle(borderColorName);
if (_local7 == undefined) {
_local7 = _local6[borderColorName];
}
var _local8 = getStyle(backgroundColorName);
if (_local8 == undefined) {
_local8 = _local6[backgroundColorName];
}
var _local16 = getStyle("backgroundImage");
if (_local5 != "none") {
var _local14 = getStyle(shadowColorName);
if (_local14 == undefined) {
_local14 = _local6[shadowColorName];
}
var _local13 = getStyle(highlightColorName);
if (_local13 == undefined) {
_local13 = _local6[highlightColorName];
}
var _local12 = getStyle(buttonColorName);
if (_local12 == undefined) {
_local12 = _local6[buttonColorName];
}
var _local11 = getStyle(borderCapColorName);
if (_local11 == undefined) {
_local11 = _local6[borderCapColorName];
}
var _local10 = getStyle(shadowCapColorName);
if (_local10 == undefined) {
_local10 = _local6[shadowCapColorName];
}
}
offset = borderWidths[_local5];
var _local9 = offset;
var _local3 = __get__width();
var _local4 = __get__height();
clear();
_color = undefined;
if (_local5 == "none") {
} else if (_local5 == "inset") {
_color = colorList;
draw3dBorder(_local11, _local12, _local7, _local13, _local14, _local10);
} else if (_local5 == "outset") {
_color = colorList;
draw3dBorder(_local11, _local7, _local12, _local14, _local13, _local10);
} else if (_local5 == "alert") {
var _local15 = getStyle("themeColor");
drawRoundRect(0, 5, _local3, _local4 - 5, 5, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, 4, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, _local15, 50);
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, 2, 16777215, 100);
} else if (_local5 == "default") {
drawRoundRect(0, 5, _local3, _local4 - 5, {tl:5, tr:5, br:0, bl:0}, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, {tl:4, tr:4, br:0, bl:0}, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, {tl:3, tr:3, br:0, bl:0}, [12897484, 11844796], 100, 0, "radial");
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, {tl:2, tr:2, br:0, bl:0}, 16777215, 100);
} else if (_local5 == "dropDown") {
drawRoundRect(0, 0, _local3 + 1, _local4, {tl:4, tr:0, br:0, bl:4}, [13290186, 7895160], 100, -10, "linear");
drawRoundRect(1, 1, _local3 - 1, _local4 - 2, {tl:3, tr:0, br:0, bl:3}, 16777215, 100);
} else if (_local5 == "menuBorder") {
var _local15 = getStyle("themeColor");
drawRoundRect(4, 4, _local3 - 2, _local4 - 3, 0, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(4, 4, _local3 - 1, _local4 - 2, 0, 6184542, 10);
drawRoundRect(0, 0, _local3 + 1, _local4, 0, [0, 14342874], 100, 250, "linear");
drawRoundRect(0, 0, _local3 + 1, _local4, 0, _local15, 50);
drawRoundRect(2, 2, _local3 - 3, _local4 - 4, 0, 16777215, 100);
} else if (_local5 == "comboNonEdit") {
} else {
beginFill(_local7);
drawRect(0, 0, _local3, _local4);
drawRect(1, 1, _local3 - 1, _local4 - 1);
endFill();
_color = borderColorName;
}
if (_local8 != undefined) {
beginFill(_local8);
drawRect(_local9, _local9, __get__width() - _local9, __get__height() - _local9);
endFill();
}
}
function draw3dBorder(c1, c2, c3, c4, c5, c6) {
var _local3 = __get__width();
var _local2 = __get__height();
beginFill(c1);
drawRect(0, 0, _local3, _local2);
drawRect(1, 0, _local3 - 1, _local2);
endFill();
beginFill(c2);
drawRect(1, 0, _local3 - 1, 1);
endFill();
beginFill(c3);
drawRect(1, _local2 - 1, _local3 - 1, _local2);
endFill();
beginFill(c4);
drawRect(1, 1, _local3 - 1, 2);
endFill();
beginFill(c5);
drawRect(1, _local2 - 2, _local3 - 1, _local2 - 1);
endFill();
beginFill(c6);
drawRect(1, 2, _local3 - 1, _local2 - 2);
drawRect(2, 2, _local3 - 2, _local2 - 2);
endFill();
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.styles.rectBorderClass = mx.skins.halo.RectBorder;
_global.skinRegistry.RectBorder = true;
return(true);
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.halo.RectBorder;
static var version = "2.0.2.126";
var borderCapColorName = "borderCapColor";
var shadowCapColorName = "shadowCapColor";
var colorList = {highlightColor:0, borderColor:0, buttonColor:0, shadowColor:0, borderCapColor:0, shadowCapColor:0};
var borderWidths = {none:0, solid:1, inset:2, outset:2, alert:3, dropDown:2, menuBorder:2, comboNonEdit:2};
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 122 MovieClip [__Packages.mx.controls.listclasses.DataSelector] Frame 0
class mx.controls.listclasses.DataSelector extends Object
{
var __vPosition, setVPosition, __dataProvider, enabled, lastSelID, lastSelected, selected, invUpdateControl, invalidate, multipleSelection, updateControl, __rowCount, rows;
function DataSelector () {
super();
}
static function Initialize(obj) {
var _local3 = mixinProps;
var _local4 = _local3.length;
obj = obj.prototype;
var _local1 = 0;
while (_local1 < _local4) {
obj[_local3[_local1]] = mixins[_local3[_local1]];
_local1++;
}
mixins.createProp(obj, "dataProvider", true);
mixins.createProp(obj, "length", false);
mixins.createProp(obj, "value", false);
mixins.createProp(obj, "selectedIndex", true);
mixins.createProp(obj, "selectedIndices", true);
mixins.createProp(obj, "selectedItems", false);
mixins.createProp(obj, "selectedItem", true);
return(true);
}
function createProp(obj, propName, setter) {
var p = (propName.charAt(0).toUpperCase() + propName.substr(1));
var _local2 = null;
var _local4 = function (Void) {
return(this["get" + p]());
};
if (setter) {
_local2 = function (val) {
this["set" + p](val);
};
}
obj.addProperty(propName, _local4, _local2);
}
function setDataProvider(dP) {
if (__vPosition != 0) {
setVPosition(0);
}
clearSelected();
__dataProvider.removeEventListener(this);
__dataProvider = dP;
dP.addEventListener("modelChanged", this);
dP.addView(this);
modelChanged({eventName:"updateAll"});
}
function getDataProvider(Void) {
return(__dataProvider);
}
function addItemAt(index, label, data) {
if ((index < 0) || (!enabled)) {
return(undefined);
}
var _local2 = __dataProvider;
if (_local2 == undefined) {
_local2 = (__dataProvider = new Array());
_local2.addEventListener("modelChanged", this);
index = 0;
}
if ((typeof(label) == "object") || (typeof(_local2.getItemAt(0)) == "string")) {
_local2.addItemAt(index, label);
} else {
_local2.addItemAt(index, {label:label, data:data});
}
}
function addItem(label, data) {
addItemAt(__dataProvider.length, label, data);
}
function removeItemAt(index) {
return(__dataProvider.removeItemAt(index));
}
function removeAll(Void) {
__dataProvider.removeAll();
}
function replaceItemAt(index, newLabel, newData) {
if (typeof(newLabel) == "object") {
__dataProvider.replaceItemAt(index, newLabel);
} else {
__dataProvider.replaceItemAt(index, {label:newLabel, data:newData});
}
}
function sortItemsBy(fieldName, order) {
lastSelID = __dataProvider.getItemID(lastSelected);
__dataProvider.sortItemsBy(fieldName, order);
}
function sortItems(compareFunc, order) {
lastSelID = __dataProvider.getItemID(lastSelected);
__dataProvider.sortItems(compareFunc, order);
}
function getLength(Void) {
return(__dataProvider.length);
}
function getItemAt(index) {
return(__dataProvider.getItemAt(index));
}
function modelChanged(eventObj) {
var _local3 = eventObj.firstItem;
var _local6 = eventObj.lastItem;
var _local7 = eventObj.eventName;
if (_local7 == undefined) {
_local7 = eventObj.event;
_local3 = eventObj.firstRow;
_local6 = eventObj.lastRow;
if (_local7 == "addRows") {
_local7 = (eventObj.eventName = "addItems");
} else if (_local7 == "deleteRows") {
_local7 = (eventObj.eventName = "removeItems");
} else if (_local7 == "updateRows") {
_local7 = (eventObj.eventName = "updateItems");
}
}
if (_local7 == "addItems") {
for (var _local2 in selected) {
var _local5 = selected[_local2];
if ((_local5 != undefined) && (_local5 >= _local3)) {
selected[_local2] = selected[_local2] + ((_local6 - _local3) + 1);
}
}
} else if (_local7 == "removeItems") {
if (__dataProvider.length == 0) {
delete selected;
} else {
var _local9 = eventObj.removedIDs;
var _local10 = _local9.length;
var _local2 = 0;
while (_local2 < _local10) {
var _local4 = _local9[_local2];
if (selected[_local4] != undefined) {
delete selected[_local4];
}
_local2++;
}
for (_local2 in selected) {
if (selected[_local2] >= _local3) {
selected[_local2] = selected[_local2] - ((_local6 - _local3) + 1);
}
}
}
} else if (_local7 == "sort") {
if (typeof(__dataProvider.getItemAt(0)) != "object") {
delete selected;
} else {
var _local10 = __dataProvider.length;
var _local2 = 0;
while (_local2 < _local10) {
if (isSelected(_local2)) {
var _local4 = __dataProvider.getItemID(_local2);
if (_local4 == lastSelID) {
lastSelected = _local2;
}
selected[_local4] = _local2;
}
_local2++;
}
}
} else if (_local7 == "filterModel") {
setVPosition(0);
}
invUpdateControl = true;
invalidate();
}
function getValue(Void) {
var _local2 = getSelectedItem();
if (typeof(_local2) != "object") {
return(_local2);
}
return(((_local2.data == undefined) ? (_local2.label) : (_local2.data)));
}
function getSelectedIndex(Void) {
for (var _local3 in selected) {
var _local2 = selected[_local3];
if (_local2 != undefined) {
return(_local2);
}
}
}
function setSelectedIndex(index) {
if (((index >= 0) && (index < __dataProvider.length)) && (enabled)) {
delete selected;
selectItem(index, true);
lastSelected = index;
invUpdateControl = true;
invalidate();
} else if (index == undefined) {
clearSelected();
}
}
function getSelectedIndices(Void) {
var _local2 = new Array();
for (var _local3 in selected) {
_local2.push(selected[_local3]);
}
_local2.reverse();
return(((_local2.length > 0) ? (_local2) : undefined));
}
function setSelectedIndices(indexArray) {
if (multipleSelection != true) {
return(undefined);
}
delete selected;
var _local3 = 0;
while (_local3 < indexArray.length) {
var _local2 = indexArray[_local3];
if ((_local2 >= 0) && (_local2 < __dataProvider.length)) {
selectItem(_local2, true);
}
_local3++;
}
invUpdateControl = true;
updateControl();
}
function getSelectedItems(Void) {
var _local3 = getSelectedIndices();
var _local4 = new Array();
var _local2 = 0;
while (_local2 < _local3.length) {
_local4.push(getItemAt(_local3[_local2]));
_local2++;
}
return(((_local4.length > 0) ? (_local4) : undefined));
}
function getSelectedItem(Void) {
return(__dataProvider.getItemAt(getSelectedIndex()));
}
function selectItem(index, selectedFlag) {
if (selected == undefined) {
selected = new Object();
}
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
if (selectedFlag && (!isSelected(index))) {
selected[_local2] = index;
} else if (!selectedFlag) {
delete selected[_local2];
}
}
function isSelected(index) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(false);
}
return(selected[_local2] != undefined);
}
function clearSelected(transition) {
var _local3 = 0;
for (var _local4 in selected) {
var _local2 = selected[_local4];
if (((_local2 != undefined) && (__vPosition <= _local2)) && (_local2 < (__vPosition + __rowCount))) {
rows[_local2 - __vPosition].drawRow(rows[_local2 - __vPosition].item, "normal", transition && ((_local3 % 3) == 0));
}
_local3++;
}
delete selected;
}
static var mixins = new mx.controls.listclasses.DataSelector();
static var mixinProps = ["setDataProvider", "getDataProvider", "addItem", "addItemAt", "removeAll", "removeItemAt", "replaceItemAt", "sortItemsBy", "sortItems", "getLength", "getItemAt", "modelChanged", "calcPreferredWidthFromData", "calcPreferredHeightFromData", "getValue", "getSelectedIndex", "getSelectedItem", "getSelectedIndices", "getSelectedItems", "selectItem", "isSelected", "clearSelected", "setSelectedIndex", "setSelectedIndices"];
}
Symbol 123 MovieClip [__Packages.mx.controls.ComboBase] Frame 0
class mx.controls.ComboBase extends mx.core.UIComponent
{
var getValue, tabEnabled, tabChildren, boundingBox_mc, downArrow_mc, createClassObject, onDownArrow, border_mc, __border, text_mc, focusTextField, __width, __height, getFocusManager, __get__height, height, _parent;
function ComboBase () {
super();
getValue = _getValue;
}
function init() {
super.init();
tabEnabled = !_editable;
tabChildren = _editable;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function createChildren() {
var _local3 = new Object();
_local3.styleName = this;
if (downArrow_mc == undefined) {
_local3.falseUpSkin = downArrowUpName;
_local3.falseOverSkin = downArrowOverName;
_local3.falseDownSkin = downArrowDownName;
_local3.falseDisabledSkin = downArrowDisabledName;
_local3.validateNow = true;
_local3.tabEnabled = false;
createClassObject(mx.controls.SimpleButton, "downArrow_mc", 19, _local3);
downArrow_mc.buttonDownHandler = onDownArrow;
downArrow_mc.useHandCursor = false;
downArrow_mc.onPressWas = downArrow_mc.onPress;
downArrow_mc.onPress = function () {
this.trackAsMenuWas = this.trackAsMenu;
this.trackAsMenu = true;
if (!this._editable) {
this._parent.text_mc.trackAsMenu = this.trackAsMenu;
}
this.onPressWas();
};
downArrow_mc.onDragOutWas = downArrow_mc.onDragOut;
downArrow_mc.onDragOut = function () {
this.trackAsMenuWas = this.trackAsMenu;
this.trackAsMenu = false;
if (!this._editable) {
this._parent.text_mc.trackAsMenu = this.trackAsMenu;
}
this.onDragOutWas();
};
downArrow_mc.onDragOverWas = downArrow_mc.onDragOver;
downArrow_mc.onDragOver = function () {
this.trackAsMenu = this.trackAsMenuWas;
if (!this._editable) {
this._parent.text_mc.trackAsMenu = this.trackAsMenu;
}
this.onDragOverWas();
};
}
if (border_mc == undefined) {
_local3.tabEnabled = false;
createClassObject(_global.styles.rectBorderClass, "border_mc", 17, _local3);
border_mc.move(0, 0);
__border = border_mc;
}
_local3.borderStyle = "none";
_local3.readOnly = !_editable;
_local3.tabEnabled = _editable;
if (text_mc == undefined) {
createClassObject(mx.controls.TextInput, "text_mc", 18, _local3);
text_mc.move(0, 0);
text_mc.addEnterEvents();
text_mc.enterHandler = _enterHandler;
text_mc.changeHandler = _changeHandler;
text_mc.oldOnSetFocus = text_mc.onSetFocus;
text_mc.onSetFocus = function () {
this.oldOnSetFocus();
this._parent.onSetFocus();
};
text_mc.__set__restrict("^\x1B");
text_mc.oldOnKillFocus = text_mc.onKillFocus;
text_mc.onKillFocus = function (n) {
this.oldOnKillFocus(n);
this._parent.onKillFocus(n);
};
text_mc.drawFocus = function (b) {
this._parent.drawFocus(b);
};
delete text_mc.borderStyle;
}
focusTextField = text_mc;
text_mc.owner = this;
layoutChildren(__width, __height);
}
function onKillFocus() {
super.onKillFocus();
Key.removeListener(text_mc);
getFocusManager().defaultPushButtonEnabled = true;
}
function onSetFocus() {
super.onSetFocus();
getFocusManager().defaultPushButtonEnabled = false;
Key.addListener(text_mc);
}
function setFocus() {
if (_editable) {
Selection.setFocus(text_mc);
} else {
Selection.setFocus(this);
}
}
function setSize(w, h, noEvent) {
super.setSize(w, ((h == undefined) ? (__get__height()) : (h)), noEvent);
}
function setEnabled(enabledFlag) {
super.setEnabled(enabledFlag);
downArrow_mc.enabled = enabledFlag;
text_mc.enabled = enabledFlag;
}
function setEditable(e) {
_editable = e;
if (wrapDownArrowButton == false) {
if (e) {
border_mc.borderStyle = "inset";
text_mc.borderStyle = "inset";
symbolName = "ComboBox";
invalidateStyle();
} else {
border_mc.borderStyle = "comboNonEdit";
text_mc.borderStyle = "dropDown";
symbolName = "DropDown";
invalidateStyle();
}
}
tabEnabled = !e;
tabChildren = e;
text_mc.tabEnabled = e;
if (e) {
delete text_mc.onPress;
delete text_mc.onRelease;
delete text_mc.onReleaseOutside;
delete text_mc.onDragOut;
delete text_mc.onDragOver;
delete text_mc.onRollOver;
delete text_mc.onRollOut;
} else {
text_mc.onPress = function () {
this._parent.downArrow_mc.onPress();
};
text_mc.onRelease = function () {
this._parent.downArrow_mc.onRelease();
};
text_mc.onReleaseOutside = function () {
this._parent.downArrow_mc.onReleaseOutside();
};
text_mc.onDragOut = function () {
this._parent.downArrow_mc.onDragOut();
};
text_mc.onDragOver = function () {
this._parent.downArrow_mc.onDragOver();
};
text_mc.onRollOver = function () {
this._parent.downArrow_mc.onRollOver();
};
text_mc.onRollOut = function () {
this._parent.downArrow_mc.onRollOut();
};
text_mc.useHandCursor = false;
}
}
function get editable() {
return(_editable);
}
function set editable(e) {
setEditable(e);
//return(editable);
}
function _getValue() {
return((_editable ? (text_mc.getText()) : (DSgetValue())));
}
function draw() {
downArrow_mc.draw();
border_mc.draw();
}
function size() {
layoutChildren(__width, __height);
}
function setTheme(t) {
downArrowUpName = (t + "downArrow") + "Up_mc";
downArrowDownName = (t + "downArrow") + "Down_mc";
downArrowDisabledName = (t + "downArrow") + "Disabled_mc";
}
function get text() {
return(text_mc.getText());
}
function set text(t) {
setText(t);
//return(text);
}
function setText(t) {
text_mc.setText(t);
}
function get textField() {
return(text_mc);
}
function get restrict() {
return(text_mc.__get__restrict());
}
function set restrict(w) {
text_mc.__set__restrict(w);
//return(restrict);
}
function invalidateStyle() {
downArrow_mc.invalidateStyle();
text_mc.invalidateStyle();
border_mc.invalidateStyle();
}
function layoutChildren(w, h) {
if (downArrow_mc == undefined) {
return(undefined);
}
if (wrapDownArrowButton) {
var _local2 = border_mc.__get__borderMetrics();
downArrow_mc._width = (downArrow_mc._height = (h - _local2.top) - _local2.bottom);
downArrow_mc.move((w - downArrow_mc._width) - _local2.right, _local2.top);
border_mc.setSize(w, h);
text_mc.setSize(w - downArrow_mc._width, h);
} else {
downArrow_mc.move(w - downArrow_mc._width, 0);
border_mc.setSize(w - downArrow_mc.width, h);
text_mc.setSize(w - downArrow_mc._width, h);
downArrow_mc._height = height;
}
}
function _changeHandler(obj) {
}
function _enterHandler(obj) {
var _local2 = _parent;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function get tabIndex() {
return(text_mc.__get__tabIndex());
}
function set tabIndex(w) {
text_mc.__set__tabIndex(w);
//return(tabIndex);
}
static var mixIt1 = mx.controls.listclasses.DataSelector.Initialize(mx.controls.ComboBase);
static var symbolName = "ComboBase";
static var symbolOwner = mx.controls.ComboBase;
static var version = "2.0.2.126";
var _editable = false;
var downArrowUpName = "ScrollDownArrowUp";
var downArrowDownName = "ScrollDownArrowDown";
var downArrowOverName = "ScrollDownArrowOver";
var downArrowDisabledName = "ScrollDownArrowDisabled";
var wrapDownArrowButton = true;
var DSgetValue = mx.controls.listclasses.DataSelector.prototype.getValue;
var multipleSelection = false;
}
Symbol 124 MovieClip [__Packages.mx.controls.ComboBox] Frame 0
class mx.controls.ComboBox extends mx.controls.ComboBase
{
var __set__editable, editable, __labels, data, __dropdownWidth, __width, _editable, selectedIndex, __dropdown, dataProvider, __labelFunction, createObject, border_mc, mask, text_mc, dispatchValueChangedEvent, getValue, length, selectedItem, _y, isPressed, owner, __set__visible, height, localToGlobal, __selectedIndexOnDropdown, __initialSelectedIndexOnDropdown, __get__height, getStyle, _parent, width, __dataProvider, selected, dispatchEvent;
function ComboBox () {
super();
}
function init() {
super.init();
}
function createChildren() {
super.createChildren();
__set__editable(editable);
if (__labels.length > 0) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < labels.length) {
_local6.addItem({label:labels[_local3], data:data[_local3]});
_local3++;
}
setDataProvider(_local6);
}
dropdownWidth = (((typeof(__dropdownWidth) == "number") ? (__dropdownWidth) : (__width)));
if (!_editable) {
selectedIndex = 0;
}
initializing = false;
}
function onKillFocus(n) {
if (_showingDropdown && (n != null)) {
displayDropdown(false);
}
super.onKillFocus();
}
function getDropdown() {
if (initializing) {
return(undefined);
}
if (!hasDropdown()) {
var _local3 = new Object();
_local3.styleName = this;
if (dropdownBorderStyle != undefined) {
_local3.borderStyle = dropdownBorderStyle;
}
_local3._visible = false;
__dropdown = mx.managers.PopUpManager.createPopUp(this, mx.controls.List, false, _local3, true);
__dropdown.scroller.mask.removeMovieClip();
if (dataProvider == undefined) {
dataProvider = new Array();
}
__dropdown.setDataProvider(dataProvider);
__dropdown.selectMultiple = false;
__dropdown.rowCount = __rowCount;
__dropdown.selectedIndex = selectedIndex;
__dropdown.vScrollPolicy = "auto";
__dropdown.labelField = __labelField;
__dropdown.labelFunction = __labelFunction;
__dropdown.owner = this;
__dropdown.changeHandler = _changeHandler;
__dropdown.scrollHandler = _scrollHandler;
__dropdown.itemRollOverHandler = _itemRollOverHandler;
__dropdown.itemRollOutHandler = _itemRollOutHandler;
__dropdown.resizeHandler = _resizeHandler;
__dropdown.mouseDownOutsideHandler = function (eventObj) {
var _local3 = this.owner;
var _local4 = new Object();
_local4.x = _local3._root._xmouse;
_local4.y = _local3._root._ymouse;
_local3._root.localToGlobal(_local4);
if (_local3.hitTest(_local4.x, _local4.y, false)) {
} else if ((!this.wrapDownArrowButton) && (this.owner.downArrow_mc.hitTest(_root._xmouse, _root._ymouse, false))) {
} else {
_local3.displayDropdown(false);
}
};
__dropdown.onTweenUpdate = function (v) {
this._y = v;
};
__dropdown.setSize(__dropdownWidth, __dropdown.height);
createObject("BoundingBox", "mask", 20);
mask._y = border_mc.height;
mask._width = __dropdownWidth;
mask._height = __dropdown.height;
mask._visible = false;
__dropdown.setMask(mask);
}
return(__dropdown);
}
function setSize(w, h, noEvent) {
super.setSize(w, h, noEvent);
__dropdownWidth = w;
__dropdown.rowHeight = h;
__dropdown.setSize(__dropdownWidth, __dropdown.height);
}
function setEditable(e) {
super.setEditable(e);
if (e) {
text_mc.setText("");
} else {
text_mc.setText(selectedLabel);
}
}
function get labels() {
return(__labels);
}
function set labels(lbls) {
__labels = lbls;
setDataProvider(lbls);
//return(labels);
}
function getLabelField() {
return(__labelField);
}
function get labelField() {
return(getLabelField());
}
function setLabelField(s) {
__dropdown.labelField = (__labelField = s);
text_mc.setText(selectedLabel);
}
function set labelField(s) {
setLabelField(s);
//return(labelField);
}
function getLabelFunction() {
return(__labelFunction);
}
function get labelFunction() {
return(getLabelFunction());
}
function set labelFunction(f) {
__dropdown.labelFunction = (__labelFunction = f);
text_mc.setText(selectedLabel);
//return(labelFunction);
}
function setSelectedItem(v) {
super.setSelectedItem(v);
__dropdown.selectedItem = v;
text_mc.setText(selectedLabel);
}
function setSelectedIndex(v) {
super.setSelectedIndex(v);
__dropdown.selectedIndex = v;
if (v != undefined) {
text_mc.setText(selectedLabel);
}
dispatchValueChangedEvent(getValue());
}
function setRowCount(count) {
if (isNaN(count)) {
return(undefined);
}
__rowCount = count;
__dropdown.setRowCount(count);
}
function get rowCount() {
return(Math.max(1, Math.min(length, __rowCount)));
}
function set rowCount(v) {
setRowCount(v);
//return(rowCount);
}
function setDropdownWidth(w) {
__dropdownWidth = w;
__dropdown.setSize(w, __dropdown.height);
}
function get dropdownWidth() {
return(__dropdownWidth);
}
function set dropdownWidth(v) {
setDropdownWidth(v);
//return(dropdownWidth);
}
function get dropdown() {
return(getDropdown());
}
function setDataProvider(dp) {
super.setDataProvider(dp);
__dropdown.setDataProvider(dp);
if (!_editable) {
selectedIndex = 0;
}
}
function open() {
displayDropdown(true);
}
function close() {
displayDropdown(false);
}
function get selectedLabel() {
var _local2 = selectedItem;
if (_local2 == undefined) {
return("");
}
if (labelFunction != undefined) {
return(labelFunction(_local2));
}
if (typeof(_local2) != "object") {
return(_local2);
}
if (_local2[labelField] != undefined) {
return(_local2[labelField]);
}
if (_local2.label != undefined) {
return(_local2.label);
}
var _local3 = " ";
for (var _local4 in _local2) {
if (_local4 != "__ID__") {
_local3 = (_local2[_local4] + ", ") + _local3;
}
}
_local3 = _local3.substring(0, _local3.length - 3);
return(_local3);
}
function hasDropdown() {
return((__dropdown != undefined) && (__dropdown.valueOf() != undefined));
}
function tweenEndShow(value) {
_y = value;
isPressed = true;
owner.dispatchEvent({type:"open", target:owner});
}
function tweenEndHide(value) {
_y = value;
__set__visible(false);
owner.dispatchEvent({type:"close", target:owner});
}
function displayDropdown(show) {
if (show == _showingDropdown) {
return(undefined);
}
var _local3 = new Object();
_local3.x = 0;
_local3.y = height;
localToGlobal(_local3);
if (show) {
__selectedIndexOnDropdown = selectedIndex;
__initialSelectedIndexOnDropdown = selectedIndex;
getDropdown();
var _local2 = __dropdown;
_local2.isPressed = true;
_local2.rowCount = rowCount;
_local2.visible = show;
_local2._parent.globalToLocal(_local3);
_local2.onTweenEnd = tweenEndShow;
var _local5;
var _local8;
if ((_local3.y + _local2.height) > Stage.height) {
_local5 = _local3.y - __get__height();
_local8 = _local5 - _local2.height;
mask._y = -_local2.height;
} else {
_local5 = _local3.y - _local2.height;
_local8 = _local3.y;
mask._y = border_mc.height;
}
var _local6 = _local2.selectedIndex;
if (_local6 == undefined) {
_local6 = 0;
}
var _local4 = _local2.vPosition;
_local4 = _local6 - 1;
_local4 = Math.min(Math.max(_local4, 0), _local2.length - _local2.rowCount);
_local2.vPosition = _local4;
_local2.move(_local3.x, _local5);
_local2.tween = new mx.effects.Tween(__dropdown, _local5, _local8, getStyle("openDuration"));
} else {
__dropdown._parent.globalToLocal(_local3);
delete __dropdown.dragScrolling;
__dropdown.onTweenEnd = tweenEndHide;
__dropdown.tween = new mx.effects.Tween(__dropdown, __dropdown._y, _local3.y - __dropdown.height, getStyle("openDuration"));
if (__initialSelectedIndexOnDropdown != selectedIndex) {
dispatchChangeEvent(undefined, __initialSelectedIndexOnDropdown, selectedIndex);
}
}
var _local9 = getStyle("openEasing");
if (_local9 != undefined) {
__dropdown.tween.easingEquation = _local9;
}
_showingDropdown = show;
}
function onDownArrow() {
_parent.displayDropdown(!_parent._showingDropdown);
}
function keyDown(e) {
if (e.ctrlKey && (e.code == 40)) {
displayDropdown(true);
} else if (e.ctrlKey && (e.code == 38)) {
displayDropdown(false);
dispatchChangeEvent(undefined, __selectedIndexOnDropdown, selectedIndex);
} else if (e.code == 27) {
displayDropdown(false);
} else if (e.code == 13) {
if (_showingDropdown) {
selectedIndex = __dropdown.selectedIndex;
displayDropdown(false);
}
} else if (((((!_editable) || (e.code == 38)) || (e.code == 40)) || (e.code == 33)) || (e.code == 34)) {
selectedIndex = 0 + selectedIndex;
bInKeyDown = true;
var _local3 = dropdown;
_local3.keyDown(e);
bInKeyDown = false;
selectedIndex = __dropdown.selectedIndex;
}
}
function invalidateStyle(styleProp) {
__dropdown.invalidateStyle(styleProp);
super.invalidateStyle(styleProp);
}
function changeTextStyleInChildren(styleProp) {
if (dropdown.stylecache != undefined) {
delete dropdown.stylecache[styleProp];
delete dropdown.stylecache.tf;
}
__dropdown.changeTextStyleInChildren(styleProp);
super.changeTextStyleInChildren(styleProp);
}
function changeColorStyleInChildren(sheetName, styleProp, newValue) {
if (dropdown.stylecache != undefined) {
delete dropdown.stylecache[styleProp];
delete dropdown.stylecache.tf;
}
__dropdown.changeColorStyleInChildren(sheetName, styleProp, newValue);
super.changeColorStyleInChildren(sheetName, styleProp, newValue);
}
function notifyStyleChangeInChildren(sheetName, styleProp, newValue) {
if (dropdown.stylecache != undefined) {
delete dropdown.stylecache[styleProp];
delete dropdown.stylecache.tf;
}
__dropdown.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
super.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
}
function onUnload() {
__dropdown.removeMovieClip();
}
function _resizeHandler() {
var _local2 = owner;
_local2.mask._width = width;
_local2.mask._height = height;
}
function _changeHandler(obj) {
var _local2 = owner;
var _local3 = _local2.selectedIndex;
obj.target = _local2;
if (this == owner.text_mc) {
_local2.selectedIndex = undefined;
_local2.dispatchChangeEvent(obj, -1, -2);
} else {
_local2.selectedIndex = selectedIndex;
if (!_local2._showingDropdown) {
_local2.dispatchChangeEvent(obj, _local3, _local2.selectedIndex);
} else if (!_local2.bInKeyDown) {
_local2.displayDropdown(false);
}
}
}
function _scrollHandler(obj) {
var _local2 = owner;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function _itemRollOverHandler(obj) {
var _local2 = owner;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function _itemRollOutHandler(obj) {
var _local2 = owner;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function modelChanged(eventObj) {
super.modelChanged(eventObj);
if (0 == __dataProvider.length) {
text_mc.setText("");
delete selected;
} else if ((__dataProvider.length == ((eventObj.lastItem - eventObj.firstItem) + 1)) && (eventObj.eventName == "addItems")) {
selectedIndex = 0;
}
}
function dispatchChangeEvent(obj, prevValue, newValue) {
var _local2;
if (prevValue != newValue) {
if ((obj != undefined) && (obj.type == "change")) {
_local2 = obj;
} else {
_local2 = {type:"change"};
}
dispatchEvent(_local2);
}
}
static var symbolName = "ComboBox";
static var symbolOwner = mx.controls.ComboBox;
static var version = "2.0.2.126";
var clipParameters = {labels:1, data:1, editable:1, rowCount:1, dropdownWidth:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.ComboBox.prototype.clipParameters, mx.controls.ComboBase.prototype.clipParameters);
var className = "ComboBox";
var _showingDropdown = false;
var __rowCount = 5;
var dropdownBorderStyle = undefined;
var initializing = true;
var __labelField = "label";
var bInKeyDown = false;
}
Symbol 205 MovieClip [__Packages.mx.managers.PopUpManager] Frame 0
class mx.managers.PopUpManager
{
var popUp, setSize, move, modalWindow, _parent, _name, _visible, owner;
function PopUpManager () {
}
static function createModalWindow(parent, o, broadcastOutsideEvents) {
var _local2 = parent.createChildAtDepth("Modal", mx.managers.DepthManager.kTopmost);
_local2.setDepthBelow(o);
o.modalID = _local2._name;
_local2._alpha = _global.style.modalTransparency;
_local2.tabEnabled = false;
if (broadcastOutsideEvents) {
_local2.onPress = mixins.onPress;
} else {
_local2.onPress = mixins.nullFunction;
}
_local2.onRelease = mixins.nullFunction;
_local2.resize = mixins.resize;
mx.managers.SystemManager.init();
mx.managers.SystemManager.addEventListener("resize", _local2);
_local2.resize();
_local2.useHandCursor = false;
_local2.popUp = o;
o.modalWindow = _local2;
o.deletePopUp = mixins.deletePopUp;
o.setVisible = mixins.setVisible;
o.getVisible = mixins.getVisible;
o.addProperty("visible", o.getVisible, o.setVisible);
}
static function createPopUp(parent, className, modal, initobj, broadcastOutsideEvents) {
if (mixins == undefined) {
mixins = new mx.managers.PopUpManager();
}
if (broadcastOutsideEvents == undefined) {
broadcastOutsideEvents = false;
}
var _local5 = parent._root;
if (_local5 == undefined) {
_local5 = _root;
}
while (parent != _local5) {
parent = parent._parent;
}
initobj.popUp = true;
var _local4 = parent.createClassChildAtDepth(className, ((broadcastOutsideEvents || (modal)) ? (mx.managers.DepthManager.kTopmost) : (mx.managers.DepthManager.kTop)), initobj);
var _local2 = _root;
var _local6 = _local2.focusManager != undefined;
while (_local2._parent != undefined) {
_local2 = _local2._parent._root;
if (_local2.focusManager != undefined) {
_local6 = true;
break;
}
}
if (_local6) {
_local4.createObject("FocusManager", "focusManager", -1);
if (_local4._visible == false) {
mx.managers.SystemManager.deactivate(_local4);
}
}
if (modal) {
createModalWindow(parent, _local4, broadcastOutsideEvents);
} else {
if (broadcastOutsideEvents) {
_local4.mouseListener = new Object();
_local4.mouseListener.owner = _local4;
_local4.mouseListener.onMouseDown = mixins.onMouseDown;
Mouse.addListener(_local4.mouseListener);
}
_local4.deletePopUp = mixins.deletePopUp;
}
return(_local4);
}
function onPress(Void) {
var _local3 = popUp._root;
if (_local3 == undefined) {
_local3 = _root;
}
if (popUp.hitTest(_local3._xmouse, _local3._ymouse, false)) {
return(undefined);
}
popUp.dispatchEvent({type:"mouseDownOutside"});
}
function nullFunction(Void) {
}
function resize(Void) {
var _local2 = mx.managers.SystemManager.__get__screen();
setSize(_local2.width, _local2.height);
move(_local2.x, _local2.y);
}
function deletePopUp(Void) {
if (modalWindow != undefined) {
_parent.destroyObject(modalWindow._name);
}
_parent.destroyObject(_name);
}
function setVisible(v, noEvent) {
super.setVisible(v, noEvent);
modalWindow._visible = v;
}
function getVisible(Void) {
return(_visible);
}
function onMouseDown(Void) {
var _local3 = owner._root;
if (_local3 == undefined) {
_local3 = _root;
}
var _local4 = new Object();
_local4.x = _local3._xmouse;
_local4.y = _local3._ymouse;
_local3.localToGlobal(_local4);
if (owner.hitTest(_local4.x, _local4.y, false)) {
} else {
owner.mouseDownOutsideHandler(owner);
}
}
static var version = "2.0.2.126";
static var mixins = undefined;
}
Symbol 206 MovieClip [__Packages.mx.core.View] Frame 0
class mx.core.View extends mx.core.UIComponent
{
var tabChildren, tabEnabled, boundingBox_mc, border_mc, __get__width, __get__height, __tabIndex, depth, createObject, createClassObject, loadExternal, destroyObject, createClassChildAtDepth, doLater;
function View () {
super();
}
function init() {
super.init();
tabChildren = true;
tabEnabled = false;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function size() {
border_mc.move(0, 0);
border_mc.setSize(__get__width(), __get__height());
doLayout();
}
function draw() {
size();
}
function get numChildren() {
var _local3 = childNameBase;
var _local2 = 0;
while (true) {
if (this[_local3 + _local2] == undefined) {
return(_local2);
}
_local2++;
}
}
function get tabIndex() {
return((tabEnabled ? (__tabIndex) : undefined));
}
function addLayoutObject(object) {
}
function createChild(className, instanceName, initProps) {
if (depth == undefined) {
depth = 1;
}
var _local2;
if (typeof(className) == "string") {
_local2 = createObject(className, instanceName, depth++, initProps);
} else {
_local2 = createClassObject(className, instanceName, depth++, initProps);
}
if (_local2 == undefined) {
_local2 = loadExternal(className, _loadExternalClass, instanceName, depth++, initProps);
} else {
this[childNameBase + numChildren] = _local2;
_local2._complete = true;
childLoaded(_local2);
}
addLayoutObject(_local2);
return(_local2);
}
function getChildAt(childIndex) {
return(this[childNameBase + childIndex]);
}
function destroyChildAt(childIndex) {
if (!((childIndex >= 0) && (childIndex < numChildren))) {
return(undefined);
}
var _local4 = childNameBase + childIndex;
var _local6 = numChildren;
var _local3;
for (_local3 in this) {
if (_local3 == _local4) {
_local4 = "";
destroyObject(_local3);
break;
}
}
var _local2 = Number(childIndex);
while (_local2 < (_local6 - 1)) {
this[childNameBase + _local2] = this[childNameBase + (_local2 + 1)];
_local2++;
}
delete this[childNameBase + (_local6 - 1)];
depth--;
}
function initLayout() {
if (!hasBeenLayedOut) {
doLayout();
}
}
function doLayout() {
hasBeenLayedOut = true;
}
function createChildren() {
if (border_mc == undefined) {
border_mc = createClassChildAtDepth(_global.styles.rectBorderClass, mx.managers.DepthManager.kBottom, {styleName:this});
}
doLater(this, "initLayout");
}
function convertToUIObject(obj) {
}
function childLoaded(obj) {
convertToUIObject(obj);
}
static function extension() {
mx.core.ExternalContent.enableExternalContent();
}
static var symbolName = "View";
static var symbolOwner = mx.core.View;
static var version = "2.0.2.126";
var className = "View";
static var childNameBase = "_child";
var hasBeenLayedOut = false;
var _loadExternalClass = "UIComponent";
}
Symbol 207 MovieClip [__Packages.mx.core.ExternalContent] Frame 0
class mx.core.ExternalContent
{
var createObject, numChildren, prepList, doLater, loadList, dispatchEvent, loadedList, childLoaded;
function ExternalContent () {
}
function loadExternal(url, placeholderClassName, instanceName, depth, initProps) {
var _local2;
_local2 = createObject(placeholderClassName, instanceName, depth, initProps);
this[mx.core.View.childNameBase + numChildren] = _local2;
if (prepList == undefined) {
prepList = new Object();
}
prepList[instanceName] = {obj:_local2, url:url, complete:false, initProps:initProps};
prepareToLoadMovie(_local2);
return(_local2);
}
function prepareToLoadMovie(obj) {
obj.unloadMovie();
doLater(this, "waitForUnload");
}
function waitForUnload() {
var _local3;
for (_local3 in prepList) {
var _local2 = prepList[_local3];
if (_local2.obj.getBytesTotal() == 0) {
if (loadList == undefined) {
loadList = new Object();
}
loadList[_local3] = _local2;
_local2.obj.loadMovie(_local2.url);
delete prepList[_local3];
doLater(this, "checkLoadProgress");
} else {
doLater(this, "waitForUnload");
}
}
}
function checkLoadProgress() {
var _local8 = false;
var _local3;
for (_local3 in loadList) {
var _local2 = loadList[_local3];
_local2.loaded = _local2.obj.getBytesLoaded();
_local2.total = _local2.obj.getBytesTotal();
if (_local2.total > 0) {
_local2.obj._visible = false;
dispatchEvent({type:"progress", target:_local2.obj, current:_local2.loaded, total:_local2.total});
if (_local2.loaded == _local2.total) {
if (loadedList == undefined) {
loadedList = new Object();
}
loadedList[_local3] = _local2;
delete loadList[_local3];
doLater(this, "contentLoaded");
}
} else if (_local2.total == -1) {
if (_local2.failedOnce != undefined) {
_local2.failedOnce++;
if (_local2.failedOnce > 3) {
dispatchEvent({type:"complete", target:_local2.obj, current:_local2.loaded, total:_local2.total});
delete loadList[_local3];
}
} else {
_local2.failedOnce = 0;
}
}
_local8 = true;
}
if (_local8) {
doLater(this, "checkLoadProgress");
}
}
function contentLoaded() {
var _local4;
for (_local4 in loadedList) {
var _local2 = loadedList[_local4];
_local2.obj._visible = true;
_local2.obj._complete = true;
var _local3;
for (_local3 in _local2.initProps) {
_local2.obj[_local3] = _local2.initProps[_local3];
}
childLoaded(_local2.obj);
dispatchEvent({type:"complete", target:_local2.obj, current:_local2.loaded, total:_local2.total});
delete loadedList[_local4];
}
}
function convertToUIObject(obj) {
if (obj.setSize == undefined) {
var _local2 = mx.core.UIObject.prototype;
obj.addProperty("width", _local2.__get__width, null);
obj.addProperty("height", _local2.__get__height, null);
obj.addProperty("left", _local2.__get__left, null);
obj.addProperty("x", _local2.__get__x, null);
obj.addProperty("top", _local2.__get__top, null);
obj.addProperty("y", _local2.__get__y, null);
obj.addProperty("right", _local2.__get__right, null);
obj.addProperty("bottom", _local2.__get__bottom, null);
obj.addProperty("visible", _local2.__get__visible, _local2.__set__visible);
obj.move = mx.core.UIObject.prototype.move;
obj.setSize = mx.core.UIObject.prototype.setSize;
obj.size = mx.core.UIObject.prototype.size;
mx.events.UIEventDispatcher.initialize(obj);
}
}
static function enableExternalContent() {
}
static function classConstruct() {
var _local1 = mx.core.View.prototype;
var _local2 = mx.core.ExternalContent.prototype;
_local1.loadExternal = _local2.loadExternal;
_local1.prepareToLoadMovie = _local2.prepareToLoadMovie;
_local1.waitForUnload = _local2.waitForUnload;
_local1.checkLoadProgress = _local2.checkLoadProgress;
_local1.contentLoaded = _local2.contentLoaded;
_local1.convertToUIObject = _local2.convertToUIObject;
return(true);
}
static var classConstructed = classConstruct();
static var ViewDependency = mx.core.View;
}
Symbol 208 MovieClip [__Packages.mx.skins.CustomBorder] Frame 0
class mx.skins.CustomBorder extends mx.skins.Border
{
var __width, __height, l_mc, setSkin, minHeight, minWidth, m_mc, r_mc;
function CustomBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function createChildren(Void) {
}
function draw(Void) {
if (l_mc == undefined) {
var _local2 = setSkin(tagL, leftSkin);
if (horizontal) {
minHeight = l_mc._height;
minWidth = l_mc._width;
} else {
minHeight = l_mc._height;
minWidth = l_mc._width;
}
}
if (m_mc == undefined) {
setSkin(tagM, middleSkin);
if (horizontal) {
minHeight = m_mc._height;
minWidth = minWidth + m_mc._width;
} else {
minHeight = minHeight + m_mc._height;
minWidth = m_mc._width;
}
}
if (r_mc == undefined) {
setSkin(tagR, rightSkin);
if (horizontal) {
minHeight = r_mc._height;
minWidth = minWidth + r_mc._width;
} else {
minHeight = minHeight + r_mc._height;
minWidth = r_mc._width;
}
}
size();
}
function size(Void) {
l_mc.move(0, 0);
if (horizontal) {
r_mc.move(width - r_mc.width, 0);
m_mc.move(l_mc.width, 0);
m_mc.setSize(r_mc.x - m_mc.x, m_mc.height);
} else {
r_mc.move(0, height - r_mc.height, 0);
m_mc.move(0, l_mc.height);
m_mc.setSize(m_mc.width, r_mc.y - m_mc.y);
}
}
static var symbolName = "CustomBorder";
static var symbolOwner = mx.skins.CustomBorder;
static var version = "2.0.2.126";
var className = "CustomBorder";
static var tagL = 0;
static var tagM = 1;
static var tagR = 2;
var idNames = new Array("l_mc", "m_mc", "r_mc");
var leftSkin = "F3PieceLeft";
var middleSkin = "F3PieceMiddle";
var rightSkin = "F3PieceRight";
var horizontal = true;
}
Symbol 209 MovieClip [__Packages.mx.controls.scrollClasses.ScrollThumb] Frame 0
class mx.controls.scrollClasses.ScrollThumb extends mx.skins.CustomBorder
{
var useHandCursor, ymin, ymax, datamin, datamax, scrollMove, lastY, _ymouse, _y, _parent, onMouseMove, grip_mc, setSkin, gripSkin, __get__width, __get__height;
function ScrollThumb () {
super();
}
function createChildren(Void) {
super.createChildren();
useHandCursor = false;
}
function setRange(_ymin, _ymax, _datamin, _datamax) {
ymin = _ymin;
ymax = _ymax;
datamin = _datamin;
datamax = _datamax;
}
function dragThumb(Void) {
scrollMove = _ymouse - lastY;
scrollMove = scrollMove + _y;
if (scrollMove < ymin) {
scrollMove = ymin;
} else if (scrollMove > ymax) {
scrollMove = ymax;
}
_parent.isScrolling = true;
_y = scrollMove;
var _local2 = Math.round(((datamax - datamin) * (_y - ymin)) / (ymax - ymin)) + datamin;
_parent.scrollPosition = _local2;
_parent.dispatchScrollEvent("ThumbTrack");
updateAfterEvent();
}
function stopDragThumb(Void) {
_parent.isScrolling = false;
_parent.dispatchScrollEvent("ThumbPosition");
_parent.dispatchScrollChangedEvent();
delete onMouseMove;
}
function onPress(Void) {
_parent.pressFocus();
lastY = _ymouse;
onMouseMove = dragThumb;
super.onPress();
}
function onRelease(Void) {
_parent.releaseFocus();
stopDragThumb();
super.onRelease();
}
function onReleaseOutside(Void) {
_parent.releaseFocus();
stopDragThumb();
super.onReleaseOutside();
}
function draw() {
super.draw();
if (grip_mc == undefined) {
setSkin(3, gripSkin);
}
}
function size() {
super.size();
grip_mc.move((__get__width() - grip_mc.width) / 2, (__get__height() - grip_mc.height) / 2);
}
static var symbolOwner = mx.skins.CustomBorder.symbolOwner;
var className = "ScrollThumb";
var btnOffset = 0;
var horizontal = false;
var idNames = new Array("l_mc", "m_mc", "r_mc", "grip_mc");
}
Symbol 210 MovieClip [__Packages.mx.controls.scrollClasses.ScrollBar] Frame 0
class mx.controls.scrollClasses.ScrollBar extends mx.core.UIComponent
{
var isScrolling, scrollTrack_mc, scrollThumb_mc, __height, tabEnabled, focusEnabled, boundingBox_mc, setSkin, upArrow_mc, _minHeight, _minWidth, downArrow_mc, createObject, createClassObject, enabled, _height, dispatchEvent, minMode, maxMode, plusMode, minusMode, _parent, getStyle, scrolling, _ymouse;
function ScrollBar () {
super();
}
function get scrollPosition() {
return(_scrollPosition);
}
function set scrollPosition(pos) {
_scrollPosition = pos;
if (isScrolling != true) {
pos = Math.min(pos, maxPos);
pos = Math.max(pos, minPos);
var _local3 = (((pos - minPos) * (scrollTrack_mc.height - scrollThumb_mc._height)) / (maxPos - minPos)) + scrollTrack_mc.top;
scrollThumb_mc.move(0, _local3);
}
//return(scrollPosition);
}
function get pageScrollSize() {
return(largeScroll);
}
function set pageScrollSize(lScroll) {
largeScroll = lScroll;
//return(pageScrollSize);
}
function set lineScrollSize(sScroll) {
smallScroll = sScroll;
//return(lineScrollSize);
}
function get lineScrollSize() {
return(smallScroll);
}
function get virtualHeight() {
return(__height);
}
function init(Void) {
super.init();
_scrollPosition = 0;
tabEnabled = false;
focusEnabled = false;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function createChildren(Void) {
if (scrollTrack_mc == undefined) {
setSkin(skinIDTrack, scrollTrackName);
}
scrollTrack_mc.visible = false;
var _local3 = new Object();
_local3.enabled = false;
_local3.preset = mx.controls.SimpleButton.falseDisabled;
_local3.initProperties = 0;
_local3.autoRepeat = true;
_local3.tabEnabled = false;
var _local2;
if (upArrow_mc == undefined) {
_local2 = createButton(upArrowName, "upArrow_mc", skinIDUpArrow, _local3);
}
_local2.buttonDownHandler = onUpArrow;
_local2.clickHandler = onScrollChanged;
_minHeight = _local2.height;
_minWidth = _local2.width;
if (downArrow_mc == undefined) {
_local2 = createButton(downArrowName, "downArrow_mc", skinIDDownArrow, _local3);
}
_local2.buttonDownHandler = onDownArrow;
_local2.clickHandler = onScrollChanged;
_minHeight = _minHeight + _local2.height;
}
function createButton(linkageName, id, skinID, o) {
if (skinID == skinIDUpArrow) {
o.falseUpSkin = upArrowUpName;
o.falseDownSkin = upArrowDownName;
o.falseOverSkin = upArrowOverName;
} else {
o.falseUpSkin = downArrowUpName;
o.falseDownSkin = downArrowDownName;
o.falseOverSkin = downArrowOverName;
}
var _local3 = createObject(linkageName, id, skinID, o);
this[id].visible = false;
this[id].useHandCursor = false;
return(_local3);
}
function createThumb(Void) {
var _local2 = new Object();
_local2.validateNow = true;
_local2.tabEnabled = false;
_local2.leftSkin = thumbTopName;
_local2.middleSkin = thumbMiddleName;
_local2.rightSkin = thumbBottomName;
_local2.gripSkin = thumbGripName;
createClassObject(mx.controls.scrollClasses.ScrollThumb, "scrollThumb_mc", skinIDThumb, _local2);
}
function setScrollProperties(pSize, mnPos, mxPos, ls) {
var _local4;
var _local2 = scrollTrack_mc;
pageSize = pSize;
largeScroll = (((ls != undefined) && (ls > 0)) ? (ls) : (pSize));
minPos = Math.max(mnPos, 0);
maxPos = Math.max(mxPos, 0);
_scrollPosition = Math.max(minPos, _scrollPosition);
_scrollPosition = Math.min(maxPos, _scrollPosition);
if (((maxPos - minPos) > 0) && (enabled)) {
var _local5 = _scrollPosition;
if (!initializing) {
upArrow_mc.enabled = true;
downArrow_mc.enabled = true;
}
_local2.onPress = (_local2.onDragOver = startTrackScroller);
_local2.onRelease = releaseScrolling;
_local2.onDragOut = (_local2.stopScrolling = stopScrolling);
_local2.onReleaseOutside = releaseScrolling;
_local2.useHandCursor = false;
if (scrollThumb_mc == undefined) {
createThumb();
}
var _local3 = scrollThumb_mc;
if (scrollTrackOverName.length > 0) {
_local2.onRollOver = trackOver;
_local2.onRollOut = trackOut;
}
_local4 = (pageSize / ((maxPos - minPos) + pageSize)) * _local2.height;
if (_local4 < _local3.minHeight) {
if (_local2.height < _local3.minHeight) {
_local3.__set__visible(false);
} else {
_local4 = _local3.minHeight;
_local3.__set__visible(true);
_local3.setSize(_minWidth, _local3.minHeight + 0);
}
} else {
_local3.__set__visible(true);
_local3.setSize(_minWidth, _local4);
}
_local3.setRange(upArrow_mc.__get__height() + 0, (virtualHeight - downArrow_mc.__get__height()) - _local3.__get__height(), minPos, maxPos);
_local5 = Math.min(_local5, maxPos);
scrollPosition = (Math.max(_local5, minPos));
} else {
scrollThumb_mc.__set__visible(false);
if (!initializing) {
upArrow_mc.enabled = false;
downArrow_mc.enabled = false;
}
delete _local2.onPress;
delete _local2.onDragOver;
delete _local2.onRelease;
delete _local2.onDragOut;
delete _local2.onRollOver;
delete _local2.onRollOut;
delete _local2.onReleaseOutside;
}
if (initializing) {
scrollThumb_mc.__set__visible(false);
}
}
function setEnabled(enabledFlag) {
super.setEnabled(enabledFlag);
setScrollProperties(pageSize, minPos, maxPos, largeScroll);
}
function draw(Void) {
if (initializing) {
initializing = false;
scrollTrack_mc.visible = true;
upArrow_mc.__set__visible(true);
downArrow_mc.__set__visible(true);
}
size();
}
function size(Void) {
if (_height == 1) {
return(undefined);
}
if (upArrow_mc == undefined) {
return(undefined);
}
var _local3 = upArrow_mc.__get__height();
var _local2 = downArrow_mc.__get__height();
upArrow_mc.move(0, 0);
var _local4 = scrollTrack_mc;
_local4._y = _local3;
_local4._height = (virtualHeight - _local3) - _local2;
downArrow_mc.move(0, virtualHeight - _local2);
setScrollProperties(pageSize, minPos, maxPos, largeScroll);
}
function dispatchScrollEvent(detail) {
dispatchEvent({type:"scroll", detail:detail});
}
function isScrollBarKey(k) {
if (k == 36) {
if (scrollPosition != 0) {
scrollPosition = (0);
dispatchScrollEvent(minMode);
}
return(true);
}
if (k == 35) {
if (scrollPosition < maxPos) {
scrollPosition = (maxPos);
dispatchScrollEvent(maxMode);
}
return(true);
}
return(false);
}
function scrollIt(inc, mode) {
var _local3 = smallScroll;
if (inc != "Line") {
_local3 = ((largeScroll == 0) ? (pageSize) : (largeScroll));
}
var _local2 = _scrollPosition + (mode * _local3);
if (_local2 > maxPos) {
_local2 = maxPos;
} else if (_local2 < minPos) {
_local2 = minPos;
}
if (scrollPosition != _local2) {
scrollPosition = (_local2);
var _local4 = ((mode < 0) ? (minusMode) : (plusMode));
dispatchScrollEvent(inc + _local4);
}
}
function startTrackScroller(Void) {
_parent.pressFocus();
if (_parent.scrollTrackDownName.length > 0) {
if (_parent.scrollTrackDown_mc == undefined) {
_parent.setSkin(skinIDTrackDown, scrollTrackDownName);
} else {
_parent.scrollTrackDown_mc.visible = true;
}
}
_parent.trackScroller();
_parent.scrolling = setInterval(_parent, "scrollInterval", getStyle("repeatDelay"), "Page", -1);
}
function scrollInterval(inc, mode) {
clearInterval(scrolling);
if (inc == "Page") {
trackScroller();
} else {
scrollIt(inc, mode);
}
scrolling = setInterval(this, "scrollInterval", getStyle("repeatInterval"), inc, mode);
}
function trackScroller(Void) {
if ((scrollThumb_mc._y + scrollThumb_mc.__get__height()) < _ymouse) {
scrollIt("Page", 1);
} else if (scrollThumb_mc._y > _ymouse) {
scrollIt("Page", -1);
}
}
function dispatchScrollChangedEvent(Void) {
dispatchEvent({type:"scrollChanged"});
}
function stopScrolling(Void) {
clearInterval(_parent.scrolling);
_parent.scrollTrackDown_mc.visible = false;
}
function releaseScrolling(Void) {
_parent.releaseFocus();
stopScrolling();
_parent.dispatchScrollChangedEvent();
}
function trackOver(Void) {
if (_parent.scrollTrackOverName.length > 0) {
if (_parent.scrollTrackOver_mc == undefined) {
_parent.setSkin(skinIDTrackOver, scrollTrackOverName);
} else {
_parent.scrollTrackOver_mc.visible = true;
}
}
}
function trackOut(Void) {
_parent.scrollTrackOver_mc.visible = false;
}
function onUpArrow(Void) {
_parent.scrollIt("Line", -1);
}
function onDownArrow(Void) {
_parent.scrollIt("Line", 1);
}
function onScrollChanged(Void) {
_parent.dispatchScrollChangedEvent();
}
static var symbolOwner = mx.core.UIComponent;
var className = "ScrollBar";
var minPos = 0;
var maxPos = 0;
var pageSize = 0;
var largeScroll = 0;
var smallScroll = 1;
var _scrollPosition = 0;
var scrollTrackName = "ScrollTrack";
var scrollTrackOverName = "";
var scrollTrackDownName = "";
var upArrowName = "BtnUpArrow";
var upArrowUpName = "ScrollUpArrowUp";
var upArrowOverName = "ScrollUpArrowOver";
var upArrowDownName = "ScrollUpArrowDown";
var downArrowName = "BtnDownArrow";
var downArrowUpName = "ScrollDownArrowUp";
var downArrowOverName = "ScrollDownArrowOver";
var downArrowDownName = "ScrollDownArrowDown";
var thumbTopName = "ScrollThumbTopUp";
var thumbMiddleName = "ScrollThumbMiddleUp";
var thumbBottomName = "ScrollThumbBottomUp";
var thumbGripName = "ScrollThumbGripUp";
static var skinIDTrack = 0;
static var skinIDTrackOver = 1;
static var skinIDTrackDown = 2;
static var skinIDUpArrow = 3;
static var skinIDDownArrow = 4;
static var skinIDThumb = 5;
var idNames = new Array("scrollTrack_mc", "scrollTrackOver_mc", "scrollTrackDown_mc", "upArrow_mc", "downArrow_mc");
var clipParameters = {minPos:1, maxPos:1, pageSize:1, scrollPosition:1, lineScrollSize:1, pageScrollSize:1, visible:1, enabled:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.scrollClasses.ScrollBar.prototype.clipParameters, mx.core.UIComponent.prototype.clipParameters);
var initializing = true;
}
Symbol 211 MovieClip [__Packages.mx.core.ScrollView] Frame 0
class mx.core.ScrollView extends mx.core.View
{
var __width, hScroller, vScroller, __maxHPosition, propsInited, scrollAreaChanged, specialHScrollCase, createObject, viewableColumns, __height, oldRndUp, viewableRows, __viewMetrics, owner, enabled, border_mc, __get__width, __get__height, invLayout, mask_mc, _parent, dispatchEvent;
function ScrollView () {
super();
}
function getHScrollPolicy(Void) {
return(__hScrollPolicy);
}
function setHScrollPolicy(policy) {
__hScrollPolicy = policy.toLowerCase();
if (__width == undefined) {
return(undefined);
}
setScrollProperties(numberOfCols, columnWidth, rowC, rowH, heightPadding, widthPadding);
}
function get hScrollPolicy() {
return(getHScrollPolicy());
}
function set hScrollPolicy(policy) {
setHScrollPolicy(policy);
//return(hScrollPolicy);
}
function getVScrollPolicy(Void) {
return(__vScrollPolicy);
}
function setVScrollPolicy(policy) {
__vScrollPolicy = policy.toLowerCase();
if (__width == undefined) {
return(undefined);
}
setScrollProperties(numberOfCols, columnWidth, rowC, rowH, heightPadding, widthPadding);
}
function get vScrollPolicy() {
return(getVScrollPolicy());
}
function set vScrollPolicy(policy) {
setVScrollPolicy(policy);
//return(vScrollPolicy);
}
function get hPosition() {
return(getHPosition());
}
function set hPosition(pos) {
setHPosition(pos);
//return(hPosition);
}
function getHPosition(Void) {
return(__hPosition);
}
function setHPosition(pos) {
hScroller.__set__scrollPosition(pos);
__hPosition = pos;
}
function get vPosition() {
return(getVPosition());
}
function set vPosition(pos) {
setVPosition(pos);
//return(vPosition);
}
function getVPosition(Void) {
return(__vPosition);
}
function setVPosition(pos) {
vScroller.__set__scrollPosition(pos);
__vPosition = pos;
}
function get maxVPosition() {
var _local2 = vScroller.maxPos;
return(((_local2 == undefined) ? 0 : (_local2)));
}
function get maxHPosition() {
return(getMaxHPosition());
}
function set maxHPosition(pos) {
setMaxHPosition(pos);
//return(maxHPosition);
}
function getMaxHPosition(Void) {
if (__maxHPosition != undefined) {
return(__maxHPosition);
}
var _local2 = hScroller.maxPos;
return(((_local2 == undefined) ? 0 : (_local2)));
}
function setMaxHPosition(pos) {
__maxHPosition = pos;
}
function setScrollProperties(colCount, colWidth, rwCount, rwHeight, hPadding, wPadding) {
var _local3 = getViewMetrics();
if (hPadding == undefined) {
hPadding = 0;
}
if (wPadding == undefined) {
wPadding = 0;
}
propsInited = true;
delete scrollAreaChanged;
heightPadding = hPadding;
widthPadding = wPadding;
if (colWidth == 0) {
colWidth = 1;
}
if (rwHeight == 0) {
rwHeight = 1;
}
var _local5 = Math.ceil((((__width - _local3.left) - _local3.right) - widthPadding) / colWidth);
if ((__hScrollPolicy == "on") || ((_local5 < colCount) && (__hScrollPolicy == "auto"))) {
if ((hScroller == undefined) || (specialHScrollCase)) {
delete specialHScrollCase;
hScroller = createObject("HScrollBar", "hSB", 1001);
hScroller.__set__lineScrollSize(20);
hScroller.scrollHandler = scrollProxy;
hScroller.__set__scrollPosition(__hPosition);
scrollAreaChanged = true;
}
if ((((numberOfCols != colCount) || (columnWidth != colWidth)) || (viewableColumns != _local5)) || (scrollAreaChanged)) {
hScroller.setScrollProperties(_local5, 0, colCount - _local5);
viewableColumns = _local5;
numberOfCols = colCount;
columnWidth = colWidth;
}
} else if (((__hScrollPolicy == "auto") || (__hScrollPolicy == "off")) && (hScroller != undefined)) {
hScroller.removeMovieClip();
delete hScroller;
scrollAreaChanged = true;
}
if (heightPadding == undefined) {
heightPadding = 0;
}
var _local4 = Math.ceil((((__height - _local3.top) - _local3.bottom) - heightPadding) / rwHeight);
var _local8 = (((__height - _local3.top) - _local3.bottom) % rwHeight) != 0;
if ((__vScrollPolicy == "on") || ((_local4 < (rwCount + _local8)) && (__vScrollPolicy == "auto"))) {
if (vScroller == undefined) {
vScroller = createObject("VScrollBar", "vSB", 1002);
vScroller.scrollHandler = scrollProxy;
vScroller.__set__scrollPosition(__vPosition);
scrollAreaChanged = true;
rowH = 0;
}
if ((((rowC != rwCount) || (rowH != rwHeight)) || ((viewableRows + _local8) != (_local4 + oldRndUp))) || (scrollAreaChanged)) {
vScroller.setScrollProperties(_local4, 0, (rwCount - _local4) + _local8);
viewableRows = _local4;
rowC = rwCount;
rowH = rwHeight;
oldRndUp = _local8;
}
} else if (((__vScrollPolicy == "auto") || (__vScrollPolicy == "off")) && (vScroller != undefined)) {
vScroller.removeMovieClip();
delete vScroller;
scrollAreaChanged = true;
}
numberOfCols = colCount;
columnWidth = colWidth;
if (scrollAreaChanged) {
doLayout();
var _local2 = __viewMetrics;
var _local12 = ((owner != undefined) ? (owner) : this);
_local12.layoutContent(_local2.left, _local2.top, ((columnWidth * numberOfCols) - _local2.left) - _local2.right, rowC * rowH, (__width - _local2.left) - _local2.right, (__height - _local2.top) - _local2.bottom);
}
if (!enabled) {
setEnabled(false);
}
}
function getViewMetrics(Void) {
var _local2 = __viewMetrics;
var _local3 = border_mc.__get__borderMetrics();
_local2.left = _local3.left;
_local2.right = _local3.right;
if (vScroller != undefined) {
_local2.right = _local2.right + vScroller.minWidth;
}
_local2.top = _local3.top;
if ((hScroller == undefined) && ((__hScrollPolicy == "on") || (__hScrollPolicy == true))) {
hScroller = createObject("FHScrollBar", "hSB", 1001);
specialHScrollCase = true;
}
_local2.bottom = _local3.bottom;
if (hScroller != undefined) {
_local2.bottom = _local2.bottom + hScroller.minHeight;
}
return(_local2);
}
function doLayout(Void) {
var _local10 = __get__width();
var _local8 = __get__height();
delete invLayout;
var _local3 = (__viewMetrics = getViewMetrics());
var _local2 = _local3.left;
var _local9 = _local3.right;
var _local5 = _local3.top;
var _local11 = _local3.bottom;
var _local7 = hScroller;
var _local6 = vScroller;
_local7.setSize((_local10 - _local2) - _local9, _local7.minHeight + 0);
_local7.move(_local2, _local8 - _local11);
_local6.setSize(_local6.minWidth + 0, (_local8 - _local5) - _local11);
_local6.move(_local10 - _local9, _local5);
var _local4 = mask_mc;
_local4._width = (_local10 - _local2) - _local9;
_local4._height = (_local8 - _local5) - _local11;
_local4._x = _local2;
_local4._y = _local5;
}
function createChild(id, name, props) {
var _local2 = super.createChild(id, name, props);
return(_local2);
}
function init(Void) {
super.init();
__viewMetrics = new Object();
if (_global.__SVMouseWheelManager == undefined) {
var _local4 = (_global.__SVMouseWheelManager = new Object());
_local4.onMouseWheel = __onMouseWheel;
Mouse.addListener(_local4);
}
}
function __onMouseWheel(delta, scrollTarget) {
var _local4 = scrollTarget;
var _local1;
while (_local4 != undefined) {
if (_local4 instanceof mx.core.ScrollView) {
_local1 = _local4;
}
_local4 = _local4._parent;
}
if (_local1 != undefined) {
_local4 = ((delta <= 0) ? 1 : -1);
var _local2 = _local1.vScroller.lineScrollSize;
if (_local2 == undefined) {
_local2 = 0;
}
_local2 = Math.max(Math.abs(delta), _local2);
var _local3 = _local1.vPosition + (_local2 * _local4);
_local1.vPosition = Math.max(0, Math.min(_local3, _local1.maxVPosition));
_local1.dispatchEvent({type:"scroll", direction:"vertical", position:_local1.vPosition});
}
}
function createChildren(Void) {
super.createChildren();
if (mask_mc == undefined) {
mask_mc = createObject("BoundingBox", "mask_mc", MASK_DEPTH);
}
mask_mc._visible = false;
}
function invalidate(Void) {
super.invalidate();
}
function draw(Void) {
size();
}
function size(Void) {
super.size();
}
function scrollProxy(docObj) {
_parent.onScroll(docObj);
}
function onScroll(docObj) {
var _local3 = docObj.target;
var _local2 = _local3.scrollPosition;
if (_local3 == vScroller) {
var _local4 = "vertical";
var _local5 = "__vPosition";
} else {
var _local4 = "horizontal";
var _local5 = "__hPosition";
}
this[_local5] = _local2;
dispatchEvent({type:"scroll", direction:_local4, position:_local2});
}
function setEnabled(v) {
vScroller.enabled = (hScroller.enabled = v);
}
function childLoaded(obj) {
super.childLoaded(obj);
obj.setMask(mask_mc);
}
static var symbolName = "ScrollView";
static var symbolOwner = mx.core.ScrollView;
static var version = "2.0.2.126";
var className = "ScrollView";
var __vScrollPolicy = "auto";
var __hScrollPolicy = "off";
var __vPosition = 0;
var __hPosition = 0;
var numberOfCols = 0;
var rowC = 0;
var columnWidth = 1;
var rowH = 0;
var heightPadding = 0;
var widthPadding = 0;
var MASK_DEPTH = 10000;
}
Symbol 212 MovieClip [__Packages.mx.controls.listclasses.DataProvider] Frame 0
class mx.controls.listclasses.DataProvider extends Object
{
var length, splice, dispatchEvent, sortOn, reverse, sort;
function DataProvider (obj) {
super();
}
static function Initialize(obj) {
var _local4 = mixinProps;
var _local6 = _local4.length;
obj = obj.prototype;
var _local3 = 0;
while (_local3 < _local6) {
obj[_local4[_local3]] = mixins[_local4[_local3]];
_global.ASSetPropFlags(obj, _local4[_local3], 1);
_local3++;
}
mx.events.EventDispatcher.initialize(obj);
_global.ASSetPropFlags(obj, "addEventListener", 1);
_global.ASSetPropFlags(obj, "removeEventListener", 1);
_global.ASSetPropFlags(obj, "dispatchEvent", 1);
_global.ASSetPropFlags(obj, "dispatchQueue", 1);
Object.prototype.LargestID = 0;
Object.prototype.getID = function () {
if (this.__ID__ == undefined) {
this.__ID__ = Object.prototype.LargestID++;
_global.ASSetPropFlags(this, "__ID__", 1);
}
return(this.__ID__);
};
_global.ASSetPropFlags(Object.prototype, "LargestID", 1);
_global.ASSetPropFlags(Object.prototype, "getID", 1);
return(true);
}
function addItemAt(index, value) {
if (index < length) {
splice(index, 0, value);
} else if (index > length) {
trace("Cannot add an item past the end of the DataProvider");
return(undefined);
}
this[index] = value;
updateViews("addItems", index, index);
}
function addItem(value) {
addItemAt(length, value);
}
function addItemsAt(index, newItems) {
index = Math.min(length, index);
newItems.unshift(index, 0);
splice.apply(this, newItems);
newItems.splice(0, 2);
updateViews("addItems", index, (index + newItems.length) - 1);
}
function removeItemsAt(index, len) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < len) {
_local3.push(getItemID(index + _local2));
_local2++;
}
var _local6 = splice(index, len);
dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:index, lastItem:(index + len) - 1, removedItems:_local6, removedIDs:_local3});
}
function removeItemAt(index) {
var _local2 = this[index];
removeItemsAt(index, 1);
return(_local2);
}
function removeAll(Void) {
splice(0);
updateViews("removeItems", 0, length - 1);
}
function replaceItemAt(index, itemObj) {
if ((index < 0) || (index >= length)) {
return(undefined);
}
var _local3 = getItemID(index);
this[index] = itemObj;
this[index].__ID__ = _local3;
updateViews("updateItems", index, index);
}
function getItemAt(index) {
return(this[index]);
}
function getItemID(index) {
var _local2 = this[index];
if ((typeof(_local2) != "object") && (_local2 != undefined)) {
return(index);
}
return(_local2.getID());
}
function sortItemsBy(fieldName, order) {
if (typeof(order) == "string") {
sortOn(fieldName);
if (order.toUpperCase() == "DESC") {
reverse();
}
} else {
sortOn(fieldName, order);
}
updateViews("sort");
}
function sortItems(compareFunc, optionFlags) {
sort(compareFunc, optionFlags);
updateViews("sort");
}
function editField(index, fieldName, newData) {
this[index][fieldName] = newData;
dispatchEvent({type:"modelChanged", eventName:"updateField", firstItem:index, lastItem:index, fieldName:fieldName});
}
function getEditingData(index, fieldName) {
return(this[index][fieldName]);
}
function updateViews(event, first, last) {
dispatchEvent({type:"modelChanged", eventName:event, firstItem:first, lastItem:last});
}
static var mixinProps = ["addView", "addItem", "addItemAt", "removeAll", "removeItemAt", "replaceItemAt", "getItemAt", "getItemID", "sortItemsBy", "sortItems", "updateViews", "addItemsAt", "removeItemsAt", "getEditingData", "editField"];
static var evtDipatcher = mx.events.EventDispatcher;
static var mixins = new mx.controls.listclasses.DataProvider();
}
Symbol 213 MovieClip [__Packages.mx.controls.listclasses.ScrollSelectList] Frame 0
class mx.controls.listclasses.ScrollSelectList extends mx.core.ScrollView
{
var invLayoutContent, rows, topRowZ, listContent, __dataProvider, __vPosition, tW, layoutX, layoutY, tH, invRowHeight, invalidate, __height, invUpdateControl, __cellRenderer, __labelFunction, __iconField, __iconFunction, getLength, baseRowZ, lastPosition, propertyTable, isSelected, wasKeySelected, changeFlag, clearSelected, selectItem, lastSelected, dispatchEvent, dragScrolling, _ymouse, scrollInterval, isPressed, onMouseUp, getSelectedIndex, enabled, tabEnabled, tabChildren, createEmptyMovieClip, border_mc;
function ScrollSelectList () {
super();
}
function layoutContent(x, y, w, h) {
delete invLayoutContent;
var _local4 = Math.ceil(h / __rowHeight);
roundUp = (h % __rowHeight) != 0;
var _local12 = _local4 - __rowCount;
if (_local12 < 0) {
var _local3 = _local4;
while (_local3 < __rowCount) {
rows[_local3].removeMovieClip();
delete rows[_local3];
_local3++;
}
topRowZ = topRowZ + _local12;
} else if (_local12 > 0) {
if (rows == undefined) {
rows = new Array();
}
var _local3 = __rowCount;
while (_local3 < _local4) {
var _local2 = (rows[_local3] = listContent.createObject(__rowRenderer, "listRow" + (topRowZ++), topRowZ, {owner:this, styleName:this, rowIndex:_local3}));
_local2._x = x;
_local2._y = Math.round((_local3 * __rowHeight) + y);
_local2.setSize(w, __rowHeight);
_local2.drawRow(__dataProvider.getItemAt(__vPosition + _local3), getStateAt(__vPosition + _local3));
_local2.lastY = _local2._y;
_local3++;
}
}
if (w != tW) {
var _local11 = ((_local12 > 0) ? (__rowCount) : (_local4));
var _local3 = 0;
while (_local3 < _local11) {
rows[_local3].setSize(w, __rowHeight);
_local3++;
}
}
if ((layoutX != x) || (layoutY != y)) {
var _local3 = 0;
while (_local3 < _local4) {
rows[_local3]._x = x;
rows[_local3]._y = Math.round((_local3 * __rowHeight) + y);
_local3++;
}
}
__rowCount = _local4;
layoutX = x;
layoutY = y;
tW = w;
tH = h;
}
function getRowHeight(Void) {
return(__rowHeight);
}
function setRowHeight(v) {
__rowHeight = v;
invRowHeight = true;
invalidate();
}
function get rowHeight() {
return(getRowHeight());
}
function set rowHeight(w) {
setRowHeight(w);
//return(rowHeight);
}
function setRowCount(v) {
__rowCount = v;
}
function getRowCount(Void) {
var _local2 = ((__rowCount == 0) ? (Math.ceil(__height / __rowHeight)) : (__rowCount));
return(_local2);
}
function get rowCount() {
return(getRowCount());
}
function set rowCount(w) {
setRowCount(w);
//return(rowCount);
}
function setEnabled(v) {
super.setEnabled(v);
invUpdateControl = true;
invalidate();
}
function setCellRenderer(cR) {
__cellRenderer = cR;
var _local2 = 0;
while (_local2 < rows.length) {
rows[_local2].setCellRenderer(true);
_local2++;
}
invUpdateControl = true;
invalidate();
}
function set cellRenderer(cR) {
setCellRenderer(cR);
//return(cellRenderer);
}
function get cellRenderer() {
return(__cellRenderer);
}
function set labelField(field) {
setLabelField(field);
//return(labelField);
}
function setLabelField(field) {
__labelField = field;
invUpdateControl = true;
invalidate();
}
function get labelField() {
return(__labelField);
}
function set labelFunction(func) {
setLabelFunction(func);
//return(labelFunction);
}
function setLabelFunction(func) {
__labelFunction = func;
invUpdateControl = true;
invalidate();
}
function get labelFunction() {
return(__labelFunction);
}
function set iconField(field) {
setIconField(field);
//return(iconField);
}
function setIconField(field) {
__iconField = field;
invUpdateControl = true;
invalidate();
}
function get iconField() {
return(__iconField);
}
function set iconFunction(func) {
setIconFunction(func);
//return(iconFunction);
}
function setIconFunction(func) {
__iconFunction = func;
invUpdateControl = true;
invalidate();
}
function get iconFunction() {
return(__iconFunction);
}
function setVPosition(pos) {
if (pos < 0) {
return(undefined);
}
if ((pos > 0) && (pos > ((getLength() - __rowCount) + roundUp))) {
return(undefined);
}
var _local8 = pos - __vPosition;
if (_local8 == 0) {
return(undefined);
}
__vPosition = pos;
var _local10 = _local8 > 0;
_local8 = Math.abs(_local8);
if (_local8 >= __rowCount) {
updateControl();
} else {
var _local4 = new Array();
var _local9 = __rowCount - _local8;
var _local12 = _local8 * __rowHeight;
var _local11 = _local9 * __rowHeight;
var _local6 = (_local10 ? 1 : -1);
var _local3 = 0;
while (_local3 < __rowCount) {
if (((_local3 < _local8) && (_local10)) || ((_local3 >= _local9) && (!_local10))) {
rows[_local3]._y = rows[_local3]._y + Math.round(_local6 * _local11);
var _local5 = _local3 + (_local6 * _local9);
var _local7 = __vPosition + _local5;
_local4[_local5] = rows[_local3];
_local4[_local5].rowIndex = _local5;
_local4[_local5].drawRow(__dataProvider.getItemAt(_local7), getStateAt(_local7), false);
} else {
rows[_local3]._y = rows[_local3]._y - Math.round(_local6 * _local12);
var _local5 = _local3 - (_local6 * _local8);
_local4[_local5] = rows[_local3];
_local4[_local5].rowIndex = _local5;
}
_local3++;
}
rows = _local4;
_local3 = 0;
while (_local3 < __rowCount) {
rows[_local3].swapDepths(baseRowZ + _local3);
_local3++;
}
}
lastPosition = pos;
super.setVPosition(pos);
}
function setPropertiesAt(index, obj) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
if (propertyTable == undefined) {
propertyTable = new Object();
}
propertyTable[_local2] = obj;
rows[index - __vPosition].drawRow(__dataProvider.getItemAt(index), getStateAt(index));
}
function getPropertiesAt(index) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
return(propertyTable[_local2]);
}
function getPropertiesOf(obj) {
var _local2 = obj.getID();
if (_local2 == undefined) {
return(undefined);
}
return(propertyTable[_local2]);
}
function getStyle(styleProp) {
var _local2 = super.getStyle(styleProp);
var _local3 = mx.styles.StyleManager.colorNames[_local2];
if (_local3 != undefined) {
_local2 = _local3;
}
return(_local2);
}
function updateControl(Void) {
var _local2 = 0;
while (_local2 < __rowCount) {
rows[_local2].drawRow(__dataProvider.getItemAt(_local2 + __vPosition), getStateAt(_local2 + __vPosition));
_local2++;
}
delete invUpdateControl;
}
function getStateAt(index) {
return((isSelected(index) ? "selected" : "normal"));
}
function selectRow(rowIndex, transition, allowChangeEvent) {
if (!selectable) {
return(undefined);
}
var _local3 = __vPosition + rowIndex;
var _local8 = __dataProvider.getItemAt(_local3);
var _local5 = rows[rowIndex];
if (_local8 == undefined) {
return(undefined);
}
if (transition == undefined) {
transition = true;
}
if (allowChangeEvent == undefined) {
allowChangeEvent = wasKeySelected;
}
changeFlag = true;
if (((!multipleSelection) && (!Key.isDown(17))) || ((!Key.isDown(16)) && (!Key.isDown(17)))) {
clearSelected(transition);
selectItem(_local3, true);
lastSelected = _local3;
_local5.drawRow(_local5.item, getStateAt(_local3), transition);
} else if (Key.isDown(16) && (multipleSelection)) {
if (lastSelected == undefined) {
lastSelected = _local3;
}
var _local4 = ((lastSelected < _local3) ? 1 : -1);
clearSelected(false);
var _local2 = lastSelected;
while (_local2 != _local3) {
selectItem(_local2, true);
if ((_local2 >= __vPosition) && (_local2 < (__vPosition + __rowCount))) {
rows[_local2 - __vPosition].drawRow(rows[_local2 - __vPosition].item, "selected", false);
}
_local2 = _local2 + _local4;
}
selectItem(_local3, true);
_local5.drawRow(_local5.item, "selected", transition);
} else if (Key.isDown(17)) {
var _local7 = isSelected(_local3);
if ((!multipleSelection) || (wasKeySelected)) {
clearSelected(transition);
}
if (!((!multipleSelection) && (_local7))) {
selectItem(_local3, !_local7);
var _local9 = ((!_local7) ? "selected" : "normal");
_local5.drawRow(_local5.item, _local9, transition);
}
lastSelected = _local3;
}
if (allowChangeEvent) {
dispatchEvent({type:"change"});
}
delete wasKeySelected;
}
function dragScroll(Void) {
clearInterval(dragScrolling);
if (_ymouse < 0) {
setVPosition(__vPosition - 1);
selectRow(0, false);
var _local2 = Math.min((-_ymouse) - 30, 0);
scrollInterval = (((0.593 * _local2) * _local2) + 1) + minScrollInterval;
dragScrolling = setInterval(this, "dragScroll", scrollInterval);
dispatchEvent({type:"scroll", direction:"vertical", position:__vPosition});
} else if (_ymouse > __height) {
var _local3 = __vPosition;
setVPosition(__vPosition + 1);
if (_local3 != __vPosition) {
selectRow((__rowCount - 1) - roundUp, false);
}
var _local2 = Math.min((_ymouse - __height) - 30, 0);
scrollInterval = (((0.593 * _local2) * _local2) + 1) + minScrollInterval;
dragScrolling = setInterval(this, "dragScroll", scrollInterval);
dispatchEvent({type:"scroll", direction:"vertical", position:__vPosition});
} else {
dragScrolling = setInterval(this, "dragScroll", 15);
}
updateAfterEvent();
}
function __onMouseUp(Void) {
clearInterval(dragScrolling);
delete dragScrolling;
delete dragScrolling;
delete isPressed;
delete onMouseUp;
if (!selectable) {
return(undefined);
}
if (changeFlag) {
dispatchEvent({type:"change"});
}
delete changeFlag;
}
function moveSelBy(incr) {
if (!selectable) {
setVPosition(__vPosition + incr);
return(undefined);
}
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = -1;
}
var _local2 = _local3 + incr;
_local2 = Math.max(0, _local2);
_local2 = Math.min(getLength() - 1, _local2);
if (_local2 == _local3) {
return(undefined);
}
if ((_local3 < __vPosition) || (_local3 >= (__vPosition + __rowCount))) {
setVPosition(_local3);
}
if ((_local2 >= ((__vPosition + __rowCount) - roundUp)) || (_local2 < __vPosition)) {
setVPosition(__vPosition + incr);
}
wasKeySelected = true;
selectRow(_local2 - __vPosition, false);
}
function keyDown(e) {
if (selectable) {
if (findInputText()) {
return(undefined);
}
}
if (e.code == 40) {
moveSelBy(1);
} else if (e.code == 38) {
moveSelBy(-1);
} else if (e.code == 34) {
if (selectable) {
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = 0;
}
setVPosition(_local3);
}
moveSelBy((__rowCount - 1) - roundUp);
} else if (e.code == 33) {
if (selectable) {
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = 0;
}
setVPosition(_local3);
}
moveSelBy((1 - __rowCount) + roundUp);
} else if (e.code == 36) {
moveSelBy(-__dataProvider.length);
} else if (e.code == 35) {
moveSelBy(__dataProvider.length);
}
}
function findInputText(Void) {
var _local2 = Key.getAscii();
if ((_local2 >= 33) && (_local2 <= 126)) {
findString(String.fromCharCode(_local2));
return(true);
}
}
function findString(str) {
if (__dataProvider.length == 0) {
return(undefined);
}
var _local4 = getSelectedIndex();
if (_local4 == undefined) {
_local4 = 0;
}
var _local6 = 0;
var _local3 = _local4 + 1;
while (_local3 != _local4) {
var _local2 = __dataProvider.getItemAt(_local3);
if (_local2 instanceof XMLNode) {
_local2 = _local2.attributes[__labelField];
} else if (typeof(_local2) != "string") {
_local2 = String(_local2[__labelField]);
}
_local2 = _local2.substring(0, str.length);
if ((str == _local2) || (str.toUpperCase() == _local2.toUpperCase())) {
_local6 = _local3 - _local4;
break;
}
if (_local3 >= (getLength() - 1)) {
_local3 = -1;
}
_local3++;
}
if (_local6 != 0) {
moveSelBy(_local6);
}
}
function onRowPress(rowIndex) {
if (!enabled) {
return(undefined);
}
isPressed = true;
dragScrolling = setInterval(this, "dragScroll", 15);
onMouseUp = __onMouseUp;
if (!selectable) {
return(undefined);
}
selectRow(rowIndex);
}
function onRowRelease(rowIndex) {
}
function onRowRollOver(rowIndex) {
if (!enabled) {
return(undefined);
}
var _local2 = rows[rowIndex].item;
if (getStyle("useRollOver") && (_local2 != undefined)) {
rows[rowIndex].drawRow(_local2, "highlighted", false);
}
dispatchEvent({type:"itemRollOver", index:rowIndex + __vPosition});
}
function onRowRollOut(rowIndex) {
if (!enabled) {
return(undefined);
}
if (getStyle("useRollOver")) {
rows[rowIndex].drawRow(rows[rowIndex].item, getStateAt(rowIndex + __vPosition), false);
}
dispatchEvent({type:"itemRollOut", index:rowIndex + __vPosition});
}
function onRowDragOver(rowIndex) {
if (((!enabled) || (isPressed != true)) || (!selectable)) {
return(undefined);
}
if (dropEnabled) {
} else if (dragScrolling) {
selectRow(rowIndex, false);
} else {
onMouseUp = __onMouseUp;
onRowPress(rowIndex);
}
}
function onRowDragOut(rowIndex) {
if (!enabled) {
return(undefined);
}
if (dragEnabled) {
} else {
onRowRollOut(rowIndex);
}
}
function init(Void) {
super.init();
tabEnabled = true;
tabChildren = false;
if (__dataProvider == undefined) {
__dataProvider = new Array();
__dataProvider.addEventListener("modelChanged", this);
}
baseRowZ = (topRowZ = 10);
}
function createChildren(Void) {
super.createChildren();
listContent = createEmptyMovieClip("content_mc", CONTENTDEPTH);
invLayoutContent = true;
invalidate();
}
function draw(Void) {
if (invRowHeight) {
delete invRowHeight;
__rowCount = 0;
listContent.removeMovieClip();
listContent = createEmptyMovieClip("content_mc", CONTENTDEPTH);
}
if (invUpdateControl) {
updateControl();
}
border_mc.draw();
}
function invalidateStyle(propName) {
if (isRowStyle[propName]) {
invUpdateControl = true;
invalidate();
} else {
var _local3 = 0;
while (_local3 < __rowCount) {
rows[_local3].invalidateStyle(propName);
_local3++;
}
}
super.invalidateStyle(propName);
}
static var mixIt1 = mx.controls.listclasses.DataSelector.Initialize(mx.controls.listclasses.ScrollSelectList);
static var mixIt2 = mx.controls.listclasses.DataProvider.Initialize(Array);
var CONTENTDEPTH = 100;
var __hPosition = 0;
var __rowRenderer = "SelectableRow";
var __rowHeight = 22;
var __rowCount = 0;
var __labelField = "label";
var minScrollInterval = 30;
var dropEnabled = false;
var dragEnabled = false;
var className = "ScrollSelectList";
var isRowStyle = {styleName:true, backgroundColor:true, selectionColor:true, rollOverColor:true, selectionDisabledColor:true, backgroundDisabledColor:true, textColor:true, textSelectedColor:true, textRollOverColor:true, textDisabledColor:true, alternatingRowColors:true, defaultIcon:true};
var roundUp = 0;
var selectable = true;
var multipleSelection = false;
}
Symbol 214 MovieClip [__Packages.mx.controls.List] Frame 0
class mx.controls.List extends mx.controls.listclasses.ScrollSelectList
{
var border_mc, __labels, setDataProvider, roundUp, __get__rowCount, __dataProvider, __maxHPosition, invScrollProps, invalidate, __vPosition, getViewMetrics, setSize, __width, __rowHeight, totalWidth, totalHeight, displayWidth, __hScrollPolicy, vScroller, __hPosition, listContent, data, mask_mc, __height, __rowCount, invRowHeight, invLayoutContent, setScrollProperties, oldVWidth;
function List () {
super();
}
function setEnabled(v) {
super.setEnabled(v);
border_mc.backgroundColorName = (v ? "backgroundColor" : "backgroundDisabledColor");
border_mc.invalidate();
}
function get labels() {
return(__labels);
}
function set labels(lbls) {
__labels = lbls;
setDataProvider(lbls);
//return(labels);
}
function setVPosition(pos) {
pos = Math.min((__dataProvider.length - __get__rowCount()) + roundUp, pos);
pos = Math.max(0, pos);
super.setVPosition(pos);
}
function setHPosition(pos) {
pos = Math.max(Math.min(__maxHPosition, pos), 0);
super.setHPosition(pos);
hScroll(pos);
}
function setMaxHPosition(pos) {
__maxHPosition = pos;
invScrollProps = true;
invalidate();
}
function setHScrollPolicy(policy) {
if ((policy.toLowerCase() == "auto") && (!autoHScrollAble)) {
return(undefined);
}
super.setHScrollPolicy(policy);
if (policy == "off") {
setHPosition(0);
setVPosition(Math.min((__dataProvider.length - __get__rowCount()) + roundUp, __vPosition));
}
}
function setRowCount(rC) {
if (isNaN(rC)) {
return(undefined);
}
var _local2 = getViewMetrics();
setSize(__width, ((__rowHeight * rC) + _local2.top) + _local2.bottom);
}
function layoutContent(x, y, tW, tH, dW, dH) {
totalWidth = tW;
totalHeight = tH;
displayWidth = dW;
var _local4 = (((__hScrollPolicy == "on") || (__hScrollPolicy == "auto")) ? (Math.max(tW, dW)) : (dW));
super.layoutContent(x, y, _local4, dH);
}
function modelChanged(eventObj) {
super.modelChanged(eventObj);
var _local3 = eventObj.eventName;
if ((((_local3 == "addItems") || (_local3 == "removeItems")) || (_local3 == "updateAll")) || (_local3 == "filterModel")) {
invScrollProps = true;
invalidate("invScrollProps");
}
}
function onScroll(eventObj) {
var _local3 = eventObj.target;
if (_local3 == vScroller) {
setVPosition(_local3.scrollPosition);
} else {
hScroll(_local3.scrollPosition);
}
super.onScroll(eventObj);
}
function hScroll(pos) {
__hPosition = pos;
listContent._x = -pos;
}
function init(Void) {
super.init();
if (labels.length > 0) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < labels.length) {
_local6.addItem({label:labels[_local3], data:data[_local3]});
_local3++;
}
setDataProvider(_local6);
}
__maxHPosition = 0;
}
function createChildren(Void) {
super.createChildren();
listContent.setMask(mask_mc);
border_mc.move(0, 0);
border_mc.setSize(__width, __height);
}
function getRowCount(Void) {
var _local2 = getViewMetrics();
return(((__rowCount == 0) ? (Math.ceil(((__height - _local2.top) - _local2.bottom) / __rowHeight)) : (__rowCount)));
}
function size(Void) {
super.size();
configureScrolling();
var _local3 = getViewMetrics();
layoutContent(_local3.left, _local3.top, __width + __maxHPosition, totalHeight, (__width - _local3.left) - _local3.right, (__height - _local3.top) - _local3.bottom);
}
function draw(Void) {
if (invRowHeight) {
invScrollProps = true;
super.draw();
listContent.setMask(mask_mc);
invLayoutContent = true;
}
if (invScrollProps) {
configureScrolling();
delete invScrollProps;
}
if (invLayoutContent) {
var _local3 = getViewMetrics();
layoutContent(_local3.left, _local3.top, __width + __maxHPosition, totalHeight, (__width - _local3.left) - _local3.right, (__height - _local3.top) - _local3.bottom);
}
super.draw();
}
function configureScrolling(Void) {
var _local2 = __dataProvider.length;
if (__vPosition > Math.max(0, (_local2 - getRowCount()) + roundUp)) {
setVPosition(Math.max(0, Math.min((_local2 - getRowCount()) + roundUp, __vPosition)));
}
var _local3 = getViewMetrics();
var _local4 = ((__hScrollPolicy != "off") ? (((__maxHPosition + __width) - _local3.left) - _local3.right) : ((__width - _local3.left) - _local3.right));
if (_local2 == undefined) {
_local2 = 0;
}
setScrollProperties(_local4, 1, _local2, __rowHeight);
if (oldVWidth != _local4) {
invLayoutContent = true;
}
oldVWidth = _local4;
}
static var symbolOwner = mx.controls.List;
static var symbolName = "List";
var className = "List";
static var version = "2.0.2.126";
var clipParameters = {rowHeight:1, enabled:1, visible:1, labels:1};
var scrollDepth = 1;
var __vScrollPolicy = "on";
var autoHScrollAble = false;
}
Symbol 215 MovieClip [__Packages.mx.effects.Tween] Frame 0
class mx.effects.Tween extends Object
{
static var IntervalToken;
var arrayMode, listener, initVal, endVal, startTime, updateFunc, endFunc, ID;
function Tween (listenerObj, init, end, dur) {
super();
if (listenerObj == undefined) {
return;
}
if (typeof(init) != "number") {
arrayMode = true;
}
listener = listenerObj;
initVal = init;
endVal = end;
if (dur != undefined) {
duration = dur;
}
startTime = getTimer();
if (duration == 0) {
endTween();
} else {
AddTween(this);
}
}
static function AddTween(tween) {
tween.ID = ActiveTweens.length;
ActiveTweens.push(tween);
if (IntervalToken == undefined) {
Dispatcher.DispatchTweens = DispatchTweens;
IntervalToken = setInterval(Dispatcher, "DispatchTweens", Interval);
}
}
static function RemoveTweenAt(index) {
var _local2 = ActiveTweens;
if (((index >= _local2.length) || (index < 0)) || (index == undefined)) {
return(undefined);
}
_local2.splice(index, 1);
var _local4 = _local2.length;
var _local1 = index;
while (_local1 < _local4) {
_local2[_local1].ID--;
_local1++;
}
if (_local4 == 0) {
clearInterval(IntervalToken);
delete IntervalToken;
}
}
static function DispatchTweens(Void) {
var _local2 = ActiveTweens;
var _local3 = _local2.length;
var _local1 = 0;
while (_local1 < _local3) {
_local2[_local1].doInterval();
_local1++;
}
updateAfterEvent();
}
function doInterval() {
var _local2 = getTimer() - startTime;
var _local3 = getCurVal(_local2);
if (_local2 >= duration) {
endTween();
} else if (updateFunc != undefined) {
listener[updateFunc](_local3);
} else {
listener.onTweenUpdate(_local3);
}
}
function getCurVal(curTime) {
if (arrayMode) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < initVal.length) {
_local3[_local2] = easingEquation(curTime, initVal[_local2], endVal[_local2] - initVal[_local2], duration);
_local2++;
}
return(_local3);
}
return(easingEquation(curTime, initVal, endVal - initVal, duration));
}
function endTween() {
if (endFunc != undefined) {
listener[endFunc](endVal);
} else {
listener.onTweenEnd(endVal);
}
RemoveTweenAt(ID);
}
function setTweenHandlers(update, end) {
updateFunc = update;
endFunc = end;
}
function easingEquation(t, b, c, d) {
return(((c / 2) * (Math.sin(Math.PI * ((t / d) - 0.5)) + 1)) + b);
}
static var ActiveTweens = new Array();
static var Interval = 10;
static var Dispatcher = new Object();
var duration = 3000;
}
Symbol 216 MovieClip [__Packages.mx.controls.listclasses.SelectableRow] Frame 0
class mx.controls.listclasses.SelectableRow extends mx.core.UIComponent
{
var __height, cell, owner, rowIndex, icon_mc, createObject, __width, backGround, highlight, highlightColor, createLabel, createClassObject, listOwner, tabEnabled, item, createEmptyMovieClip, drawRect, isChangedToSelected, bGTween, grandOwner;
function SelectableRow () {
super();
}
function setValue(itmObj, state) {
var _local7 = __height;
var _local2 = cell;
var _local5 = owner;
var _local8 = itemToString(itmObj);
if (_local2.getValue() != _local8) {
_local2.setValue(_local8, itmObj, state);
}
var _local4 = _local5.getPropertiesAt(rowIndex + _local5.__vPosition).icon;
if (_local4 == undefined) {
_local4 = _local5.__iconFunction(itmObj);
if (_local4 == undefined) {
_local4 = itmObj[_local5.__iconField];
if (_local4 == undefined) {
_local4 = _local5.getStyle("defaultIcon");
}
}
}
var _local3 = icon_mc;
if ((_local4 != undefined) && (itmObj != undefined)) {
_local3 = createObject(_local4, "icon_mc", 20);
_local3._x = 2;
_local3._y = (_local7 - _local3._height) / 2;
_local2._x = 4 + _local3._width;
} else {
_local3.removeMovieClip();
_local2._x = 2;
}
var _local9 = ((_local3 == undefined) ? 0 : (_local3._width));
_local2.setSize(__width - _local9, Math.min(_local7, _local2.getPreferredHeight()));
_local2._y = (_local7 - _local2._height) / 2;
}
function size(Void) {
var _local3 = backGround;
var _local2 = cell;
var _local4 = __height;
var _local5 = __width;
var _local6 = ((icon_mc == undefined) ? 0 : (icon_mc._width));
_local2.setSize(_local5 - _local6, Math.min(_local4, _local2.getPreferredHeight()));
_local2._y = (_local4 - _local2._height) / 2;
icon_mc._y = (_local4 - icon_mc._height) / 2;
_local3._x = 0;
_local3._width = _local5;
_local3._height = _local4;
drawRowFill(_local3, normalColor);
drawRowFill(highlight, highlightColor);
}
function setCellRenderer(forceSizing) {
var _local3 = owner.__cellRenderer;
var _local4;
if (cell != undefined) {
_local4 = cell._x;
cell.removeMovieClip();
cell.removeTextField();
}
var _local2;
if (_local3 == undefined) {
_local2 = (cell = createLabel("cll", 0, {styleName:this}));
_local2.styleName = owner;
_local2.selectable = false;
_local2.tabEnabled = false;
_local2.background = false;
_local2.border = false;
} else if (typeof(_local3) == "string") {
_local2 = (cell = createObject(_local3, "cll", 0, {styleName:this}));
} else {
_local2 = (cell = createClassObject(_local3, "cll", 0, {styleName:this}));
}
_local2.owner = this;
_local2.listOwner = owner;
_local2.getCellIndex = getCellIndex;
_local2.getDataLabel = getDataLabel;
if (_local4 != undefined) {
_local2._x = _local4;
}
if (forceSizing) {
size();
}
}
function getCellIndex(Void) {
return({columnIndex:0, itemIndex:owner.rowIndex + listOwner.__vPosition});
}
function getDataLabel() {
return(listOwner.labelField);
}
function init(Void) {
super.init();
tabEnabled = false;
}
function createChildren(Void) {
setCellRenderer(false);
setupBG();
setState(state, false);
}
function drawRow(itmObj, state, transition) {
item = itmObj;
setState(state, transition);
setValue(itmObj, state, transition);
}
function itemToString(itmObj) {
if (itmObj == undefined) {
return(" ");
}
var _local2 = owner.__labelFunction(itmObj);
if (_local2 == undefined) {
_local2 = ((itmObj instanceof XMLNode) ? (itmObj.attributes[owner.__labelField]) : (itmObj[owner.__labelField]));
if (_local2 == undefined) {
_local2 = " ";
if (typeof(itmObj) == "object") {
for (var _local4 in itmObj) {
if (_local4 != "__ID__") {
_local2 = (itmObj[_local4] + ", ") + _local2;
}
}
_local2 = _local2.substring(0, _local2.length - 2);
} else {
_local2 = itmObj;
}
}
}
return(_local2);
}
function setupBG(Void) {
var _local2 = (backGround = createEmptyMovieClip("bG_mc", LOWEST_DEPTH));
drawRowFill(_local2, normalColor);
highlight = createEmptyMovieClip("tran_mc", LOWEST_DEPTH + 10);
_local2.owner = this;
_local2.grandOwner = owner;
_local2.onPress = bGOnPress;
_local2.onRelease = bGOnRelease;
_local2.onRollOver = bGOnRollOver;
_local2.onRollOut = bGOnRollOut;
_local2.onDragOver = bGOnDragOver;
_local2.onDragOut = bGOnDragOut;
_local2.useHandCursor = false;
_local2.trackAsMenu = true;
_local2.drawRect = drawRect;
highlight.drawRect = drawRect;
}
function drawRowFill(mc, newClr) {
mc.clear();
mc.beginFill(newClr);
mc.drawRect(1, 0, __width, __height);
mc.endFill();
mc._width = __width;
mc._height = __height;
}
function setState(newState, transition) {
var _local2 = highlight;
var _local8 = backGround;
var _local4 = __height;
var _local3 = owner;
if (!_local3.enabled) {
if ((newState == "selected") || (state == "selected")) {
highlightColor = _local3.getStyle("selectionDisabledColor");
drawRowFill(_local2, highlightColor);
_local2._visible = true;
_local2._y = 0;
_local2._height = _local4;
} else {
_local2._visible = false;
normalColor = _local3.getStyle("backgroundDisabledColor");
drawRowFill(_local8, normalColor);
}
cell.__enabled = false;
cell.setColor(_local3.getStyle("disabledColor"));
} else {
cell.__enabled = true;
if (transition && ((newState == state) || ((newState == "highlighted") && (state == "selected")))) {
isChangedToSelected = true;
return(undefined);
}
var _local6 = _local3.getStyle("selectionDuration");
var _local7 = 0;
if (isChangedToSelected && (newState == "selected")) {
transition = false;
}
var _local10 = transition && (_local6 != 0);
if (newState == "normal") {
_local7 = _local3.getStyle("color");
normalColor = getNormalColor();
drawRowFill(_local8, normalColor);
if (_local10) {
_local6 = _local6 / 2;
_local2._height = _local4;
_local2._width = __width;
_local2._y = 0;
bGTween = new mx.effects.Tween(this, _local4 + 2, _local4 * 0.2, _local6, 5);
} else {
_local2._visible = false;
}
delete isChangedToSelected;
} else {
highlightColor = _local3.getStyle(((newState == "highlighted") ? "rollOverColor" : "selectionColor"));
drawRowFill(_local2, highlightColor);
_local2._visible = true;
_local7 = _local3.getStyle(((newState == "highlighted") ? "textRollOverColor" : "textSelectedColor"));
if (_local10) {
_local2._height = _local4 * 0.5;
_local2._y = (_local4 - _local2._height) / 2;
bGTween = new mx.effects.Tween(this, _local2._height, _local4 + 2, _local6, 5);
var _local9 = _local3.getStyle("selectionEasing");
if (_local9 != undefined) {
bGTween.easingEquation = _local9;
}
} else {
_local2._y = 0;
_local2._height = _local4;
}
}
cell.setColor(_local7);
}
state = newState;
}
function onTweenUpdate(val) {
highlight._height = val;
highlight._y = (__height - val) / 2;
}
function onTweenEnd(val) {
onTweenUpdate(val);
highlight._visible = state != "normal";
}
function getNormalColor(Void) {
var _local3;
var _local2 = owner;
if (!owner.enabled) {
_local3 = _local2.getStyle("backgroundDisabledColor");
} else {
var _local5 = rowIndex + _local2.__vPosition;
if (rowIndex == undefined) {
_local3 = _local2.getPropertiesOf(item).backgroundColor;
} else {
_local3 = _local2.getPropertiesAt(_local5).backgroundColor;
}
if (_local3 == undefined) {
var _local4 = _local2.getStyle("alternatingRowColors");
if (_local4 == undefined) {
_local3 = _local2.getStyle("backgroundColor");
} else {
_local3 = _local4[_local5 % _local4.length];
}
}
}
return(_local3);
}
function invalidateStyle(propName) {
cell.invalidateStyle(propName);
super.invalidateStyle(propName);
}
function bGOnPress(Void) {
grandOwner.pressFocus();
grandOwner.onRowPress(owner.rowIndex);
}
function bGOnRelease(Void) {
grandOwner.releaseFocus();
grandOwner.onRowRelease(owner.rowIndex);
}
function bGOnRollOver(Void) {
grandOwner.onRowRollOver(owner.rowIndex);
}
function bGOnRollOut(Void) {
grandOwner.onRowRollOut(owner.rowIndex);
}
function bGOnDragOver(Void) {
grandOwner.onRowDragOver(owner.rowIndex);
}
function bGOnDragOut(Void) {
grandOwner.onRowDragOut(owner.rowIndex);
}
static var LOWEST_DEPTH = -16384;
var state = "normal";
var disabledColor = 15263976;
var normalColor = 16777215;
}
Symbol 217 MovieClip [__Packages.mx.controls.HScrollBar] Frame 0
class mx.controls.HScrollBar extends mx.controls.scrollClasses.ScrollBar
{
var _minHeight, _minWidth, _xscale, _rotation, __width, scrollIt;
function HScrollBar () {
super();
}
function getMinWidth(Void) {
return(_minHeight);
}
function getMinHeight(Void) {
return(_minWidth);
}
function init(Void) {
super.init();
_xscale = -100;
_rotation = -90;
}
function get virtualHeight() {
return(__width);
}
function isScrollBarKey(k) {
if (k == 37) {
scrollIt("Line", -1);
return(true);
}
if (k == 39) {
scrollIt("Line", 1);
return(true);
}
return(super.isScrollBarKey(k));
}
static var symbolName = "HScrollBar";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.126";
var className = "HScrollBar";
var minusMode = "Left";
var plusMode = "Right";
var minMode = "AtLeft";
var maxMode = "AtRight";
}
Symbol 218 MovieClip [__Packages.mx.controls.Button] Frame 0
class mx.controls.Button extends mx.controls.SimpleButton
{
var initializing, labelPath, initIcon, getState, enabled, phase, idNames, __width, __height, setState, invalidate, iconName, refresh, createLabel, _iconLinkageName, removeIcons, hitArea_mc, createEmptyObject;
function Button () {
super();
}
function init(Void) {
super.init();
}
function draw() {
if (initializing) {
labelPath.visible = true;
}
super.draw();
if (initIcon != undefined) {
_setIcon(initIcon);
}
delete initIcon;
}
function onRelease(Void) {
super.onRelease();
}
function createChildren(Void) {
super.createChildren();
}
function setSkin(tag, linkageName, initobj) {
return(super.setSkin(tag, linkageName, initobj));
}
function viewSkin(varName) {
var _local3 = (getState() ? "true" : "false");
_local3 = _local3 + (enabled ? (phase) : "disabled");
super.viewSkin(varName, {styleName:this, borderStyle:_local3});
}
function invalidateStyle(c) {
labelPath.invalidateStyle(c);
super.invalidateStyle(c);
}
function setColor(c) {
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]].redraw(true);
_local2++;
}
}
function setEnabled(enable) {
labelPath.enabled = enable;
super.setEnabled(enable);
}
function calcSize(tag, ref) {
if ((__width == undefined) || (__height == undefined)) {
return(undefined);
}
if (tag < 7) {
ref.setSize(__width, __height, true);
}
}
function size(Void) {
setState(getState());
setHitArea(__width, __height);
var _local3 = 0;
while (_local3 < 8) {
var _local4 = idNames[_local3];
if (typeof(this[_local4]) == "movieclip") {
this[_local4].setSize(__width, __height, true);
}
_local3++;
}
super.size();
}
function set labelPlacement(val) {
__labelPlacement = val;
invalidate();
//return(labelPlacement);
}
function get labelPlacement() {
return(__labelPlacement);
}
function getLabelPlacement(Void) {
return(__labelPlacement);
}
function setLabelPlacement(val) {
__labelPlacement = val;
invalidate();
}
function getBtnOffset(Void) {
if (getState()) {
var _local2 = btnOffset;
} else if (phase == "down") {
var _local2 = btnOffset;
} else {
var _local2 = 0;
}
return(_local2);
}
function setView(offset) {
var _local16 = (offset ? (btnOffset) : 0);
var _local12 = getLabelPlacement();
var _local7 = 0;
var _local6 = 0;
var _local9 = 0;
var _local8 = 0;
var _local5 = 0;
var _local4 = 0;
var _local3 = labelPath;
var _local2 = iconName;
var _local15 = _local3.textWidth;
var _local14 = _local3.textHeight;
var _local10 = (__width - borderW) - borderW;
var _local11 = (__height - borderW) - borderW;
if (_local2 != undefined) {
_local7 = _local2._width;
_local6 = _local2._height;
}
if ((_local12 == "left") || (_local12 == "right")) {
if (_local3 != undefined) {
_local9 = Math.min(_local10 - _local7, _local15 + 5);
_local3._width = _local9;
_local8 = Math.min(_local11, _local14 + 5);
_local3._height = _local8;
}
if (_local12 == "right") {
_local5 = _local7;
if (centerContent) {
_local5 = _local5 + (((_local10 - _local9) - _local7) / 2);
}
_local2._x = _local5 - _local7;
} else {
_local5 = (_local10 - _local9) - _local7;
if (centerContent) {
_local5 = _local5 / 2;
}
_local2._x = _local5 + _local9;
}
_local4 = 0;
_local2._y = _local4;
if (centerContent) {
_local2._y = (_local11 - _local6) / 2;
_local4 = (_local11 - _local8) / 2;
}
if (!centerContent) {
_local2._y = _local2._y + Math.max(0, (_local8 - _local6) / 2);
}
} else {
if (_local3 != undefined) {
_local9 = Math.min(_local10, _local15 + 5);
_local3._width = _local9;
_local8 = Math.min(_local11 - _local6, _local14 + 5);
_local3._height = _local8;
}
_local5 = (_local10 - _local9) / 2;
_local2._x = (_local10 - _local7) / 2;
if (_local12 == "top") {
_local4 = (_local11 - _local8) - _local6;
if (centerContent) {
_local4 = _local4 / 2;
}
_local2._y = _local4 + _local8;
} else {
_local4 = _local6;
if (centerContent) {
_local4 = _local4 + (((_local11 - _local8) - _local6) / 2);
}
_local2._y = _local4 - _local6;
}
}
var _local13 = borderW + _local16;
_local3._x = _local5 + _local13;
_local3._y = _local4 + _local13;
_local2._x = _local2._x + _local13;
_local2._y = _local2._y + _local13;
}
function set label(lbl) {
setLabel(lbl);
//return(label);
}
function setLabel(label) {
if (label == "") {
labelPath.removeTextField();
refresh();
return(undefined);
}
if (labelPath == undefined) {
var _local2 = createLabel("labelPath", 200, label);
_local2._width = _local2.textWidth + 5;
_local2._height = _local2.textHeight + 5;
if (initializing) {
_local2.visible = false;
}
} else {
delete labelPath.__text;
labelPath.text = label;
refresh();
}
}
function getLabel(Void) {
return(((labelPath.__text != undefined) ? (labelPath.__text) : (labelPath.text)));
}
function get label() {
return(getLabel());
}
function _getIcon(Void) {
return(_iconLinkageName);
}
function get icon() {
if (initializing) {
return(initIcon);
}
return(_iconLinkageName);
}
function _setIcon(linkage) {
if (initializing) {
if (linkage == "") {
return(undefined);
}
initIcon = linkage;
} else {
if (linkage == "") {
removeIcons();
return(undefined);
}
super.changeIcon(0, linkage);
super.changeIcon(1, linkage);
super.changeIcon(3, linkage);
super.changeIcon(4, linkage);
super.changeIcon(5, linkage);
_iconLinkageName = linkage;
refresh();
}
}
function set icon(linkage) {
_setIcon(linkage);
//return(icon);
}
function setHitArea(w, h) {
if (hitArea_mc == undefined) {
createEmptyObject("hitArea_mc", 100);
}
var _local2 = hitArea_mc;
_local2.clear();
_local2.beginFill(16711680);
_local2.drawRect(0, 0, w, h);
_local2.endFill();
_local2.setVisible(false);
}
static var symbolName = "Button";
static var symbolOwner = mx.controls.Button;
var className = "Button";
static var version = "2.0.2.126";
var btnOffset = 0;
var _color = "buttonColor";
var __label = "default value";
var __labelPlacement = "right";
var falseUpSkin = "ButtonSkin";
var falseDownSkin = "ButtonSkin";
var falseOverSkin = "ButtonSkin";
var falseDisabledSkin = "ButtonSkin";
var trueUpSkin = "ButtonSkin";
var trueDownSkin = "ButtonSkin";
var trueOverSkin = "ButtonSkin";
var trueDisabledSkin = "ButtonSkin";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var clipParameters = {labelPlacement:1, icon:1, toggle:1, selected:1, label:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.Button.prototype.clipParameters, mx.controls.SimpleButton.prototype.clipParameters);
var centerContent = true;
var borderW = 1;
}
Symbol 219 MovieClip [__Packages.mx.skins.halo.ButtonSkin] Frame 0
class mx.skins.halo.ButtonSkin extends mx.skins.RectBorder
{
var __get__width, __get__height, getStyle, _parent, clear, drawRoundRect, __get__x, __get__y;
function ButtonSkin () {
super();
}
function init() {
super.init();
}
function size() {
drawHaloRect(__get__width(), __get__height());
}
function drawHaloRect(w, h) {
var _local6 = getStyle("borderStyle");
var _local4 = getStyle("themeColor");
var _local5 = _parent.emphasized;
clear();
switch (_local6) {
case "falseup" :
if (_local5) {
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 75);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 85, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 75);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
} else {
drawRoundRect(0, 0, w, h, 5, 9542041, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, [13291985, 16250871], 100, 0, "radial");
drawRoundRect(2, 2, w - 4, h - 4, 3, [9542041, 13818586], 100, 0, "radial");
drawRoundRect(3, 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(3, 4, w - 6, h - 7, 2, 16316664, 100);
}
break;
case "falsedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "falserollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 50);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "falsedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
break;
case "trueup" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16250871, 100);
break;
case "truedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "truerollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 40);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "truedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.skinRegistry.ButtonSkin = true;
return(true);
}
static var symbolName = "ButtonSkin";
static var symbolOwner = mx.skins.halo.ButtonSkin;
var className = "ButtonSkin";
var backgroundColorName = "buttonColor";
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 220 MovieClip [__Packages.mx.controls.VScrollBar] Frame 0
class mx.controls.VScrollBar extends mx.controls.scrollClasses.ScrollBar
{
var scrollIt;
function VScrollBar () {
super();
}
function init(Void) {
super.init();
}
function isScrollBarKey(k) {
if (k == 38) {
scrollIt("Line", -1);
return(true);
}
if (k == 40) {
scrollIt("Line", 1);
return(true);
}
if (k == 33) {
scrollIt("Page", -1);
return(true);
}
if (k == 34) {
scrollIt("Page", 1);
return(true);
}
return(super.isScrollBarKey(k));
}
static var symbolName = "VScrollBar";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.126";
var className = "VScrollBar";
var minusMode = "Up";
var plusMode = "Down";
var minMode = "AtTop";
var maxMode = "AtBottom";
}
Symbol 341 MovieClip [MouseHint] Frame 1
#initclip 157
Object.registerClass("MouseHint", MouseHint);
#endinitclip
Instance of Symbol 337 MovieClip "skill_1" in Symbol 341 MovieClip [MouseHint] Frame 3
on (rollOver) {
_parent._parent._parent.showUnitSkillDescription(this._currentframe);
}
on (rollOut) {
_parent._parent._parent.removeDescription();
}
Instance of Symbol 337 MovieClip "skill_2" in Symbol 341 MovieClip [MouseHint] Frame 3
on (rollOver) {
_parent._parent._parent.showUnitSkillDescription(this._currentframe);
}
on (rollOut) {
_parent._parent._parent.removeDescription();
}
Instance of Symbol 337 MovieClip "skill_3" in Symbol 341 MovieClip [MouseHint] Frame 3
on (rollOver) {
_parent._parent._parent.showUnitSkillDescription(this._currentframe);
}
on (rollOut) {
_parent._parent._parent.removeDescription();
}
Instance of Symbol 337 MovieClip "aura_mc" in Symbol 341 MovieClip [MouseHint] Frame 3
on (rollOver) {
_parent._parent._parent.showUnitSkillDescription(this._currentframe);
}
on (rollOut) {
_parent._parent._parent.removeDescription();
}
Symbol 364 MovieClip Frame 1
text_txt.text = "";
stop();
Symbol 447 MovieClip Frame 1
var nat = _root.getNationNumber(_global.MAIN_HERO.NATION);
var gen = ((_global.MAIN_HERO.GENDER == "m") ? 0 : 1);
gotoAndStop((nat * 2) + gen);
Symbol 459 Button
on (press, keyPress "<Home>") {
makeThemHoldPosition();
}
on (rollOver) {
hint.gotoAndStop("HoldPosition");
}
on (rollOut) {
hint.gotoAndStop("Nothing");
}
Symbol 460 Button
on (press, keyPress "<End>") {
makeThemSwapWeapons();
}
on (rollOver) {
hint.gotoAndStop("SwapWeapons");
}
on (rollOut) {
hint.gotoAndStop("Nothing");
}
Symbol 472 MovieClip Frame 1
is_ready = false;
Symbol 472 MovieClip Frame 45
is_ready = true;
stop();
Symbol 472 MovieClip Frame 46
is_ready = false;
Symbol 474 MovieClip Frame 1
is_ready = false;
Symbol 474 MovieClip Frame 65
is_ready = true;
stop();
Symbol 474 MovieClip Frame 66
is_ready = false;
Symbol 477 Button
on (release) {
if (_global.POTION_HealSmall > 0) {
_global.POTION_HealSmall--;
potion_1_txt.text = _global.POTION_HealSmall;
makeThemHealHero(40);
}
}
on (rollOver) {
hint.gotoAndStop("potion_1");
}
on (rollOut) {
hint.gotoAndStop("Nothing");
}
Symbol 478 Button
on (release) {
if (_global.POTION_HealMedium > 0) {
_global.POTION_HealMedium--;
potion_2_txt.text = _global.POTION_HealMedium;
makeThemHealHero(300);
}
}
on (rollOver) {
hint.gotoAndStop("potion_2");
}
on (rollOut) {
hint.gotoAndStop("Nothing");
}
Symbol 498 MovieClip [Screen] Frame 1
#initclip 119
Object.registerClass("Screen", Screen);
#endinitclip
stop();
Instance of Symbol 472 MovieClip "control_shower" in Symbol 498 MovieClip [Screen] Frame 1
on (release) {
if (_root.cursor._currentframe == 2) {
_root.cursor.gotoAndStop(1);
} else if (is_ready) {
_root.cursor.gotoAndStop(2);
}
}
on (rollOver) {
_parent.hint.gotoAndStop("arrow_shower");
}
on (rollOut) {
_parent.hint.gotoAndStop("Nothing");
}
Instance of Symbol 474 MovieClip "control_wall" in Symbol 498 MovieClip [Screen] Frame 1
on (release) {
if (_root.cursor._currentframe == 3) {
_root.cursor.gotoAndStop(1);
} else if (is_ready) {
_root.cursor.gotoAndStop(3);
}
}
on (rollOver) {
_parent.hint.gotoAndStop("arrow_wall");
}
on (rollOut) {
_parent.hint.gotoAndStop("Nothing");
}
Instance of Symbol 337 MovieClip "active_1" in Symbol 498 MovieClip [Screen] Frame 1
on (release, keyPress "1") {
_root.hero0.setCurrentSkill(1);
}
Instance of Symbol 337 MovieClip "active_2" in Symbol 498 MovieClip [Screen] Frame 1
on (release, keyPress "2") {
_root.hero0.setCurrentSkill(2);
}
Instance of Symbol 337 MovieClip "active_3" in Symbol 498 MovieClip [Screen] Frame 1
on (release, keyPress "3") {
_root.hero0.setCurrentSkill(3);
}
Instance of Symbol 337 MovieClip "aura_1" in Symbol 498 MovieClip [Screen] Frame 1
on (release, keyPress "4") {
_root.hero0.clickAura(1);
}
Instance of Symbol 337 MovieClip "aura_2" in Symbol 498 MovieClip [Screen] Frame 1
on (release, keyPress "5") {
_root.hero0.clickAura(2);
}
Instance of Symbol 337 MovieClip "aura_3" in Symbol 498 MovieClip [Screen] Frame 1
on (release, keyPress "6") {
_root.hero0.clickAura(3);
}
Symbol 550 MovieClip Frame 1
stop();
Symbol 891 MovieClip Frame 1
stop();
Symbol 1007 MovieClip Frame 17
stop();
Symbol 1024 MovieClip Frame 1
this._xscale = this._xscale * _root.znak(_parent._xscale);
Symbol 1034 MovieClip Frame 18
this._parent.meleeHit();
Symbol 1034 MovieClip Frame 30
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 55
this._parent.meleeHit(1);
Symbol 1034 MovieClip Frame 70
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 78
this._parent.meleeHit(2);
Symbol 1034 MovieClip Frame 90
this._parent.meleeHit(2);
Symbol 1034 MovieClip Frame 100
this._parent.meleeHit(2);
Symbol 1034 MovieClip Frame 110
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 112
_parent.SHIELD_DODGE = _parent.SHIELD_DODGE + 300;
Symbol 1034 MovieClip Frame 135
this._parent.meleeHit(3);
Symbol 1034 MovieClip Frame 149
_parent.SHIELD_DODGE = _parent.SHIELD_DODGE - 300;
Symbol 1034 MovieClip Frame 150
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 178
this._parent.meleeHit();
Symbol 1034 MovieClip Frame 190
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 220
this._parent.meleeHit(1);
Symbol 1034 MovieClip Frame 240
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 265
this._parent.meleeHit(2);
Symbol 1034 MovieClip Frame 290
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 327
this._parent.meleeHit(3);
Symbol 1034 MovieClip Frame 340
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 365
this._parent.meleeHit();
Symbol 1034 MovieClip Frame 380
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 410
this._parent.meleeHit(1);
Symbol 1034 MovieClip Frame 430
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 460
this._parent.meleeHit(2);
Symbol 1034 MovieClip Frame 480
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 512
this._parent.meleeHit(3);
Symbol 1034 MovieClip Frame 530
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 538
this._parent.meleeHit(0, false);
Symbol 1034 MovieClip Frame 552
this._parent.meleeHit(0, true);
Symbol 1034 MovieClip Frame 561
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 570
this._parent.meleeHit(1, true);
Symbol 1034 MovieClip Frame 575
this._parent.meleeHit(1, false);
Symbol 1034 MovieClip Frame 580
this._parent.meleeHit(1, true);
Symbol 1034 MovieClip Frame 585
this._parent.meleeHit(1, false);
Symbol 1034 MovieClip Frame 590
this._parent.meleeHit(1, true);
Symbol 1034 MovieClip Frame 595
this._parent.meleeHit(1, false);
Symbol 1034 MovieClip Frame 600
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 605
_parent.DODGE = _parent.DODGE + 40;
Symbol 1034 MovieClip Frame 630
this._parent.meleeHit(2);
Symbol 1034 MovieClip Frame 639
_parent.DODGE = _parent.DODGE - 40;
Symbol 1034 MovieClip Frame 640
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 649
this._parent.meleeHit(3);
Symbol 1034 MovieClip Frame 673
this._parent.meleeHit(3);
Symbol 1034 MovieClip Frame 680
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 685
this._parent.meleeHit(0, false, 1);
Symbol 1034 MovieClip Frame 700
this._parent.meleeHit(0, false, 0.5);
Symbol 1034 MovieClip Frame 710
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 725
this._parent.meleeHit(1);
Symbol 1034 MovieClip Frame 750
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 755
this._parent.meleeHit(2);
Symbol 1034 MovieClip Frame 765
this._parent.meleeHit(2);
Symbol 1034 MovieClip Frame 770
this._parent.meleeHit(2);
Symbol 1034 MovieClip Frame 775
this._parent.meleeHit(2);
Symbol 1034 MovieClip Frame 790
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 819
this._parent.meleeHit(3);
Symbol 1034 MovieClip Frame 830
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 846
this._parent.meleeHit();
Symbol 1034 MovieClip Frame 860
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 885
this._parent.meleeHit(1);
Symbol 1034 MovieClip Frame 900
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 915
this._parent.meleeHit(2);
Symbol 1034 MovieClip Frame 925
this._parent.meleeHit(2);
Symbol 1034 MovieClip Frame 935
this._parent.meleeHit(2);
Symbol 1034 MovieClip Frame 940
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 967
this._parent.meleeHit(3);
Symbol 1034 MovieClip Frame 980
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1000
this._parent.rangedHit();
Symbol 1034 MovieClip Frame 1020
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1045
this._parent.rangedHit(1);
Symbol 1034 MovieClip Frame 1070
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1090
this._parent.rangedHit(2);
Symbol 1034 MovieClip Frame 1100
this._parent.rangedHit(2);
Symbol 1034 MovieClip Frame 1110
this._parent.rangedHit(2);
Symbol 1034 MovieClip Frame 1120
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1156
this._parent.rangedHit(3);
Symbol 1034 MovieClip Frame 1170
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1186
this._parent.rangedHit();
Symbol 1034 MovieClip Frame 1230
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1250
this._parent.rangedHit(1);
Symbol 1034 MovieClip Frame 1300
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1324
this._parent.rangedHit(2);
Symbol 1034 MovieClip Frame 1370
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1390
this._parent.rangedHit(3);
Symbol 1034 MovieClip Frame 1440
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1447
this._parent.meleeHit();
Symbol 1034 MovieClip Frame 1460
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1480
this._parent.meleeHit(1);
Symbol 1034 MovieClip Frame 1490
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1495
this._parent.meleeHit(2);
Symbol 1034 MovieClip Frame 1510
this._parent.meleeHit(2);
Symbol 1034 MovieClip Frame 1520
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1525
this._parent.meleeHit(3, false, 1, 1);
Symbol 1034 MovieClip Frame 1527
this._parent.meleeHit(3, false, 1, 1);
Symbol 1034 MovieClip Frame 1529
this._parent.meleeHit(3, false, 1, 1);
Symbol 1034 MovieClip Frame 1539
this._parent.meleeHit(3, false, 1, 2);
Symbol 1034 MovieClip Frame 1550
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1569
this._parent.meleeHit();
Symbol 1034 MovieClip Frame 1575
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1595
this._parent.meleeHit(1);
Symbol 1034 MovieClip Frame 1610
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1625
this._parent.meleeHit(2, false, 1, 1);
Symbol 1034 MovieClip Frame 1630
this._parent.meleeHit(2, false, 1, 2);
Symbol 1034 MovieClip Frame 1645
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1670
this._parent.meleeHit(3);
Symbol 1034 MovieClip Frame 1680
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1690
this._parent.meleeHit();
Symbol 1034 MovieClip Frame 1704
this._parent.meleeHit();
Symbol 1034 MovieClip Frame 1715
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1730
this._parent.meleeHit(1);
Symbol 1034 MovieClip Frame 1740
this._parent.meleeHit(1);
Symbol 1034 MovieClip Frame 1750
this._parent.meleeHit(1);
Symbol 1034 MovieClip Frame 1760
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1791
this._parent.meleeHit(2);
Symbol 1034 MovieClip Frame 1805
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1815
this._parent.meleeHit(3);
Symbol 1034 MovieClip Frame 1818
this._parent.meleeHit(3);
Symbol 1034 MovieClip Frame 1821
this._parent.meleeHit(3);
Symbol 1034 MovieClip Frame 1824
this._parent.meleeHit(3);
Symbol 1034 MovieClip Frame 1827
this._parent.meleeHit(3);
Symbol 1034 MovieClip Frame 1830
this._parent.meleeHit(3);
Symbol 1034 MovieClip Frame 1833
this._parent.meleeHit(3);
Symbol 1034 MovieClip Frame 1836
this._parent.meleeHit(3);
Symbol 1034 MovieClip Frame 1839
this._parent.meleeHit(3);
Symbol 1034 MovieClip Frame 1842
this._parent.meleeHit(3);
Symbol 1034 MovieClip Frame 1850
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1868
this._parent.meleeHit();
Symbol 1034 MovieClip Frame 1878
this._parent.meleeHit();
Symbol 1034 MovieClip Frame 1885
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1903
this._parent.rangedHit();
Symbol 1034 MovieClip Frame 1915
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1935
this._parent.rangedHit(1);
Symbol 1034 MovieClip Frame 1955
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 1970
this._parent.rangedHit(2);
Symbol 1034 MovieClip Frame 1980
this._parent.rangedHit(2);
Symbol 1034 MovieClip Frame 1990
this._parent.rangedHit(2);
Symbol 1034 MovieClip Frame 1995
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 2020
this._parent.rangedHit(3);
Symbol 1034 MovieClip Frame 2035
_parent.onEndAttack();
Symbol 1034 MovieClip Frame 2055
this._parent.onSwitchWeapons();
Symbol 1034 MovieClip Frame 2075
this._parent.onSwitchWeapons();
Symbol 1034 MovieClip Frame 2095
this._parent.onSwitchWeapons();
Symbol 1034 MovieClip Frame 2115
this._parent.onSwitchWeapons();
Symbol 1034 MovieClip Frame 2145
this._parent.onRunAnimComplete();
Symbol 1034 MovieClip Frame 2175
this._parent.onRunAnimComplete();
Symbol 1034 MovieClip Frame 2205
this._parent.onRunAnimComplete();
Symbol 1034 MovieClip Frame 2235
this._parent.onRunAnimComplete();
Symbol 1034 MovieClip Frame 2265
this._parent.onRunAnimComplete();
Symbol 1034 MovieClip Frame 2295
this._parent.onRunAnimComplete();
Symbol 1034 MovieClip Frame 2325
this._parent.onRunAnimComplete();
Symbol 1034 MovieClip Frame 2355
this._parent.onRunAnimComplete();
Symbol 1034 MovieClip Frame 2385
this._parent.onRunAnimComplete();
Symbol 1034 MovieClip Frame 2425
this._parent.restInPeace();
stop();
Symbol 1034 MovieClip Frame 2475
this._parent.restInPeace();
stop();
Symbol 1034 MovieClip Frame 2505
this._parent.restInPeace();
stop();
Symbol 1038 MovieClip [Human] Frame 1
#initclip 120
Object.registerClass("Human", Soldier);
#endinitclip
Symbol 1042 MovieClip [Human_Player] Frame 1
#initclip 121
Object.registerClass("Human_Player", Player);
#endinitclip
Symbol 1046 MovieClip [Blood_1] Frame 20
this.swapDepths(_root.getDepthDown(_root.getX(this._x), _root.getY(this._y)));
stop();
Symbol 1050 MovieClip [Blood_2] Frame 20
this.swapDepths(_root.getDepthDown(_root.getX(this._x), _root.getY(this._y)));
stop();
Symbol 1053 MovieClip Frame 15
this.swapDepths(_root.getDepthDown(_root.getX(this._x), _root.getY(this._y)));
stop();
Symbol 1055 MovieClip [SelectBorder] Frame 1
#initclip 122
Object.registerClass("SelectBorder", SelectBorder);
#endinitclip
stop();
Symbol 1055 MovieClip [SelectBorder] Frame 4
this.removeMovieClip();
Symbol 1057 MovieClip Frame 18
this._parent.meleeHit();
Symbol 1057 MovieClip Frame 30
_parent.onEndAttack();
Symbol 1057 MovieClip Frame 43
this._parent.meleeHit();
Symbol 1057 MovieClip Frame 55
_parent.onEndAttack();
Symbol 1057 MovieClip Frame 80
this._parent.meleeHit();
Symbol 1057 MovieClip Frame 95
_parent.onEndAttack();
Symbol 1057 MovieClip Frame 120
this._parent.meleeHit();
Symbol 1057 MovieClip Frame 135
_parent.onEndAttack();
Symbol 1057 MovieClip Frame 152
this._parent.meleeHit();
Symbol 1057 MovieClip Frame 165
_parent.onEndAttack();
Symbol 1057 MovieClip Frame 187
this._parent.rangedHit();
Symbol 1057 MovieClip Frame 205
_parent.onEndAttack();
Symbol 1057 MovieClip Frame 230
this._parent.rangedHit(1);
Symbol 1057 MovieClip Frame 255
_parent.onEndAttack();
Symbol 1057 MovieClip Frame 275
this._parent.rangedHit(2);
Symbol 1057 MovieClip Frame 285
this._parent.rangedHit(2);
Symbol 1057 MovieClip Frame 295
this._parent.rangedHit(2);
Symbol 1057 MovieClip Frame 305
_parent.onEndAttack();
Symbol 1057 MovieClip Frame 341
this._parent.rangedHit(3);
Symbol 1057 MovieClip Frame 355
_parent.onEndAttack();
Symbol 1057 MovieClip Frame 371
this._parent.rangedHit();
Symbol 1057 MovieClip Frame 415
_parent.onEndAttack();
Symbol 1057 MovieClip Frame 435
this._parent.rangedHit(1);
Symbol 1057 MovieClip Frame 485
_parent.onEndAttack();
Symbol 1057 MovieClip Frame 509
this._parent.rangedHit(2);
Symbol 1057 MovieClip Frame 555
_parent.onEndAttack();
Symbol 1057 MovieClip Frame 575
this._parent.rangedHit(3);
Symbol 1057 MovieClip Frame 625
_parent.onEndAttack();
Symbol 1057 MovieClip Frame 643
this._parent.rangedHit();
Symbol 1057 MovieClip Frame 655
_parent.onEndAttack();
Symbol 1057 MovieClip Frame 675
this._parent.rangedHit(1);
Symbol 1057 MovieClip Frame 695
_parent.onEndAttack();
Symbol 1057 MovieClip Frame 710
this._parent.rangedHit(2);
Symbol 1057 MovieClip Frame 720
this._parent.rangedHit(2);
Symbol 1057 MovieClip Frame 730
this._parent.rangedHit(2);
Symbol 1057 MovieClip Frame 735
_parent.onEndAttack();
Symbol 1057 MovieClip Frame 760
this._parent.rangedHit(3);
Symbol 1057 MovieClip Frame 775
_parent.onEndAttack();
Symbol 1057 MovieClip Frame 795
this._parent.meleeHit();
Symbol 1057 MovieClip Frame 810
_parent.onEndAttack();
Symbol 1057 MovieClip Frame 830
this._parent.onSwitchWeapons();
Symbol 1057 MovieClip Frame 850
this._parent.onSwitchWeapons();
Symbol 1057 MovieClip Frame 870
this._parent.onSwitchWeapons();
Symbol 1057 MovieClip Frame 890
this._parent.onSwitchWeapons();
Symbol 1057 MovieClip Frame 920
gotoAndPlay ("run_shield");
Symbol 1057 MovieClip Frame 950
gotoAndPlay ("run_2H_sword");
Symbol 1057 MovieClip Frame 980
gotoAndPlay ("run_2H_axe");
Symbol 1057 MovieClip Frame 1010
gotoAndPlay ("run_bow");
Symbol 1057 MovieClip Frame 1040
gotoAndPlay ("run_crossbow");
Symbol 1057 MovieClip Frame 1070
gotoAndPlay ("run_throwing");
Symbol 1057 MovieClip Frame 1110
this._parent.restInPeace();
stop();
Symbol 1058 MovieClip [Horseman] Frame 1
#initclip 123
Object.registerClass("Horseman", Soldier);
#endinitclip
this.isHorseman = true;
Symbol 1059 MovieClip [Horseman_Player] Frame 1
#initclip 124
Object.registerClass("Horseman_Player", Player);
#endinitclip
this.isHorseman = true;
Symbol 1061 MovieClip [Grenade] Frame 1
#initclip 125
Object.registerClass("Grenade", Grenade);
#endinitclip
stop();
Symbol 1061 MovieClip [Grenade] Frame 2
this.explode();
Symbol 1061 MovieClip [Grenade] Frame 25
this.removeMovieClip();
Symbol 1064 MovieClip [HealAnim] Frame 15
this.removeMovieClip();
Symbol 1072 MovieClip [RiseAnim] Frame 40
this._parent.turnToZombie();
this.removeMovieClip();
Symbol 1461 Button
on (press) {
if (this.amount > 1) {
this.amount--;
this.amount_txt.text = this.amount;
}
}
Symbol 1462 Button
on (press) {
if (this.amount < this.max_amount) {
this.amount++;
this.amount_txt.text = this.amount;
}
}
Symbol 1466 Button
on (release, keyPress "<Enter>") {
_global.GOLD = _global.GOLD + (Math.floor(this.price / 2) * this.amount);
if (this.amount == this.max_amount) {
_global.INVENTORY.splice(this.pos, 1);
} else {
_global.INVENTORY[this.pos].COUNT = _global.INVENTORY[this.pos].COUNT - this.amount;
}
_parent._parent.storeShowUser();
_parent.money_txt.text = _global.GOLD + " gold";
this.removeMovieClip();
}
Symbol 1468 Button
on (release, keyPress "<Escape>") {
this.removeMovieClip();
}
Symbol 1472 MovieClip [FlyDamage] Frame 25
this.removeMovieClip();
Symbol 1613 MovieClip [ArrowShower] Frame 1
#initclip 126
Object.registerClass("ArrowShower", ArrowStorm);
#endinitclip
Symbol 1613 MovieClip [ArrowShower] Frame 10
if ((_global.field[X][Y].who != null) && (_global.field[X][Y].free)) {
var hit_chance = (100 - ((_global.field[X][Y].who.FLEE + _global.field[X][Y].who.SHIELD_FLEE) * 0.8));
if (_root.percent(hit_chance)) {
_global.field[X][Y].who.takeDamage(dmg[play_count], null, crit[play_count]);
}
}
if (play_count > 0) {
play_count--;
gotoAndPlay (1);
} else {
this.removeMovieClip();
}
Symbol 1614 MovieClip [ArrowWall] Frame 1
#initclip 127
Object.registerClass("ArrowWall", ArrowStorm);
#endinitclip
Symbol 1614 MovieClip [ArrowWall] Frame 15
_root.addProjectile(X, Y, _global.F_WIDTH - 1, Y, dmg[play_count], 0, crit[play_count], 1, 141, -1);
if (play_count > 0) {
play_count--;
gotoAndPlay (1);
} else {
this.removeMovieClip();
}
Symbol 1616 MovieClip [Blow 3x3] Frame 10
this.removeMovieClip();
Symbol 1618 MovieClip [Blow 5x5] Frame 10
this.removeMovieClip();
Symbol 1619 MovieClip [LightningAnim] Frame 10
this.removeMovieClip();
Symbol 1622 MovieClip [FlyHeal] Frame 25
this.removeMovieClip();
Symbol 1625 MovieClip [FlyMiss] Frame 25
this.removeMovieClip();
Symbol 1630 MovieClip [BansheeCryAnim] Frame 25
this.removeMovieClip();
Symbol 1632 MovieClip [StarsAnim] Frame 25
this.removeMovieClip();
Symbol 1638 MovieClip [BarrierAnim] Frame 24
this.removeMovieClip();
Symbol 1642 MovieClip [BalanceAnim] Frame 20
this.removeMovieClip();
Symbol 1660 MovieClip [UnholyBreathAnim] Frame 25
this.removeMovieClip();
Symbol 1663 MovieClip [LifeLeechAnim] Frame 20
this.removeMovieClip();
Symbol 1666 MovieClip [SoulDrainAnim] Frame 20
this.removeMovieClip();
Symbol 1668 MovieClip [VenomCluodAnim] Frame 15
this.removeMovieClip();
Symbol 1669 MovieClip [DummyHorseman] Frame 1
#initclip 128
Object.registerClass("DummyHorseman", MovieDummy);
#endinitclip
Symbol 1670 MovieClip [DummyHuman] Frame 1
#initclip 129
Object.registerClass("DummyHuman", MovieDummy);
#endinitclip
Symbol 1678 MovieClip [Tree_1] Frame 1
#initclip 130
Object.registerClass("Tree_1", Tree);
#endinitclip
this.init();
Symbol 1680 MovieClip [Tree_2] Frame 1
#initclip 131
Object.registerClass("Tree_2", Tree);
#endinitclip
this.init();
Symbol 1682 MovieClip [Tree_3] Frame 1
#initclip 132
Object.registerClass("Tree_3", Tree);
#endinitclip
this.init();
Symbol 1684 MovieClip [Tree_4] Frame 1
#initclip 133
Object.registerClass("Tree_4", Tree);
#endinitclip
this.init();
Symbol 1686 MovieClip [Bush_1] Frame 1
#initclip 134
Object.registerClass("Bush_1", Tree);
#endinitclip
this.init();
Symbol 1688 MovieClip [Bush_2] Frame 1
#initclip 135
Object.registerClass("Bush_2", Tree);
#endinitclip
this.init();
Symbol 1690 MovieClip [Bush_3] Frame 1
#initclip 136
Object.registerClass("Bush_3", Tree);
#endinitclip
this.init();
Symbol 1692 MovieClip [Bush_4] Frame 1
#initclip 137
Object.registerClass("Bush_4", Tree);
#endinitclip
this.init();
Symbol 1694 MovieClip [Crate_1] Frame 1
#initclip 138
Object.registerClass("Crate_1", Tree);
#endinitclip
this.init();
Symbol 1696 MovieClip [Lantern] Frame 1
#initclip 139
Object.registerClass("Lantern", Tree);
#endinitclip
this.init();
Symbol 1700 MovieClip [RIP_1] Frame 1
#initclip 140
Object.registerClass("RIP_1", Tree);
#endinitclip
this.init();
Symbol 1702 MovieClip [RIP_2] Frame 1
#initclip 141
Object.registerClass("RIP_2", Tree);
#endinitclip
this.init();
Symbol 1704 MovieClip [Barrel] Frame 1
#initclip 142
Object.registerClass("Barrel", Tree);
#endinitclip
this.init();
Symbol 1706 MovieClip [Ammun] Frame 1
#initclip 143
Object.registerClass("Ammun", Tree);
#endinitclip
this.init();
Symbol 1708 MovieClip [SkullTower] Frame 1
#initclip 144
Object.registerClass("SkullTower", Tree);
#endinitclip
this.init();
Symbol 1711 MovieClip [Sign_1] Frame 1
#initclip 145
Object.registerClass("Sign_1", Tree);
#endinitclip
this.init();
Symbol 1713 MovieClip [Tree_5] Frame 1
#initclip 146
Object.registerClass("Tree_5", Tree);
#endinitclip
this.init();
Symbol 1715 MovieClip [Tree_6] Frame 1
#initclip 147
Object.registerClass("Tree_6", Tree);
#endinitclip
this.init();
Symbol 1718 MovieClip [Sign_2] Frame 1
#initclip 148
Object.registerClass("Sign_2", Tree);
#endinitclip
this.init();
Symbol 1720 MovieClip [Tree_12] Frame 1
#initclip 149
Object.registerClass("Tree_12", Tree);
#endinitclip
this.init();
Symbol 1722 MovieClip [Tree_11] Frame 1
#initclip 150
Object.registerClass("Tree_11", Tree);
#endinitclip
this.init();
Symbol 1724 MovieClip [Tree_10] Frame 1
#initclip 151
Object.registerClass("Tree_10", Tree);
#endinitclip
this.init();
Symbol 1726 MovieClip [Tree_9] Frame 1
#initclip 152
Object.registerClass("Tree_9", Tree);
#endinitclip
this.init();
Symbol 1728 MovieClip [Tree_8] Frame 1
#initclip 153
Object.registerClass("Tree_8", Tree);
#endinitclip
this.init();
Symbol 1730 MovieClip [Tree_7] Frame 1
#initclip 154
Object.registerClass("Tree_7", Tree);
#endinitclip
this.init();
Symbol 1732 MovieClip [Well_1] Frame 1
#initclip 155
Object.registerClass("Well_1", Tree);
#endinitclip
this.init();
Symbol 1736 MovieClip [Arrow] Frame 1
#initclip 156
Object.registerClass("Arrow", Arrow);
#endinitclip
Symbol 1736 MovieClip [Arrow] Frame 9
gotoAndPlay (1);
Symbol 1759 MovieClip Frame 54
Symbol 1759 MovieClip Frame 100
_parent.nextFrame();
Symbol 1761 Button
on (release) {
getURL ("http://www.arcadetown.com?gameid=feudalism2", "_blank");
}
Symbol 1772 MovieClip Frame 1
_parent.stop();
Symbol 1772 MovieClip Frame 25
_parent.nextFrame();
Symbol 1774 Button
on (release) {
_parent.play();
}
Symbol 1792 MovieClip Frame 1
_parent.attachMovie("DummyHuman", "man_" + id, id);
_parent["man_" + id]._x = this._x;
_parent["man_" + id]._y = this._y;
_parent["man_" + id]._xscale = this._xscale;
_parent["man_" + id]._yscale = this._yscale;
if (!look_left) {
_parent["man_" + id]._xscale = _parent["man_" + id]._xscale * -1;
}
_parent["man_" + id].dress(nat, tp, lv);
this.unloadMovie();
this.removeMovieClip();
Symbol 1834 MovieClip Frame 1
_parent.stop();
Instance of Symbol 1792 MovieClip in Symbol 1834 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 2;
nat = "Rus";
tp = "2H_axe";
lv = 1;
look_left = true;
}
Instance of Symbol 1792 MovieClip in Symbol 1834 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 1;
nat = "Ger";
tp = "spear";
lv = 4;
look_left = false;
}
Symbol 1834 MovieClip Frame 3
man_1.playAnim("spear_2");
Symbol 1834 MovieClip Frame 20
man_2.playAnim("2H_axe_2");
Symbol 1834 MovieClip Frame 51
man_1.playDieAnim();
Symbol 1834 MovieClip Frame 90
_parent.play();
Symbol 1838 MovieClip Frame 1
_parent.stop();
Symbol 1838 MovieClip Frame 25
_parent.nextFrame();
Symbol 1845 MovieClip Frame 1
_parent.stop();
Instance of Symbol 1792 MovieClip in Symbol 1845 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 2;
nat = "Rus";
tp = "2H_axe";
lv = 0;
look_left = true;
}
Instance of Symbol 1792 MovieClip in Symbol 1845 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 1;
nat = "Ger";
tp = "shield";
lv = 3;
look_left = false;
}
Instance of Symbol 1792 MovieClip in Symbol 1845 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 4;
nat = "Rus";
tp = "shield";
lv = 2;
look_left = true;
}
Instance of Symbol 1792 MovieClip in Symbol 1845 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 3;
nat = "Mon";
tp = "dual";
lv = 3;
look_left = false;
}
Symbol 1845 MovieClip Frame 2
man_4.playAnim("shield_2");
man_3.playAnim("dual");
Symbol 1845 MovieClip Frame 5
man_2.playAnim("2H_axe_2");
Symbol 1845 MovieClip Frame 35
man_1.playAnim("shield_1");
Symbol 1845 MovieClip Frame 45
man_3.playAnim("dual_3");
Symbol 1845 MovieClip Frame 60
man_2.playDieAnim();
Symbol 1845 MovieClip Frame 75
man_4.playDieAnim();
Symbol 1845 MovieClip Frame 119
_parent.play();
Symbol 1847 MovieClip Frame 1
_parent.stop();
Symbol 1847 MovieClip Frame 25
_parent.nextFrame();
Symbol 1850 MovieClip Frame 1
_parent.stop();
Instance of Symbol 1792 MovieClip in Symbol 1850 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 2;
nat = "Jap";
tp = "katana";
lv = 8;
look_left = true;
}
Instance of Symbol 1792 MovieClip in Symbol 1850 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 1;
nat = "Ger";
tp = "2H_axe";
lv = 6;
look_left = false;
}
Symbol 1850 MovieClip Frame 6
man_1.playAnim("2H_axe_2");
Symbol 1850 MovieClip Frame 26
man_2.playAnim("katana_3");
Symbol 1850 MovieClip Frame 51
man_1.playDieAnim();
Symbol 1850 MovieClip Frame 91
_parent.play();
Symbol 1854 MovieClip Frame 1
_parent.stop();
Symbol 1854 MovieClip Frame 25
_parent.nextFrame();
Symbol 1858 MovieClip Frame 1
_parent.stop();
Instance of Symbol 1792 MovieClip in Symbol 1858 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 2;
nat = "Ger";
tp = "2H_sword";
lv = 4;
look_left = true;
}
Instance of Symbol 1792 MovieClip in Symbol 1858 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 1;
nat = "Viz";
tp = "dual";
lv = 5;
look_left = false;
}
Instance of Symbol 1792 MovieClip in Symbol 1858 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 4;
nat = "Ger";
tp = "2H_axe";
lv = 6;
look_left = true;
}
Instance of Symbol 1792 MovieClip in Symbol 1858 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 3;
nat = "Viz";
tp = "2H_sword";
lv = 5;
look_left = false;
}
Symbol 1858 MovieClip Frame 6
man_2.playAnim("2H_sword_2");
man_4.playAnim("2H_axe");
Symbol 1858 MovieClip Frame 11
man_3.playAnim("2H_sword_3");
Symbol 1858 MovieClip Frame 31
man_1.playAnim("dual_1");
Symbol 1858 MovieClip Frame 51
man_4.playAnim("2H_axe_3");
Symbol 1858 MovieClip Frame 66
man_2.playDieAnim();
Symbol 1858 MovieClip Frame 81
man_3.playDieAnim();
Symbol 1858 MovieClip Frame 120
_parent.play();
Symbol 1860 MovieClip Frame 1
_parent.stop();
Symbol 1860 MovieClip Frame 25
_parent.nextFrame();
Symbol 1862 MovieClip Frame 1
_parent.attachMovie("DummyHorseman", "man_" + id, id);
_parent["man_" + id]._x = this._x;
_parent["man_" + id]._y = this._y;
_parent["man_" + id]._xscale = this._xscale;
_parent["man_" + id]._yscale = this._yscale;
_parent["man_" + id].dress(nat, tp, lv);
if (!look_left) {
_parent["man_" + id]._xscale = _parent["man_" + id]._xscale * -1;
}
this.unloadMovie();
this.removeMovieClip();
Symbol 1863 MovieClip Frame 1
_parent.stop();
Instance of Symbol 1862 MovieClip in Symbol 1863 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 1;
nat = "Mon";
tp = "bow";
lv = 4;
}
Instance of Symbol 1862 MovieClip in Symbol 1863 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 2;
nat = "Mon";
tp = "bow";
lv = 4;
}
Instance of Symbol 1862 MovieClip in Symbol 1863 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 3;
nat = "Mon";
tp = "bow";
lv = 4;
}
Instance of Symbol 1862 MovieClip in Symbol 1863 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 4;
nat = "Mon";
tp = "bow";
lv = 4;
}
Symbol 1863 MovieClip Frame 6
man_1.playAnim("bow_3");
Symbol 1863 MovieClip Frame 11
man_3.playAnim("bow_3");
Symbol 1863 MovieClip Frame 16
man_2.playAnim("bow_3");
Symbol 1863 MovieClip Frame 21
man_4.playAnim("bow_3");
Symbol 1863 MovieClip Frame 90
_parent.play();
Symbol 1865 MovieClip Frame 1
_parent.stop();
Symbol 1865 MovieClip Frame 25
_parent.nextFrame();
Symbol 1868 MovieClip Frame 1
_parent.stop();
Instance of Symbol 1792 MovieClip in Symbol 1868 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 1;
nat = "Ara";
tp = "dual";
lv = 0;
look_left = true;
}
Instance of Symbol 1792 MovieClip in Symbol 1868 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 2;
nat = "Ara";
tp = "2H_sword";
lv = 4;
look_left = false;
}
Instance of Symbol 1792 MovieClip in Symbol 1868 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 3;
nat = "Ara";
tp = "dual";
lv = 2;
look_left = true;
}
Instance of Symbol 1792 MovieClip in Symbol 1868 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 4;
nat = "Ara";
tp = "katar";
lv = 4;
look_left = false;
}
Symbol 1868 MovieClip Frame 2
man_2.playAnim("2H_sword");
Symbol 1868 MovieClip Frame 5
man_1.playAnim("dual_1");
Symbol 1868 MovieClip Frame 10
man_4.playAnim("katar_2");
Symbol 1868 MovieClip Frame 30
man_3.playAnim("dual_2");
Symbol 1868 MovieClip Frame 40
man_2.playAnim("2H_sword_2");
Symbol 1868 MovieClip Frame 60
man_4.playDieAnim();
Symbol 1868 MovieClip Frame 65
man_1.playDieAnim();
Symbol 1868 MovieClip Frame 100
_parent.play();
Symbol 1870 MovieClip Frame 1
_parent.stop();
Symbol 1870 MovieClip Frame 25
_parent.nextFrame();
Symbol 1873 MovieClip Frame 1
_parent.stop();
man_1.dress("Jap", "staff", 1);
man_2.dress("Viz", "shield", 3);
man_3.dress("Viz", "dagger", 3);
man_4.dress("Ara", "crossbow", 4);
Instance of Symbol 1792 MovieClip in Symbol 1873 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 1;
nat = "Jap";
tp = "staff";
lv = 1;
look_left = true;
}
Instance of Symbol 1792 MovieClip in Symbol 1873 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 2;
nat = "Viz";
tp = "shield";
lv = 3;
look_left = false;
}
Instance of Symbol 1792 MovieClip in Symbol 1873 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 3;
nat = "Viz";
tp = "dagger";
lv = 3;
look_left = true;
}
Instance of Symbol 1792 MovieClip in Symbol 1873 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
id = 4;
nat = "Ara";
tp = "crossbow";
lv = 4;
look_left = false;
}
Symbol 1873 MovieClip Frame 2
man_2.playAnim("shield_2");
Symbol 1873 MovieClip Frame 5
man_1.playAnim("staff_3");
Symbol 1873 MovieClip Frame 40
man_3.playAnim("dagger_1");
Symbol 1873 MovieClip Frame 45
man_2.playDieAnim();
Symbol 1873 MovieClip Frame 65
man_1.playDieAnim();
Symbol 1873 MovieClip Frame 70
man_4.playAnim("crossbow_1");
Symbol 1873 MovieClip Frame 90
man_3.playDieAnim();
Symbol 1873 MovieClip Frame 130
_parent.play();
Symbol 1924 MovieClip Frame 130
stop();
Symbol 1931 MovieClip Frame 1
_parent.stop();
stop();
Symbol 1931 MovieClip Frame 179
_parent.play();
Symbol 1950 Button
on (release) {
gotoAndStop ("NewGame");
}
Symbol 1951 Button
on (release) {
gotoAndStop ("Resume");
}
Symbol 1952 Button
on (release) {
gotoAndStop ("Options");
}
Symbol 1953 Button
on (release) {
gotoAndStop ("Controls");
}
Symbol 1954 Button
on (release) {
getURL ("http://www.arcadetown.com?gameid=feudalism2", "_blank");
}
Symbol 1955 Button
on (release) {
getURL ("http://www.arcadetown.com/free_content/index.asp?gameid=feudalism2", "_blank");
}
Symbol 1956 Button
on (release) {
getURL ("mailto:zaborov@mail.ru", "_blank");
}
Symbol 1959 Button
on (release) {
getURL ("http://www.arcadetown.com/feudalism/game.asp", "_blank");
}
Symbol 1988 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.heroGerMale();
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "OnehandedSword", "Ger", 1));
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Curia = false;
_global.IS_CAPTURED.Risby = true;
_global.IS_CAPTURED.Elki = false;
_global.IS_CAPTURED.Nara = false;
_global.IS_CAPTURED.Neath = false;
_global.IS_CAPTURED.Aden = false;
_global.CURR_TOWN = "Risby";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var i = 0;
while (i < 5) {
_global.FRIENDS.push(new Unit("Ger", "2H_sword", 0));
i++;
}
choose_mark._visible = true;
choose_mark._x = GerM_btn._x;
}
on (rollOver) {
item_name_txt.text = "Karl, Bishop of The Order of Holy Cross";
item_stats_txt.text = "Great squad commander and supporter; Can learn special moves with One handed Weapons, Heavy Two handed Weapons and Throwing Knives. Specializes on strengthen infantry and squad support.";
item_stats_txt.text = item_stats_txt.text + "\nOrder's warriors depend on their armor and constitution, so some of them are just walking castles, but they also shouldn't forget about strength and spirit powers.\nNote: Order produces the best maces and armor in the world.";
}
Symbol 1990 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.heroRusFemale();
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "Dagger", "Viz", 1));
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Curia = false;
_global.IS_CAPTURED.Risby = false;
_global.IS_CAPTURED.Elki = true;
_global.IS_CAPTURED.Nara = false;
_global.IS_CAPTURED.Neath = false;
_global.IS_CAPTURED.Aden = false;
_global.CURR_TOWN = "Elki";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var i = 0;
while (i < 5) {
_global.FRIENDS.push(new Unit("Rus", "2H_axe", 0));
i++;
}
choose_mark._visible = true;
choose_mark._x = RusF_btn._x;
}
on (rollOver) {
item_name_txt.text = "Olga, the major Druid of Forest Lands";
item_stats_txt.text = "Very good ranged fighter and suppressor; Can learn special moves with Bow, Two handed Sword and Spear. Specializes on strengthen ranged units and enemy suppression.";
item_stats_txt.text = item_stats_txt.text + "\nForest Lands' warrioirs depend only on their strength. DEX and CON are important for them too, but only strength allow them to use better axes deal more damage, and even wear better armor made in forest lands.\nNote:Forest Lands produce the best axes in the world. Their bows are one of the best too.";
}
Symbol 1992 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.heroRusMale();
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "OnehandedMace", "Rus", 1));
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Curia = false;
_global.IS_CAPTURED.Risby = false;
_global.IS_CAPTURED.Elki = true;
_global.IS_CAPTURED.Nara = false;
_global.IS_CAPTURED.Neath = false;
_global.IS_CAPTURED.Aden = false;
_global.CURR_TOWN = "Elki";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var i = 0;
while (i < 5) {
_global.FRIENDS.push(new Unit("Rus", "2H_axe", 0));
i++;
}
choose_mark._visible = true;
choose_mark._x = RusM_btn._x;
}
on (rollOver) {
item_name_txt.text = "Vseslav, Chieftain of The Forest Lands";
item_stats_txt.text = "Very strong melee fighter and squad supporter; Can learn special moves with Heavy Twohanded Weapons, One handed Weapons and Throwing Axes. Specializes on infantry power-ups, squad support and enemy suppression.";
item_stats_txt.text = item_stats_txt.text + "\nForest Lands' warrioirs depend only on their strength. DEX and CON are important for them too, but only strength allow them to use better axes deal more damage, and even wear better armor made in forest lands.\nNote:Forest Lands produce the best axes in the world. Their bows are one of the best too.";
}
Symbol 1994 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.heroVizMale();
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "Dagger", "Viz", 1));
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Curia = true;
_global.IS_CAPTURED.Risby = false;
_global.IS_CAPTURED.Elki = false;
_global.IS_CAPTURED.Nara = false;
_global.IS_CAPTURED.Neath = false;
_global.IS_CAPTURED.Aden = false;
_global.CURR_TOWN = "Curia";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var i = 0;
while (i < 5) {
_global.FRIENDS.push(new Unit("Viz", "shield", 0));
i++;
}
choose_mark._visible = true;
choose_mark._x = VizM_btn._x;
}
on (rollOver) {
item_name_txt.text = "Edgar, Lord of the Great Trade Republic";
item_stats_txt.text = "Proficient melee fighter and squad leader; Can learn special moves with Two handed Sword, Spear and Crossbow. Specializes on strengthen and supporting any types of units.";
item_stats_txt.text = item_stats_txt.text + "\nRepublic warriors depend on both strength and constitution, sometimes they try to evade enemy attacks.\nNote: Republic produces the best swords and crossbows on the continent. They also make good armor and bows.";
}
Symbol 1996 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.heroGerFemale();
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "OnehandedMace", "Ger", 1));
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Curia = false;
_global.IS_CAPTURED.Risby = true;
_global.IS_CAPTURED.Elki = false;
_global.IS_CAPTURED.Nara = false;
_global.IS_CAPTURED.Neath = false;
_global.IS_CAPTURED.Aden = false;
_global.CURR_TOWN = "Risby";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var i = 0;
while (i < 5) {
_global.FRIENDS.push(new Unit("Ger", "2H_axe", 1));
i++;
}
choose_mark._visible = true;
choose_mark._x = GerF_btn._x;
}
on (rollOver) {
item_name_txt.text = "Elizabeth, Priest of Order of Holy Cross";
item_stats_txt.text = "Talented commander and universal fighter; Can learn special moves with Spear, Crossbow and One handed Weapons. Specializes on strengthen all types of units and enemy suppression.";
item_stats_txt.text = item_stats_txt.text + "\nOrder's warriors depend on their armor and constitution, so some of them are just walking castles, but they also shouldn't forget about strength and spirit powers.\nNote: Order produces the best maces and armor in the world.";
}
Symbol 1998 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.heroVizFemale();
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "TwohandedSword", "Viz", 1));
_global.INVENTORY.push(new ItemInfo("WeaponClass", "Bow", "Viz", 1));
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Curia = true;
_global.IS_CAPTURED.Risby = false;
_global.IS_CAPTURED.Elki = false;
_global.IS_CAPTURED.Nara = false;
_global.IS_CAPTURED.Neath = false;
_global.IS_CAPTURED.Aden = false;
_global.CURR_TOWN = "Curia";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var i = 0;
while (i < 5) {
_global.FRIENDS.push(new Unit("Viz", "crossbow", 0));
i++;
}
choose_mark._visible = true;
choose_mark._x = VizF_btn._x;
}
on (rollOver) {
item_name_txt.text = "Selena, Princess of the Great Trade Republic";
item_stats_txt.text = "Proficient sharpshooter and medic; Can learn special moves with Crossbow,Dagger and Two handed Sword. Specializes on squad support and infantry power-ups.";
item_stats_txt.text = item_stats_txt.text + "\nRepublic warriors depend on both strength and constitution, sometimes they try to evade enemy attacks.\nNote: Republic produces the best swords and crossbows on the continent. They also make good armor and bows.";
}
Symbol 2000 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.heroJapMale();
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "NinjaTo", "Jap", 1));
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Curia = false;
_global.IS_CAPTURED.Risby = false;
_global.IS_CAPTURED.Elki = false;
_global.IS_CAPTURED.Nara = true;
_global.IS_CAPTURED.Neath = false;
_global.IS_CAPTURED.Aden = false;
_global.CURR_TOWN = "Nara";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var i = 0;
while (i < 5) {
_global.FRIENDS.push(new Unit("Jap", "fists", 1));
i++;
}
choose_mark._visible = true;
choose_mark._x = JapM_btn._x;
}
on (rollOver) {
item_name_txt.text = "Sieg, Shogun of the Far East Empire";
item_stats_txt.text = "Master of melee fights and good commander; Can learn special moves with Dual Weapons, Katana and Bow. Specializes on strengthen infantry and enemy suppression.";
item_stats_txt.text = item_stats_txt.text + "\nEmpire's warriors depend on their dexterity, trying to evade enemy attacks. Strength is important for them too for dealing damage.\nNote: Empire produces only its national weapons. You will not find any swords, axes, maces or spears in their cities.";
}
Symbol 2002 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.heroMonFemale();
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "TwohandedSword", "Mon", 1));
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Curia = false;
_global.IS_CAPTURED.Risby = false;
_global.IS_CAPTURED.Elki = false;
_global.IS_CAPTURED.Nara = false;
_global.IS_CAPTURED.Neath = true;
_global.IS_CAPTURED.Aden = false;
_global.CURR_TOWN = "Neath";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var i = 0;
while (i < 5) {
_global.FRIENDS.push(new Unit("Mon", "bow", 0));
i++;
}
choose_mark._visible = true;
choose_mark._x = MonF_btn._x;
}
on (rollOver) {
item_name_txt.text = "Inga, Major Shaman of the Black Horde";
item_stats_txt.text = "Great bow master and effective lone warrior; Can learn special moves with Bow, Dagger and One handed Weapons. Specializes on strengthen bowmen and chivalry. Also can suppress enemy and heal herself.";
item_stats_txt.text = item_stats_txt.text + "\nHorde's warriors depend on their dexterity, strength and spirit powers. They prefer to shoot enemies from long range and then kill survivors in melee combat.\nNote: Horde produces swords, daggers and bows. Their bows are one of the best in the world.";
}
Symbol 2004 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.heroMonMale();
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "Bow", "Mon", 1));
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Curia = false;
_global.IS_CAPTURED.Risby = false;
_global.IS_CAPTURED.Elki = false;
_global.IS_CAPTURED.Nara = false;
_global.IS_CAPTURED.Neath = true;
_global.IS_CAPTURED.Aden = false;
_global.CURR_TOWN = "Neath";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var i = 0;
while (i < 5) {
_global.FRIENDS.push(new Unit("Mon", "2H_sword", 0));
i++;
}
choose_mark._visible = true;
choose_mark._x = MonM_btn._x;
}
on (rollOver) {
item_name_txt.text = "Chingis, Khan of the Black Horde";
item_stats_txt.text = "Effectively combines melee and ranged weapons; Can learn special moves with One handed Weapons, Bows and Two handed Swords. Specializes on strengthen bowmen, swordsmen and chivalry. Also can suppress enemy and support his troops.";
item_stats_txt.text = item_stats_txt.text + "\nHorde's warriors depend on their dexterity, strength and spirit powers. They prefer to shoot enemies from long range and then kill survivors in melee combat.\nNote: Horde produces swords, daggers and bows. Their bows are one of the best in the world.";
}
Symbol 2006 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.heroAraMale();
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "TwohandedSword", "Ara", 1));
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Curia = false;
_global.IS_CAPTURED.Risby = false;
_global.IS_CAPTURED.Elki = false;
_global.IS_CAPTURED.Nara = false;
_global.IS_CAPTURED.Neath = false;
_global.IS_CAPTURED.Aden = true;
_global.CURR_TOWN = "Aden";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var i = 0;
while (i < 5) {
_global.FRIENDS.push(new Unit("Ara", "dual", 0));
i++;
}
choose_mark._visible = true;
choose_mark._x = AraM_btn._x;
}
on (rollOver) {
item_name_txt.text = "Ismael, Ruler of the South Desert ";
item_stats_txt.text = "Powerful melee fighter and good commander; Can learn special moves with Dual Weapons, Two handed Sword and Crossbow. Specializes on strengthen melee infantry and enemy suppression.";
item_stats_txt.text = item_stats_txt.text + "\nDesert warriors depend on their strength, dexterity and constitution. They prefer face-to-face fight much more than ranged combat.\nNote: Horde produces only swords and their secret national weapon - Katar. Their swords a have good damage and a faster attack speed.";
}
Symbol 2008 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.heroAraFemale();
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "OnehandedSword", "Ara", 1));
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Curia = false;
_global.IS_CAPTURED.Risby = false;
_global.IS_CAPTURED.Elki = false;
_global.IS_CAPTURED.Nara = false;
_global.IS_CAPTURED.Neath = false;
_global.IS_CAPTURED.Aden = true;
_global.CURR_TOWN = "Aden";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var i = 0;
while (i < 5) {
_global.FRIENDS.push(new Unit("Ara", "dual", 0));
i++;
}
choose_mark._visible = true;
choose_mark._x = AraF_btn._x;
}
on (rollOver) {
item_name_txt.text = "Diana, Secret Assassin of the South Desert";
item_stats_txt.text = "Talented assassin and good lone warrior; Can learn special moves with Katar, Crossbow and Dagger. Specializes on assassin and chivalry training. Also has good enemy suppression skills.";
item_stats_txt.text = item_stats_txt.text + "\nDesert warriors depend on their strength, dexterity and constitution. They prefer face-to-face fight much more than ranged combat.\nNote: Horde produces only swords and their secret national weapon - Katar. Their swords a have good damage and a faster attack speed.";
}
Symbol 2010 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.heroJapFemale();
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "Katana", "Jap", 1));
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Curia = false;
_global.IS_CAPTURED.Risby = false;
_global.IS_CAPTURED.Elki = false;
_global.IS_CAPTURED.Nara = true;
_global.IS_CAPTURED.Neath = false;
_global.IS_CAPTURED.Aden = false;
_global.CURR_TOWN = "Nara";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var i = 0;
while (i < 5) {
_global.FRIENDS.push(new Unit("Jap", "fists", 1));
i++;
}
choose_mark._visible = true;
choose_mark._x = JapF_btn._x;
}
on (rollOver) {
item_name_txt.text = "Niora, Mistress of The East Empire";
item_stats_txt.text = "Master of national fighting styles and good commander; Can learn special moves with Staff, Katana and Surikens. Specializes on strengthen ranged units, war arts and enemy suppression.";
item_stats_txt.text = item_stats_txt.text + "\nEmpire's warriors depend on their dexterity, trying to evade enemy attacks. Strength is important for them too for dealing damage.\nNote: Empire produces only its national weapons. You will not find any swords, axes, maces or spears in their cities.";
}
Symbol 2011 Button
on (release) {
if (_global.MAIN_HERO) {
if (!_global.SHOW_HELP) {
_root.gotoAndStop("TOWN_SCREEN");
} else {
_root.gotoAndStop("TUTORIAL");
}
} else {
item_stats_txt.text = "Choose a hero first!";
}
}
Symbol 2012 Button
on (release) {
gotoAndStop (1);
}
Symbol 2013 Button
on (release) {
_parent.gotoAndStop("customize");
}
Symbol 2019 Button
on (release) {
getURL ("http://www.arcadetown.com/feudalism2/game.asp", "_blank");
}
Symbol 2020 MovieClip Frame 1
if (_root.isExclusive()) {
stop();
} else {
gotoAndStop (2);
}
Symbol 2030 Button
on (release) {
opt_quality.gotoAndStop("LOW");
}
Symbol 2031 Button
on (release) {
opt_quality.gotoAndStop("MEDIUM");
}
Symbol 2032 Button
on (release) {
opt_quality.gotoAndStop("HIGH");
}
Symbol 2034 Button
on (release) {
_root.saveDefaults();
gotoAndStop (1);
}
Symbol 2037 MovieClip Frame 1
this.onRelease = function () {
_global[val] = !_global[val];
if (_global[val]) {
gotoAndStop (3);
} else {
gotoAndStop (2);
}
};
if (_global[val]) {
gotoAndStop (3);
} else {
gotoAndStop (2);
}
Symbol 2037 MovieClip Frame 2
_global[val] = false;
Symbol 2037 MovieClip Frame 3
_global[val] = true;
Symbol 2044 MovieClip Frame 1
gotoAndStop(_global.SAVED_QUALITY);
Symbol 2044 MovieClip Frame 2
_global.SAVED_QUALITY = "MEDIUM";
Symbol 2044 MovieClip Frame 3
_global.SAVED_QUALITY = "HIGH";
Symbol 2044 MovieClip Frame 4
_global.SAVED_QUALITY = "LOW";
Symbol 2052 Button
on (release) {
if (!_root.loadGame(1)) {
err_notice.gotoAndPlay(2);
}
}
Symbol 2054 Button
on (release) {
if (!_root.loadGame(2)) {
err_notice.gotoAndPlay(2);
}
}
Symbol 2056 Button
on (release) {
if (!_root.loadGame(3)) {
err_notice.gotoAndPlay(2);
}
}
Symbol 2058 Button
on (release) {
if (!_root.loadGame("auto")) {
err_notice.gotoAndPlay(2);
}
}
Symbol 2060 MovieClip Frame 1
stop();
Symbol 2060 MovieClip Frame 55
gotoAndStop (1);
Symbol 2068 Button
on (release) {
gotoAndStop ("buildings");
}
Symbol 2073 MovieClip Frame 1
stop();
Symbol 2073 MovieClip Frame 33
gotoAndPlay (2);
Symbol 2076 MovieClip Frame 1
stop();
Symbol 2076 MovieClip Frame 33
gotoAndPlay (2);
Symbol 2079 MovieClip Frame 1
stop();
Symbol 2079 MovieClip Frame 33
gotoAndPlay (2);
Symbol 2082 MovieClip Frame 1
stop();
Symbol 2082 MovieClip Frame 33
gotoAndPlay (2);
Symbol 2087 MovieClip Frame 1
stop();
Symbol 2087 MovieClip Frame 33
gotoAndPlay (2);
Symbol 2090 MovieClip Frame 1
stop();
Symbol 2090 MovieClip Frame 33
gotoAndPlay (2);
Symbol 2093 MovieClip Frame 1
stop();
Symbol 2093 MovieClip Frame 33
gotoAndPlay (2);
Symbol 2096 MovieClip Frame 1
stop();
Symbol 2096 MovieClip Frame 33
gotoAndPlay (2);
Symbol 2099 MovieClip Frame 1
stop();
Symbol 2099 MovieClip Frame 33
gotoAndPlay (2);
Symbol 2102 MovieClip Frame 1
stop();
Symbol 2102 MovieClip Frame 33
gotoAndPlay (2);
Symbol 2105 MovieClip Frame 1
stop();
Symbol 2105 MovieClip Frame 33
gotoAndPlay (2);
Symbol 2108 MovieClip Frame 1
stop();
Symbol 2108 MovieClip Frame 33
gotoAndPlay (2);
Symbol 2111 MovieClip Frame 1
stop();
Symbol 2111 MovieClip Frame 33
gotoAndStop (1);
Symbol 2114 MovieClip Frame 1
stop();
Symbol 2114 MovieClip Frame 33
gotoAndPlay (2);
Symbol 2118 MovieClip Frame 1
stop();
Symbol 2118 MovieClip Frame 33
gotoAndPlay (2);
Symbol 2121 MovieClip Frame 1
stop();
Symbol 2121 MovieClip Frame 33
gotoAndPlay (2);
Symbol 2124 MovieClip Frame 1
stop();
Symbol 2124 MovieClip Frame 33
gotoAndPlay (2);
Symbol 2125 MovieClip Frame 1
gotoAndStop(_global.MAIN_HERO.NATION);
Symbol 2127 Button
on (release) {
gotoAndStop ("city_hall");
}
Symbol 2129 Button
on (release) {
gotoAndStop ("forge");
}
Symbol 2131 Button
on (release) {
gotoAndStop ("barracks");
}
Symbol 2133 Button
on (release) {
gotoAndStop ("temple");
}
Symbol 2135 Button
on (release) {
gotoAndStop ("also");
}
Symbol 2137 Button
on (release) {
gotoAndPlay ("world");
}
Symbol 2142 MovieClip Frame 1
stop();
Symbol 2142 MovieClip Frame 106
stop();
Symbol 2144 Button
on (release) {
gotoAndStop ("battle");
}
Symbol 2258 MovieClip [BarracksUnit - tutorial] Frame 1
#initclip 163
Object.registerClass("BarracksUnit - tutorial", BarracksIcon);
#endinitclip
Symbol 2273 MovieClip Frame 1
var i = 0;
while (i < 5) {
if (_global.FRIENDS[i]) {
this["fr_" + i].setHero(_global.FRIENDS[i]);
this["fr_" + i].anim._xscale = 65;
this["fr_" + i].anim._yscale = 65;
this["fr_" + i].anim._xscale = this["fr_" + i].anim._xscale * -1;
this["fr_" + i]._visible = true;
} else {
this["fr_" + i]._visible = false;
}
i++;
}
var i = 0;
while (i < 5) {
if (_global.ENEMIES[i]) {
this["en_" + i].setHero(_global.ENEMIES[i]);
this["en_" + i].anim._xscale = 65;
this["en_" + i].anim._yscale = 65;
this["en_" + i].anim._xscale = this["en_" + i].anim._xscale * -1;
this["en_" + i]._visible = true;
} else {
this["en_" + i]._visible = false;
}
i++;
}
this.hr_0.setHero(_global.MAIN_HERO);
this.hr_0.anim._xscale = 65;
this.hr_0.anim._yscale = 65;
this.hr_0.anim._xscale = this.hr_0.anim._xscale * -1;
this.hp_txt.text = (this.hr_0.anim.HP + "/") + this.hr_0.anim.MAX_HP;
this.backgr.gotoAndStop(_global.BATTLE_MAP);
stop();
Symbol 2273 MovieClip Frame 41
gotoAndPlay ("blink_potions");
Symbol 2273 MovieClip Frame 81
gotoAndPlay ("blink_control");
Symbol 2273 MovieClip Frame 121
gotoAndPlay ("blink_hero");
Symbol 2273 MovieClip Frame 161
gotoAndPlay ("blink_friends");
Symbol 2273 MovieClip Frame 201
gotoAndPlay ("blink_enemies");
Symbol 2273 MovieClip Frame 241
gotoAndPlay ("blink_shower");
Symbol 2273 MovieClip Frame 281
gotoAndPlay ("blink_wall");
Symbol 2276 Button
on (release) {
gotoAndStop ("your_hero");
}
Symbol 2278 Button
on (release) {
gotoAndStop ("troops");
}
Symbol 2280 Button
on (release) {
gotoAndStop ("swap");
}
Symbol 2283 Button
on (release) {
gotoAndStop ("enemies");
}
Symbol 2285 Button
on (release) {
gotoAndStop ("potions");
}
Symbol 2288 Button
on (release) {
gotoAndStop ("end");
}
Symbol 2290 Button
on (release) {
_parent.gotoAndStop(1);
}
Symbol 2291 MovieClip Frame 1
stop();
Symbol 2291 MovieClip Frame 3
backgr.hall_btn.play();
Symbol 2291 MovieClip Frame 4
backgr.forge_btn.play();
backgr.hall_btn.gotoAndStop(1);
Symbol 2291 MovieClip Frame 5
backgr.barracks_btn.play();
backgr.forge_btn.gotoAndStop(1);
Symbol 2291 MovieClip Frame 6
backgr.temple_btn.play();
backgr.barracks_btn.gotoAndStop(1);
Symbol 2291 MovieClip Frame 7
backgr.temple_btn.gotoAndStop(1);
Symbol 2291 MovieClip Frame 67
backgr_world.play();
Symbol 2291 MovieClip Frame 178
stop();
Symbol 2291 MovieClip Frame 179
backgr_battle.gotoAndPlay("blink_hero");
Symbol 2291 MovieClip Frame 180
backgr_battle.gotoAndPlay("blink_friends");
Symbol 2291 MovieClip Frame 181
backgr_battle.gotoAndPlay("blink_control");
Symbol 2291 MovieClip Frame 182
backgr_battle.gotoAndPlay("blink_enemies");
Symbol 2291 MovieClip Frame 183
backgr_battle.gotoAndPlay("blink_potions");
Symbol 2296 MovieClip Frame 1
this.VARIABLE = the_var;
this.is_waiting = false;
this.getBtnName = function (code) {
if (code == 8) {
return("BcSpc");
}
if (code == 20) {
return("Caps");
}
if (code == 17) {
return("Ctrl");
}
if (code == 46) {
return("Del");
}
if (code == 40) {
return("Down");
}
if (code == 35) {
return("End");
}
if (code == 13) {
return("Enter");
}
if (code == 27) {
return("Esc");
}
if (code == 36) {
return("Home");
}
if (code == 45) {
return("Ins");
}
if (code == 37) {
return("Left");
}
if (code == 34) {
return("PgDn");
}
if (code == 33) {
return("PgUp");
}
if (code == 39) {
return("Right");
}
if (code == 16) {
return("Shift");
}
if (code == 32) {
return("Space");
}
if (code == 9) {
return("Tab");
}
if (code == 38) {
return("Up");
}
return(String.fromCharCode(code).toUpperCase());
};
this.onRelease = function () {
this.is_waiting = true;
this.btn_name.text = "???";
this.gotoAndStop(3);
};
this.btn_name.text = this.getBtnName(_global["CO_" + this.VARIABLE]);
this.gotoAndStop(2);
Symbol 2297 Button
on (release) {
_root.saveDefaults();
gotoAndStop (1);
}
Symbol 2305 Button
on (release) {
_global.MAIN_HERO.NAME = name_txt.text;
_global.MAIN_HERO.LEVEL = 1;
_global.MAIN_HERO.STR = 1;
_global.MAIN_HERO.DEX = 1;
_global.MAIN_HERO.CON = 1;
_global.MAIN_HERO.SPR = 1;
_global.MAIN_HERO.stat_points = 350;
_global.MAIN_HERO.skill_points = 1;
var i = 0;
while (i < 3) {
_global.MAIN_HERO.ACTIVE_SKILLS[this["active_" + i].curr_value] = [0, 0, 0];
_global.MAIN_HERO.AURA_SKILLS.push([this["aura_" + i].curr_value, 0]);
i++;
}
trace(_global.MAIN_HERO.ACTIVE_SKILLS);
var i = 0;
while (i < 6) {
_global.MAIN_HERO.PASSIVE_SKILLS.push([this["passive_" + i].curr_value, 0]);
i++;
}
switch (_global.MAIN_HERO.NATION) {
case "Viz" :
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Curia = true;
_global.IS_CAPTURED.Risby = false;
_global.IS_CAPTURED.Elki = false;
_global.IS_CAPTURED.Nara = false;
_global.IS_CAPTURED.Neath = false;
_global.IS_CAPTURED.Aden = false;
_global.CURR_TOWN = "Curia";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var i = 0;
while (i < 5) {
_global.FRIENDS.push(new Unit("Viz", "shield", 0));
i++;
}
break;
case "Ger" :
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Curia = false;
_global.IS_CAPTURED.Risby = true;
_global.IS_CAPTURED.Elki = false;
_global.IS_CAPTURED.Nara = false;
_global.IS_CAPTURED.Neath = false;
_global.IS_CAPTURED.Aden = false;
_global.CURR_TOWN = "Risby";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var i = 0;
while (i < 5) {
_global.FRIENDS.push(new Unit("Ger", "2H_sword", 0));
i++;
}
break;
case "Rus" :
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Curia = false;
_global.IS_CAPTURED.Risby = false;
_global.IS_CAPTURED.Elki = true;
_global.IS_CAPTURED.Nara = false;
_global.IS_CAPTURED.Neath = false;
_global.IS_CAPTURED.Aden = false;
_global.CURR_TOWN = "Elki";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var i = 0;
while (i < 5) {
_global.FRIENDS.push(new Unit("Rus", "2H_axe", 0));
i++;
}
break;
case "Jap" :
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Curia = false;
_global.IS_CAPTURED.Risby = false;
_global.IS_CAPTURED.Elki = false;
_global.IS_CAPTURED.Nara = true;
_global.IS_CAPTURED.Neath = false;
_global.IS_CAPTURED.Aden = false;
_global.CURR_TOWN = "Nara";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var i = 0;
while (i < 5) {
_global.FRIENDS.push(new Unit("Jap", "fists", 1));
i++;
}
break;
case "Mon" :
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Curia = false;
_global.IS_CAPTURED.Risby = false;
_global.IS_CAPTURED.Elki = false;
_global.IS_CAPTURED.Nara = false;
_global.IS_CAPTURED.Neath = true;
_global.IS_CAPTURED.Aden = false;
_global.CURR_TOWN = "Neath";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var i = 0;
while (i < 5) {
_global.FRIENDS.push(new Unit("Mon", "2H_sword", 0));
i++;
}
break;
case "Ara" :
delete _global.IS_CAPTURED;
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Curia = false;
_global.IS_CAPTURED.Risby = false;
_global.IS_CAPTURED.Elki = false;
_global.IS_CAPTURED.Nara = false;
_global.IS_CAPTURED.Neath = false;
_global.IS_CAPTURED.Aden = true;
_global.CURR_TOWN = "Aden";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
var i = 0;
for(;;){
if (i >= 5) {
break;
}
_global.FRIENDS.push(new Unit("Ara", "dual", 0));
i++;
};
}
if (!_global.SHOW_HELP) {
_root.gotoAndStop("TOWN_SCREEN");
} else {
_root.gotoAndStop("TUTORIAL");
}
}
Symbol 2306 Button
on (release) {
gotoAndStop ("NewGame");
}
Symbol 2309 Button
on (press) {
goLeft();
}
Symbol 2310 Button
on (press) {
goRight();
}
Symbol 2311 MovieClip [Choose Nation] Frame 1
#initclip 158
Object.registerClass("Choose Nation", NationChooser);
#endinitclip
Symbol 2313 Button
on (release) {
_global.MAIN_HERO.GENDER = ((_currentframe == 1) ? "f" : "m");
_parent.hero_ico.setUnitView(_global.MAIN_HERO, false);
gotoAndStop(3 - _currentframe);
}
Symbol 2315 MovieClip Frame 1
stop();
Symbol 2317 MovieClip [Choose Active Skill] Frame 1
#initclip 159
Object.registerClass("Choose Active Skill", ActiveSkillChooser);
#endinitclip
Instance of Symbol 337 MovieClip "ico_1" in Symbol 2317 MovieClip [Choose Active Skill] Frame 1
on (rollOver) {
_parent.showSkillInfo(1);
}
on (rollOut) {
_parent.removeSkillInfo();
}
Instance of Symbol 337 MovieClip "ico_2" in Symbol 2317 MovieClip [Choose Active Skill] Frame 1
on (rollOver) {
_parent.showSkillInfo(2);
}
on (rollOut) {
_parent.removeSkillInfo();
}
Instance of Symbol 337 MovieClip "ico_3" in Symbol 2317 MovieClip [Choose Active Skill] Frame 1
on (rollOver) {
_parent.showSkillInfo(3);
}
on (rollOut) {
_parent.removeSkillInfo();
}
Symbol 2318 MovieClip [Choose Aura Skill] Frame 1
#initclip 160
Object.registerClass("Choose Aura Skill", AuraSkillChooser);
#endinitclip
Instance of Symbol 337 MovieClip "ico" in Symbol 2318 MovieClip [Choose Aura Skill] Frame 1
on (rollOver) {
_parent.showSkillInfo(-1);
}
on (rollOut) {
_parent.removeSkillInfo();
}
Symbol 2319 MovieClip [Choose Skill] Frame 1
#initclip 161
Object.registerClass("Choose Skill", PassiveSkillChooser);
#endinitclip
Instance of Symbol 337 MovieClip "ico" in Symbol 2319 MovieClip [Choose Skill] Frame 1
on (rollOver) {
_parent.showSkillInfo(0);
}
on (rollOut) {
_parent.removeSkillInfo();
}
Symbol 2328 MovieClip [BarracksUnit] Frame 1
#initclip 162
Object.registerClass("BarracksUnit", BarracksIcon);
#endinitclip
Symbol 2329 MovieClip Frame 1
stop();
Instance of Symbol 1958 MovieClip in Symbol 2329 MovieClip Frame 1
on (release) {
getURL ("http://www.arcadetown.com?gameid=feudalism2", "_blank");
}
Symbol 2329 MovieClip Frame 2
delete _global.MAIN_HERO;
_global.GOLD = 20000;
_global.SHIP_LOCATION = "none";
_global.GAME_ENDED = false;
_global.IS_HOSTILE = new Array();
_global.IS_HOSTILE.Viz = false;
_global.IS_HOSTILE.Ger = false;
_global.IS_HOSTILE.Rus = false;
_global.IS_HOSTILE.Jap = false;
_global.IS_HOSTILE.Mon = false;
_global.IS_HOSTILE.Ara = false;
_global.POTION_HealSmall = 10;
_global.POTION_HealMedium = 3;
_global.BATTLE_TUTORIAL_PLAYED = false;
choose_mark._visible = false;
Instance of Symbol 1985 MovieClip in Symbol 2329 MovieClip Frame 2
onClipEvent (load) {
gotoAndStop ("Viz");
}
Instance of Symbol 1985 MovieClip in Symbol 2329 MovieClip Frame 2
onClipEvent (load) {
gotoAndStop ("Ger");
}
Instance of Symbol 1985 MovieClip in Symbol 2329 MovieClip Frame 2
onClipEvent (load) {
gotoAndStop ("Rus");
}
Instance of Symbol 1985 MovieClip in Symbol 2329 MovieClip Frame 2
onClipEvent (load) {
gotoAndStop ("Jap");
}
Instance of Symbol 1985 MovieClip in Symbol 2329 MovieClip Frame 2
onClipEvent (load) {
gotoAndStop ("Mon");
}
Instance of Symbol 1985 MovieClip in Symbol 2329 MovieClip Frame 2
onClipEvent (load) {
gotoAndStop ("Ara");
}
Instance of Symbol 2037 MovieClip in Symbol 2329 MovieClip Frame 3
//component parameters
onClipEvent (construct) {
val = "HIGHLIGHT_TROOPS";
}
Instance of Symbol 2037 MovieClip in Symbol 2329 MovieClip Frame 3
//component parameters
onClipEvent (construct) {
val = "SHOW_HELP";
}
Instance of Symbol 2296 MovieClip in Symbol 2329 MovieClip Frame 6
//component parameters
onClipEvent (construct) {
the_var = "SWITCH";
}
onClipEvent (keyDown) {
if (this.is_waiting) {
this.is_waiting = false;
var code = Key.getCode();
_global["CO_" + this.VARIABLE] = code;
this.btn_name.text = this.getBtnName(code);
this.gotoAndStop(2);
}
}
Instance of Symbol 2296 MovieClip in Symbol 2329 MovieClip Frame 6
//component parameters
onClipEvent (construct) {
the_var = "UP_1";
}
onClipEvent (keyDown) {
if (this.is_waiting) {
this.is_waiting = false;
var code = Key.getCode();
_global["CO_" + this.VARIABLE] = code;
this.btn_name.text = this.getBtnName(code);
this.gotoAndStop(2);
}
}
Instance of Symbol 2296 MovieClip in Symbol 2329 MovieClip Frame 6
//component parameters
onClipEvent (construct) {
the_var = "DOWN_1";
}
onClipEvent (keyDown) {
if (this.is_waiting) {
this.is_waiting = false;
var code = Key.getCode();
_global["CO_" + this.VARIABLE] = code;
this.btn_name.text = this.getBtnName(code);
this.gotoAndStop(2);
}
}
Instance of Symbol 2296 MovieClip in Symbol 2329 MovieClip Frame 6
//component parameters
onClipEvent (construct) {
the_var = "LEFT_1";
}
onClipEvent (keyDown) {
if (this.is_waiting) {
this.is_waiting = false;
var code = Key.getCode();
_global["CO_" + this.VARIABLE] = code;
this.btn_name.text = this.getBtnName(code);
this.gotoAndStop(2);
}
}
Instance of Symbol 2296 MovieClip in Symbol 2329 MovieClip Frame 6
//component parameters
onClipEvent (construct) {
the_var = "RIGHT_1";
}
onClipEvent (keyDown) {
if (this.is_waiting) {
this.is_waiting = false;
var code = Key.getCode();
_global["CO_" + this.VARIABLE] = code;
this.btn_name.text = this.getBtnName(code);
this.gotoAndStop(2);
}
}
Instance of Symbol 2296 MovieClip in Symbol 2329 MovieClip Frame 6
//component parameters
onClipEvent (construct) {
the_var = "ATTACK_1";
}
onClipEvent (keyDown) {
if (this.is_waiting) {
this.is_waiting = false;
var code = Key.getCode();
_global["CO_" + this.VARIABLE] = code;
this.btn_name.text = this.getBtnName(code);
this.gotoAndStop(2);
}
}
Instance of Symbol 2296 MovieClip in Symbol 2329 MovieClip Frame 6
//component parameters
onClipEvent (construct) {
the_var = "UP_2";
}
onClipEvent (keyDown) {
if (this.is_waiting) {
this.is_waiting = false;
var code = Key.getCode();
_global["CO_" + this.VARIABLE] = code;
this.btn_name.text = this.getBtnName(code);
this.gotoAndStop(2);
}
}
Instance of Symbol 2296 MovieClip in Symbol 2329 MovieClip Frame 6
//component parameters
onClipEvent (construct) {
the_var = "DOWN_2";
}
onClipEvent (keyDown) {
if (this.is_waiting) {
this.is_waiting = false;
var code = Key.getCode();
_global["CO_" + this.VARIABLE] = code;
this.btn_name.text = this.getBtnName(code);
this.gotoAndStop(2);
}
}
Instance of Symbol 2296 MovieClip in Symbol 2329 MovieClip Frame 6
//component parameters
onClipEvent (construct) {
the_var = "LEFT_2";
}
onClipEvent (keyDown) {
if (this.is_waiting) {
this.is_waiting = false;
var code = Key.getCode();
_global["CO_" + this.VARIABLE] = code;
this.btn_name.text = this.getBtnName(code);
this.gotoAndStop(2);
}
}
Instance of Symbol 2296 MovieClip in Symbol 2329 MovieClip Frame 6
//component parameters
onClipEvent (construct) {
the_var = "RIGHT_2";
}
onClipEvent (keyDown) {
if (this.is_waiting) {
this.is_waiting = false;
var code = Key.getCode();
_global["CO_" + this.VARIABLE] = code;
this.btn_name.text = this.getBtnName(code);
this.gotoAndStop(2);
}
}
Instance of Symbol 2296 MovieClip in Symbol 2329 MovieClip Frame 6
//component parameters
onClipEvent (construct) {
the_var = "ATTACK_2";
}
onClipEvent (keyDown) {
if (this.is_waiting) {
this.is_waiting = false;
var code = Key.getCode();
_global["CO_" + this.VARIABLE] = code;
this.btn_name.text = this.getBtnName(code);
this.gotoAndStop(2);
}
}
Symbol 2329 MovieClip Frame 7
hero_ico.setUnitView(_global.MAIN_HERO, false);
hero_ico.enabled = false;
Instance of Symbol 2317 MovieClip [Choose Active Skill] "active_0" in Symbol 2329 MovieClip Frame 7
//component parameters
onClipEvent (construct) {
curr_value = "shield";
ID = 0;
}
Instance of Symbol 2317 MovieClip [Choose Active Skill] "active_1" in Symbol 2329 MovieClip Frame 7
//component parameters
onClipEvent (construct) {
curr_value = "2H_sword";
ID = 1;
}
Instance of Symbol 2317 MovieClip [Choose Active Skill] "active_2" in Symbol 2329 MovieClip Frame 7
//component parameters
onClipEvent (construct) {
curr_value = "2H_axe";
ID = 2;
}
Instance of Symbol 2318 MovieClip [Choose Aura Skill] "aura_0" in Symbol 2329 MovieClip Frame 7
//component parameters
onClipEvent (construct) {
curr_value = "DivineHelp";
ID = 0;
}
Instance of Symbol 2318 MovieClip [Choose Aura Skill] "aura_1" in Symbol 2329 MovieClip Frame 7
//component parameters
onClipEvent (construct) {
curr_value = "Healing";
ID = 1;
}
Instance of Symbol 2318 MovieClip [Choose Aura Skill] "aura_2" in Symbol 2329 MovieClip Frame 7
//component parameters
onClipEvent (construct) {
curr_value = "Barrier";
ID = 2;
}
Instance of Symbol 2319 MovieClip [Choose Skill] "passive_3" in Symbol 2329 MovieClip Frame 7
//component parameters
onClipEvent (construct) {
curr_value = "Horsemen_1";
ID = 3;
}
Instance of Symbol 2319 MovieClip [Choose Skill] "passive_4" in Symbol 2329 MovieClip Frame 7
//component parameters
onClipEvent (construct) {
curr_value = "Horsemen_2";
ID = 4;
}
Instance of Symbol 2319 MovieClip [Choose Skill] "passive_5" in Symbol 2329 MovieClip Frame 7
//component parameters
onClipEvent (construct) {
curr_value = "Horsemen_3";
ID = 5;
}
Instance of Symbol 2319 MovieClip [Choose Skill] "passive_0" in Symbol 2329 MovieClip Frame 7
//component parameters
onClipEvent (construct) {
curr_value = "Infantry_1";
ID = 0;
}
Instance of Symbol 2319 MovieClip [Choose Skill] "passive_1" in Symbol 2329 MovieClip Frame 7
//component parameters
onClipEvent (construct) {
curr_value = "Infantry_2";
ID = 1;
}
Instance of Symbol 2319 MovieClip [Choose Skill] "passive_2" in Symbol 2329 MovieClip Frame 7
//component parameters
onClipEvent (construct) {
curr_value = "Infantry_3";
ID = 2;
}
Symbol 2333 MovieClip Frame 1
if (_global.BATTLE_TYPE != "CHALLENGE") {
_root.addUnit(this._x, this._y, _global[arr].shift(), tm);
}
this.unloadMovie();
this.removeMovieClip();
Symbol 2335 MovieClip Frame 1
if (sq == "Player") {
_root.addHero(this._x, this._y, _global.MAIN_HERO, 0);
} else {
_root.addUnit(this._x, this._y, _global.EVIL_HERO, 1);
}
this.unloadMovie();
this.removeMovieClip();
Symbol 2337 MovieClip [TreeBroken_1] Frame 1
#initclip 164
Object.registerClass("TreeBroken_1", Tree);
#endinitclip
this.init();
Symbol 2339 MovieClip [Crate_2] Frame 1
#initclip 165
Object.registerClass("Crate_2", Tree);
#endinitclip
this.init();
Symbol 2345 MovieClip [Willow_2] Frame 1
#initclip 166
Object.registerClass("Willow_2", Tree);
#endinitclip
this.init();
Symbol 2347 MovieClip [Willow_1] Frame 1
#initclip 168
Object.registerClass("Willow_1", Tree);
#endinitclip
this.init();
Symbol 2351 MovieClip [Head_on_spear] Frame 1
#initclip 167
Object.registerClass("Head_on_spear", Tree);
#endinitclip
this.init();
Symbol 2359 MovieClip [BigStone_1] Frame 1
#initclip 169
Object.registerClass("BigStone_1", Tree);
#endinitclip
this.init();
Symbol 2364 MovieClip [Sign_3] Frame 1
#initclip 170
Object.registerClass("Sign_3", Tree);
#endinitclip
this.init();
Symbol 2366 MovieClip [Sword_in_ground_1] Frame 1
#initclip 171
Object.registerClass("Sword_in_ground_1", Tree);
#endinitclip
this.init();
Symbol 2368 MovieClip [Sword_in_ground_2] Frame 1
#initclip 172
Object.registerClass("Sword_in_ground_2", Tree);
#endinitclip
this.init();
Symbol 2373 MovieClip [BigStone_2] Frame 1
#initclip 173
Object.registerClass("BigStone_2", Tree);
#endinitclip
this.init();
Symbol 2376 Button
on (release) {
openBarracks();
}
Symbol 2378 Button
on (release) {
openCityHall();
}
Symbol 2379 Button
on (release) {
openForge();
}
Symbol 2380 Button
on (release) {
openTemple();
}
Symbol 2381 Button
on (release) {
openBarn();
}
Symbol 2383 Button
on (release) {
openMarketplace();
}
Symbol 2403 MovieClip Frame 1
stop();
Symbol 2408 Button
on (release) {
_parent.leaveTown();
}
on (rollOver) {
_parent.hint.gotoAndStop("exit");
}
on (rollOut) {
_parent.hint.gotoAndStop("empty");
}
Symbol 2409 Button
on (release) {
_parent.openHeroStats();
}
Symbol 2412 Button
on (release) {
_parent.openStats();
}
Symbol 2552 MovieClip [ICON Inventory] Frame 1
#initclip 176
Object.registerClass("ICON Inventory", StoreIcon);
#endinitclip
Symbol 2553 Button
on (press) {
if (_parent.scrollTrader > 0) {
_parent.scrollTrader--;
_parent.storeShowTrader();
}
}
Symbol 2554 Button
on (press) {
if (_parent.city.forge.length > (_parent.scrollTrader + 7)) {
_parent.scrollTrader++;
_parent.storeShowTrader();
}
}
Symbol 2555 Button
on (press) {
if (_parent.scrollUser > 0) {
_parent.scrollUser--;
_parent.storeShowUser();
}
}
Symbol 2556 Button
on (press) {
if (_global.INVENTORY.length > (_parent.scrollUser + 7)) {
_parent.scrollUser++;
_parent.storeShowUser();
}
}
Symbol 2563 Button
on (release) {
_parent.sellAll();
}
Symbol 2565 Button
on (release) {
_parent.goBack();
}
Symbol 2569 Button
on (press) {
if (refine_anvil.item) {
var curr_lv = refine_anvil.item.REFINE;
var written_lv = Number(refine_lvl_txt.text);
if (written_lv > (curr_lv + 1)) {
refine_lvl_txt.text = written_lv - 1;
}
_parent.forgeUpdateData();
}
}
Symbol 2571 Button
on (press) {
if (refine_anvil.item) {
var curr_lv = refine_anvil.item.REFINE;
var written_lv = Number(refine_lvl_txt.text);
if (written_lv < 10) {
refine_lvl_txt.text = written_lv + 1;
}
_parent.forgeUpdateData();
}
}
Symbol 2585 MovieClip Frame 1
stop();
Symbol 2585 MovieClip Frame 50
gotoAndStop ("none");
Symbol 2585 MovieClip Frame 98
gotoAndStop ("none");
Symbol 2588 Button
on (release) {
_parent.forgeRefine();
}
Symbol 2589 Button
on (release) {
_parent.forgeEnchant();
}
Symbol 2592 Button
on (press) {
var mult = (Key.isDown(16) ? 5 : 1);
if (_global.GOLD >= (100 * mult)) {
_global.GOLD = _global.GOLD - (100 * mult);
_global.POTION_HealSmall = _global.POTION_HealSmall + mult;
money_txt.text = _global.GOLD + " gold";
potion_1_txt.text = _global.POTION_HealSmall;
} else {
item_name_txt.text = "Not enough money!";
item_stats_txt.text = "";
}
}
on (rollOver) {
item_name_txt.text = "Small heal potion";
item_stats_txt.text = "Heals 40 HP\n\nCost 100 gp.";
}
Symbol 2593 Button
on (press) {
var mult = (Key.isDown(16) ? 5 : 1);
if (_global.GOLD >= (1000 * mult)) {
_global.GOLD = _global.GOLD - (1000 * mult);
_global.POTION_HealMedium = _global.POTION_HealMedium + mult;
money_txt.text = _global.GOLD + " gold";
potion_2_txt.text = _global.POTION_HealMedium;
} else {
item_name_txt.text = "Not enough money!";
item_stats_txt.text = "";
}
}
on (rollOver) {
item_name_txt.text = "Medium heal potion";
item_stats_txt.text = "Heals 300 HP\n\nCost 1000 gp.";
}
Symbol 2602 MovieClip Frame 1
man_movie.gotoAndStop(_parent._parent.city.NATION);
Symbol 2611 Button
on (press) {
if (_parent.scrollTrader > 0) {
_parent.scrollTrader--;
_parent.barracksShowTrader();
}
}
Symbol 2612 Button
on (press) {
if (_parent.city.barracks.length > (_parent.scrollTrader + 8)) {
_parent.scrollTrader++;
_parent.barracksShowTrader();
}
}
Symbol 2613 Button
on (press) {
if (_parent.scrollUser > 0) {
_parent.scrollUser--;
_parent.barracksShowUser();
}
}
Symbol 2614 Button
on (press) {
if ((_global.FRIENDS.length - 9) > (_parent.scrollUser + 8)) {
_parent.scrollUser++;
_parent.barracksShowUser();
}
}
Symbol 2620 Button
on (press) {
if (_global.INVENTORY.length > (_parent.scrollUser + 6)) {
_parent.scrollUser++;
_parent.storeShowUser();
}
}
Symbol 2753 MovieClip [ICON Equipment] Frame 1
#initclip 174
Object.registerClass("ICON Equipment", EquipmentIcon);
#endinitclip
Symbol 2754 Button
on (rollOver) {
item_name_txt.text = (_global.MAIN_HERO.NAME + " Level ") + _global.MAIN_HERO.LEVEL;
item_stats_txt.text = ("Hit Pionts: " + hero_ico.anim.MAX_HP) + newline;
item_stats_txt.text = item_stats_txt.text + (("Defence: " + hero_ico.anim.DEF) + " ");
item_stats_txt.text = item_stats_txt.text + (((("Dodge: " + hero_ico.anim.FLEE) + "%") + ((hero_ico.anim.SHIELD_FLEE > 0) ? (("+" + hero_ico.anim.SHIELD_FLEE) + "% (Shield)") : "")) + newline);
item_stats_txt.text = item_stats_txt.text + (((("Damage: " + hero_ico.anim.wpn.dmg) + "-") + (hero_ico.anim.wpn.dmg + hero_ico.anim.wpn.rnd)) + newline);
item_stats_txt.text = item_stats_txt.text + (("Attack Speed: " + (Math.round((100 / (hero_ico.anim.wpn.t_bef + hero_ico.anim.wpn.t_aft)) * 100) / 100)) + newline);
if (this.anim.wpn.rng > 0) {
item_stats_txt.text = item_stats_txt.text + (("Range: " + hero_ico.anim.wpn.rng) + newline);
}
item_stats_txt.text = item_stats_txt.text + (("Hit rate: " + hero_ico.anim.wpn.HIT) + "%\n");
item_stats_txt.text = item_stats_txt.text + (("Crit Rate: " + hero_ico.anim.wpn.CRIT) + "%\n");
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 2766 Button
on (release) {
_parent.openHeroStats();
}
Symbol 2767 Button
on (release) {
_parent.openCaptureTown();
}
Symbol 2768 Button
on (release) {
_parent.openGetQuest();
}
Symbol 2772 Button
on (release) {
_root.saveGame(1);
}
Symbol 2773 Button
on (release) {
_root.loadGame(1);
}
Symbol 2775 Button
on (release) {
_root.saveGame(2);
}
Symbol 2776 Button
on (release) {
_root.loadGame(2);
}
Symbol 2778 Button
on (release) {
_root.saveGame(3);
}
Symbol 2779 Button
on (release) {
_root.loadGame(3);
}
Symbol 2781 Button
on (release) {
_root.saveGame("auto");
}
Symbol 2782 Button
on (release) {
_root.loadGame("auto");
}
Symbol 2792 Button
on (release) {
_parent.openGetQuest();
}
Symbol 2794 Button
on (release) {
if (_global.QUEST.avatar_id < 0) {
_global.QUEST.aproveDeliver();
}
_parent.goBack();
}
Symbol 2796 Button
on (release) {
if (_global.MAIN_HERO.HORSE != null) {
_global.GOLD = _global.GOLD + Math.round(_global.MAIN_HERO.HORSE.price / 3);
_global.MAIN_HERO.HORSE = null;
_parent.barnShowTrader();
}
}
Symbol 2800 Button
on (press) {
if (_parent.scrollTrader > 0) {
_parent.scrollTrader--;
_parent.barnShowTrader();
}
}
Symbol 2801 Button
on (press) {
if (_parent.city.barracks.length > (_parent.scrollTrader + 8)) {
_parent.scrollTrader++;
_parent.barnShowTrader();
}
}
Symbol 2808 Button
on (rollOver) {
if (_global.MAIN_HERO.HORSE != null) {
unit_stats_txt.text = ("Hit Pionts bonus: " + _global.MAIN_HERO.HORSE.bonus_HP) + newline;
unit_stats_txt.text = unit_stats_txt.text + (("Defence bonus: " + _global.MAIN_HERO.HORSE.bonus_DEF) + newline);
unit_stats_txt.text = unit_stats_txt.text + (("Speed bonus: " + _global.MAIN_HERO.HORSE.bonus_speed) + "\n\n");
unit_stats_txt.text = unit_stats_txt.text + (("Cost " + _global.MAIN_HERO.HORSE.price) + " gp.");
}
}
Symbol 2812 Button
on (release) {
if (_global.SHIP_LOCATION == "none") {
if (_global.GOLD >= _global.SHIP_PRICE) {
_global.GOLD = _global.GOLD - _global.SHIP_PRICE;
_global.SHIP_LOCATION = _global.CURR_TOWN;
} else {
quest_txt.text = ("Not enough money!\n\nShips's price is " + _global.SHIP_PRICE) + " gp.";
}
} else {
_global.SAILING_SHIP = true;
_parent.leaveTown();
}
_parent.harborShow();
}
Symbol 2814 Button
on (release) {
_parent.enableAll();
gotoAndStop (1);
}
Symbol 2817 Button
on (release) {
_parent.startBattleForCity();
}
Symbol 2821 Button
on (release) {
_parent.startChallengeForCity(false);
}
Symbol 2823 Button
on (release) {
_parent.startChallengeForCity(true);
}
Symbol 2825 Button
on (release) {
_parent.enableAll();
gotoAndStop (1);
}
Symbol 2829 Button
on (release) {
_parent.startBattleForCity();
}
Symbol 2834 Button
on (release) {
_parent.addStatTo("STR");
}
Symbol 2865 Button
on (release) {
_parent.addStatTo("DEX");
}
Symbol 2866 Button
on (release) {
_parent.addStatTo("CON");
}
Symbol 2867 Button
on (release) {
_parent.addStatTo("SPR");
}
Symbol 2868 Button
on (release) {
if (_global.MAIN_HERO.stat_points >= 1) {
_global.MAIN_HERO.SKILL.Dual++;
_global.MAIN_HERO.stat_points--;
_parent.showStats();
}
}
Symbol 2869 Button
on (release) {
if (_global.MAIN_HERO.stat_points >= 1) {
_global.MAIN_HERO.SKILL.Sword++;
_global.MAIN_HERO.stat_points--;
_parent.showStats();
}
}
Symbol 2870 Button
on (release) {
if (_global.MAIN_HERO.stat_points >= 1) {
_global.MAIN_HERO.SKILL.Axe++;
_global.MAIN_HERO.stat_points--;
_parent.showStats();
}
}
Symbol 2871 Button
on (release) {
if (_global.MAIN_HERO.stat_points >= 1) {
_global.MAIN_HERO.SKILL.Mace++;
_global.MAIN_HERO.stat_points--;
_parent.showStats();
}
}
Symbol 2872 Button
on (release) {
if (_global.MAIN_HERO.stat_points >= 1) {
_global.MAIN_HERO.SKILL.Spear++;
_global.MAIN_HERO.stat_points--;
_parent.showStats();
}
}
Symbol 2873 Button
on (release) {
if (_global.MAIN_HERO.stat_points >= 1) {
_global.MAIN_HERO.SKILL.Dagger++;
_global.MAIN_HERO.stat_points--;
_parent.showStats();
}
}
Symbol 2874 Button
on (release) {
if (_global.MAIN_HERO.stat_points >= 1) {
_global.MAIN_HERO.SKILL.Staff++;
_global.MAIN_HERO.stat_points--;
_parent.showStats();
}
}
Symbol 2875 Button
on (release) {
if (_global.MAIN_HERO.stat_points >= 1) {
_global.MAIN_HERO.SKILL.FarEast++;
_global.MAIN_HERO.stat_points--;
_parent.showStats();
}
}
Symbol 2876 Button
on (release) {
if (_global.MAIN_HERO.stat_points >= 1) {
_global.MAIN_HERO.SKILL.Bow++;
_global.MAIN_HERO.stat_points--;
_parent.showStats();
}
}
Symbol 2877 Button
on (release) {
if (_global.MAIN_HERO.stat_points >= 1) {
_global.MAIN_HERO.SKILL.Crossbow++;
_global.MAIN_HERO.stat_points--;
_parent.showStats();
}
}
Symbol 2878 Button
on (release) {
if (_global.MAIN_HERO.stat_points >= 1) {
_global.MAIN_HERO.SKILL.Throwing++;
_global.MAIN_HERO.stat_points--;
_parent.showStats();
}
}
Symbol 2905 Button
on (release) {
if (_global.MAIN_HERO.stat_points >= 1) {
_global.MAIN_HERO.SKILL.Katar++;
_global.MAIN_HERO.stat_points--;
_parent.showStats();
}
}
Symbol 2911 Button
on (release) {
getURL ("http://www.arcadetown.com/downloads/Feudalism2SkillList.asp", "_blank");
}
Symbol 2912 Button
on (rollOver) {
_parent.showSmallDescr("Strength affects damage with melee weapons. It is required for using almost all swords, axes, spears and some throwing weapons and armor");
}
on (rollOut) {
_parent.removeDescription();
}
Symbol 2913 Button
on (rollOver) {
_parent.showSmallDescr("Dexterity affects damage with ranged weapons, dodge chance and attack speed. It is required for using lots weapons and even armor");
}
on (rollOut) {
_parent.removeDescription();
}
Symbol 2914 Button
on (rollOver) {
_parent.showSmallDescr("Constitution affects character's hit points (HP). It is required for using maces and the best types of armor");
}
on (rollOut) {
_parent.removeDescription();
}
Symbol 2915 Button
on (rollOver) {
_parent.showSmallDescr("Spirit affects character's spirit points (e.g SP or Mana). It isn't required for using any equipment, but high Spirit allows to use skills more often.");
}
on (rollOut) {
_parent.removeDescription();
}
Symbol 2916 Button
on (rollOver) {
_parent.showSmallDescr("Grants higher chance to hit an enemy with second weapon when fighting with weapons in both hands.");
}
on (rollOut) {
_parent.removeDescription();
}
Symbol 2917 Button
on (rollOver) {
_parent.showSmallDescr("Affects hit chance when fighting with one- and two handed swords.");
}
on (rollOut) {
_parent.removeDescription();
}
Symbol 2918 Button
on (rollOver) {
_parent.showSmallDescr("Affects hit chance when fighting with one- and two handed axes.");
}
on (rollOut) {
_parent.removeDescription();
}
Symbol 2919 Button
on (rollOver) {
_parent.showSmallDescr("Affects hit chance when fighting with one- and two handed maces.");
}
on (rollOut) {
_parent.removeDescription();
}
Symbol 2920 Button
on (rollOver) {
_parent.showSmallDescr("Affects hit chance when fighting with spears.");
}
on (rollOut) {
_parent.removeDescription();
}
Symbol 2921 Button
on (rollOver) {
_parent.showSmallDescr("Affects hit chance when fighting with daggers.");
}
on (rollOut) {
_parent.removeDescription();
}
Symbol 2922 Button
on (rollOver) {
_parent.showSmallDescr("Affects hit chance when fighting with katars.");
}
on (rollOut) {
_parent.removeDescription();
}
Symbol 2923 Button
on (rollOver) {
_parent.showSmallDescr("Affects hit chance when fighting with staffs.");
}
on (rollOut) {
_parent.removeDescription();
}
Symbol 2924 Button
on (rollOver) {
_parent.showSmallDescr("Affects hit chance when fighting with katanas and ninja-to.");
}
on (rollOut) {
_parent.removeDescription();
}
Symbol 2925 Button
on (rollOver) {
_parent.showSmallDescr("Affects hit chance when fighting with bows.");
}
on (rollOut) {
_parent.removeDescription();
}
Symbol 2926 Button
on (rollOver) {
_parent.showSmallDescr("Affects hit chance when fighting with crossbows.");
}
on (rollOut) {
_parent.removeDescription();
}
Symbol 2927 Button
on (rollOver) {
_parent.showSmallDescr("Affects hit chance when fighting with throwing weapons.");
}
on (rollOut) {
_parent.removeDescription();
}
Symbol 2928 MovieClip Frame 1
stop();
Symbol 2928 MovieClip Frame 2
_parent.storeShowTrader();
_parent.storeShowUser();
Instance of Symbol 2037 MovieClip in Symbol 2928 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
val = "STORE_DONT_ASK_AMOUNT";
}
Symbol 2928 MovieClip Frame 3
_parent.storeShowUser();
Symbol 2928 MovieClip Frame 4
potion_1_txt.text = _global.POTION_HealSmall;
potion_2_txt.text = _global.POTION_HealMedium;
potion_3_txt.text = _global.POTION_HealBig;
scroll_1_txt.text = _global.SCROLL_AllHealSmall;
scroll_2_txt.text = _global.SCROLL_AllHealBig;
scroll_3_txt.text = _global.SCROLL_Rage;
Symbol 2928 MovieClip Frame 5
_parent.barracksShowTrader();
_parent.barracksShowUser();
Symbol 2928 MovieClip Frame 6
_parent.inventoryShowUser();
_parent.inventoryShowStats();
hero_stats_txt.text = ((_global.MAIN_HERO.NAME + "\nLevel ") + _global.MAIN_HERO.LEVEL) + "\nexp: ";
hero_stats_txt.text = hero_stats_txt.text + ((_global.MAIN_HERO.EXP + "/") + Hero.getExpForLevel(_global.MAIN_HERO.LEVEL + 1));
hero_ico.enabled = false;
Symbol 2928 MovieClip Frame 8
man_movie.gotoAndStop(_parent.city.NATION);
Symbol 2928 MovieClip Frame 9
man_movie.gotoAndStop(_parent.city.NATION);
Symbol 2928 MovieClip Frame 10
_parent.barnShowTrader();
hero_stats_txt.text = (_global.MAIN_HERO.NAME + " lv. ") + _global.MAIN_HERO.LEVEL;
Symbol 2928 MovieClip Frame 12
man_movie.gotoAndStop(_parent.city.NATION);
Symbol 2928 MovieClip Frame 13
man_movie.gotoAndStop(_parent.city.NATION);
Symbol 2928 MovieClip Frame 14
man_movie.gotoAndStop(_parent.city.NATION);
Symbol 2928 MovieClip Frame 16
man_movie.gotoAndStop(_parent.city.NATION);
Instance of Symbol 337 MovieClip "active_1_ico_1" in Symbol 2928 MovieClip Frame 17
on (rollOver) {
_parent._parent.showActiveSkillDescription(1, 1);
}
on (rollOut) {
_parent._parent.removeDescription();
}
on (release) {
if (this.shade._currentframe != 1) {
_parent._parent.addPointToActiveSkill(1, 1);
}
}
Instance of Symbol 337 MovieClip "active_1_ico_2" in Symbol 2928 MovieClip Frame 17
on (rollOver) {
_parent._parent.showActiveSkillDescription(1, 2);
}
on (rollOut) {
_parent._parent.removeDescription();
}
on (release) {
if (this.shade._currentframe != 1) {
_parent._parent.addPointToActiveSkill(1, 2);
}
}
Instance of Symbol 337 MovieClip "active_1_ico_3" in Symbol 2928 MovieClip Frame 17
on (rollOver) {
_parent._parent.showActiveSkillDescription(1, 3);
}
on (rollOut) {
_parent._parent.removeDescription();
}
on (release) {
if (this.shade._currentframe != 1) {
_parent._parent.addPointToActiveSkill(1, 3);
}
}
Instance of Symbol 337 MovieClip "active_2_ico_1" in Symbol 2928 MovieClip Frame 17
on (rollOver) {
_parent._parent.showActiveSkillDescription(2, 1);
}
on (rollOut) {
_parent._parent.removeDescription();
}
on (release) {
if (this.shade._currentframe != 1) {
_parent._parent.addPointToActiveSkill(2, 1);
}
}
Instance of Symbol 337 MovieClip "active_2_ico_2" in Symbol 2928 MovieClip Frame 17
on (rollOver) {
_parent._parent.showActiveSkillDescription(2, 2);
}
on (rollOut) {
_parent._parent.removeDescription();
}
on (release) {
if (this.shade._currentframe != 1) {
_parent._parent.addPointToActiveSkill(2, 2);
}
}
Instance of Symbol 337 MovieClip "active_2_ico_3" in Symbol 2928 MovieClip Frame 17
on (rollOver) {
_parent._parent.showActiveSkillDescription(2, 3);
}
on (rollOut) {
_parent._parent.removeDescription();
}
on (release) {
if (this.shade._currentframe != 1) {
_parent._parent.addPointToActiveSkill(2, 3);
}
}
Instance of Symbol 337 MovieClip "active_3_ico_1" in Symbol 2928 MovieClip Frame 17
on (rollOver) {
_parent._parent.showActiveSkillDescription(3, 1);
}
on (rollOut) {
_parent._parent.removeDescription();
}
on (release) {
if (this.shade._currentframe != 1) {
_parent._parent.addPointToActiveSkill(3, 1);
}
}
Instance of Symbol 337 MovieClip "active_3_ico_2" in Symbol 2928 MovieClip Frame 17
on (rollOver) {
_parent._parent.showActiveSkillDescription(3, 2);
}
on (rollOut) {
_parent._parent.removeDescription();
}
on (release) {
if (this.shade._currentframe != 1) {
_parent._parent.addPointToActiveSkill(3, 2);
}
}
Instance of Symbol 337 MovieClip "active_3_ico_3" in Symbol 2928 MovieClip Frame 17
on (rollOver) {
_parent._parent.showActiveSkillDescription(3, 3);
}
on (rollOut) {
_parent._parent.removeDescription();
}
on (release) {
if (this.shade._currentframe != 1) {
_parent._parent.addPointToActiveSkill(3, 3);
}
}
Instance of Symbol 337 MovieClip "passive_1_ico_1" in Symbol 2928 MovieClip Frame 17
on (rollOver) {
_parent._parent.showPassiveSkillDescription(1, 1);
}
on (rollOut) {
_parent._parent.removeDescription();
}
on (release) {
if (this.shade._currentframe != 1) {
_parent._parent.addPointToPassiveSkill(1, 1);
}
}
Instance of Symbol 337 MovieClip "passive_1_ico_2" in Symbol 2928 MovieClip Frame 17
on (rollOver) {
_parent._parent.showPassiveSkillDescription(1, 2);
}
on (rollOut) {
_parent._parent.removeDescription();
}
on (release) {
if (this.shade._currentframe != 1) {
_parent._parent.addPointToPassiveSkill(1, 2);
}
}
Instance of Symbol 337 MovieClip "passive_1_ico_3" in Symbol 2928 MovieClip Frame 17
on (rollOver) {
_parent._parent.showPassiveSkillDescription(1, 3);
}
on (rollOut) {
_parent._parent.removeDescription();
}
on (release) {
if (this.shade._currentframe != 1) {
_parent._parent.addPointToPassiveSkill(1, 3);
}
}
Instance of Symbol 337 MovieClip "passive_2_ico_1" in Symbol 2928 MovieClip Frame 17
on (rollOver) {
_parent._parent.showPassiveSkillDescription(2, 1);
}
on (rollOut) {
_parent._parent.removeDescription();
}
on (release) {
if (this.shade._currentframe != 1) {
_parent._parent.addPointToPassiveSkill(2, 1);
}
}
Instance of Symbol 337 MovieClip "passive_2_ico_2" in Symbol 2928 MovieClip Frame 17
on (rollOver) {
_parent._parent.showPassiveSkillDescription(2, 2);
}
on (rollOut) {
_parent._parent.removeDescription();
}
on (release) {
if (this.shade._currentframe != 1) {
_parent._parent.addPointToPassiveSkill(2, 2);
}
}
Instance of Symbol 337 MovieClip "passive_2_ico_3" in Symbol 2928 MovieClip Frame 17
on (rollOver) {
_parent._parent.showPassiveSkillDescription(2, 3);
}
on (rollOut) {
_parent._parent.removeDescription();
}
on (release) {
if (this.shade._currentframe != 1) {
_parent._parent.addPointToPassiveSkill(2, 3);
}
}
Instance of Symbol 337 MovieClip "aura_ico_1" in Symbol 2928 MovieClip Frame 17
on (rollOver) {
_parent._parent.showAuraSkillDescription(1);
}
on (rollOut) {
_parent._parent.removeDescription();
}
on (release) {
if (this.shade._currentframe != 1) {
_parent._parent.addPointToAuraSkill(1);
}
}
Instance of Symbol 337 MovieClip "aura_ico_2" in Symbol 2928 MovieClip Frame 17
on (rollOver) {
_parent._parent.showAuraSkillDescription(2);
}
on (rollOut) {
_parent._parent.removeDescription();
}
on (release) {
if (this.shade._currentframe != 1) {
_parent._parent.addPointToAuraSkill(2);
}
}
Instance of Symbol 337 MovieClip "aura_ico_3" in Symbol 2928 MovieClip Frame 17
on (rollOver) {
_parent._parent.showAuraSkillDescription(3);
}
on (rollOut) {
_parent._parent.removeDescription();
}
on (release) {
if (this.shade._currentframe != 1) {
_parent._parent.addPointToAuraSkill(3);
}
}
Symbol 2932 Button
on (release) {
openHarbor();
}
Symbol 2935 Button
on (release) {
openBarracks();
}
Symbol 2936 Button
on (release) {
openCityHall();
}
Symbol 2938 Button
on (release) {
openForge();
}
Symbol 2939 Button
on (release) {
openTemple();
}
Symbol 2941 Button
on (release) {
openBarracks();
}
Symbol 2942 Button
on (release) {
openCityHall();
}
Symbol 2943 Button
on (release) {
openForge();
}
Symbol 2944 Button
on (release) {
openTemple();
}
Symbol 2948 Button
on (release) {
openBarracks();
}
Symbol 2950 Button
on (release) {
openCityHall();
}
Symbol 2951 Button
on (release) {
openForge();
}
Symbol 2952 Button
on (release) {
openTemple();
}
Symbol 2957 Button
on (release) {
openBarracks();
}
Symbol 2959 Button
on (release) {
openCityHall();
}
Symbol 2961 Button
on (release) {
openForge();
}
Symbol 2963 Button
on (release) {
openTemple();
}
Symbol 2967 Button
on (release) {
openBarracks();
}
Symbol 2969 Button
on (release) {
openCityHall();
}
Symbol 2971 Button
on (release) {
openForge();
}
Symbol 2973 Button
on (release) {
openTemple();
}
Symbol 2975 MovieClip [Cities] Frame 1
#initclip 175
Object.registerClass("Cities", Cities);
#endinitclip
Symbol 2983 Button
on (press) {
onMousePress();
}
on (rollOver) {
hideIcons();
}
Symbol 3018 MovieClip Frame 1
name_txt.text = WorldMap.getTownName(this._name);
Symbol 3020 MovieClip Frame 1
name_txt.text = WorldMap.getTownName(this._name);
Symbol 3022 MovieClip Frame 1
name_txt.text = WorldMap.getTownName(this._name);
Symbol 3024 MovieClip Frame 1
name_txt.text = WorldMap.getTownName(this._name);
Symbol 3026 MovieClip Frame 1
name_txt.text = WorldMap.getTownName(this._name);
Symbol 3029 MovieClip Frame 1
name_txt.text = WorldMap.getTownName(this._name);
Symbol 3031 MovieClip Frame 1
name_txt.text = WorldMap.getTownName(this._name);
Symbol 3033 MovieClip Frame 1
name_txt.text = WorldMap.getTownName(this._name);
Symbol 3035 MovieClip Frame 1
name_txt.text = WorldMap.getTownName(this._name);
Symbol 3037 MovieClip Frame 1
name_txt.text = WorldMap.getTownName(this._name);
Symbol 3039 MovieClip Frame 1
name_txt.text = WorldMap.getTownName(this._name);
Symbol 3041 MovieClip Frame 1
name_txt.text = WorldMap.getTownName(this._name);
Symbol 3045 MovieClip Frame 1
stop();
loops = 0;
Symbol 3045 MovieClip Frame 3
if (loops < 8) {
gotoAndPlay (2);
loops++;
} else {
gotoAndStop (1);
loops = 0;
}
Symbol 3048 MovieClip Frame 84
stop();
Symbol 3051 Button
on (release) {
gotoAndStop (1);
}
Symbol 3053 Button
on (release) {
_root.gotoAndStop(4);
}
Symbol 3055 MovieClip Frame 1
stop();
Symbol 3055 MovieClip Frame 2
sign.gotoAndStop(_global.MAIN_HERO.NATION);
play();
Symbol 3055 MovieClip Frame 85
stop();
Symbol 3057 MovieClip [WorldMap] Frame 1
#initclip 177
Object.registerClass("WorldMap", WorldMap);
#endinitclip
init();
Instance of Symbol 2987 MovieClip "landAra" in Symbol 3057 MovieClip [WorldMap] Frame 1
on (press) {
_parent.onMousePress();
}
on (rollOver) {
_parent.showIcon("Ara");
}
Instance of Symbol 2991 MovieClip "landViz" in Symbol 3057 MovieClip [WorldMap] Frame 1
on (press) {
_parent.onMousePress();
}
on (rollOver) {
_parent.showIcon("Viz");
}
Instance of Symbol 2995 MovieClip "landRus" in Symbol 3057 MovieClip [WorldMap] Frame 1
on (press) {
_parent.onMousePress();
}
on (rollOver) {
_parent.showIcon("Rus");
}
Instance of Symbol 3001 MovieClip "landMon" in Symbol 3057 MovieClip [WorldMap] Frame 1
on (press) {
_parent.onMousePress();
}
on (rollOver) {
_parent.showIcon("Mon");
}
Instance of Symbol 3006 MovieClip "landGer" in Symbol 3057 MovieClip [WorldMap] Frame 1
on (press) {
_parent.onMousePress();
}
on (rollOver) {
_parent.showIcon("Ger");
}
Instance of Symbol 3011 MovieClip "landJap" in Symbol 3057 MovieClip [WorldMap] Frame 1
on (press) {
_parent.onMousePress();
}
on (rollOver) {
_parent.showIcon("Jap");
}
Symbol 3066 MovieClip Frame 1
gotoAndStop(_root.d(12) + 1);
Symbol 3070 Button
on (release) {
_root.loadMap(_global.BATTLE_MAP);
}
Symbol 3076 MovieClip Frame 110
if (_global.BATTLE_TUTORIAL_PLAYED || (!_global.SHOW_HELP)) {
_root.loadMap(_global.BATTLE_MAP);
} else {
_root.gotoAndStop("BATTLE_TUT");
}
Symbol 3085 MovieClip Frame 1
hero.attachMovie(((_global.MAIN_HERO.HORSE == null) ? "Human" : "Horseman"), "anim", 1, {_x:0, _y:0});
hero.anim._xscale = 70;
hero.anim._yscale = 70;
hero.anim._x = 0;
hero.anim._y = 0;
hero.anim.onEnterFrame = null;
hero.anim.initUnit(_global.MAIN_HERO);
hero.anim.die();
Symbol 3085 MovieClip Frame 50
stop();
Symbol 3089 MovieClip Frame 1
gotoAndStop(_root.d(4) + 1);
Symbol 3094 Button
on (release) {
if ((_global.EXP_GOT == 0) && (_global.GOLD_GOT == 0)) {
if (_global.BATTLE_TYPE != "SIEGE") {
_root.gotoAndStop("WORLD_MAP");
} else {
var town = new Town(_global.CURR_TOWN);
if (town.adv_defenders.length > 0) {
town.getAdvDefenders();
_global.BATTLE_MAP = 84 + _root.d(4);
_global.BATTLE_TYPE = "THRONE_HALL";
_root.gotoAndStop("SPLASH_SCREEN");
} else {
_root.gotoAndStop("WORLD_MAP");
}
}
} else {
if (_global.MAIN_HERO.experience(_global.EXP_GOT)) {
fields.level_up.gotoAndPlay(2);
}
_global.EXP_GOT = 0;
_global.GOLD = _global.GOLD + _global.GOLD_GOT;
_global.GOLD_GOT = 0;
fields.exp_txt.text = (_global.MAIN_HERO.EXP + "/") + Hero.getExpForLevel(_global.MAIN_HERO.LEVEL + 1);
fields.gold_txt.text = _global.GOLD + " gp.";
}
}
Symbol 3111 MovieClip Frame 1
stop();
Symbol 3119 Button
on (release) {
getURL ("mailto:zaborov@mail.ru", "_blank");
}
Symbol 3125 Button
on (release) {
endTutorial();
}
Symbol 3126 Button
on (release) {
endTutorial();
}
Symbol 3128 MovieClip [TutorialBattle] Frame 1
#initclip 178
Object.registerClass("TutorialBattle", Tutorial);
#endinitclip
stop();