Frame 1
function getNationNumber(nation) {
return(NATION_NUMBER[nation.toLowerCase()]);
}
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(dice) {
return(Math.floor(Math.random() * dice) + 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, dm, rn, cr, xscl_mod, wpn_frame, tm) {
var _local7 = (wpn_frame == 134) || (wpn_frame == 135);
var _local6 = (wpn_frame >= 126) && (wpn_frame <= 140);
var _local2 = getDepthMan(fx, fy);
_root.attachMovie((_local7 ? "Grenade" : "Arrow"), "gr_" + _local2, _local2 + 2, {_x:stgX(fx), _y:stgY(fy), X:fx, Y:fy, dstX:tx, dstY:ty, dmg:dm, rnd:rn, crit:cr});
if (_local6) {
_root["gr_" + _local2].gren.gotoAndStop(wpn_frame);
_root["gr_" + _local2].play();
} else {
_root["gr_" + _local2].gotoAndStop(10);
}
_root["gr_" + _local2].team = tm;
_root["gr_" + _local2]._xscale = _root["gr_" + _local2]._xscale * xscl_mod;
}
function addArrowShower(fx, fy, dm, cr) {
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(dm, cr);
}
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 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) {
if (!item) {
return(undefined);
}
var _local4;
if (item instanceof WeaponClass) {
_local4 = "WeaponClass";
} else if (item instanceof Armor) {
_local4 = "Armor";
}
var _local1 = 0;
while (_local1 < array.length) {
if (((((item.ENCH_ID == array[_local1].ENCH_ID) && (array[_local1].CATEGORY == _local4)) && (array[_local1].NATION == item.NATION)) && (array[_local1].TYPE == item.TYPE)) && (array[_local1].LEVEL == item.LEVEL)) {
array[_local1].COUNT++;
return(undefined);
}
_local1++;
}
array.push(new ItemInfo(_local4, item.TYPE, item.NATION, item.LEVEL, item.ENCH_ID));
}
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].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].team == 0)) {
if (_root["hero" + _local6].unit_ref != undefined) {
_global.FRIENDS.unshift(_root["hero" + _local6].unit_ref);
}
}
_root["hero" + _local6].removeMovieClip();
_local6--;
}
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;
_root.scr.removeMovieClip();
_root.attachMovie("ArrowCursor", "_cursor", 7001, {_x:_xmouse, _y:_ymouse});
_root._quality = "HIGH";
}
function commandAI() {
var _local2 = getTeamCount(0);
if (MAX_UNIT_AMOUNT > _local2) {
if (FRIENDS.length > 0) {
reinforceUnit(FRIENDS.shift(), 0);
_root.scr.reinitArrowStorm();
}
}
_local2 = getTeamCount(1);
if (MAX_UNIT_AMOUNT > _local2) {
if (ENEMIES.length > 0) {
reinforceUnit(ENEMIES.shift(), 1);
} else if (_local2 == 0) {
unloadMap();
_root.gotoAndStop("VICTORY");
return(undefined);
}
}
}
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 buyUnitXY(un, xx, yy) {
if ((((((un == "ScottishLightChivalery") || (un == "ScottishHussar")) || (un == "ScottishMountedGrenader")) || (un == "EnglishHussar")) || (un == "EnglishDragoon")) || (un == "EnglishHeavyChivalery")) {
addHorseman(stgX(xx), stgY(yy), un, 1);
} else {
addSoldier(stgX(xx), stgY(yy), un, 1);
}
}
function saveGame(slot) {
var _local3 = SharedObject.getLocal("Feudalism_Save_" + slot);
_local3.data.FRIENDS = new Array();
var _local4 = 0;
while (_local4 < _global.FRIENDS.length) {
if (_global.FRIENDS[_local4]) {
_local3.data.FRIENDS[_local4] = _global.FRIENDS[_local4].getUnitInfo();
}
_local4++;
}
_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.INT = _global.MAIN_HERO.INT;
_local3.data.MAIN_HERO.free_points = _global.MAIN_HERO.free_points;
_local3.data.MAIN_HERO.SKILL = new Array();
for (_local4 in _global.MAIN_HERO.SKILL) {
_local3.data.MAIN_HERO.SKILL[_local4] = _global.MAIN_HERO.SKILL[_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 = new Array();
_local4 = 0;
while (_local4 < _global.INVENTORY.length) {
_local3.data.INVENTORY[_local4] = _global.INVENTORY[_local4];
_local4++;
}
_local3.data.IS_CAPTURED = new Array();
for (var _local5 in _global.IS_CAPTURED) {
_local3.data.IS_CAPTURED[_local5] = _global.IS_CAPTURED[_local5];
}
_local3.data.IS_HOSTILE = new Array();
for (var _local5 in _global.IS_HOSTILE) {
_local3.data.IS_HOSTILE[_local5] = _global.IS_HOSTILE[_local5];
}
_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.flush(32768);
_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].TYPE, _local3.data.FRIENDS[_local4].NATION, _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;
_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.INT = _local3.data.MAIN_HERO.INT;
_global.MAIN_HERO.free_points = _local3.data.MAIN_HERO.free_points;
for (_local4 in _local3.data.MAIN_HERO.SKILL) {
_global.MAIN_HERO.SKILL[_local4] = _local3.data.MAIN_HERO.SKILL[_local4];
}
_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)) : 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)) : 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)) : 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)) : 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);
_global.INVENTORY[_local4].COUNT = _local3.data.INVENTORY[_local4].COUNT;
_local4++;
}
_global.IS_CAPTURED = new Array();
for (var _local5 in _local3.data.IS_CAPTURED) {
_global.IS_CAPTURED[_local5] = _local3.data.IS_CAPTURED[_local5];
}
_global.IS_HOSTILE = new Array();
for (var _local5 in _local3.data.IS_HOSTILE) {
_global.IS_HOSTILE[_local5] = _local3.data.IS_HOSTILE[_local5];
}
_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;
_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 = 4000;
_global.BATTLE_MAP = 45;
_global.MIN_ATTACK_TIME = new Array();
_global.MIN_ATTACK_TIME.sword = 30;
_global.MIN_ATTACK_TIME.twohanded_sword = 40;
_global.MIN_ATTACK_TIME.twohanded_axe = 40;
_global.MIN_ATTACK_TIME.double = 30;
_global.MIN_ATTACK_TIME.spear = 30;
_global.MIN_ATTACK_TIME.bow = 40;
_global.MIN_ATTACK_TIME.crossbow = 60;
_global.MIN_ATTACK_TIME.dagger = 20;
_global.MIN_ATTACK_TIME.katana = 25;
_global.MIN_ATTACK_TIME.staff = 35;
_global.MIN_ATTACK_TIME.fists = 35;
_global.MIN_ATTACK_TIME.suriken = 30;
NATION_NUMBER = new Array();
NATION_NUMBER.rog = 0;
NATION_NUMBER.viz = 1;
NATION_NUMBER.ger = 2;
NATION_NUMBER.rus = 3;
NATION_NUMBER.jap = 4;
_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.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;
delete _global.DISABLED_UNITS;
_global.DISABLED_UNITS = new Array();
};
gameLoad = function (map) {
unloadMap();
_root.WhatToLoad = map;
};
_root.onEnterFrame = function () {
if (_global.times >= 30) {
_global.times = 0;
if (_root.hero0 != undefined) {
commandAI();
}
} else {
_global.times++;
}
};
fscommand ("trapallkeys", true);
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;
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);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&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__("7cde74e8", this, 10301, true);
Frame 2
Frame 3
_global.IS_CAPTURED = new Array();
_global.IS_CAPTURED.Trapezus = false;
_global.IS_CAPTURED.Lutetia = false;
_global.IS_CAPTURED.Arretium = false;
_global.IS_CAPTURED.Ravenna = false;
_global.IS_CAPTURED.Lacrimosa = false;
_global.IS_CAPTURED.Caesaria = false;
_global.IS_CAPTURED.Carthage = false;
_global.IS_CAPTURED.Alexandria = false;
_global.IS_CAPTURED.Jana = false;
_global.IS_CAPTURED.Konstanz = false;
_global.IS_CAPTURED.Gerlitz = false;
_global.IS_CAPTURED.Sturmburg = false;
_global.IS_CAPTURED.Hoffen = false;
_global.IS_CAPTURED.Endem = false;
_global.IS_CAPTURED.Braunburg = false;
_global.IS_CAPTURED.Wanderburg = false;
_global.IS_CAPTURED.Dubkee = false;
_global.IS_CAPTURED.Dalnevodye = false;
_global.IS_CAPTURED.Losevo = false;
_global.IS_CAPTURED.Dobrov = false;
_global.IS_CAPTURED.Zlatograd = false;
_global.IS_CAPTURED.Medvedevo = false;
_global.IS_CAPTURED.Grouzeno = false;
_global.IS_CAPTURED.RaGorod = false;
_global.IS_CAPTURED.Omi = false;
_global.IS_CAPTURED.Kozuke = false;
_global.IS_CAPTURED.Matsuyama = false;
_global.IS_CAPTURED.Fukushima = false;
_global.IS_CAPTURED.Izumo = false;
_global.IS_CAPTURED.Suo = false;
_global.IS_CAPTURED.Nagoya = false;
_global.IS_CAPTURED.Echigo = 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.QUEST = new Quest();
_global.LOOT = new Array();
_global.INVENTORY = new Array();
_global.BATTLE_TUTORIAL_PLAYED = false;
_global.STORE_DONT_ASK_AMOUNT = false;
Frame 4
loadDefaults();
_global.ENEMIES = new Array();
_global.FRIENDS = new Array();
stop();
Frame 5
stop();
setAll();
Instance of Symbol 1495 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 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 0;
tm = 1;
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 1;
tm = 1;
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 2;
tm = 1;
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 3;
tm = 1;
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 4;
tm = 1;
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 0;
tm = 0;
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 1;
tm = 0;
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 2;
tm = 0;
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 3;
tm = 0;
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 4;
tm = 0;
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 6;
tm = 1;
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 7;
tm = 1;
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 8;
tm = 1;
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 9;
tm = 1;
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "ENEMIES";
num = 10;
tm = 1;
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 6;
tm = 0;
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 7;
tm = 0;
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 8;
tm = 0;
}
Instance of Symbol 1499 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
tp = "Swordsman";
sq = "Player";
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 9;
tm = 0;
}
Instance of Symbol 1497 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
arr = "FRIENDS";
num = 10;
tm = 0;
}
Frame 88
_root.loadMap(WhatToLoad);
Frame 89
stop();
Frame 90
_root.loot_txt.text = "";
var i = 0;
while (i < _global.LOOT.length) {
_root.addItemInfoTo(_global.INVENTORY, _global.LOOT[i]);
switch (_global.LOOT[i].CATEGORY) {
case "WeaponClass" :
var temp_item = new WeaponClass(_global.LOOT[i].TYPE, _global.LOOT[i].NATION, _global.LOOT[i].LEVEL);
break;
case "Armor" :
var temp_item = new Armor(_global.LOOT[i].TYPE, _global.LOOT[i].NATION, _global.LOOT[i].LEVEL);
}
_root.loot_txt.text = _root.loot_txt.text + (((temp_item.NAME + " x") + _global.LOOT[i].COUNT) + newline);
i++;
}
Instance of Symbol 2035 MovieClip "fields" in Frame 90
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 + "/") + _global.MAIN_HERO.EXP_FOR_LEVELS[_global.MAIN_HERO.LEVEL + 1];
_global.EXP_GOT--;
}
}
Symbol 39 MovieClip [BarnUnit] Frame 1
#initclip 30
Object.registerClass("BarnUnit", BarnIcon);
#endinitclip
Symbol 43 MovieClip [BlackSquare] Frame 1
stop();
Symbol 48 MovieClip [FlyCritDamage] Frame 25
this.removeMovieClip();
Symbol 58 MovieClip Frame 1
this.onEnterFrame = function () {
var _local4 = _root.getBytesLoaded() / _root.getBytesTotal();
this.bar._xscale = _local4 * 100;
this.percent_txt.text = Math.floor(_local4 * 100) + " %";
if (_local4 >= 1) {
_parent.nextFrame();
}
};
Symbol 61 Button
on (release) {
_parent._parent.play();
}
Symbol 78 MovieClip Frame 54
Symbol 78 MovieClip Frame 100
_parent._parent.play();
Symbol 128 MovieClip Frame 40
stop();
Symbol 129 MovieClip Frame 1
function onEnterFrame() {
if (!loaded) {
var _local5 = _root.getBytesLoaded() / _root.getBytesTotal();
if (_local5 >= 1) {
if (firstframe) {
_parent.nextFrame();
} else {
this.play();
bar._x = initX;
}
loaded = true;
} else {
bar._x = initX + ((_local5 - 1) * bar._width);
}
}
var _local6 = getTimer() - time;
timeAccum = timeAccum + _local6;
while (timeAccum >= FRAME_TIME) {
var _local4 = 0;
while (_local4 < timeClips.length) {
if (timeClips[_local4]._currentframe < timeClips[_local4]._totalframes) {
timeClips[_local4].nextFrame();
} else {
timeClips[_local4].gotoAndStop(1);
}
_local4++;
}
if (loaded && (_currentframe < _totalframes)) {
nextFrame();
}
timeAccum = timeAccum - FRAME_TIME;
}
time = time + _local6;
firstframe = false;
}
stop();
var initX = bar._x;
var time = getTimer();
var FRAME_TIME = 33.3333333333333;
var timeAccum = 0;
var firstframe = true;
var loaded = false;
timeClips = [bargfx, tank.mc0, tank.mc1, tank.mc2, tank.mc3, tank.mc4, tank.mc4.mc0, tank.mc4.mc1, tank.mc4.mc0.mc0, tank.mc4.mc0.mc0.mc0.mc0, tank.mc4.mc0.mc0.mc0.mc1, tank.mc4.mc0.mc0.mc0.mc2, tank.mc4.mc0.mc0.mc0.mc3, tank.mc4.mc0.mc0.mc1, tank.mc4.mc0.mc0.mc2, tank.mc5.mc0];
var i = 0;
while (i < timeClips.length) {
timeClips[i].stop();
i++;
}
Symbol 129 MovieClip Frame 41
_parent.nextFrame();
Symbol 139 MovieClip Frame 100
_parent._parent.play();
Symbol 140 MovieClip Frame 1
_root.stop();
if (_url.toLowerCase().indexOf("uploads.ungrounded.net") >= 0) {
gotoAndStop ("NG");
} else {
stop();
}
Symbol 2050 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) * 100) * 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 = 200 + (50 * _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(["Trapezus", "Lutetia", "Arretium", "Ravenna", "Lacrimosa", "Caesaria", "Carthage", "Alexandria"]));
case "Ger" :
return(anyOf(["Jana", "Konstanz", "Gerlitz", "Sturmburg", "Hoffen", "Endem", "Braunburg", "Wanderburg"]));
case "Rus" :
return(anyOf(["Dubkee", "Dalnevodye", "Losevo", "Dobrov", "Zlatograd", "Medvedevo", "Grouzeno", "RaGorod"]));
case "Jap" :
return(anyOf(["Omi", "Kozuke", "Matsuyama", "Fukushima", "Izumo", "Suo", "Nagoya", "Echigo"]));
}
}
function getQuestAvatarID(city_id) {
switch (city_id) {
case "Trapezus" :
case "Lutetia" :
case "Arretium" :
case "Ravenna" :
return(anyOf([8, 9, 10]));
case "Lacrimosa" :
case "Caesaria" :
return(11);
case "Carthage" :
case "Alexandria" :
return(anyOf([8, 9, 10]));
case "Jana" :
case "Konstanz" :
return(anyOf([1, 7, 8]));
case "Gerlitz" :
case "Sturmburg" :
return(anyOf([1, 2, 3, 5]));
case "Hoffen" :
case "Endem" :
return(0);
case "Braunburg" :
return(anyOf([1, 2, 3, 5]));
case "Wanderburg" :
return(0);
case "Dubkee" :
case "Dalnevodye" :
case "Losevo" :
case "Dobrov" :
case "Zlatograd" :
return(anyOf([2, 5, 6, 7]));
case "Medvedevo" :
case "Grouzeno" :
return(4);
case "RaGorod" :
return(anyOf([2, 3, 5, 6, 7]));
case "Omi" :
case "Kozuke" :
case "Matsuyama" :
return(anyOf([12, 13]));
case "Fukushima" :
return(anyOf([5, 6]));
case "Izumo" :
return(anyOf([12, 13]));
case "Suo" :
return(11);
case "Nagoya" :
case "Echigo" :
return(14);
}
}
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("Melee", "Rog", 0);
_local3.NAME = "Quest Melee Rogue";
var _local4 = Math.max(Math.max(_global.MAIN_HERO.STR, _global.MAIN_HERO.DEX), Math.max(_global.MAIN_HERO.CON, _global.MAIN_HERO.INT));
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;
}
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("Ranged", "Rog", 0);
_local3.NAME = "Quest Ranged Rogue";
var _local4 = Math.max(Math.max(_global.MAIN_HERO.STR, _global.MAIN_HERO.DEX), Math.max(_global.MAIN_HERO.CON, _global.MAIN_HERO.INT));
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 / 25));
_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));
}
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 2051 MovieClip [__Packages.Hero] Frame 0
class Hero extends Object
{
var LEVEL, EXP, free_points, SKILL, EXP_FOR_LEVELS, HORSE, WEAPON_PRI, WEAPON_SEC;
function Hero () {
super();
LEVEL = 0;
EXP = 0;
free_points = 25;
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.Fist = 0;
SKILL.Bow = 0;
SKILL.Crossbow = 0;
SKILL.Throwing = 0;
SKILL.Patriotism = 0;
SKILL.ArtOfWar = 0;
EXP_FOR_LEVELS = new Array();
EXP_FOR_LEVELS[0] = -1;
EXP_FOR_LEVELS[1] = 0;
EXP_FOR_LEVELS[2] = 100;
EXP_FOR_LEVELS[3] = 250;
EXP_FOR_LEVELS[4] = 500;
EXP_FOR_LEVELS[5] = 800;
EXP_FOR_LEVELS[6] = 1200;
EXP_FOR_LEVELS[7] = 1600;
EXP_FOR_LEVELS[8] = 2000;
EXP_FOR_LEVELS[9] = 2500;
EXP_FOR_LEVELS[10] = 3000;
EXP_FOR_LEVELS[11] = 3600;
EXP_FOR_LEVELS[12] = 4200;
EXP_FOR_LEVELS[13] = 4800;
EXP_FOR_LEVELS[14] = 5500;
EXP_FOR_LEVELS[15] = 6200;
EXP_FOR_LEVELS[16] = 7000;
EXP_FOR_LEVELS[17] = 7800;
EXP_FOR_LEVELS[18] = 8700;
EXP_FOR_LEVELS[19] = 9700;
EXP_FOR_LEVELS[20] = 10800;
EXP_FOR_LEVELS[21] = 12000;
EXP_FOR_LEVELS[22] = 13400;
EXP_FOR_LEVELS[23] = 15000;
EXP_FOR_LEVELS[24] = 17000;
EXP_FOR_LEVELS[25] = 19500;
EXP_FOR_LEVELS[26] = 22000;
EXP_FOR_LEVELS[27] = 25000;
EXP_FOR_LEVELS[28] = 29000;
EXP_FOR_LEVELS[29] = 34000;
EXP_FOR_LEVELS[40] = 39000;
EXP_FOR_LEVELS[41] = 45000;
EXP_FOR_LEVELS[42] = 50000;
EXP_FOR_LEVELS[43] = 55000;
EXP_FOR_LEVELS[44] = 61000;
EXP_FOR_LEVELS[45] = 67000 /* 0x0105B8 */;
EXP_FOR_LEVELS[46] = 74000 /* 0x012110 */;
EXP_FOR_LEVELS[47] = 81000 /* 0x013C68 */;
EXP_FOR_LEVELS[48] = 88000 /* 0x0157C0 */;
EXP_FOR_LEVELS[49] = 95000 /* 0x017318 */;
EXP_FOR_LEVELS[50] = 100000 /* 0x0186A0 */;
EXP_FOR_LEVELS[51] = 0;
}
function experience(xp) {
EXP = EXP + xp;
var _local2 = false;
while ((LEVEL < 50) && (EXP >= EXP_FOR_LEVELS[LEVEL + 1])) {
LEVEL++;
free_points = free_points + 25;
_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"))) || (((slot == "WEAPON_PRI") || (slot == "WEAPON_SEC")) && ((item_info.TYPE == "Clothes") || (item_info.TYPE == "Helmet")))) {
return("Cant't eqiup armor 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 "Katana" :
case "NinjaTo" :
case "Dagger" :
case "Staff" :
return("This weapon isn't designed for fighting from a horse!");
}
if ((((slot == "WEAPON_SEC") && (_local2.TYPE != "Shield")) && (!_local2.twohanded)) && (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].twohanded)) {
return("It's impossible to use shield with a twohanded weapon!");
}
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.twohanded || (this[_local4].twohanded))) {
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 "Staff" :
return("My weapon isn't designed for fighting from a horse!");
}
switch (WEAPON_SEC.TYPE) {
case "Katana" :
case "NinjaTo" :
case "Dagger" :
case "Staff" :
return("My weapon isn't designed for fighting from a horse!");
}
if ((WEAPON_SEC.TYPE != "Shield") && (!(WEAPON_SEC.twohanded || (WEAPON_PRI.twohanded)))) {
return("I can't fight with dual weapons from a horse!");
}
HORSE = horse;
return("OK");
}
}
Symbol 2052 MovieClip [__Packages.Item] Frame 0
class Item extends Object
{
var ENCH_ID, NAME, price, NATION, TYPE, LEVEL, FRAME;
function Item () {
super();
}
function initEnchant(ei) {
if (ei) {
var _local2 = new Enchant(ei);
ENCH_ID = ei;
NAME = NAME + _local2.suffix;
NAME = _local2.prefix + NAME;
price = Math.round(price * _local2.price_bonus);
} else {
ENCH_ID = 0;
}
}
function getFrame() {
var _local3 = _root.getNationNumber(NATION) - 1;
var _local4 = NATION == "Rog";
switch (TYPE) {
case "OnehandedSword" :
return((_local4 ? (0 + LEVEL) : ((2 + LEVEL) + (_local3 * 5))));
case "TwohandedSword" :
return((_local4 ? (17 + LEVEL) : ((19 + LEVEL) + (_local3 * 5))));
case "OnehandedAxe" :
return((_local4 ? (34 + LEVEL) : ((36 + LEVEL) + (_local3 * 4))));
case "TwohandedAxe" :
return((_local4 ? (48 + LEVEL) : ((50 + LEVEL) + (_local3 * 4))));
case "OnehandedMace" :
return((_local4 ? (62 + LEVEL) : ((64 + LEVEL) + (_local3 * 4))));
case "TwohandedMace" :
return((_local4 ? (76 + LEVEL) : ((78 + LEVEL) + (_local3 * 4))));
case "Staff" :
return(90 + LEVEL);
case "NinjaTo" :
return((_local4 ? (96 + LEVEL) : (98 + LEVEL)));
case "Katana" :
return((_local4 ? (104 + LEVEL) : (106 + LEVEL)));
case "Spear" :
return((112 + LEVEL) + (_local3 * 3));
case "Dagger" :
return(121 + LEVEL);
case "Throwing" :
switch (NATION) {
case "Viz" :
return(133 + LEVEL);
case "Ger" :
return(125 + LEVEL);
case "Rus" :
return(129 + LEVEL);
case "Jap" :
return(135 + LEVEL);
return((140 + LEVEL) + (_local3 * 2));
return((150 + LEVEL) + (_local3 * 3));
return((159 + LEVEL) + (_local3 * 3));
return((_local3 + 1) + ((LEVEL - 1) * 4));
return((_local3 + 1) + ((LEVEL - 1) * 4));
return(LEVEL);
}
case "Bow" :
return((140 + LEVEL) + (_local3 * 2));
case "Shield" :
return((150 + LEVEL) + (_local3 * 3));
case "Crossbow" :
return((159 + LEVEL) + (_local3 * 3));
case "Clothes" :
return((_local3 + 1) + ((LEVEL - 1) * 4));
case "Helmet" :
return((_local3 + 1) + ((LEVEL - 1) * 4));
default :
return(LEVEL);
}
}
function getIconFrame() {
var _local2 = 0;
switch (TYPE) {
case "Clothes" :
_local2 = 168;
break;
case "Helmet" :
_local2 = 192;
}
return(_local2 + FRAME);
}
function getItemInfo() {
var _local2 = "";
switch (TYPE) {
case "Clothes" :
case "Helmet" :
_local2 = "Armor";
break;
default :
_local2 = "WeaponClass";
}
return(new ItemInfo(_local2, TYPE, NATION, LEVEL, ENCH_ID));
}
}
Symbol 2053 MovieClip [__Packages.Enchant] Frame 0
class Enchant extends Object
{
var wpn_bonus, wpn_amount, hero_bonus, hero_amount, ID, prefix, suffix, price_bonus;
function Enchant (en_id) {
super();
wpn_bonus = new Array();
wpn_amount = new Array();
hero_bonus = new Array();
hero_amount = new Array();
ID = en_id;
this["init" + en_id]();
}
function init1() {
prefix = "Piercing ";
suffix = "";
wpn_bonus.push("HIT");
wpn_amount.push(10);
price_bonus = 1.2;
}
function init2() {
prefix = "Bloody ";
suffix = "";
wpn_bonus.push("CRIT");
wpn_amount.push(10);
price_bonus = 1.2;
}
function init3() {
prefix = "Bleeding ";
suffix = "";
wpn_bonus.push("CRIT");
wpn_amount.push(20);
price_bonus = 1.5;
}
function init4() {
prefix = "";
suffix = " of Massacre";
wpn_bonus.push("CRIT");
wpn_amount.push(10);
wpn_bonus.push("rnd");
wpn_amount.push(20);
price_bonus = 2;
}
function init5() {
prefix = "Creeping ";
suffix = "";
wpn_bonus.push("CRIT");
wpn_amount.push(30);
hero_bonus.push("FLEE");
hero_amount.push(0.8);
price_bonus = 3;
}
function init6() {
prefix = "Strong ";
suffix = "";
wpn_bonus.push("dmg");
wpn_amount.push(20);
hero_bonus.push("MAX_HP");
hero_amount.push(1.2);
price_bonus = 2;
}
function init7() {
prefix = "Cursed ";
suffix = "";
wpn_bonus.push("dmg");
wpn_amount.push(-5);
wpn_bonus.push("CRIT");
wpn_amount.push(30);
hero_bonus.push("MAX_HP");
hero_amount.push(0.5);
price_bonus = 0.5;
}
function init8() {
prefix = "Undead ";
suffix = "";
wpn_bonus.push("dmg");
wpn_amount.push(20);
wpn_bonus.push("rnd");
wpn_amount.push(50);
hero_bonus.push("MAX_HP");
hero_amount.push(0.7);
hero_bonus.push("DEF");
hero_amount.push(0.5);
price_bonus = 2.2;
}
function init9() {
prefix = "Unholy ";
suffix = "";
wpn_bonus.push("dmg");
wpn_amount.push(100);
wpn_bonus.push("rnd");
wpn_amount.push(200);
hero_bonus.push("MAX_HP");
hero_amount.push(0.1);
hero_bonus.push("DEF");
hero_amount.push(2.5);
hero_bonus.push("FLEE");
hero_amount.push(0.01);
price_bonus = 10;
}
function init10() {
prefix = "Great ";
suffix = "";
wpn_bonus.push("dmg");
wpn_amount.push(20);
wpn_bonus.push("rnd");
wpn_amount.push(30);
hero_bonus.push("MAX_HP");
hero_amount.push(1.2);
hero_bonus.push("DEF");
hero_amount.push(1.1);
hero_bonus.push("FLEE");
hero_amount.push(1.02);
price_bonus = 2.5;
}
function init11() {
prefix = "Glorious ";
suffix = " of Sacrifice";
wpn_bonus.push("dmg");
wpn_amount.push(50);
wpn_bonus.push("rnd");
wpn_amount.push(300);
hero_bonus.push("MAX_HP");
hero_amount.push(0.5);
hero_bonus.push("DEF");
hero_amount.push(0.5);
hero_bonus.push("FLEE");
hero_amount.push(0.8);
price_bonus = 5.5;
}
function init12() {
prefix = "Glorious ";
suffix = " of Comassion";
wpn_bonus.push("HIT");
wpn_amount.push(-15);
hero_bonus.push("MAX_HP");
hero_amount.push(2);
hero_bonus.push("DEF");
hero_amount.push(1.2);
hero_bonus.push("FLEE");
hero_amount.push(1.04);
price_bonus = 5.1;
}
function init13() {
prefix = "Glorious ";
suffix = " of Valor";
wpn_bonus.push("dmg");
wpn_amount.push(50);
wpn_bonus.push("rnd");
wpn_amount.push(50);
hero_bonus.push("DEF");
hero_amount.push(1.5);
hero_bonus.push("FLEE");
hero_amount.push(0.3);
price_bonus = 4.3;
}
function init14() {
prefix = "Immortal ";
suffix = "";
wpn_bonus.push("dmg");
wpn_amount.push(-5);
wpn_bonus.push("rnd");
wpn_amount.push(-10);
wpn_bonus.push("HIT");
wpn_amount.push(-20);
wpn_bonus.push("CRIT");
wpn_amount.push(-10);
hero_bonus.push("MAX_HP");
hero_amount.push(3);
hero_bonus.push("DEF");
hero_amount.push(2);
price_bonus = 10;
}
function init15() {
prefix = "Mysterious ";
suffix = " of Death";
wpn_bonus.push("rnd");
wpn_amount.push(1000);
wpn_bonus.push("CRIT");
wpn_amount.push(90);
wpn_bonus.push("HIT");
wpn_amount.push(100);
hero_bonus.push("DEF");
hero_amount.push(0);
hero_bonus.push("FLEE");
hero_amount.push(0);
hero_bonus.push("MAX_HP");
hero_amount.push(0.2);
price_bonus = 12;
}
function init16() {
prefix = "Marksman's ";
suffix = "";
wpn_bonus.push("HIT");
wpn_amount.push(5);
price_bonus = 1.05;
}
function init17() {
prefix = "Lucky ";
suffix = "";
wpn_bonus.push("rnd");
wpn_amount.push(20);
wpn_bonus.push("CRIT");
wpn_amount.push(20);
wpn_bonus.push("HIT");
wpn_amount.push(20);
price_bonus = 1.8;
}
function init18() {
prefix = "Sleeping ";
suffix = "";
wpn_bonus.push("rnd");
wpn_amount.push(50);
wpn_bonus.push("CRIT");
wpn_amount.push(-5);
wpn_bonus.push("HIT");
wpn_amount.push(-5);
hero_bonus.push("DEF");
hero_amount.push(1.3);
hero_bonus.push("FLEE");
hero_amount.push(0.9);
hero_bonus.push("MAX_HP");
hero_amount.push(1.3);
price_bonus = 2;
}
function init19() {
prefix = "Suffering ";
suffix = "";
wpn_bonus.push("dmg");
wpn_amount.push(50);
wpn_bonus.push("CRIT");
wpn_amount.push(30);
wpn_bonus.push("HIT");
wpn_amount.push(30);
hero_bonus.push("DEF");
hero_amount.push(0.7);
hero_bonus.push("FLEE");
hero_amount.push(1.02);
hero_bonus.push("MAX_HP");
hero_amount.push(0.7);
price_bonus = 2;
}
function init20() {
prefix = "Blind ";
suffix = "";
wpn_bonus.push("dmg");
wpn_amount.push(30);
wpn_bonus.push("rnd");
wpn_amount.push(50);
wpn_bonus.push("CRIT");
wpn_amount.push(20);
wpn_bonus.push("HIT");
wpn_amount.push(-10);
hero_bonus.push("DEF");
hero_amount.push(1.5);
hero_bonus.push("FLEE");
hero_amount.push(0.7);
price_bonus = 2.4;
}
function init21() {
prefix = "Blind ";
suffix = " of Rage";
wpn_bonus.push("dmg");
wpn_amount.push(60);
wpn_bonus.push("rnd");
wpn_amount.push(100);
wpn_bonus.push("CRIT");
wpn_amount.push(40);
wpn_bonus.push("HIT");
wpn_amount.push(-30);
hero_bonus.push("DEF");
hero_amount.push(1.8);
hero_bonus.push("FLEE");
hero_amount.push(0.4);
price_bonus = 4.4;
}
function init22() {
prefix = "Breaking ";
suffix = "";
wpn_bonus.push("CRIT");
wpn_amount.push(70);
wpn_bonus.push("HIT");
wpn_amount.push(10);
price_bonus = 3.5;
}
function init23() {
prefix = "Crushing ";
suffix = "";
wpn_bonus.push("dmg");
wpn_amount.push(100);
wpn_bonus.push("rnd");
wpn_amount.push(200);
wpn_bonus.push("CRIT");
wpn_amount.push(-90);
price_bonus = 3.5;
}
function init24() {
prefix = "Saint ";
suffix = " of Divine Light";
wpn_bonus.push("HIT");
wpn_amount.push(-40);
hero_bonus.push("DEF");
hero_amount.push(3);
hero_bonus.push("FLEE");
hero_amount.push(0.1);
hero_bonus.push("MAX_HP");
hero_amount.push(3);
price_bonus = 12;
}
}
Symbol 2054 MovieClip [__Packages.ItemInfo] Frame 0
class ItemInfo extends Object
{
var CATEGORY, TYPE, NATION, LEVEL, COUNT, ENCH_ID;
function ItemInfo (ct, tp, nt, lv, ei) {
super();
CATEGORY = ct;
TYPE = tp;
NATION = nt;
LEVEL = lv;
COUNT = 1;
ENCH_ID = (ei ? (ei) : 0);
}
function getItem() {
switch (CATEGORY) {
case "WeaponClass" :
return(new WeaponClass(TYPE, NATION, LEVEL, ENCH_ID));
case "Armor" :
return(new Armor(TYPE, NATION, LEVEL, ENCH_ID));
}
}
}
Symbol 2055 MovieClip [__Packages.Armor] Frame 0
class Armor extends Item
{
var TYPE, NATION, LEVEL, FRAME, getFrame, initEnchant, NAME, value, require_param, require_value, price;
function Armor (tp, nt, lv, ei) {
super();
TYPE = tp;
NATION = nt;
LEVEL = lv;
FRAME = getFrame();
this[(("Armor" + tp) + nt) + lv]();
initEnchant(ei);
}
function ArmorClothesViz1() {
NAME = "Leather Armor";
value = 5;
require_param = "CON";
require_value = 25;
price = 100;
}
function ArmorClothesGer1() {
NAME = "Tunic";
value = 2;
require_param = "CON";
require_value = 15;
price = 20;
}
function ArmorClothesRus1() {
NAME = "Dark Leather Armor";
value = 4;
require_param = "STR";
require_value = 25;
price = 50;
}
function ArmorClothesJap1() {
NAME = "Kimono";
value = 1;
require_param = "DEX";
require_value = 15;
price = 5;
}
function ArmorClothesViz2() {
NAME = "Bronze Leather Armor";
value = 9;
require_param = "CON";
require_value = 35;
price = 200;
}
function ArmorClothesGer2() {
NAME = "Footman Armor";
value = 12;
require_param = "CON";
require_value = 40;
price = 250;
}
function ArmorClothesRus2() {
NAME = "Hard Leather Armor";
value = 7;
require_param = "STR";
require_value = 35;
price = 150;
}
function ArmorClothesJap2() {
NAME = "Hard Kimono";
value = 5;
require_param = "DEX";
require_value = 25;
price = 50;
}
function ArmorClothesViz3() {
NAME = "Phalax Armor";
value = 16;
require_param = "CON";
require_value = 45;
price = 300;
}
function ArmorClothesGer3() {
NAME = "Long Chainmail";
value = 19;
require_param = "CON";
require_value = 50;
price = 380;
}
function ArmorClothesRus3() {
NAME = "Short Chainmail";
value = 14;
require_param = "STR";
require_value = 45;
price = 250;
}
function ArmorClothesJap3() {
NAME = "Ninja Armor";
value = 11;
require_param = "DEX";
require_value = 40;
price = 200;
}
function ArmorClothesViz4() {
NAME = "Centurion Armor";
value = 24;
require_param = "CON";
require_value = 60;
price = 450;
}
function ArmorClothesGer4() {
NAME = "Crusader Chainmail";
value = 29;
require_param = "CON";
require_value = 65;
price = 590;
}
function ArmorClothesRus4() {
NAME = "Warrior Chainmail";
value = 21;
require_param = "STR";
require_value = 60;
price = 400;
}
function ArmorClothesJap4() {
NAME = "Gold Ninja Armor";
value = 23;
require_param = "DEX";
require_value = 60;
price = 500;
}
function ArmorClothesViz5() {
NAME = "Curasis";
value = 35;
require_param = "CON";
require_value = 75;
price = 700;
}
function ArmorClothesGer5() {
NAME = "Full Plate of Holy Light";
value = 38;
require_param = "CON";
require_value = 80;
price = 900;
}
function ArmorClothesRus5() {
NAME = "Guardian Full Plate";
value = 32;
require_param = "STR";
require_value = 85;
price = 620;
}
function ArmorClothesJap5() {
NAME = "Gold Samurai Armor";
value = 33;
require_param = "DEX";
require_value = 78;
price = 850;
}
function ArmorClothesViz6() {
NAME = "Shining Armor";
value = 45;
require_param = "CON";
require_value = 85;
price = 1100;
}
function ArmorClothesGer6() {
NAME = "Redeemer Full Plate";
value = 55;
require_param = "CON";
require_value = 90;
price = 1500;
}
function ArmorClothesRus6() {
NAME = "Hero Full Plate";
value = 40;
require_param = "STR";
require_value = 100;
price = 1000;
}
function ArmorClothesJap6() {
NAME = "Black Samurai Armor";
value = 50;
require_param = "DEX";
require_value = 85;
price = 2500;
}
function ArmorHelmetViz1() {
NAME = "Light Helmet";
value = 3;
require_param = "CON";
require_value = 32;
price = 70;
}
function ArmorHelmetGer1() {
NAME = "Footman Helmet";
value = 5;
require_param = "CON";
require_value = 37;
price = 90;
}
function ArmorHelmetRus1() {
NAME = "Leather Helmet";
value = 2;
require_param = "STR";
require_value = 32;
price = 50;
}
function ArmorHelmetJap1() {
NAME = "Bandana";
value = 1;
require_param = "DEX";
require_value = 22;
price = 4;
}
function ArmorHelmetViz2() {
NAME = "Chivalery Helmet";
value = 8;
require_param = "CON";
require_value = 50;
price = 250;
}
function ArmorHelmetGer2() {
NAME = "Knight Helmet";
value = 10;
require_param = "CON";
require_value = 55;
price = 320;
}
function ArmorHelmetRus2() {
NAME = "Guardian Helmet";
value = 7;
require_param = "STR";
require_value = 50;
price = 210;
}
function ArmorHelmetJap2() {
NAME = "Hood";
value = 4;
require_param = "DEX";
require_value = 40;
price = 40;
}
function ArmorHelmetViz3() {
NAME = "Leader Helmet";
value = 14;
require_param = "CON";
require_value = 75;
price = 600;
}
function ArmorHelmetGer3() {
NAME = "Crusader Helmet";
value = 17;
require_param = "CON";
require_value = 80;
price = 900;
}
function ArmorHelmetRus3() {
NAME = "Hero Helmet";
value = 12;
require_param = "STR";
require_value = 85;
price = 500;
}
function ArmorHelmetJap3() {
NAME = "Samurai Mask";
value = 15;
require_param = "DEX";
require_value = 75;
price = 1800;
}
}
Symbol 2056 MovieClip [__Packages.WeaponClass] Frame 0
class WeaponClass extends Item
{
var TYPE, NATION, LEVEL, twohanded, canBeMounted, FRAME, getFrame, initEnchant, NAME, dmg, rnd, rng, skill, t_bef, t_aft, require_param, require_value, crit, price;
function WeaponClass (tp, nt, lv, ei) {
super();
TYPE = tp;
NATION = nt;
LEVEL = lv;
switch (tp) {
case "TwohandedSword" :
case "TwohandedAxe" :
case "TwohandedMace" :
case "Staff" :
case "Katana" :
case "Spear" :
case "Throwing" :
case "Bow" :
case "Dagger" :
case "Fists" :
case "Crossbow" :
twohanded = true;
break;
default :
twohanded = false;
}
switch (tp) {
case "Dagger" :
case "Staff" :
case "Katana" :
case "NinjaTo" :
canBeMounted = false;
break;
default :
canBeMounted = true;
}
FRAME = getFrame();
this[(("Weapon" + tp) + nt) + lv]();
initEnchant(ei);
}
function WeaponOnehandedSwordRog1() {
NAME = "Cheap Sword";
dmg = 3;
rnd = 2;
rng = 0;
skill = "Sword";
t_bef = 10;
t_aft = 55;
require_param = "STR";
require_value = 5;
crit = 1;
price = 12;
}
function WeaponOnehandedSwordRog2() {
NAME = "Rusty Sabre";
dmg = 2;
rnd = 1;
rng = 0;
skill = "Sword";
t_bef = 5;
t_aft = 50;
require_param = null;
require_value = 0;
crit = 1;
price = 10;
}
function WeaponOnehandedSwordViz1() {
NAME = "Gladius";
dmg = 6;
rnd = 5;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 50;
require_param = "STR";
require_value = 25;
crit = 5;
price = 30;
}
function WeaponOnehandedSwordViz2() {
NAME = "Spatha";
dmg = 13;
rnd = 14;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 45;
require_param = "STR";
require_value = 40;
crit = 5;
price = 120;
}
function WeaponOnehandedSwordViz3() {
NAME = "Chivallery Spatha";
dmg = 25;
rnd = 22;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 40;
require_param = "STR";
require_value = 55;
crit = 5;
price = 400;
}
function WeaponOnehandedSwordViz4() {
NAME = "Leader Sword";
dmg = 35;
rnd = 30;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 35;
require_param = "STR";
require_value = 75;
crit = 5;
price = 650;
}
function WeaponOnehandedSwordViz5() {
NAME = "Starshine";
dmg = 50;
rnd = 45;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 30;
require_param = "STR";
require_value = 95;
crit = 5;
price = 1000;
}
function WeaponOnehandedSwordGer1() {
NAME = "Short Sword";
dmg = 5;
rnd = 4;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 55;
require_param = "STR";
require_value = 18;
crit = 5;
price = 20;
}
function WeaponOnehandedSwordGer2() {
NAME = "Footman Sword";
dmg = 11;
rnd = 12;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 50;
require_param = "STR";
require_value = 36;
crit = 5;
price = 80;
}
function WeaponOnehandedSwordGer3() {
NAME = "Long Sword";
dmg = 22;
rnd = 18;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 45;
require_param = "STR";
require_value = 50;
crit = 5;
price = 300;
}
function WeaponOnehandedSwordGer4() {
NAME = "Bastard Sword";
dmg = 39;
rnd = 19;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 40;
require_param = "STR";
require_value = 68;
crit = 5;
price = 500;
}
function WeaponOnehandedSwordGer5() {
NAME = "Starbringer";
dmg = 60;
rnd = 50;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 40;
require_param = "STR";
require_value = 85;
crit = 5;
price = 750;
}
function WeaponOnehandedSwordRus1() {
NAME = "Cutter";
dmg = 3;
rnd = 4;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 50;
require_param = "STR";
require_value = 15;
crit = 5;
price = 15;
}
function WeaponOnehandedSwordRus2() {
NAME = "Long Dagger";
dmg = 9;
rnd = 10;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 45;
require_param = "STR";
require_value = 30;
crit = 5;
price = 60;
}
function WeaponOnehandedSwordRus3() {
NAME = "Cleaver";
dmg = 18;
rnd = 17;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 40;
require_param = "STR";
require_value = 45;
crit = 5;
price = 250;
}
function WeaponOnehandedSwordRus4() {
NAME = "Guardian Sword";
dmg = 30;
rnd = 38;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 35;
require_param = "STR";
require_value = 60;
crit = 5;
price = 400;
}
function WeaponOnehandedSwordRus5() {
NAME = "Black Curse";
dmg = 40;
rnd = 50;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 30;
require_param = "STR";
require_value = 75;
crit = 5;
price = 690;
}
function WeaponOnehandedAxeRog1() {
NAME = "Cheap Axe";
dmg = 4;
rnd = 4;
rng = 0;
skill = "Sword";
t_bef = 10;
t_aft = 75;
require_param = "STR";
require_value = 5;
crit = 0;
price = 12;
}
function WeaponOnehandedAxeRog2() {
NAME = "Bronze Axe";
dmg = 3;
rnd = 3;
rng = 0;
skill = "Sword";
t_bef = 10;
t_aft = 65;
require_param = null;
require_value = 0;
crit = 0;
price = 10;
}
function WeaponOnehandedAxeViz1() {
NAME = "Ritual Axe";
dmg = 6;
rnd = 5;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 65;
require_param = "STR";
require_value = 23;
crit = 3;
price = 45;
}
function WeaponOnehandedAxeViz2() {
NAME = "Priest Axe";
dmg = 21;
rnd = 16;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 60;
require_param = "STR";
require_value = 40;
crit = 3;
price = 170;
}
function WeaponOnehandedAxeViz3() {
NAME = "Rounded Axe";
dmg = 28;
rnd = 39;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 50;
require_param = "STR";
require_value = 50;
crit = 3;
price = 320;
}
function WeaponOnehandedAxeViz4() {
NAME = "Breaking Axe";
dmg = 45;
rnd = 40;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 40;
require_param = "STR";
require_value = 70;
crit = 3;
price = 660;
}
function WeaponOnehandedAxeGer1() {
NAME = "Small Axe";
dmg = 8;
rnd = 7;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 65;
require_param = "STR";
require_value = 26;
crit = 3;
price = 70;
}
function WeaponOnehandedAxeGer2() {
NAME = "Infantry Axe";
dmg = 27;
rnd = 21;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 60;
require_param = "STR";
require_value = 50;
crit = 3;
price = 220;
}
function WeaponOnehandedAxeGer3() {
NAME = "Broad Axe";
dmg = 35;
rnd = 48;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 50;
require_param = "STR";
require_value = 65;
crit = 3;
price = 430;
}
function WeaponOnehandedAxeGer4() {
NAME = "Heavy Axe";
dmg = 60;
rnd = 45;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 40;
require_param = "STR";
require_value = 85;
crit = 3;
price = 750;
}
function WeaponOnehandedAxeRus1() {
NAME = "Militia Axe";
dmg = 9;
rnd = 8;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 65;
require_param = "STR";
require_value = 30;
crit = 3;
price = 80;
}
function WeaponOnehandedAxeRus2() {
NAME = "Long Axe";
dmg = 30;
rnd = 25;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 60;
require_param = "STR";
require_value = 55;
crit = 3;
price = 250;
}
function WeaponOnehandedAxeRus3() {
NAME = "Guard Axe";
dmg = 40;
rnd = 55;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 50;
require_param = "STR";
require_value = 70;
crit = 3;
price = 500;
}
function WeaponOnehandedAxeRus4() {
NAME = "Holy Axe";
dmg = 70;
rnd = 60;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 40;
require_param = "STR";
require_value = 95;
crit = 3;
price = 880;
}
function WeaponOnehandedMaceRog1() {
NAME = "Wooden Club";
dmg = 2;
rnd = 2;
rng = 0;
skill = "Mace";
t_bef = 10;
t_aft = 70;
require_param = "CON";
require_value = 10;
crit = 15;
price = 12;
}
function WeaponOnehandedMaceRog2() {
NAME = "Cheap Club";
dmg = 1;
rnd = 2;
rng = 0;
skill = "Mace";
t_bef = 5;
t_aft = 65;
require_param = "CON";
require_value = 5;
crit = 15;
price = 10;
}
function WeaponOnehandedMaceViz1() {
NAME = "Bronze Club";
dmg = 2;
rnd = 3;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 65;
require_param = "CON";
require_value = 22;
crit = 30;
price = 40;
}
function WeaponOnehandedMaceViz2() {
NAME = "Ritual Bludgeon";
dmg = 8;
rnd = 9;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 60;
require_param = "CON";
require_value = 35;
crit = 30;
price = 200;
}
function WeaponOnehandedMaceViz3() {
NAME = "Rough Bludgeon";
dmg = 12;
rnd = 19;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 50;
require_param = "CON";
require_value = 47;
crit = 40;
price = 310;
}
function WeaponOnehandedMaceViz4() {
NAME = "Shining Bludgeon";
dmg = 25;
rnd = 40;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 40;
require_param = "CON";
require_value = 68;
crit = 50;
price = 630;
}
function WeaponOnehandedMaceGer1() {
NAME = "Morningstar";
dmg = 4;
rnd = 4;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 65;
require_param = "CON";
require_value = 30;
crit = 50;
price = 75;
}
function WeaponOnehandedMaceGer2() {
NAME = "Light Bludgeon";
dmg = 15;
rnd = 12;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 60;
require_param = "CON";
require_value = 55;
crit = 55;
price = 240;
}
function WeaponOnehandedMaceGer3() {
NAME = "Deadly Spikes";
dmg = 22;
rnd = 27;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 50;
require_param = "CON";
require_value = 70;
crit = 60;
price = 470;
}
function WeaponOnehandedMaceGer4() {
NAME = "Peacekeeper";
dmg = 45;
rnd = 30;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 40;
require_param = "CON";
require_value = 95;
crit = 70;
price = 850;
}
function WeaponOnehandedMaceRus1() {
NAME = "Spiked Wooden Club";
dmg = 3;
rnd = 4;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 65;
require_param = "CON";
require_value = 25;
crit = 50;
price = 60;
}
function WeaponOnehandedMaceRus2() {
NAME = "Armor Breaker";
dmg = 12;
rnd = 10;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 60;
require_param = "CON";
require_value = 45;
crit = 55;
price = 220;
}
function WeaponOnehandedMaceRus3() {
NAME = "Heavy Club";
dmg = 18;
rnd = 21;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 50;
require_param = "CON";
require_value = 60;
crit = 60;
price = 350;
}
function WeaponOnehandedMaceRus4() {
NAME = "Golden Hedgehog";
dmg = 30;
rnd = 50;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 40;
require_param = "CON";
require_value = 80;
crit = 65;
price = 700;
}
function WeaponTwohandedSwordRog1() {
NAME = "Cheap Twohanded Sword";
dmg = 5;
rnd = 3;
rng = 0;
skill = "Sword";
t_bef = 10;
t_aft = 65;
require_param = "STR";
require_value = 7;
crit = 1;
price = 18;
}
function WeaponTwohandedSwordRog2() {
NAME = "Rusty Twohanded Sword";
dmg = 3;
rnd = 2;
rng = 0;
skill = "Sword";
t_bef = 5;
t_aft = 60;
require_param = "STR";
require_value = 4;
crit = 1;
price = 12;
}
function WeaponTwohandedSwordViz1() {
NAME = "Iron Twohanded Sword";
dmg = 9;
rnd = 8;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 60;
require_param = "STR";
require_value = 29;
crit = 5;
price = 45;
}
function WeaponTwohandedSwordViz2() {
NAME = "Steel Twohanded Sword";
dmg = 20;
rnd = 21;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 55;
require_param = "STR";
require_value = 48;
crit = 5;
price = 180;
}
function WeaponTwohandedSwordViz3() {
NAME = "Falcion";
dmg = 38;
rnd = 33;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 50;
require_param = "STR";
require_value = 65;
crit = 5;
price = 600;
}
function WeaponTwohandedSwordViz4() {
NAME = "Moonlight";
dmg = 65;
rnd = 50;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 40;
require_param = "STR";
require_value = 88;
crit = 5;
price = 1100;
}
function WeaponTwohandedSwordViz5() {
NAME = "Soul Braker";
dmg = 75;
rnd = 70;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 40;
require_param = "STR";
require_value = 100;
crit = 5;
price = 1300;
}
function WeaponTwohandedSwordGer1() {
NAME = "Light Twohanded Sword";
dmg = 8;
rnd = 6;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 65;
require_param = "STR";
require_value = 23;
crit = 5;
price = 30;
}
function WeaponTwohandedSwordGer2() {
NAME = "Crusader Twohanded Sword";
dmg = 17;
rnd = 18;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 60;
require_param = "STR";
require_value = 44;
crit = 5;
price = 120;
}
function WeaponTwohandedSwordGer3() {
NAME = "Knight Twohanded Sword";
dmg = 33;
rnd = 27;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 55;
require_param = "STR";
require_value = 60;
crit = 5;
price = 450;
}
function WeaponTwohandedSwordGer4() {
NAME = "Claymore";
dmg = 59;
rnd = 29;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 50;
require_param = "STR";
require_value = 75;
crit = 5;
price = 750;
}
function WeaponTwohandedSwordGer5() {
NAME = "Heart of Bat";
dmg = 85;
rnd = 90;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 55;
require_param = "STR";
require_value = 95;
crit = 5;
price = 1080;
}
function WeaponTwohandedSwordRus1() {
NAME = "Forged Twohanded Sword";
dmg = 5;
rnd = 6;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 65;
require_param = "STR";
require_value = 20;
crit = 5;
price = 20;
}
function WeaponTwohandedSwordRus2() {
NAME = "Long Twohanded Sword";
dmg = 14;
rnd = 15;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 60;
require_param = "STR";
require_value = 38;
crit = 5;
price = 90;
}
function WeaponTwohandedSwordRus3() {
NAME = "Large Twohanded Sword";
dmg = 27;
rnd = 25;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 55;
require_param = "STR";
require_value = 52;
crit = 5;
price = 370;
}
function WeaponTwohandedSwordRus4() {
NAME = "Guardian Twohanded Sword";
dmg = 50;
rnd = 60;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 45;
require_param = "STR";
require_value = 65;
crit = 5;
price = 900;
}
function WeaponTwohandedSwordRus5() {
NAME = "Holy Twohanded Sword";
dmg = 60;
rnd = 75;
rng = 0;
skill = "Sword";
t_bef = 1;
t_aft = 45;
require_param = "STR";
require_value = 85;
crit = 5;
price = 1000;
}
function WeaponTwohandedAxeRog1() {
NAME = "Splitter";
dmg = 6;
rnd = 6;
rng = 0;
skill = "Sword";
t_bef = 10;
t_aft = 85;
require_param = "STR";
require_value = 10;
crit = 0;
price = 16;
}
function WeaponTwohandedAxeRog2() {
NAME = "Rusty Twohanded Axe";
dmg = 4;
rnd = 4;
rng = 0;
skill = "Sword";
t_bef = 10;
t_aft = 70;
require_param = null;
require_value = 0;
crit = 0;
price = 12;
}
function WeaponTwohandedAxeViz1() {
NAME = "Light Twohanded Axe";
dmg = 9;
rnd = 7;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 70;
require_param = "STR";
require_value = 27;
crit = 3;
price = 65;
}
function WeaponTwohandedAxeViz2() {
NAME = "Rounded Twohanded Axe";
dmg = 31;
rnd = 24;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 65;
require_param = "STR";
require_value = 48;
crit = 3;
price = 250;
}
function WeaponTwohandedAxeViz3() {
NAME = "Sea Wave";
dmg = 42;
rnd = 59;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 55;
require_param = "STR";
require_value = 59;
crit = 3;
price = 480;
}
function WeaponTwohandedAxeViz4() {
NAME = "Golden Twohanded Axe";
dmg = 75;
rnd = 60;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 43;
require_param = "STR";
require_value = 80;
crit = 3;
price = 990;
}
function WeaponTwohandedAxeGer1() {
NAME = "Steel Twohanded Axe";
dmg = 12;
rnd = 11;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 70;
require_param = "STR";
require_value = 32;
crit = 3;
price = 105;
}
function WeaponTwohandedAxeGer2() {
NAME = "Butcher";
dmg = 41;
rnd = 31;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 65;
require_param = "STR";
require_value = 60;
crit = 3;
price = 330;
}
function WeaponTwohandedAxeGer3() {
NAME = "Heavy Twohanded Axe";
dmg = 53;
rnd = 62;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 55;
require_param = "STR";
require_value = 75;
crit = 3;
price = 680;
}
function WeaponTwohandedAxeGer4() {
NAME = "God's Claw";
dmg = 90;
rnd = 68;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 45;
require_param = "STR";
require_value = 95;
crit = 3;
price = 1050;
}
function WeaponTwohandedAxeRus1() {
NAME = "Peasant Twohanded Axe";
dmg = 14;
rnd = 12;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 70;
require_param = "STR";
require_value = 37;
crit = 3;
price = 120;
}
function WeaponTwohandedAxeRus2() {
NAME = "Executioner";
dmg = 45;
rnd = 38;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 65;
require_param = "STR";
require_value = 65;
crit = 3;
price = 350;
}
function WeaponTwohandedAxeRus3() {
NAME = "Guard Twohanded Axe";
dmg = 60;
rnd = 82;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 55;
require_param = "STR";
require_value = 85;
crit = 3;
price = 750;
}
function WeaponTwohandedAxeRus4() {
NAME = "Elite Twohanded Axe";
dmg = 110;
rnd = 90;
rng = 0;
skill = "Axe";
t_bef = 1;
t_aft = 45;
require_param = "STR";
require_value = 120;
crit = 3;
price = 1400;
}
function WeaponTwohandedMaceRog1() {
NAME = "Rusty Twohanded Bludgeon";
dmg = 3;
rnd = 3;
rng = 0;
skill = "Mace";
t_bef = 10;
t_aft = 80;
require_param = "CON";
require_value = 13;
crit = 20;
price = 14;
}
function WeaponTwohandedMaceRog2() {
NAME = "Wooden Twohanded Club";
dmg = 1;
rnd = 3;
rng = 0;
skill = "Mace";
t_bef = 5;
t_aft = 75;
require_param = "CON";
require_value = 7;
crit = 20;
price = 11;
}
function WeaponTwohandedMaceViz1() {
NAME = "Bronze Twohanded Bludgeon";
dmg = 3;
rnd = 4;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 75;
require_param = "CON";
require_value = 25;
crit = 40;
price = 60;
}
function WeaponTwohandedMaceViz2() {
NAME = "Ritual Twohanded Bludgeon";
dmg = 12;
rnd = 13;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 65;
require_param = "CON";
require_value = 39;
crit = 40;
price = 300;
}
function WeaponTwohandedMaceViz3() {
NAME = "Ritual Hammer";
dmg = 18;
rnd = 29;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 55;
require_param = "CON";
require_value = 65;
crit = 45;
price = 470;
}
function WeaponTwohandedMaceViz4() {
NAME = "Golden Hammer";
dmg = 25;
rnd = 40;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 40;
require_param = "CON";
require_value = 82;
crit = 50;
price = 630;
}
function WeaponTwohandedMaceGer1() {
NAME = "Battle Hammer";
dmg = 6;
rnd = 6;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 70;
require_param = "CON";
require_value = 42;
crit = 50;
price = 110;
}
function WeaponTwohandedMaceGer2() {
NAME = "Steel Twohanded Bludgeon";
dmg = 24;
rnd = 18;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 65;
require_param = "CON";
require_value = 60;
crit = 60;
price = 370;
}
function WeaponTwohandedMaceGer3() {
NAME = "Spiked Twohanded Bludgeon";
dmg = 33;
rnd = 41;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 55;
require_param = "CON";
require_value = 78;
crit = 65;
price = 720;
}
function WeaponTwohandedMaceGer4() {
NAME = "Holy Star";
dmg = 68;
rnd = 45;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 45;
require_param = "CON";
require_value = 110;
crit = 75;
price = 1200;
}
function WeaponTwohandedMaceRus1() {
NAME = "Rude Twohanded Bludgeon";
dmg = 4;
rnd = 6;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 70;
require_param = "CON";
require_value = 37;
crit = 50;
price = 90;
}
function WeaponTwohandedMaceRus2() {
NAME = "Bronze Hammer";
dmg = 18;
rnd = 15;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 65;
require_param = "CON";
require_value = 55;
crit = 55;
price = 330;
}
function WeaponTwohandedMaceRus3() {
NAME = "Heavy Twohanded Bludgeon";
dmg = 28;
rnd = 31;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 55;
require_param = "CON";
require_value = 72;
crit = 60;
price = 550;
}
function WeaponTwohandedMaceRus4() {
NAME = "Hero's Twohanded Bludgeon";
dmg = 45;
rnd = 75;
rng = 0;
skill = "Mace";
t_bef = 1;
t_aft = 75;
require_param = "CON";
require_value = 90;
crit = 65;
price = 1050;
}
function WeaponStaffJap1() {
NAME = "Apprentice Staff";
dmg = 4;
rnd = 3;
rng = 0;
skill = "Staff";
t_bef = 1;
t_aft = 55;
require_param = "DEX";
require_value = 20;
crit = 50;
price = 10;
}
function WeaponStaffJap2() {
NAME = "Master Staff";
dmg = 8;
rnd = 6;
rng = 0;
skill = "Staff";
t_bef = 1;
t_aft = 50;
require_param = "DEX";
require_value = 30;
crit = 55;
price = 70;
}
function WeaponStaffJap3() {
NAME = "Spiked Staff";
dmg = 16;
rnd = 14;
rng = 0;
skill = "Staff";
t_bef = 1;
t_aft = 45;
require_param = "DEX";
require_value = 45;
crit = 65;
price = 180;
}
function WeaponStaffJap4() {
NAME = "Naginata";
dmg = 20;
rnd = 52;
rng = 0;
skill = "Staff";
t_bef = 1;
t_aft = 40;
require_param = "DEX";
require_value = 60;
crit = 10;
price = 350;
}
function WeaponStaffJap5() {
NAME = "Golden Staff";
dmg = 32;
rnd = 40;
rng = 0;
skill = "Staff";
t_bef = 1;
t_aft = 35;
require_param = "DEX";
require_value = 75;
crit = 80;
price = 500;
}
function WeaponStaffJap6() {
NAME = "Golden Naginata";
dmg = 40;
rnd = 90;
rng = 0;
skill = "Staff";
t_bef = 1;
t_aft = 35;
require_param = "DEX";
require_value = 90;
crit = 15;
price = 850;
}
function WeaponNinjaToRog1() {
NAME = "Rusty Ninja-To";
dmg = 3;
rnd = 2;
rng = 0;
skill = "FarEast";
t_bef = 5;
t_aft = 50;
require_param = "DEX";
require_value = 10;
crit = 5;
price = 15;
}
function WeaponNinjaToRog2() {
NAME = "Cheap Ninja-To";
dmg = 1;
rnd = 3;
rng = 0;
skill = "FarEast";
t_bef = 5;
t_aft = 45;
require_param = "DEX";
require_value = 15;
crit = 5;
price = 15;
}
function WeaponNinjaToJap1() {
NAME = "Short Ninja-To";
dmg = 2;
rnd = 7;
rng = 0;
skill = "FarEast";
t_bef = 1;
t_aft = 45;
require_param = "DEX";
require_value = 25;
crit = 10;
price = 25;
}
function WeaponNinjaToJap2() {
NAME = "Apprentiece Ninja-To";
dmg = 6;
rnd = 16;
rng = 0;
skill = "FarEast";
t_bef = 1;
t_aft = 40;
require_param = "DEX";
require_value = 40;
crit = 10;
price = 110;
}
function WeaponNinjaToJap3() {
NAME = "Soldier Ninja-To";
dmg = 12;
rnd = 28;
rng = 0;
skill = "FarEast";
t_bef = 1;
t_aft = 35;
require_param = "DEX";
require_value = 55;
crit = 10;
price = 380;
}
function WeaponNinjaToJap4() {
NAME = "Rhonin Ninja-To";
dmg = 15;
rnd = 42;
rng = 0;
skill = "FarEast";
t_bef = 1;
t_aft = 30;
require_param = "DEX";
require_value = 75;
crit = 10;
price = 600;
}
function WeaponNinjaToJap5() {
NAME = "Holy Ninja-To";
dmg = 20;
rnd = 50;
rng = 0;
skill = "FarEast";
t_bef = 1;
t_aft = 25;
require_param = "DEX";
require_value = 95;
crit = 15;
price = 900;
}
function WeaponNinjaToJap6() {
NAME = "Black Hero";
dmg = 25;
rnd = 75;
rng = 0;
skill = "FarEast";
t_bef = 1;
t_aft = 25;
require_param = "DEX";
require_value = 110;
crit = 20;
price = 1400;
}
function WeaponKatanaRog1() {
NAME = "Rusty Katana";
dmg = 3;
rnd = 4;
rng = 0;
skill = "FarEast";
t_bef = 5;
t_aft = 50;
require_param = "DEX";
require_value = 12;
crit = 7;
price = 17;
}
function WeaponKatanaRog2() {
NAME = "Cheap Katana";
dmg = 1;
rnd = 6;
rng = 0;
skill = "FarEast";
t_bef = 5;
t_aft = 45;
require_param = "DEX";
require_value = 18;
crit = 7;
price = 20;
}
function WeaponKatanaJap1() {
NAME = "Short Katana";
dmg = 2;
rnd = 14;
rng = 0;
skill = "FarEast";
t_bef = 1;
t_aft = 45;
require_param = "DEX";
require_value = 30;
crit = 15;
price = 50;
}
function WeaponKatanaJap2() {
NAME = "Apprentiece Katana";
dmg = 6;
rnd = 32;
rng = 0;
skill = "FarEast";
t_bef = 1;
t_aft = 40;
require_param = "DEX";
require_value = 50;
crit = 15;
price = 170;
}
function WeaponKatanaJap3() {
NAME = "Soldier Katana";
dmg = 12;
rnd = 60;
rng = 0;
skill = "FarEast";
t_bef = 1;
t_aft = 35;
require_param = "DEX";
require_value = 70;
crit = 15;
price = 430;
}
function WeaponKatanaJap4() {
NAME = "Rhonin Katana";
dmg = 15;
rnd = 85;
rng = 0;
skill = "FarEast";
t_bef = 1;
t_aft = 30;
require_param = "DEX";
require_value = 85;
crit = 15;
price = 900;
}
function WeaponKatanaJap5() {
NAME = "Holy Katana";
dmg = 20;
rnd = 110;
rng = 0;
skill = "FarEast";
t_bef = 1;
t_aft = 25;
require_param = "DEX";
require_value = 100;
crit = 20;
price = 1300;
}
function WeaponKatanaJap6() {
NAME = "Darkness";
dmg = 20;
rnd = 180;
rng = 0;
skill = "FarEast";
t_bef = 1;
t_aft = 25;
require_param = "DEX";
require_value = 120;
crit = 25;
price = 2000;
}
function WeaponSpearViz1() {
NAME = "Infantry Spear";
dmg = 15;
rnd = 5;
rng = 0;
skill = "Spear";
t_bef = 1;
t_aft = 65;
require_param = "STR";
require_value = 15;
crit = 80;
price = 10;
}
function WeaponSpearViz2() {
NAME = "Improved Spear";
dmg = 45;
rnd = 15;
rng = 0;
skill = "Spear";
t_bef = 1;
t_aft = 55;
require_param = "STR";
require_value = 35;
crit = 85;
price = 100;
}
function WeaponSpearViz3() {
NAME = "Chivalery Spear";
dmg = 75;
rnd = 25;
rng = 0;
skill = "Spear";
t_bef = 1;
t_aft = 45;
require_param = "STR";
require_value = 65;
crit = 90;
price = 500;
}
function WeaponSpearGer1() {
NAME = "Militia Spear";
dmg = 20;
rnd = 5;
rng = 0;
skill = "Spear";
t_bef = 1;
t_aft = 75;
require_param = "STR";
require_value = 20;
crit = 85;
price = 10;
}
function WeaponSpearGer2() {
NAME = "Footman Spear";
dmg = 60;
rnd = 15;
rng = 0;
skill = "Spear";
t_bef = 1;
t_aft = 65;
require_param = "STR";
require_value = 40;
crit = 90;
price = 100;
}
function WeaponSpearGer3() {
NAME = "Knight Spear";
dmg = 95;
rnd = 25;
rng = 0;
skill = "Spear";
t_bef = 1;
t_aft = 55;
require_param = "STR";
require_value = 70;
crit = 95;
price = 500;
}
function WeaponSpearRus1() {
NAME = "Bronze Spear";
dmg = 5;
rnd = 15;
rng = 0;
skill = "Spear";
t_bef = 1;
t_aft = 60;
require_param = "STR";
require_value = 10;
crit = 85;
price = 50;
}
function WeaponSpearRus2() {
NAME = "Siege Spear";
dmg = 15;
rnd = 45;
rng = 0;
skill = "Spear";
t_bef = 1;
t_aft = 50;
require_param = "STR";
require_value = 30;
crit = 90;
price = 450;
}
function WeaponSpearRus3() {
NAME = "Holy Spear";
dmg = 25;
rnd = 75;
rng = 0;
skill = "Spear";
t_bef = 1;
t_aft = 40;
require_param = "STR";
require_value = 60;
crit = 95;
price = 1200;
}
function WeaponDaggerViz1() {
NAME = "Knife";
dmg = 1;
rnd = 3;
rng = 0;
skill = "Dagger";
t_bef = 1;
t_aft = 30;
require_param = "DEX";
require_value = 15;
crit = 60;
price = 6;
}
function WeaponDaggerViz2() {
NAME = "Dagger";
dmg = 4;
rnd = 12;
rng = 0;
skill = "Dagger";
t_bef = 1;
t_aft = 25;
require_param = "DEX";
require_value = 35;
crit = 75;
price = 120;
}
function WeaponDaggerViz3() {
NAME = "Stiletto";
dmg = 6;
rnd = 34;
rng = 0;
skill = "Dagger";
t_bef = 1;
t_aft = 20;
require_param = "DEX";
require_value = 60;
crit = 95;
price = 360;
}
function WeaponDaggerViz4() {
NAME = "Damascus";
dmg = 15;
rnd = 40;
rng = 0;
skill = "Dagger";
t_bef = 1;
t_aft = 20;
require_param = "DEX";
require_value = 85;
crit = 85;
price = 700;
}
function WeaponThrowingViz1() {
NAME = "Oil";
dmg = 30;
rnd = 80;
rng = 12;
skill = "Throwing";
t_bef = 1;
t_aft = 80;
require_param = "STR";
require_value = 50;
crit = 100;
price = 700;
}
function WeaponThrowingViz2() {
NAME = "Greek Fire";
dmg = 50;
rnd = 150;
rng = 10;
skill = "Throwing";
t_bef = 1;
t_aft = 50;
require_param = "STR";
require_value = 70;
crit = 100;
price = 1600;
}
function WeaponThrowingGer1() {
NAME = "Steel Throwing Knife";
dmg = 10;
rnd = 30;
rng = 8;
skill = "Throwing";
t_bef = 1;
t_aft = 40;
require_param = "DEX";
require_value = 20;
crit = 20;
price = 20;
}
function WeaponThrowingGer2() {
NAME = "Silver Throwing Knife";
dmg = 20;
rnd = 45;
rng = 8;
skill = "Throwing";
t_bef = 1;
t_aft = 35;
require_param = "DEX";
require_value = 30;
crit = 25;
price = 200;
}
function WeaponThrowingGer3() {
NAME = "Sinners";
dmg = 30;
rnd = 70;
rng = 10;
skill = "Throwing";
t_bef = 1;
t_aft = 30;
require_param = "DEX";
require_value = 40;
crit = 30;
price = 500;
}
function WeaponThrowingGer4() {
NAME = "Holy Touches";
dmg = 40;
rnd = 100;
rng = 10;
skill = "Throwing";
t_bef = 1;
t_aft = 30;
require_param = "DEX";
require_value = 50;
crit = 33;
price = 1500;
}
function WeaponThrowingRus1() {
NAME = "Small Throwing Axe";
dmg = 45;
rnd = 15;
rng = 6;
skill = "Throwing";
t_bef = 1;
t_aft = 65;
require_param = "STR";
require_value = 20;
crit = 5;
price = 8;
}
function WeaponThrowingRus2() {
NAME = "Rounded Throwing Axe";
dmg = 55;
rnd = 30;
rng = 6;
skill = "Throwing";
t_bef = 1;
t_aft = 60;
require_param = "STR";
require_value = 35;
crit = 5;
price = 80;
}
function WeaponThrowingRus3() {
NAME = "Tomahawks";
dmg = 70;
rnd = 35;
rng = 6;
skill = "Throwing";
t_bef = 1;
t_aft = 55;
require_param = "STR";
require_value = 55;
crit = 5;
price = 450;
}
function WeaponThrowingRus4() {
NAME = "Golden Punches";
dmg = 80;
rnd = 60;
rng = 5;
skill = "Throwing";
t_bef = 1;
t_aft = 55;
require_param = "STR";
require_value = 75;
crit = 5;
price = 950;
}
function WeaponThrowingJap1() {
NAME = "Shuriken";
dmg = 10;
rnd = 20;
rng = 7;
skill = "FarEast";
t_bef = 1;
t_aft = 40;
require_param = "DEX";
require_value = 20;
crit = 15;
price = 10;
}
function WeaponThrowingJap2() {
NAME = "Silver Shuriken";
dmg = 10;
rnd = 40;
rng = 8;
skill = "FarEast";
t_bef = 1;
t_aft = 35;
require_param = "DEX";
require_value = 30;
crit = 15;
price = 90;
}
function WeaponThrowingJap3() {
NAME = "Rhonin Shuriken";
dmg = 25;
rnd = 60;
rng = 9;
skill = "FarEast";
t_bef = 1;
t_aft = 30;
require_param = "DEX";
require_value = 45;
crit = 15;
price = 200;
}
function WeaponThrowingJap4() {
NAME = "Shining Shuriken";
dmg = 40;
rnd = 110;
rng = 10;
skill = "FarEast";
t_bef = 1;
t_aft = 30;
require_param = "DEX";
require_value = 60;
crit = 17;
price = 500;
}
function WeaponThrowingJap5() {
NAME = "Black Spirits";
dmg = 70;
rnd = 160;
rng = 11;
skill = "FarEast";
t_bef = 1;
t_aft = 30;
require_param = "DEX";
require_value = 80;
crit = 20;
price = 900;
}
function WeaponBowViz1() {
NAME = "Long Bow";
dmg = 12;
rnd = 20;
rng = 12;
skill = "Bow";
t_bef = 10;
t_aft = 40;
require_param = "DEX";
require_value = 20;
crit = 5;
price = 40;
}
function WeaponBowViz2() {
NAME = "Fine Bow";
dmg = 30;
rnd = 50;
rng = 14;
skill = "Bow";
t_bef = 1;
t_aft = 40;
require_param = "DEX";
require_value = 70;
crit = 5;
price = 1010;
}
function WeaponBowGer1() {
NAME = "Infantry Bow";
dmg = 10;
rnd = 18;
rng = 12;
skill = "Bow";
t_bef = 10;
t_aft = 40;
require_param = "DEX";
require_value = 15;
crit = 5;
price = 30;
}
function WeaponBowGer2() {
NAME = "Forged Bow";
dmg = 25;
rnd = 45;
rng = 14;
skill = "Bow";
t_bef = 1;
t_aft = 40;
require_param = "DEX";
require_value = 50;
crit = 5;
price = 850;
}
function WeaponBowRus1() {
NAME = "Guard Bow";
dmg = 15;
rnd = 25;
rng = 13;
skill = "Bow";
t_bef = 10;
t_aft = 40;
require_param = "DEX";
require_value = 30;
crit = 5;
price = 50;
}
function WeaponBowRus2() {
NAME = "Holy Bow";
dmg = 35;
rnd = 55;
rng = 15;
skill = "Bow";
t_bef = 1;
t_aft = 40;
require_param = "DEX";
require_value = 95;
crit = 5;
price = 1150;
}
function WeaponBowJap1() {
NAME = "Hunter Bow";
dmg = 5;
rnd = 10;
rng = 12;
skill = "Bow";
t_bef = 20;
t_aft = 40;
require_param = "DEX";
require_value = 10;
crit = 5;
price = 5;
}
function WeaponBowJap2() {
NAME = "Soldier Bow";
dmg = 15;
rnd = 20;
rng = 13;
skill = "Bow";
t_bef = 10;
t_aft = 40;
require_param = "DEX";
require_value = 25;
crit = 5;
price = 50;
}
function WeaponBowJap3() {
NAME = "Ninja Bow";
dmg = 20;
rnd = 40;
rng = 14;
skill = "Bow";
t_bef = 5;
t_aft = 40;
require_param = "DEX";
require_value = 45;
crit = 10;
price = 450;
}
function WeaponBowJap4() {
NAME = "Samurai Bow";
dmg = 30;
rnd = 50;
rng = 15;
skill = "Bow";
t_bef = 1;
t_aft = 40;
require_param = "DEX";
require_value = 85;
crit = 10;
price = 1100;
}
function WeaponCrossbowViz1() {
NAME = "Light Crossbow";
dmg = 30;
rnd = 40;
rng = 18;
skill = "Crossbow";
t_bef = 15;
t_aft = 60;
require_param = "DEX";
require_value = 30;
crit = 50;
price = 80;
}
function WeaponCrossbowViz2() {
NAME = "Medium Crossbow";
dmg = 40;
rnd = 60;
rng = 18;
skill = "Crossbow";
t_bef = 10;
t_aft = 60;
require_param = "DEX";
require_value = 60;
crit = 55;
price = 650;
}
function WeaponCrossbowViz3() {
NAME = "Elite Crossbow";
dmg = 60;
rnd = 100;
rng = 19;
skill = "Crossbow";
t_bef = 5;
t_aft = 60;
require_param = "DEX";
require_value = 90;
crit = 60;
price = 1300;
}
function WeaponCrossbowGer1() {
NAME = "Long Crossbow";
dmg = 24;
rnd = 30;
rng = 17;
skill = "Crossbow";
t_bef = 15;
t_aft = 60;
require_param = "DEX";
require_value = 25;
crit = 45;
price = 60;
}
function WeaponCrossbowGer2() {
NAME = "Steel Crossbow";
dmg = 35;
rnd = 55;
rng = 17;
skill = "Crossbow";
t_bef = 10;
t_aft = 60;
require_param = "DEX";
require_value = 50;
crit = 50;
price = 520;
}
function WeaponCrossbowGer3() {
NAME = "Forged Crossbow";
dmg = 50;
rnd = 90;
rng = 18;
skill = "Crossbow";
t_bef = 5;
t_aft = 60;
require_param = "DEX";
require_value = 75;
crit = 55;
price = 1200;
}
function WeaponCrossbowRus1() {
NAME = "Hunter Crossbow";
dmg = 20;
rnd = 20;
rng = 17;
skill = "Crossbow";
t_bef = 10;
t_aft = 60;
require_param = "DEX";
require_value = 20;
crit = 25;
price = 40;
}
function WeaponCrossbowRus2() {
NAME = "Soldier Crossbow";
dmg = 30;
rnd = 45;
rng = 18;
skill = "Crossbow";
t_bef = 5;
t_aft = 60;
require_param = "DEX";
require_value = 40;
crit = 30;
price = 450;
}
function WeaponCrossbowRus3() {
NAME = "Guard Crossbow";
dmg = 40;
rnd = 70;
rng = 18;
skill = "Crossbow";
t_bef = 0;
t_aft = 60;
require_param = "DEX";
require_value = 60;
crit = 35;
price = 900;
}
function WeaponShieldViz1() {
NAME = "Guard";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
t_bef = 1;
t_aft = 0;
require_param = "CON";
require_value = 15;
crit = 10;
price = 100;
}
function WeaponShieldViz2() {
NAME = "Infantry Shield";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
t_bef = 1;
t_aft = 0;
require_param = "CON";
require_value = 35;
crit = 20;
price = 250;
}
function WeaponShieldViz3() {
NAME = "Chivalery Shield";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
t_bef = 1;
t_aft = 0;
require_param = "CON";
require_value = 55;
crit = 30;
price = 750;
}
function WeaponShieldGer1() {
NAME = "Small Buckler";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
t_bef = 1;
t_aft = 0;
require_param = "CON";
require_value = 25;
crit = 15;
price = 180;
}
function WeaponShieldGer2() {
NAME = "Footman Shield";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
t_bef = 1;
t_aft = 0;
require_param = "CON";
require_value = 45;
crit = 25;
price = 360;
}
function WeaponShieldGer3() {
NAME = "Knight Shield";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
t_bef = 1;
t_aft = 0;
require_param = "CON";
require_value = 85;
crit = 35;
price = 1200;
}
function WeaponShieldRus1() {
NAME = "Wooden Buckler";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
t_bef = 1;
t_aft = 0;
require_param = "CON";
require_value = 10;
crit = 7;
price = 20;
}
function WeaponShieldRus2() {
NAME = "Iron Buckler";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
t_bef = 1;
t_aft = 0;
require_param = "CON";
require_value = 28;
crit = 18;
price = 170;
}
function WeaponShieldRus3() {
NAME = "Hero Shield";
dmg = 0;
rnd = 0;
rng = 0;
skill = "none";
t_bef = 1;
t_aft = 0;
require_param = "CON";
require_value = 70;
crit = 33;
price = 1100;
}
function WeaponFistsAll0() {
NAME = "Unarmed";
dmg = 1;
rnd = 2;
rng = 0;
skill = "Fist";
t_bef = 1;
t_aft = 35;
require_param = null;
require_value = 0;
crit = 0;
FRAME = 169;
price = 0;
}
}
Symbol 2057 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;
}
}
Symbol 2058 MovieClip [__Packages.Unit] Frame 0
class Unit extends Hero
{
var ID, INT, NATION, GENDER, WEAPON_PRI, NAME, STR, DEX, CON, WEAPON_SEC, ARMOR, HELMET, HORSE, primary_skill, secondary_skill, SKILL, price;
function Unit (tp, nt, lv) {
super();
ID = lv;
INT = 10;
if (nt != "Rog") {
NATION = nt;
GENDER = (_root.percent(70) ? "m" : "f");
} else {
var _local4 = ["Viz", "Ger", "Rus", "Jap"];
NATION = _local4[_root.dice(4)];
GENDER = "m";
}
this[(("Unit" + tp) + nt) + lv]();
}
function getUnitInfo() {
return(new UnitInfo(((WEAPON_PRI.rng > 0) ? "Ranged" : "Melee"), NATION, ID));
}
function UnitMeleeViz1() {
NAME = "Caravan Guard";
STR = 23;
DEX = 5;
CON = 15;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Viz", 1);
WEAPON_SEC = new WeaponClass("Shield", "Viz", 1);
ARMOR = null;
HELMET = null;
HORSE = null;
primary_skill = "Sword";
secondary_skill = "none";
SKILL[primary_skill] = 40;
SKILL[secondary_skill] = 0;
price = 50;
}
function UnitMeleeViz2() {
NAME = "Town Guard";
STR = 48;
DEX = 20;
CON = 25;
WEAPON_PRI = new WeaponClass("TwohandedAxe", "Viz", 2);
WEAPON_SEC = new WeaponClass("Bow", "Viz", 1);
ARMOR = new Armor("Clothes", "Viz", 2);
HELMET = new Armor("Helmet", "Viz", 1);
HORSE = null;
primary_skill = "Axe";
secondary_skill = "Bow";
SKILL[primary_skill] = 50;
SKILL[secondary_skill] = 40;
price = 180;
}
function UnitMeleeViz3() {
NAME = "Line Infantry";
STR = 35;
DEX = 30;
CON = 30;
WEAPON_PRI = new WeaponClass("Spear", "Viz", 2);
WEAPON_SEC = new WeaponClass("Crossbow", "Viz", 1);
ARMOR = new Armor("Clothes", "Viz", 3);
HELMET = new Armor("Helmet", "Viz", 1);
HORSE = null;
primary_skill = "Spear";
secondary_skill = "Crossbow";
SKILL[primary_skill] = 70;
SKILL[secondary_skill] = 20;
price = 220;
}
function UnitMeleeViz4() {
NAME = "Legionary";
STR = 45;
DEX = 10;
CON = 45;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Viz", 2);
WEAPON_SEC = new WeaponClass("Shield", "Viz", 2);
ARMOR = new Armor("Clothes", "Viz", 3);
HELMET = new Armor("Helmet", "Viz", 2);
HORSE = null;
primary_skill = "Sword";
secondary_skill = "none";
SKILL[primary_skill] = 60;
SKILL[secondary_skill] = 0;
price = 350;
}
function UnitMeleeViz5() {
NAME = "Moon Warrior";
STR = 90;
DEX = 60;
CON = 20;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Viz", 4);
WEAPON_SEC = new WeaponClass("Crossbow", "Viz", 2);
ARMOR = new Armor("Clothes", "Viz", 4);
HELMET = null;
HORSE = null;
primary_skill = "Sword";
secondary_skill = "Crossbow";
SKILL[primary_skill] = 75;
SKILL[secondary_skill] = 50;
price = 500;
}
function UnitMeleeViz6() {
NAME = "Light Chivalery";
STR = 55;
DEX = 10;
CON = 45;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Viz", 3);
WEAPON_SEC = new WeaponClass("Shield", "Viz", 1);
ARMOR = new Armor("Clothes", "Viz", 3);
HELMET = new Armor("Helmet", "Viz", 1);
HORSE = new Horse("any", 15, 1, 5, 0);
primary_skill = "Sword";
secondary_skill = "none";
SKILL[primary_skill] = 70;
SKILL[secondary_skill] = 0;
price = 450;
}
function UnitMeleeViz7() {
NAME = "Blademaster";
STR = 80;
DEX = 50;
CON = 60;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Viz", 4);
WEAPON_SEC = new WeaponClass("OnehandedSword", "Viz", 4);
ARMOR = new Armor("Clothes", "Viz", 2);
HELMET = new Armor("Helmet", "Viz", 2);
HORSE = null;
primary_skill = "Sword";
secondary_skill = "Dual";
SKILL[primary_skill] = 80;
SKILL[secondary_skill] = 60;
price = 600;
}
function UnitMeleeViz8() {
NAME = "Golden Rider";
STR = 100;
DEX = 45;
CON = 75;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Viz", 5);
WEAPON_SEC = new WeaponClass("Bow", "Viz", 2);
ARMOR = new Armor("Clothes", "Viz", 6);
HELMET = new Armor("Helmet", "Viz", 3);
HORSE = new Horse("white", 200, 10, 2, 0);
primary_skill = "Sword";
secondary_skill = "Bow";
SKILL[primary_skill] = 100;
SKILL[secondary_skill] = 55;
price = 1500;
}
function UnitMeleeViz9() {
NAME = "Asassin";
STR = 70;
DEX = 70;
CON = 40;
WEAPON_PRI = new WeaponClass("Dagger", "Viz", 4);
WEAPON_SEC = new WeaponClass("Crossbow", "Viz", 2);
ARMOR = new Armor("Clothes", "Viz", 2);
HELMET = new Armor("Helmet", "Jap", 2);
HORSE = null;
primary_skill = "Dagger";
secondary_skill = "Crossbow";
SKILL[primary_skill] = 95;
SKILL[secondary_skill] = 70;
price = 750;
}
function UnitRangedViz9() {
NAME = "Silent Killer";
STR = 60;
DEX = 95;
CON = 20;
WEAPON_PRI = new WeaponClass("Crossbow", "Viz", 3);
WEAPON_SEC = new WeaponClass("Dagger", "Viz", 3);
ARMOR = new Armor("Clothes", "Viz", 2);
HELMET = new Armor("Helmet", "Jap", 2);
HORSE = null;
primary_skill = "Crossbow";
secondary_skill = "Dagger";
SKILL[primary_skill] = 90;
SKILL[secondary_skill] = 90;
price = 850;
}
function UnitRangedViz1() {
NAME = "Bowman";
STR = 10;
DEX = 20;
CON = 5;
WEAPON_PRI = new WeaponClass("Bow", "Viz", 1);
WEAPON_SEC = new WeaponClass("Dagger", "Viz", 1);
ARMOR = null;
HELMET = null;
HORSE = null;
primary_skill = "Bow";
secondary_skill = "Dagger";
SKILL[primary_skill] = 55;
SKILL[secondary_skill] = 40;
price = 40;
}
function UnitRangedViz2() {
NAME = "Crossbowman";
STR = 10;
DEX = 35;
CON = 5;
WEAPON_PRI = new WeaponClass("Crossbow", "Viz", 1);
WEAPON_SEC = new WeaponClass("Dagger", "Viz", 2);
ARMOR = new Armor("Clothes", "Viz", 1);
HELMET = null;
HORSE = null;
primary_skill = "Crossbow";
secondary_skill = "Dagger";
SKILL[primary_skill] = 65;
SKILL[secondary_skill] = 55;
price = 100;
}
function UnitRangedViz3() {
NAME = "Elite Archer";
STR = 30;
DEX = 70;
CON = 10;
WEAPON_PRI = new WeaponClass("Bow", "Viz", 2);
WEAPON_SEC = new WeaponClass("TwohandedSword", "Viz", 1);
ARMOR = new Armor("Clothes", "Viz", 2);
HELMET = new Armor("Helmet", "Viz", 1);
HORSE = null;
primary_skill = "Bow";
secondary_skill = "Sword";
SKILL[primary_skill] = 85;
SKILL[secondary_skill] = 60;
price = 300;
}
function UnitRangedViz4() {
NAME = "Sniper";
STR = 30;
DEX = 65;
CON = 10;
WEAPON_PRI = new WeaponClass("Crossbow", "Viz", 2);
WEAPON_SEC = new WeaponClass("TwohandedSword", "Viz", 1);
ARMOR = new Armor("Clothes", "Viz", 3);
HELMET = new Armor("Helmet", "Viz", 1);
HORSE = null;
primary_skill = "Crossbow";
secondary_skill = "Sword";
SKILL[primary_skill] = 85;
SKILL[secondary_skill] = 50;
price = 400;
}
function UnitRangedViz5() {
NAME = "Elite Sniper";
STR = 50;
DEX = 90;
CON = 30;
WEAPON_PRI = new WeaponClass("Crossbow", "Viz", 3);
WEAPON_SEC = new WeaponClass("TwohandedSword", "Viz", 2);
ARMOR = new Armor("Clothes", "Viz", 3);
HELMET = new Armor("Helmet", "Viz", 1);
HORSE = null;
primary_skill = "Crossbow";
secondary_skill = "Sword";
SKILL[primary_skill] = 100;
SKILL[secondary_skill] = 70;
price = 750;
}
function UnitRangedViz6() {
NAME = "Chivalery Archer";
STR = 65;
DEX = 65;
CON = 20;
WEAPON_PRI = new WeaponClass("Bow", "Viz", 2);
WEAPON_SEC = new WeaponClass("TwohandedSword", "Viz", 3);
ARMOR = new Armor("Clothes", "Viz", 3);
HELMET = new Armor("Helmet", "Viz", 1);
HORSE = new Horse("any", 35, 2, 5, 0);
primary_skill = "Bow";
secondary_skill = "Sword";
SKILL[primary_skill] = 70;
SKILL[secondary_skill] = 70;
price = 500;
}
function UnitRangedViz7() {
NAME = "Fire Thrower";
STR = 50;
DEX = 10;
CON = 10;
WEAPON_PRI = new WeaponClass("Throwing", "Viz", 1);
WEAPON_SEC = new WeaponClass("TwohandedAxe", "Viz", 1);
ARMOR = null;
HELMET = null;
HORSE = null;
primary_skill = "Throwing";
secondary_skill = "Axe";
SKILL[primary_skill] = 40;
SKILL[secondary_skill] = 70;
price = 1000;
}
function UnitRangedViz8() {
NAME = "Demolisher";
STR = 70;
DEX = 30;
CON = 60;
WEAPON_PRI = new WeaponClass("Throwing", "Viz", 2);
WEAPON_SEC = new WeaponClass("TwohandedAxe", "Viz", 3);
ARMOR = null;
HELMET = null;
HORSE = null;
primary_skill = "Throwing";
secondary_skill = "Axe";
SKILL[primary_skill] = 60;
SKILL[secondary_skill] = 90;
price = 1500;
}
function UnitMeleeGer1() {
NAME = "Acolyte";
STR = 25;
DEX = 25;
CON = 15;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Ger", 1);
WEAPON_SEC = new WeaponClass("Crossbow", "Ger", 1);
ARMOR = new Armor("Clothes", "Ger", 1);
HELMET = null;
HORSE = null;
primary_skill = "Sword";
secondary_skill = "Crossbow";
SKILL[primary_skill] = 50;
SKILL[secondary_skill] = 20;
price = 70;
}
function UnitMeleeGer2() {
NAME = "Priest";
STR = 5;
DEX = 5;
CON = 45;
WEAPON_PRI = new WeaponClass("TwohandedMace", "Ger", 1);
WEAPON_SEC = null;
ARMOR = new Armor("Clothes", "Ger", 1);
HELMET = null;
HORSE = null;
primary_skill = "Mace";
secondary_skill = "none";
SKILL[primary_skill] = 65;
SKILL[secondary_skill] = 0;
price = 120;
}
function UnitMeleeGer3() {
NAME = "Maceman";
STR = 15;
DEX = 5;
CON = 35;
WEAPON_PRI = new WeaponClass("OnehandedMace", "Ger", 1);
WEAPON_SEC = new WeaponClass("Shield", "Ger", 1);
ARMOR = new Armor("Clothes", "Ger", 2);
HELMET = new Armor("Helmet", "Ger", 1);
HORSE = null;
primary_skill = "Mace";
secondary_skill = "none";
SKILL[primary_skill] = 50;
SKILL[secondary_skill] = 0;
price = 180;
}
function UnitMeleeGer4() {
NAME = "Town Guard";
STR = 60;
DEX = 15;
CON = 50;
WEAPON_PRI = new WeaponClass("TwohandedAxe", "Ger", 2);
WEAPON_SEC = new WeaponClass("Bow", "Ger", 1);
ARMOR = new Armor("Clothes", "Ger", 3);
HELMET = new Armor("Helmet", "Ger", 1);
HORSE = null;
primary_skill = "Axe";
secondary_skill = "Bow";
SKILL[primary_skill] = 70;
SKILL[secondary_skill] = 20;
price = 250;
}
function UnitMeleeGer5() {
NAME = "Footman";
STR = 20;
DEX = 15;
CON = 30;
WEAPON_PRI = new WeaponClass("Spear", "Ger", 1);
WEAPON_SEC = new WeaponClass("Bow", "Ger", 1);
ARMOR = new Armor("Clothes", "Ger", 2);
HELMET = new Armor("Helmet", "Ger", 1);
HORSE = null;
primary_skill = "Spear";
secondary_skill = "Bow";
SKILL[primary_skill] = 70;
SKILL[secondary_skill] = 40;
price = 230;
}
function UnitMeleeGer6() {
NAME = "Grey Infantry";
STR = 40;
DEX = 15;
CON = 50;
WEAPON_PRI = new WeaponClass("Spear", "Ger", 2);
WEAPON_SEC = new WeaponClass("Bow", "Ger", 1);
ARMOR = new Armor("Clothes", "Ger", 3);
HELMET = new Armor("Helmet", "Ger", 1);
HORSE = null;
primary_skill = "Spear";
secondary_skill = "Bow";
SKILL[primary_skill] = 75;
SKILL[secondary_skill] = 40;
price = 420;
}
function UnitMeleeGer7() {
NAME = "Elite Infantry";
STR = 75;
DEX = 15;
CON = 65;
WEAPON_PRI = new WeaponClass("Spear", "Ger", 3);
WEAPON_SEC = new WeaponClass("Bow", "Ger", 1);
ARMOR = new Armor("Clothes", "Ger", 4);
HELMET = new Armor("Helmet", "Ger", 2);
HORSE = null;
primary_skill = "Spear";
secondary_skill = "Bow";
SKILL[primary_skill] = 90;
SKILL[secondary_skill] = 40;
price = 630;
}
function UnitMeleeGer8() {
NAME = "Paladin";
STR = 80;
DEX = 25;
CON = 80;
WEAPON_PRI = new WeaponClass("TwohandedSword", "Ger", 4);
WEAPON_SEC = new WeaponClass("Crossbow", "Ger", 1);
ARMOR = new Armor("Clothes", "Ger", 5);
HELMET = new Armor("Helmet", "Ger", 2);
HORSE = null;
primary_skill = "Sword";
secondary_skill = "Crossbow";
SKILL[primary_skill] = 100;
SKILL[secondary_skill] = 20;
price = 550;
}
function UnitMeleeGer9() {
NAME = "Heavy Maceman";
STR = 20;
DEX = 5;
CON = 100;
WEAPON_PRI = new WeaponClass("OnehandedMace", "Ger", 4);
WEAPON_SEC = new WeaponClass("Shield", "Ger", 2);
ARMOR = new Armor("Clothes", "Ger", 5);
HELMET = new Armor("Helmet", "Ger", 2);
HORSE = null;
primary_skill = "Mace";
secondary_skill = "none";
SKILL[primary_skill] = 100;
SKILL[secondary_skill] = 0;
price = 630;
}
function UnitMeleeGer10() {
NAME = "Knight";
STR = 50;
DEX = 5;
CON = 100;
WEAPON_PRI = new WeaponClass("OnehandedMace", "Ger", 4);
WEAPON_SEC = new WeaponClass("Shield", "Ger", 2);
ARMOR = new Armor("Clothes", "Ger", 5);
HELMET = new Armor("Helmet", "Ger", 2);
HORSE = new Horse("white", 250, 12, 1, 0);
primary_skill = "Mace";
secondary_skill = "none";
SKILL[primary_skill] = 100;
SKILL[secondary_skill] = 0;
price = 1200;
}
function UnitMeleeGer11() {
NAME = "Crusader";
STR = 90;
DEX = 20;
CON = 100;
WEAPON_PRI = new WeaponClass("OnehandedSword", "Ger", 5);
WEAPON_SEC = new WeaponClass("Shield", "Ger", 3);
ARMOR = new Armor("Clothes", "Ger", 6);
HELMET = new Armor("Helmet", "Ger", 3);
HORSE = new Horse("black", 250, 8, 2, 0);
primary_skill = "Sword";
secondary_skill = "none";
SKILL[primary_skill] = 100;
SKILL[secondary_skill] = 0;
price = 1700;
}
function UnitMeleeGer12() {
NAME = "Macemaster";
STR = 40;
DEX = 40;
CON = 90;
WEAPON_PRI = new WeaponClass("OnehandedMace", "Ger", 4);
WEAPON_SEC = new WeaponClass("OnehandedMace", "Ger", 4);
ARMOR = new Armor("Clothes", "Ger", 4);
HELMET = new Armor("Helmet", "Ger", 2);
HORSE = null;
primary_skill = "Mace";
secondary_skill = "Dual";
SKILL[primary_skill] = 80;
SKILL[secondary_skill] = 60;
price = 600;
}
function UnitRangedGer1() {
NAME = "Hunter";
STR = 25;
DEX = 15;
CON = 10;
WEAPON_PRI = new WeaponClass("Bow", "Ger", 1);
WEAPON_SEC = new WeaponClass("TwohandedSword", "Ger", 1);
ARMOR = null;
HELMET = null;
HORSE = null;
primary_skill = "Bow";
secondary_skill = "Mace";
SKILL[primary_skill] = 55;
SKILL[secondary_skill] = 40;
price = 60;
}
function UnitRangedGer2() {
NAME = "Castle Defender";
STR = 32;
DEX = 30;
CON = 15;
WEAPON_PRI = new WeaponClass("Crossbow", "Ger", 1);
WEAPON_SEC = new WeaponClass("TwohandedAxe", "Ger", 1);
ARMOR = new Armor("Clothes", "Ger", 1);
HELMET = null;
HORSE = null;
primary_skill = "Crossbow";
secondary_skill = "Axe";
SKILL[primary_skill] = 60;
SKILL[secondary_skill] = 30;
price = 70;
}
function UnitRangedGer3() {
NAME = "St. Bowmen";
STR = 60;
DEX = 50;
CON = 12;
WEAPON_PRI = new WeaponClass("Bow", "Ger", 2);
WEAPON_SEC = new WeaponClass("TwohandedAxe", "Ger", 2);
ARMOR = new Armor("Clothes", "Ger", 2);
HELMET = new Armor("Helmet", "Ger", 1);
HORSE = null;
primary_skill = "Bow";
secondary_skill = "Mace";
SKILL[primary_skill] = 70;
SKILL[secondary_skill] = 50;
price = 300;
}
function UnitRangedGer4() {
NAME = "Castle Keeper";
STR = 75;
DEX = 75;
CON = 40;
WEAPON_PRI = new WeaponClass("Crossbow", "Ger", 3);
WEAPON_SEC = new WeaponClass("TwohandedAxe", "Ger", 3);
ARMOR = new Armor("Clothes", "Ger", 3);
HELMET = new Armor("Helmet", "Ger", 1);
HORSE = null;
primary_skill = "Crossbow";
secondary_skill = "Axe";
SKILL[primary_skill] = 90;
SKILL[secondary_skill] = 50;
price = 560;
}
function UnitRangedGer5() {
NAME = "Recon";
STR = 23;
DEX = 30;
CON = 10;
WEAPON_PRI = new WeaponClass("Throwing", "Ger", 2);
WEAPON_SEC = new WeaponClass("TwohandedSword", "Ger", 1);
ARMOR = null;
HELMET = null;
HORSE = null;
primary_skill = "Throwing";
secondary_skill = "Sword";
SKILL[primary_skill] = 80;
SKILL[secondary_skill] = 45;
price = 250;
}
function UnitRangedGer6() {
NAME = "Master Recon";
STR = 23;
DEX = 40;
CON = 15;
WEAPON_PRI = new WeaponClass("Throwing", "Ger", 3);
WEAPON_SEC = new WeaponClass("TwohandedSword", "Ger", 1);
ARMOR = null;
HELMET = null;
HORSE = new Horse("any", 10, 0, 4, 0);
primary_skill = "Throwing";
secondary_skill = "Sword";
SKILL[primary_skill] = 90;
SKILL[secondary_skill] = 55;
price = 300;
}
function UnitRangedGer7() {
NAME = "Inquisitor";
STR = 30;
DEX = 50;
CON = 80;
WEAPON_PRI = new WeaponClass("Throwing", "Ger", 4);
WEAPON_SEC = new WeaponClass("TwohandedMace", "Ger", 3);
ARMOR = new Armor("Clothes", "Ger", 4);
HELMET = new Armor("Helmet", "Ger", 2);
HORSE = new Horse("black", 100, 5, 1, 0);
primary_skill = "Throwing";
secondary_skill = "Mace";
SKILL[primary_skill] = 100;
SKILL[secondary_skill] = 80;
price = 700;
}
function UnitMeleeRus1() {
NAME = "Militia";
STR = 30;
DEX = 5;
CON = 10;
WEAPON_PRI = new WeaponClass("TwohandedAxe", "Rus", 1);
WEAPON_SEC = null;
ARMOR = null;
HELMET = null;
HORSE = null;
primary_skill = "Axe";
secondary_skill = "none";
SKILL[primary_skill] = 40;
SKILL[secondary_skill] = 0;
price = 40;
}
function UnitMeleeRus2() {
NAME = "Militia Commander";
STR = 32;
DEX = 5;
CON = 10;
WEAPON_PRI = new WeaponClass("TwohandedAxe", "Rus", 1);
WEAPON_SEC = null;
ARMOR = null;
HELMET = new Armor("Helmet", "Rus", 1);
HORSE = new Horse("white", 25, 1, 1, 0);
primary_skill = "Axe";
secondary_skill = "none";
SKILL[primary_skill] = 40;
SKILL[secondary_skill] = 0;
price = 60;
}
function UnitMeleeRus3() {
NAME = "Warrior";
STR = 40;
DEX = 5;
CON = 20;
WEAPON_PRI = new WeaponClass("OnehandedAxe", "Rus", 1);
WEAPON_SEC = new WeaponClass("Shield", "Rus", 1);
ARMOR = new Armor("Clothes", "Rus", 1);
HELMET = new Armor("Helmet", "Rus", 1);
HORSE = null;
primary_skill = "Axe";
secondary_skill = "none";
SKILL[primary_skill] = 50;
SKILL[secondary_skill] = 0;
price = 100;
}
function UnitMeleeRus4() {
NAME = "Veteran Warrior";
STR = 55;
DEX = 5;
CON = 30;
WEAPON_PRI = new WeaponClass("OnehandedAxe", "Rus", 2);
WEAPON_SEC = new WeaponClass("Shield", "Rus", 2);
ARMOR = new Armor("Clothes", "Rus", 3);
HELMET = new Armor("Helmet", "Rus", 2);
HORSE = null;
primary_skill = "Axe";
secondary_skill = "none";
SKILL[primary_skill] = 65;
SKILL[secondary_skill] = 0;
price = 150;
}
function UnitMeleeRus5() {
NAME = "Elite Warrior";
STR = 70;
DEX = 5;
CON = 40;
WEAPON_PRI = new WeaponClass("OnehandedAxe", "Rus", 3);
WEAPON_SEC = new WeaponClass("Shield", "Rus", 2);
ARMOR = new Armor("Clothes", "Rus", 4);
HELMET = new Armor("Helmet", "Rus", 2);
HORSE = null;
primary_skill = "Axe";
secondary_skill = "none";
SKILL[primary_skill] = 80;
SKILL[secondary_skill] = 0;
price = 300;
}
function UnitMeleeRus6() {
NAME = "Axemaster";
STR = 60;
DEX = 5;
CON = 60;
WEAPON_PRI = new WeaponClass("OnehandedAxe", "Rus", 2);
WEAPON_SEC = new WeaponClass("OnehandedAxe", "Rus", 2);
ARMOR = new Armor("Clothes", "Rus", 3);
HELMET = new Armor("Helmet", "Rus", 2);
HORSE = null;
primary_skill = "Axe";
secondary_skill = "Dual";
SKILL[primary_skill] = 70;
SKILL[secondary_skill] = 70;
price = 500;
}
function UnitMeleeRus7() {
NAME = "Berserker";
STR = 95;
DEX = 5;
CON = 90;
WEAPON_PRI = new WeaponClass("OnehandedAxe", "Rus", 4);
WEAPON_SEC = new WeaponClass("OnehandedAxe", "Rus", 4);
ARMOR = new Armor("Clothes", "Rus", 5);
HELMET = new Armor("Helmet", "Rus", 3);
HORSE = null;
primary_skill = "Axe";
secondary_skill = "Dual";
SKILL[primary_skill] = 100;
SKILL[secondary_skill] = 90;
price = 650;
}
function UnitMeleeRus8() {
NAME = "Light Rider";
STR = 50;
DEX = 30;
CON = 20;
WEAPON_PRI = new WeaponClass("Spear", "Rus", 2);
WEAPON_SEC = new WeaponClass("Bow", "Rus", 1);
ARMOR = new Armor("Clothes", "Rus", 4);
HELMET = new Armor("Helmet", "Rus", 2);
HORSE = new Horse("any", 75, 3, 4, 0);
primary_skill = "Spear";
secondary_skill = "Bow";
SKILL[primary_skill] = 70;
SKILL[secondary_skill] = 40;
price = 250;
}
function UnitMeleeRus9() {
NAME = "Elite Guard";
STR = 100;
DEX = 30;
CON = 100;
WEAPON_PRI = new WeaponClass("Spear", "Rus", 3);
WEAPON_SEC = new WeaponClass("Bow", "Rus", 1);
ARMOR = new Armor("Clothes", "Rus", 5);
HELMET = new Armor("Helmet", "Rus", 3);
HORSE = new Horse("white", 100, 10, 3, 0);
primary_skill = "Spear";
secondary_skill = "Bow";
SKILL[primary_skill] = 100;
SKILL[secondary_skill] = 60;
price = 1200;
}
function UnitMeleeRus10() {
NAME = "Great Hero";
STR = 160;
DEX = 40;
CON = 160;
WEAPON_PRI = new WeaponClass("TwohandedAxe", "Rus", 4);
WEAPON_SEC = new WeaponClass("Bow", "Rus", 1);
ARMOR = new Armor("Clothes", "Rus", 6);
HELMET = new Armor("Helmet", "Rus", 3);
HORSE = new Horse("white", 200, 10, 4, 0);
primary_skill = "Axe";
secondary_skill = "Bow";
SKILL[primary_skill] = 100;
SKILL[secondary_skill] = 100;
price = 1500;
}
function UnitRangedRus1() {
NAME = "Forest Guard";
STR = 20;
DEX = 30;
CON = 5;
WEAPON_PRI = new WeaponClass("Bow", "Rus", 1);
WEAPON_SEC = new WeaponClass("TwohandedSword", "Rus", 1);
ARMOR = null;
HELMET = null;
HORSE = null;
primary_skill = "Bow";
secondary_skill = "Sword";
SKILL[primary_skill] = 70;
SKILL[secondary_skill] = 35;
price = 70;
}
function UnitRangedRus2() {
NAME = "Forest Keeper";
STR = 70;
DEX = 95;
CON = 40;
WEAPON_PRI = new WeaponClass("Bow", "Rus", 2);
WEAPON_SEC = new WeaponClass("TwohandedSword", "Rus", 4);
ARMOR = null;
HELMET = null;
HORSE = null;
primary_skill = "Bow";
secondary_skill = "Sword";
SKILL[primary_skill] = 100;
SKILL[secondary_skill] = 60;
price = 500;
}
function UnitRangedRus3() {
NAME = "Crossbow Master";
STR = 65;
DEX = 40;
CON = 10;
WEAPON_PRI = new WeaponClass("Crossbow", "Rus", 2);
WEAPON_SEC = new WeaponClass("TwohandedAxe", "Rus", 2);
ARMOR = new Armor("Clothes", "Rus", 2);
HELMET = new Armor("Helmet", "Rus", 1);
HORSE = null;
primary_skill = "Crossbow";
secondary_skill = "Axe";
SKILL[primary_skill] = 70;
SKILL[secondary_skill] = 55;
price = 250;
}
function UnitRangedRus4() {
NAME = "Axe Thrower";
STR = 35;
DEX = 5;
CON = 20;
WEAPON_PRI = new WeaponClass("Throwing", "Rus", 2);
WEAPON_SEC = new WeaponClass("TwohandedAxe", "Rus", 1);
ARMOR = new Armor("Clothes", "Rus", 2);
HELMET = new Armor("Helmet", "Rus", 1);
HORSE = null;
primary_skill = "Throwing";
secondary_skill = "Axe";
SKILL[primary_skill] = 70;
SKILL[secondary_skill] = 55;
price = 150;
}
function UnitRangedRus5() {
NAME = "Elite Axe Thrower";
STR = 75;
DEX = 40;
CON = 70;
WEAPON_PRI = new WeaponClass("Throwing", "Rus", 4);
WEAPON_SEC = new WeaponClass("TwohandedAxe", "Rus", 3);
ARMOR = new Armor("Clothes", "Rus", 4);
HELMET = new Armor("Helmet", "Rus", 2);
HORSE = null;
primary_skill = "Throwing";
secondary_skill = "Axe";
SKILL[primary_skill] = 90;
SKILL[secondary_skill] = 60;
price = 500;
}
function UnitRangedRus6() {
NAME = "Elder";
STR = 25;
DEX = 95;
CON = 90;
WEAPON_PRI = new WeaponClass("Bow", "Rus", 2);
WEAPON_SEC = new WeaponClass("TwohandedMace", "Rus", 4);
ARMOR = new Armor("Clothes", "Rus", 1);
HELMET = null;
HORSE = new Horse("white", 150, 12, 2, 0);
primary_skill = "Bow";
secondary_skill = "Sword";
SKILL[primary_skill] = 100;
SKILL[secondary_skill] = 60;
price = 1100;
}
function UnitMeleeJap1() {
NAME = "Taekwon";
STR = 25;
DEX = 30;
CON = 5;
WEAPON_PRI = null;
WEAPON_SEC = null;
ARMOR = new Armor("Clothes", "Jap", 1);
HELMET = null;
HORSE = null;
primary_skill = "Fist";
secondary_skill = "none";
SKILL[primary_skill] = 100;
SKILL[secondary_skill] = 0;
price = 50;
}
function UnitMeleeJap2() {
NAME = "Apprentice";
STR = 30;
DEX = 35;
CON = 5;
WEAPON_PRI = new WeaponClass("Staff", "Jap", 1);
WEAPON_SEC = new WeaponClass("Bow", "Jap", 1);
ARMOR = new Armor("Clothes", "Jap", 1);
HELMET = null;
HORSE = null;
primary_skill = "Staff";
secondary_skill = "Bow";
SKILL[primary_skill] = 70;
SKILL[secondary_skill] = 30;
price = 90;
}
function UnitMeleeJap3() {
NAME = "High Apprentice";
STR = 40;
DEX = 45;
CON = 10;
WEAPON_PRI = new WeaponClass("Staff", "Jap", 3);
WEAPON_SEC = new WeaponClass("Bow", "Jap", 2);
ARMOR = new Armor("Clothes", "Jap", 2);
HELMET = new Armor("Helmet", "Jap", 1);
HORSE = null;
primary_skill = "Staff";
secondary_skill = "Bow";
SKILL[primary_skill] = 80;
SKILL[secondary_skill] = 30;
price = 120;
}
function UnitMeleeJap4() {
NAME = "Shogun Guard";
STR = 60;
DEX = 60;
CON = 20;
WEAPON_PRI = new WeaponClass("Staff", "Jap", 4);
WEAPON_SEC = new WeaponClass("Bow", "Jap", 3);
ARMOR = new Armor("Clothes", "Jap", 3);
HELMET = new Armor("Helmet", "Jap", 1);
HORSE = null;
primary_skill = "Staff";
secondary_skill = "Bow";
SKILL[primary_skill] = 85;
SKILL[secondary_skill] = 30;
price = 450;
}
function UnitMeleeJap5() {
NAME = "Elite Shogun Guard";
STR = 90;
DEX = 90;
CON = 20;
WEAPON_PRI = new WeaponClass("Staff", "Jap", 6);
WEAPON_SEC = new WeaponClass("Bow", "Jap", 3);
ARMOR = new Armor("Clothes", "Jap", 4);
HELMET = new Armor("Helmet", "Jap", 2);
HORSE = null;
primary_skill = "Staff";
secondary_skill = "Bow";
SKILL[primary_skill] = 85;
SKILL[secondary_skill] = 40;
price = 750;
}
function UnitMeleeJap6() {
NAME = "Ninja";
STR = 50;
DEX = 50;
CON = 15;
WEAPON_PRI = new WeaponClass("Katana", "Jap", 2);
WEAPON_SEC = new WeaponClass("Throwing", "Jap", 1);
ARMOR = new Armor("Clothes", "Jap", 3);
HELMET = new Armor("Helmet", "Jap", 1);
HORSE = null;
primary_skill = "FarEast";
secondary_skill = "none";
SKILL[primary_skill] = 70;
SKILL[secondary_skill] = 0;
price = 250;
}
function UnitMeleeJap7() {
NAME = "Elite Ninja";
STR = 75;
DEX = 75;
CON = 15;
WEAPON_PRI = new WeaponClass("NinjaTo", "Jap", 3);
WEAPON_SEC = new WeaponClass("NinjaTo", "Jap", 3);
ARMOR = new Armor("Clothes", "Jap", 4);
HELMET = new Armor("Helmet", "Jap", 2);
HORSE = null;
primary_skill = "FarEast";
secondary_skill = "Dual";
SKILL[primary_skill] = 90;
SKILL[secondary_skill] = 80;
price = 500;
}
function UnitMeleeJap8() {
NAME = "Master Ninja";
STR = 95;
DEX = 95;
CON = 25;
WEAPON_PRI = new WeaponClass("NinjaTo", "Jap", 5);
WEAPON_SEC = new WeaponClass("NinjaTo", "Jap", 5);
ARMOR = new Armor("Clothes", "Jap", 4);
HELMET = new Armor("Helmet", "Jap", 2);
HORSE = null;
primary_skill = "FarEast";
secondary_skill = "Dual";
SKILL[primary_skill] = 100;
SKILL[secondary_skill] = 100;
price = 950;
}
function UnitMeleeJap9() {
NAME = "Rhonin";
STR = 70;
DEX = 85;
CON = 20;
WEAPON_PRI = new WeaponClass("Katana", "Jap", 4);
WEAPON_SEC = new WeaponClass("Throwing", "Jap", 3);
ARMOR = new Armor("Clothes", "Jap", 3);
HELMET = new Armor("Helmet", "Jap", 2);
HORSE = null;
primary_skill = "FarEast";
secondary_skill = "none";
SKILL[primary_skill] = 90;
SKILL[secondary_skill] = 50;
price = 900;
}
function UnitMeleeJap10() {
NAME = "Samurai";
STR = 100;
DEX = 100;
CON = 25;
WEAPON_PRI = new WeaponClass("Katana", "Jap", 5);
WEAPON_SEC = new WeaponClass("Throwing", "Jap", 4);
ARMOR = new Armor("Clothes", "Jap", 5);
HELMET = new Armor("Helmet", "Jap", 2);
HORSE = null;
primary_skill = "FarEast";
secondary_skill = "none";
SKILL[primary_skill] = 100;
SKILL[secondary_skill] = 80;
price = 1300;
}
function UnitMeleeJap11() {
NAME = "Black Samurai";
STR = 120;
DEX = 120;
CON = 40;
WEAPON_PRI = new WeaponClass("Katana", "Jap", 6);
WEAPON_SEC = new WeaponClass("Throwing", "Jap", 5);
ARMOR = new Armor("Clothes", "Jap", 6);
HELMET = new Armor("Helmet", "Jap", 3);
HORSE = null;
primary_skill = "FarEast";
secondary_skill = "none";
SKILL[primary_skill] = 100;
SKILL[secondary_skill] = 100;
price = 5000;
}
function UnitRangedJap1() {
NAME = "Shuriken Thrower";
STR = 10;
DEX = 20;
CON = 5;
WEAPON_PRI = new WeaponClass("Throwing", "Jap", 1);
WEAPON_SEC = new WeaponClass("Staff", "Jap", 1);
ARMOR = null;
HELMET = null;
HORSE = null;
primary_skill = "FarEast";
secondary_skill = "Staff";
SKILL[primary_skill] = 60;
SKILL[secondary_skill] = 35;
price = 60;
}
function UnitRangedJap2() {
NAME = "Shuriken Master";
STR = 15;
DEX = 30;
CON = 10;
WEAPON_PRI = new WeaponClass("Throwing", "Jap", 2);
WEAPON_SEC = new WeaponClass("Staff", "Jap", 2);
ARMOR = new Armor("Clothes", "Jap", 1);
HELMET = null;
HORSE = null;
primary_skill = "FarEast";
secondary_skill = "Staff";
SKILL[primary_skill] = 70;
SKILL[secondary_skill] = 40;
price = 120;
}
function UnitRangedJap3() {
NAME = "Elite Shuriken Thrower";
STR = 20;
DEX = 60;
CON = 12;
WEAPON_PRI = new WeaponClass("Throwing", "Jap", 4);
WEAPON_SEC = new WeaponClass("Staff", "Jap", 3);
ARMOR = new Armor("Clothes", "Jap", 2);
HELMET = new Armor("Helmet", "Jap", 1);
HORSE = null;
primary_skill = "FarEast";
secondary_skill = "Staff";
SKILL[primary_skill] = 85;
SKILL[secondary_skill] = 50;
price = 500;
}
function UnitRangedJap4() {
NAME = "Black Shuriken Thrower";
STR = 40;
DEX = 80;
CON = 25;
WEAPON_PRI = new WeaponClass("Throwing", "Jap", 5);
WEAPON_SEC = new WeaponClass("Staff", "Jap", 5);
ARMOR = new Armor("Clothes", "Jap", 3);
HELMET = new Armor("Helmet", "Jap", 2);
HORSE = null;
primary_skill = "FarEast";
secondary_skill = "Staff";
SKILL[primary_skill] = 100;
SKILL[secondary_skill] = 75;
price = 710;
}
function UnitRangedJap5() {
NAME = "Shadow Bowman";
STR = 20;
DEX = 60;
CON = 12;
WEAPON_PRI = new WeaponClass("Bow", "Jap", 2);
WEAPON_SEC = new WeaponClass("Katana", "Jap", 1);
ARMOR = new Armor("Clothes", "Jap", 3);
HELMET = new Armor("Helmet", "Jap", 2);
HORSE = null;
primary_skill = "Bow";
secondary_skill = "FarEast";
SKILL[primary_skill] = 80;
SKILL[secondary_skill] = 55;
price = 250;
}
function UnitRangedJap6() {
NAME = "Ghost Bowman";
STR = 55;
DEX = 85;
CON = 15;
WEAPON_PRI = new WeaponClass("Bow", "Jap", 4);
WEAPON_SEC = new WeaponClass("Katana", "Jap", 4);
ARMOR = new Armor("Clothes", "Jap", 4);
HELMET = new Armor("Helmet", "Jap", 2);
HORSE = null;
primary_skill = "Bow";
secondary_skill = "FarEast";
SKILL[primary_skill] = 100;
SKILL[secondary_skill] = 80;
price = 550;
}
function UnitMeleeRog1() {
NAME = "Shield Rogue";
STR = 20;
DEX = 1;
CON = 15;
var _local3 = ["Viz", "Ger", "Rus", "Jap"];
var _local4 = ["OnehandedSword", "OnehandedAxe", "OnehandedMace"];
WEAPON_PRI = new WeaponClass(_local4[_root.dice(3)], "Rog", _root.d(2));
WEAPON_SEC = new WeaponClass("Shield", _local3[_root.dice(3)], 1);
ARMOR = ((_root.dice(2) == 0) ? (new Armor("Clothes", _local3[_root.dice(4)], 1)) : null);
HELMET = ((_root.dice(4) == 0) ? (new Armor("Helmet", _local3[_root.dice(4)], 1)) : null);
HORSE = ((_root.dice(7) == 0) ? (new Horse("any", 10, 0, 1, 0)) : null);
primary_skill = WEAPON_PRI.skill;
secondary_skill = "none";
SKILL[primary_skill] = 40;
SKILL[secondary_skill] = 0;
price = 15;
}
function UnitMeleeRog2() {
NAME = "Twohanded Rogue";
STR = 22;
DEX = 1;
CON = 12;
var _local3 = ["Viz", "Ger", "Rus", "Jap"];
var _local4 = ["TwohandedSword", "TwohandedAxe", "TwohandedMace"];
WEAPON_PRI = ((_root.dice(4) == 0) ? (new WeaponClass("Spear", _local3[_root.dice(3)], 1)) : (new WeaponClass(_local4[_root.dice(3)], "Rog", _root.d(2))));
WEAPON_SEC = null;
ARMOR = ((_root.dice(2) == 0) ? (new Armor("Clothes", _local3[_root.dice(4)], 1)) : null);
HELMET = ((_root.dice(4) == 0) ? (new Armor("Helmet", _local3[_root.dice(4)], 1)) : null);
HORSE = ((_root.dice(7) == 0) ? (new Horse("any", 10, 0, 1, 0)) : null);
primary_skill = WEAPON_PRI.skill;
secondary_skill = "none";
SKILL[primary_skill] = 40;
SKILL[secondary_skill] = 0;
price = 10;
}
function UnitMeleeRog3() {
NAME = "DEX Rogue";
STR = 5;
DEX = 40;
CON = 3;
var _local3 = ["Viz", "Ger", "Rus", "Jap"];
var _local4 = ["Staff", "Katana"];
WEAPON_PRI = ((_root.dice(2) == 0) ? (new WeaponClass("Katana", "Rog", _root.d(2))) : (new WeaponClass("Staff", "Jap", 1)));
WEAPON_SEC = null;
ARMOR = ((_root.dice(2) == 0) ? (new Armor("Clothes", _local3[_root.dice(4)], 1)) : null);
HELMET = ((_root.dice(4) == 0) ? (new Armor("Helmet", _local3[_root.dice(4)], 1)) : null);
HORSE = null;
primary_skill = WEAPON_PRI.skill;
secondary_skill = "none";
SKILL[primary_skill] = 40;
SKILL[secondary_skill] = 0;
price = 12;
}
function UnitRangedRog1() {
NAME = "Bow Rogue";
STR = 1;
DEX = 20;
CON = 4;
var _local3 = ["Viz", "Ger", "Rus", "Jap"];
WEAPON_PRI = new WeaponClass("Bow", _local3[_root.dice(4)], 1);
WEAPON_SEC = ((_root.dice(2) == 0) ? (new WeaponClass("Dagger", "Viz", 1)) : null);
ARMOR = ((_root.dice(2) == 0) ? (new Armor("Clothes", _local3[_root.dice(4)], 1)) : null);
HELMET = null;
HORSE = null;
primary_skill = WEAPON_PRI.skill;
secondary_skill = WEAPON_SEC.skill;
SKILL[primary_skill] = 40;
SKILL[secondary_skill] = 30;
price = 8;
}
function UnitRangedRog2() {
NAME = "Crossbow Rogue";
STR = 1;
DEX = 20;
CON = 4;
var _local3 = ["Viz", "Ger", "Rus", "Jap"];
WEAPON_PRI = new WeaponClass("Crossbow", _local3[_root.dice(3)], 1);
WEAPON_SEC = ((_root.dice(2) == 0) ? (new WeaponClass("Dagger", "Viz", 1)) : null);
ARMOR = ((_root.dice(2) == 0) ? (new Armor("Clothes", _local3[_root.dice(4)], 1)) : null);
HELMET = null;
HORSE = null;
primary_skill = WEAPON_PRI.skill;
secondary_skill = WEAPON_SEC.skill;
SKILL[primary_skill] = 40;
SKILL[secondary_skill] = 25;
price = 10;
}
function UnitRangedRog3() {
NAME = "Throwing Rogue";
STR = 20;
DEX = 20;
CON = 1;
var _local3 = ["Ger", "Rus", "Jap", "Viz"];
WEAPON_PRI = new WeaponClass("Throwing", _local3[_root.dice(3)], 1);
WEAPON_SEC = ((_root.dice(2) == 0) ? (new WeaponClass("Staff", "Jap", 1)) : null);
ARMOR = ((_root.dice(3) == 0) ? (new Armor("Clothes", _local3[_root.dice(4)], 1)) : null);
HELMET = null;
HORSE = null;
primary_skill = WEAPON_PRI.skill;
secondary_skill = WEAPON_SEC.skill;
SKILL[primary_skill] = 40;
SKILL[secondary_skill] = 40;
price = 12;
}
}
Symbol 2059 MovieClip [__Packages.UnitInfo] Frame 0
class UnitInfo extends Object
{
var TYPE, NATION, ID, COUNT;
function UnitInfo (tp, nt, id, cn) {
super();
TYPE = tp;
NATION = nt;
ID = id;
COUNT = ((cn == undefined) ? 1 : (cn));
}
function getUnit(gender) {
return(new Unit(TYPE, NATION, ID));
}
}
Symbol 2060 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 2061 MovieClip [__Packages.Creature] Frame 0
class Creature extends MovieClip
{
var isHorseman, speed, _xscale, _yscale, X, _x, Y, _y, moveX, moveY, isBusy, isDead, team, body, t_bef, t_aft, bar_clr, borders, attacking, gox, goy, disapear_time, inner_depth, nextX, nextY, swapDepths, MOVE_FRAMES, HP, runAnim, atkAnim, wpn, secAtkAnim, wpnSec, secRunAnim, ANTI_FLEE, DEF, MAX_HP, light_circle, onEnterFrame, unit_ref, _name, attachMovie, FLEE, SHIELD_FLEE, preferRanged;
function Creature () {
super();
isHorseman = false;
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;
isBusy = false;
isDead = false;
if (team == 0) {
body._xscale = -100;
}
t_bef = 0;
t_aft = 0;
bar_clr = new Color(borders.hp_bar);
attacking = null;
gox = null;
goy = null;
initPosition();
disapear_time = 0;
inner_depth = 1;
}
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 (!isBusy) {
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() {
isBusy = true;
if (wpn.TYPE == "Melee") {
if (secAtkAnim == "bow") {
body.gotoAndPlay("bow_on");
} else {
body.gotoAndPlay("crossbow_on");
}
} else if (atkAnim == "bow") {
body.gotoAndPlay("bow_off");
} else {
body.gotoAndPlay("crossbow_off");
}
}
function onAnimComplete() {
isBusy = false;
if (!isDead) {
body.gotoAndStop(atkAnim);
}
}
function onSwitchWeapons() {
var _local2 = wpn;
wpn = wpnSec;
wpnSec = _local2;
_local2 = runAnim;
runAnim = secRunAnim;
secRunAnim = _local2;
_local2 = atkAnim;
atkAnim = secAtkAnim;
secAtkAnim = _local2;
initGuns();
onAnimComplete();
}
function onEndAttack() {
onAnimComplete();
}
function strike(who, useSecondWeapon) {
if (team != who.team) {
var _local5 = _root.percent((useSecondWeapon ? (wpnSec.CRIT) : (wpn.CRIT)));
var _local6 = (useSecondWeapon ? (wpnSec.dmg) : (wpn.dmg));
var _local4 = (useSecondWeapon ? (wpnSec.rnd) : (wpn.rnd));
if ((useSecondWeapon ? (wpnSec.TYPE) : (wpn.TYPE == "Melee"))) {
var _local11 = (((body._xscale > 0) != (who.body._xscale > 0)) ? (who.SHIELD_FLEE) : 0);
var _local10 = ((useSecondWeapon ? (wpnSec.HIT) : (wpn.HIT)) * (100 - ((who.FLEE * ANTI_FLEE) + _local11))) / 100;
if (_root.percent(_local10)) {
who.takeDamage(_local6 + _root.dice(_local4), this, _local5);
} else {
addMessage("miss", false);
}
} else {
var _local8 = (useSecondWeapon ? (body.weapR._currentframe) : (body.weapL._currentframe));
var _local9 = ((body._xscale > 0) ? 1 : -1);
var _local10 = (useSecondWeapon ? (wpnSec.HIT) : (wpn.HIT));
if (_root.percent(_local10)) {
_root.addProjectile(X, Y, who.X, who.Y, _local6, _local4, _local5, _local9, _local8, team);
} else if (_root.percent(_local10 * 1.5)) {
_root.addProjectile(X, Y, who.X + _root.dd(1), who.Y + _root.dd(1), _local6, _local4, _local5, _local9, _local8, team);
} else if (_root.percent(_local10 * 2)) {
_root.addProjectile(X, Y, who.X + _root.dd(2), who.Y + _root.dd(2), _local6, _local4, _local5, _local9, _local8, team);
} else if (_root.percent(_local10 * 3)) {
_root.addProjectile(X, Y, who.X + _root.dd(3), who.Y + _root.dd(3), _local6, _local4, _local5, _local9, _local8, team);
} else {
_root.addProjectile(X, Y, who.X + _root.dd(4), who.Y + _root.dd(4), _local6, _local4, _local5, _local9, _local8, team);
}
}
} else {
attacking = null;
}
}
function takeDamage(dmg, who, is_crit) {
if (isDead) {
return(undefined);
}
if (who == undefined) {
who = null;
}
if (((attacking != null) && (who != null)) && (who.team != team)) {
gox = null;
goy = null;
attacking = who;
}
if (!is_crit) {
dmg = dmg - DEF;
if (dmg < 0) {
dmg = 0;
}
}
addMessage(dmg, is_crit);
HP = HP - dmg;
if (HP <= 0) {
HP = 0;
die();
return(undefined);
}
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);
}
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 die() {
if (!isDead) {
if (isHorseman) {
body.gotoAndPlay("die_horse");
} else {
switch (atkAnim) {
case "sword" :
case "double" :
body.gotoAndPlay("die_onehanded");
break;
case "suriken" :
case "bow" :
case "crossbow" :
body.gotoAndPlay("die_ranged");
break;
default :
body.gotoAndPlay("die_twohanded");
}
}
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;
if (team != 0) {
if (_root.percent(10)) {
switch (_root.dice(4)) {
case 0 :
unit_ref.WEAPON_PRI.ENCH_ID = _root.d(24);
break;
case 1 :
unit_ref.WEAPON_SEC.ENCH_ID = _root.d(24);
break;
case 2 :
unit_ref.ARMOR.ENCH_ID = _root.d(24);
break;
case 3 :
unit_ref.HELMET.ENCH_ID = _root.d(24);
}
}
_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);
}
if (_name == "hero0") {
_root.unloadMap();
_root.gotoAndStop("GAME_OVER");
}
}
}
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 initGuns() {
var _local2 = body.weapR._currentframe;
body.weapR.gotoAndStop(body.weapL._currentframe);
body.weapL.gotoAndStop(_local2);
}
function addMessage(some_text, is_crit) {
attachMovie((is_crit ? "FlyCritDamage" : "FlyDamage"), "flying_damage_" + inner_depth, inner_depth, {_x:0, _y:100});
this["flying_damage_" + inner_depth].inner.value_txt.text = some_text;
inner_depth = inner_depth + ((inner_depth < 15) ? 1 : -14);
}
function initUnit(hero) {
unit_ref = hero;
var _local10 = hero.NATION.toLowerCase();
DEF = 0;
if (hero.DEX <= 100) {
FLEE = Math.floor(hero.DEX * 0.8);
} else {
FLEE = 80 + Math.floor((hero.DEX - 100) * 0.15);
}
ANTI_FLEE = (100 - Math.round(hero.DEX / 3)) / 100;
SHIELD_FLEE = ((hero.WEAPON_SEC.TYPE == "Shield") ? (hero.WEAPON_SEC.crit) : 0);
MAX_HP = (hero.CON * 5) + (hero.LEVEL * 20);
body.arm_l.gotoAndStop((hero.GENDER + "_") + _local10);
body.arm_r.gotoAndStop((hero.GENDER + "_") + _local10);
body.hand_l.gotoAndStop((hero.GENDER + "_") + _local10);
body.hand_r.gotoAndStop((hero.GENDER + "_") + _local10);
body.footL.gotoAndStop((hero.GENDER + "_") + _local10);
body.footR.gotoAndStop((hero.GENDER + "_") + _local10);
body.legL.gotoAndStop((hero.GENDER + "_") + _local10);
body.legR.gotoAndStop((hero.GENDER + "_") + _local10);
body.body.gotoAndStop((hero.GENDER + "_") + _local10);
body.head.gotoAndStop((hero.GENDER + "_") + _local10);
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;
HP = HP + hero.HORSE.bonus_HP;
MAX_HP = MAX_HP + hero.HORSE.bonus_HP;
FLEE = FLEE / 2;
} else {
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;
} 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 _local6 = hero.WEAPON_PRI;
var _local8 = hero.WEAPON_SEC;
if (_local6 == null) {
_local6 = new WeaponClass("Fists", "All", 0);
}
if ((_local8 == null) && (_local6.rng > 0)) {
_local8 = new WeaponClass("Fists", "All", 0);
}
body.weapL.gotoAndStop(_local6.FRAME);
body.weapR.gotoAndStop(((_local8 != null) ? (_local8.FRAME) : 169));
if ((!_local6.twohanded) && (!_local8.twohanded)) {
if ((_local8.TYPE == "Shield") || (_local8 == null)) {
wpn = new Weapon(((_local6.rng == 0) ? "Melee" : "Ranged"), _local6.dmg, _local6.rnd, _local6.rng, hero.SKILL[_local6.skill], _local6.crit + Math.floor(hero.SKILL[_local6.skill] / 10), _local6.t_bef, _local6.t_aft);
runAnim = "run_sword";
atkAnim = "sword";
secRunAnim = "none";
secAtkAnim = "none";
wpnSec = null;
} else {
wpn = new Weapon(((_local6.rng == 0) ? "Melee" : "Ranged"), _local6.dmg, _local6.rnd, _local6.rng, hero.SKILL[_local6.skill], _local6.crit + Math.floor(hero.SKILL[_local6.skill] / 10), Math.max(_local6.t_bef, _local8.t_bef), Math.max(_local6.t_aft, _local8.t_aft));
wpnSec = new Weapon(((_local8.rng == 0) ? "Melee" : "Ranged"), _local8.dmg, _local8.rnd, _local8.rng, (hero.SKILL[_local8.skill] * hero.SKILL.Dual) / 100, _local8.crit + Math.floor(hero.SKILL[_local8.skill] / 10), Math.max(_local6.t_bef, _local8.t_bef), Math.max(_local6.t_aft, _local8.t_aft));
runAnim = "run_double";
atkAnim = "double";
secRunAnim = "none";
secAtkAnim = "none";
}
preferRanged = false;
} else {
wpn = new Weapon(((_local6.rng == 0) ? "Melee" : "Ranged"), _local6.dmg, _local6.rnd, _local6.rng, hero.SKILL[_local6.skill], _local6.crit + Math.floor(hero.SKILL[_local6.skill] / 10), _local6.t_bef, _local6.t_aft);
wpnSec = new Weapon(((_local8.rng == 0) ? "Melee" : "Ranged"), _local8.dmg, _local8.rnd, _local8.rng, hero.SKILL[_local8.skill], _local8.crit + Math.floor(hero.SKILL[_local8.skill] / 10), _local8.t_bef, _local8.t_aft);
if ((preferRanged = _local6.rng > 0)) {
switch (_local8.TYPE) {
case "OnehandedSword" :
case "OnehandedAxe" :
case "OnehandedMace" :
case "TwohandedSword" :
secRunAnim = "run_twohandedsword";
secAtkAnim = "twohanded_sword";
break;
case "TwohandedAxe" :
case "TwohandedMace" :
secRunAnim = "run_axe";
secAtkAnim = "twohanded_axe";
break;
case "NinjaTo" :
case "Katana" :
secRunAnim = "run_katana";
secAtkAnim = "katana";
break;
case "Staff" :
secRunAnim = "run_axe";
secAtkAnim = "staff";
break;
case "Spear" :
secRunAnim = "run_axe";
secAtkAnim = "spear";
break;
case "Dagger" :
secRunAnim = "run_twohandedsword";
secAtkAnim = "dagger";
break;
case "Fists" :
secRunAnim = "run_double";
secAtkAnim = "fists";
}
switch (_local6.TYPE) {
case "Bow" :
runAnim = "run_bow";
atkAnim = "bow";
break;
case "Crossbow" :
runAnim = "run_crossbow";
atkAnim = "crossbow";
break;
case "Throwing" :
runAnim = "run_suriken";
atkAnim = "suriken";
}
} else {
switch (_local6.TYPE) {
case "OnehandedSword" :
case "OnehandedAxe" :
case "OnehandedMace" :
case "TwohandedSword" :
runAnim = "run_twohandedsword";
atkAnim = "twohanded_sword";
break;
case "TwohandedAxe" :
case "TwohandedMace" :
runAnim = "run_axe";
atkAnim = "twohanded_axe";
break;
case "NinjaTo" :
case "Katana" :
runAnim = "run_katana";
atkAnim = "katana";
break;
case "Staff" :
runAnim = "run_axe";
atkAnim = "staff";
break;
case "Spear" :
runAnim = "run_axe";
atkAnim = "spear";
break;
case "Dagger" :
runAnim = "run_twohandedsword";
atkAnim = "dagger";
break;
case "Fists" :
runAnim = "run_double";
atkAnim = "fists";
}
switch (_local8.TYPE) {
case "Bow" :
secRunAnim = "run_bow";
secAtkAnim = "bow";
break;
case "Crossbow" :
secRunAnim = "run_crossbow";
secAtkAnim = "crossbow";
break;
case "Throwing" :
secRunAnim = "run_suriken";
secAtkAnim = "suriken";
}
}
}
if ((atkAnim == "double") && (wpn.t_aft < 40)) {
wpn.t_aft = 40;
}
var _local13 = Math.floor(hero.STR / 2);
if (wpn.TYPE == "Melee") {
wpn.dmg = wpn.dmg + _local13;
}
if (wpnSec.TYPE == "Melee") {
wpnSec.dmg = wpnSec.dmg + _local13;
}
var _local9 = ["WEAPON_PRI", "WEAPON_SEC", "ARMOR", "HELMET"];
var _local7 = 0;
while (_local7 < _local9.length) {
if (hero[_local9[_local7]].ENCH_ID != 0) {
var _local3 = new Enchant(hero[_local9[_local7]].ENCH_ID);
var _local4 = 0;
while (_local4 < _local3.hero_bonus.length) {
this[_local3.hero_bonus[_local4]] = Math.round(this[_local3.hero_bonus[_local4]] * _local3.hero_amount[_local4]);
_local4++;
}
_local4 = 0;
while (_local4 < _local3.wpn_bonus.length) {
wpn[_local3.wpn_bonus[_local4]] = wpn[_local3.wpn_bonus[_local4]] + _local3.wpn_amount[_local4];
wpnSec[_local3.wpn_bonus[_local4]] = wpnSec[_local3.wpn_bonus[_local4]] + _local3.wpn_amount[_local4];
_local4++;
}
}
_local7++;
}
HP = MAX_HP;
body.gotoAndStop(atkAnim);
if ((team == 0) && (hero.LEVEL == 0)) {
var _local12 = Math.floor(_global.MAIN_HERO.INT / 2);
_local12 = _local12 + Math.floor(_global.MAIN_HERO.SKILL.ArtOfWar / 2);
if (hero.NATION == _global.MAIN_HERO.NATION) {
_local12 = _local12 + _global.MAIN_HERO.SKILL.Patriotism;
}
var _local11 = 1 + (_local12 / 100);
MAX_HP = Math.round(MAX_HP * _local11);
HP = Math.round(HP * _local11);
wpn.dmg = Math.round(wpn.dmg * _local11);
wpn.rnd = Math.round(wpn.rnd * _local11);
wpnSec.dmg = Math.round(wpnSec.dmg * _local11);
wpnSec.rnd = Math.round(wpnSec.rnd * _local11);
}
}
}
Symbol 2062 MovieClip [__Packages.Weapon] Frame 0
class Weapon
{
var TYPE, dmg, rnd, rng, HIT, CRIT, t_bef, t_aft;
function Weapon (tp, dm, rd, rn, hi, crt, tbef, taft) {
TYPE = tp;
dmg = dm;
rnd = rd;
rng = rn;
HIT = hi;
CRIT = crt;
t_bef = tbef;
t_aft = taft;
}
}
Symbol 2063 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 Pionts 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 2064 MovieClip [__Packages.Soldier] Frame 0
class Soldier extends Creature
{
var Creature, light_circle, team, holdPosition, borders, mustSwapGuns, mustMoveOut, moveX, moveY, isBusy, t_bef, t_aft, dist, attacking, preferRanged, switchWeapons, X, Y, wpn, body, gox, goy, moveOnX, moveOnY, moveNewStep, moveComplete, stopMove, continueMove, atkAnim, strike, startMove, HP;
function Soldier () {
super();
Creature();
light_circle.gotoAndStop(team + 1);
light_circle._visible = _global.HIGHLIGHT_TROOPS;
holdPosition = false;
borders._visible = false;
mustSwapGuns = false;
mustMoveOut = false;
}
function readyForAction() {
return(((((moveX == 0) && (moveY == 0)) && (!isBusy)) && (t_bef == 0)) && (t_aft == 0));
}
function chooseEnemyRanged() {
var _local8 = null;
var _local6 = 10000;
var _local7 = false;
var _local4 = 0;
while (_local4 < _global.HERO) {
if ((_root["hero" + _local4].HP > 0) && (_root["hero" + _local4].team != team)) {
if (_local7 == canHitRanged(_root["hero" + _local4])) {
var _local5 = dist(_root["hero" + _local4]);
if (_local5 < _local6) {
_local8 = _root["hero" + _local4];
_local6 = _local5;
}
} else if (!_local7) {
_local7 = true;
_local8 = _root["hero" + _local4];
_local6 = dist(_root["hero" + _local4]);
}
}
_local4++;
}
attacking = _local8;
}
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 canHitRanged(man) {
var _local8 = dist(man);
if (_local8 == 1) {
switchWeapons();
return(true);
}
if (Math.abs((X - man.X) / (Y - man.Y)) >= _global.S_ANGLE) {
if (_local8 <= wpn.rng) {
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) {
if ((man.Y == Y) && (Math.abs(X - man.X) == 1)) {
body._xscale = (X - man.X) * 100;
return(true);
}
if ((man.nextY == Y) && (Math.abs(X - man.nextX) == 1)) {
body._xscale = (X - man.X) * 100;
return(true);
}
var _local5 = _global.field[X - _root.znak(body._xscale)][Y].who;
if (((_local5 != null) && (_local5.HP > 0)) && (_local5.team != team)) {
attacking = _local5;
return(true);
}
if (preferRanged && (dist(attacking) > 1)) {
switchWeapons();
return(true);
}
return(false);
}
function comeCloserRanged() {
var _local5 = Math.abs((X - attacking.X) / (Y - attacking.Y)) >= _global.S_ANGLE;
var _local4 = dist(attacking) <= wpn.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;
if (!_global.RAGE[team]) {
t_bef = wpn.t_bef;
} else {
t_bef = 1;
}
}
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" + wpn.TYPE](attacking)) {
moveX = 0;
moveY = 0;
} else if (!holdPosition) {
this["comeCloser" + wpn.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 (!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 waitForFire() {
if (t_aft > 0) {
t_aft--;
} else {
if (t_bef == 1) {
if (!_global.RAGE[team]) {
t_aft = wpn.t_aft;
} else {
t_aft = _global.MIN_ATTACK_TIME[atkAnim];
}
body.play();
}
t_bef--;
}
}
function directHit(useSecondWeapon) {
if (useSecondWeapon == undefined) {
useSecondWeapon = false;
}
strike(attacking, useSecondWeapon);
}
function AI() {
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 (this["canHit" + wpn.TYPE](attacking)) {
attackEnemy();
} else if (!holdPosition) {
this["comeCloser" + wpn.TYPE]();
if (!startMove()) {
findMove();
startMove();
}
}
} else {
this["chooseEnemy" + wpn.TYPE]();
}
} else if (!isBusy) {
if ((moveX == 0) && (moveY == 0)) {
waitForFire();
} else {
moveOn();
}
}
}
function onEnterFrame() {
if (HP > 0) {
AI();
}
}
}
Symbol 2065 MovieClip [__Packages.Player] Frame 0
class Player extends Creature
{
var team, Creature, moveX, moveY, startMove, nextX, X, canGo, nextY, Y, _y, _x, moveOnX, moveOnY, moveNewStep, moveComplete, continueMove, stopMove, isBusy, t_bef, atkAnim, wpn, t_aft, body, secAtkAnim, switchWeapons, strike, HP;
function Player () {
super();
team = 0;
Creature();
}
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(((!isBusy) && (t_bef == 0)) && (t_aft <= (wpn.t_aft - _global.MIN_ATTACK_TIME[atkAnim])));
}
function readyForAction() {
return(((((!isBusy) && (t_bef == 0)) && (t_aft == 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))) {
var _local4 = -_root.znak(body._xscale);
if ((((noEnemy(X + _local4, Y) && (noEnemy(X + _local4, Y - 1))) && (noEnemy(X + _local4, Y + 1))) && (noEnemy(X + (_local4 * 2), Y))) && (!(((noEnemy(X - _local4, Y) && (noEnemy(X - _local4, Y - 1))) && (noEnemy(X - _local4, Y + 1))) && (noEnemy(X - (_local4 * 2), Y))))) {
body._xscale = body._xscale * -1;
}
t_aft = wpn.t_aft;
body.play();
} else if (Key.isDown(_global.CO_SWITCH) && (secAtkAnim != "No")) {
switchWeapons();
}
}
function directHit(useSecondWeapon) {
if (useSecondWeapon == undefined) {
useSecondWeapon = false;
}
this["hit" + wpn.TYPE](useSecondWeapon);
}
function hitMelee(useSecondWeapon) {
if (_global.field[X - (body._xscale / 100)][Y].who != null) {
strike(_global.field[X - (body._xscale / 100)][Y].who, useSecondWeapon);
} else if (_global.field[X - (body._xscale / 100)][Y - 1].who != null) {
strike(_global.field[X - (body._xscale / 100)][Y - 1].who, useSecondWeapon);
} else if (_global.field[X - (body._xscale / 100)][Y + 1].who != null) {
strike(_global.field[X - (body._xscale / 100)][Y + 1].who, useSecondWeapon);
} else if (_global.field[X - (body._xscale / 50)][Y].who != null) {
strike(_global.field[X - (body._xscale / 50)][Y].who, useSecondWeapon);
}
}
function hitRanged(mod, useSecondWeapon) {
var _local3 = ((body._xscale > 0) ? -1 : 1);
var _local2 = (useSecondWeapon ? (body.weapR._currentframe) : (body.weapL._currentframe));
var _local4 = (((_local2 == 134) || (_local2 == 135)) ? 6 : 12);
strike({X:X + (_local4 * _local3), Y:Y}, useSecondWeapon);
}
function onEnterFrame() {
if (HP > 0) {
if (t_aft > 0) {
t_aft--;
}
if (readyForAction()) {
attack();
}
if (readyToGo()) {
moveOn();
}
}
}
}
Symbol 2066 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 2067 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(undefined);
}
X = _local5;
Y = _local4;
swapDepths(_root.getDepthMan(_local5, _local4) + 2);
if ((_local5 == dstX) && (_local4 == dstY)) {
endMove();
}
}
}
}
Symbol 2068 MovieClip [__Packages.Grenade] Frame 0
class Grenade extends Projectile
{
var speed, init, dst_x, dstX, dst_y, dstY, len, _y, _x, moving, gotoAndPlay, X, Y, rnd, dmg, crit, gren, moveOn;
function Grenade () {
super();
speed = 10;
init();
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;
gotoAndPlay(2);
}
function explode() {
var _local5 = X - 2;
while (_local5 <= (X + 2)) {
var _local4 = Y - 2;
while (_local4 <= (Y + 2)) {
if (_global.field[_local5][_local4].who != null) {
_global.field[_local5][_local4].who.takeDamage(dmg + _root.d(rnd), null, crit);
}
_local4++;
}
_local5++;
}
}
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 2069 MovieClip [__Packages.ArrowStorm] Frame 0
class ArrowStorm extends MovieClip
{
var play_count, dmg, crit;
function ArrowStorm () {
super();
play_count = 0;
dmg = new Array();
crit = new Array();
}
function addDamage(dm, cr) {
dmg.push(dm);
crit.push(cr);
}
}
Symbol 2070 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 2071 MovieClip [__Packages.Arrow] Frame 0
class Arrow extends Projectile
{
var speed, init, moving, removeMovieClip, Y, X, team, _xscale, rnd, dmg, crit, moveOn;
function Arrow () {
super();
speed = 20;
init();
}
function endMove() {
moving = false;
checkHit();
removeMovieClip();
}
function checkHit() {
var _local4 = _global.field[X][Y].who;
if (((_local4 != null) && (_local4.HP > 0)) && (_local4.team != team)) {
var _local6 = (((_xscale > 0) != (_local4.body._xscale > 0)) ? (_local4.SHIELD_FLEE) : 0);
var _local5 = 100 - ((_local4.FLEE + _local6) * 0.8);
if (_root.percent(_local5)) {
_local4.takeDamage(dmg + _root.d(rnd), null, crit);
moving = false;
removeMovieClip();
}
}
}
function onEnterFrame() {
if (moving) {
checkHit();
moveOn();
if (!_global.field[X][Y].free) {
removeMovieClip();
}
}
}
}
Symbol 2072 MovieClip [__Packages.Screen] Frame 0
class Screen extends MovieClip
{
var rage_timer, rage_anim, portrait, hint, potion_1_txt, potion_2_txt, potion_3_txt, scroll_1_txt, scroll_2_txt, scroll_3_txt, control_shower, control_wall, unit_hp_txt, hp_txt, hp_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;
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;
reinitArrowStorm();
}
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;
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 _local8 = 0;
var _local3 = 0;
while (_local3 < _global.FRIENDS.length) {
if (_global.FRIENDS[_local3].WEAPON_PRI.TYPE == "Bow") {
var _local4 = _global.FRIENDS[_local3].WEAPON_PRI.dmg + _root.dice(_global.FRIENDS[_local3].WEAPON_PRI.rnd);
var _local5 = _root.percent(_global.FRIENDS[_local3].WEAPON_PRI.crit);
_root.addArrowShower(xx + _root.dd(2), yy + _root.dd(2), _local4, _local5);
_root.addArrowShower(xx + _root.dd(2), yy + _root.dd(2), _local4, _local5);
if (_local8 >= 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 = _root.percent(_global.FRIENDS[_local3].WEAPON_PRI.crit);
_root.addArrowWall(xx, yy + _root.dd(2), _local4, _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);
}
}
}
Symbol 2073 MovieClip [__Packages.BarracksIcon] Frame 0
class BarracksIcon extends MovieClip
{
var is_user, _name, stop, anim, enabled, attachMovie, _parent, pos;
function BarracksIcon () {
super();
is_user = _name.substr(0, 4) != "unit";
(stop());// not popped
}
function setUnit(unit_ref) {
anim.removeMovieClip();
unit = unit_ref;
var _local2 = unit.getUnit();
if (((unit_ref == undefined) || (unit_ref == null)) || (_local2.NAME == undefined)) {
enabled = false;
return(undefined);
}
enabled = true;
attachMovie(((_local2.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(_local2);
}
function setUnitClass(unit_ref) {
anim.removeMovieClip();
if ((unit_ref == undefined) && (unit_ref == null)) {
enabled = false;
return(undefined);
}
enabled = true;
unit = unit_ref.getUnitInfo();
attachMovie(((unit_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(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() {
_parent.unit_name_txt.text = anim.unit_ref.NAME;
_parent.unit_stats_txt.text = ("Hit Pionts: " + anim.MAX_HP) + newline;
_parent.unit_stats_txt.text = _parent.unit_stats_txt.text + (("Defence: " + anim.DEF) + newline);
_parent.unit_stats_txt.text = _parent.unit_stats_txt.text + (((("Dodge: " + anim.FLEE) + "%") + ((anim.SHIELD_FLEE > 0) ? (("+" + anim.SHIELD_FLEE) + "% (Shield)") : "")) + newline);
_parent.unit_stats_txt.text = _parent.unit_stats_txt.text + (((("Damage: " + anim.wpn.dmg) + "-") + (anim.wpn.dmg + anim.wpn.rnd)) + newline);
_parent.unit_stats_txt.text = _parent.unit_stats_txt.text + (("Attack Speed: " + (Math.round((100 / (anim.wpn.t_bef + anim.wpn.t_aft)) * 100) / 100)) + newline);
if (anim.wpn.rng > 0) {
_parent.unit_stats_txt.text = _parent.unit_stats_txt.text + (("Range: " + anim.wpn.rng) + newline);
}
_parent.unit_stats_txt.text = _parent.unit_stats_txt.text + (("Hit rate: " + anim.wpn.HIT) + "%\n");
_parent.unit_stats_txt.text = _parent.unit_stats_txt.text + (("Crit Rate: " + anim.wpn.CRIT) + "%\n\n");
_parent.unit_stats_txt.text = _parent.unit_stats_txt.text + (("Cost " + anim.unit_ref.price) + " gp.");
}
function onPress() {
if (unit == null) {
return(undefined);
}
if ((!is_user) && (anim.unit_ref.price > _global.GOLD)) {
_parent.unit_name_txt.text = "Not enough gold!";
_parent.unit_stats_txt.text = "";
} else {
_parent._parent.dragUnitOn(this);
}
}
function onRelease() {
_parent._parent.dragUnitOff();
}
function onReleaseOutside() {
var _local4 = "NONE";
var _local3 = 0;
while (_local3 < 8) {
if (_parent["unit_" + _local3].hitTest(_parent._xmouse, _parent._ymouse, false)) {
_local4 = "unit_" + _local3;
break;
}
_local3++;
}
if (_local4 == "NONE") {
_local3 = 0;
while (_local3 < 10) {
if (_parent["army_" + _local3].hitTest(_parent._xmouse, _parent._ymouse, false)) {
_local4 = "army_" + _local3;
break;
}
_local3++;
}
if (_local4 == "NONE") {
_local3 = 0;
while (_local3 < 8) {
if (_parent["reserve_" + _local3].hitTest(_parent._xmouse, _parent._ymouse, false)) {
_local4 = "reserve_" + _local3;
break;
}
_local3++;
}
}
}
if (_local4 != "NONE") {
if (is_user) {
if (!_parent[_local4].is_user) {
_global.GOLD = _global.GOLD + Math.floor(anim.unit_ref.price / 4);
_global.FRIENDS.splice(pos, 1);
} else {
var _local5 = _global.FRIENDS[pos];
_global.FRIENDS[pos] = _global.FRIENDS[_parent[_local4].pos];
_global.FRIENDS[_parent[_local4].pos] = _local5;
}
} else if (_parent[_local4].is_user && (anim.unit_ref.price <= _global.GOLD)) {
_global.GOLD = _global.GOLD - anim.unit_ref.price;
if (_global.FRIENDS[_parent[_local4].pos]) {
_global.FRIENDS.splice(_parent[_local4].pos, 0, unit.getUnit());
} else {
_global.FRIENDS[_parent[_local4].pos] = unit.getUnit();
}
}
}
_parent.money_txt.text = _global.GOLD + " gold";
_parent._parent.barracksShowUser();
_parent._parent.dragUnitOff();
}
function onRollOut() {
_parent.unit_name_txt.text = "";
_parent.unit_stats_txt.text = "";
}
var unit = null;
}
Symbol 2074 MovieClip [__Packages.StoreIcon] Frame 0
class StoreIcon extends MovieClip
{
var is_user, _name, stop, item, amount_txt, ench_back, gotoAndStop, _parent, pos;
function StoreIcon () {
super();
is_user = _name.substr(0, 4) == "user";
(stop());// not popped
}
function setItem(item_ref) {
item = item_ref;
var _local2 = item.getItem();
amount_txt.text = (is_user ? (String(item.COUNT)) : "");
ench_back._visible = item.ENCH_ID != 0;
gotoAndStop(_local2.getIconFrame());
}
function onRollOver() {
var _local2 = item.getItem();
_parent.item_name_txt.text = _local2.NAME;
switch (item.CATEGORY) {
case "WeaponClass" :
if (_local2.TYPE != "Shield") {
_parent.item_stats_txt.text = ((("Damage: " + _local2.dmg) + "-") + (_local2.dmg + _local2.rnd)) + newline;
_parent.item_stats_txt.text = _parent.item_stats_txt.text + (("Attack Speed: " + (Math.round((100 / (_local2.t_bef + _local2.t_aft)) * 100) / 100)) + newline);
if (_local2.rng > 0) {
_parent.item_stats_txt.text = _parent.item_stats_txt.text + (("Range: " + _local2.rng) + newline);
}
_parent.item_stats_txt.text = _parent.item_stats_txt.text + (("Crit Rate: " + _local2.crit) + "%\n");
_parent.item_stats_txt.text = _parent.item_stats_txt.text + ((_local2.twohanded ? "Twohanded" : "Onehanded") + newline);
} else {
_parent.item_stats_txt.text = ("Dodge chance: " + _local2.crit) + "%\n";
}
break;
case "Armor" :
_parent.item_stats_txt.text = ("Defence: " + _local2.value) + newline;
}
if (_local2.require_param != null) {
_parent.item_stats_txt.text = _parent.item_stats_txt.text + (((("Requires: " + _local2.require_value) + " ") + _local2.require_param) + "\n\n");
}
_parent.item_stats_txt.text = _parent.item_stats_txt.text + (("Cost " + _local2.price) + " gp.");
}
function onPress() {
var _local3 = item.getItem();
if ((!is_user) && (_local3.price > _global.GOLD)) {
_parent.item_name_txt.text = "Not enough gold!";
_parent.item_stats_txt.text = "";
} else {
_parent._parent.dragItemOn(item);
}
}
function onRelease() {
_parent._parent.dragItemOff();
}
function onReleaseOutside() {
var _local6 = (is_user ? "trader_" : "user_");
var _local5 = false;
var _local4 = 0;
while (_local4 < 7) {
if (_parent[_local6 + _local4].hitTest(_parent._xmouse, _parent._ymouse, false)) {
_local5 = true;
break;
}
_local4++;
}
if (_local5) {
var _local7 = item.getItem();
if (is_user) {
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 = _local7.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(_local7.getIconFrame());
} else {
_global.GOLD = _global.GOLD + (Math.floor(_local7.price / 2) * item.COUNT);
_global.INVENTORY.splice(pos, 1);
}
} else if (_global.GOLD >= _local7.price) {
_global.GOLD = _global.GOLD - _local7.price;
_root.addItemInfoTo(_global.INVENTORY, new ItemInfo(item.CATEGORY, item.TYPE, item.NATION, item.LEVEL));
}
}
_parent.money_txt.text = _global.GOLD + " gold";
_parent._parent.storeShowUser();
_parent._parent.dragItemOff();
}
function onRollOut() {
_parent.item_name_txt.text = "";
_parent.item_stats_txt.text = "";
}
}
Symbol 2075 MovieClip [__Packages.EquipmentIcon] Frame 0
class EquipmentIcon extends StoreIcon
{
var StoreIcon, hitArea, rect_hit_area, _visible, item, ench_back, is_user, 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 != 0;
var _local2 = item.getItem();
amount_txt.text = (is_user ? (String(item.COUNT)) : "");
gotoAndStop(_local2.getIconFrame());
}
function onPress() {
_parent._parent.dragItemOn(item);
}
function onRollOver() {
super.onRollOver();
if (item.ENCH_ID != 0) {
_parent.ench_info.gotoAndStop(item.ENCH_ID + 1);
var _local3 = new ItemInfo(item.CATEGORY, item.TYPE, item.NATION, item.LEVEL, 0);
var _local4 = _local3.getItem();
_parent.ench_info.item_name_txt.text = _local4.NAME;
}
}
function onRollOut() {
super.onRollOut();
_parent.ench_info.gotoAndStop(1);
}
function onReleaseOutside() {
if (is_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 < 4) {
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 2076 MovieClip [__Packages.Cities] Frame 0
class Cities extends MovieClip
{
var barracks_btn, hall_btn, temple_btn, barn_btn, harbor_btn, forge_btn, city, gotoAndStop, wnd, _ymouse, _xmouse, hint;
function Cities () {
super();
_root.saveGame("auto");
init();
barracks_btn.onRollOver = function () {
if (_global.SHOW_HELP) {
this._parent.hint.gotoAndStop("barracks");
}
};
hall_btn.onRollOver = function () {
if (_global.SHOW_HELP) {
this._parent.hint.gotoAndStop("hall");
}
};
temple_btn.onRollOver = function () {
if (_global.SHOW_HELP) {
this._parent.hint.gotoAndStop("temple");
}
};
barn_btn.onRollOver = function () {
if (_global.SHOW_HELP) {
this._parent.hint.gotoAndStop("barn");
}
};
harbor_btn.onRollOver = function () {
if (_global.SHOW_HELP) {
this._parent.hint.gotoAndStop("harbor");
}
};
forge_btn.onRollOver = function () {
if (_global.SHOW_HELP) {
this._parent.hint.gotoAndStop("forge");
}
};
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));
if ((!_global.IS_CAPTURED[city.ID]) && (_global.IS_HOSTILE[city.NATION])) {
wnd.gotoAndStop(12);
disableAll();
} else {
wnd.gotoAndStop(1);
}
enableAll();
}
function getFrame(townID) {
switch (townID) {
case "Trapezus" :
return(1);
case "Lutetia" :
return(2);
case "Arretium" :
return(3);
case "Ravenna" :
return(4);
case "Lacrimosa" :
return(5);
case "Caesaria" :
return(6);
case "Carthage" :
return(7);
case "Alexandria" :
return(8);
case "Jana" :
return(9);
case "Konstanz" :
return(10);
case "Gerlitz" :
return(11);
case "Sturmburg" :
return(12);
case "Hoffen" :
return(13);
case "Endem" :
return(14);
case "Braunburg" :
return(15);
case "Wanderburg" :
return(16);
case "Dubkee" :
return(17);
case "Dalnevodye" :
return(18);
case "Losevo" :
return(19);
case "Dobrov" :
return(20);
case "Zlatograd" :
return(21);
case "Medvedevo" :
return(22);
case "Grouzeno" :
return(23);
case "RaGorod" :
return(24);
case "Omi" :
return(25);
case "Kozuke" :
return(26);
case "Matsuyama" :
return(27);
case "Fukushima" :
return(28);
case "Izumo" :
return(29);
case "Suo" :
return(30);
case "Nagoya" :
return(31);
case "Echigo" :
return(32);
}
}
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() {
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 < 4) {
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 inventoryShowStats() {
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.INT_txt.text = _global.MAIN_HERO.INT;
var _local3 = _global.MAIN_HERO.free_points >= 2;
var _local4 = 0;
while (_local4 < 4) {
wnd["stat_btn_" + _local4]._visible = _local3;
_local4++;
}
if (_global.MAIN_HERO.STR >= 200) {
wnd.stat_btn_0._visible = false;
}
if (_global.MAIN_HERO.DEX >= 200) {
wnd.stat_btn_1._visible = false;
}
if (_global.MAIN_HERO.CON >= 200) {
wnd.stat_btn_2._visible = false;
}
if (_global.MAIN_HERO.INT >= 200) {
wnd.stat_btn_3._visible = false;
}
wnd.free_points_txt.text = _global.MAIN_HERO.free_points;
_local3 = _global.MAIN_HERO.free_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) ? (_local3) : false);
}
if (_global.MAIN_HERO.SKILL.ArtOfWar >= (_global.MAIN_HERO.INT * 2)) {
wnd.skill_btn_ArtOfWar._visible = false;
}
if (_global.MAIN_HERO.SKILL.Patriotism >= (_global.MAIN_HERO.INT * 2)) {
wnd.skill_btn_Patriotism._visible = false;
}
wnd.hero_stats_txt.text = (_global.MAIN_HERO.NAME + "\nLevel ") + _global.MAIN_HERO.LEVEL;
}
function harborShow() {
if (_global.GOLD < _global.SHIP_PRICE) {
wnd.quest_txt.text = ("You have not enough gold to rent a ship.\n\nOne sail price is " + _global.SHIP_PRICE) + " gp.";
wnd.yes_btn._visible = false;
wnd.no_btn._visible = false;
} else {
wnd.quest_txt.text = ("One sail price is " + _global.SHIP_PRICE) + " gp.\nWould you like to board a ship?";
wnd.yes_btn._visible = true;
wnd.no_btn._visible = true;
}
}
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 = 76 + _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 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;
}
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;
hint.gotoAndStop("empty");
}
function openForge() {
disableAll();
scrollUser = 0;
scrollTrader = 0;
wnd.gotoAndStop(2);
wnd.money_txt.text = _global.GOLD + " gold";
}
function openTemple() {
disableAll();
scrollUser = 0;
scrollTrader = 0;
wnd.gotoAndStop(3);
wnd.money_txt.text = _global.GOLD + " gold";
}
function openBarracks() {
disableAll();
if (_global.IS_CAPTURED[city.ID]) {
scrollUser = 0;
scrollTrader = 0;
wnd.gotoAndStop(4);
wnd.money_txt.text = _global.GOLD + " gold";
} else {
wnd.gotoAndStop(11);
}
}
function openCityHall() {
disableAll();
if (!checkReward()) {
wnd.gotoAndStop(6);
}
}
function openBarn() {
scrollUser = 0;
scrollTrader = 0;
disableAll();
wnd.gotoAndStop(9);
}
function openHeroStats() {
disableAll();
scrollUser = 0;
scrollTrader = 0;
wnd.gotoAndStop(5);
}
function openGetQuest() {
disableAll();
wnd.gotoAndStop(7);
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);
var _local4 = new Town(_global.QUEST.deliver_to);
wnd.quest_txt.text = ((("We need to deliver a package to the city of " + _local4.NAME) + ". 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(13);
} else {
wnd.gotoAndStop(15);
}
}
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(8);
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(10);
harborShow();
}
var scrollTrader = 0;
var scrollUser = 0;
}
Symbol 2077 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;
this["Town" + townID]();
}
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 _local4 = 0;
while (_local4 < adv_defenders.length) {
var _local3 = 0;
while (_local3 < adv_defenders[_local4].COUNT) {
_global.ENEMIES.push(adv_defenders[_local4].getUnit());
_local3++;
}
_local4++;
}
}
function setBattleMap() {
switch (ID) {
case "Trapezus" :
case "Lutetia" :
case "Arretium" :
case "Ravenna" :
case "Lacrimosa" :
_global.BATTLE_MAP = 20;
break;
case "Caesaria" :
case "Carthage" :
case "Alexandria" :
_global.BATTLE_MAP = 16;
break;
case "Jana" :
case "Konstanz" :
case "Gerlitz" :
case "Hoffen" :
case "Endem" :
_global.BATTLE_MAP = 4;
break;
case "Sturmburg" :
case "Braunburg" :
case "Wanderburg" :
_global.BATTLE_MAP = 0;
break;
case "Dubkee" :
case "Dalnevodye" :
case "Losevo" :
case "Medvedevo" :
case "Grouzeno" :
_global.BATTLE_MAP = 12;
break;
case "Dobrov" :
case "Zlatograd" :
case "RaGorod" :
_global.BATTLE_MAP = 8;
break;
case "Omi" :
case "Kozuke" :
case "Fukushima" :
case "Echigo" :
case "Suo" :
_global.BATTLE_MAP = 28;
break;
case "Matsuyama" :
case "Izumo" :
case "Nagoya" :
_global.BATTLE_MAP = 24;
}
_global.BATTLE_MAP = _global.BATTLE_MAP + _root.d(4);
}
function TownTrapezus() {
NATION = "Viz";
NAME = "Trapezus";
barracks.push(new UnitInfo("Melee", "Viz", 1));
barracks.push(new UnitInfo("Ranged", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "Bow", "Viz", 1));
forge.push(new ItemInfo("Armor", "Clothes", "Viz", 1));
defenders.push(new UnitInfo("Melee", "Viz", 1, 4));
defenders.push(new UnitInfo("Ranged", "Viz", 1, 1));
defenders.push(new UnitInfo("Melee", "Viz", 2, 1));
defenders.push(new UnitInfo("Ranged", "Viz", 1, 1));
}
function TownLutetia() {
NATION = "Viz";
NAME = "Lutetia";
barracks.push(new UnitInfo("Melee", "Viz", 1));
barracks.push(new UnitInfo("Melee", "Viz", 2));
barracks.push(new UnitInfo("Ranged", "Viz", 1));
barracks.push(new UnitInfo("Ranged", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "Bow", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "Dagger", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "Spear", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "Shield", "Viz", 1));
forge.push(new ItemInfo("Armor", "Clothes", "Viz", 1));
forge.push(new ItemInfo("Armor", "Helmet", "Viz", 1));
defenders.push(new UnitInfo("Melee", "Viz", 1, 5));
defenders.push(new UnitInfo("Ranged", "Viz", 1, 5));
defenders.push(new UnitInfo("Melee", "Viz", 2, 2));
defenders.push(new UnitInfo("Ranged", "Viz", 2, 2));
}
function TownArretium() {
NATION = "Viz";
NAME = "Arretium";
barracks.push(new UnitInfo("Melee", "Viz", 1));
barracks.push(new UnitInfo("Melee", "Viz", 2));
barracks.push(new UnitInfo("Melee", "Viz", 3));
barracks.push(new UnitInfo("Ranged", "Viz", 1));
barracks.push(new UnitInfo("Ranged", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "Bow", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "Dagger", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "Spear", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "Shield", "Viz", 1));
forge.push(new ItemInfo("Armor", "Clothes", "Viz", 2));
forge.push(new ItemInfo("Armor", "Helmet", "Viz", 1));
defenders.push(new UnitInfo("Melee", "Viz", 2, 5));
defenders.push(new UnitInfo("Ranged", "Viz", 2, 5));
defenders.push(new UnitInfo("Melee", "Viz", 3, 3));
}
function TownRavenna() {
NATION = "Viz";
NAME = "Ravenna";
barracks.push(new UnitInfo("Melee", "Viz", 2));
barracks.push(new UnitInfo("Melee", "Viz", 3));
barracks.push(new UnitInfo("Melee", "Viz", 4));
barracks.push(new UnitInfo("Ranged", "Viz", 2));
barracks.push(new UnitInfo("Ranged", "Viz", 3));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "Bow", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "Dagger", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "Spear", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "Shield", "Viz", 2));
forge.push(new ItemInfo("Armor", "Clothes", "Viz", 3));
forge.push(new ItemInfo("Armor", "Helmet", "Viz", 2));
barn.push(new Horse("brown", 50, 1, 4, 700));
barn.push(new Horse("grey", 100, 2, 3, 900));
defenders.push(new UnitInfo("Melee", "Viz", 3, 5));
defenders.push(new UnitInfo("Ranged", "Viz", 3, 5));
defenders.push(new UnitInfo("Ranged", "Viz", 3, 6));
defenders.push(new UnitInfo("Ranged", "Viz", 4, 3));
}
function TownLacrimosa() {
NATION = "Viz";
NAME = "Lacrimosa";
barracks.push(new UnitInfo("Melee", "Viz", 3));
barracks.push(new UnitInfo("Melee", "Viz", 4));
barracks.push(new UnitInfo("Melee", "Viz", 5));
barracks.push(new UnitInfo("Melee", "Viz", 6));
barracks.push(new UnitInfo("Ranged", "Viz", 3));
barracks.push(new UnitInfo("Ranged", "Viz", 4));
barracks.push(new UnitInfo("Ranged", "Viz", 6));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Viz", 3));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Viz", 3));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Viz", 3));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Viz", 3));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Viz", 3));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Viz", 3));
forge.push(new ItemInfo("WeaponClass", "Bow", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "Dagger", "Viz", 3));
forge.push(new ItemInfo("WeaponClass", "Spear", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "Shield", "Viz", 2));
forge.push(new ItemInfo("Armor", "Clothes", "Viz", 4));
forge.push(new ItemInfo("Armor", "Helmet", "Viz", 2));
defenders.push(new UnitInfo("Melee", "Viz", 4, 5));
defenders.push(new UnitInfo("Ranged", "Viz", 4, 5));
defenders.push(new UnitInfo("Melee", "Viz", 5, 2));
defenders.push(new UnitInfo("Ranged", "Viz", 6, 4));
defenders.push(new UnitInfo("Melee", "Viz", 6, 2));
}
function TownCaesaria() {
NATION = "Viz";
NAME = "Caesaria";
barracks.push(new UnitInfo("Melee", "Viz", 3));
barracks.push(new UnitInfo("Melee", "Viz", 4));
barracks.push(new UnitInfo("Melee", "Viz", 5));
barracks.push(new UnitInfo("Melee", "Viz", 6));
barracks.push(new UnitInfo("Melee", "Viz", 9));
barracks.push(new UnitInfo("Ranged", "Viz", 9));
barracks.push(new UnitInfo("Ranged", "Viz", 3));
barracks.push(new UnitInfo("Ranged", "Viz", 4));
barracks.push(new UnitInfo("Ranged", "Viz", 5));
barracks.push(new UnitInfo("Ranged", "Viz", 6));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Viz", 4));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Viz", 3));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Viz", 3));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Viz", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Viz", 3));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Viz", 3));
forge.push(new ItemInfo("WeaponClass", "Bow", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "Dagger", "Viz", 3));
forge.push(new ItemInfo("WeaponClass", "Spear", "Viz", 3));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "Shield", "Viz", 3));
forge.push(new ItemInfo("Armor", "Clothes", "Viz", 5));
forge.push(new ItemInfo("Armor", "Helmet", "Viz", 2));
barn.push(new Horse("brown", 90, 2, 5, 900));
barn.push(new Horse("grey", 200, 5, 3, 1300));
barn.push(new Horse("red", 150, 2, 3, 850));
barn.push(new Horse("white", 200, 6, 2, 1700));
defenders.push(new UnitInfo("Melee", "Viz", 6, 2));
defenders.push(new UnitInfo("Melee", "Viz", 5, 3));
defenders.push(new UnitInfo("Ranged", "Viz", 6, 5));
defenders.push(new UnitInfo("Ranged", "Viz", 5, 4));
defenders.push(new UnitInfo("Melee", "Viz", 9, 5));
defenders.push(new UnitInfo("Ranged", "Viz", 9, 5));
adv_defenders.push(new UnitInfo("Melee", "Viz", 7, 8));
adv_defenders.push(new UnitInfo("Ranged", "Viz", 7, 2));
adv_defenders.push(new UnitInfo("Melee", "Viz", 9, 5));
}
function TownCarthage() {
NATION = "Viz";
NAME = "Carthage";
barracks.push(new UnitInfo("Melee", "Viz", 3));
barracks.push(new UnitInfo("Melee", "Viz", 4));
barracks.push(new UnitInfo("Melee", "Viz", 5));
barracks.push(new UnitInfo("Melee", "Viz", 6));
barracks.push(new UnitInfo("Melee", "Viz", 7));
barracks.push(new UnitInfo("Melee", "Viz", 9));
barracks.push(new UnitInfo("Ranged", "Viz", 9));
barracks.push(new UnitInfo("Ranged", "Viz", 3));
barracks.push(new UnitInfo("Ranged", "Viz", 4));
barracks.push(new UnitInfo("Ranged", "Viz", 5));
barracks.push(new UnitInfo("Ranged", "Viz", 6));
barracks.push(new UnitInfo("Ranged", "Viz", 7));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Viz", 4));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Viz", 4));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Viz", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Viz", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Viz", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Viz", 4));
forge.push(new ItemInfo("WeaponClass", "Bow", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Viz", 3));
forge.push(new ItemInfo("WeaponClass", "Dagger", "Viz", 4));
forge.push(new ItemInfo("WeaponClass", "Spear", "Viz", 3));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Viz", 1));
forge.push(new ItemInfo("WeaponClass", "Shield", "Viz", 3));
forge.push(new ItemInfo("Armor", "Clothes", "Viz", 5));
forge.push(new ItemInfo("Armor", "Helmet", "Viz", 3));
barn.push(new Horse("brown", 100, 3, 6, 1100));
barn.push(new Horse("grey", 250, 5, 3, 1550));
barn.push(new Horse("red", 190, 2, 5, 950));
barn.push(new Horse("white", 260, 7, 2, 1800));
barn.push(new Horse("black", 300, 7, 2, 2000));
defenders.push(new UnitInfo("Melee", "Viz", 6, 5));
defenders.push(new UnitInfo("Ranged", "Viz", 5, 5));
defenders.push(new UnitInfo("Ranged", "Viz", 7, 2));
defenders.push(new UnitInfo("Melee", "Viz", 7, 4));
defenders.push(new UnitInfo("Ranged", "Viz", 7, 2));
defenders.push(new UnitInfo("Melee", "Viz", 9, 2));
adv_defenders.push(new UnitInfo("Melee", "Viz", 8, 5));
adv_defenders.push(new UnitInfo("Ranged", "Viz", 5, 5));
adv_defenders.push(new UnitInfo("Melee", "Viz", 9, 3));
adv_defenders.push(new UnitInfo("Melee", "Viz", 8, 2));
}
function TownAlexandria() {
NATION = "Viz";
NAME = "Alexandria";
barracks.push(new UnitInfo("Melee", "Viz", 3));
barracks.push(new UnitInfo("Melee", "Viz", 4));
barracks.push(new UnitInfo("Melee", "Viz", 5));
barracks.push(new UnitInfo("Melee", "Viz", 6));
barracks.push(new UnitInfo("Melee", "Viz", 7));
barracks.push(new UnitInfo("Melee", "Viz", 8));
barracks.push(new UnitInfo("Melee", "Viz", 9));
barracks.push(new UnitInfo("Ranged", "Viz", 9));
barracks.push(new UnitInfo("Ranged", "Viz", 3));
barracks.push(new UnitInfo("Ranged", "Viz", 4));
barracks.push(new UnitInfo("Ranged", "Viz", 5));
barracks.push(new UnitInfo("Ranged", "Viz", 6));
barracks.push(new UnitInfo("Ranged", "Viz", 7));
barracks.push(new UnitInfo("Ranged", "Viz", 8));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Viz", 5));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Viz", 4));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Viz", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Viz", 5));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Viz", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Viz", 4));
forge.push(new ItemInfo("WeaponClass", "Bow", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Viz", 3));
forge.push(new ItemInfo("WeaponClass", "Dagger", "Viz", 4));
forge.push(new ItemInfo("WeaponClass", "Spear", "Viz", 3));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Viz", 2));
forge.push(new ItemInfo("WeaponClass", "Shield", "Viz", 3));
forge.push(new ItemInfo("Armor", "Clothes", "Viz", 6));
forge.push(new ItemInfo("Armor", "Helmet", "Viz", 3));
barn.push(new Horse("brown", 150, 4, 6, 1500));
barn.push(new Horse("grey", 300, 6, 3, 1700));
barn.push(new Horse("red", 200, 3, 6, 1100));
barn.push(new Horse("white", 350, 6, 5, 2200));
barn.push(new Horse("black", 500, 8, 1, 2500));
defenders.push(new UnitInfo("Melee", "Viz", 7, 5));
defenders.push(new UnitInfo("Ranged", "Viz", 7, 2));
defenders.push(new UnitInfo("Ranged", "Viz", 5, 3));
defenders.push(new UnitInfo("Melee", "Viz", 9, 4));
defenders.push(new UnitInfo("Ranged", "Viz", 8, 2));
defenders.push(new UnitInfo("Ranged", "Viz", 9, 5));
defenders.push(new UnitInfo("Ranged", "Viz", 8, 2));
adv_defenders.push(new UnitInfo("Melee", "Viz", 8, 5));
adv_defenders.push(new UnitInfo("Ranged", "Viz", 5, 5));
adv_defenders.push(new UnitInfo("Melee", "Viz", 8, 2));
adv_defenders.push(new UnitInfo("Melee", "Viz", 8, 1));
adv_defenders.push(new UnitInfo("Melee", "Viz", 8, 2));
adv_defenders.push(new UnitInfo("Melee", "Viz", 8, 1));
adv_defenders.push(new UnitInfo("Melee", "Viz", 8, 2));
adv_defenders.push(new UnitInfo("Melee", "Viz", 8, 1));
adv_defenders.push(new UnitInfo("Melee", "Viz", 8, 2));
adv_defenders.push(new UnitInfo("Melee", "Viz", 8, 1));
}
function TownJana() {
NATION = "Ger";
NAME = "Jana";
barracks.push(new UnitInfo("Melee", "Ger", 1));
barracks.push(new UnitInfo("Melee", "Ger", 2));
barracks.push(new UnitInfo("Ranged", "Ger", 1));
barracks.push(new UnitInfo("Ranged", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Ger", 1));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Ger", 1));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Ger", 1));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Ger", 1));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Ger", 1));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Ger", 1));
forge.push(new ItemInfo("WeaponClass", "Bow", "Ger", 1));
forge.push(new ItemInfo("Armor", "Clothes", "Ger", 1));
defenders.push(new UnitInfo("Melee", "Ger", 2, 1));
defenders.push(new UnitInfo("Melee", "Ger", 1, 3));
defenders.push(new UnitInfo("Melee", "Ger", 2, 1));
defenders.push(new UnitInfo("Ranged", "Ger", 1, 1));
defenders.push(new UnitInfo("Ranged", "Ger", 2, 3));
defenders.push(new UnitInfo("Ranged", "Ger", 1, 1));
}
function TownKonstanz() {
NATION = "Ger";
NAME = "Konstanz";
barracks.push(new UnitInfo("Melee", "Ger", 1));
barracks.push(new UnitInfo("Melee", "Ger", 2));
barracks.push(new UnitInfo("Melee", "Ger", 3));
barracks.push(new UnitInfo("Melee", "Ger", 5));
barracks.push(new UnitInfo("Ranged", "Ger", 1));
barracks.push(new UnitInfo("Ranged", "Ger", 2));
barracks.push(new UnitInfo("Ranged", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Ger", 1));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Ger", 1));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Ger", 1));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Ger", 1));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Ger", 1));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Ger", 1));
forge.push(new ItemInfo("WeaponClass", "Bow", "Ger", 1));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Ger", 1));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Ger", 1));
forge.push(new ItemInfo("WeaponClass", "Spear", "Ger", 1));
forge.push(new ItemInfo("WeaponClass", "Shield", "Ger", 1));
forge.push(new ItemInfo("Armor", "Clothes", "Ger", 1));
forge.push(new ItemInfo("Armor", "Helmet", "Ger", 1));
defenders.push(new UnitInfo("Melee", "Ger", 2, 5));
defenders.push(new UnitInfo("Ranged", "Ger", 2, 5));
defenders.push(new UnitInfo("Melee", "Ger", 3, 3));
defenders.push(new UnitInfo("Ranged", "Ger", 3, 1));
defenders.push(new UnitInfo("Melee", "Ger", 5, 1));
}
function TownGerlitz() {
NATION = "Ger";
NAME = "Gerlitz";
barracks.push(new UnitInfo("Melee", "Ger", 2));
barracks.push(new UnitInfo("Melee", "Ger", 3));
barracks.push(new UnitInfo("Melee", "Ger", 4));
barracks.push(new UnitInfo("Melee", "Ger", 5));
barracks.push(new UnitInfo("Melee", "Ger", 6));
barracks.push(new UnitInfo("Ranged", "Ger", 2));
barracks.push(new UnitInfo("Ranged", "Ger", 3));
barracks.push(new UnitInfo("Ranged", "Ger", 5));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "Bow", "Ger", 1));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "Spear", "Ger", 1));
forge.push(new ItemInfo("WeaponClass", "Shield", "Ger", 1));
forge.push(new ItemInfo("Armor", "Clothes", "Ger", 2));
forge.push(new ItemInfo("Armor", "Helmet", "Ger", 1));
defenders.push(new UnitInfo("Melee", "Ger", 3, 5));
defenders.push(new UnitInfo("Ranged", "Ger", 3, 5));
defenders.push(new UnitInfo("Melee", "Ger", 4, 2));
defenders.push(new UnitInfo("Ranged", "Ger", 5, 2));
defenders.push(new UnitInfo("Melee", "Ger", 6, 3));
}
function TownSturmburg() {
NATION = "Ger";
NAME = "Sturmburg";
barracks.push(new UnitInfo("Melee", "Ger", 3));
barracks.push(new UnitInfo("Melee", "Ger", 4));
barracks.push(new UnitInfo("Melee", "Ger", 5));
barracks.push(new UnitInfo("Melee", "Ger", 6));
barracks.push(new UnitInfo("Melee", "Ger", 7));
barracks.push(new UnitInfo("Melee", "Ger", 12));
barracks.push(new UnitInfo("Ranged", "Ger", 3));
barracks.push(new UnitInfo("Ranged", "Ger", 5));
barracks.push(new UnitInfo("Ranged", "Ger", 6));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "Bow", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "Spear", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "Shield", "Ger", 2));
forge.push(new ItemInfo("Armor", "Clothes", "Ger", 3));
forge.push(new ItemInfo("Armor", "Helmet", "Ger", 2));
barn.push(new Horse("grey", 50, 1, 4, 700));
barn.push(new Horse("white", 60, 1, 4, 800));
defenders.push(new UnitInfo("Melee", "Ger", 4, 5));
defenders.push(new UnitInfo("Ranged", "Ger", 5, 5));
defenders.push(new UnitInfo("Melee", "Ger", 7, 2));
defenders.push(new UnitInfo("Ranged", "Ger", 6, 4));
defenders.push(new UnitInfo("Melee", "Ger", 12, 4));
adv_defenders.push(new UnitInfo("Melee", "Ger", 8, 5));
adv_defenders.push(new UnitInfo("Ranged", "Ger", 6, 5));
adv_defenders.push(new UnitInfo("Melee", "Ger", 8, 3));
adv_defenders.push(new UnitInfo("Ranged", "Ger", 7, 2));
}
function TownHoffen() {
NATION = "Ger";
NAME = "Hoffen";
barracks.push(new UnitInfo("Melee", "Ger", 4));
barracks.push(new UnitInfo("Melee", "Ger", 6));
barracks.push(new UnitInfo("Melee", "Ger", 7));
barracks.push(new UnitInfo("Melee", "Ger", 8));
barracks.push(new UnitInfo("Melee", "Ger", 12));
barracks.push(new UnitInfo("Ranged", "Ger", 5));
barracks.push(new UnitInfo("Ranged", "Ger", 6));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "Bow", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Ger", 4));
forge.push(new ItemInfo("WeaponClass", "Spear", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "Shield", "Ger", 3));
forge.push(new ItemInfo("Armor", "Clothes", "Ger", 5));
forge.push(new ItemInfo("Armor", "Helmet", "Ger", 2));
defenders.push(new UnitInfo("Melee", "Ger", 12, 5));
defenders.push(new UnitInfo("Ranged", "Ger", 6, 5));
defenders.push(new UnitInfo("Melee", "Ger", 8, 8));
}
function TownEndem() {
NATION = "Ger";
NAME = "Endem";
barracks.push(new UnitInfo("Melee", "Ger", 3));
barracks.push(new UnitInfo("Melee", "Ger", 5));
barracks.push(new UnitInfo("Melee", "Ger", 6));
barracks.push(new UnitInfo("Melee", "Ger", 7));
barracks.push(new UnitInfo("Melee", "Ger", 8));
barracks.push(new UnitInfo("Melee", "Ger", 12));
barracks.push(new UnitInfo("Ranged", "Ger", 3));
barracks.push(new UnitInfo("Ranged", "Ger", 6));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Ger", 4));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Ger", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "Bow", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Ger", 4));
forge.push(new ItemInfo("WeaponClass", "Spear", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "Shield", "Ger", 3));
forge.push(new ItemInfo("Armor", "Clothes", "Ger", 5));
forge.push(new ItemInfo("Armor", "Helmet", "Ger", 2));
defenders.push(new UnitInfo("Melee", "Ger", 7, 5));
defenders.push(new UnitInfo("Ranged", "Ger", 3, 5));
defenders.push(new UnitInfo("Melee", "Ger", 8, 5));
defenders.push(new UnitInfo("Ranged", "Ger", 3, 4));
}
function TownBraunburg() {
NATION = "Ger";
NAME = "Braunburg";
barracks.push(new UnitInfo("Melee", "Ger", 4));
barracks.push(new UnitInfo("Melee", "Ger", 6));
barracks.push(new UnitInfo("Melee", "Ger", 7));
barracks.push(new UnitInfo("Melee", "Ger", 10));
barracks.push(new UnitInfo("Melee", "Ger", 12));
barracks.push(new UnitInfo("Ranged", "Ger", 5));
barracks.push(new UnitInfo("Ranged", "Ger", 6));
barracks.push(new UnitInfo("Ranged", "Ger", 7));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Ger", 4));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Ger", 4));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Ger", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Ger", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "Bow", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "Spear", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "Shield", "Ger", 2));
forge.push(new ItemInfo("Armor", "Clothes", "Ger", 4));
forge.push(new ItemInfo("Armor", "Helmet", "Ger", 2));
barn.push(new Horse("grey", 100, 1, 4, 900));
barn.push(new Horse("red", 90, 1, 5, 950));
barn.push(new Horse("brown", 150, 3, 2, 1000));
barn.push(new Horse("white", 250, 4, 1, 1500));
defenders.push(new UnitInfo("Melee", "Ger", 7, 5));
defenders.push(new UnitInfo("Ranged", "Ger", 6, 5));
defenders.push(new UnitInfo("Melee", "Ger", 12, 4));
defenders.push(new UnitInfo("Ranged", "Ger", 7, 3));
defenders.push(new UnitInfo("Melee", "Ger", 10, 3));
adv_defenders.push(new UnitInfo("Melee", "Ger", 10, 5));
adv_defenders.push(new UnitInfo("Ranged", "Ger", 3, 5));
adv_defenders.push(new UnitInfo("Melee", "Ger", 11, 2));
adv_defenders.push(new UnitInfo("Ranged", "Ger", 3, 4));
}
function TownWanderburg() {
NATION = "Ger";
NAME = "Wanderburg";
barracks.push(new UnitInfo("Melee", "Ger", 4));
barracks.push(new UnitInfo("Melee", "Ger", 6));
barracks.push(new UnitInfo("Melee", "Ger", 7));
barracks.push(new UnitInfo("Melee", "Ger", 8));
barracks.push(new UnitInfo("Melee", "Ger", 9));
barracks.push(new UnitInfo("Melee", "Ger", 10));
barracks.push(new UnitInfo("Melee", "Ger", 11));
barracks.push(new UnitInfo("Melee", "Ger", 12));
barracks.push(new UnitInfo("Ranged", "Ger", 3));
barracks.push(new UnitInfo("Ranged", "Ger", 4));
barracks.push(new UnitInfo("Ranged", "Ger", 5));
barracks.push(new UnitInfo("Ranged", "Ger", 6));
barracks.push(new UnitInfo("Ranged", "Ger", 7));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Ger", 5));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Ger", 4));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Ger", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Ger", 5));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Ger", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Ger", 4));
forge.push(new ItemInfo("WeaponClass", "Bow", "Ger", 2));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Ger", 4));
forge.push(new ItemInfo("WeaponClass", "Spear", "Ger", 3));
forge.push(new ItemInfo("WeaponClass", "Shield", "Ger", 3));
forge.push(new ItemInfo("Armor", "Clothes", "Ger", 6));
forge.push(new ItemInfo("Armor", "Helmet", "Ger", 3));
barn.push(new Horse("grey", 250, 3, 5, 1700));
barn.push(new Horse("red", 200, 2, 6, 1600));
barn.push(new Horse("brown", 350, 4, 4, 1800));
barn.push(new Horse("white", 400, 5, 6, 3500));
barn.push(new Horse("black", 700, 9, 0, 5000));
defenders.push(new UnitInfo("Melee", "Ger", 10, 5));
defenders.push(new UnitInfo("Ranged", "Ger", 4, 5));
defenders.push(new UnitInfo("Ranged", "Ger", 7, 2));
defenders.push(new UnitInfo("Melee", "Ger", 11, 4));
defenders.push(new UnitInfo("Ranged", "Ger", 7, 3));
adv_defenders.push(new UnitInfo("Melee", "Ger", 11, 6));
adv_defenders.push(new UnitInfo("Ranged", "Ger", 4, 5));
}
function TownDubkee() {
NATION = "Rus";
NAME = "Dubkee";
barracks.push(new UnitInfo("Melee", "Rus", 1));
barracks.push(new UnitInfo("Melee", "Rus", 2));
barracks.push(new UnitInfo("Ranged", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "Bow", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Rus", 1));
forge.push(new ItemInfo("Armor", "Clothes", "Rus", 1));
barn.push(new Horse("grey", 30, 0, 3, 300));
defenders.push(new UnitInfo("Melee", "Rus", 1, 2));
defenders.push(new UnitInfo("Melee", "Rus", 2, 1));
defenders.push(new UnitInfo("Melee", "Rus", 1, 2));
defenders.push(new UnitInfo("Ranged", "Rus", 1, 5));
}
function TownDalnevodye() {
NATION = "Rus";
NAME = "Dalnevodye";
barracks.push(new UnitInfo("Melee", "Rus", 1));
barracks.push(new UnitInfo("Melee", "Rus", 2));
barracks.push(new UnitInfo("Melee", "Rus", 3));
barracks.push(new UnitInfo("Ranged", "Rus", 1));
barracks.push(new UnitInfo("Ranged", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "Bow", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "Spear", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "Shield", "Rus", 1));
forge.push(new ItemInfo("Armor", "Clothes", "Rus", 1));
forge.push(new ItemInfo("Armor", "Helmet", "Rus", 1));
barn.push(new Horse("grey", 40, 0, 3, 350));
defenders.push(new UnitInfo("Melee", "Rus", 2, 5));
defenders.push(new UnitInfo("Ranged", "Rus", 1, 5));
defenders.push(new UnitInfo("Melee", "Rus", 3, 4));
defenders.push(new UnitInfo("Ranged", "Rus", 3, 2));
}
function TownLosevo() {
NATION = "Rus";
NAME = "Losevo";
barracks.push(new UnitInfo("Melee", "Rus", 1));
barracks.push(new UnitInfo("Melee", "Rus", 2));
barracks.push(new UnitInfo("Melee", "Rus", 3));
barracks.push(new UnitInfo("Melee", "Rus", 4));
barracks.push(new UnitInfo("Melee", "Rus", 8));
barracks.push(new UnitInfo("Ranged", "Rus", 1));
barracks.push(new UnitInfo("Ranged", "Rus", 3));
barracks.push(new UnitInfo("Ranged", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "Bow", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "Spear", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "Shield", "Rus", 1));
forge.push(new ItemInfo("Armor", "Clothes", "Rus", 2));
forge.push(new ItemInfo("Armor", "Helmet", "Rus", 1));
barn.push(new Horse("grey", 50, 0, 4, 500));
defenders.push(new UnitInfo("Melee", "Rus", 3, 5));
defenders.push(new UnitInfo("Ranged", "Rus", 3, 5));
defenders.push(new UnitInfo("Melee", "Rus", 4, 4));
defenders.push(new UnitInfo("Ranged", "Rus", 4, 3));
defenders.push(new UnitInfo("Melee", "Rus", 8, 2));
}
function TownDobrov() {
NATION = "Rus";
NAME = "Dobrov";
barracks.push(new UnitInfo("Melee", "Rus", 1));
barracks.push(new UnitInfo("Melee", "Rus", 2));
barracks.push(new UnitInfo("Melee", "Rus", 3));
barracks.push(new UnitInfo("Melee", "Rus", 4));
barracks.push(new UnitInfo("Melee", "Rus", 5));
barracks.push(new UnitInfo("Melee", "Rus", 8));
barracks.push(new UnitInfo("Ranged", "Rus", 1));
barracks.push(new UnitInfo("Ranged", "Rus", 2));
barracks.push(new UnitInfo("Ranged", "Rus", 3));
barracks.push(new UnitInfo("Ranged", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "Bow", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "Spear", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "Shield", "Rus", 2));
forge.push(new ItemInfo("Armor", "Clothes", "Rus", 3));
forge.push(new ItemInfo("Armor", "Helmet", "Rus", 1));
barn.push(new Horse("grey", 50, 1, 4, 700));
barn.push(new Horse("red", 20, 0, 6, 600));
defenders.push(new UnitInfo("Melee", "Rus", 8, 5));
defenders.push(new UnitInfo("Ranged", "Rus", 4, 5));
defenders.push(new UnitInfo("Melee", "Rus", 5, 3));
defenders.push(new UnitInfo("Ranged", "Rus", 2, 5));
adv_defenders.push(new UnitInfo("Melee", "Rus", 5, 5));
adv_defenders.push(new UnitInfo("Ranged", "Rus", 2, 5));
adv_defenders.push(new UnitInfo("Melee", "Rus", 6, 3));
}
function TownZlatograd() {
NATION = "Rus";
NAME = "Zlatograd";
barracks.push(new UnitInfo("Melee", "Rus", 3));
barracks.push(new UnitInfo("Melee", "Rus", 4));
barracks.push(new UnitInfo("Melee", "Rus", 5));
barracks.push(new UnitInfo("Melee", "Rus", 6));
barracks.push(new UnitInfo("Melee", "Rus", 8));
barracks.push(new UnitInfo("Ranged", "Rus", 2));
barracks.push(new UnitInfo("Ranged", "Rus", 3));
barracks.push(new UnitInfo("Ranged", "Rus", 4));
barracks.push(new UnitInfo("Ranged", "Rus", 5));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "Bow", "Rus", 1));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "Spear", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "Shield", "Rus", 3));
forge.push(new ItemInfo("Armor", "Clothes", "Rus", 4));
forge.push(new ItemInfo("Armor", "Helmet", "Rus", 2));
barn.push(new Horse("grey", 150, 2, 4, 950));
barn.push(new Horse("red", 100, 1, 6, 900));
barn.push(new Horse("brown", 200, 3, 2, 1000));
barn.push(new Horse("white", 250, 3, 3, 1200));
defenders.push(new UnitInfo("Melee", "Rus", 5, 5));
defenders.push(new UnitInfo("Ranged", "Rus", 2, 5));
defenders.push(new UnitInfo("Melee", "Rus", 6, 3));
defenders.push(new UnitInfo("Ranged", "Rus", 5, 5));
defenders.push(new UnitInfo("Melee", "Rus", 6, 3));
adv_defenders.push(new UnitInfo("Melee", "Rus", 6, 5));
adv_defenders.push(new UnitInfo("Ranged", "Rus", 2, 5));
adv_defenders.push(new UnitInfo("Melee", "Rus", 7, 4));
adv_defenders.push(new UnitInfo("Ranged", "Rus", 5, 3));
}
function TownMedvedevo() {
NATION = "Rus";
NAME = "Medvedevo";
barracks.push(new UnitInfo("Melee", "Rus", 3));
barracks.push(new UnitInfo("Melee", "Rus", 4));
barracks.push(new UnitInfo("Melee", "Rus", 5));
barracks.push(new UnitInfo("Melee", "Rus", 6));
barracks.push(new UnitInfo("Melee", "Rus", 7));
barracks.push(new UnitInfo("Melee", "Rus", 8));
barracks.push(new UnitInfo("Ranged", "Rus", 2));
barracks.push(new UnitInfo("Ranged", "Rus", 3));
barracks.push(new UnitInfo("Ranged", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "Bow", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "Spear", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "Shield", "Rus", 2));
forge.push(new ItemInfo("Armor", "Clothes", "Rus", 5));
forge.push(new ItemInfo("Armor", "Helmet", "Rus", 2));
defenders.push(new UnitInfo("Melee", "Rus", 6, 5));
defenders.push(new UnitInfo("Ranged", "Rus", 2, 5));
defenders.push(new UnitInfo("Melee", "Rus", 7, 6));
}
function TownGrouzeno() {
NATION = "Rus";
NAME = "Grouzeno";
barracks.push(new UnitInfo("Melee", "Rus", 10));
barracks.push(new UnitInfo("Melee", "Rus", 9));
barracks.push(new UnitInfo("Ranged", "Rus", 1));
barracks.push(new UnitInfo("Ranged", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "Bow", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "Spear", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "Shield", "Rus", 3));
forge.push(new ItemInfo("Armor", "Clothes", "Rus", 6));
forge.push(new ItemInfo("Armor", "Helmet", "Rus", 3));
barn.push(new Horse("black", 1000, 10, 6, 20000));
barn.push(new Horse("white", 1000, 10, 6, 20000));
defenders.push(new UnitInfo("Melee", "Rus", 8, 5));
defenders.push(new UnitInfo("Ranged", "Rus", 2, 5));
defenders.push(new UnitInfo("Melee", "Rus", 10, 3));
defenders.push(new UnitInfo("Ranged", "Rus", 2, 2));
defenders.push(new UnitInfo("Melee", "Rus", 10, 3));
defenders.push(new UnitInfo("Ranged", "Rus", 2, 2));
}
function TownRaGorod() {
NATION = "Rus";
NAME = "Ra-Gorod";
barracks.push(new UnitInfo("Melee", "Rus", 3));
barracks.push(new UnitInfo("Melee", "Rus", 4));
barracks.push(new UnitInfo("Melee", "Rus", 5));
barracks.push(new UnitInfo("Melee", "Rus", 6));
barracks.push(new UnitInfo("Melee", "Rus", 7));
barracks.push(new UnitInfo("Melee", "Rus", 8));
barracks.push(new UnitInfo("Melee", "Rus", 9));
barracks.push(new UnitInfo("Ranged", "Rus", 2));
barracks.push(new UnitInfo("Ranged", "Rus", 3));
barracks.push(new UnitInfo("Ranged", "Rus", 4));
barracks.push(new UnitInfo("Ranged", "Rus", 5));
barracks.push(new UnitInfo("Ranged", "Rus", 6));
forge.push(new ItemInfo("WeaponClass", "OnehandedSword", "Rus", 5));
forge.push(new ItemInfo("WeaponClass", "OnehandedAxe", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "OnehandedMace", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedSword", "Rus", 5));
forge.push(new ItemInfo("WeaponClass", "TwohandedAxe", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "TwohandedMace", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "Bow", "Rus", 2));
forge.push(new ItemInfo("WeaponClass", "Crossbow", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Rus", 4));
forge.push(new ItemInfo("WeaponClass", "Spear", "Rus", 3));
forge.push(new ItemInfo("WeaponClass", "Shield", "Rus", 3));
forge.push(new ItemInfo("Armor", "Clothes", "Rus", 6));
forge.push(new ItemInfo("Armor", "Helmet", "Rus", 3));
barn.push(new Horse("grey", 350, 4, 3, 1400));
barn.push(new Horse("red", 300, 3, 6, 1400));
barn.push(new Horse("brown", 400, 5, 4, 1500));
barn.push(new Horse("white", 500, 5, 6, 2200));
barn.push(new Horse("black", 600, 7, 1, 3000));
defenders.push(new UnitInfo("Melee", "Rus", 7, 5));
defenders.push(new UnitInfo("Ranged", "Rus", 2, 5));
defenders.push(new UnitInfo("Melee", "Rus", 9, 4));
defenders.push(new UnitInfo("Ranged", "Rus", 6, 2));
defenders.push(new UnitInfo("Melee", "Rus", 9, 4));
defenders.push(new UnitInfo("Ranged", "Rus", 6, 2));
adv_defenders.push(new UnitInfo("Melee", "Rus", 9, 5));
adv_defenders.push(new UnitInfo("Ranged", "Rus", 6, 5));
adv_defenders.push(new UnitInfo("Melee", "Rus", 10, 3));
adv_defenders.push(new UnitInfo("Ranged", "Rus", 2, 4));
}
function TownOmi() {
NATION = "Jap";
NAME = "Omi";
barracks.push(new UnitInfo("Melee", "Jap", 1));
barracks.push(new UnitInfo("Melee", "Jap", 2));
forge.push(new ItemInfo("WeaponClass", "NinjaTo", "Jap", 1));
forge.push(new ItemInfo("WeaponClass", "Staff", "Jap", 1));
forge.push(new ItemInfo("WeaponClass", "Bow", "Jap", 1));
defenders.push(new UnitInfo("Melee", "Jap", 1, 10));
defenders.push(new UnitInfo("Melee", "Jap", 2, 5));
}
function TownKozuke() {
NATION = "Jap";
NAME = "Kozuke";
barracks.push(new UnitInfo("Melee", "Jap", 1));
barracks.push(new UnitInfo("Melee", "Jap", 2));
barracks.push(new UnitInfo("Melee", "Jap", 3));
barracks.push(new UnitInfo("Ranged", "Jap", 1));
forge.push(new ItemInfo("WeaponClass", "Katana", "Jap", 1));
forge.push(new ItemInfo("WeaponClass", "NinjaTo", "Jap", 1));
forge.push(new ItemInfo("WeaponClass", "Staff", "Jap", 1));
forge.push(new ItemInfo("WeaponClass", "Bow", "Jap", 1));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Jap", 1));
forge.push(new ItemInfo("Armor", "Clothes", "Jap", 1));
forge.push(new ItemInfo("Armor", "Helmet", "Jap", 1));
defenders.push(new UnitInfo("Melee", "Jap", 2, 10));
defenders.push(new UnitInfo("Ranged", "Jap", 1, 3));
defenders.push(new UnitInfo("Melee", "Jap", 3, 5));
}
function TownMatsuyama() {
NATION = "Jap";
NAME = "Matsuyama";
barracks.push(new UnitInfo("Melee", "Jap", 1));
barracks.push(new UnitInfo("Melee", "Jap", 2));
barracks.push(new UnitInfo("Melee", "Jap", 3));
barracks.push(new UnitInfo("Melee", "Jap", 4));
barracks.push(new UnitInfo("Ranged", "Jap", 1));
barracks.push(new UnitInfo("Ranged", "Jap", 2));
barracks.push(new UnitInfo("Ranged", "Jap", 5));
forge.push(new ItemInfo("WeaponClass", "Katana", "Jap", 2));
forge.push(new ItemInfo("WeaponClass", "NinjaTo", "Jap", 2));
forge.push(new ItemInfo("WeaponClass", "Staff", "Jap", 2));
forge.push(new ItemInfo("WeaponClass", "Bow", "Jap", 2));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Jap", 1));
forge.push(new ItemInfo("Armor", "Clothes", "Jap", 2));
forge.push(new ItemInfo("Armor", "Helmet", "Jap", 1));
defenders.push(new UnitInfo("Melee", "Jap", 3, 5));
defenders.push(new UnitInfo("Ranged", "Jap", 1, 5));
defenders.push(new UnitInfo("Melee", "Jap", 4, 2));
defenders.push(new UnitInfo("Ranged", "Jap", 2, 2));
defenders.push(new UnitInfo("Melee", "Jap", 4, 2));
defenders.push(new UnitInfo("Ranged", "Jap", 5, 3));
adv_defenders.push(new UnitInfo("Melee", "Jap", 4, 5));
adv_defenders.push(new UnitInfo("Ranged", "Jap", 5, 5));
}
function TownFukushima() {
NATION = "Jap";
NAME = "Fukushima";
barracks.push(new UnitInfo("Melee", "Jap", 1));
barracks.push(new UnitInfo("Melee", "Jap", 2));
barracks.push(new UnitInfo("Melee", "Jap", 3));
barracks.push(new UnitInfo("Melee", "Jap", 4));
barracks.push(new UnitInfo("Melee", "Jap", 6));
barracks.push(new UnitInfo("Ranged", "Jap", 1));
barracks.push(new UnitInfo("Ranged", "Jap", 2));
barracks.push(new UnitInfo("Ranged", "Jap", 5));
barracks.push(new UnitInfo("Ranged", "Jap", 6));
forge.push(new ItemInfo("WeaponClass", "Katana", "Jap", 3));
forge.push(new ItemInfo("WeaponClass", "NinjaTo", "Jap", 3));
forge.push(new ItemInfo("WeaponClass", "Staff", "Jap", 3));
forge.push(new ItemInfo("WeaponClass", "Bow", "Jap", 2));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Jap", 2));
forge.push(new ItemInfo("Armor", "Clothes", "Jap", 3));
forge.push(new ItemInfo("Armor", "Helmet", "Jap", 2));
defenders.push(new UnitInfo("Melee", "Jap", 4, 5));
defenders.push(new UnitInfo("Ranged", "Jap", 5, 5));
defenders.push(new UnitInfo("Melee", "Jap", 6, 5));
defenders.push(new UnitInfo("Ranged", "Jap", 6, 3));
}
function TownIzumo() {
NATION = "Jap";
NAME = "Izumo";
barracks.push(new UnitInfo("Melee", "Jap", 1));
barracks.push(new UnitInfo("Melee", "Jap", 2));
barracks.push(new UnitInfo("Melee", "Jap", 3));
barracks.push(new UnitInfo("Melee", "Jap", 4));
barracks.push(new UnitInfo("Melee", "Jap", 6));
barracks.push(new UnitInfo("Melee", "Jap", 7));
barracks.push(new UnitInfo("Ranged", "Jap", 1));
barracks.push(new UnitInfo("Ranged", "Jap", 2));
barracks.push(new UnitInfo("Ranged", "Jap", 5));
barracks.push(new UnitInfo("Ranged", "Jap", 6));
forge.push(new ItemInfo("WeaponClass", "Katana", "Jap", 4));
forge.push(new ItemInfo("WeaponClass", "NinjaTo", "Jap", 4));
forge.push(new ItemInfo("WeaponClass", "Staff", "Jap", 4));
forge.push(new ItemInfo("WeaponClass", "Bow", "Jap", 3));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Jap", 2));
forge.push(new ItemInfo("Armor", "Clothes", "Jap", 4));
forge.push(new ItemInfo("Armor", "Helmet", "Jap", 2));
defenders.push(new UnitInfo("Melee", "Jap", 6, 5));
defenders.push(new UnitInfo("Ranged", "Jap", 6, 5));
defenders.push(new UnitInfo("Melee", "Jap", 7, 3));
defenders.push(new UnitInfo("Ranged", "Jap", 6, 4));
defenders.push(new UnitInfo("Melee", "Jap", 7, 1));
adv_defenders.push(new UnitInfo("Melee", "Jap", 7, 5));
adv_defenders.push(new UnitInfo("Ranged", "Jap", 6, 5));
adv_defenders.push(new UnitInfo("Melee", "Jap", 8, 1));
}
function TownSuo() {
NATION = "Jap";
NAME = "Suo";
barracks.push(new UnitInfo("Melee", "Jap", 2));
barracks.push(new UnitInfo("Melee", "Jap", 3));
barracks.push(new UnitInfo("Melee", "Jap", 4));
barracks.push(new UnitInfo("Melee", "Jap", 5));
barracks.push(new UnitInfo("Melee", "Jap", 6));
barracks.push(new UnitInfo("Melee", "Jap", 7));
barracks.push(new UnitInfo("Melee", "Jap", 9));
barracks.push(new UnitInfo("Ranged", "Jap", 2));
barracks.push(new UnitInfo("Ranged", "Jap", 3));
barracks.push(new UnitInfo("Ranged", "Jap", 5));
barracks.push(new UnitInfo("Ranged", "Jap", 6));
forge.push(new ItemInfo("WeaponClass", "Katana", "Jap", 4));
forge.push(new ItemInfo("WeaponClass", "NinjaTo", "Jap", 4));
forge.push(new ItemInfo("WeaponClass", "Staff", "Jap", 5));
forge.push(new ItemInfo("WeaponClass", "Bow", "Jap", 3));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Jap", 3));
forge.push(new ItemInfo("Armor", "Clothes", "Jap", 5));
forge.push(new ItemInfo("Armor", "Helmet", "Jap", 2));
defenders.push(new UnitInfo("Melee", "Jap", 7, 5));
defenders.push(new UnitInfo("Ranged", "Jap", 6, 5));
defenders.push(new UnitInfo("Melee", "Jap", 9, 3));
defenders.push(new UnitInfo("Ranged", "Jap", 3, 2));
defenders.push(new UnitInfo("Melee", "Jap", 9, 3));
defenders.push(new UnitInfo("Ranged", "Jap", 3, 4));
}
function TownNagoya() {
NATION = "Jap";
NAME = "Nagoya";
barracks.push(new UnitInfo("Melee", "Jap", 3));
barracks.push(new UnitInfo("Melee", "Jap", 4));
barracks.push(new UnitInfo("Melee", "Jap", 5));
barracks.push(new UnitInfo("Melee", "Jap", 6));
barracks.push(new UnitInfo("Melee", "Jap", 7));
barracks.push(new UnitInfo("Melee", "Jap", 8));
barracks.push(new UnitInfo("Melee", "Jap", 9));
barracks.push(new UnitInfo("Melee", "Jap", 10));
barracks.push(new UnitInfo("Ranged", "Jap", 2));
barracks.push(new UnitInfo("Ranged", "Jap", 3));
barracks.push(new UnitInfo("Ranged", "Jap", 5));
barracks.push(new UnitInfo("Ranged", "Jap", 6));
forge.push(new ItemInfo("WeaponClass", "Katana", "Jap", 5));
forge.push(new ItemInfo("WeaponClass", "NinjaTo", "Jap", 5));
forge.push(new ItemInfo("WeaponClass", "Staff", "Jap", 6));
forge.push(new ItemInfo("WeaponClass", "Bow", "Jap", 4));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Jap", 4));
forge.push(new ItemInfo("Armor", "Clothes", "Jap", 5));
forge.push(new ItemInfo("Armor", "Helmet", "Jap", 3));
defenders.push(new UnitInfo("Melee", "Jap", 9, 5));
defenders.push(new UnitInfo("Ranged", "Jap", 3, 5));
defenders.push(new UnitInfo("Melee", "Jap", 10, 4));
defenders.push(new UnitInfo("Ranged", "Jap", 6, 3));
defenders.push(new UnitInfo("Melee", "Jap", 10, 4));
defenders.push(new UnitInfo("Ranged", "Jap", 6, 3));
defenders.push(new UnitInfo("Melee", "Jap", 10, 4));
defenders.push(new UnitInfo("Ranged", "Jap", 6, 3));
adv_defenders.push(new UnitInfo("Melee", "Jap", 8, 5));
adv_defenders.push(new UnitInfo("Ranged", "Jap", 6, 5));
adv_defenders.push(new UnitInfo("Melee", "Jap", 10, 3));
adv_defenders.push(new UnitInfo("Ranged", "Jap", 3, 3));
adv_defenders.push(new UnitInfo("Melee", "Jap", 11, 1));
}
function TownEchigo() {
NATION = "Jap";
NAME = "Echigo";
barracks.push(new UnitInfo("Melee", "Jap", 11));
forge.push(new ItemInfo("WeaponClass", "Katana", "Jap", 6));
forge.push(new ItemInfo("WeaponClass", "NinjaTo", "Jap", 6));
forge.push(new ItemInfo("WeaponClass", "Throwing", "Jap", 5));
forge.push(new ItemInfo("Armor", "Clothes", "Jap", 6));
forge.push(new ItemInfo("Armor", "Helmet", "Jap", 3));
defenders.push(new UnitInfo("Melee", "Jap", 11, 8));
}
}
Symbol 2078 MovieClip [__Packages.WorldMap] Frame 0
class WorldMap extends MovieClip
{
var speed, TOWNS, LANDS, gox, goy, avatar, _xmouse, _ymouse, seashore, ground, sea;
function WorldMap () {
super();
speed = 2;
TOWNS = new Array();
TOWNS.push("Trapezus");
TOWNS.push("Lutetia");
TOWNS.push("Arretium");
TOWNS.push("Ravenna");
TOWNS.push("Lacrimosa");
TOWNS.push("Caesaria");
TOWNS.push("Carthage");
TOWNS.push("Alexandria");
TOWNS.push("Jana");
TOWNS.push("Konstanz");
TOWNS.push("Gerlitz");
TOWNS.push("Sturmburg");
TOWNS.push("Hoffen");
TOWNS.push("Endem");
TOWNS.push("Braunburg");
TOWNS.push("Wanderburg");
TOWNS.push("Dubkee");
TOWNS.push("Dalnevodye");
TOWNS.push("Losevo");
TOWNS.push("Dobrov");
TOWNS.push("Zlatograd");
TOWNS.push("Medvedevo");
TOWNS.push("Grouzeno");
TOWNS.push("RaGorod");
TOWNS.push("Omi");
TOWNS.push("Kozuke");
TOWNS.push("Matsuyama");
TOWNS.push("Fukushima");
TOWNS.push("Izumo");
TOWNS.push("Suo");
TOWNS.push("Nagoya");
TOWNS.push("Echigo");
LANDS = new Array();
LANDS.push("Viz");
LANDS.push("Ger");
LANDS.push("Rus");
LANDS.push("Jap");
}
function getTownNation(townID) {
switch (townID) {
case "Trapezus" :
case "Lutetia" :
case "Arretium" :
case "Ravenna" :
case "Lacrimosa" :
case "Caesaria" :
case "Carthage" :
case "Alexandria" :
return("Viz");
case "Jana" :
case "Konstanz" :
case "Gerlitz" :
case "Sturmburg" :
case "Hoffen" :
case "Endem" :
case "Braunburg" :
case "Wanderburg" :
return("Ger");
case "Dubkee" :
case "Dalnevodye" :
case "Losevo" :
case "Dobrov" :
case "Zlatograd" :
case "Medvedevo" :
case "Grouzeno" :
case "RaGorod" :
return("Rus");
case "Omi" :
case "Kozuke" :
case "Matsuyama" :
case "Fukushima" :
case "Izumo" :
case "Suo" :
case "Nagoya" :
case "Echigo" :
return("Jap");
}
}
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 < 15) {
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;
}
}
avatar.gotoAndStop((_global.SAILING_SHIP ? 1 : 2));
}
function onPress() {
gox = _xmouse;
goy = _ymouse;
}
function stopMoving() {
gox = null;
goy = null;
if (this["quest_avatar_" + _global.QUEST.avatar_id].hitTest(avatar._x, avatar._y, false)) {
_global.QUEST.prepareBattle();
_global.BATTLE_TYPE = "QUEST";
startBattle(32 + _root.d(8));
}
var _local4 = 0;
while (_local4 < TOWNS.length) {
if (this[TOWNS[_local4]].hitTest(avatar._x, avatar._y, false)) {
_root.openCity(TOWNS[_local4]);
return(undefined);
}
_local4++;
}
}
function randomEncounter() {
if (_root.dice(150) == 0) {
var _local7 = _root.d(_global.MAIN_HERO.LEVEL + 3);
if (_local7 > 24) {
_local7 = 24;
}
delete _global.ENEMIES;
_global.ENEMIES = new Array();
var _local6 = 0;
while (_local6 < _local7) {
_global.ENEMIES.push(new Unit(((_root.dice(2) == 0) ? "Melee" : "Ranged"), "Rog", _root.d(3)));
_local6++;
}
startEncounter();
return(undefined);
}
if (!_global.SAILING_SHIP) {
var _local4 = 0;
while (_local4 < LANDS.length) {
if (this["land" + LANDS[_local4]].hitTest(avatar._x, avatar._y, true)) {
var _local5 = LANDS[_local4];
break;
}
_local4++;
}
if (_global.IS_HOSTILE[_local5] && (_root.dice(150) == 0)) {
var _local7 = 8 + _root.d(_global.MAIN_HERO.LEVEL);
if (_local7 > 24) {
_local7 = 24;
}
delete _global.ENEMIES;
_global.ENEMIES = new Array();
var _local6 = 0;
while (_local6 < Math.min(_local7, 6)) {
_global.ENEMIES.push(new Unit("Melee", _local5, 1 + _root.d(2)));
_local6++;
}
_local6 = 0;
while (_local6 < (_local7 - 6)) {
_global.ENEMIES.push(new Unit("Ranged", _local5, _root.d(2) * 2));
_local6++;
}
startEncounter();
}
}
}
function startEncounter() {
_global.BATTLE_TYPE = "ENCOUNTER";
if (!_global.SAILING_SHIP) {
if (seashore.hitTest(avatar._x, avatar._y, true)) {
var _local5 = 56 + _root.d(4);
} else {
var _local4 = [10, 11, 12, 16, 17, 18];
var _local5 = (_local4[_root.dice(6)] * 4) + _root.d(4);
}
} else {
var _local5 = 52 + _root.d(4);
}
startBattle(_local5);
}
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 onEnterFrame() {
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, _local3, true)) : (ground.hitTest(_local4, _local3, true)))) {
randomEncounter();
avatar._x = _local4;
avatar._y = _local3;
} else {
gox = null;
goy = null;
}
}
}
}
Symbol 155 Button
on (release, keyPress "1") {
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 170 MovieClip Frame 1
text_txt.text = "";
stop();
Symbol 171 Button
on (release, keyPress "2") {
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 172 Button
on (release, keyPress "3") {
if (_global.SCROLL_AllHealBig > 0) {
_global.SCROLL_AllHealBig--;
potion_3_txt.text = _global.SCROLL_AllHealBig;
makeThemHealHero(100000);
}
}
on (rollOver) {
hint.gotoAndStop("potion_3");
}
on (rollOut) {
hint.gotoAndStop("Nothing");
}
Symbol 173 Button
on (release, keyPress "4") {
if (_global.SCROLL_AllHealSmall > 0) {
_global.SCROLL_AllHealSmall--;
scroll_1_txt.text = _global.SCROLL_AllHealSmall;
makeThemHealUnits(0.33);
}
}
on (rollOver) {
hint.gotoAndStop("scroll_1");
}
on (rollOut) {
hint.gotoAndStop("Nothing");
}
Symbol 174 Button
on (release, keyPress "5") {
if (_global.SCROLL_AllHealBig > 0) {
_global.SCROLL_AllHealBig--;
scroll_2_txt.text = _global.SCROLL_AllHealBig;
makeThemHealUnits(0.66);
}
}
on (rollOver) {
hint.gotoAndStop("scroll_2");
}
on (rollOut) {
hint.gotoAndStop("Nothing");
}
Symbol 175 Button
on (release, keyPress "6") {
if (_global.SCROLL_Rage > 0) {
_global.SCROLL_Rage--;
scroll_2_txt.text = _global.SCROLL_Rage;
makeThemRage();
}
}
on (rollOver) {
hint.gotoAndStop("scroll_3");
}
on (rollOut) {
hint.gotoAndStop("Nothing");
}
Symbol 216 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 223 Button
on (press, keyPress "<Home>") {
makeThemHoldPosition();
}
on (rollOver) {
hint.gotoAndStop("HoldPosition");
}
on (rollOut) {
hint.gotoAndStop("Nothing");
}
Symbol 224 Button
on (press, keyPress "<PgUp>") {
makeThemSwapWeapons();
}
on (rollOver) {
hint.gotoAndStop("SwapWeapons");
}
on (rollOut) {
hint.gotoAndStop("Nothing");
}
Symbol 233 MovieClip Frame 1
is_ready = false;
Symbol 233 MovieClip Frame 45
is_ready = true;
stop();
Symbol 233 MovieClip Frame 46
is_ready = false;
Symbol 235 MovieClip Frame 1
is_ready = false;
Symbol 235 MovieClip Frame 65
is_ready = true;
stop();
Symbol 235 MovieClip Frame 66
is_ready = false;
Symbol 243 MovieClip [Screen] Frame 1
#initclip 66
Object.registerClass("Screen", Screen);
#endinitclip
stop();
Instance of Symbol 233 MovieClip "control_shower" in Symbol 243 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 235 MovieClip "control_wall" in Symbol 243 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");
}
Symbol 271 MovieClip Frame 1
stop();
Symbol 301 MovieClip Frame 1
stop();
Symbol 543 MovieClip Frame 18
this._parent.directHit();
Symbol 543 MovieClip Frame 30
gotoAndStop ("sword");
Symbol 543 MovieClip Frame 58
this._parent.directHit();
Symbol 543 MovieClip Frame 70
gotoAndStop ("twohanded_sword");
Symbol 543 MovieClip Frame 95
this._parent.directHit();
Symbol 543 MovieClip Frame 109
gotoAndStop ("twohanded_axe");
Symbol 543 MovieClip Frame 117
this._parent.directHit();
Symbol 543 MovieClip Frame 131
this._parent.directHit();
Symbol 543 MovieClip Frame 140
gotoAndStop ("double");
Symbol 543 MovieClip Frame 156
this._parent.directHit();
Symbol 543 MovieClip Frame 170
gotoAndStop ("spear");
Symbol 543 MovieClip Frame 190
this._parent.directHit();
Symbol 543 MovieClip Frame 210
gotoAndStop ("bow");
Symbol 543 MovieClip Frame 226
this._parent.directHit();
Symbol 543 MovieClip Frame 270
gotoAndStop ("crossbow");
Symbol 543 MovieClip Frame 277
this._parent.directHit();
Symbol 543 MovieClip Frame 290
gotoAndStop ("dagger");
Symbol 543 MovieClip Frame 309
this._parent.directHit();
Symbol 543 MovieClip Frame 315
gotoAndStop ("katana");
Symbol 543 MovieClip Frame 325
this._parent.directHit();
Symbol 543 MovieClip Frame 339
this._parent.directHit();
Symbol 543 MovieClip Frame 350
gotoAndStop ("staff");
Symbol 543 MovieClip Frame 368
this._parent.directHit();
Symbol 543 MovieClip Frame 378
this._parent.directHit();
Symbol 543 MovieClip Frame 385
gotoAndStop ("fists");
Symbol 543 MovieClip Frame 403
this._parent.directHit();
Symbol 543 MovieClip Frame 415
gotoAndStop ("suriken");
Symbol 543 MovieClip Frame 435
this._parent.onSwitchWeapons();
Symbol 543 MovieClip Frame 455
this._parent.onSwitchWeapons();
Symbol 543 MovieClip Frame 475
this._parent.onSwitchWeapons();
Symbol 543 MovieClip Frame 495
this._parent.onSwitchWeapons();
Symbol 543 MovieClip Frame 525
gotoAndPlay ("run_sword");
Symbol 543 MovieClip Frame 555
gotoAndPlay ("run_twohandedsword");
Symbol 543 MovieClip Frame 585
gotoAndPlay ("run_axe");
Symbol 543 MovieClip Frame 615
gotoAndPlay ("run_double");
Symbol 543 MovieClip Frame 645
gotoAndPlay ("run_bow");
Symbol 543 MovieClip Frame 675
gotoAndPlay ("run_crossbow");
Symbol 543 MovieClip Frame 705
gotoAndPlay ("run_suriken");
Symbol 543 MovieClip Frame 735
gotoAndPlay ("run_katana");
Symbol 543 MovieClip Frame 775
this._parent.restInPeace();
stop();
Symbol 543 MovieClip Frame 825
this._parent.restInPeace();
stop();
Symbol 543 MovieClip Frame 855
this._parent.restInPeace();
stop();
Symbol 547 MovieClip [Human] Frame 1
#initclip 31
Object.registerClass("Human", Soldier);
#endinitclip
Symbol 551 MovieClip [Human_Player] Frame 1
#initclip 32
Object.registerClass("Human_Player", Player);
#endinitclip
Symbol 555 MovieClip [Blood_1] Frame 20
this.swapDepths(_root.getDepthDown(_root.getX(this._x), _root.getY(this._y)));
stop();
Symbol 559 MovieClip [Blood_2] Frame 20
this.swapDepths(_root.getDepthDown(_root.getX(this._x), _root.getY(this._y)));
stop();
Symbol 562 MovieClip Frame 15
this.swapDepths(_root.getDepthDown(_root.getX(this._x), _root.getY(this._y)));
stop();
Symbol 564 MovieClip [SelectBorder] Frame 1
#initclip 33
Object.registerClass("SelectBorder", SelectBorder);
#endinitclip
stop();
Symbol 564 MovieClip [SelectBorder] Frame 4
this.removeMovieClip();
Symbol 566 MovieClip Frame 18
this._parent.directHit();
Symbol 566 MovieClip Frame 30
gotoAndStop ("sword");
Symbol 566 MovieClip Frame 55
this._parent.directHit();
Symbol 566 MovieClip Frame 70
gotoAndStop ("twohanded_sword");
Symbol 566 MovieClip Frame 95
this._parent.directHit();
Symbol 566 MovieClip Frame 110
gotoAndStop ("twohanded_axe");
Symbol 566 MovieClip Frame 127
this._parent.directHit();
Symbol 566 MovieClip Frame 140
gotoAndStop ("spear");
Symbol 566 MovieClip Frame 162
this._parent.directHit();
Symbol 566 MovieClip Frame 180
gotoAndStop ("bow");
Symbol 566 MovieClip Frame 195
this._parent.directHit();
Symbol 566 MovieClip Frame 240
gotoAndStop ("crossbow");
Symbol 566 MovieClip Frame 260
this._parent.directHit();
Symbol 566 MovieClip Frame 274
gotoAndStop ("fists");
Symbol 566 MovieClip Frame 293
this._parent.directHit();
Symbol 566 MovieClip Frame 305
gotoAndStop ("suriken");
Symbol 566 MovieClip Frame 325
this._parent.onSwitchWeapons();
Symbol 566 MovieClip Frame 345
this._parent.onSwitchWeapons();
Symbol 566 MovieClip Frame 365
this._parent.onSwitchWeapons();
Symbol 566 MovieClip Frame 385
this._parent.onSwitchWeapons();
Symbol 566 MovieClip Frame 415
gotoAndPlay ("run_sword");
Symbol 566 MovieClip Frame 445
gotoAndPlay ("run_twohandedsword");
Symbol 566 MovieClip Frame 475
gotoAndPlay ("run_axe");
Symbol 566 MovieClip Frame 505
gotoAndPlay ("run_bow");
Symbol 566 MovieClip Frame 535
gotoAndPlay ("run_crossbow");
Symbol 566 MovieClip Frame 565
gotoAndPlay ("run_suriken");
Symbol 566 MovieClip Frame 605
this._parent.restInPeace();
stop();
Symbol 567 MovieClip [Horseman] Frame 1
#initclip 34
Object.registerClass("Horseman", Soldier);
#endinitclip
this.isHorseman = true;
Symbol 568 MovieClip [Horseman_Player] Frame 1
#initclip 35
Object.registerClass("Horseman_Player", Player);
#endinitclip
this.isHorseman = true;
Symbol 577 MovieClip Frame 16
stop();
Symbol 579 MovieClip [Grenade] Frame 1
#initclip 36
Object.registerClass("Grenade", Grenade);
#endinitclip
stop();
Symbol 579 MovieClip [Grenade] Frame 2
this.explode();
Symbol 579 MovieClip [Grenade] Frame 25
this.removeMovieClip();
Symbol 582 MovieClip [HealAnim] Frame 20
this.removeMovieClip();
Symbol 590 MovieClip [RiseAnim] Frame 40
this._parent.turnToZombie();
this.removeMovieClip();
Symbol 796 Button
on (press) {
if (this.amount > 1) {
this.amount--;
this.amount_txt.text = this.amount;
}
}
Symbol 797 Button
on (press) {
if (this.amount < this.max_amount) {
this.amount++;
this.amount_txt.text = this.amount;
}
}
Symbol 801 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 803 Button
on (release, keyPress "<Escape>") {
this.removeMovieClip();
}
Symbol 807 MovieClip [FlyDamage] Frame 25
this.removeMovieClip();
Symbol 866 MovieClip [ArrowShower] Frame 1
#initclip 37
Object.registerClass("ArrowShower", ArrowStorm);
#endinitclip
Symbol 866 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 867 MovieClip [ArrowWall] Frame 1
#initclip 38
Object.registerClass("ArrowWall", ArrowStorm);
#endinitclip
Symbol 867 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 869 MovieClip [Tree_1] Frame 1
#initclip 39
Object.registerClass("Tree_1", Tree);
#endinitclip
this.init();
Symbol 871 MovieClip [Tree_2] Frame 1
#initclip 40
Object.registerClass("Tree_2", Tree);
#endinitclip
this.init();
Symbol 873 MovieClip [Tree_3] Frame 1
#initclip 41
Object.registerClass("Tree_3", Tree);
#endinitclip
this.init();
Symbol 875 MovieClip [Tree_4] Frame 1
#initclip 42
Object.registerClass("Tree_4", Tree);
#endinitclip
this.init();
Symbol 877 MovieClip [Bush_1] Frame 1
#initclip 43
Object.registerClass("Bush_1", Tree);
#endinitclip
this.init();
Symbol 879 MovieClip [Bush_2] Frame 1
#initclip 44
Object.registerClass("Bush_2", Tree);
#endinitclip
this.init();
Symbol 881 MovieClip [Bush_3] Frame 1
#initclip 45
Object.registerClass("Bush_3", Tree);
#endinitclip
this.init();
Symbol 883 MovieClip [Bush_4] Frame 1
#initclip 46
Object.registerClass("Bush_4", Tree);
#endinitclip
this.init();
Symbol 885 MovieClip [Crate_1] Frame 1
#initclip 47
Object.registerClass("Crate_1", Tree);
#endinitclip
this.init();
Symbol 887 MovieClip [Lantern] Frame 1
#initclip 48
Object.registerClass("Lantern", Tree);
#endinitclip
this.init();
Symbol 891 MovieClip [RIP_1] Frame 1
#initclip 49
Object.registerClass("RIP_1", Tree);
#endinitclip
this.init();
Symbol 893 MovieClip [RIP_2] Frame 1
#initclip 50
Object.registerClass("RIP_2", Tree);
#endinitclip
this.init();
Symbol 895 MovieClip [Barrel] Frame 1
#initclip 51
Object.registerClass("Barrel", Tree);
#endinitclip
this.init();
Symbol 897 MovieClip [Ammun] Frame 1
#initclip 52
Object.registerClass("Ammun", Tree);
#endinitclip
this.init();
Symbol 899 MovieClip [SkullTower] Frame 1
#initclip 53
Object.registerClass("SkullTower", Tree);
#endinitclip
this.init();
Symbol 902 MovieClip [Sign] Frame 1
#initclip 54
Object.registerClass("Sign", Tree);
#endinitclip
this.init();
Symbol 904 MovieClip [Tree_5] Frame 1
#initclip 55
Object.registerClass("Tree_5", Tree);
#endinitclip
this.init();
Symbol 906 MovieClip [Tree_6] Frame 1
#initclip 56
Object.registerClass("Tree_6", Tree);
#endinitclip
this.init();
Symbol 909 MovieClip [Sign2] Frame 1
#initclip 57
Object.registerClass("Sign2", Tree);
#endinitclip
this.init();
Symbol 911 MovieClip [Tree_12] Frame 1
#initclip 58
Object.registerClass("Tree_12", Tree);
#endinitclip
this.init();
Symbol 913 MovieClip [Tree_11] Frame 1
#initclip 59
Object.registerClass("Tree_11", Tree);
#endinitclip
this.init();
Symbol 915 MovieClip [Tree_10] Frame 1
#initclip 60
Object.registerClass("Tree_10", Tree);
#endinitclip
this.init();
Symbol 917 MovieClip [Tree_9] Frame 1
#initclip 61
Object.registerClass("Tree_9", Tree);
#endinitclip
this.init();
Symbol 919 MovieClip [Tree_8] Frame 1
#initclip 62
Object.registerClass("Tree_8", Tree);
#endinitclip
this.init();
Symbol 921 MovieClip [Tree_7] Frame 1
#initclip 63
Object.registerClass("Tree_7", Tree);
#endinitclip
this.init();
Symbol 923 MovieClip [Well_1] Frame 1
#initclip 64
Object.registerClass("Well_1", Tree);
#endinitclip
this.init();
Symbol 927 MovieClip [Arrow] Frame 1
#initclip 65
Object.registerClass("Arrow", Arrow);
#endinitclip
Symbol 927 MovieClip [Arrow] Frame 9
gotoAndPlay (1);
Symbol 994 Button
on (release) {
_parent.play();
}
Symbol 1001 MovieClip Frame 40
stop();
Symbol 1002 MovieClip Frame 1
_parent.stop();
Symbol 1002 MovieClip Frame 89
_parent.play();
Symbol 1024 Button
on (release) {
_root.gameLoad(_root.d(80));
}
Symbol 1025 Button
on (release) {
_root.gotoAndStop("WORLD_MAP");
}
Symbol 1026 Button
on (release) {
gotoAndStop ("Options");
}
Symbol 1030 Button
on (release) {
gotoAndStop ("Tutorial");
}
Symbol 1031 Button
on (release) {
gotoAndStop ("NewGame");
}
Symbol 1032 Button
on (release) {
gotoAndStop ("Resume");
}
Symbol 1033 Button
on (release) {
gotoAndStop ("Options");
}
Symbol 1034 Button
on (release) {
gotoAndStop ("Controls");
}
Symbol 1035 Button
on (release) {
getURL ((("http://www.arcadetown.com/index.asp?gameid=feudalism&aid=" + _root.GetUrlParam(_url, "aid=")) + "&refer=") + _root.GetBaseUrl(_url), "_blank");
}
Symbol 1036 Button
on (release) {
getURL ("http://www.arcadetown.com/free_content/index.asp", "_blank");
}
Symbol 1037 Button
on (release) {
getURL ("mailto:zaborov@mail.ru", "_blank");
}
Symbol 1051 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 2) {
_global.MAIN_HERO.STR++;
_global.MAIN_HERO.free_points = _global.MAIN_HERO.free_points - 2;
inventoryShowStats();
}
}
Symbol 1086 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 2) {
_global.MAIN_HERO.DEX++;
_global.MAIN_HERO.free_points = _global.MAIN_HERO.free_points - 2;
inventoryShowStats();
}
}
Symbol 1087 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 2) {
_global.MAIN_HERO.CON++;
_global.MAIN_HERO.free_points = _global.MAIN_HERO.free_points - 2;
inventoryShowStats();
}
}
Symbol 1088 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 2) {
_global.MAIN_HERO.INT++;
_global.MAIN_HERO.free_points = _global.MAIN_HERO.free_points - 2;
inventoryShowStats();
}
}
Symbol 1089 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Dual++;
_global.MAIN_HERO.free_points--;
inventoryShowStats();
}
}
Symbol 1090 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Sword++;
_global.MAIN_HERO.free_points--;
inventoryShowStats();
}
}
Symbol 1091 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Axe++;
_global.MAIN_HERO.free_points--;
inventoryShowStats();
}
}
Symbol 1092 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Mace++;
_global.MAIN_HERO.free_points--;
inventoryShowStats();
}
}
Symbol 1093 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Spear++;
_global.MAIN_HERO.free_points--;
inventoryShowStats();
}
}
Symbol 1094 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Dagger++;
_global.MAIN_HERO.free_points--;
inventoryShowStats();
}
}
Symbol 1095 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Staff++;
_global.MAIN_HERO.free_points--;
inventoryShowStats();
}
}
Symbol 1096 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.FarEast++;
_global.MAIN_HERO.free_points--;
inventoryShowStats();
}
}
Symbol 1097 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Bow++;
_global.MAIN_HERO.free_points--;
inventoryShowStats();
}
}
Symbol 1098 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Crossbow++;
_global.MAIN_HERO.free_points--;
inventoryShowStats();
}
}
Symbol 1099 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Throwing++;
_global.MAIN_HERO.free_points--;
inventoryShowStats();
}
}
Symbol 1100 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.ArtOfWar++;
_global.MAIN_HERO.free_points--;
inventoryShowStats();
}
}
Symbol 1101 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Patriotism++;
_global.MAIN_HERO.free_points--;
inventoryShowStats();
}
}
Symbol 1105 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.LEVEL = 1;
_global.MAIN_HERO.NAME = "Karl";
_global.MAIN_HERO.NATION = "Ger";
_global.MAIN_HERO.GENDER = "m";
_global.MAIN_HERO.STR = 20;
_global.MAIN_HERO.CON = 35;
_global.MAIN_HERO.DEX = 5;
_global.MAIN_HERO.INT = 10;
_global.MAIN_HERO.SKILL = new Array();
_global.MAIN_HERO.SKILL.Sword = 30;
_global.MAIN_HERO.SKILL.Axe = 20;
_global.MAIN_HERO.SKILL.Mace = 60;
_global.MAIN_HERO.SKILL.FarEast = 0;
_global.MAIN_HERO.SKILL.Spear = 25;
_global.MAIN_HERO.SKILL.Dagger = 5;
_global.MAIN_HERO.SKILL.Staff = 0;
_global.MAIN_HERO.SKILL.Dual = 5;
_global.MAIN_HERO.SKILL.Fist = 50;
_global.MAIN_HERO.SKILL.Bow = 15;
_global.MAIN_HERO.SKILL.Crossbow = 15;
_global.MAIN_HERO.SKILL.Throwing = 45;
_global.MAIN_HERO.SKILL.Patriotism = 0;
_global.MAIN_HERO.SKILL.ArtOfWar = 0;
_global.MAIN_HERO.WEAPON_PRI = new WeaponClass("OnehandedMace", "Ger", 1);
_global.MAIN_HERO.WEAPON_SEC = new WeaponClass("Shield", "Ger", 1);
_global.MAIN_HERO.ARMOR = new Armor("Clothes", "Ger", 1);
_global.MAIN_HERO.HELMET = null;
_global.MAIN_HERO.HORSE = null;
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "OnehandedSword", "Ger", 1));
_global.IS_CAPTURED.Trapezus = false;
_global.IS_CAPTURED.Jana = true;
_global.IS_CAPTURED.Dubkee = false;
_global.IS_CAPTURED.Omi = false;
_global.CURR_TOWN = "Jana";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
_global.FRIENDS.push(new Unit("Melee", "Ger", 2));
_global.FRIENDS.push(new Unit("Melee", "Ger", 1));
_global.FRIENDS.push(new Unit("Ranged", "Ger", 1));
_global.FRIENDS.push(new Unit("Melee", "Ger", 1));
_global.FRIENDS.push(new Unit("Melee", "Ger", 2));
inventoryShowStats();
}
on (rollOver) {
item_name_txt.text = "Karl, Bishop of The Order of Holy Cross";
item_stats_txt.text = "Prefers blunt weapons in melee combat, also know how to throw knifes, but his dexterity doesn't allow him to use other ranged weapons. Order's warriors depend on their armor and constitution, so some of them are just walking castles!\nNote: Order produces the best maces and armor in the world.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1107 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.LEVEL = 1;
_global.MAIN_HERO.NAME = "Niora";
_global.MAIN_HERO.NATION = "Jap";
_global.MAIN_HERO.GENDER = "f";
_global.MAIN_HERO.STR = 20;
_global.MAIN_HERO.CON = 5;
_global.MAIN_HERO.DEX = 40;
_global.MAIN_HERO.INT = 15;
_global.MAIN_HERO.SKILL = new Array();
_global.MAIN_HERO.SKILL.Sword = 0;
_global.MAIN_HERO.SKILL.Axe = 0;
_global.MAIN_HERO.SKILL.Mace = 0;
_global.MAIN_HERO.SKILL.FarEast = 55;
_global.MAIN_HERO.SKILL.Spear = 0;
_global.MAIN_HERO.SKILL.Dagger = 0;
_global.MAIN_HERO.SKILL.Staff = 70;
_global.MAIN_HERO.SKILL.Dual = 5;
_global.MAIN_HERO.SKILL.Fist = 100;
_global.MAIN_HERO.SKILL.Bow = 55;
_global.MAIN_HERO.SKILL.Crossbow = 0;
_global.MAIN_HERO.SKILL.Throwing = 0;
_global.MAIN_HERO.SKILL.Patriotism = 0;
_global.MAIN_HERO.SKILL.ArtOfWar = 0;
_global.MAIN_HERO.WEAPON_PRI = new WeaponClass("Staff", "Jap", 1);
_global.MAIN_HERO.WEAPON_SEC = new WeaponClass("Bow", "Jap", 1);
_global.MAIN_HERO.ARMOR = null;
_global.MAIN_HERO.HELMET = null;
_global.MAIN_HERO.HORSE = null;
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "Katana", "Jap", 1));
_global.IS_CAPTURED.Trapezus = false;
_global.IS_CAPTURED.Jana = false;
_global.IS_CAPTURED.Dubkee = false;
_global.IS_CAPTURED.Omi = true;
_global.CURR_TOWN = "Omi";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
_global.FRIENDS.push(new Unit("Melee", "Jap", 1));
_global.FRIENDS.push(new Unit("Melee", "Jap", 2));
_global.FRIENDS.push(new Unit("Melee", "Jap", 1));
_global.FRIENDS.push(new Unit("Melee", "Jap", 2));
_global.FRIENDS.push(new Unit("Melee", "Jap", 1));
inventoryShowStats();
}
on (rollOver) {
item_name_txt.text = "Niora, Mistress of The East Eampire";
item_stats_txt.text = "Prefers staffs a little more than katanas and shuriken, but likes bows too. She's a good melee fighter, but could be a good archer as well. Empire'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.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1109 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.LEVEL = 1;
_global.MAIN_HERO.NAME = "Olga";
_global.MAIN_HERO.NATION = "Rus";
_global.MAIN_HERO.GENDER = "f";
_global.MAIN_HERO.STR = 20;
_global.MAIN_HERO.CON = 10;
_global.MAIN_HERO.DEX = 30;
_global.MAIN_HERO.INT = 15;
_global.MAIN_HERO.SKILL = new Array();
_global.MAIN_HERO.SKILL.Sword = 50;
_global.MAIN_HERO.SKILL.Axe = 25;
_global.MAIN_HERO.SKILL.Mace = 5;
_global.MAIN_HERO.SKILL.FarEast = 0;
_global.MAIN_HERO.SKILL.Spear = 15;
_global.MAIN_HERO.SKILL.Dagger = 20;
_global.MAIN_HERO.SKILL.Staff = 0;
_global.MAIN_HERO.SKILL.Dual = 5;
_global.MAIN_HERO.SKILL.Fist = 50;
_global.MAIN_HERO.SKILL.Bow = 65;
_global.MAIN_HERO.SKILL.Crossbow = 40;
_global.MAIN_HERO.SKILL.Throwing = 15;
_global.MAIN_HERO.SKILL.Patriotism = 0;
_global.MAIN_HERO.SKILL.ArtOfWar = 0;
_global.MAIN_HERO.WEAPON_PRI = new WeaponClass("Bow", "Rus", 1);
_global.MAIN_HERO.WEAPON_SEC = new WeaponClass("TwohandedSword", "Rus", 1);
_global.MAIN_HERO.ARMOR = null;
_global.MAIN_HERO.HELMET = null;
_global.MAIN_HERO.HORSE = null;
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "Dagger", "Viz", 1));
_global.IS_CAPTURED.Trapezus = false;
_global.IS_CAPTURED.Jana = false;
_global.IS_CAPTURED.Dubkee = true;
_global.IS_CAPTURED.Omi = false;
_global.CURR_TOWN = "Dubkee";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
_global.FRIENDS.push(new Unit("Melee", "Rus", 2));
_global.FRIENDS.push(new Unit("Melee", "Rus", 1));
_global.FRIENDS.push(new Unit("Ranged", "Rus", 1));
_global.FRIENDS.push(new Unit("Melee", "Rus", 1));
_global.FRIENDS.push(new Unit("Melee", "Rus", 2));
inventoryShowStats();
}
on (rollOver) {
item_name_txt.text = "Olga, the major Druid of Forest Lands";
item_stats_txt.text = "Prefers bows and crossbows, but can fight with a sword too. Forest Lands' warriors depend only on their strength, but DEX and CON are important for them too. Strength allows them to use better axes deal more damage, and even wear better armor made in forest lands.\nNote: Forest Lands produce the best axes and bows in the world.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1111 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.LEVEL = 1;
_global.MAIN_HERO.NAME = "Vseslav";
_global.MAIN_HERO.NATION = "Rus";
_global.MAIN_HERO.GENDER = "m";
_global.MAIN_HERO.STR = 40;
_global.MAIN_HERO.CON = 15;
_global.MAIN_HERO.DEX = 10;
_global.MAIN_HERO.INT = 5;
_global.MAIN_HERO.SKILL = new Array();
_global.MAIN_HERO.SKILL.Sword = 5;
_global.MAIN_HERO.SKILL.Axe = 60;
_global.MAIN_HERO.SKILL.Mace = 35;
_global.MAIN_HERO.SKILL.FarEast = 0;
_global.MAIN_HERO.SKILL.Spear = 15;
_global.MAIN_HERO.SKILL.Dagger = 5;
_global.MAIN_HERO.SKILL.Staff = 0;
_global.MAIN_HERO.SKILL.Dual = 20;
_global.MAIN_HERO.SKILL.Fist = 50;
_global.MAIN_HERO.SKILL.Bow = 15;
_global.MAIN_HERO.SKILL.Crossbow = 5;
_global.MAIN_HERO.SKILL.Throwing = 45;
_global.MAIN_HERO.SKILL.Patriotism = 0;
_global.MAIN_HERO.SKILL.ArtOfWar = 0;
_global.MAIN_HERO.WEAPON_PRI = new WeaponClass("TwohandedAxe", "Rus", 1);
_global.MAIN_HERO.WEAPON_SEC = new WeaponClass("Throwing", "Rus", 1);
_global.MAIN_HERO.ARMOR = new Armor("Clothes", "Rus", 1);
_global.MAIN_HERO.HELMET = new Armor("Helmet", "Rus", 1);
_global.MAIN_HERO.HORSE = null;
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "OnehandedMace", "Rus", 1));
_global.IS_CAPTURED.Trapezus = false;
_global.IS_CAPTURED.Jana = false;
_global.IS_CAPTURED.Dubkee = true;
_global.IS_CAPTURED.Omi = false;
_global.CURR_TOWN = "Dubkee";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
_global.FRIENDS.push(new Unit("Ranged", "Rus", 1));
_global.FRIENDS.push(new Unit("Melee", "Rus", 1));
_global.FRIENDS.push(new Unit("Melee", "Rus", 2));
_global.FRIENDS.push(new Unit("Melee", "Rus", 1));
_global.FRIENDS.push(new Unit("Ranged", "Rus", 1));
inventoryShowStats();
}
on (rollOver) {
item_name_txt.text = "Vseslav, Chieftain of The Forest Lands";
item_stats_txt.text = "Likes powerful weapons, like mace and axe. His incredible strength also allow him to use throwing axes. \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 and bows in the world.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1113 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.LEVEL = 1;
_global.MAIN_HERO.NAME = "Edgar";
_global.MAIN_HERO.NATION = "Viz";
_global.MAIN_HERO.GENDER = "m";
_global.MAIN_HERO.STR = 30;
_global.MAIN_HERO.CON = 15;
_global.MAIN_HERO.DEX = 20;
_global.MAIN_HERO.INT = 10;
_global.MAIN_HERO.SKILL = new Array();
_global.MAIN_HERO.SKILL.Sword = 55;
_global.MAIN_HERO.SKILL.Axe = 20;
_global.MAIN_HERO.SKILL.Mace = 20;
_global.MAIN_HERO.SKILL.FarEast = 0;
_global.MAIN_HERO.SKILL.Spear = 25;
_global.MAIN_HERO.SKILL.Dagger = 45;
_global.MAIN_HERO.SKILL.Staff = 0;
_global.MAIN_HERO.SKILL.Dual = 15;
_global.MAIN_HERO.SKILL.Fist = 50;
_global.MAIN_HERO.SKILL.Bow = 20;
_global.MAIN_HERO.SKILL.Crossbow = 30;
_global.MAIN_HERO.SKILL.Throwing = 40;
_global.MAIN_HERO.SKILL.Patriotism = 0;
_global.MAIN_HERO.SKILL.ArtOfWar = 0;
_global.MAIN_HERO.WEAPON_PRI = new WeaponClass("TwohandedSword", "Viz", 1);
_global.MAIN_HERO.WEAPON_SEC = new WeaponClass("Bow", "Viz", 1);
_global.MAIN_HERO.ARMOR = null;
_global.MAIN_HERO.HELMET = null;
_global.MAIN_HERO.HORSE = null;
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "Dagger", "Viz", 1));
_global.IS_CAPTURED.Trapezus = true;
_global.IS_CAPTURED.Jana = false;
_global.IS_CAPTURED.Dubkee = false;
_global.IS_CAPTURED.Omi = false;
_global.CURR_TOWN = "Trapezus";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
_global.FRIENDS.push(new Unit("Ranged", "Viz", 1));
_global.FRIENDS.push(new Unit("Melee", "Viz", 1));
_global.FRIENDS.push(new Unit("Melee", "Viz", 1));
_global.FRIENDS.push(new Unit("Melee", "Viz", 1));
_global.FRIENDS.push(new Unit("Ranged", "Viz", 1));
inventoryShowStats();
}
on (rollOver) {
item_name_txt.text = "Edgar, Lord of the Great Trade Republic";
item_stats_txt.text = "Prefers melee weapons and is a very good swordsman, also likes daggers and throwing weapons. Republic 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. They are the only nation who produces daggers.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1115 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.LEVEL = 1;
_global.MAIN_HERO.NAME = "Elizabth";
_global.MAIN_HERO.NATION = "Ger";
_global.MAIN_HERO.GENDER = "f";
_global.MAIN_HERO.STR = 20;
_global.MAIN_HERO.CON = 25;
_global.MAIN_HERO.DEX = 25;
_global.MAIN_HERO.INT = 10;
_global.MAIN_HERO.SKILL = new Array();
_global.MAIN_HERO.SKILL.Sword = 10;
_global.MAIN_HERO.SKILL.Axe = 5;
_global.MAIN_HERO.SKILL.Mace = 50;
_global.MAIN_HERO.SKILL.FarEast = 0;
_global.MAIN_HERO.SKILL.Spear = 50;
_global.MAIN_HERO.SKILL.Dagger = 5;
_global.MAIN_HERO.SKILL.Staff = 0;
_global.MAIN_HERO.SKILL.Dual = 5;
_global.MAIN_HERO.SKILL.Fist = 50;
_global.MAIN_HERO.SKILL.Bow = 35;
_global.MAIN_HERO.SKILL.Crossbow = 45;
_global.MAIN_HERO.SKILL.Throwing = 60;
_global.MAIN_HERO.SKILL.Patriotism = 0;
_global.MAIN_HERO.SKILL.ArtOfWar = 0;
_global.MAIN_HERO.WEAPON_PRI = new WeaponClass("TwohandedMace", "Ger", 1);
_global.MAIN_HERO.WEAPON_SEC = new WeaponClass("Throwing", "Ger", 1);
_global.MAIN_HERO.ARMOR = null;
_global.MAIN_HERO.HELMET = null;
_global.MAIN_HERO.HORSE = null;
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "Spear", "Ger", 1));
_global.IS_CAPTURED.Trapezus = false;
_global.IS_CAPTURED.Jana = true;
_global.IS_CAPTURED.Dubkee = false;
_global.IS_CAPTURED.Omi = false;
_global.CURR_TOWN = "Jana";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
_global.FRIENDS.push(new Unit("Melee", "Ger", 2));
_global.FRIENDS.push(new Unit("Melee", "Ger", 1));
_global.FRIENDS.push(new Unit("Melee", "Ger", 1));
_global.FRIENDS.push(new Unit("Melee", "Ger", 1));
_global.FRIENDS.push(new Unit("Melee", "Ger", 2));
inventoryShowStats();
}
on (rollOver) {
item_name_txt.text = "Elizabeth, Priest of Order of Holy Cross";
item_stats_txt.text = "Prefers different types of weapons: maces, spears, throwing knifes and crossbows. She can fight well in both melee and ranged combat. Order's warriors depend on their armor and constitution, so some of them are just walking castles!\nNote: Order produces the best maces and armor in the world.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1117 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.LEVEL = 1;
_global.MAIN_HERO.NAME = "Selena";
_global.MAIN_HERO.NATION = "Viz";
_global.MAIN_HERO.GENDER = "f";
_global.MAIN_HERO.STR = 15;
_global.MAIN_HERO.CON = 10;
_global.MAIN_HERO.DEX = 35;
_global.MAIN_HERO.INT = 10;
_global.MAIN_HERO.SKILL = new Array();
_global.MAIN_HERO.SKILL.Sword = 35;
_global.MAIN_HERO.SKILL.Axe = 10;
_global.MAIN_HERO.SKILL.Mace = 10;
_global.MAIN_HERO.SKILL.FarEast = 0;
_global.MAIN_HERO.SKILL.Spear = 30;
_global.MAIN_HERO.SKILL.Dagger = 50;
_global.MAIN_HERO.SKILL.Staff = 0;
_global.MAIN_HERO.SKILL.Dual = 15;
_global.MAIN_HERO.SKILL.Fist = 50;
_global.MAIN_HERO.SKILL.Bow = 50;
_global.MAIN_HERO.SKILL.Crossbow = 60;
_global.MAIN_HERO.SKILL.Throwing = 15;
_global.MAIN_HERO.SKILL.Patriotism = 0;
_global.MAIN_HERO.SKILL.ArtOfWar = 0;
_global.MAIN_HERO.WEAPON_PRI = new WeaponClass("Crossbow", "Viz", 1);
_global.MAIN_HERO.WEAPON_SEC = new WeaponClass("Dagger", "Viz", 1);
_global.MAIN_HERO.ARMOR = null;
_global.MAIN_HERO.HELMET = null;
_global.MAIN_HERO.HORSE = null;
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));
_global.IS_CAPTURED.Trapezus = true;
_global.IS_CAPTURED.Jana = false;
_global.IS_CAPTURED.Dubkee = false;
_global.IS_CAPTURED.Omi = false;
_global.CURR_TOWN = "Trapezus";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
_global.FRIENDS.push(new Unit("Melee", "Viz", 1));
_global.FRIENDS.push(new Unit("Melee", "Viz", 1));
_global.FRIENDS.push(new Unit("Melee", "Viz", 1));
_global.FRIENDS.push(new Unit("Melee", "Viz", 1));
_global.FRIENDS.push(new Unit("Melee", "Viz", 1));
inventoryShowStats();
}
on (rollOver) {
item_name_txt.text = "Selena, Princess of the Great Trade Republic";
item_stats_txt.text = "Prefers ranged combat. Usually uses a crossbow, but can fight with a dagger if enemy comes too close. Republic crossbowmen depend on both strength and dexterity, trying to defeat enemy, who comes too close with two-handed swords or daggers.\nNote: Republic produces the best swords and crossbows at the continent. They also make good armor and bows. They are the only nation who produces daggers.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1119 Button
on (release) {
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.LEVEL = 1;
_global.MAIN_HERO.NAME = "Sieg";
_global.MAIN_HERO.NATION = "Jap";
_global.MAIN_HERO.GENDER = "m";
_global.MAIN_HERO.STR = 30;
_global.MAIN_HERO.CON = 5;
_global.MAIN_HERO.DEX = 30;
_global.MAIN_HERO.INT = 10;
_global.MAIN_HERO.SKILL = new Array();
_global.MAIN_HERO.SKILL.Sword = 0;
_global.MAIN_HERO.SKILL.Axe = 0;
_global.MAIN_HERO.SKILL.Mace = 0;
_global.MAIN_HERO.SKILL.FarEast = 70;
_global.MAIN_HERO.SKILL.Spear = 0;
_global.MAIN_HERO.SKILL.Dagger = 0;
_global.MAIN_HERO.SKILL.Staff = 45;
_global.MAIN_HERO.SKILL.Dual = 45;
_global.MAIN_HERO.SKILL.Fist = 100;
_global.MAIN_HERO.SKILL.Bow = 15;
_global.MAIN_HERO.SKILL.Crossbow = 0;
_global.MAIN_HERO.SKILL.Throwing = 0;
_global.MAIN_HERO.SKILL.Patriotism = 0;
_global.MAIN_HERO.SKILL.ArtOfWar = 0;
_global.MAIN_HERO.WEAPON_PRI = new WeaponClass("NinjaTo", "Jap", 1);
_global.MAIN_HERO.WEAPON_SEC = new WeaponClass("Throwing", "Jap", 1);
_global.MAIN_HERO.ARMOR = null;
_global.MAIN_HERO.HELMET = null;
_global.MAIN_HERO.HORSE = null;
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "NinjaTo", "Jap", 1));
_global.IS_CAPTURED.Trapezus = false;
_global.IS_CAPTURED.Jana = false;
_global.IS_CAPTURED.Dubkee = false;
_global.IS_CAPTURED.Omi = true;
_global.CURR_TOWN = "Omi";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
_global.FRIENDS.push(new Unit("Melee", "Jap", 1));
_global.FRIENDS.push(new Unit("Melee", "Jap", 2));
_global.FRIENDS.push(new Unit("Melee", "Jap", 1));
_global.FRIENDS.push(new Unit("Melee", "Jap", 2));
_global.FRIENDS.push(new Unit("Melee", "Jap", 1));
inventoryShowStats();
}
on (rollOver) {
item_name_txt.text = "Sieg, Shogun of the Far East Empire";
item_stats_txt.text = "Prefers his national weapons: Ninja-to, Katanas and shurikens. Likes to fight with weapons in both hands. Empire'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.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1120 Button
on (release) {
_root.gotoAndStop("TOWN_SCREEN");
}
Symbol 1123 Button
on (rollOver) {
item_name_txt.text = "Strength (STR)";
item_stats_txt.text = "Strength is the primary attribute for swords and axes (even throwing), and it's important for any melee fighter as it improves melee damage. Armor made in Forest Lands also requires high STR (not CON).";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1124 Button
on (rollOver) {
item_name_txt.text = "Dexterity (DEX)";
item_stats_txt.text = "Dexterity is the most important attribute of all ranged characters. All bows, crossbows, throwing knifes and shuriken require high DEX to use. It also greatly increases character's dodge, allowing him to evade enemy attacks. Armor made in East Empire also requires high DEX (not CON).";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1125 Button
on (rollOver) {
item_name_txt.text = "Constitution (CON)";
item_stats_txt.text = "Constitution is a very important attribute for everybody. It increases hero's hit points and allows him to wear the best armor and shields. It is also needed for using better maces.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1126 Button
on (rollOver) {
item_name_txt.text = "Intelligence (INT)";
item_stats_txt.text = "Intelligence is the most important attribute for any commander. It is required to master skills \"Patriotism\" and \"Art Of War\". Also, every 2 points of INT increase your unit's HP and damage by 1%";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1127 Button
on (rollOver) {
item_name_txt.text = "Dual weapons";
item_stats_txt.text = "This skill increases your chance to hit an enemy when you're fighting with weapons in both hands.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1128 Button
on (rollOver) {
item_name_txt.text = "Swords";
item_stats_txt.text = "This skill increases your chance to hit an enemy with one-handed and two-handed swords. \nSwords deal medium damage and have rather good attack speed but low crit rates.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1129 Button
on (rollOver) {
item_name_txt.text = "Axe";
item_stats_txt.text = "This skill increases your chance to hit an enemy with one-handed and two-handed axes.\nAxes deal high damage, but they have lower attack speeds and crit rates than swords.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1130 Button
on (rollOver) {
item_name_txt.text = "Mace";
item_stats_txt.text = "This skill increases your chance to hit an enemy with one-handed and two-handed maces.\nMaces deal low damage, have rather good attack speed, and very high crit rates.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1131 Button
on (rollOver) {
item_name_txt.text = "Spear";
item_stats_txt.text = "This skill increases your chance to hit an enemy with a spear.\nSpears deal high damage with the highest crit rate, but they have the lowest attack speed.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1132 Button
on (rollOver) {
item_name_txt.text = "Dagger";
item_stats_txt.text = "This skill increases your chance to hit an enemy with a dagger.\nDaggers are fast weapons with low damage and high crit rate.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1133 Button
on (rollOver) {
item_name_txt.text = "Staff";
item_stats_txt.text = "This skill increases your chance to hit an enemy with a staff.\nStaffs deal low damage, have average crit rates and attack speeds and hit enemy TWICE per attack.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1134 Button
on (rollOver) {
item_name_txt.text = "Far east weapons";
item_stats_txt.text = "This skill increases your chance to hit an enemy with a katana, ninja-to and shuriken.\nKatanas and ninja-to are faster than sword, deal a little less damage, and have better crit rate.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1135 Button
on (rollOver) {
item_name_txt.text = "Bow";
item_stats_txt.text = "This skill increases your chance to hit an enemy with a bow.\nBows deal less damage than crossbows, but attack much faster.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1136 Button
on (rollOver) {
item_name_txt.text = "Crossbow";
item_stats_txt.text = "This skill increases your chance to hit an enemy with a crossbow.\nCrossbow is a very slow weapon, but its damage and crit rates are just great.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1137 Button
on (rollOver) {
item_name_txt.text = "Throwing weapons";
item_stats_txt.text = "This skill increases your chance to hit an enemy with all throwing weapons, excluding shuriken.\nThrowing weapons have higher damage than bows, but lower range.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1138 Button
on (rollOver) {
item_name_txt.text = "Art of war";
item_stats_txt.text = "This skill increases HP and damage of all your units by 0.5% per skill point.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1139 Button
on (rollOver) {
item_name_txt.text = "Patriotism";
item_stats_txt.text = "This skill increases HP and damage of your units, which are the same nation as you, by 1% per skill point.";
}
on (rollOut) {
item_name_txt.text = "";
item_stats_txt.text = "";
}
Symbol 1144 Button
on (release) {
opt_quality.gotoAndStop("LOW");
}
Symbol 1145 Button
on (release) {
opt_quality.gotoAndStop("MEDIUM");
}
Symbol 1146 Button
on (release) {
opt_quality.gotoAndStop("HIGH");
}
Symbol 1148 Button
on (release) {
_root.saveDefaults();
gotoAndStop (1);
}
Symbol 1151 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 1151 MovieClip Frame 2
_global[val] = false;
Symbol 1151 MovieClip Frame 3
_global[val] = true;
Symbol 1158 MovieClip Frame 1
gotoAndStop(_global.SAVED_QUALITY);
Symbol 1158 MovieClip Frame 2
_global.SAVED_QUALITY = "MEDIUM";
Symbol 1158 MovieClip Frame 3
_global.SAVED_QUALITY = "HIGH";
Symbol 1158 MovieClip Frame 4
_global.SAVED_QUALITY = "LOW";
Symbol 1166 Button
on (release) {
if (!_root.loadGame(1)) {
err_notice.gotoAndPlay(2);
}
}
Symbol 1168 Button
on (release) {
if (!_root.loadGame(2)) {
err_notice.gotoAndPlay(2);
}
}
Symbol 1170 Button
on (release) {
if (!_root.loadGame(3)) {
err_notice.gotoAndPlay(2);
}
}
Symbol 1172 Button
on (release) {
if (!_root.loadGame("auto")) {
err_notice.gotoAndPlay(2);
}
}
Symbol 1174 MovieClip Frame 1
stop();
Symbol 1174 MovieClip Frame 55
gotoAndStop (1);
Symbol 1182 Button
on (release) {
gotoAndStop ("buildings");
}
Symbol 1187 MovieClip Frame 1
stop();
Symbol 1187 MovieClip Frame 33
gotoAndPlay (2);
Symbol 1190 MovieClip Frame 1
stop();
Symbol 1190 MovieClip Frame 33
gotoAndPlay (2);
Symbol 1193 MovieClip Frame 1
stop();
Symbol 1193 MovieClip Frame 33
gotoAndPlay (2);
Symbol 1196 MovieClip Frame 1
stop();
Symbol 1196 MovieClip Frame 33
gotoAndPlay (2);
Symbol 1201 MovieClip Frame 1
stop();
Symbol 1201 MovieClip Frame 33
gotoAndPlay (2);
Symbol 1204 MovieClip Frame 1
stop();
Symbol 1204 MovieClip Frame 33
gotoAndPlay (2);
Symbol 1207 MovieClip Frame 1
stop();
Symbol 1207 MovieClip Frame 33
gotoAndPlay (2);
Symbol 1210 MovieClip Frame 1
stop();
Symbol 1210 MovieClip Frame 33
gotoAndPlay (2);
Symbol 1213 MovieClip Frame 1
stop();
Symbol 1213 MovieClip Frame 33
gotoAndPlay (2);
Symbol 1216 MovieClip Frame 1
stop();
Symbol 1216 MovieClip Frame 33
gotoAndPlay (2);
Symbol 1219 MovieClip Frame 1
stop();
Symbol 1219 MovieClip Frame 33
gotoAndPlay (2);
Symbol 1222 MovieClip Frame 1
stop();
Symbol 1222 MovieClip Frame 33
gotoAndPlay (2);
Symbol 1225 MovieClip Frame 1
stop();
Symbol 1225 MovieClip Frame 33
gotoAndStop (1);
Symbol 1228 MovieClip Frame 1
stop();
Symbol 1228 MovieClip Frame 33
gotoAndPlay (2);
Symbol 1232 MovieClip Frame 1
stop();
Symbol 1232 MovieClip Frame 33
gotoAndPlay (2);
Symbol 1235 MovieClip Frame 1
stop();
Symbol 1235 MovieClip Frame 33
gotoAndPlay (2);
Symbol 1238 MovieClip Frame 1
stop();
Symbol 1238 MovieClip Frame 33
gotoAndPlay (2);
Symbol 1239 MovieClip Frame 1
gotoAndStop(_global.MAIN_HERO.NATION);
Symbol 1241 Button
on (release) {
gotoAndStop ("city_hall");
}
Symbol 1243 Button
on (release) {
gotoAndStop ("forge");
}
Symbol 1245 Button
on (release) {
gotoAndStop ("barracks");
}
Symbol 1247 Button
on (release) {
gotoAndStop ("temple");
}
Symbol 1249 Button
on (release) {
gotoAndStop ("also");
}
Symbol 1251 Button
on (release) {
gotoAndPlay ("world");
}
Symbol 1323 MovieClip Frame 1
stop();
Symbol 1323 MovieClip Frame 106
stop();
Symbol 1325 Button
on (release) {
gotoAndStop ("battle");
}
Symbol 1453 MovieClip [BarracksUnit - tutorial] Frame 1
#initclip 67
Object.registerClass("BarracksUnit - tutorial", BarracksIcon);
#endinitclip
Symbol 1461 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 1461 MovieClip Frame 41
gotoAndPlay ("blink_potions");
Symbol 1461 MovieClip Frame 81
gotoAndPlay ("blink_control");
Symbol 1461 MovieClip Frame 121
gotoAndPlay ("blink_hero");
Symbol 1461 MovieClip Frame 161
gotoAndPlay ("blink_friends");
Symbol 1461 MovieClip Frame 201
gotoAndPlay ("blink_enemies");
Symbol 1461 MovieClip Frame 241
gotoAndPlay ("blink_shower");
Symbol 1461 MovieClip Frame 281
gotoAndPlay ("blink_wall");
Symbol 1464 Button
on (release) {
gotoAndStop ("your_hero");
}
Symbol 1466 Button
on (release) {
gotoAndStop ("troops");
}
Symbol 1468 Button
on (release) {
gotoAndStop ("swap");
}
Symbol 1471 Button
on (release) {
gotoAndStop ("enemies");
}
Symbol 1473 Button
on (release) {
gotoAndStop ("potions");
}
Symbol 1476 Button
on (release) {
gotoAndStop ("end");
}
Symbol 1478 Button
on (release) {
_parent.gotoAndStop(1);
}
Symbol 1479 MovieClip Frame 1
stop();
Symbol 1479 MovieClip Frame 3
backgr.hall_btn.play();
Symbol 1479 MovieClip Frame 4
backgr.forge_btn.play();
backgr.hall_btn.gotoAndStop(1);
Symbol 1479 MovieClip Frame 5
backgr.barracks_btn.play();
backgr.forge_btn.gotoAndStop(1);
Symbol 1479 MovieClip Frame 6
backgr.temple_btn.play();
backgr.barracks_btn.gotoAndStop(1);
Symbol 1479 MovieClip Frame 7
backgr.temple_btn.gotoAndStop(1);
Symbol 1479 MovieClip Frame 67
backgr_world.play();
Symbol 1479 MovieClip Frame 178
stop();
Symbol 1479 MovieClip Frame 179
backgr_battle.gotoAndPlay("blink_hero");
Symbol 1479 MovieClip Frame 180
backgr_battle.gotoAndPlay("blink_friends");
Symbol 1479 MovieClip Frame 181
backgr_battle.gotoAndPlay("blink_control");
Symbol 1479 MovieClip Frame 182
backgr_battle.gotoAndPlay("blink_enemies");
Symbol 1479 MovieClip Frame 183
backgr_battle.gotoAndPlay("blink_potions");
Symbol 1484 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 1485 Button
on (release) {
_root.saveDefaults();
gotoAndStop (1);
}
Symbol 1493 MovieClip Frame 1
function inventoryShowStats() {
this.STR_txt.text = _global.MAIN_HERO.STR;
this.DEX_txt.text = _global.MAIN_HERO.DEX;
this.CON_txt.text = _global.MAIN_HERO.CON;
this.INT_txt.text = _global.MAIN_HERO.INT;
var _local3 = _global.MAIN_HERO.free_points >= 2;
var _local4 = 0;
while (_local4 < 4) {
this["stat_btn_" + _local4]._visible = _local3;
_local4++;
}
if (_global.MAIN_HERO.STR >= 200) {
this.stat_btn_0._visible = false;
}
if (_global.MAIN_HERO.DEX >= 200) {
this.stat_btn_1._visible = false;
}
if (_global.MAIN_HERO.CON >= 200) {
this.stat_btn_2._visible = false;
}
if (_global.MAIN_HERO.INT >= 200) {
this.stat_btn_3._visible = false;
}
this.free_points_txt.text = _global.MAIN_HERO.free_points;
_local3 = _global.MAIN_HERO.free_points >= 1;
for (_local4 in _global.MAIN_HERO.SKILL) {
this[_local4 + "_txt"].text = _global.MAIN_HERO.SKILL[_local4];
this["skill_btn_" + _local4]._visible = ((_global.MAIN_HERO.SKILL[_local4] < 100) ? (_local3) : false);
}
if (_global.MAIN_HERO.SKILL.ArtOfWar >= (_global.MAIN_HERO.INT * 2)) {
this.skill_btn_ArtOfWar._visible = false;
}
if (_global.MAIN_HERO.SKILL.Patriotism >= (_global.MAIN_HERO.INT * 2)) {
this.skill_btn_Patriotism._visible = false;
}
this.hero_stats_txt.text = (_global.MAIN_HERO.NAME + "\nLevel ") + _global.MAIN_HERO.LEVEL;
}
stop();
delete _global.MAIN_HERO;
_global.MAIN_HERO = new Hero();
_global.MAIN_HERO.LEVEL = 1;
_global.MAIN_HERO.NAME = "Edgar";
_global.MAIN_HERO.NATION = "Viz";
_global.MAIN_HERO.GENDER = "m";
_global.MAIN_HERO.STR = 30;
_global.MAIN_HERO.CON = 15;
_global.MAIN_HERO.DEX = 20;
_global.MAIN_HERO.INT = 10;
_global.MAIN_HERO.SKILL = new Array();
_global.MAIN_HERO.SKILL.Sword = 55;
_global.MAIN_HERO.SKILL.Axe = 20;
_global.MAIN_HERO.SKILL.Mace = 20;
_global.MAIN_HERO.SKILL.FarEast = 0;
_global.MAIN_HERO.SKILL.Spear = 25;
_global.MAIN_HERO.SKILL.Dagger = 45;
_global.MAIN_HERO.SKILL.Staff = 0;
_global.MAIN_HERO.SKILL.Dual = 15;
_global.MAIN_HERO.SKILL.Fist = 50;
_global.MAIN_HERO.SKILL.Bow = 20;
_global.MAIN_HERO.SKILL.Crossbow = 30;
_global.MAIN_HERO.SKILL.Throwing = 40;
_global.MAIN_HERO.SKILL.Patriotism = 0;
_global.MAIN_HERO.SKILL.ArtOfWar = 0;
_global.MAIN_HERO.WEAPON_PRI = new WeaponClass("TwohandedSword", "Viz", 1);
_global.MAIN_HERO.WEAPON_SEC = new WeaponClass("Bow", "Viz", 1);
_global.MAIN_HERO.ARMOR = null;
_global.MAIN_HERO.HELMET = null;
_global.MAIN_HERO.HORSE = null;
_global.GOLD = 100;
_global.SHIP_LOCATION = "none";
_global.SAILING_SHIP = false;
delete _global.INVENTORY;
_global.INVENTORY = new Array();
_global.INVENTORY.push(new ItemInfo("WeaponClass", "Dagger", "Viz", 1));
_global.IS_CAPTURED.Trapezus = true;
_global.CURR_TOWN = "Trapezus";
delete _global.FRIENDS;
_global.FRIENDS = new Array();
_global.FRIENDS.push(new Unit("Ranged", "Viz", 1));
_global.FRIENDS.push(new Unit("Melee", "Viz", 1));
_global.FRIENDS.push(new Unit("Melee", "Viz", 1));
_global.FRIENDS.push(new Unit("Melee", "Viz", 1));
_global.FRIENDS.push(new Unit("Ranged", "Viz", 1));
_global.POTION_HealSmall = 5;
_global.POTION_HealMedium = 2;
_global.POTION_HealBig = 1;
_global.SCROLL_AllHealSmall = 4;
_global.SCROLL_AllHealBig = 2;
_global.SCROLL_Rage = 1;
Symbol 1493 MovieClip Frame 2
inventoryShowStats();
Instance of Symbol 1151 MovieClip in Symbol 1493 MovieClip Frame 3
//component parameters
onClipEvent (construct) {
val = "HIGHLIGHT_TROOPS";
}
Instance of Symbol 1151 MovieClip in Symbol 1493 MovieClip Frame 3
//component parameters
onClipEvent (construct) {
val = "SHOW_HELP";
}
Instance of Symbol 1484 MovieClip in Symbol 1493 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 1484 MovieClip in Symbol 1493 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 1484 MovieClip in Symbol 1493 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 1484 MovieClip in Symbol 1493 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 1484 MovieClip in Symbol 1493 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 1484 MovieClip in Symbol 1493 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 1484 MovieClip in Symbol 1493 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 1484 MovieClip in Symbol 1493 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 1484 MovieClip in Symbol 1493 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 1484 MovieClip in Symbol 1493 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 1484 MovieClip in Symbol 1493 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 1497 MovieClip Frame 1
_root.addUnit(this._x, this._y, _global[arr].shift(), tm);
this.unloadMovie();
this.removeMovieClip();
Symbol 1499 MovieClip Frame 1
_root.addHero(this._x, this._y, _global.MAIN_HERO, 0);
this.unloadMovie();
this.removeMovieClip();
Symbol 1501 MovieClip [TreeBroken_1] Frame 1
#initclip 68
Object.registerClass("TreeBroken_1", Tree);
#endinitclip
this.init();
Symbol 1503 MovieClip [Crate_2] Frame 1
#initclip 69
Object.registerClass("Crate_2", Tree);
#endinitclip
this.init();
Symbol 1505 MovieClip [Sword_in_ground_1] Frame 1
#initclip 71
Object.registerClass("Sword_in_ground_1", Tree);
#endinitclip
this.init();
Symbol 1509 MovieClip [Head_on_spear] Frame 1
#initclip 70
Object.registerClass("Head_on_spear", Tree);
#endinitclip
this.init();
Symbol 1511 MovieClip [Sword_in_ground_2] Frame 1
#initclip 72
Object.registerClass("Sword_in_ground_2", Tree);
#endinitclip
this.init();
Symbol 1512 Button
on (release) {
openBarracks();
}
Symbol 1513 Button
on (release) {
openCityHall();
}
Symbol 1514 Button
on (release) {
openForge();
}
Symbol 1515 Button
on (release) {
openTemple();
}
Symbol 1534 MovieClip Frame 1
stop();
Symbol 1538 Button
on (release) {
_parent.leaveTown();
}
Symbol 1539 Button
on (release) {
_parent.openHeroStats();
}
Symbol 1596 MovieClip [ICON Inventory] Frame 1
#initclip 76
Object.registerClass("ICON Inventory", StoreIcon);
#endinitclip
Symbol 1597 Button
on (press) {
if (_parent.scrollTrader > 0) {
_parent.scrollTrader--;
_parent.storeShowTrader();
}
}
Symbol 1598 Button
on (press) {
if (_parent.city.forge.length > (_parent.scrollTrader + 7)) {
_parent.scrollTrader++;
_parent.storeShowTrader();
}
}
Symbol 1599 Button
on (press) {
if (_parent.scrollUser > 0) {
_parent.scrollUser--;
_parent.storeShowUser();
}
}
Symbol 1600 Button
on (press) {
if (_global.INVENTORY.length > (_parent.scrollUser + 7)) {
_parent.scrollUser++;
_parent.storeShowUser();
}
}
Symbol 1609 Button
on (release) {
_parent.enableAll();
gotoAndStop (1);
}
Symbol 1612 Button
on (press) {
var mult = (Key.isDown(16) ? 5 : 1);
if (_global.GOLD >= (10 * mult)) {
_global.GOLD = _global.GOLD - (10 * mult);
_global.POTION_HealSmall = _global.POTION_HealSmall + mult;
money_txt.text = _global.GOLD + " gp.";
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 10 gp.";
}
Symbol 1613 Button
on (press) {
var mult = (Key.isDown(16) ? 5 : 1);
if (_global.GOLD >= (100 * mult)) {
_global.GOLD = _global.GOLD - (100 * mult);
_global.POTION_HealMedium = _global.POTION_HealMedium + mult;
money_txt.text = _global.GOLD + " gp.";
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 100 gp.";
}
Symbol 1614 Button
on (press) {
var mult = (Key.isDown(16) ? 5 : 1);
if (_global.GOLD >= (900 * mult)) {
_global.GOLD = _global.GOLD - (900 * mult);
_global.POTION_HealBig = _global.POTION_HealBig + mult;
money_txt.text = _global.GOLD + " gp.";
potion_3_txt.text = _global.POTION_HealBig;
} else {
item_name_txt.text = "Not enough money!";
item_stats_txt.text = "";
}
}
on (rollOver) {
item_name_txt.text = "Large heal potion";
item_stats_txt.text = "Completely restores HP\n\nCost 900 gp.";
}
Symbol 1615 Button
on (press) {
var mult = (Key.isDown(16) ? 5 : 1);
if (_global.GOLD >= (50 * mult)) {
_global.GOLD = _global.GOLD - (50 * mult);
_global.SCROLL_AllHealSmall = _global.SCROLL_AllHealSmall + mult;
money_txt.text = _global.GOLD + " gp.";
scroll_1_txt.text = _global.SCROLL_AllHealSmall;
} else {
item_name_txt.text = "Not enough money!";
item_stats_txt.text = "";
}
}
on (rollOver) {
item_name_txt.text = "Scroll of Small Healing";
item_stats_txt.text = "Restores 1/3 HP to all friendly units\n\nCost 50 gp.";
}
Symbol 1616 Button
on (press) {
var mult = (Key.isDown(16) ? 5 : 1);
if (_global.GOLD >= (200 * mult)) {
_global.GOLD = _global.GOLD - (200 * mult);
_global.SCROLL_AllHealBig = _global.SCROLL_AllHealBig + mult;
money_txt.text = _global.GOLD + " gp.";
scroll_2_txt.text = _global.SCROLL_AllHealBig;
} else {
item_name_txt.text = "Not enough money!";
item_stats_txt.text = "";
}
}
on (rollOver) {
item_name_txt.text = "Scroll of Healing";
item_stats_txt.text = "Restores 2/3 HP to all friendly units\n\nCost 200 gp.";
}
Symbol 1617 Button
on (press) {
var mult = (Key.isDown(16) ? 5 : 1);
if (_global.GOLD >= (1000 * mult)) {
_global.GOLD = _global.GOLD - (1000 * mult);
_global.SCROLL_Rage = _global.SCROLL_Rage + mult;
money_txt.text = _global.GOLD + " gp.";
scroll_3_txt.text = _global.SCROLL_Rage;
} else {
item_name_txt.text = "Not enough money!";
item_stats_txt.text = "";
}
}
on (rollOver) {
item_name_txt.text = "Scroll of Bloody Rage";
item_stats_txt.text = "Makes your units attack much faster. Units with low attack speed gain a huge bunus, perhaps fast attacking units get a very small bonus.\n\nCost 1000 gp.";
}
Symbol 1637 Button
on (press) {
if (_parent.scrollTrader > 0) {
_parent.scrollTrader--;
_parent.barracksShowTrader();
}
}
Symbol 1638 Button
on (press) {
if (_parent.city.barracks.length > (_parent.scrollTrader + 8)) {
_parent.scrollTrader++;
_parent.barracksShowTrader();
}
}
Symbol 1639 Button
on (press) {
if (_parent.scrollUser > 0) {
_parent.scrollUser--;
_parent.barracksShowUser();
}
}
Symbol 1640 Button
on (press) {
if ((_global.FRIENDS.length - 9) > (_parent.scrollUser + 8)) {
_parent.scrollUser++;
_parent.barracksShowUser();
}
}
Symbol 1642 MovieClip [BarracksUnit] Frame 1
#initclip 73
Object.registerClass("BarracksUnit", BarracksIcon);
#endinitclip
Symbol 1648 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 2) {
_global.MAIN_HERO.STR++;
_global.MAIN_HERO.free_points = _global.MAIN_HERO.free_points - 2;
_parent.inventoryShowStats();
}
}
Symbol 1683 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 2) {
_global.MAIN_HERO.DEX++;
_global.MAIN_HERO.free_points = _global.MAIN_HERO.free_points - 2;
_parent.inventoryShowStats();
}
}
Symbol 1684 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 2) {
_global.MAIN_HERO.CON++;
_global.MAIN_HERO.free_points = _global.MAIN_HERO.free_points - 2;
_parent.inventoryShowStats();
}
}
Symbol 1685 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 2) {
_global.MAIN_HERO.INT++;
_global.MAIN_HERO.free_points = _global.MAIN_HERO.free_points - 2;
_parent.inventoryShowStats();
}
}
Symbol 1686 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Dual++;
_global.MAIN_HERO.free_points--;
_parent.inventoryShowStats();
}
}
Symbol 1687 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Sword++;
_global.MAIN_HERO.free_points--;
_parent.inventoryShowStats();
}
}
Symbol 1688 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Axe++;
_global.MAIN_HERO.free_points--;
_parent.inventoryShowStats();
}
}
Symbol 1689 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Mace++;
_global.MAIN_HERO.free_points--;
_parent.inventoryShowStats();
}
}
Symbol 1690 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Spear++;
_global.MAIN_HERO.free_points--;
_parent.inventoryShowStats();
}
}
Symbol 1691 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Dagger++;
_global.MAIN_HERO.free_points--;
_parent.inventoryShowStats();
}
}
Symbol 1692 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Staff++;
_global.MAIN_HERO.free_points--;
_parent.inventoryShowStats();
}
}
Symbol 1693 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.FarEast++;
_global.MAIN_HERO.free_points--;
_parent.inventoryShowStats();
}
}
Symbol 1694 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Bow++;
_global.MAIN_HERO.free_points--;
_parent.inventoryShowStats();
}
}
Symbol 1695 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Crossbow++;
_global.MAIN_HERO.free_points--;
_parent.inventoryShowStats();
}
}
Symbol 1696 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Throwing++;
_global.MAIN_HERO.free_points--;
_parent.inventoryShowStats();
}
}
Symbol 1697 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.ArtOfWar++;
_global.MAIN_HERO.free_points--;
_parent.inventoryShowStats();
}
}
Symbol 1698 Button
on (release) {
if (_global.MAIN_HERO.free_points >= 1) {
_global.MAIN_HERO.SKILL.Patriotism++;
_global.MAIN_HERO.free_points--;
_parent.inventoryShowStats();
}
}
Symbol 1747 MovieClip [ICON Equipment] Frame 1
#initclip 74
Object.registerClass("ICON Equipment", EquipmentIcon);
#endinitclip
Symbol 1748 Button
on (press) {
if (_global.INVENTORY.length > (_parent.scrollUser + 4)) {
_parent.scrollUser++;
_parent.storeShowUser();
}
}
Symbol 1753 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 1831 MovieClip Frame 1
stop();
Symbol 1841 Button
on (release) {
_parent.openHeroStats();
}
Symbol 1842 Button
on (release) {
_parent.openCaptureTown();
}
Symbol 1843 Button
on (release) {
_parent.openGetQuest();
}
Symbol 1847 Button
on (release) {
_root.saveGame(1);
}
Symbol 1848 Button
on (release) {
_root.loadGame(1);
}
Symbol 1850 Button
on (release) {
_root.saveGame(2);
}
Symbol 1851 Button
on (release) {
_root.loadGame(2);
}
Symbol 1853 Button
on (release) {
_root.saveGame(3);
}
Symbol 1854 Button
on (release) {
_root.loadGame(3);
}
Symbol 1856 Button
on (release) {
_root.saveGame("auto");
}
Symbol 1857 Button
on (release) {
_root.loadGame("auto");
}
Symbol 1865 Button
on (release) {
_parent.openGetQuest();
}
Symbol 1867 Button
on (release) {
if (_global.QUEST.avatar_id < 0) {
_global.QUEST.aproveDeliver();
}
_parent.enableAll();
gotoAndStop (1);
}
Symbol 1869 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 1873 Button
on (press) {
if (_parent.scrollTrader > 0) {
_parent.scrollTrader--;
_parent.barnShowTrader();
}
}
Symbol 1874 Button
on (press) {
if (_parent.city.barracks.length > (_parent.scrollTrader + 8)) {
_parent.scrollTrader++;
_parent.barnShowTrader();
}
}
Symbol 1883 Button
on (release) {
_global.GOLD = _global.GOLD - _global.SHIP_PRICE;
_global.SAILING_SHIP = true;
_parent.leaveTown();
}
Symbol 1885 Button
on (release) {
_parent.enableAll();
gotoAndStop (1);
}
Symbol 1888 Button
on (release) {
_parent.startBattleForCity();
}
Symbol 1891 Button
on (release) {
_parent.enableAll();
gotoAndStop (1);
}
Symbol 1896 Button
on (release) {
_parent.startBattleForCity();
}
Symbol 1897 MovieClip Frame 1
stop();
Symbol 1897 MovieClip Frame 2
_parent.storeShowTrader();
_parent.storeShowUser();
Instance of Symbol 1151 MovieClip in Symbol 1897 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
val = "STORE_DONT_ASK_AMOUNT";
}
Symbol 1897 MovieClip Frame 3
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 1897 MovieClip Frame 4
_parent.barracksShowTrader();
_parent.barracksShowUser();
Symbol 1897 MovieClip Frame 5
_parent.inventoryShowUser();
_parent.inventoryShowStats();
hero_stats_txt.text = (_global.MAIN_HERO.NAME + " lv. ") + _global.MAIN_HERO.LEVEL;
Symbol 1897 MovieClip Frame 7
man_movie.gotoAndStop(_parent.city.NATION);
Symbol 1897 MovieClip Frame 8
man_movie.gotoAndStop(_parent.city.NATION);
Symbol 1897 MovieClip Frame 9
_parent.barnShowTrader();
hero_stats_txt.text = (_global.MAIN_HERO.NAME + " lv. ") + _global.MAIN_HERO.LEVEL;
Symbol 1897 MovieClip Frame 11
man_movie.gotoAndStop(_parent.city.NATION);
Symbol 1897 MovieClip Frame 12
man_movie.gotoAndStop(_parent.city.NATION);
Symbol 1897 MovieClip Frame 13
man_movie.gotoAndStop(_parent.city.NATION);
Symbol 1897 MovieClip Frame 15
man_movie.gotoAndStop(_parent.city.NATION);
Symbol 1901 Button
on (release) {
openHarbor();
}
Symbol 1903 Button
on (release) {
openBarn();
}
Symbol 1911 Button
on (release) {
openBarracks();
}
Symbol 1912 Button
on (release) {
openCityHall();
}
Symbol 1913 Button
on (release) {
openForge();
}
Symbol 1914 Button
on (release) {
openTemple();
}
Symbol 1927 Button
on (release) {
openBarracks();
}
Symbol 1928 Button
on (release) {
openCityHall();
}
Symbol 1929 Button
on (release) {
openForge();
}
Symbol 1930 Button
on (release) {
openTemple();
}
Symbol 1943 Button
on (release) {
openBarracks();
}
Symbol 1944 Button
on (release) {
openCityHall();
}
Symbol 1945 Button
on (release) {
openForge();
}
Symbol 1946 Button
on (release) {
openTemple();
}
Symbol 1958 MovieClip [Cities] Frame 1
#initclip 75
Object.registerClass("Cities", Cities);
#endinitclip
Symbol 1977 MovieClip Frame 1
stop();
loops = 0;
Symbol 1977 MovieClip Frame 3
if (loops < 8) {
gotoAndPlay (2);
loops++;
} else {
gotoAndStop (1);
loops = 0;
}
Symbol 1979 MovieClip [WorldMap] Frame 1
#initclip 77
Object.registerClass("WorldMap", WorldMap);
#endinitclip
init();
Symbol 1983 Button
on (release) {
this._visible = false;
}
Symbol 1984 MovieClip Frame 1
this._visible = _global.SHOW_HELP;
if (this._visible) {
_parent.world_map.blinker.play();
}
Instance of Symbol 1151 MovieClip in Symbol 1984 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
val = "SHOW_HELP";
}
Symbol 1988 MovieClip Frame 1
gotoAndStop(_root.d(8) + 1);
Symbol 1992 Button
on (release) {
if (_global.BATTLE_TUTORIAL_PLAYED || (!_global.SHOW_HELP)) {
_root.loadMap(_global.BATTLE_MAP);
} else {
_root.gotoAndStop("BATTLE_TUT");
}
}
Symbol 1998 MovieClip Frame 110
if (_global.BATTLE_TUTORIAL_PLAYED || (!_global.SHOW_HELP)) {
_root.loadMap(_global.BATTLE_MAP);
} else {
_root.gotoAndStop("BATTLE_TUT");
}
Symbol 2006 Button
on (release) {
_root.gotoAndStop(4);
}
Symbol 2008 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 2008 MovieClip Frame 50
stop();
Symbol 2012 MovieClip Frame 1
gotoAndStop(_root.d(4) + 1);
Symbol 2017 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 = 60 + _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 + "/") + _global.MAIN_HERO.EXP_FOR_LEVELS[_global.MAIN_HERO.LEVEL + 1];
fields.gold_txt.text = _global.GOLD + " gp.";
}
}
Symbol 2034 MovieClip Frame 1
stop();
Symbol 2037 Button
on (release) {
_parent.nextFrame();
}
Symbol 2047 Button
on (release) {
_global.BATTLE_TUTORIAL_PLAYED = true;
_root.loadMap(_global.BATTLE_MAP);
}
Symbol 2049 MovieClip Frame 1
stop();
Symbol 2049 MovieClip Frame 2
backgr_battle.gotoAndPlay("blink_hero");
Symbol 2049 MovieClip Frame 3
backgr_battle.gotoAndPlay("blink_friends");
Symbol 2049 MovieClip Frame 4
backgr_battle.gotoAndPlay("blink_control");
Symbol 2049 MovieClip Frame 5
backgr_battle.gotoAndPlay("blink_enemies");
Symbol 2049 MovieClip Frame 6
backgr_battle.gotoAndPlay("blink_potions");
Symbol 2049 MovieClip Frame 7
backgr_battle.gotoAndPlay("blink_shower");
Symbol 2049 MovieClip Frame 8
backgr_battle.gotoAndPlay("blink_wall");
Symbol 2049 MovieClip Frame 9
backgr_battle.gotoAndStop(280);