Frame 1
function checkParamsLoaded() {
if (ad.content_mc.txt.text == "") {
for (i in ad.content_mc) {
switch (i) {
case "btn" :
case "txt" :
case "holder" :
case "bg" :
case "mcLoader1" :
case "" :
break;
default :
ad.content_mc.txt.text = ad.content_mc[i];
if (!ad.content_mc.txt.text.split("20206").length) {
break;
}
gameAd = true;
}
}
} else {
for (i in ad.content_mc) {
str = str + ad.content_mc[i];
}
clearInterval(param_interval);
display(str);
}
}
stop();
fscommand ("showmenu", "false");
_quality = "HIGH";
gameVersion = "1.0.1";
gameID = 20206;
gameAd = false;
gameUpdate = false;
gameEmbed = false;
var str = "";
var loadFlag = 0;
System.security.allowDomain("http://ads.ad4game.com/");
loadVariables ("http://ads.ad4game.com/www/delivery/afr.php?zoneid=" + gameID, ad.content_mc);
var runInterval;
runBorder = function () {
ad.borderAnim.gotoAndPlay(2);
Mouse.show();
};
var param_interval = setInterval(checkParamsLoaded, 100);
ad.content_mc.txt._visible = false;
ad.content_mc.mcLoader1._visible = true;
ad._visible = false;
ad.adToolTip._visible = false;
var flagtoolTip = false;
display = function (s) {
var _local4 = s.indexOf(".swf", 0);
flag1 = s.indexOf(".gif", 0);
if ((_local4 == -1) && (flag1 != -1)) {
var _local3 = s.indexOf("http", 0);
var _local6 = s.indexOf("target", 0);
var str1 = (substring(s, _local3 + 1, _local6 - 3));
var _local2 = s.indexOf("http", _local6);
var _local5 = s.indexOf("gif", _local6);
var str2 = (substring(s, _local2 + 1, (_local5 - _local2) + 3));
ad.content_mc.holder.loadMovie(str2);
ad.onEnterFrame = function () {
if (ad.content_mc.holder._width > 0) {
ad._visible = true;
flagtoolTip = true;
ad.content_mc.mcLoader1._visible = false;
loadFlag = 1;
runInterval = setInterval(runBorder, 3000);
delete ad.onEnterFrame;
}
};
ad.content_mc.btn.onPress = function () {
clearInterval(runInterval);
getURL (str1, "_blank");
};
} else if ((_local4 == -1) && (flag1 == -1)) {
var _local3 = s.indexOf("http", 0);
var _local6 = s.indexOf("target", 0);
var str1 = (substring(s, _local3 + 1, _local6 - 3));
var _local2 = s.indexOf("http", _local6);
var _local5 = s.indexOf("jpg", _local6);
var str2 = (substring(s, _local2 + 1, (_local5 - _local2) + 3));
ad.content_mc.holder.loadMovie(str2);
ad.onEnterFrame = function () {
if (ad.content_mc.holder._width > 0) {
ad._visible = true;
flagtoolTip = true;
loadFlag = 1;
ad.content_mc.mcLoader1._visible = false;
runInterval = setInterval(runBorder, 3000);
delete ad.onEnterFrame;
}
};
ad.content_mc.btn.onPress = function () {
clearInterval(runInterval);
getURL (str1, "_blank");
};
} else {
var _local3 = s.indexOf("FILE1", 0);
var _local6 = s.indexOf(".swf", _local3);
var str1 = (substring(s, _local3 + 7, (_local6 - _local3) - 2));
var _local2 = s.indexOf("clickTAG", 0);
var _local5 = s.indexOf("\"", _local2);
var str2 = (substring(s, _local2, (_local5 - _local2) - 1));
ad.content_mc.holder.loadMovie(str1);
ad.onEnterFrame = function () {
if (ad.content_mc.holder._width > 0) {
loadFlag = 1;
ad._visible = true;
flagtoolTip = true;
ad.content_mc.mcLoader1._visible = false;
runInterval = setInterval(runBorder, 3000);
delete ad.onEnterFrame;
}
};
ad.content_mc.btn.onPress = function () {
clearInterval(runInterval);
getURL (str2, "_blank");
};
}
ad.content_mc.btn.onRollOver = function () {
if (flagtoolTip) {
ad.adToolTip._visible = true;
}
};
ad.content_mc.btn.onRollOut = function () {
ad.adToolTip._visible = false;
ad.content_mc.btn.onEnterFrame = null;
};
};
ad.btn_powered.onPress = function () {
getURL ("http://www.ad4game.com", "_blank");
};
killAd = function () {
clearInterval(param_interval);
clearInterval(runInterval);
unloadMovie ("ad.content_mc.holder");
delete ad.btn_powered.onPress;
delete ad.content_mc.btn.onPress;
delete ad.content_mc.btn.onRollOver;
delete ad.content_mc.btn.onRollOut;
};
screenLoading = function () {
btnNext._visible = false;
loading.snake.gotoX = loading.snake._x;
byteTotal = _root.getBytesTotal();
var snakeEnd = 470;
onEnterFrame = function () {
var _local2 = _root.getBytesLoaded();
if (_local2 < byteTotal) {
var _local3 = Math.round((_local2 * 100) / byteTotal);
loading.snake.gotoX = ((-snakeEnd) / 100) * _local3;
} else {
loading.snake.gotoX = -snakeEnd;
}
if (loading.snake.gotoX != loading.snake._x) {
loading.snake._x = loading.snake._x + Math.floor((loading.snake.gotoX - loading.snake._x) / 40);
}
if (loading.snake._x == (-snakeEnd)) {
loading.goku.gotoAndStop("stand");
btnNext._visible = true;
delete onEnterFrame;
}
};
txori.onPress = function () {
getURL ("http://www.txori.com");
};
btnNext.onPress = function () {
killAd();
delete txori.onPress;
delete btnNext.onPress;
gotoAndStop ("code");
};
checkGameVersion = function () {
var varReceiver = new LoadVars();
varReceiver.load("http://www.txori.com/data/documents/dbz/version");
varReceiver.onLoad = function (success) {
if (success) {
var _local2 = int(varReceiver.v);
var _local1 = gameVersion.split(".");
var _local3 = int((_local1[0] + _local1[1]) + _local1[2]);
if (_local3 < _local2) {
gameUpdate = true;
}
}
};
};
if (_url.substring(7, 20) != "www.txori.com") {
checkGameVersion();
}
if (_parent) {
gameEmbed = true;
}
};
screenLoading();
Frame 2
stop();
fscommand ("showmenu", "false");
_quality = "HIGH";
debug = false;
cheatcode = false;
hookControl = false;
_ANGLEMAX = 0.261799387799149;
_KAMEHAX = 8;
_KAMEHAY = 6;
_BALLMAX = 10;
_XMIN = 20;
_XMAX = 481;
_YMIN = 66;
_YMAX = 266;
_XTEAM = 20;
_YTEAM = 275;
_YFX = 252;
_AURA = 1;
_KIBLAST = 2;
_STRENGTH = 3;
_SPEED = 4;
_MIND = 5;
_HP = 1;
_KI = 2;
_KIMAX = 3;
_LVL = 4;
_LVLMAX = 5;
_DCLOSECOMBAT = 26;
_DATTACK = 30;
_DPROTECTCLOSE = 40;
_DPOWERBALL = 70;
_DFIREBALL = 100;
_DPROTECTFAR = 160;
_DCOUNTERFIREBALL = 210;
_TKEYSPEED = 200;
_TSPEED = 400;
_GRAVITY = 2;
_JUMPSTART = 16;
deleteCookie = function () {
var _local1 = SharedObject.getLocal("DBZ.Devolution." + gameVersion);
_local1.clear();
loadCookie();
};
saveCookie = function () {
var _local1 = SharedObject.getLocal("DBZ.Devolution." + gameVersion);
if (!cheatcode) {
_local1.data.dbzFighterList = dbzFighterList;
_local1.data.dbzStageList = dbzStageList;
_local1.data.dbzChapter = dbzChapter;
_local1.data.dbzChapterMax = dbzChapterMax;
_local1.data.dbzEpisode = dbzEpisode;
_local1.data.dbzEpisodeMax = dbzEpisodeMax;
_local1.data.dbzStoryComplete = dbzStoryComplete;
_local1.data.dbzChapterOAV = dbzChapterOAV;
_local1.data.dbzChapterMaxOAV = dbzChapterMaxOAV;
_local1.data.dbzEpisodeOAV = dbzEpisodeOAV;
_local1.data.dbzEpisodeMaxOAV = dbzEpisodeMaxOAV;
_local1.data.dbzUnlockStory = dbzUnlockStory;
_local1.data.dbzUnlockOAV = dbzUnlockOAV;
_local1.data.dbzUnlockVS = dbzUnlockVS;
_local1.data.dbzUnlockTagTeam = dbzUnlockTagTeam;
_local1.data.dbzUnlockBudokai = dbzUnlockBudokai;
_local1.data.dbzUnlockJanken = dbzUnlockJanken;
_local1.data.dbzUnlockDatabase = dbzUnlockDatabase;
_local1.data.dbzUnlockJukebox = dbzUnlockJukebox;
_local1.data.dbzUnlockToribot = dbzUnlockToribot;
_local1.data.dbzUnlockRoshi = dbzUnlockRoshi;
}
_local1.data.dbzSound = dbzSound;
_local1.data.dbzMusic = dbzMusic;
_local1.data.dbzTouch = dbzTouch;
_local1.data.dbzMainMenu = dbzMainMenu;
_local1.data.dbzDifficulty = dbzDifficulty;
_local1.data.k1_k_up = k1.k_up;
_local1.data.k1_k_down = k1.k_down;
_local1.data.k1_k_left = k1.k_left;
_local1.data.k1_k_right = k1.k_right;
_local1.data.k1_k_attack = k1.k_attack;
_local1.data.k1_k_defense = k1.k_defense;
_local1.data.k1_sk_up = k1.sk_up;
_local1.data.k1_sk_down = k1.sk_down;
_local1.data.k1_sk_left = k1.sk_left;
_local1.data.k1_sk_right = k1.sk_right;
_local1.data.k1_sk_attack = k1.sk_attack;
_local1.data.k1_sk_defense = k1.sk_defense;
_local1.data.k2_k_up = k2.k_up;
_local1.data.k2_k_down = k2.k_down;
_local1.data.k2_k_left = k2.k_left;
_local1.data.k2_k_right = k2.k_right;
_local1.data.k2_k_attack = k2.k_attack;
_local1.data.k2_k_defense = k2.k_defense;
_local1.data.k2_sk_up = k2.sk_up;
_local1.data.k2_sk_down = k2.sk_down;
_local1.data.k2_sk_left = k2.sk_left;
_local1.data.k2_sk_right = k2.sk_right;
_local1.data.k2_sk_attack = k2.sk_attack;
_local1.data.k2_sk_defense = k2.sk_defense;
_local1.flush();
};
loadCookie = function () {
var _local1 = SharedObject.getLocal("DBZ.Devolution." + gameVersion);
if (_local1.data.save == undefined) {
_local1.data.save = true;
_local1.data.dbzFighterList = new Array();
_local1.data.dbzStageList = new Array();
_local1.data.dbzChapter = 0;
_local1.data.dbzChapterMax = 0;
_local1.data.dbzEpisode = 0;
_local1.data.dbzEpisodeMax = 0;
_local1.data.dbzStoryComplete = false;
_local1.data.dbzChapterOAV = 0;
_local1.data.dbzChapterMaxOAV = 0;
_local1.data.dbzEpisodeOAV = 0;
_local1.data.dbzEpisodeMaxOAV = 0;
_local1.data.dbzUnlockStory = false;
_local1.data.dbzUnlockOAV = false;
_local1.data.dbzUnlockVS = false;
_local1.data.dbzUnlockTagTeam = false;
_local1.data.dbzUnlockBudokai = false;
_local1.data.dbzUnlockJanken = false;
_local1.data.dbzUnlockDatabase = false;
_local1.data.dbzUnlockJukebox = false;
_local1.data.dbzUnlockToribot = false;
_local1.data.dbzUnlockRoshi = false;
_local1.data.dbzSound = true;
_local1.data.dbzMusic = true;
_local1.data.dbzTouch = false;
_local1.data.dbzMainMenu = 0;
_local1.data.dbzDifficulty = 0;
_local1.data.k1_k_up = 38;
_local1.data.k1_k_down = 40;
_local1.data.k1_k_left = 37;
_local1.data.k1_k_right = 39;
_local1.data.k1_k_attack = 88;
_local1.data.k1_k_defense = 67;
_local1.data.k1_sk_up = "^";
_local1.data.k1_sk_down = "v";
_local1.data.k1_sk_left = "<";
_local1.data.k1_sk_right = ">";
_local1.data.k1_sk_attack = "X";
_local1.data.k1_sk_defense = "C";
_local1.data.k2_k_up = 104;
_local1.data.k2_k_down = 98;
_local1.data.k2_k_left = 100;
_local1.data.k2_k_right = 102;
_local1.data.k2_k_attack = 73;
_local1.data.k2_k_defense = 79;
_local1.data.k2_sk_up = "8";
_local1.data.k2_sk_down = "2";
_local1.data.k2_sk_left = "4";
_local1.data.k2_sk_right = "6";
_local1.data.k2_sk_attack = "I";
_local1.data.k2_sk_defense = "O";
_local1.flush();
}
dbzFighterList = _local1.data.dbzFighterList;
dbzStageList = _local1.data.dbzStageList;
dbzChapter = _local1.data.dbzChapter;
dbzChapterMax = _local1.data.dbzChapterMax;
dbzEpisode = _local1.data.dbzEpisode;
dbzEpisodeMax = _local1.data.dbzEpisodeMax;
dbzStoryComplete = _local1.data.dbzStoryComplete;
dbzChapterOAV = _local1.data.dbzChapterOAV;
dbzChapterMaxOAV = _local1.data.dbzChapterMaxOAV;
dbzEpisodeOAV = _local1.data.dbzEpisodeOAV;
dbzEpisodeMaxOAV = _local1.data.dbzEpisodeMaxOAV;
dbzUnlockStory = _local1.data.dbzUnlockStory;
dbzUnlockOAV = _local1.data.dbzUnlockOAV;
dbzUnlockVS = _local1.data.dbzUnlockVS;
dbzUnlockTagTeam = _local1.data.dbzUnlockTagTeam;
dbzUnlockBudokai = _local1.data.dbzUnlockBudokai;
dbzUnlockJanken = _local1.data.dbzUnlockJanken;
dbzUnlockDatabase = _local1.data.dbzUnlockDatabase;
dbzUnlockJukebox = _local1.data.dbzUnlockJukebox;
dbzUnlockToribot = _local1.data.dbzUnlockToribot;
dbzUnlockRoshi = _local1.data.dbzUnlockRoshi;
dbzSound = _local1.data.dbzSound;
dbzMusic = _local1.data.dbzMusic;
dbzTouch = _local1.data.dbzTouch;
dbzMainMenu = _local1.data.dbzMainMenu;
dbzDifficulty = _local1.data.dbzDifficulty;
k1.k_up = _local1.data.k1_k_up;
k1.k_down = _local1.data.k1_k_down;
k1.k_left = _local1.data.k1_k_left;
k1.k_right = _local1.data.k1_k_right;
k1.k_attack = _local1.data.k1_k_attack;
k1.k_defense = _local1.data.k1_k_defense;
k1.sk_up = _local1.data.k1_sk_up;
k1.sk_down = _local1.data.k1_sk_down;
k1.sk_left = _local1.data.k1_sk_left;
k1.sk_right = _local1.data.k1_sk_right;
k1.sk_attack = _local1.data.k1_sk_attack;
k1.sk_defense = _local1.data.k1_sk_defense;
k2.k_up = (k2.ks_up = _local1.data.k2_k_up);
k2.k_down = (k2.ks_down = _local1.data.k2_k_down);
k2.k_left = (k2.ks_left = _local1.data.k2_k_left);
k2.k_right = (k2.ks_right = _local1.data.k2_k_right);
k2.k_attack = (k2.ks_attack = _local1.data.k2_k_attack);
k2.k_defense = (k2.ks_defense = _local1.data.k2_k_defense);
k2.sk_up = _local1.data.k2_sk_up;
k2.sk_down = _local1.data.k2_sk_down;
k2.sk_left = _local1.data.k2_sk_left;
k2.sk_right = _local1.data.k2_sk_right;
k2.sk_attack = _local1.data.k2_sk_attack;
k2.sk_defense = _local1.data.k2_sk_defense;
};
p_a16 = new Array("a16", ["Android #16", "empty", "white", 3, 3, 4, "ID_fillKi"]);
p_a17 = new Array("a17", ["Android #17", "empty", "white", 2, 4, 3, "ID_fillKi"]);
p_a18 = new Array("a18", ["Android #18", "empty", "white", 4, 2, 3, "ID_fillKi"]);
p_a19 = new Array("a19", ["Android #19", "empty", "white", 1, 1, 2, "ID_absorbKi"], ["Android #19", "empty", "white", 2, 2, 3, "ID_absorbKi"]);
p_babidi = new Array("babidi", ["Babidi", "purple", "purple", 1, 1, 2, "ID_changeBG"]);
p_burter = new Array("burter", ["Burter", "white", "white", 1, 4, 1]);
p_buu = new Array("buu", ["Buu", "buu", "pink", 4, 4, 3, "ID_fillHp"], ["Buu", "buu", "pink", 4, 4, 5, "ID_fillHp"], ["Buu", "ssj", "yellow", 4, 5, 5, "ID_fillHp"], ["Buu", "white", "white", 5, 5, 5, "ID_fillHp"]);
p_buukid = new Array("buukid", ["Kid Buu", "buu", "pink", 4, 4, 3, "ID_fillHp"], ["Kid Buu", "buu", "pink", 5, 5, 4, "ID_fillHp"]);
p_buuevil = new Array("buuevil", ["Evil Buu", "buu", "pink", 4, 5, 3, "ID_fillHp"]);
p_buumajin = new Array("buumajin", ["Majin Buu", "buu", "pink", 4, 3, 1, "ID_fillHp"], ["Majin Buu", "buu", "pink", 5, 4, 2, "ID_fillHp"]);
p_cell = new Array("cell", ["Cell", "ssj", "yellow", 2, 3, 3], ["Cell", "ssj", "yellow", 3, 3, 4], ["Cell", "ssj", "yellow", 3, 4, 4], ["Cell", "ssj2", "yellow", 4, 4, 4]);
p_celljr = new Array("celljr", ["Cell Jr.", "white", "white", 3, 4, 3]);
p_chiaotzu = new Array("chiaotzu", ["Chiaotzu", "white", "white", 1, 1, 1]);
p_cui = new Array("cui", ["Cui", "purple", "white", 1, 2, 2]);
p_dabura = new Array("dabura", ["Dabura", "red", "red", 3, 2, 4], ["Dabura", "red", "red", 4, 3, 4]);
p_dodoria = new Array("dodoria", ["Dodoria", "purple", "purple", 2, 1, 1], ["Dodoria", "purple", "purple", 3, 2, 1]);
p_frieza = new Array("frieza", ["Frieza", "purple", "purple", 2, 1, 3], ["Frieza", "purple", "purple", 3, 1, 3], ["Frieza", "purple", "purple", 3, 2, 3], ["Frieza", "purple", "purple", 3, 3, 3], ["Frieza", "purple", "purple", 4, 3, 2]);
p_gero = new Array("gero", ["Dr. Gero", "empty", "white", 1, 1, 2, "ID_absorbKi"], ["Dr. Gero", "empty", "white", 2, 2, 3, "ID_absorbKi"]);
p_ginyu = new Array("ginyu", ["Ginyu", "purple", "purple", 2, 2, 3], ["Ginyu", "purple", "purple", 2, 2, 4]);
p_gohankid = new Array("gohankid", ["Kid Gohan", "white", "white", 1, 1, 1], ["Kid Gohan", "white", "white", 3, 2, 2]);
p_gohanteen = new Array("gohanteen", ["Teen Gohan", "white", "white", 2, 2, 3], ["Teen Gohan", "ssj", "yellow", 3, 3, 3], ["Teen Gohan", "ssj2", "yellow", 4, 5, 3]);
p_gohan = new Array("gohan", ["Gohan", "white", "white", 1, 2, 2], ["Gohan", "ssj", "yellow", 3, 3, 2], ["Gohan", "ssj2", "yellow", 4, 4, 3], ["Gohan", "white", "white", 5, 5, 5]);
p_goku = new Array("goku", ["Goku (1)", "white", "white", 1, 1, 2], ["Goku (1)", "red", "red", 1, 2, 2], ["Goku (1)", "red", "red", 2, 2, 2], ["Goku (1)", "ssj", "yellow", 3, 3, 3]);
p_gokussj = new Array("gokussj", ["Goku (2)", "white", "white", 2, 2, 3], ["Goku (2)", "ssj", "yellow", 3, 3, 3], ["Goku (2)", "ssj2", "yellow", 4, 4, 4], ["Goku (2)", "ssj3", "yellow", 5, 5, 5]);
p_gokuold = new Array("gokuold", ["Goku (3)", "white", "white", 2, 2, 4]);
p_goten = new Array("goten", ["Goten", "white", "white", 2, 2, 1], ["Goten", "ssj", "yellow", 3, 4, 1]);
p_gotenks = new Array("gotenks", ["Gotenks", "white", "white", 3, 3, 1], ["Gotenks", "ssj", "yellow", 4, 4, 2], ["Gotenks", "ssj3", "yellow", 5, 5, 3]);
p_gsm = new Array("gsm", ["Great Saiyan Man", "white", "white", 1, 2, 1], ["Great Saiyan Man", "white", "white", 2, 2, 1], ["Great Saiyan Man", "white", "white", 2, 2, 2], ["Great Saiyan Man", "ssj", "yellow", 3, 3, 2]);
p_guldo = new Array("guldo", ["Guldo", "white", "white", 1, 1, 1, "ID_stopTime"]);
p_jeice = new Array("jeice", ["Jeice", "red", "red", 2, 1, 2]);
p_kibito = new Array("kibito", ["Kibito", "white", "white", 2, 1, 3]);
p_kingcold = new Array("kingcold", ["King Cold", "purple", "purple", 3, 2, 3]);
p_krillin = new Array("krillin", ["Krillin", "white", "white", 1, 1, 2], ["Krillin", "white", "white", 1, 3, 2]);
p_krillinold = new Array("krillinold", ["Old Krillin", "white", "white", 2, 2, 2]);
p_mechafrieza = new Array("mechafrieza", ["Mecha frieza", "purple", "purple", 3, 3, 3]);
p_mightymask = new Array("mightymask", ["Mighty Mask", "white", "white", 2, 1, 1], ["Mighty Mask", "ssj", "yellow", 4, 2, 2]);
p_nail = new Array("nail", ["Nail", "white", "white", 1, 1, 2], ["Nail", "white", "white", 2, 2, 3]);
p_nappa = new Array("nappa", ["Nappa", "ssj", "yellow", 2, 1, 1], ["Nappa", "ssj", "yellow", 3, 1, 2]);
p_pan = new Array("pan", ["Pan", "white", "white", 1, 2, 2]);
p_piccolo = new Array("piccolo", ["Piccolo (1)", "white", "white", 1, 1, 2], ["Piccolo (1)", "white", "white", 1, 2, 3], ["Piccolo (1)", "white", "white", 2, 2, 3]);
p_piccolonail = new Array("piccolonail", ["Piccolo (2)", "white", "white", 2, 1, 3], ["Piccolo (2)", "white", "white", 2, 2, 3], ["Piccolo (2)", "white", "white", 2, 3, 3]);
p_piccolokami = new Array("piccolokami", ["Piccolo (3)", "white", "white", 2, 2, 3], ["Piccolo (3)", "white", "white", 2, 3, 4], ["Piccolo (3)", "white", "white", 3, 3, 4]);
p_puipui = new Array("puipui", ["Pui Pui", "white", "white", 2, 2, 2]);
p_raditz = new Array("raditz", ["Raditz", "white", "white", 1, 2, 1], ["Raditz", "white", "white", 2, 2, 1]);
p_recoome = new Array("recoome", ["Recoome", "purple", "purple", 2, 1, 1], ["Recoome", "purple", "purple", 3, 2, 1]);
p_roshi = new Array("roshi", ["Master Roshi", "white", "white", 1, 1, 3, "ID_canJump"]);
p_saibaman = new Array("saibaman", ["Saibaman", "empty", "yellow", 1, 1, 2, "ID_canJump"]);
p_satan = new Array("satan", ["Mr. Satan", "empty", "empty", 1, 1, 1, "ID_canJump", "ID_noKi"]);
p_spopovich = new Array("spopovich", ["Spopovich", "white", "white", 2, 1, 1]);
p_supremekai = new Array("supremekai", ["Supreme Kai", "white", "white", 2, 3, 5]);
p_tien = new Array("tien", ["Tien Shinhan", "white", "white", 1, 1, 2], ["Tien Shinhan", "white", "white", 3, 1, 2]);
p_toribot = new Array("toribot", ["Tori-Bot", "red", "red", 2, 2, 5, "ID_fillHp", "ID_absorbKi"], ["Tori-Bot", "green", "green", 5, 5, 5, "ID_fillHp", "ID_absorbKi"]);
p_trunkskid = new Array("trunkskid", ["Kid Trunks", "white", "white", 2, 2, 1], ["Kid Trunks", "ssj", "yellow", 4, 3, 1]);
p_trunksfuture = new Array("trunksfuture", ["Future Trunks", "white", "white", 1, 2, 2], ["Future Trunks", "ssj", "yellow", 2, 4, 3]);
p_trunkssuper = new Array("trunkssuper", ["Super Trunks", "white", "white", 2, 2, 2], ["Super Trunks", "ssj", "yellow", 3, 3, 3], ["Super Trunks", "ssj", "yellow", 5, 1, 3]);
p_uub = new Array("uub", ["Uub", "red", "white", 2, 1, 1, "ID_canJump", "ID_noKiBlast", "ID_noKi"], ["Uub", "red", "white", 3, 2, 2, "ID_canJump", "ID_noKiBlast", "ID_noKi"]);
p_vegeta = new Array("vegeta", ["Vegeta (1)", "purple", "purple", 1, 2, 3], ["Vegeta (1)", "purple", "purple", 2, 3, 3]);
p_vegetassj = new Array("vegetassj", ["Vegeta (2)", "white", "white", 2, 1, 3], ["Vegeta (2)", "ssj", "yellow", 3, 3, 3], ["Vegeta (2)", "ssj", "yellow", 4, 3, 3]);
p_vegetamajin = new Array("vegetamajin", ["Vegeta (3)", "white", "white", 2, 2, 3], ["Vegeta (3)", "ssj", "yellow", 3, 3, 3], ["Vegeta (3)", "ssj2", "yellow", 4, 4, 4], ["Vegeta (3)", "ssj2", "yellow", 5, 4, 4]);
p_vegito = new Array("vegito", ["Vegito", "white", "white", 3, 3, 5], ["Vegito", "ssj", "yellow", 5, 5, 5]);
p_videl = new Array("videl", ["Videl", "empty", "empty", 1, 1, 3, "ID_noKi"]);
p_yajirobe = new Array("yajirobe", ["Yajirobe", "empty", "empty", 1, 1, 1, "ID_canJump", "ID_noKi"]);
p_yakon = new Array("yakon", ["Yakon", "ssj", "white", 3, 2, 2, "ID_canJump", "ID_noKi", "ID_absorbLight"], ["Yakon", "ssj", "yellow", 4, 1, 2, "ID_canJump", "ID_noKi", "ID_absorbLight"]);
p_yamcha = new Array("yamcha", ["Yamcha", "white", "white", 1, 1, 2], ["Yamcha", "white", "white", 2, 2, 2]);
p_yamu = new Array("yamu", ["Yamu", "white", "white", 1, 2, 1]);
p_zarbon = new Array("zarbon", ["Zarbon", "purple", "purple", 1, 2, 2], ["Zarbon", "purple", "purple", 2, 2, 2]);
fighterList = new Array(p_a16, p_a17, p_a18, p_a19, p_babidi, p_burter, p_buu, p_buukid, p_buuevil, p_buumajin, p_cell, p_celljr, p_chiaotzu, p_cui, p_dabura, p_dodoria, p_frieza, p_gero, p_ginyu, p_gohankid, p_gohanteen, p_gohan, p_goku, p_gokussj, p_gokuold, p_goten, p_gotenks, p_gsm, p_guldo, p_jeice, p_kibito, p_kingcold, p_krillin, p_krillinold, p_mechafrieza, p_mightymask, p_nail, p_nappa, p_pan, p_piccolo, p_piccolonail, p_piccolokami, p_puipui, p_raditz, p_recoome, p_roshi, p_saibaman, p_satan, p_spopovich, p_supremekai, p_tien, p_toribot, p_trunkskid, p_trunksfuture, p_trunkssuper, p_uub, p_vegeta, p_vegetassj, p_vegetamajin, p_vegito, p_videl, p_yajirobe, p_yakon, p_yamcha, p_yamu, p_zarbon);
musicList = new Array();
m_intro = ["intro", "Sayonara Senshi-Tachi"];
m_sum1 = ["sum1", "Purorogu 1"];
m_sum2 = ["sum2", "Purorogu 2"];
m_versus = ["versus", "Saiya-jin Kitaru!! - part.2"];
m_budokai = ["budokai", "Shi Wo Yobu Cell Games - part.3"];
m_storm = ["storm", "Shi Wo Yobu Cell Games - part.4"];
m_emergency = ["emergency", "Moetsukiro! Nessen Ressen Chou Kessen - part.4"];
m_boss = ["boss", "Kyoufu no Ginyu Tokusenkai - part.2"];
m_despair = ["despair", "Gekitotsu!! 100-Oku Powaa no Senshi-tachi"];
m_danger = ["danger", "Kono Yo De Ichi Ban Tsuyoi Yatsu - part.3"];
m_bravery = ["bravery", "Jinsoningen - part.1"];
m_conspiracy = ["conspiracy", "Soshi Se Yo! Cell no Kanzentai - part.2"];
m_unlock = ["unlock", "Angel - part.5"];
m_credits = ["credits", "Kiken ga Ippai - part.6"];
musicList.push(m_intro, m_sum1, m_sum2, m_versus, m_budokai, m_storm, m_emergency, m_boss, m_despair, m_danger, m_bravery, m_conspiracy, m_unlock, m_credits);
musicBattleList = new Array();
var i = 5;
while (i <= 11) {
musicBattleList.push("m_" + musicList[i][0]);
i++;
}
s_budokai = new Array("budokai", "Tenkaichi Budokai");
s_plains = new Array("plains", "Plains");
s_desert = new Array("desert", "Desert");
s_mountains = new Array("mountains", "Mountains");
s_timechamber = new Array("timechamber", "Hyperbolic Time Chamber");
s_snakeway = new Array("snakeway", "Snake Way");
s_namek = new Array("namek", "Namek");
s_friezaship = new Array("friezaship", "Frieza's ship");
s_namekexplosion = new Array("namekexplosion", "Namek explosion");
s_coldship = new Array("coldship", "King Cold's ship");
s_city = new Array("city", "City");
s_roads = new Array("roads", "Roads");
s_islands = new Array("islands", "Islands");
s_cellgame = new Array("cellgame", "Cell Game");
s_gravityroom = new Array("gravityroom", "Gravity Room");
s_budokai2 = new Array("budokai2", "Budokai at fall");
s_babidiship = new Array("babidiship", "Babidi's ship");
s_kaioshinkai = new Array("kaioshinkai", "Kaio Shin Kai");
s_kamehouse = new Array("kamehouse", "Kame House");
s_lookout = new Array("lookout", "Kami's Lookout");
s_insidebuu = new Array("insidebuu", "Inside Buu");
stageList = new Array(s_budokai, s_plains, s_desert, s_mountains, s_timechamber, s_snakeway, s_namek, s_friezaship, s_namekexplosion, s_coldship, s_city, s_roads, s_islands, s_cellgame, s_gravityroom, s_budokai2, s_babidiship, s_kaioshinkai, s_kamehouse, s_lookout, s_insidebuu);
chapterList = new Array("23rd BUDOKAI", "SAIYANS", "NAMEK", "CAPTAIN GINYU", "FRIEZA", "TRUNKS", "ANDROIDS", "IMPERFECT CELL", "PERFECT CELL", "CELL GAMES", "GREAT SAIYAMAN", "25th BUDOKAI", "BABIDI", "MAJIN BUU", "FUSION", "KID BUU", "28th BUDOKAI");
episodeList0 = new Array("The fated showdown!");
episodeList1 = new Array("Mysterious warrior from space", "Unlikely Alliance", "The training", "Let the games begin!", "Mighty Nappa", "It's over 9000!!!", "The decisive battle at last!", "The worn-out warriors");
episodeList2 = new Array("Vegeta's true power", "The prince fights back", "Beauty and the beast", "Zarbon's mission");
episodeList3 = new Array("The Ginyu Force", "Vegeta VS Recoome", "Goku has landed!", "Jeice and Burter", "Ginyu steps in", "Ginyu's second-hand man", "Goku or Ginyu?!", "Nail's sacrifice");
episodeList4 = new Array("The wrath of Frieza", "Fighting power: one million??", "The fourth warrior", "Frieza's third form", "The ultimate battle begins!", "The legendary super saiyan", "Namek's explosion");
episodeList5 = new Array("Return of Frieza", "Frieza's father", "Super Saiyan spar");
episodeList6 = new Array("The androids appear", "The second android", "Vegeta returns", "The chase", "Nightmare comes true", "Deadly beauty", "Trunks breaking point");
episodeList7 = new Array("The reunion", "#17's equal", "Cell's first victim", "Hyperbolic Time Chamber", "The strongest android");
episodeList8 = new Array("Quest for perfection", "The final android", "The end of super Vegeta", "The fall of Trunks", "Beyond the Super Saiyan");
episodeList9 = new Array("The wanna-be hero", "The games begin", "A new hope", "The anger inside", "Awakening", "The power of rage", "Perfection");
episodeList10 = new Array("High school", "Hardcore training", "Gravity room");
episodeList11 = new Array("Junior division", "Exhibition match", "The mysterious duo", "Videl's challenge", "The plot of the lords", "Holding back", "The might of Mighty Mask!", "Prize money");
episodeList12 = new Array("The evil masters", "Level one", "The light-eater", "Demon king Dabura", "Majin Vegeta");
episodeList13 = new Array("A treat for Majin Buu", "Majin Buu's display", "Vegeta's last stand", "The wizard's fault", "Super Saiyan 3!!!", "Tired of Babidi");
episodeList14 = new Array("Seeing double", "The power of two warriors", "Incredible techniques", "Mystic Gohan", "All hope are lost", "The ultimate fusion", "The innards of Buu");
episodeList15 = new Array("Buu's last transformation", "Battle for the universe", "Gaining some time", "The final stand");
episodeList16 = new Array("Buu's reincarnation");
oavList = new Array("DEAD ZONE", "THE WORLD'S STRONGEST", "THE TREE OF MIGHT", "LORD SLUG", "COOLA'S REVENGE", "RETURN OF COOLA", "SUPER ANDROID 13!", "BROLY THE LEGENDARY SUPER SAIYAN", "BOJACK UNBOUND", "BROLY SECOND INCOMING", "BIO BROLY", "FUSION REBORN", "WRATH OF THE DRAGON", "GOKU'S FATHER", "TRUNKS STORY");
oavEpisodeList0 = new Array("the treason", "The vengeance", "The test");
oavEpisodeList1 = new Array("episode 1", "Episode 2");
storyData = function (data) {
storyRooster1 = null;
storyRooster1 = new Array();
storyRooster2 = null;
storyRooster2 = new Array();
rooster1 = null;
rooster1 = new Array();
rooster2 = null;
rooster2 = new Array();
gameTimeMax = (gameTime = 0);
switch (data) {
case "c0e0" :
rooster1 = new Array(["goku", 2, 1, 2, 1, 1]);
rooster2 = new Array(["piccolo", 1, 1, 1, 1, 1]);
GC.bg.choice = "budokai";
storyTxt.txt.htmlText = "23rd Tenkaichi Budokai<br/>-<br/>The World Martial Arts Tournament is reaching the end...<br/>-<br/>Goku must fight his arch-enemy in the finale:<br/>the demon Piccolo.";
break;
case "c1e0" :
rooster1 = new Array(["raditz", 2, 1, 2, 1, 1]);
rooster2 = new Array(["goku", 1, 1, 1, 1, 1]);
GC.bg.choice = "kamehouse";
storyTxt.txt.htmlText = "Years have passed since the last world tournament.<br/>Goku got married to Chichi and had a son: Gohan.<br/>But one day, the powerful warrior Raditz came to Earth.<br/>-<br/>Claiming he is Goku's brother, and an alien from a race<br/>known as the Saiyans, he attempts to abduct Gohan<br/>to convince his brother to join them!";
break;
case "c1e1" :
rooster1 = new Array(["goku", 2, 1, 2, 1, 1], ["piccolo", 2, 1, 2, 1, 1]);
rooster2 = new Array(["raditz", 2, 1, 2, 1, 2]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Raditz struck Goku down with a knee to the stomach and took Gohan.<br/>Soon after, to everybody's shock, Piccolo arrives with a proposition!<br/>-<br/>Realizing that alone, they both have no chance up<br/>against the powerful alien, Goku and Piccolo decide<br/>to fight together against Raditz to save Gohan.";
break;
case "c1e2" :
rooster1 = new Array(["gohankid", 2, 1, 2, 1, 1]);
rooster2 = new Array(["piccolo", 2, 1, 2, 1, 1]);
GC.bg.choice = "desert";
storyTxt.txt.htmlText = "During the battle against Raditz, Gohan showed incredible fighting abilities.<br/>But Goku had to sacrifice himself to ensure the destruction of Raditz.<br/>-<br/>To face the arrival on Earth of two more Saiyajins, Piccolo<br/>takes Gohan to a deserted wasteland to train him.";
break;
case "c1e3" :
rooster1 = new Array(["piccolo", 2, 2, 2, 1, 2], ["gohankid", 1, 1, 1, 1, 1], ["krillin", 2, 1, 2, 1, 2], ["tien", 2, 1, 2, 1, 1], ["chiaotzu", 1, 1, 1, 1, 1], ["yamcha", 1, 1, 1, 1, 1]);
rooster2 = new Array(["saibaman", 0.8, 1, 1, 1, 1], ["saibaman", 0.8, 1, 1, 1, 1], ["saibaman", 0.8, 1, 1, 1, 1], ["saibaman", 0.8, 1, 1, 1, 1], ["saibaman", 0.8, 1, 1, 1, 1], ["saibaman", 0.8, 1, 1, 1, 1]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "While Goku was training under King Kai in the other world,<br/>the Saiyajins Nappa and Vegeta landed on Earth.<br/>-<br/>Piccolo, Gohan, Krillin, Yamcha, Tien Shinhan, and Chiaotzu <br/>are standing against them as they plant<br/>some strange creatures into the ground.";
break;
case "c1e4" :
rooster1 = new Array(["piccolo", 2, 1, 2, 2, 2], ["gohankid", 1, 1, 2, 1, 2], ["krillin", 1, 1, 2, 1, 2], ["tien", 1, 1, 2, 1, 2], ["chiaotzu", 1, 1, 1, 1, 1]);
rooster2 = new Array(["nappa", 4, 3, 4, 1, 2]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "A kamikaze Saibaman killed Yamcha.<br/>-<br/>The remaining warriors are now facing the powerful Nappa,<br/>but the battle seems desperate...";
break;
case "c1e5" :
rooster1 = new Array(["goku", 2, 2, 3, 1, 2]);
rooster2 = new Array(["nappa", 1, 1, 2, 2, 2]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "During the battle, Chiaotzu, Tien Shinhan, and Piccolo died.<br/>With the help of the Dragon Balls, Goku resurrected<br/>and joined the battle against Nappa.<br/>-<br/>He doesn't want Gohan and Krillin to<br/>help him as he is sure to win the fight.";
break;
case "c1e6" :
rooster1 = new Array(["goku", 3, 2, 3, 1, 3]);
rooster2 = new Array(["vegeta", 3, 3, 4, 1, 2]);
GC.bg.choice = "mountains";
storyTxt.txt.htmlText = "Vegeta killed Nappa for being weak against Goku.<br/>-<br/>Now Goku must battle Vegeta, but the two opponents<br/>seem to have the same power and abilities...";
break;
case "c1e7" :
rooster1 = new Array(["gohankid", 2, 1, 2, 1, 2], ["krillin", 1, 1, 2, 1, 2], ["yajirobe", 0.5, 0, 0, 1, 1]);
rooster2 = new Array(["vegeta", 3, 2, 3, 2, 2]);
GC.bg.choice = "mountains";
storyTxt.txt.htmlText = "Beaten by Goku, Vegeta transformed into a giant Saiyan ape!<br/>Gohan and Krillin arrived to see Goku being battered by it.<br/>Out of nowhere, Yajirobe swooped down and cut Vegeta's<br/>tail off, causing him to revert back to normal.<br/>-<br/>Now in a weakened state, Goku and friends<br/>must defeat Vegeta once and for all!";
break;
case "c2e0" :
rooster1 = new Array(["vegeta", 2, 2, 3, 1, 1]);
rooster2 = new Array(["cui", 1, 1, 2, 1, 1]);
GC.bg.choice = "namek";
storyTxt.txt.htmlText = "Vegeta managed to escape in his ship! When he learned that<br/>Frieza, his boss, was searching for the Dragon Balls on<br/>planet Namek, he decided to double cross him. Just arriving <br/>on Namek, he saw Cui, his former rival.<br/>-<br/>Vegeta states that when a Saiyan is beaten, his power<br/>grows and that he is ready to prove himself.";
break;
case "c2e1" :
rooster1 = new Array(["vegeta", 2, 2, 3, 1, 1]);
rooster2 = new Array(["dodoria", 2, 1, 2, 1, 2]);
GC.bg.choice = "namek";
storyTxt.txt.htmlText = "Vegeta, considering he was strong enough to handle<br/>Frieza's henchmen, appeared out of nowhere and assaulted Dodoria.<br/>-<br/>Dodoria becomes scared, and tells him that it wasn't a meteor<br/>that blew up Planet Vegeta, but Frieza himself!";
break;
case "c2e2" :
rooster1 = new Array(["zarbon", 2, 2, 3, 1, 2]);
rooster2 = new Array(["vegeta", 2, 2, 3, 1, 1]);
GC.bg.choice = "namek";
storyTxt.txt.htmlText = "While searching for more Dragon Balls, Vegeta came<br/>across Zarbon, another one of Frieza's underlings.<br/>-<br/>Thinking he can take him now, Vegeta rushes<br/>into battle. Will he be strong enough?";
break;
case "c2e3" :
rooster1 = new Array(["vegeta", 2, 2, 3, 2, 2]);
rooster2 = new Array(["zarbon", 2, 2, 2, 1, 2]);
GC.bg.choice = "namek";
storyTxt.txt.htmlText = "Zarbon carried unconscious Vegeta back to<br/>Frieza and put him in the healing tank.<br/>But Vegeta broke out and stole the Dragon Balls.<br/>-<br/>While he makes an attempt to escape,<br/>he stumbles upon Zarbon again.<br/>It's time for a second round!";
break;
case "c3e0" :
rooster1 = new Array(["gohankid", 1, 0.5, 1, 1, 2], ["krillin", 1, 0.5, 1, 1, 2], ["vegeta", 2, 1, 2, 2, 2]);
rooster2 = new Array(["guldo", 1, 1, 3, 1, 1]);
GC.bg.choice = "namek";
storyTxt.txt.htmlText = "Vegeta killed Zarbon and then met Krillin and Gohan.<br/>They quickly decided to form an alliance against<br/>Frieza's main bodyguards that have just landed on<br/>Namek and caught up with them: the Ginyu Force!<br/>-<br/>The first one ready to fight is a<br/>short green alien named Guldo.";
break;
case "c3e1" :
rooster1 = new Array(["vegeta", 2, 2, 3, 2, 2], ["gohankid", 1, 1, 2, 1, 2], ["krillin", 1, 0.5, 1, 1, 2]);
rooster2 = new Array(["recoome", 4, 2, 4, 1, 2]);
GC.bg.choice = "namek";
storyTxt.txt.htmlText = "The power of Guldo's ability to stop time was no match<br/>for Vegeta who decapitated him from behind while<br/>he was fighting against Gohan and Krillin.<br/>-<br/>From the three Ginyu Force members left, the large<br/>and powerful Recoome steps up to stage.";
break;
case "c3e2" :
rooster1 = new Array(["goku", 2, 2, 3, 1, 1]);
rooster2 = new Array(["recoome", 0.5, 1, 2, 2, 2]);
GC.bg.choice = "namek";
storyTxt.txt.htmlText = "Goku finally landed on Namek.<br/>-<br/>Seeing Gohan, Krillin, and Vegeta all beaten<br/>by Recoome, Goku's temper is flaring!";
break;
case "c3e3" :
rooster1 = new Array(["goku", 2, 2, 3, 1, 1]);
rooster2 = new Array(["burter", 1, 1, 2, 1, 1], ["jeice", 1, 1, 2, 1, 1]);
GC.bg.choice = "namek";
storyTxt.txt.htmlText = "Goku defeated Recoome quite easily.<br/>-<br/>It's now Burter's turn, who claims to be<br/>the fastest being in the universe.";
break;
case "c3e4" :
rooster1 = new Array(["goku", 3, 2, 3, 1, 2]);
rooster2 = new Array(["ginyu", 3, 2, 3, 1, 2]);
GC.bg.choice = "namek";
storyTxt.txt.htmlText = "Jeice escaped to tell Ginyu that their team members<br/>were dead. Ginyu quickly arrived on the scene,<br/>furious at Goku for what he has done.<br/>Goku gave him a chance to leave, but Ginyu refused.<br/>-<br/>The two are ready to battle!";
break;
case "c3e5" :
rooster1 = new Array(["vegeta", 2, 2, 3, 2, 2]);
rooster2 = new Array(["jeice", 2, 1, 2, 1, 1]);
GC.bg.choice = "friezaship";
storyTxt.txt.htmlText = "Vegeta, hungry for battle after having recovered<br/>with a Senzu Bean, rushed straight at Jeice.<br/>-<br/>Will the remaining Ginyu Force member<br/>live up to his reputation?";
break;
case "c3e6" :
rooster1 = new Array(["vegeta", 2, 2, 3, 2, 2], ["gohankid", 1, 1, 2, 1, 2], ["krillin", 1, 1, 2, 1, 2]);
rooster2 = new Array(["goku", 3, 0.5, 1, 1, 1]);
GC.bg.choice = "friezaship";
storyTxt.txt.htmlText = "Being beaten by Goku, Ginyu revealed his most powerful technique,<br/>and switched bodies with Goku! Gohan quickly<br/>realized that the man in Goku's body was not really his father.<br/>-<br/>Gohan and Krillin hesitate to attack...<br/>Vegeta, on the contrary, wants to beat <br/>down Goku's body real hard.";
break;
case "c3e7" :
rooster1 = new Array(["frieza", 4, 2, 4, 1, 1]);
rooster2 = new Array(["nail", 2, 2, 2, 1, 2]);
GC.bg.choice = "namek";
storyTxt.txt.htmlText = "Meanwhile, Frieza was heading for the<br/>Grand Elder, creator of the Dragon Balls,<br/>so he could get him to tell him the password to<br/>unlock the power of the Namekian Dragon Balls.<br/>-<br/>When the Grand Elder refuses, his bodyguard<br/>Nail is ready to combat Frieza.";
break;
case "c4e0" :
rooster1 = new Array(["vegeta", 2, 3, 3, 1, 2], ["gohankid", 1, 1, 2, 1, 2], ["krillin", 1, 1, 2, 1, 2]);
rooster2 = new Array(["frieza", 4, 2, 3, 1, 1]);
GC.bg.choice = "friezaship";
storyTxt.txt.htmlText = "While Vegeta was asleep, Gohan, Krillin, and Dende used the<br/>Dragon Balls to resurrect Piccolo and teleport him to Namek.<br/>Vegeta woke up, angry for his wish of immortality had been lost,<br/>but the Dragon faded away as the Grand Elder died.<br/>-<br/>Vegeta is suddenly petrified with fear...<br/>Frieza is here!";
break;
case "c4e1" :
rooster1 = new Array(["vegeta", 2, 1, 2, 2, 2], ["gohankid", 1, 1, 2, 1, 2], ["krillin", 1, 0.5, 1, 1, 2]);
rooster2 = new Array(["frieza", 5, 4, 4, 1, 2]);
GC.bg.choice = "namek";
storyTxt.txt.htmlText = "Frieza was surprised by Vegeta's force so<br/>he transformed to gain a huge power increase.<br/>-<br/>The fierce battle continues!";
break;
case "c4e2" :
rooster1 = new Array(["piccolonail", 3, 2, 3, 1, 3], ["gohankid", 1, 0.5, 1, 1, 2], ["krillin", 1, 0.5, 1, 1, 2]);
rooster2 = new Array(["frieza", 4, 2, 3, 2, 2]);
GC.bg.choice = "namek";
storyTxt.txt.htmlText = "On the way to the battlefield, Piccolo met dying Nail.<br/>In his last words, Nail asked Piccolo to merge<br/>with him, giving Piccolo incredible powers.<br/>-<br/>When Piccolo finally arrives, he shocks everyone<br/>by claiming that he can beat Frieza.";
break;
case "c4e3" :
rooster1 = new Array(["gohankid", 2, 3, 3, 1, 2], ["krillin", 1, 0.5, 1, 1, 2], ["vegeta", 1, 1, 2, 2, 2]);
rooster2 = new Array(["frieza", 3, 2, 3, 3, 3]);
GC.bg.choice = "namek";
storyTxt.txt.htmlText = "Being beaten, Frieza transformed again into his<br/>third stage, earning yet another power increase.<br/>He grossly outstripped Piccolo in both power<br/>and speed, and defeated him.<br/>-<br/>Gohan is furious and rushes into Frieza.";
break;
case "c4e4" :
rooster1 = new Array(["goku", 3, 2, 3, 1, 3], ["piccolonail", 1, 1, 2, 2, 3], ["gohankid", 0.5, 0.5, 1, 1, 2], ["krillin", 0.5, 0.5, 1, 1, 2]);
rooster2 = new Array(["frieza", 4, 2, 4, 4, 4]);
GC.bg.choice = "namek";
storyTxt.txt.htmlText = "In the healing tank, Goku finally healed from<br/>Vegeta's beat down. He joined his friends just to<br/>see that Vegeta has been killed by Frieza.<br/>-<br/>The battle between Frieza and Goku begins,<br/>but they seem perfectly equivalent.";
break;
case "c4e5" :
rooster1 = new Array(["goku", 4, 4, 4, 3, 4]);
rooster2 = new Array(["frieza", 3, 1, 3, 4, 4]);
GC.bg.choice = "namek";
storyTxt.txt.htmlText = "Goku managed to win against Frieza.<br/>But in vengeance, Frieza badly hurt<br/>Piccolo and killed Krillin.<br/>-<br/>Driven by anger, Goku becomes<br/>the legendary Super Saiyajin!";
break;
case "c4e6" :
rooster1 = new Array(["goku", 4, 3, 4, 4, 4]);
rooster2 = new Array(["frieza", 4, 4, 4, 4, 5]);
gameTimeMax = (gameTime = 1200);
GC.bg.choice = "namekexplosion";
storyTxt.txt.htmlText = "Frieza, realizing that he couldn't beat Goku, decided to<br/>launch a huge fireball into the heart of the planet.<br/>Only he can survive in space!<br/>-<br/>Quick Goku! Beat down Frieza once<br/>and for all before Namek's explodes!";
break;
case "c5e0" :
rooster1 = new Array(["trunksfuture", 2, 2, 3, 1, 2]);
rooster2 = new Array(["mechafrieza", 2, 1, 2, 1, 1]);
GC.bg.choice = "coldship";
storyTxt.txt.htmlText = "One year has passed since Namek exploded and no one knows<br/>if Goku is alive. Frieza has been saved and rebuilt by his<br/>father, King Cold, and they travelled to Earth to avenge him.<br/>-<br/>An unknown fighter wielding a sword appears<br/>from nowhere to stand against them.";
break;
case "c5e1" :
rooster1 = new Array(["trunksfuture", 2, 2, 3, 2, 2]);
rooster2 = new Array(["kingcold", 2, 1, 2, 1, 1]);
GC.bg.choice = "coldship";
storyTxt.txt.htmlText = "Shocked that his son has just been killed, King Cold offered the <br/>mysterious man a spot as his new heir. But the man quickly refused,<br/>so Cold asked him to give him his sword so Cold could take a look.<br/>-<br/>Stating that the reason Frieza was beaten is because<br/>of this weapon, he lashes out at the disarmed warrior!";
break;
case "c5e2" :
rooster1 = new Array(["gokussj", 2, 2, 3, 2, 2]);
rooster2 = new Array(["trunksfuture", 2, 2, 3, 2, 2]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "The mysterious man killed Frieza and his father, and blew up their ship.<br/>Then he invited the Earth warriors to go and see where Goku would land.<br/>After waiting for an hour, Goku arrived, wondering who this person was.<br/>-<br/>The man, revealing that his name is Trunks,<br/>is up for a sparring match with Goku.";
break;
case "c6e0" :
rooster1 = new Array(["gero", 2, 3, 3, 2, 2]);
rooster2 = new Array(["yamcha", 1, 1, 2, 1, 1]);
GC.bg.choice = "city";
storyTxt.txt.htmlText = "Trunks explained to Goku that he was Vegeta's son travelling<br/>from the future. He told him that two powerful androids<br/>would attack in one year at a place he specified.<br/> After one year passes, the androids appeared<br/>and started exploding the city!<br/>-<br/>Yamcha is the first one to encounter them.";
break;
case "c6e1" :
rooster1 = new Array(["a19", 2, 3, 3, 2, 2]);
rooster2 = new Array(["gokussj", 2, 1, 2, 2, 2]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "The others quickly sensed Yamcha's power decreasing,<br/>and rushed to his defense. By the time they got there,<br/>Yamcha was already out cold.<br/>-<br/>Goku, now extremely angry,<br/>is ready to test his training.";
break;
case "c6e2" :
rooster1 = new Array(["vegetassj", 3, 3, 3, 1, 2]);
rooster2 = new Array(["a19", 3, 2, 2, 2, 2]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Goku began to clutch his chest during his battle, as the other<br/>fighters realized that he was suffering from the heart disease <br/>about which Trunks warned!<br/>-<br/>When it looks like all is lost, Vegeta arrives,<br/>showing that he also can become a Super Saiyan!";
break;
case "c6e3" :
rooster1 = new Array(["piccolonail", 2, 2, 3, 1, 3], ["krillin", 1, 1, 2, 1, 2]);
rooster2 = new Array(["gero", 3, 2, 2, 2, 2]);
GC.bg.choice = "mountains";
storyTxt.txt.htmlText = "Vegeta exploded Android #19.<br/>In front of this strength, the second android, who's in fact<br/>Dr. Gero from the Red Ribbon Army, must flee to his secret<br/>laboratory to activate his others androids.<br/>-<br/>The chase is starting!";
break;
case "c6e4" :
rooster1 = new Array(["a17", 2, 2, 3, 1, 1]);
rooster2 = new Array(["gero", 1, 1, 2, 1, 2]);
GC.bg.choice = "mountains";
storyTxt.txt.htmlText = "Dr. Gero managed to escape to his lab and<br/>to awake his creations, Androids #17 and #18.<br/>-<br/>They are ready to disobey however, and Dr. Gero stares<br/>in the face of one of his most powerful creations...<br/>and one of his most difficult challenges!";
break;
case "c6e5" :
rooster1 = new Array(["a18", 3, 2, 3, 1, 1]);
rooster2 = new Array(["vegetassj", 3, 2, 3, 2, 2]);
GC.bg.choice = "roads";
storyTxt.txt.htmlText = "#17 and #18 destroyed their creator and activated another one of<br/>Dr. Gero's androids, the giant #16. Trunks tried to blow Dr. Gero's lab<br/>to pieces. But, the blast did not work and the three androids flew away.<br/>-<br/>Vegeta, upset for being ignored, goes and challenges #18.";
break;
case "c6e6" :
rooster1 = new Array(["a17", 2, 2, 3, 1, 1], ["a18", 2, 2, 3, 1, 1]);
rooster2 = new Array(["trunksfuture", 2, 1, 2, 2, 2], ["piccolonail", 1, 1, 2, 2, 3], ["tien", 1, 0.5, 1, 1, 2], ["vegetassj", 1, 0.5, 1, 2, 2]);
GC.bg.choice = "roads";
storyTxt.txt.htmlText = "Vegeta was brutally beaten at the hands of #18 while<br/>#17 warned Trunks, Piccolo, Tien, and Krillin not to interfere.<br/>-<br/>Trunks is unable to watch what could be his father's murder,<br/>so he attacks #17, with Piccolo and Tien not far behind him.";
break;
case "c7e0" :
rooster1 = new Array(["piccolokami", 2, 3, 4, 1, 1]);
rooster2 = new Array(["cell", 2, 1, 2, 1, 1]);
GC.bg.choice = "city";
storyTxt.txt.htmlText = "Piccolo was helpless against the androids so he decided to<br/>merge with his other half, Kami-Sama. Before doing so,<br/>Kami told Piccolo that a greater danger than the androids<br/>has appeared near Ginger Town.<br/>-<br/>Piccolo, now extremely powerful,<br/>is ready to meet this new foe.";
break;
case "c7e1" :
rooster1 = new Array(["piccolokami", 4, 4, 4, 2, 3]);
rooster2 = new Array(["a17", 4, 2, 4, 1, 1]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Before the monster fled, he explained to Piccolo that his name<br/>was Cell, Dr. Gero's ultimate creation! Piccolo went back to<br/>the Kame house to wait for Goku to heal. When he arrived,<br/>he stumbled upon the androids!<br/>-<br/>Piccolo must fight #17 to conceal Goku's location.";
break;
case "c7e2" :
rooster1 = new Array(["cell", 4, 2, 4, 1, 1]);
rooster2 = new Array(["a17", 2, 1, 2, 1, 1], ["piccolokami", 2, 1, 2, 3, 3]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Cell appeared in the middle of the battle, eager to<br/>absorb #17 and #18 to reach his perfect form!<br/>-<br/>Against this danger, Piccolo and #17 must<br/>join forces to defeat the monster.";
break;
case "c7e3" :
rooster1 = new Array(["trunkssuper", 2, 2, 3, 1, 2]);
rooster2 = new Array(["vegetassj", 2, 2, 3, 2, 3]);
GC.bg.choice = "timechamber";
storyTxt.txt.htmlText = "Meanwhile, Vegeta and Trunks decided to train in the Room<br/>of Spirit and Time, a special place at Kami-Sama's Palace<br/>where one day inside is worth a year.<br/>-<br/>Vegeta and Trunks both strive to surpass the Super Saiyan level!";
break;
case "c7e4" :
rooster1 = new Array(["cell", 3, 1, 3, 2, 2]);
rooster2 = new Array(["a16", 2, 1, 2, 1, 1], ["tien", 1, 1, 2, 2, 2]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Cell managed to absorb #17 and was<br/>one step closer to reaching perfection.<br/>-<br/>Upset, #16 attacks Cell with all his might<br/>and Tien joins up to help #18 escape!";
break;
case "c8e0" :
rooster1 = new Array(["vegetassj", 4, 3, 3, 2, 3]);
rooster2 = new Array(["cell", 3, 1, 2, 2, 2]);
GC.bg.choice = "islands";
storyTxt.txt.htmlText = "Vegeta and Trunks emerged from<br/>the Room of Spirit and Time,<br/>and were ready to combat Cell.<br/>-<br/>Vegeta is confident as it seems he has<br/>surpassed the Super Saiyan level.";
break;
case "c8e1" :
rooster1 = new Array(["cell", 3, 2, 3, 2, 2]);
rooster2 = new Array(["a18", 1, 1, 2, 1, 1], ["a16", 0.5, 0.5, 1, 1, 1], ["krillin", 1, 0.5, 1, 1, 2]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Vegeta, disappointed that Cell was<br/>no challenge to him, allowed and helped<br/>him go and attempt to absorb #18.<br/>-<br/>#16 and Krillin are no match for Cell<br/>as he is ready to absorb her.";
break;
case "c8e2" :
rooster1 = new Array(["cell", 3, 3, 4, 3, 3]);
rooster2 = new Array(["vegetassj", 3, 2, 3, 3, 3]);
GC.bg.choice = "islands";
storyTxt.txt.htmlText = "Cell has finally absorbed #18!<br/>His last transformation made the Earth shake.<br/>-<br/>Vegeta is ready to test out<br/>the monster's new perfect form.";
break;
case "c8e3" :
rooster1 = new Array(["cell", 3, 3, 4, 3, 3]);
rooster2 = new Array(["trunkssuper", 3, 3, 3, 2, 3]);
GC.bg.choice = "islands";
storyTxt.txt.htmlText = "Cell has shown some of his power<br/>by bashing aside Vegeta!<br/>-<br/>Trunks is now ready to fight the monster that<br/>defeated his father with the powers he earned<br/>from the Room of Spirit and Time!";
break;
case "c8e4" :
rooster1 = new Array(["gohanteen", 2, 2, 3, 1, 2]);
rooster2 = new Array(["gokussj", 2, 2, 3, 1, 2]);
GC.bg.choice = "timechamber";
storyTxt.txt.htmlText = "Cell defeated Trunks and announced that he will be<br/>recreating the World Martial Arts Tournament as his<br/>own, naming it the Cell Games.<br/>-<br/>Meanwhile, Gohan is training hard with his father<br/>in the Room of Spirit and Time.";
break;
case "c9e0" :
rooster1 = new Array(["cell", 5, 4, 5, 3, 3]);
rooster2 = new Array(["satan", 0.1, 0, 0, 1, 1]);
GC.bg.choice = "cellgame";
storyTxt.txt.htmlText = "The day of the Cell Games has come.<br/>-<br/>Mr. Satan, who is the public's hero,<br/>and the winner of the last World Martial Arts<br/>Tournament, is ready to challenge Cell<br/>in front of the TV!";
break;
case "c9e1" :
rooster1 = new Array(["gokussj", 3, 2, 3, 2, 2]);
rooster2 = new Array(["cell", 4, 3, 4, 3, 3]);
GC.bg.choice = "cellgame";
storyTxt.txt.htmlText = "Cell threw away the arrogant Mr. Satan so his games could<br/>start. Goku volunteered to be the first to fight with Cell.<br/>-<br/>Both fighters seem to have some tricks up their sleeves.";
break;
case "c9e2" :
rooster1 = new Array(["cell", 3, 3, 4, 3, 3]);
rooster2 = new Array(["gohanteen", 3, 2, 3, 2, 2]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "In the middle of the battle Goku surrendered,<br/>claiming he couldn't stand up to Cell's power!<br/>He then volunteered Gohan to be the next fighter.<br/>-<br/>Will Gohan stand a chance if even his father<br/>can't win against Cell?";
break;
case "c9e3" :
rooster1 = new Array(["gokussj", 1, 1, 2, 2, 2], ["vegetassj", 2, 2, 3, 2, 3], ["trunkssuper", 2, 2, 3, 2, 3], ["piccolokami", 1, 2, 3, 2, 3], ["krillin", 0.5, 1, 2, 2, 2], ["tien", 0.5, 1, 2, 2, 2], ["yamcha", 0.5, 1, 2, 2, 2]);
rooster2 = new Array(["celljr", 5, 3, 4, 1, 1], ["celljr", 5, 3, 4, 1, 1], ["celljr", 5, 3, 4, 1, 1], ["celljr", 5, 3, 4, 1, 1], ["celljr", 5, 3, 4, 1, 1], ["celljr", 5, 3, 4, 1, 1], ["celljr", 5, 3, 4, 1, 1]);
GC.bg.choice = "plains";
gameTimeMax = (gameTime = 1200);
storyTxt.txt.htmlText = "While fighting Cell, Gohan realized why his father chose him to fight:<br/>when his temper flares, his power explodes. Intrigued, Cell<br/>said that he would try all his might to pull out his anger.<br/>-<br/>Cell creates seven Cell Juniors to battle Gohan's friends!";
break;
case "c9e4" :
rooster1 = new Array(["gohanteen", 4, 5, 5, 2, 3]);
rooster2 = new Array(["celljr", 0.5, 0.5, 1, 1, 1], ["celljr", 0.5, 0.5, 1, 1, 1], ["celljr", 0.5, 0.5, 1, 1, 1], ["celljr", 0.5, 0.5, 1, 1, 1], ["celljr", 0.5, 0.5, 1, 1, 1], ["celljr", 0.5, 0.5, 1, 1, 1], ["celljr", 0.5, 0.5, 1, 1, 1]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "#16 tried to blow up Cell by self-destructing, but it failed.<br/>In an attempt to bring Gohan's power out, Cell finished #16 off.<br/>Gohan became enraged, and transformed into a new power level!<br/>-<br/>In his flash of anger, Gohan goes to destroy<br/>all the Cell Juniors that hurt his friends.";
break;
case "c9e5" :
rooster1 = new Array(["gohanteen", 4, 4, 5, 3, 3]);
rooster2 = new Array(["cell", 4, 3, 4, 3, 3]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Gohan destroyed all of the Cell Jr's.<br/>and rescued his friends from their terror.<br/>-<br/>Driven by anger he now attacks the surprised Cell!";
break;
case "c9e6" :
rooster1 = new Array(["gohanteen", 2, 4, 5, 3, 3], ["vegetassj", 0.5, 1, 2, 1, 3]);
rooster2 = new Array(["cell", 2, 4, 5, 4, 4]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Gohan thrashed Cell to the point where he threw up #18 and reverted<br/>back to his previous form! Angry, Cell decided to blow up the Earth with him.<br/>As it was the only thing to do, Goku teleported Cell to Kaio's planet where he<br/>exploded, killing the three of them. But Cell regenerated and killed Trunks.<br/>-<br/>He's now far stronger than before!";
break;
case "c10e0" :
rooster1 = new Array(["gsm", 2, 2, 3, 1, 1]);
rooster2 = new Array(["videl", 2, 0, 0, 1, 1]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Seven Years have passed since Cell's defeat. Gohan went to<br/>high school and combated crime in his Great Saiyaman disguise.<br/>Videl, Mr. Satan's daughter, discoved his secret identity and convinced<br/>him to come to the next World Martial Arts Tournament.<br/>-<br/>She then asks him to help her train. In return,<br/>she will not tell everyone his secret.";
break;
case "c10e1" :
rooster1 = new Array(["goten", 2, 2, 3, 1, 2]);
rooster2 = new Array(["gohan", 2, 2, 3, 1, 1]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Seeing that he has to go easy on Videl, Gohan<br/>decided to train with his younger brother, Goten.<br/>-<br/>What a surprise!<br/>The young Goten can also transform into Super Saiyan!";
break;
case "c10e2" :
rooster1 = new Array(["vegetamajin", 2, 3, 4, 2, 2]);
rooster2 = new Array(["trunkskid", 2, 2, 3, 2, 2]);
GC.bg.choice = "gravityroom";
storyTxt.txt.htmlText = "Meanwhile, knowing Goku would have permission for one day<br/>to go back to earth for the World Martial Arts Tournament,<br/>Vegeta started to train in the gravity room built by Bulma.<br/>-<br/>Trunks wants to train with him because<br/>he can transform in Super Saiyan too.";
break;
case "c11e0" :
rooster1 = new Array(["trunkskid", 3, 1, 4, 1, 2]);
rooster2 = new Array(["goten", 3, 1, 4, 1, 2]);
GC.bg.choice = "budokai";
storyTxt.txt.htmlText = "25th Tenkaichi Budokai<br/>Trunks and Goten entered the Junior Division. There, they<br/>continued advancing until it was only them in the final round!<br/>-<br/>Which of the two Saiyan's sons will be the strongest?";
break;
case "c11e1" :
rooster1 = new Array(["trunkskid", 1, 1, 2, 1, 1]);
rooster2 = new Array(["satan", 0.1, 0, 0, 1, 1]);
GC.bg.choice = "budokai";
storyTxt.txt.htmlText = "Trunks defeated Goten.<br/>For the show, Mr. Satan came into the ring<br/>to challenge the winner in an exhibition match.<br/>-<br/>Trunks is very eager to test his strength against<br/>the man who claims to have beaten Cell.";
break;
case "c11e2" :
rooster1 = new Array(["supremekai", 2, 3, 4, 1, 1]);
rooster2 = new Array(["piccolokami", 2, 1, 2, 1, 1]);
GC.bg.choice = "budokai";
storyTxt.txt.htmlText = "It's now time for senior division!<br/>Up first were Piccolo and a mysterious man, who<br/>seemed to be accompanied by another strange guy.<br/>-<br/>Who are these people?";
break;
case "c11e3" :
rooster1 = new Array(["spopovich", 3, 2, 3, 1, 1]);
rooster2 = new Array(["videl", 3, 0, 0, 1, 1]);
GC.bg.choice = "budokai";
storyTxt.txt.htmlText = "Piccolo had to forfeit when he realized that his opponent<br/>was none of other than Supreme Kai, the God of Gods.<br/>-<br/>The next match opposes Videl and Spopovich.<br/>The audience is cheering for Mr. Satan's daughter!";
break;
case "c11e4" :
rooster1 = new Array(["gsm", 2, 1, 2, 2, 4]);
rooster2 = new Array(["kibito", 2, 1, 2, 1, 1]);
GC.bg.choice = "budokai";
storyTxt.txt.htmlText = "Videl was beaten harshly by Spopovich, making Gohan's<br/>temper flare! Goku told him to calm down because<br/>he had to fight against Supreme Kai's acolyte, Kibito.<br/>-<br/>Walking up to the stage, Kibito abruptly<br/>asks Gohan to show him his real power.";
break;
case "c11e5" :
rooster1 = new Array(["yamu", 1, 1, 2, 1, 1], ["spopovich", 1, 1, 2, 1, 1]);
rooster2 = new Array(["gsm", 2, 2, 3, 4, 4]);
GC.bg.choice = "budokai";
storyTxt.txt.htmlText = "During the battle, Yamu and Spopovich suddenly attacked<br/>Gohan. Supreme Kai asked everyone not to interfere<br/>while he was holding Gohan back using his magic.<br/>-<br/>What's happening?";
break;
case "c11e6" :
rooster1 = new Array(["a18", 2, 1, 3, 1, 1]);
rooster2 = new Array(["mightymask", 2, 2, 3, 1, 2]);
GC.bg.choice = "budokai2";
storyTxt.txt.htmlText = "Spopovich and Yamu took Gohan's energy and flew away,<br/>quickly chased by Supreme Kai and the Z fighters.<br/>Mr. Satan decided they should have a Battle<br/>Royale between the remaining competitors.<br/>-<br/>While Mighty Mask start to fight #18, she is<br/>quickly suspicious of his strength and true identity...";
break;
case "c11e7" :
rooster1 = new Array(["satan", 1, 0, 0, 1, 1]);
rooster2 = new Array(["a18", 0.1, 0, 0, 1, 1]);
GC.bg.choice = "budokai2";
storyTxt.txt.htmlText = "Mighty Mask was disqualified for being<br/>Goten and Trunks in disguise.<br/>-<br/>Now, it's the finale between #18<br/>and the world champion Mr. Satan.";
break;
case "c12e0" :
rooster1 = new Array(["dabura", 3, 2, 3, 1, 1]);
rooster2 = new Array(["kibito", 1, 1, 2, 1, 1], ["piccolokami", 1, 2, 3, 1, 1], ["krillinold", 1, 1, 2, 1, 1]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "While chasing Spopovich and Yamu, Supreme Kai told everyone the story of<br/>their boss, Babidi, who created a powerful, evil monster named Majin Buu,<br/>and that they need to defeat Babidi before it awakens.<br/>-<br/>When they arrive, they are spotted by Dabura,<br/>Babidi's right hand, who quickly attacks them.";
break;
case "c12e1" :
rooster1 = new Array(["vegetamajin", 2, 2, 3, 1, 1]);
rooster2 = new Array(["puipui", 2, 1, 2, 1, 1]);
GC.bg.choice = "babidiship";
storyTxt.txt.htmlText = "Dabura killed Kibito and spit on Piccolo and Krillin, turning them into stone!<br/>Then he escaped with his master inside Babidi's spaceship,<br/>quickly followed by Goku, Gohan, Vegeta, and Supreme Kai.<br/>-<br/>On the first level, Vegeta has to fight Babidi's first henchmen, Pui Pui.";
break;
case "c12e2" :
rooster1 = new Array(["gokussj", 2, 0.5, 1, 1, 2]);
rooster2 = new Array(["yakon", 5, 0, 2, 1, 2]);
GC.bg.choice = "babidiship";
storyTxt.txt.htmlText = "Pui Pui was easily defeated, making Goku, Gohan, Vegeta,<br/>and Supreme Kai able to go down to the next level.<br/>-<br/>There, Goku must battle the light-eating monster Yakon!";
break;
case "c12e3" :
rooster1 = new Array(["gohan", 3, 3, 4, 1, 3]);
rooster2 = new Array(["dabura", 4, 3, 4, 1, 2]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Goku exploded Yakon and opened<br/>the entrance to the final level.<br/>-<br/>Gohan must now face the ruler of<br/>the Demon Realm, Dabura himself!";
break;
case "c12e4" :
rooster1 = new Array(["vegetamajin", 4, 3, 4, 4, 4]);
rooster2 = new Array(["gokussj", 4, 3, 5, 3, 3]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "While battling, Dabura discovered that Vegeta has an evil heart.<br/>Dabura managed to escape again, and under Babidi's influence,<br/>Vegeta's evil awakens, giving him more brutal force.<br/>-<br/>Confident in his power, Vegeta challenges Goku to a fight...<br/>The fight he was waiting for for so many years!";
break;
case "c13e0" :
rooster1 = new Array(["buumajin", 3, 3, 4, 1, 2]);
rooster2 = new Array(["dabura", 2, 2, 3, 1, 2]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "The power created from Goku and Vegeta's groundbreaking<br/>fight finally woke up Majin Buu from his prison.<br/>But Dabura viewed him as useless, pink, and a fat baby.<br/>-<br/>This drives Majin Buu mad. So with<br/>Babidi's permission, he attacks Dabura.";
break;
case "c13e1" :
rooster1 = new Array(["buumajin", 4, 3, 4, 1, 2]);
rooster2 = new Array(["gohan", 2, 2, 3, 1, 3], ["supremekai", 2, 2, 3, 1, 1]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Majin Buu transformed Dabura into a cookie<br/>and ate him. This reverted Piccolo<br/>and Krillin back to their normal state.<br/>-<br/>Supreme Kai and Gohan are ready to defeat Buu!";
break;
case "c13e2" :
rooster1 = new Array(["vegetamajin", 4, 3, 4, 4, 4]);
rooster2 = new Array(["buumajin", 5, 3, 4, 1, 2]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Majin Buu defeated Gohan and left him dead on the ground.<br/>Sensing Buu's immense power, Vegeta knocked down Goku<br/>and left to combat Majin Buu.<br/>-<br/>When Vegeta arrives, he realizes that he doesn't<br/>stand a chance against the monster.";
break;
case "c13e3" :
rooster1 = new Array(["piccolokami", 2, 2, 3, 1, 1]);
rooster2 = new Array(["babidi", 0.5, 1, 2, 1, 1]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Vegeta self-destructed to eradicate Majin Buu.<br/>Piccolo went back to the explosion site just to<br/>discover that the warlock Babidi was still alive.<br/>-<br/>Furious, Piccolo attacks Babidi<br/>to punish him for what he has unleashed.";
break;
case "c13e4" :
rooster1 = new Array(["gokussj", 4, 3, 4, 1, 4]);
rooster2 = new Array(["buumajin", 4, 2, 3, 1, 2]);
gameTimeMax = (gameTime = 1800);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Vegeta's sacrifice was useless. Buu reformed and healed Babidi.<br/>Goku woke up to see that Vegeta was killed and Gohan was missing.<br/>-<br/>In order to gain some time to be able to teach the fusion technique<br/>to the kids, he goes after Majin Buu, and shows him the transformation<br/>he has learned in the Other World: the Super Saiyan 3!";
break;
case "c13e5" :
rooster1 = new Array(["buumajin", 3, 2, 3, 1, 2]);
rooster2 = new Array(["babidi", 0.5, 1, 2, 1, 1]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Before leaving, Goku told Majin buu to not follow orders from the<br/>evil Babidi. Meanwhile, Kibito was revived by the power of the<br/>Dragon Balls. He managed to find and heal Supreme Kai and Gohan.<br/>The three of them went to Kaioshin Kai for a proper training.<br/>-<br/>On Earth, fed up with Babidi's insults,<br/>Majin Buu finally turns against his master.";
break;
case "c14e0" :
rooster1 = new Array(["buuevil", 3, 2, 3, 1, 1]);
rooster2 = new Array(["buumajin", 3, 1, 2, 1, 2]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Mr. Satan became friends with Majin Buu. After all,<br/>Buu obeyed only under Babidi's evil orders.<br/>But when someone shot Mr. Satan's dog,<br/>Buu got angry and split into two!<br/>-<br/>Half is good and the other is pure evil. The Evil Buu<br/>wants to attack and absorb Majin Buu!";
break;
case "c14e1" :
rooster1 = new Array(["gotenks", 3, 2, 3, 1, 2]);
rooster2 = new Array(["buu", 4, 3, 4, 1, 1]);
GC.bg.choice = "timechamber";
storyTxt.txt.htmlText = "The Evil Buu has absorbed Majin Buu and has evolved<br/>into a monster only made for fighting and is also able<br/>to detect Goten and Trunks at Kami-Sama's palace.<br/>-<br/>Piccolo leads him to the Hyperbolic Time Chamber to fight Gotenks:<br/>Goten and Trunks combined with the fusion technique!";
break;
case "c14e2" :
rooster1 = new Array(["gotenks", 4, 3, 4, 3, 3], ["piccolokami", 1, 1, 2, 1, 1]);
rooster2 = new Array(["buu", 5, 3, 4, 1, 1]);
GC.bg.choice = "lookout";
storyTxt.txt.htmlText = "Piccolo destroyed the door to the Chamber in order to seal Buu.<br/>Furious, Buu screamed a hole out and managed to escape.<br/>To do the same thing, Gotenks surprisingly transformed into<br/>a Super Saiyan 3 and escaped with Piccolo.<br/>-<br/>Now Gotenks is ready to try out his powerful transformation against Buu!";
break;
case "c14e3" :
rooster1 = new Array(["gohan", 4, 4, 5, 4, 4]);
rooster2 = new Array(["buu", 4, 2, 3, 1, 2]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "When Gotenks' fusion time was over and he was about<br/>to be eaten by Buu, Gohan came to the rescue!<br/>-<br/>His powers are unlocked to their full potential!";
break;
case "c14e4" :
rooster1 = new Array(["buu", 4, 4, 5, 3, 3]);
rooster2 = new Array(["gohan", 4, 3, 4, 4, 4]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Goten and Trunks used the fusion again to help Gohan<br/>against Buu. But Buu absorbed Gotenks instead.<br/>-<br/>Gohan is now in real danger against<br/>the new ultra powerful Buu!";
break;
case "c14e5" :
rooster1 = new Array(["vegito", 5, 3, 5, 1, 2]);
rooster2 = new Array(["buu", 5, 2, 4, 4, 4]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Gohan got swallowed too and Buu evolved into the most powerful<br/>being in the universe. Goku and Vegeta were sent back<br/>to Earth to stand against him.<br/>-<br/>There is only one way for them to win... The fusion!<br/>Vegeta reluctantly accepts and<br/>the final hope for Earth is born.";
break;
case "c14e6" :
rooster1 = new Array(["gokussj", 2, 2, 3, 1, 3], ["vegetamajin", 2, 2, 3, 1, 3]);
rooster2 = new Array(["buu", 5, 2, 4, 1, 1]);
GC.bg.choice = "insidebuu";
storyTxt.txt.htmlText = "Vegito was absorbed by Buu and defused back into Goku and Vegeta.<br/>Inside Buu's body, they searched for their imprisoned friends<br/>and found Goten, Trunks, Gohan, Piccolo and... Majin Buu.<br/>-<br/>While they're breaking them all loose,<br/>Super Buu surprisingly appears inside his own body!";
break;
case "c15e0" :
rooster1 = new Array(["buukid", 4, 4, 5, 1, 2]);
rooster2 = new Array(["gokussj", 2, 2, 3, 1, 3], ["vegetamajin", 2, 2, 3, 1, 3]);
GC.bg.choice = "plains";
storyTxt.txt.htmlText = "Goku and Vegeta broke open Majin Buu from his pod<br/>and escaped Buu's body, as it transformed into<br/>a child-like version of himself.<br/>-<br/>They quickly realize that this new Buu is stronger<br/>than all of the others they faced before.";
break;
case "c15e1" :
rooster1 = new Array(["gokussj", 4, 3, 4, 2, 4]);
rooster2 = new Array(["buukid", 5, 4, 5, 1, 2]);
GC.bg.choice = "kaioshinkai";
storyTxt.txt.htmlText = "Buu launched a giant fireball to Earth and destroyed it...<br/>Thankfully Kibitoshin managed to teleport Goku, Vegeta,<br/>Mr. Satan, and Dende to the Kai's sacred ground just<br/>in time. But Buu teleported himself there too!<br/>-<br/>Refusing to use the fusion again, Goku steps up first against Buu!";
break;
case "c15e2" :
rooster1 = new Array(["vegetamajin", 1, 1, 2, 1, 2], ["buumajin", 1, 1, 2, 1, 2], ["satan", 0.5, 0, 0, 1, 1]);
rooster2 = new Array(["buukid", 5, 3, 5, 1, 2]);
GC.bg.choice = "kaioshinkai";
gameTimeMax = (gameTime = 1200);
storyTxt.txt.htmlText = "Kid Buu had to expel the good Majin Buu from<br/>him when he saw his old friend Mr. Satan.<br/>-<br/>With the help of Majin Buu, Vegeta offers to buy<br/>Goku some time while he gathers energy.";
break;
case "c15e3" :
rooster1 = new Array(["gokussj", 4, 3, 5, 1, 1]);
rooster2 = new Array(["buukid", 5, 4, 5, 2, 2]);
GC.bg.choice = "kaioshinkai";
storyTxt.txt.htmlText = "Finaly, it is Goku's turn to fight again! Following Vegeta's plan,<br/>and with the help of Mr. Satan, he gathered all of his friends',<br/>human beings', and the universe's energy.<br/>-<br/>He is now ready to challenge Kid Buu for the ultimate battle!";
break;
case "c16e0" :
rooster1 = new Array(["gokuold", 3, 1, 2, 1, 1]);
rooster2 = new Array(["uub", 1, 0, 0, 1, 2]);
GC.bg.choice = "budokai";
storyTxt.txt.htmlText = "Ten years have passed since Kid Buu's defeat and<br/>the day of the 28th Tenkaichi Budokai has arrived!<br/>Goku has to fight against a strange and powerful boy<br/>with a name similar to his greatest opponent.<br/>-<br/>Will Uub live up to Goku's expectations?";
}
convertNameData();
};
quake = function () {
GC.bg._x = Math.min(Math.max(Math.random() - Math.random(), -2), 2);
GC.bg._y = Math.min(Math.max(Math.random() - Math.random(), -2), 2);
};
createDust = function (x, y, fx) {
if (fx == undefined) {
fx = "dust";
}
iDust++;
if (iDust > 280) {
iDust = 200;
}
var newDust = GC.createEmptyMovieClip("dust" + iDust, iDust);
switch (fx) {
case "dust" :
newDust.attachMovie("dust", "clip", 1);
newDust._x = (x + random(41)) - 20;
newDust._y = y;
if (newDust._y < _YFX) {
newDust.angle = ((3 * random(2)) - 1) * Math.random();
} else {
newDust.angle = -3 * Math.random();
}
newDust.speed = random(3) + 0.2;
newDust.life = random(31) + 10;
break;
case "sweat" :
newDust.attachMovie("sweat", "clip", 1);
newDust._x = (x + random(5)) - 4;
newDust._y = (y - random(5)) - 4;
newDust.angle = 3 * Math.random();
newDust.speed = random(2) + 1;
newDust.life = random(10) + 10;
}
newDust.ptx = Math.cos(newDust.angle) * newDust.speed;
newDust.pty = Math.sin(newDust.angle) * newDust.speed;
newDust.onEnterFrame = function () {
if (!stopTimer) {
newDust._x = newDust._x + newDust.ptx;
newDust._y = newDust._y + newDust.pty;
newDust.life--;
}
if (newDust.life < 0) {
delete newDust.onEnterFrame;
removeMovieClip(newDust);
}
};
};
createBoum = function (x, y, i, iMax) {
iMax = Math.min(iMax, 40);
var newBoum = GC.createEmptyMovieClip("boum" + i, i);
newBoum.attachMovie("boum", "clip", 1);
newBoum._x = x + (2 * Math.round(random(iMax) - (iMax / 2)));
if (y < _YFX) {
newBoum._y = y + (2 * Math.round(random(iMax) - (iMax / 2)));
} else {
newBoum._y = y - (2 * Math.round(random(iMax / 2)));
}
newBoum._alpha = 100;
newBoum._rotation = 360 * Math.random();
newBoum.onEnterFrame = function () {
if (newBoum._alpha > 0) {
if (!stopTimer) {
newBoum.clip.play();
newBoum._alpha = newBoum._alpha - 5;
} else {
newBoum.clip.stop();
}
} else {
delete newBoum.onEnterFrame;
removeMovieClip(newBoum);
}
};
};
applyFilter = function (obj, gray, color) {
if (gray == undefined) {
gray = 0.35;
}
if (color == undefined) {
color = 30;
}
var _local4 = [gray, gray, gray, 0, color, gray, gray, gray, 0, color, gray, gray, gray, 0, -color, 0, 0, 0, 1, 0];
var _local3 = new flash.filters.ColorMatrixFilter(_local4);
obj.filters = [_local3];
};
fxJump = function (x, y, n) {
var _local1 = iBoum + n;
while ((++iBoum) < _local1) {
createFxJump(x, y, iBoum, n);
}
if (iBoum > 400) {
iBoum = 300;
}
};
createFxJump = function (x, y, i, iMax) {
iMax = Math.min(iMax, 10);
var newFxJump = GC.createEmptyMovieClip("fxJump" + i, i);
newFxJump.attachMovie("fxJump", "clip", 1);
newFxJump._x = x + (2 * Math.round(random(iMax) - (iMax / 2)));
newFxJump._y = y + (2 * Math.round(random(iMax) - (iMax / 2)));
newFxJump._alpha = 100;
newFxJump._rotation = 360 * Math.random();
newFxJump.onEnterFrame = function () {
if (newFxJump._alpha > 0) {
if (!stopTimer) {
newFxJump.clip.play();
newFxJump._alpha = newFxJump._alpha - 5;
} else {
newFxJump.clip.stop();
}
} else {
delete newFxJump.onEnterFrame;
removeMovieClip(newFxJump);
}
};
};
kaboum = function (x, y, n) {
if (n < 20) {
soundPlayer("boom1");
} else if (n > 40) {
soundPlayer("boom3");
bigFlash._alpha = 100;
} else {
soundPlayer("boom2");
}
var _local4 = iBoum + n;
while ((++iBoum) < _local4) {
createBoum(x, y, iBoum, n);
createDust(x, y);
}
if (iBoum > 400) {
iBoum = 300;
}
};
setBallSize = function (a) {
var _local1;
if (a < 20) {
_local1 = Math.ceil(a / 4);
} else {
_local1 = 4 + Math.ceil((a - 50) / 50);
}
return(_local1);
};
fireBall = function (i) {
var t1 = GC[("p" + i) + _root["team" + i][0]];
var t2 = GC[("p" + (3 - i)) + _root["team" + (3 - i)][0]];
_root["iBall" + i]++;
if (_root["iBall" + i] > _BALLMAX) {
_root["iBall" + i] = 0;
}
var _local10 = _root["iBall" + i];
iBall++;
if (iBall > 150) {
iBall = 100;
}
var newBall = GC.createEmptyMovieClip((("p" + i) + "ball") + _local10, iBall);
newBall.attachMovie("ball", "clip", 1);
if (((cheatcode || (gameMode == "story")) || (gameMode == "oav")) || (gameMode == "tutorial")) {
newBall.clip.gotoAndStop(fighterList[t1.choice][t1.lvl][_KIBLAST]);
} else {
newBall.clip.gotoAndStop(fighterList[dbzFighterList[t1.choice]][t1.lvl][_KIBLAST]);
}
var _local7 = calculateAngle(t1, t2);
newBall.angle = _local7;
switch (i + xcross) {
case 0 :
case 3 :
if (t1._xscale == 100) {
newBall.angle = Math.PI - _local7;
}
break;
case 1 :
case 2 :
if (t1._xscale != -100) {
break;
}
newBall.angle = Math.PI - _local7;
}
newBall.testEnemy = true;
t1.spriteFix = 16;
switch (i + xcross) {
case 1 :
case 2 :
if (newBall.angle < (-_ANGLEMAX)) {
t1.spriteFix = 17;
}
if (newBall.angle > _ANGLEMAX) {
t1.spriteFix = 18;
}
break;
case 0 :
case 3 :
if (newBall.angle < (-_ANGLEMAX)) {
t1.spriteFix = 18;
}
if (newBall.angle <= _ANGLEMAX) {
break;
}
t1.spriteFix = 17;
}
var _local8 = posnega(i);
if (t1.power < 100) {
t1.power = 1 + Math.floor(t1.power / 10);
soundPlayer("s_kiblast");
newBall._x = t1._x + (18 * xcross);
newBall._y = t1._y + 2;
newBall.speed = (_local8 * 18) * xcross;
t1.fire = 1;
t1.waitSomeFrame = 5;
} else {
t1.power = Math.floor(t1.power / 2);
soundPlayer("s_kamehameha");
newBall.speed = (_local8 * 12) * xcross;
newBall._x = (((_local8 * _KAMEHAX) * xcross) + t1._x) + (((_local8 * 34) * Math.cos(_local7)) * xcross);
if (_local7 != newBall.angle) {
newBall._x = (2 * t1._x) - newBall._x;
}
newBall._y = (_KAMEHAY + t1._y) + (((_local8 * 34) * Math.sin(_local7)) * xcross);
var r = ((_local8 * Math.round((_local7 * 180) / Math.PI)) * xcross);
initSpecialFx(i, "kameha", r);
t1.fire = 3;
}
newBall.power = t1.power;
t1.power = 0;
newBall.ballx = Math.cos(newBall.angle) * newBall.speed;
newBall.bally = Math.sin(newBall.angle) * newBall.speed;
if (t2.com) {
counterAttackIA(i, _local10);
}
newBall.clip.b.gotoAndStop(setBallSize(newBall.power));
newBall.onEnterFrame = function () {
var _local3 = false;
if (t1.ID_stopTime || (t2.ID_stopTime)) {
if (!stopTimer) {
newBall._x = newBall._x + newBall.ballx;
newBall._y = newBall._y + newBall.bally;
}
} else {
newBall._x = newBall._x + newBall.ballx;
newBall._y = newBall._y + newBall.bally;
}
if (newBall.testEnemy) {
var _local4 = calculateDistance(newBall, t2);
if (_local4 < 32) {
switch (t2.defense) {
case 0 :
kaboum(t2._x, t2._y, newBall.power);
t2.wound = t2.wound + newBall.power;
t2.hp = t2.hp - newBall.power;
t2.wound = t2.wound + newBall.power;
t2.fire = 0;
t2.power = 0;
if (newBall.power > 50) {
t2.death = "blow";
} else {
t2.death = "fall";
}
if (stopTimer) {
stopTimer = 0;
}
_local3 = true;
break;
case 1 :
if (t2.ID_absorbKi && (t2.ki < t2.kimax)) {
initSpecialFx(3 - i, "absorbKi", -r);
t2.fire = 1;
t2.waitSomeFrame = 5;
t2.ki = Math.min(t2.ki + (newBall.power * 5), t2.kimax);
t2.spriteFix = 16;
switch (i + xcross) {
case 1 :
case 2 :
if (newBall.angle < (-_ANGLEMAX)) {
t2.spriteFix = 18;
}
if (newBall.angle > _ANGLEMAX) {
t2.spriteFix = 17;
}
break;
case 0 :
case 3 :
if (newBall.angle < (-_ANGLEMAX)) {
t2.spriteFix = 17;
}
if (newBall.angle <= _ANGLEMAX) {
break;
}
t2.spriteFix = 18;
}
_local3 = true;
} else if (newBall.power <= t2.strength) {
newBall.testEnemy = false;
newBall.angle = newBall.angle + ((random(17) - 8) / 10);
newBall.ballx = Math.cos(newBall.angle) * newBall.speed;
newBall.bally = Math.sin(newBall.angle) * newBall.speed;
} else {
kaboum(t2._x, t2._y, newBall.power);
newBall.power = Math.floor(newBall.power / 2);
t2.hp = t2.hp - (1 + Math.max(0, newBall.power - (2 * t2.strength)));
t2.fire = 0;
t2.power = 0;
if (newBall.power > 50) {
t2.death = "blow";
} else {
t2.death = "fall";
}
_local3 = true;
}
}
}
}
if (newBall._y > (_YMAX + 20)) {
kaboum(newBall._x, newBall._y, newBall.power);
_local3 = true;
}
if (((newBall._x < -20) || (newBall._x > 520)) || (newBall._y < -16)) {
_local3 = true;
}
var _local6 = 3 - i;
var _local2 = 0;
while (_local2 <= _BALLMAX) {
var _local1 = GC[(("p" + _local6) + "ball") + _local2];
if (_local1) {
var _local4 = calculateDistance(newBall, _local1);
if (_local4 < 16) {
if ((t1.fire == 3) && (t2.fire == 3)) {
var _local5 = Math.floor(0.8 * (newBall.power + _local1.power));
delete _local1.onEnterFrame;
removeMovieClip(_local1);
_local3 = true;
switchScreen("fight", "powerBall", _local5);
} else {
kaboum(newBall._x, newBall._y + 12, newBall.power);
newBall.power = newBall.power - _local1.power;
newBall.clip.b.gotoAndStop(setBallSize(newBall.power));
if (newBall.power < 1) {
_local3 = true;
}
}
}
}
_local2++;
}
if (_local3) {
if (t1.fire == 3) {
t1.fire = 0;
if (t1.ID_canJump) {
t1.jumpSpeed = 0;
}
}
delete newBall.onEnterFrame;
removeMovieClip(newBall);
}
};
};
coverflowUpdate = function (coverMax) {
var _local1 = panelCoverflow.current;
if (_local1 < 0) {
_local1 = _local1 + (coverMax * (1 - Math.floor(_local1 / coverMax)));
}
_local1 = _local1 % coverMax;
if (cheatcode) {
panelCoverflow.pName.htmlText = fighterList[_local1][1][0];
} else {
panelCoverflow.pName.htmlText = fighterList[dbzFighterList[_local1]][1][0];
}
};
createCoverflow = function (coverMax, p, n) {
var pTemp = _root["k" + p];
var rooster = _root["rooster" + p];
panelCoverflow.back.useHandCursor = false;
panelCoverflow.back.onPress = function () {
};
panelCoverflow._visible = true;
if (gameMode == "budokai") {
panelCoverflow.current = budoChoice[p];
} else if (gameMode == "tagteam") {
panelCoverflow.current = rooster[n][0];
} else {
panelCoverflow.current = pTemp.choice;
}
var maxSlide = 100;
var spacing = 40;
var centerDistance = 26;
var deleteMinDistance = ((-6 * spacing) - centerDistance);
var deleteMaxDistance = ((6 * spacing) + centerDistance);
var _local4 = 0;
while (_local4 < coverMax) {
var _local3 = panelCoverflow.cible.createEmptyMovieClip("face" + _local4, _local4);
_local3.attachMovie("dbzFaces", "clip", 1);
if (cheatcode) {
_local3.clip.gotoAndStop(fighterList[_local4][0]);
} else {
_local3.clip.gotoAndStop(fighterList[dbzFighterList[_local4]][0]);
}
_local3.clip.pface.stop();
_local3.clip._x = -16;
_local3.clip._y = -20;
_local3._xscale = (_local3._yscale = 200);
_local3._alpha = 0;
_local3.id = _local4;
_local3.onPress = function () {
if (this._visible) {
var _local2 = this.id;
if (_local2 < 0) {
_local2 = _local2 + (coverMax * (1 - Math.floor(_local2 / coverMax)));
}
if (gameMode == "budokai") {
budoChoice[p] = _local2 % coverMax;
} else {
pTemp.choice = _local2 % coverMax;
rooster[n][0] = _local2 % coverMax;
}
if (panelCoverflow.current == this.id) {
soundPlayer("s_ok");
panelCoverflow._visible = false;
cleanCoverflow(coverMax);
switch (gameMode) {
case "budokai" :
updateFaceBudokai(p);
break;
case "versus" :
updatePlayerVS(p);
updateSliderLVL(p);
break;
case "janken" :
updatePlayerVS(p);
break;
case "tagteam" :
updatePlayerTeam(p, n);
}
} else {
soundPlayer("s_select");
panelCoverflow.current = this.id;
coverflowUpdate(coverMax);
}
}
};
_local3.onEnterFrame = function () {
if ((this._x < -265) || (this._x > 265)) {
this._visible = false;
} else {
this._visible = true;
}
if (this._x > deleteMaxDistance) {
this.id = this.id - coverMax;
this._x = deleteMinDistance;
}
if (this._x < deleteMinDistance) {
this.id = this.id + coverMax;
this._x = deleteMaxDistance;
}
if (this.id == panelCoverflow.current) {
if (this._xscale < 200) {
this._xscale = this._xscale + 20;
this._yscale = this._yscale + 20;
}
if (this._alpha != 100) {
this._alpha = this._alpha + Math.round((100 - this._alpha) / 2);
}
this.x = (this.id - panelCoverflow.current) * spacing;
} else {
if (this._xscale > 100) {
this._xscale = this._xscale - 20;
this._yscale = this._yscale - 20;
}
if (this._alpha != 60) {
this._alpha = this._alpha + Math.round((60 - this._alpha) / 2);
}
if (this.id > panelCoverflow.current) {
this.x = ((this.id - panelCoverflow.current) * spacing) + centerDistance;
} else if (this.id < panelCoverflow.current) {
this.x = ((this.id - panelCoverflow.current) * spacing) - centerDistance;
}
}
this._x = this._x - Math.min(Math.max((this._x - this.x) / 2, -maxSlide), maxSlide);
};
_local4++;
}
coverflowUpdate(coverMax);
};
randomBG = function () {
var _local1;
if (cheatcode) {
_local1 = random(stageList.length);
GC.bg.choice = stageList[_local1][0];
} else {
_local1 = random(dbzStageList.length);
GC.bg.choice = stageList[dbzStageList[_local1]][0];
}
};
setupBG = function (bg) {
if (!(bg === "budokai2")) {
GC.bg.gotoAndStop(bg);
} else {
GC.bg.gotoAndStop("budokai");
}
switch (bg) {
case "babidiship" :
case "gravityroom" :
case "insidebuu" :
sky.gotoAndStop("blank");
break;
case "budokai" :
case "roads" :
case "kamehouse" :
case "plains" :
case "coldship" :
case "cellgame" :
case "city" :
case "islands" :
case "lookout" :
sky.gotoAndStop("blue");
break;
case "budokai2" :
case "mountains" :
sky.gotoAndStop("dusk");
break;
case "desert" :
sky.gotoAndStop("night");
break;
case "timechamber" :
sky.gotoAndStop("white");
break;
case "snakeway" :
sky.gotoAndStop("pink");
break;
case "kaioshinkai" :
sky.gotoAndStop("purple");
break;
case "namek" :
case "friezaship" :
sky.gotoAndStop("namek");
break;
case "namekexplosion" :
case "shenron" :
sky.gotoAndStop("apocalypse");
break;
case "jukebox" :
sky.gotoAndStop("space");
}
sky.clouds = 0;
sky.cloudSpeed = new Array();
switch (bg) {
case "namek" :
case "friezaship" :
sky.clouds = 2;
break;
case "snakeway" :
sky.clouds = 2;
sky.cloudSpeed = [-0.4, -0.3];
break;
case "budokai" :
case "budokai2" :
case "cellgame" :
sky.clouds = 3;
break;
case "namekexplosion" :
sky.clouds = 3;
sky.cloudSpeed = [0.5, 0.2, 0.1];
break;
case "shenron" :
sky.clouds = 3;
sky.cloudSpeed = [-2, -1.6, -1];
break;
case "city" :
case "islands" :
case "roads" :
sky.clouds = 4;
break;
case "coldship" :
sky.clouds = 5;
break;
case "plains" :
sky.clouds = 6;
}
if (sky.clouds && (sky.cloudSpeed.length == 0)) {
var _local3 = posnega(random(2) + 1);
var _local1 = 0;
while (_local1 < sky.clouds) {
var _local2 = (random(2) + 1) / 10;
sky.cloudSpeed[_local1] = _local3 * _local2;
GC.bg.bg["cloud" + _local1]._x = 50 + random(450);
_local1++;
}
}
};
moveClouds = function () {
if (sky.clouds && (!stopTimer)) {
switch (GC.bg.choice) {
default :
var _local1 = 0;
while (_local1 < sky.clouds) {
var _local2 = GC.bg.bg["cloud" + _local1];
_local2._x = _local2._x + sky.cloudSpeed[_local1];
if (_local2._x > 560) {
_local2._x = -60;
}
if (_local2._x < -60) {
_local2._x = 560;
}
_local1++;
}
break;
case "namekexplosion" :
var _local2 = GC.bg.bg.cloud0;
_local2._x = _local2._x + sky.cloudSpeed[0];
if (_local2._x > -10) {
_local2._x = -74;
}
_local2 = GC.bg.bg.cloud1;
_local2._x = _local2._x + sky.cloudSpeed[1];
if (_local2._x > -10) {
_local2._x = -74;
}
_local2 = GC.bg.bg.cloud2;
_local2._x = _local2._x + sky.cloudSpeed[2];
if (_local2._x > -26) {
_local2._x = -70;
}
break;
case "shenron" :
_local2 = GC.bg.bg.cloud0;
_local2._x = _local2._x + sky.cloudSpeed[0];
if (_local2._x < -66) {
_local2._x = -4;
}
GC.bg.bg.cloud1._x = _local2._x;
_local2 = GC.bg.bg.cloud2;
_local2._x = _local2._x + sky.cloudSpeed[1];
if (_local2._x < -68) {
_local2._x = -4;
}
GC.bg.bg.cloud3._x = _local2._x;
_local2 = GC.bg.bg.cloud4;
_local2._x = _local2._x + sky.cloudSpeed[2];
if (_local2._x < -46) {
_local2._x = -2;
}
GC.bg.bg.cloud5._x = _local2._x;
break;
case "snakeway" :
_local2 = GC.bg.bg.cloud0;
_local2._x = _local2._x + sky.cloudSpeed[0];
if (_local2._x < -66) {
_local2._x = -2;
}
_local2 = GC.bg.bg.cloud1;
_local2._x = _local2._x + sky.cloudSpeed[1];
if (_local2._x >= -46) {
break;
}
_local2._x = -2;
}
}
};
updateJauges = function () {
var _local3 = 1;
while (_local3 <= 2) {
var _local4 = GC[("p" + _local3) + _root["team" + _local3][0]];
var _local2 = 1;
while (_local2 <= 5) {
_root["barreHP" + _local3]["j" + _local2]._width = Math.min(Math.max(_local4.hp - (100 * (_local2 - 1)), 0), 100);
_root["barreKI" + _local3]["j" + _local2]._width = Math.min(Math.max(_local4.ki - (100 * (_local2 - 1)), 0), 100);
_local2++;
}
_local3++;
}
};
updateShadow = function () {
var _local2 = 1;
while (_local2 <= 2) {
var _local3 = GC["shadow" + _local2];
var _local4 = GC[("p" + _local2) + _root["team" + _local2][0]];
_local3._x = _local4._x + ((((3 * (_local2 - 1)) - _local2) * 4) * xcross);
_local3._y = _YMAX + 19;
_local3._xscale = (_local4._y * 100) / _YMAX;
_local3._alpha = (_local4._y * 20) / _YMAX;
_local2++;
}
};
destroyAllBalls = function () {
var _local2 = 1;
while (_local2 <= 2) {
var _local1 = 0;
while (_local1 <= _BALLMAX) {
ballTemp = GC[(("p" + _local2) + "ball") + _local1];
if (ballTemp) {
delete ballTemp.onEnterFrame;
removeMovieClip(ballTemp);
}
_local1++;
}
_local2++;
}
};
destroyUnlockBars = function () {
var _local2 = 0;
while (_local2 <= 6) {
barTemp = _root["bar" + _local2];
if (barTemp) {
removeMovieClip(barTemp);
} else {
break;
}
_local2++;
}
};
cleanGame = function () {
if ((!k1.com) || (!k2.com)) {
Key.removeListener(ecouteur);
}
if (hookControl) {
restoreControls2();
}
if (setChrono) {
clearInterval(setChrono);
}
destroyAllBalls();
var _local3 = 1;
while (_local3 <= 2) {
var _local2 = 0;
while (_local2 < 8) {
cleanPlayer(_local3, _local2);
_local2++;
}
_root["team" + _local3] = undefined;
_local3++;
}
GC.shadow1._alpha = (GC.shadow2._alpha = 0);
stopTimer = 0;
};
cleanPlayer = function (p, n) {
var _local1 = GC[("p" + p) + n];
if (_local1) {
_local1.p.removeMovieClip();
_local1.auraspr.removeMovieClip();
_local1.kameha.removeMovieClip();
_local1.removeMovieClip();
_local1 = undefined;
}
};
hookControls2 = function () {
hookControl = true;
k2.k_up = k1.k_up;
k2.k_down = k1.k_down;
k2.k_left = k1.k_left;
k2.k_right = k1.k_right;
k2.k_defense = k1.k_defense;
k2.k_attack = k1.k_attack;
};
restoreControls2 = function () {
hookControl = false;
k2.k_up = k2.ks_up;
k2.k_down = k2.ks_down;
k2.k_left = k2.ks_left;
k2.k_right = k2.ks_right;
k2.k_defense = k2.ks_defense;
k2.k_attack = k2.ks_attack;
};
calculateDistance = function (a, b) {
var _local2 = b._x - a._x;
var _local1 = b._y - a._y;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
};
calculateAngle = function (o1, o2) {
return(Math.atan((o2._y - o1._y) / (o2._x - o1._x)));
};
posnega = function (i) {
return(i - (3 * (i - 1)));
};
collide = function (i, x, y) {
var _local9 = GC[("p" + i) + _root["team" + i][0]];
var _local7 = GC[("p" + (3 - i)) + _root["team" + (3 - i)][0]];
var _local12 = _local9._x + x;
var _local13 = _local9._y + y;
var _local2 = 20;
var _local15 = _local2 * _local2;
var _local8 = 34;
var _local11 = _local8 * _local8;
var _local4 = _local7._x - _local12;
var _local5 = _local4 * _local4;
var _local3 = _local7._y - _local13;
var _local14 = _local3 * _local3;
var _local10 = _local5 + _local14;
if (_local10 <= Math.min((_local15 * _local10) / _local5, _local11)) {
return(true);
}
};
bounce = function (i) {
var _local2 = GC[("p" + i) + _root["team" + i][0]];
var _local4 = GC[("p" + (3 - i)) + _root["team" + (3 - i)][0]];
var _local6 = _local4._x - _local2._x;
var _local5 = _local4._y - _local2._y;
_local2._x = _local2._x - (_local6 / 12);
_local2._y = _local2._y - (_local5 / 12);
};
updatePlayerSprite = function (i, j) {
if (!j) {
j = 0;
}
var _local2 = GC[("p" + i) + _root["team" + i][j]];
_local2.p.cible._x = ((-_local2.sprite) * 20) + 10;
};
getBudoName = function (i) {
var _local1;
if (budoCOM[i]) {
_local1 = "C" + budoN[i];
} else {
_local1 = "P" + budoN[i];
}
return(_local1);
};
initArrow = function (i) {
var flecheTemp1 = _root[("fleche" + i) + "1"];
var flecheTemp2 = _root[("fleche" + i) + "2"];
flecheTemp1.gotoAndStop(1);
flecheTemp2.gotoAndStop(1);
flecheTemp1.onRollOver = function () {
soundPlayer("s_rollover");
flecheTemp1.gotoAndStop(11);
};
flecheTemp2.onRollOver = function () {
soundPlayer("s_rollover");
flecheTemp2.gotoAndStop(11);
};
flecheTemp1.onRollOut = function () {
flecheTemp1.gotoAndStop(1);
};
flecheTemp2.onRollOut = function () {
flecheTemp2.gotoAndStop(1);
};
};
initSlider = function (slider, n, x) {
slider.drag.gotoAndStop(1);
switch (n) {
case "hp" :
case "ki" :
slider.inf._visible = false;
slider.c0.text = "100";
slider.c1.text = "200";
slider.c2.text = "300";
slider.c3.text = "400";
slider.c4.text = "500";
break;
case "lvl" :
slider.inf._visible = false;
slider.c0.text = "1";
slider.c1.text = "2";
slider.c2.text = "3";
slider.c3.text = "4";
slider.c4.text = "5";
break;
case "time" :
slider.c0.text = "";
slider.c1.text = "30";
slider.c2.text = "60";
slider.c3.text = "90";
slider.c4.text = "120";
}
slider.drag.onRollOver = function () {
soundPlayer("s_rollover");
slider.drag.gotoAndStop(2);
};
slider.drag.onRollOut = function () {
slider.drag.gotoAndStop(1);
};
slider.drag.onPress = function () {
slider.drag.startDrag(true, 15, 0, 135, 0);
slider.drag.gotoAndStop(3);
};
slider.drag.onRelease = (slider.drag.onReleaseOutside = function () {
soundPlayer("s_select");
slider.drag.stopDrag();
slider.drag.gotoAndStop(1);
xSlider(slider, Math.floor(slider.drag._x / 30.01));
if (n == "lvl") {
limitSliderLVL(1);
limitSliderLVL(2);
}
});
var _local2 = 0;
while (_local2 <= 4) {
var _local3 = slider["btn" + _local2];
_local3.gotoAndStop(1);
_local3.onPress = function () {
soundPlayer("s_select");
slider.drag.stopDrag();
slider.drag.gotoAndStop(1);
xSlider(slider, Math.ceil(this._x / 30.01));
if (n == "lvl") {
limitSliderLVL(1);
limitSliderLVL(2);
}
};
_local2++;
}
xSlider(slider, x);
};
updateSliderLVL = function (p) {
var _local5 = _root["slideLVL" + p];
var _local6 = _root["k" + p];
var _local4 = 5;
if (gameMode != "budokai") {
if (cheatcode) {
_local4 = fighterList[_local6.choice].length - 1;
} else {
_local4 = fighterList[dbzFighterList[_local6.choice]].length - 1;
}
}
var _local3 = 0;
while (_local3 <= 4) {
var _local2 = _local5["btn" + _local3];
if (_local3 < _local4) {
_local2.gotoAndStop(1);
_local2.useHandCursor = true;
} else {
_local2.gotoAndStop(2);
_local2.useHandCursor = false;
}
_local3++;
}
limitSliderLVL(p);
};
limitSliderLVL = function (p) {
var _local2 = _root["slideLVL" + p];
var _local4 = _root["k" + p];
var _local3 = 5;
if (gameMode != "budokai") {
if (cheatcode) {
_local3 = fighterList[_local4.choice].length - 1;
} else {
_local3 = fighterList[dbzFighterList[_local4.choice]].length - 1;
}
}
_local2.x = Math.min(_local2.x, _local3 - 1);
_local2.drag._x = (_local2.x + 0.5) * 30;
};
xSlider = function (slider, x) {
slider.x = x;
slider.drag._x = (x + 0.5) * 30;
};
cleanSlider = function (sliderTemp) {
cleanRollOver(sliderTemp.drag);
cleanRollOut(sliderTemp.drag);
cleanPress(sliderTemp.drag);
cleanRelease(sliderTemp.drag);
cleanReleaseOutside(sliderTemp.drag);
var _local1 = 0;
while (_local1 <= 4) {
var _local2 = sliderTemp["btn" + _local1];
cleanPress(_local2);
_local1++;
}
};
menuSwitchCom = function (i) {
var _local2 = _root["k" + i];
soundPlayer("s_ok");
if (_local2.com) {
_local2.com = 0;
} else {
_local2.com = 1;
}
menuBtnCom(i);
};
menuBtnCom = function (i) {
if (_root["k" + i].com) {
_root["btnPC" + i].txt.text = "COM " + i;
} else {
_root["btnPC" + i].txt.text = "Player " + i;
}
};
cleanMenu = function (i) {
var _local2 = _root["btn" + i].btn;
cleanRollOver(_local2);
cleanRollOut(_local2);
cleanPress(_local2);
var _local4 = _root[("fleche" + i) + "1"];
cleanRollOver(_local4);
cleanRollOut(_local4);
cleanPress(_local4);
var _local3 = _root[("fleche" + i) + "2"];
cleanRollOver(_local3);
cleanRollOut(_local3);
cleanPress(_local3);
};
cleanStoryBtn = function (p, n) {
var _local2 = 0;
while (_local2 < n) {
cleanPress(_root[("face" + p) + _local2].clip);
_root[("face" + p) + _local2].removeMovieClip();
_local2++;
}
};
cleanMainMenu = function () {
var _local2 = 0;
while (_local2 < mainMenu.titles.length) {
var _local1 = mainMenu["cover" + _local2];
cleanPress(_local1);
delete _local1.onEnterFrame;
_local1.removeMovieClip();
_local2++;
}
};
cleanCoverflow = function (n) {
var _local2 = 0;
while (_local2 < n) {
var _local1 = panelCoverflow.cible["face" + _local2];
cleanPress(_local1);
delete _local1.onEnterFrame;
_local1.removeMovieClip();
_local2++;
}
};
cleanRoosters = function () {
rooster1 = (rooster2 = undefined);
rooster1 = null;
rooster1 = new Array();
rooster1[0] = new Array();
rooster2 = null;
rooster2 = new Array();
rooster2[0] = new Array();
};
cleanRollOver = function (btnTemp) {
delete btnTemp.onRollOver;
};
cleanRollOut = function (btnTemp) {
delete btnTemp.onRollOut;
};
cleanPress = function (btnTemp) {
delete btnTemp.onPress;
};
cleanRelease = function (btnTemp) {
delete btnTemp.onRelease;
};
cleanReleaseOutside = function (btnTemp) {
delete btnTemp.onReleaseOutside;
};
testWounds = function (p) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
var _local4 = GC[("p" + (3 - p)) + _root["team" + (3 - p)][0]];
_local2.power = 0;
_local2.slide = 0;
if ((!stopTimer) == 0) {
_local2.fire = 0;
}
if ((_local2.wound > 20) && (!stopTimer)) {
_local2.kameha._alpha = 0;
if (_local2._y < _YMAX) {
_local2.sprite = 8;
switch (p + xcross) {
case 0 :
case 3 :
_local2._rotation = _local2._rotation + 15;
if (_local2._x < _XMAX) {
_local2._x = _local2._x + 8;
}
break;
case 1 :
case 2 :
_local2._rotation = _local2._rotation - 15;
if (_local2._x <= _XMIN) {
break;
}
_local2._x = _local2._x - 8;
}
_local2._y = _local2._y + 10;
}
if ((_local2._y >= _YMAX) && (_local2.fly)) {
soundPlayer("s_hitground");
kaboum(_local2._x, _local2._y, 20);
_local2._rotation = 0;
}
if (_local2._y == _YMAX) {
_local2.sprite = 10;
_local2.wound = 20;
_local2._rotation = 0;
}
} else {
switch (_local2.sprite) {
case 10 :
if (_local2.wound < 10) {
_local2.sprite = 9;
}
break;
case 9 :
break;
default :
_local2.sprite = 8;
}
_local2.wound--;
}
};
testFireball = function (p) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
if (_local2.ID_changeBG && (_local2.power >= 100)) {
ID_changeBG(p);
} else if (_local2.ID_stopTime && (_local2.power >= 100)) {
ID_stopTime(p);
} else {
if (_local2.ID_absorbLight && (_local2.ki <= (_local2.kimax - 100))) {
_local2.lvl = 1;
_local2.p.cible._y = ((-_local2.lvl) * 20) + 10;
_root[("p" + p) + "Face"].pface.gotoAndStop(_local2.lvl);
}
fireBall(p);
}
};
jump = function (p) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
_local2.jumpSpeed = Math.max(-30, _local2.jumpSpeed - _GRAVITY);
if (_local2.jumpSpeed > 0) {
yMove(p, -1, _local2.jumpSpeed);
} else if (_local2.jumpSpeed < 0) {
yMove(p, 1, -_local2.jumpSpeed);
}
};
yMove = function (p, y, speed) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
if (_local2.fire != 3) {
var _local3 = speed * y;
if (!_local2.defense) {
_local2.sprite = 11;
}
if (y == -1) {
_local3 = _local3 * 1.8;
}
_local2._y = _local2._y + _local3;
}
};
testAlpha = function (p) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
var _local4 = GC[("p" + (3 - p)) + _root["team" + (3 - p)][0]];
if (_local2._yscale < 100) {
_local2._yscale = _local2._yscale + 5;
if (p == 1) {
_local2._xscale = _local2._yscale;
} else {
_local2._xscale = -_local2._yscale;
}
}
if (_local2._alpha < 100) {
_local2._alpha = _local2._alpha + 10;
}
if (!stopTimer) {
_local2.kameha.fx.play();
} else {
_local2.kameha.fx.stop();
}
if (!(_local2.fire === 3)) {
if (_local2.kameha._alpha > 0) {
_local2.kameha._alpha = _local2.kameha._alpha - 25;
}
} else if (!stopTimer) {
if (_local2.kameha.go._xscale < 35000) {
_local2.kameha.go._xscale = _local2.kameha.go._xscale + 600;
}
}
if (_local2.auraspr._alpha > 0) {
_local2.auraspr._alpha = _local2.auraspr._alpha - 20;
}
};
testDeath = function (p) {
var _local3 = _root["team" + p];
var _local4 = GC[("p" + p) + _local3[0]];
if (_local4.hp <= 0) {
if (_local3.length > 1) {
toKill.push((("" + p) + _local3[0]) + (p + xcross));
_local3.shift();
teamSwitch(p, true);
} else {
toKill.push((("" + p) + _local3[0]) + (p + xcross));
switchScreen("fight", "fightOver", 3 - p);
}
}
};
killingPlayer = function (safe) {
var _local2 = 0;
while (_local2 < toKill.length) {
var _local4 = Number(toKill[_local2].slice(0, 1));
var _local3 = Number(toKill[_local2].slice(1, 2));
var _local5 = Number(toKill[_local2].slice(2, 3));
var _local1 = GC[("p" + _local4) + _local3];
if (_local1.kameha._alpha > 0) {
_local1.kameha._alpha = _local1.kameha._alpha - 25;
}
if (_local1.auraspr._alpha > 0) {
_local1.auraspr._alpha = _local1.auraspr._alpha - 25;
}
switch (_local1.death) {
case "blow" :
if (_local1._alpha > 0) {
_local1.sprite = 8;
_local1._alpha = _local1._alpha - 3;
} else if (!safe) {
cleanPlayer(_local4, _local3);
toKill.splice(_local2, 1);
}
break;
case "away" :
if (_local1._yscale > 2) {
if (_local1._xscale > 0) {
_local1._xscale = _local1._xscale - 2;
} else {
_local1._xscale = _local1._xscale + 2;
}
_local1._yscale = _local1._yscale - 2;
_local1._y = _local1._y - 2;
switch (_local5) {
case 1 :
case 2 :
_local1._x = _local1._x - 2;
_local1._rotation = _local1._rotation - 15;
break;
case 0 :
case 3 :
_local1._x = _local1._x + 2;
_local1._rotation = _local1._rotation + 15;
}
} else if (!safe) {
cleanPlayer(_local4, _local3);
toKill.splice(_local2, 1);
}
break;
case "fall" :
_local1.swapDepths(20 + _local3);
if (_local1._y < _YMAX) {
_local1.sprite = 8;
switch (_local5) {
case 1 :
case 2 :
_local1._x = _local1._x - 10;
_local1._rotation = _local1._rotation - 15;
break;
case 0 :
case 3 :
_local1._x = _local1._x + 10;
_local1._rotation = _local1._rotation + 15;
}
_local1._y = Math.min(_YMAX, _local1._y + 10);
} else {
_local1._rotation = 0;
if (_local1.hp <= 0) {
_local1.sprite = 10;
if (_local1._alpha > 0) {
_local1._alpha = _local1._alpha - 2;
} else if (!safe) {
cleanPlayer(_local4, _local3);
toKill.splice(_local2, 1);
}
} else {
_local1.sprite = 8;
}
}
}
_local1.p.cible._x = ((-_local1.sprite) * 20) + 10;
_local2++;
}
};
GetOffScreen = function (p) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
_local2.slide = 10;
_local2.slideX = 10 * ((3 * (p - 1)) - p);
_local2.slideY = 5;
};
teamSwitch = function (p, k) {
var _local6 = _root["team" + p];
var _local5 = GC[("p" + p) + _local6[0]];
var _local8 = GC[("p" + (3 - p)) + _root["team" + (3 - p)][0]];
_local5._xscale = 50 * (p - (3 * (p - 1)));
_local5._yscale = 50;
if (!k) {
_local6.push(_local6.shift());
}
_local5 = GC[("p" + p) + _local6[0]];
if ((cheatcode || (gameMode == "story")) || (gameMode == "oav")) {
_root[("p" + p) + "Face"].gotoAndStop(fighterList[_local5.choice][0]);
} else {
_root[("p" + p) + "Face"].gotoAndStop(fighterList[dbzFighterList[_local5.choice]][0]);
}
_root[("p" + p) + "Face"].pface.gotoAndStop(_local5.lvl);
_root[("p" + p) + "NameTxt"].htmlText = _local5.name;
_local5._y = _YMAX;
_local5.slide = 10;
_local5.slideX = 20 * (p - (3 * (p - 1)));
_local5.slideY = -15;
_local5.fly = 1;
initPowerLevel(p);
if (_local5.ID_canJump) {
_local5.jump = 1;
_local5.jumpSpeed = 0;
}
if (_local5.ID_absorbLight) {
var _local7;
var _local9 = _root["rooster" + (3 - p)][_root["team" + (3 - p)][0]][0];
if (cheatcode || (gameMode == "story")) {
_local7 = fighterList[_local9][_local8.lvl][_AURA];
} else {
_local7 = fighterList[dbzFighterList[_local9]][_local8.lvl][_AURA];
}
if (((_local7 == "ssj") || (_local7 == "ssj2")) || (_local7 == "ssj3")) {
screenPowerUp(3 - p, 1);
}
}
if (_local8.ID_absorbLight) {
var _local9 = _root["rooster" + p][_local6[0]][0];
if (cheatcode || (gameMode == "story")) {
var _local7 = fighterList[_local9][_local5.lvl][_AURA];
} else {
var _local7 = fighterList[dbzFighterList[_local9]][_local5.lvl][_AURA];
}
if (((_local7 == "ssj") || (_local7 == "ssj2")) || (_local7 == "ssj3")) {
screenPowerUp(p, 1);
}
}
var _local3 = 1;
while (_local3 < _local6.length) {
var _local2 = GC[("p" + p) + _local6[_local3]];
_local2.wound = 0;
_local2._y = _YTEAM;
_local2._alpha = 100;
_local2.auraspr._alpha = 0;
_local2.sprite = 1;
updatePlayerSprite(p, _local3);
_local3++;
}
teamSwapDepth();
};
teamSwapDepth = function () {
var _local5 = 19;
var _local6 = Math.max(team1.length, team2.length);
var _local4 = 0;
while (_local4 < _local6) {
var _local2 = 1;
while (_local2 <= 2) {
var _local3 = _root["team" + _local2];
if (_local4 < _local3.length) {
GC[("p" + _local2) + _local3[_local4]].swapDepths(_local5);
_local5--;
}
_local2++;
}
_local4++;
}
};
teamPlacing = function (p) {
var _local5 = _root["team" + p];
var _local2 = 1;
while (_local2 < _local5.length) {
var _local3 = GC[("p" + p) + _local5[_local2]];
var _local4;
if (p == 1) {
_local4 = _XMIN + ((_local5.length - _local2) * _XTEAM);
} else {
_local4 = _XMAX - ((_local5.length - _local2) * _XTEAM);
}
if (Math.abs(_local4 - _local3._x) > 2) {
_local3._x = _local3._x + ((_local4 - _local3._x) / 6);
_local3.sprite = 5;
} else {
_local3._x = _local4;
_local3.sprite = 1;
}
updatePlayerSprite(p, _local2);
_local2++;
}
};
testLimits = function (p) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
if (collide(p, 0, 0)) {
bounce(p);
}
if (_local2._y <= _YMIN) {
_local2._y = _YMIN;
if (_local2.com) {
_local2.COMtimerv = _local2.COMtimervmax;
}
}
if (_local2._y >= _YMAX) {
_local2._y = _YMAX;
_local2.fly = 0;
if (_local2.ID_canJump) {
_local2.jump = 0;
}
if (_local2.com) {
_local2.COMtimerv = _local2.COMtimervmax;
}
}
if (_local2._x > _XMAX) {
if (_local2.com) {
_local2.COMtimerh = _local2.COMtimerhmax;
}
if (((p == 2) && (team2.length > 1)) && (!stopTimer)) {
if (_local2.fast) {
GetOffScreen(2);
_local2.fast = 0;
} else if (_local2.slide) {
if (_local2.hp && (_local2._x >= 520)) {
teamSwitch(2);
}
} else {
_local2._x = _XMAX;
}
} else {
_local2._x = _XMAX;
}
}
if (_local2._x < _XMIN) {
if (_local2.com) {
_local2.COMtimerh = _local2.COMtimerhmax;
}
if (((p == 1) && (team1.length > 1)) && (!stopTimer)) {
if (_local2.fast) {
GetOffScreen(1);
_local2.fast = 0;
} else if (_local2.slide) {
if (_local2.hp && (_local2._x <= -20)) {
teamSwitch(1);
}
} else {
_local2._x = _XMIN;
}
} else {
_local2._x = _XMIN;
}
}
};
initPowerLevel = function (p) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
if ((cheatcode || (gameMode == "story")) || (gameMode == "oav")) {
_local2.strength = fighterList[_local2.choice][_local2.lvl][_STRENGTH];
_local2.speed = fighterList[_local2.choice][_local2.lvl][_SPEED];
_local2.mind = fighterList[_local2.choice][_local2.lvl][_MIND];
} else {
_local2.strength = fighterList[dbzFighterList[_local2.choice]][_local2.lvl][_STRENGTH];
_local2.speed = fighterList[dbzFighterList[_local2.choice]][_local2.lvl][_SPEED];
_local2.mind = fighterList[dbzFighterList[_local2.choice]][_local2.lvl][_MIND];
}
};
testID = function (p, t) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
if (t) {
if (_local2.ID_fillKi) {
ID_fillKi(p);
}
if (_local2.ID_fillHp) {
ID_fillHp(p);
}
if (_local2.ID_rage) {
ID_rage(p);
}
}
if (_local2.ID_stopTime) {
if (stopTimer > 0) {
stopTimer--;
}
if (stopTimer == 0) {
GC.filters = undefined;
sky.filters = undefined;
if (gameTime <= 100) {
chrono.jauge.gotoAndPlay(1);
} else {
chrono.jauge.gotoAndStop(1);
}
}
}
};
ID_rage = function (p) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
if (((_local2.ki > 0) && (_local2.fire == 0)) && (_local2.defense == 0)) {
_local2.ki--;
}
if ((_local2.ki == 0) && (_local2.lvl > 1)) {
_local2.lvl--;
_local2.p.cible._y = ((-_local2.lvl) * 20) + 10;
_root[("p" + p) + "Face"].pface.gotoAndStop(_local2.lvl);
}
};
ID_fillKi = function (p) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
if ((_local2.ki < _local2.kimax) && (_local2.fire == 0)) {
if (_local2.fillKiTimer == 10) {
_local2.ki++;
} else {
_local2.fillKiTimer++;
}
}
};
ID_fillHp = function (p) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
if (_local2.hp < _local2.hpmax) {
_local2.fillHpTimer++;
if (_local2.fillHpTimer == 20) {
_local2.fillHpTimer = 0;
_local2.hp++;
}
}
};
ID_changeBG = function (p) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
var _local5 = GC[("p" + (3 - p)) + _root["team" + (3 - p)][0]];
randomBG();
setupBG(GC.bg.choice);
_local5.wound = 25;
_local2.power = 0;
_local2.fire = 1;
_local2.waitSomeFrame = 5;
var _local3 = calculateAngle(_local2, _local5);
_local2.spriteFix = 16;
switch (p + xcross) {
case 1 :
case 2 :
if (_local3 < (-_ANGLEMAX)) {
_local2.spriteFix = 17;
}
if (_local3 > _ANGLEMAX) {
_local2.spriteFix = 18;
}
break;
case 0 :
case 3 :
if (_local3 < (-_ANGLEMAX)) {
_local2.spriteFix = 18;
}
if (_local3 <= _ANGLEMAX) {
break;
}
_local2.spriteFix = 17;
}
};
ID_stopTime = function (p) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
var _local5 = GC[("p" + (3 - p)) + _root["team" + (3 - p)][0]];
_local5.wound = Math.floor(0.4 * _local2.power);
_local2.power = 0;
_local2.fire = 1;
_local2.waitSomeFrame = 5;
stopTimer = _local5.wound;
chrono.jauge.gotoAndStop("stopTime");
applyFilter(GC, 0.4, 0);
applyFilter(sky, 0.4, 0);
var _local3 = calculateAngle(_local2, _local5);
_local2.spriteFix = 16;
switch (p + xcross) {
case 1 :
case 2 :
if (_local3 < (-_ANGLEMAX)) {
_local2.spriteFix = 17;
}
if (_local3 > _ANGLEMAX) {
_local2.spriteFix = 18;
}
break;
case 0 :
case 3 :
if (_local3 < (-_ANGLEMAX)) {
_local2.spriteFix = 18;
}
if (_local3 <= _ANGLEMAX) {
break;
}
_local2.spriteFix = 17;
}
};
testWaitSomeFrame = function (p) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
if ((_local2.waitSomeFrame > 0) || (_local2.fire == 3)) {
if (_local2.waitSomeFrame > 0) {
_local2.waitSomeFrame--;
_local2.fire = 1;
}
_local2.defense = 0;
_local2.sprite = _local2.spriteFix;
}
};
initSpecialFx = function (p, f, r) {
var _local2 = GC[("p" + p) + _root["team" + p][0]].kameha;
var _local3 = GC[("p" + p) + _root["team" + p][0]];
switch (f) {
case "kameha" :
if (((cheatcode || (gameMode == "story")) || (gameMode == "oav")) || (gameMode == "tutorial")) {
_local2.gotoAndStop(fighterList[_local3.choice][_local3.lvl][_KIBLAST]);
} else {
_local2.gotoAndStop(fighterList[dbzFighterList[_local3.choice]][_local3.lvl][_KIBLAST]);
}
_local2._rotation = r;
_local2.go._xscale = 1;
_local2._alpha = 100;
break;
case "absorbKi" :
_local2.gotoAndStop("absorbKi");
_local2._rotation = r;
_local2._alpha = 100;
}
};
testTransform = function (p) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
if (_local2.lvl < _local2.lvlmax) {
if (_local2.ki >= _local2.kimax) {
if (p == 1) {
poweringUp = true;
}
switchScreen("fight", "powerUp", p);
}
}
};
testCloseCombat = function (p, d) {
var _local4 = GC[("p" + p) + _root["team" + p][0]];
var _local2 = GC[("p" + (3 - p)) + _root["team" + (3 - p)][0]];
_local4.fire = 0;
attackCycle(p);
if (((d < _DCLOSECOMBAT) && (_local2.attack != 0)) && (_local2.wound == 0)) {
switchScreen("fight", "closeCombat");
}
if ((((d < _DCLOSECOMBAT) && (_local2.defense == 0)) && (_local2.sprite != 9)) && (_local2.sprite != 10)) {
soundPunch(p);
_local2.hp = _local2.hp - (1 + Math.max(0, _local4.strength - _local2.strength));
_local2.wound = _local2.wound + 2;
_local2.death = "fall";
}
};
startSlide = function (p, x, y) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
var _local5 = GC[("p" + (3 - p)) + _root["team" + (3 - p)][0]];
var _local3 = false;
if ((_local2._x < _local5._x) && (x > 0)) {
_local3 = true;
}
if ((_local2._x > _local5._x) && (x < 0)) {
_local3 = true;
}
if (_local3) {
_local2.slide = 10;
_local2.slideX = x;
_local2.slideY = y;
}
};
testSlide = function (p, d) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
var _local3 = GC[("p" + (3 - p)) + _root["team" + (3 - p)][0]];
if (_local2.slide > 0) {
_local2.slide--;
if (_local2._x < _XMIN) {
_local2.sprite = 6;
} else if (_local2._x > _XMAX) {
_local2.sprite = 5;
} else {
_local2.sprite = 14;
}
_local2.slideX = _local2.slideX - (_local2.slideX / 10);
_local2.slideY = _local2.slideY - (_local2.slideY / 10);
if (((d < _DCLOSECOMBAT) && (_local3.sprite != 9)) && (_local3.sprite != 10)) {
soundPunch(i);
_local2.slide = 0;
if (dbzTouch && (!k1.com)) {
_local2.gotoX = _local2._x;
_local2.gotoY = _local2._y;
tapAttack = true;
}
if (_local3.defense) {
_local3.defense = 0;
} else {
_local3.wound = 20;
_local3.hp = _local3.hp - (1 + Math.max(0, (_local2.strength * 2) - _local3.strength));
_local3.death = "away";
}
}
}
};
movingRight = function (p) {
var _local3 = GC[("p" + p) + _root["team" + p][0]];
if (_local3.fly) {
switch (xcross) {
case 1 :
_local3.sprite = 4 + p;
break;
case -1 :
_local3.sprite = 7 - p;
}
} else {
switch (p + xcross) {
case 0 :
case 3 :
_local3.sprite = 6;
break;
case 1 :
case 2 :
walkCycle(p);
}
}
};
movingLeft = function (p) {
var _local3 = GC[("p" + p) + _root["team" + p][0]];
if (_local3.fly) {
switch (xcross) {
case 1 :
_local3.sprite = 7 - p;
break;
case -1 :
_local3.sprite = 4 + p;
}
} else {
switch (p + xcross) {
case 0 :
case 3 :
walkCycle(p);
break;
case 1 :
case 2 :
_local3.sprite = 6;
}
}
};
walkCycle = function (p) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
_local2.walk++;
switch (_local2.walk) {
case 16 :
_local2.walk = 1;
default :
_local2.sprite = 2;
break;
case 1 :
case 2 :
case 3 :
case 4 :
_local2.sprite = 3;
break;
case 9 :
case 10 :
case 11 :
case 12 :
_local2.sprite = 4;
}
};
attackCycle = function (p) {
var _local2 = GC[("p" + p) + _root["team" + p][0]];
_local2.attack++;
switch (_local2.attack) {
case 1 :
case 2 :
case 3 :
_local2.sprite = 13;
break;
case 4 :
case 5 :
case 6 :
_local2.sprite = 14;
break;
case 7 :
case 8 :
case 9 :
_local2.sprite = 11;
break;
case 12 :
_local2.attack = 1;
case 10 :
case 11 :
_local2.sprite = 12;
}
};
zoomEngine = function (zoom, x, y, speed) {
var _local4 = GC["p1" + team1[0]];
var _local3 = GC["p2" + team2[0]];
if (!x) {
x = (_local4._x + _local3._x) / 2;
}
if (!y) {
y = (_local4._y + _local3._y) / 2;
}
if (!zoom) {
var _local8 = 60;
var _local7 = 300;
var _local6 = _local4._x - _local3._x;
var _local5 = ((_local4._y - _local3._y) * 5) / 3;
var _local9 = Math.min(Math.max(Math.sqrt((_local6 * _local6) + (_local5 * _local5)), _local8), _local7);
zoom = 300 - ((_local9 * 200) / _local7);
if (!speed) {
if (zoom > GC.zoom) {
speed = 40;
} else {
speed = 2;
}
}
} else if (!speed) {
speed = 10;
}
zoom = (zoom - GC.zoom) / speed;
GC.zoom = GC.zoom + zoom;
GC._xscale = (GC._yscale = GC.zoom);
GC._x = Math.min(0, Math.max(250 - ((x * GC.zoom) / 100), 500 - (5 * GC.zoom)));
GC._y = Math.min(0, Math.max(150 - ((y * GC.zoom) / 100), 300 - (3 * GC.zoom)));
};
createListener = function () {
ecouteur = new Object();
ecouteur.onKeyUp = function () {
var _local3 = 1;
while (_local3 <= 2) {
var _local2 = GC[("p" + _local3) + _root["team" + _local3][0]];
var _local4 = _root["k" + _local3];
var _local5 = true;
if (_local4.com) {
_local5 = false;
}
if (dbzTouch) {
if (_local3 == 1) {
_local5 = false;
}
}
if (_local5) {
if ((Key.getCode() == _local4.k_attack) && (_local2.power)) {
testFireball(_local3);
} else if (((Key.getCode() == _local4.k_defense) && (_local2.wound == 0)) && (_local2.fire != 3)) {
_local2.fire = 0;
_local2.power = 0;
_local2.fast = 0;
_local2.sprite = 1;
_local2.defense = 0;
updatePlayerSprite(_local3);
}
if (Key.getCode() == _local4.k_left) {
_local2.timer_k_left = getTimer();
} else {
_local2.timer_k_left = 0;
}
if (Key.getCode() == _local4.k_right) {
_local2.timer_k_right = getTimer();
} else {
_local2.timer_k_right = 0;
}
if (Key.getCode() == _local4.k_up) {
_local2.timer_k_up = getTimer();
} else {
_local2.timer_k_up = 0;
}
if (Key.getCode() == _local4.k_down) {
_local2.timer_k_down = getTimer();
} else {
_local2.timer_k_down = 0;
}
}
_local3++;
}
};
Key.addListener(ecouteur);
};
controlPlayer = function (i) {
var _local2 = GC[("p" + i) + _root["team" + i][0]];
var _local8 = GC[("p" + (3 - i)) + _root["team" + (3 - i)][0]];
var _local6 = _root["k" + i];
var _local7 = calculateDistance(_local2, _local8);
testAlpha(i);
if ((_local2.fire <= 1) && (_local2.wound == 0)) {
_local2.fire = 0;
_local2.sprite = 1;
_local2.defense = 0;
}
if (_local2.wound) {
testWounds(i);
testID(i, false);
} else {
if (((Key.isDown(_local6.k_defense) && (_local2.fire <= 1)) && (_local2.waitSomeFrame == 0)) && (_local2.slide == 0)) {
if (_local2.waitSomeFrame == 0) {
_local2.sprite = 7;
}
_local2.fire = 0;
_local2.defense = 1;
if ((((!_local2.ID_fillKi) && (!_local2.ID_absorbKi)) && (!_local2.ID_noKi)) && (_local2.ki < _local2.kimax)) {
soundAura(i);
if (!_local2.fly) {
createDust(_local2._x, _local2._y + 18);
}
_local2.auraspr._alpha = 80;
_local2.ki = _local2.ki + 2;
}
}
testID(i, true);
var _local4 = 0;
var _local5 = 0;
if (((Key.isDown(_local6.k_right) && (_local2.fire <= 1)) && (_local2.defense == 0)) && (_local2.slide == 0)) {
_local2.fire = 0;
if (!_local2.fast) {
if ((getTimer() - _local2.timer_k_right) < _TKEYSPEED) {
_local2.fast = 1;
_local2.fastTimer = getTimer();
}
}
if (_local2.fast) {
if ((getTimer() - _local2.fastTimer) < _TSPEED) {
_local2.fast = 1;
_local2.fly = 1;
_local2._alpha = 20;
_local4 = 20 + _local2.speed;
} else {
_local2.fast = 0;
_local4 = 6 + _local2.speed;
}
} else {
_local4 = 6 + _local2.speed;
}
movingRight(i);
}
if (((Key.isDown(_local6.k_left) && (_local2.fire <= 1)) && (_local2.defense == 0)) && (_local2.slide == 0)) {
_local2.fire = 0;
if (!_local2.fast) {
if ((getTimer() - _local2.timer_k_left) < _TKEYSPEED) {
_local2.fast = 1;
_local2.fastTimer = getTimer();
}
}
if (_local2.fast) {
if ((getTimer() - _local2.fastTimer) < _TSPEED) {
_local2.fast = 1;
_local2.fly = 1;
_local2._alpha = 20;
_local4 = -20 - _local2.speed;
} else {
_local2.fast = 0;
_local4 = -6 - _local2.speed;
}
} else {
_local4 = -6 - _local2.speed;
}
movingLeft(i);
}
if (_local2.ID_canJump) {
if (((Key.isDown(_local6.k_up) && (_local2.fire <= 1)) && (_local2.defense == 0)) && (_local2.slide == 0)) {
if (_local2.canJump) {
_local2.canJump = false;
switch (_local2.jump) {
case 0 :
fxJump(_local2._x, _local2._y + 16, 2);
_local2.jumpSpeed = _JUMPSTART;
_local2.jump = 1;
_local2.fly = 1;
break;
case 1 :
fxJump(_local2._x, _local2._y + 16, 2);
_local2.jumpSpeed = _JUMPSTART;
_local2.jump = 2;
}
}
} else {
_local2.canJump = true;
}
if (_local2.jump) {
jump(i);
}
} else if (((Key.isDown(_local6.k_up) && (_local2.fire <= 1)) && (_local2.defense == 0)) && (_local2.slide == 0)) {
_local2.fire = 0;
_local2.fly = 1;
_local2.sprite = 11;
if (!_local2.fast) {
if ((getTimer() - _local2.timer_k_up) < _TKEYSPEED) {
_local2.fast = 1;
_local2.fastTimer = getTimer();
}
}
if (_local2.fast) {
if ((getTimer() - _local2.fastTimer) < _TSPEED) {
_local2.fast = 1;
_local2._alpha = 20;
_local5 = -16 - _local2.speed;
} else {
_local2.fast = 0;
_local5 = -6 - _local2.speed;
}
} else {
_local5 = -6 - _local2.speed;
}
}
if (((Key.isDown(_local6.k_down) && (_local2.fire <= 1)) && (_local2.defense == 0)) && (_local2.slide == 0)) {
_local2.fire = 0;
if (_local2.fly == 1) {
_local2.sprite = 11;
if (!_local2.fast) {
if ((getTimer() - _local2.timer_k_down) < _TKEYSPEED) {
_local2.fast = 1;
_local2.fastTimer = getTimer();
}
}
if (_local2.fast) {
if ((getTimer() - _local2.fastTimer) < _TSPEED) {
_local2.fast = 1;
_local2._alpha = 20;
_local5 = 16 + _local2.speed;
} else {
_local2.fast = 0;
_local5 = 6 + _local2.speed;
}
} else {
_local5 = 6 + _local2.speed;
}
}
}
if (((Key.isDown(_local6.k_attack) && (_local2.fast == 1)) && (_local2.slide == 0)) && (_local4 != 0)) {
startSlide(i, _local4, _local5);
} else {
testSlide(i, _local7);
if (_local2.slide) {
_local4 = _local2.slideX;
_local5 = _local2.slideY;
}
}
_local2._x = _local2._x + _local4;
_local2._y = _local2._y + _local5;
if ((((Key.isDown(_local6.k_attack) && (_local2.fire <= 1)) && (_local2.defense == 0)) && (_local2.power == 0)) && (_local2.slide == 0)) {
testCloseCombat(i, _local7);
} else {
_local2.attack = 0;
}
if (!_local2.ID_noKiBlast) {
if ((((Key.isDown(_local6.k_attack) && (_local2.ki > 0)) && (_local2.defense == 0)) && (_local2.fire != 3)) && (_local2.slide == 0)) {
_local2.waitSomeFrame = 0;
if ((_local2.power > 0) || (_local7 >= _DFIREBALL)) {
soundKmeaload(i);
_local2.fire = 2;
_local2.sprite = 15;
if (_local2.ki >= 10) {
_local2.power = _local2.power + 10;
_local2.ki = _local2.ki - 10;
} else {
_local2.power = _local2.power + _local2.ki;
_local2.ki = 0;
}
if (_local2.ki == 0) {
if (_local2.ID_absorbKi) {
_local2.lvl = 1;
_local2.p.cible._y = ((-_local2.lvl) * 20) + 10;
}
_local2.fillKiTimer = 0;
}
}
}
}
}
testTransform(i);
testWaitSomeFrame(i);
testLimits(i);
};
testZoneClic = function (p) {
var _local3 = GC[("p" + p) + team1[0]];
var _local6 = GC._x + _local3._x;
var _local5 = GC._y + _local3._y;
var _local2 = _local6 - _xmouse;
var _local1 = _local5 - _ymouse;
var _local4 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
if (_local4 < 32) {
return(true);
}
return(false);
};
createTap = function (x, y) {
iDust++;
if (iDust > 280) {
iDust = 200;
}
var newTap = GC.createEmptyMovieClip("tap" + iDust, iDust);
newTap.attachMovie("tap", "clip", 1);
newTap._x = x;
newTap._y = y;
newTap._xscale = (newTap._yscale = 100);
newTap.onEnterFrame = function () {
newTap._xscale = newTap._xscale - 10;
newTap._yscale = newTap._yscale - 10;
if (newTap._xscale < 10) {
delete newTap.onEnterFrame;
removeMovieClip(newTap);
}
};
};
initPowerBallTouch = function () {
Mouse.show();
btnATT._visible = (btnDEF._visible = false);
onMouseDown = function () {
p1waitkey = 2;
createTap(_xmouse, _ymouse);
};
};
initCloseCombatTouch = function () {
Mouse.show();
btnATT._visible = (btnDEF._visible = false);
onMouseDown = function () {
if (_xmouse < 150) {
if (sensfleche == 3) {
fightwinner = 1;
} else {
fightwinner = 2;
}
} else if (_xmouse > 350) {
if (sensfleche == 1) {
fightwinner = 1;
} else {
fightwinner = 2;
}
} else if (_ymouse < 150) {
if (sensfleche == 0) {
fightwinner = 1;
} else {
fightwinner = 2;
}
} else if (sensfleche == 2) {
fightwinner = 1;
} else {
fightwinner = 2;
}
};
};
initControlTouch = function () {
Mouse.show();
btnATT._visible = (btnDEF._visible = true);
var _local1 = GC["p1" + team1[0]];
_local1.gotoX = _local1._x;
_local1.gotoY = _local1._y;
tapAttack = false;
tapFire = false;
tapMove = false;
onMouseDown = function () {
var _local1 = GC["p1" + team1[0]];
if (_local1.fire == 2) {
testFireball(1);
}
tapAttack = false;
tapFire = false;
if ((_xmouse < 61) && (_ymouse < 49)) {
_local1.timer_tap = 0;
if (_local1.defense) {
_local1.defense = 0;
} else {
_local1.defense = 1;
}
} else if ((_xmouse > 409) && (_ymouse < 49)) {
_local1.timer_tap = 0;
_local1.defense = 0;
tapFire = true;
} else if (testZoneClic(2)) {
_local1.timer_tap = 0;
_local1.defense = 0;
tapAttack = true;
_local1.gotoX = Math.min(Math.max(Math.floor(_xmouse - GC._x), _XMIN), _XMAX);
_local1.gotoY = Math.min(Math.max(Math.floor(_ymouse - GC._y), _YMIN), _YMAX + 4);
createTap(_local1._x, _local1._y);
} else {
_local1.defense = 0;
_local1.gotoX = Math.min(Math.max(Math.floor(_xmouse - GC._x), _XMIN), _XMAX);
_local1.gotoY = Math.min(Math.max(Math.floor(_ymouse - GC._y), _YMIN), _YMAX + 4);
createTap(_local1.gotoX, _local1.gotoY);
if (_local1.ID_canJump) {
_local1.canJump = true;
}
if ((_local1.wound == 0) && (_local1.fire != 3)) {
_local1.fire = 0;
_local1.power = 0;
_local1.fast = 0;
_local1.sprite = 1;
_local1.defense = 0;
updatePlayerSprite(1);
}
}
};
};
controlTouch = function (i) {
var _local2 = _root.GC[("p" + i) + team1[0]];
var _local7 = _root.GC[("p" + (3 - i)) + team2[0]];
var _local8 = _root["k" + i];
var _local6 = calculateDistance(_local2, _local7);
testAlpha(i);
if ((_local2.fire <= 1) && (_local2.wound == 0)) {
_local2.fire = 0;
_local2.sprite = 1;
}
if (_local2.wound) {
testWounds(i);
testID(i, false);
} else {
if (((_local2.defense && (_local2.fire <= 1)) && (_local2.waitSomeFrame == 0)) && (_local2.slide == 0)) {
if (_local2.waitSomeFrame == 0) {
_local2.sprite = 7;
}
_local2.fire = 0;
_local2.defense = 1;
if ((((!_local2.ID_fillKi) && (!_local2.ID_absorbKi)) && (!_local2.ID_noKi)) && (_local2.ki < _local2.kimax)) {
soundAura(i);
if (!_local2.fly) {
createDust(_local2._x, _local2._y + 18);
}
_local2.auraspr._alpha = 80;
_local2.ki = _local2.ki + 2;
}
}
testID(i, true);
var _local5 = (_local2.gotoX - _local2._x) / 4;
var _local4 = (_local2.gotoY - _local2._y) / 4;
if (Math.abs(_local5) < 1) {
_local5 = 0;
}
if (Math.abs(_local4) < 1) {
_local4 = 0;
}
if (Math.sqrt((_local5 * _local5) + (_local4 * _local4)) > 40) {
_local2.fast = 1;
}
if ((((_local5 > 0) && (_local2.fire <= 1)) && (_local2.defense == 0)) && (_local2.slide == 0)) {
_local2.fire = 0;
if (_local2.fast) {
_local2.fly = 1;
_local2._alpha = 20;
}
movingRight(i);
}
if ((((_local5 < 0) && (_local2.fire <= 1)) && (_local2.defense == 0)) && (_local2.slide == 0)) {
_local2.fire = 0;
if (_local2.fast) {
_local2.fly = 1;
_local2._alpha = 20;
}
movingLeft(i);
}
if (_local2.ID_canJump) {
if ((((_local2.gotoY < _YMAX) && (_local2.fire <= 1)) && (_local2.defense == 0)) && (_local2.slide == 0)) {
if (_local2.canJump) {
_local2.canJump = false;
switch (_local2.jump) {
case 0 :
fxJump(_local2._x, _local2._y + 16, 2);
_local2.jumpSpeed = _JUMPSTART;
_local2.jump = 1;
_local2.fly = 1;
break;
case 1 :
fxJump(_local2._x, _local2._y + 16, 2);
_local2.jumpSpeed = _JUMPSTART;
_local2.jump = 2;
}
}
_local4 = 0;
}
if (_local2.jump) {
jump(i);
}
} else if ((((_local4 < 0) && (_local2.fire <= 1)) && (_local2.defense == 0)) && (_local2.slide == 0)) {
_local2.fire = 0;
_local2.fly = 1;
_local2.sprite = 11;
if (_local2.fast) {
_local2._alpha = 20;
}
}
if ((((_local4 > 0) && (_local2.fire <= 1)) && (_local2.defense == 0)) && (_local2.slide == 0)) {
_local2.fire = 0;
if (_local2.fly == 1) {
_local2.sprite = 11;
if (_local2.fast) {
_local2._alpha = 20;
}
}
}
if ((tapFire && (_local2.ki)) && (_local6 >= _DFIREBALL)) {
_local2.fire = 2;
} else if (tapFire || (tapAttack)) {
if (((((_local2.fire <= 1) && (_local2.defense == 0)) && (_local2.fast == 1)) && (_local2.slide == 0)) && (_local5 != 0)) {
startSlide(i, _local5, _local4);
tapAttack = false;
}
if ((((_local2.fire <= 1) && (_local2.defense == 0)) && (_local2.power == 0)) && (_local2.slide == 0)) {
testCloseCombat(i, _local6);
} else {
_local2.attack = 0;
tapAttack = false;
}
}
testSlide(i, _local6);
if (_local2.slide) {
_local5 = _local2.slideX;
_local4 = _local2.slideY;
}
if ((_local2.fire <= 1) && (_local2.wound == 0)) {
_local2._x = _local2._x + _local5;
if (!_local2.ID_canJump) {
_local2._y = _local2._y + _local4;
}
}
if (!_local2.ID_noKiBlast) {
if (((((_local2.fire == 2) && (_local2.ki > 0)) && (_local2.defense == 0)) && (_local2.fire != 3)) && (_local2.slide == 0)) {
_local2.waitSomeFrame = 0;
if ((_local2.power > 0) || (_local6 >= _DFIREBALL)) {
soundKmeaload(i);
_local2.fire = 2;
_local2.sprite = 15;
if (_local2.ki >= 10) {
_local2.power = _local2.power + 10;
_local2.ki = _local2.ki - 10;
} else {
_local2.power = _local2.power + _local2.ki;
_local2.ki = 0;
}
if (_local2.ki == 0) {
if (_local2.ID_absorbKi) {
_local2.lvl = 1;
_local2.p.cible._y = ((-_local2.lvl) * 20) + 10;
}
_local2.fillKiTimer = 0;
}
}
}
}
}
testTransform(i);
testWaitSomeFrame(i);
testLimits(i);
};
initTimerIA = function (i, t) {
var _local2 = GC[("p" + i) + _root["team" + i][0]];
switch (t) {
case "h" :
break;
case "v" :
break;
case "aura" :
_local2.COMtimeraura = 0;
_local2.COMtimerauramax = random(10) + 5;
break;
case "attack" :
_local2.COMtimerattack = 0;
_local2.COMtimerattackmax = random(10) + 5;
break;
case "special" :
_local2.COMspecial = random(6);
_local2.COMtimerspecial = 0;
_local2.COMtimerspecialmax = random(10 * (1 + _local2.mind));
}
};
counterAttackIA = function (i, j) {
var _local6 = GC[("p" + i) + _root["team" + i][0]];
var _local2 = GC[("p" + (3 - i)) + _root["team" + (3 - i)][0]];
var _local3 = (("p" + i) + "ball") + j;
var _local5 = calculateDistance(_local6, _local2);
if (_local2.ID_absorbKi && (_local2.ki < (100 * _local2.mind))) {
_local2.defense = 1;
} else if (_local5 < _DPROTECTFAR) {
_local2.defense = 1;
} else if (((_local5 > _DCOUNTERFIREBALL) && (_local6.fire == 3)) && (_local2.ki >= 100)) {
_local2.defense = 0;
_local2.COMspecial = 4;
_local2.COMtimerspecial = 0;
_local2.COMtimerspecialmax = 10;
} else {
switch (_local2.COMspecial) {
case 2 :
case 3 :
_local2.COMspecial = 0;
}
_local2.COMtimerh = (_local2.COMtimerv = 0);
if (_local2._x > _local3._x) {
_local2.COMmoveh = 1;
}
if (_local2._x < _local3._x) {
_local2.COMmoveh = 2;
}
if (_local2._y > _local3._y) {
_local2.COMmovev = 1;
}
if (_local2._y < _local3._y) {
_local2.COMmovev = 2;
}
}
};
controlComputer = function (i) {
var _local2 = GC[("p" + i) + _root["team" + i][0]];
var _local7 = GC[("p" + (3 - i)) + _root["team" + (3 - i)][0]];
var _local6 = calculateDistance(_local2, _local7);
testAlpha(i);
_local2.fast = 0;
if (_local2.wound) {
testWounds(i);
testID(i, false);
} else {
if ((((_local7.attack > 0) && (_local6 < _DPROTECTCLOSE)) && (_local2.fire <= 1)) && (_local2.defense == 0)) {
_local2.fire = 0;
var _local8 = random(4);
if (!(_local8 === 3)) {
_local2.defense = 0;
} else {
_local2.defense = 1;
}
}
if ((_local2.ID_fillKi || (_local2.ID_absorbKi)) || (_local2.ID_noKi)) {
if (((_local2.defense == 1) && (_local2.fire <= 1)) && (_local2.waitSomeFrame == 0)) {
_local2.sprite = 7;
_local2.COMtimeraura++;
if (_local2.COMtimeraura == _local2.COMtimerauramax) {
_local2.defense = 0;
initTimerIA(i, "aura");
}
}
} else if (((_local2.fire <= 1) && (_local2.fast == 0)) && (_local2.waitSomeFrame == 0)) {
if (((_local2.COMspecial == 2) || (_local2.COMspecial == 3)) || (_local2.defense == 1)) {
_local2.fire = 0;
if (_local2.ki < _local2.kimax) {
_local2.defense = 1;
_local2.sprite = 7;
_local2.COMtimeraura++;
if (_local2.COMtimeraura == _local2.COMtimerauramax) {
initTimerIA(i, "aura");
}
soundAura(i);
if (!_local2.fly) {
createDust(_local2._x, _local2._y + 18);
}
_local2.auraspr._alpha = 80;
_local2.ki = _local2.ki + 2;
} else {
_local2.defense = 0;
initTimerIA(i, "aura");
}
}
}
testID(i, true);
if (((_local2.fire <= 1) && (_local2.defense == 0)) && (_local2.slide == 0)) {
_local2.COMtimerh++;
if (_local2.COMtimerh >= _local2.COMtimerhmax) {
_local2.fire = 0;
_local2.sprite = 1;
_local2.COMmoveh = random(3);
_local2.COMtimerh = 0;
_local2.COMtimerhmax = random(10) + 5;
_local2.COMfasth = random(3);
_local2.fast = 0;
}
_local2.COMtimerv++;
if (_local2.COMtimerv >= _local2.COMtimervmax) {
_local2.fire = 0;
_local2.sprite = 1;
_local2.COMmovev = random(3);
_local2.COMtimerv = 0;
_local2.COMtimervmax = random(10) + 5;
_local2.COMfastv = random(3);
_local2.fast = 0;
if (_local2.ID_canJump) {
_local2.canJump = true;
}
}
}
var _local4 = 0;
var _local5 = 0;
if ((((_local2.COMmoveh == 1) && (_local2.fire <= 1)) && (_local2.defense == 0)) && (_local2.slide == 0)) {
_local2.fire = 0;
if (_local2.COMfasth == 2) {
_local2.fast = 1;
_local2.fly = 1;
_local2._alpha = 20;
_local4 = 20 + _local2.speed;
} else {
_local4 = 6 + _local2.speed;
}
movingRight(i);
}
if ((((_local2.COMmoveh == 2) && (_local2.fire <= 1)) && (_local2.defense == 0)) && (_local2.slide == 0)) {
_local2.fire = 0;
if (_local2.COMfasth == 2) {
_local2.fast = 1;
_local2.fly = 1;
_local2._alpha = 20;
_local4 = -20 - _local2.speed;
} else {
_local4 = -6 + _local2.speed;
}
movingLeft(i);
}
if (_local2.ID_canJump) {
if ((((_local2.COMmovev == 1) && (_local2.fire <= 1)) && (_local2.defense == 0)) && (_local2.slide == 0)) {
if (Math.random() < 0.2) {
if (_local2.canJump) {
_local2.canJump = false;
switch (_local2.jump) {
case 0 :
fxJump(_local2._x, _local2._y + 16, 2);
_local2.jumpSpeed = _JUMPSTART;
_local2.jump = 1;
_local2.fly = 1;
break;
case 1 :
fxJump(_local2._x, _local2._y + 16, 2);
_local2.jumpSpeed = _JUMPSTART;
_local2.jump = 2;
}
}
}
} else {
_local2.canJump = true;
}
if (_local2.jump) {
jump(i);
}
} else if ((((_local2.COMmovev == 1) && (_local2.fire <= 1)) && (_local2.defense == 0)) && (_local2.slide == 0)) {
_local2.fire = 0;
_local2.fly = 1;
_local2.sprite = 11;
if ((_local2.COMfastv == 2) && (_local2.ki > 0)) {
_local2.fast = 1;
_local2._alpha = 20;
_local5 = -16 - _local2.speed;
} else {
_local5 = -6 - _local2.speed;
}
}
if ((((_local2.COMmovev == 2) && (_local2.fire <= 1)) && (_local2.defense == 0)) && (_local2.slide == 0)) {
_local2.fire = 0;
if (_local2.fly == 1) {
_local2.sprite = 11;
if ((_local2.COMfastv == 2) && (_local2.ki > 0)) {
_local2.fast = 1;
_local2._alpha = 20;
_local5 = 16 + _local2.speed;
} else {
_local5 = 6 + _local2.speed;
}
}
}
if (((((!_local2.wound) && (_local6 < 60)) && (_local2.fast == 1)) && (_local2.slide == 0)) && (_local4 != 0)) {
startSlide(i, _local4, _local5);
} else {
testSlide(i, _local6);
if (_local2.slide) {
_local4 = _local2.slideX;
_local5 = _local2.slideY;
}
}
_local2._x = _local2._x + _local4;
_local2._y = _local2._y + _local5;
if (((((!_local2.wound) && (_local2.fire <= 1)) && (!_local2.defense)) && (!_local2.power)) && (!_local2.slide)) {
if (_local6 < _DATTACK) {
if (_local2.COMtimerattack == _local2.COMtimerattackmax) {
initTimerIA(i, "attack");
}
_local2.COMtimerattack++;
testCloseCombat(i, _local6);
}
} else {
_local2.attack = 0;
}
if (!_local2.ID_noKiBlast) {
if ((_local2.fire != 3) && (!_local2.slide)) {
if ((_local2.power > 0) || (_local6 >= _DFIREBALL)) {
_local2.COMtimerspecial++;
switch (_local2.COMspecial) {
case 4 :
case 5 :
if (!((_local2.ki > 0) && (_local2.defense == 0))) {
break;
}
_local2.waitSomeFrame = 0;
soundKmeaload(i);
_local2.fire = 2;
_local2.sprite = 15;
if (_local2.ki >= 10) {
_local2.power = _local2.power + 10;
_local2.ki = _local2.ki - 10;
} else {
_local2.power = _local2.power + _local2.ki;
_local2.ki = 0;
}
if (_local2.ki != 0) {
break;
}
if (_local2.ID_absorbKi) {
_local2.lvl = 1;
_local2.p.cible._y = ((-_local2.lvl) * 20) + 10;
}
_local2.fillKiTimer = 0;
_local2.COMtimerspecial = _local2.COMtimerspecialmax;
}
if (((_local2.fire != 3) && (!_local2.slide)) && (_local2.COMtimerspecial >= _local2.COMtimerspecialmax)) {
if (_local2.power) {
testFireball(i);
}
initTimerIA(i, "special");
}
}
}
}
}
testTransform(i);
testWaitSomeFrame(i);
testLimits(i);
};
s_sound = new Sound();
s_sound2 = new Sound();
s_music = new Sound();
soundPlayer = function (sound, hp) {
if (dbzSound) {
if (!(hp === 2)) {
s_sound.attachSound(sound);
s_sound.start();
} else {
s_sound2.attachSound(sound);
s_sound2.start();
}
}
};
s_sound.onSoundComplete = function () {
ts1_punch1 = 0;
ts1_punch2 = 0;
ts1_aura = 0;
ts1_kmeaload = 0;
};
s_sound2.onSoundComplete = function () {
ts2_punch1 = 0;
ts2_punch2 = 0;
ts2_aura = 0;
ts2_kmeaload = 0;
};
mbat = (mbats = undefined);
s_music.onSoundComplete = function () {
if (mbat == undefined) {
if (gameMode == "jukebox") {
zoom = 100;
musicPlaying = false;
eraseMusicInfo();
}
} else {
while (mbat == mbats) {
mbat = random(musicBattleList.length);
}
mbats = mbat;
musicPlayer(musicBattleList[mbats]);
}
};
musicPlayer = function (music) {
if (dbzMusic) {
s_music.stop();
s_music.attachSound(music);
s_music.start();
}
};
soundPunch = function (i) {
if (dbzSound) {
switch (_root[("ts" + i) + "_punch1"]) {
case 0 :
_root[("ts" + i) + "_punch1"] = 1;
soundPlayer("punch1", i);
break;
case 1 :
if (_root[("ts" + i) + "_punch2"]) {
break;
}
_root[("ts" + i) + "_punch2"] = 1;
soundPlayer("punch2", i);
}
}
};
soundKmeaload = function (i) {
if (dbzSound) {
if (!_root[("ts" + i) + "_kmeaload"]) {
_root[("ts" + i) + "_kmeaload"] = 1;
soundPlayer("kmeaload", i);
}
}
};
soundAura = function (i) {
var _local3 = 3 - i;
if (dbzSound) {
if ((!_root[("ts" + i) + "_aura"]) && (!_root[("ts" + _local3) + "_aura"])) {
_root[("ts" + i) + "_aura"] = 1;
soundPlayer("s_aura", i);
}
}
};
screenUpdate = function () {
_quality = "HIGH";
panelUpdate.btn1.onRollOver = function () {
soundPlayer("s_rollover");
};
panelUpdate.btn2.onRollOver = function () {
soundPlayer("s_rollover");
};
panelUpdate.btn1.onPress = function () {
getURL ("http://www.txori.com/", "_blank");
};
panelUpdate.btn2.onPress = function () {
soundPlayer("s_cancel");
switchScreen("update", "disclaimer");
};
};
screenDisclaimer = function () {
Mouse.show();
wish.useHandCursor = false;
wish.onPress = function () {
if (!cheatcode) {
cheatcode = true;
wish.play();
}
};
testCheat = function () {
if (cheatcode) {
switchScreen("disclaimer", "shenron");
} else {
switchScreen("disclaimer", "title");
}
};
waitSomeTime = setInterval(testCheat, 3000);
};
screenTitle = function () {
_quality = "HIGH";
Mouse.show();
mbat = (mbats = undefined);
musicPlayer("m_intro");
gameMode = "";
mainMenu.titles = ["tutorial"];
mainMenu.subtitles = ["Learn the game basics"];
if (dbzUnlockStory || (cheatcode)) {
mainMenu.titles.push("story");
mainMenu.subtitles.push("Relive the whole story of Dragon Ball Z");
}
if (dbzUnlockVS || (cheatcode)) {
mainMenu.titles.push("versus");
mainMenu.subtitles.push("Battle against the computer or a friend");
}
if (dbzUnlockBudokai || (cheatcode)) {
mainMenu.titles.push("budokai");
mainMenu.subtitles.push("Take part in the World Martial Arts Tournament");
}
if (dbzUnlockTagTeam || (cheatcode)) {
mainMenu.titles.push("tagteam");
mainMenu.subtitles.push("Team up against adversity");
}
if (dbzUnlockJanken || (cheatcode)) {
mainMenu.titles.push("janken");
mainMenu.subtitles.push("Play the Rock-Paper-Scissors mini-game");
}
if (dbzUnlockJukebox || (cheatcode)) {
mainMenu.titles.push("jukebox");
mainMenu.subtitles.push("Listen to the awesome 8-bits music");
}
if (dbzUnlockDatabase || (cheatcode)) {
mainMenu.titles.push("database");
mainMenu.subtitles.push("Take a look at your unlocked fighters");
}
mainMenu.titles.push("setup");
mainMenu.subtitles.push("Change the game settings");
mainMenu.titles.push("credits");
mainMenu.subtitles.push("Discover who made this game");
if (dbzMainMenu > (mainMenu.titles.length - 1)) {
dbzMainMenu = 0;
}
mainMenuUpdate = function () {
title.gotoAndStop(mainMenu.titles[dbzMainMenu]);
help.text = mainMenu.subtitles[dbzMainMenu];
};
createMainMenu = function (coverMax) {
var maxSlide = 100;
var spacing = 84;
var centerDistance = 36;
var deleteMinDistance = ((-3 * spacing) - centerDistance);
var deleteMaxDistance = ((3 * spacing) + centerDistance);
var _local3 = 0;
while (_local3 < coverMax) {
var _local2 = mainMenu.createEmptyMovieClip("cover" + _local3, _local3);
_local2.attachMovie("cover", "clip", 1);
_local2.clip.gotoAndStop(mainMenu.titles[_local3]);
_local2._xscale = (_local2._yscale = 80);
_local2._alpha = 0;
_local2.id = _local3;
_local2.onPress = function () {
if (this._visible) {
var _local2 = this.id;
if (_local2 < 0) {
_local2 = _local2 + (coverMax * (1 - Math.floor(_local2 / coverMax)));
}
dbzMainMenu = _local2 % coverMax;
if (mainMenu.current == this.id) {
mainMenuOnPress();
} else {
soundPlayer("s_select");
mainMenu.current = this.id;
mainMenuUpdate();
}
}
};
_local2.onEnterFrame = function () {
if ((this._x > 265) || (this._x < -265)) {
this._visible = false;
} else {
this._visible = true;
}
if (this._x > deleteMaxDistance) {
this.id = this.id - coverMax;
this._x = deleteMinDistance;
}
if (this._x < deleteMinDistance) {
this.id = this.id + coverMax;
this._x = deleteMaxDistance;
}
if (this.id == mainMenu.current) {
if (this._xscale < 80) {
this._xscale = this._xscale + 10;
this._yscale = this._yscale + 10;
}
if (this._alpha != 100) {
this._alpha = this._alpha + Math.round((100 - this._alpha) / 2);
}
this.x = (this.id - mainMenu.current) * spacing;
} else {
if (this._xscale > 40) {
this._xscale = this._xscale - 10;
this._yscale = this._yscale - 10;
}
if (this._alpha != 40) {
this._alpha = this._alpha + Math.round((40 - this._alpha) / 2);
}
if (this.id > mainMenu.current) {
this.x = ((this.id - mainMenu.current) * spacing) + centerDistance;
} else if (this.id < mainMenu.current) {
this.x = ((this.id - mainMenu.current) * spacing) - centerDistance;
}
}
this._x = this._x - Math.min(Math.max((this._x - this.x) / 2, -maxSlide), maxSlide);
};
_local3++;
}
mainMenuUpdate();
};
mainMenu.current = dbzMainMenu;
createMainMenu(mainMenu.titles.length);
title.onPress = function () {
mainMenuOnPress();
};
mainMenuOnPress = function () {
soundPlayer("s_ok");
switch (mainMenu.titles[dbzMainMenu]) {
case "tutorial" :
k1.com = 0;
k2.com = 1;
gameMode = "tutorial";
switchScreen("title", gameMode);
return;
case "story" :
k1.com = 0;
k2.com = 1;
gameMode = "story";
switchScreen("title", gameMode);
return;
case "oav" :
k1.com = 0;
k2.com = 1;
gameMode = "oav";
switchScreen("title", "story", gameMode);
return;
case "versus" :
k1.com = 0;
k2.com = 0;
gameMode = "versus";
switchScreen("title", gameMode);
return;
case "tagteam" :
k1.com = 0;
k2.com = 0;
gameMode = "tagteam";
switchScreen("title", gameMode);
return;
case "budokai" :
gameMode = "budokai";
switchScreen("title", gameMode);
return;
case "janken" :
k1.com = 0;
k2.com = 0;
gameMode = "janken";
switchScreen("title", gameMode);
return;
case "jukebox" :
gameMode = "jukebox";
switchScreen("title", "jukebox");
return;
case "shenron" :
switchScreen("title", "shenron");
return;
case "database" :
gameMode = "database";
switchScreen("title", "database");
return;
case "setup" :
switchScreen("title", "setup");
return;
case "credits" :
switchScreen("title", "credits");
}
};
speedo._alpha = 0;
onEnterFrame = function () {
if (speedo._alpha < 50) {
speedo._alpha++;
}
speedo._rotation = speedo._rotation + 4;
};
};
screenSetup = function () {
keySelect = 0;
keyWait = false;
title.gotoAndStop("setup");
ecouteurSetup = new Object();
ecouteurSetup.onKeyDown = function () {
if (keyWait) {
soundPlayer("s_select");
keyWait = false;
panelKey._visible = false;
var _local1 = Key.getCode();
if ((_local1 < 112) || (_local1 > 126)) {
switch (_local1) {
case 37 :
keyString = "<";
break;
case 38 :
keyString = "^";
break;
case 39 :
keyString = ">";
break;
case 40 :
keyString = "v";
break;
case 96 :
keyString = "0";
break;
case 97 :
keyString = "1";
break;
case 98 :
keyString = "2";
break;
case 99 :
keyString = "3";
break;
case 100 :
keyString = "4";
break;
case 101 :
keyString = "5";
break;
case 102 :
keyString = "6";
break;
case 103 :
keyString = "7";
break;
case 104 :
keyString = "8";
break;
case 105 :
keyString = "9";
break;
case 106 :
keyString = "*";
break;
case 107 :
keyString = "+";
break;
case 109 :
keyString = "-";
break;
case 110 :
keyString = ".";
break;
case 111 :
keyString = "/";
break;
default :
keyString = String.fromCharCode(_local1);
}
setupKey["btn" + keySelect].txt.htmlText = keyString;
switch (keySelect) {
case 1 :
k1.k_up = _local1;
k1.sk_up = keyString;
break;
case 2 :
k2.k_up = _local1;
k2.sk_up = keyString;
break;
case 3 :
k1.k_down = _local1;
k1.sk_down = keyString;
break;
case 4 :
k2.k_down = _local1;
k2.sk_down = keyString;
break;
case 5 :
k1.k_left = _local1;
k1.sk_left = keyString;
break;
case 6 :
k2.k_left = _local1;
k2.sk_left = keyString;
break;
case 7 :
k1.k_right = _local1;
k1.sk_right = keyString;
break;
case 8 :
k2.k_right = _local1;
k2.sk_right = keyString;
break;
case 9 :
k1.k_attack = _local1;
k1.sk_attack = keyString;
break;
case 10 :
k2.k_attack = _local1;
k2.sk_attack = keyString;
break;
case 11 :
k1.k_defense = _local1;
k1.sk_defense = keyString;
break;
case 12 :
k2.k_defense = _local1;
k2.sk_defense = keyString;
}
}
}
};
Key.addListener(ecouteurSetup);
switchDifficulty = function () {
switch (dbzDifficulty) {
case -1 :
btnDifficulty.txt.text = "easy";
return;
case 0 :
btnDifficulty.txt.text = "normal";
return;
case 1 :
btnDifficulty.txt.text = "hard";
}
};
switchDifficulty();
btnDifficulty.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btnDifficulty.btn.onPress = function () {
soundPlayer("s_select");
dbzDifficulty = dbzDifficulty + 1;
if (dbzDifficulty == 2) {
dbzDifficulty = -1;
}
switchDifficulty();
};
btnDelete.txt.text = "delete save file";
btnDelete.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btnDelete.btn.onPress = function () {
soundPlayer("s_select");
panelDelete._visible = true;
};
panelDelete._visible = false;
panelDelete.btn1.onRollOver = function () {
soundPlayer("s_rollover");
};
panelDelete.btn1.onPress = function () {
soundPlayer("s_ok");
deleteCookie();
switchScreen("setup", "setup");
panelDelete._visible = false;
};
panelDelete.btn2.onRollOver = function () {
soundPlayer("s_rollover");
};
panelDelete.btn2.onPress = function () {
soundPlayer("s_cancel");
panelDelete._visible = false;
};
panelDelete.back.useHandCursor = false;
panelDelete.back.onPress = function () {
};
panelKey._visible = false;
panelKey.back.useHandCursor = false;
panelKey.back.onPress = function () {
};
btnExit.onRollOver = function () {
soundPlayer("s_rollover");
};
btnExit.onPress = function () {
if (!keyWait) {
soundPlayer("s_cancel");
switchScreen("setup", "title");
}
};
btnTouch._visible = true;
btnTouch.txt.text = "touchscreen";
btnTouch.check._visible = dbzTouch;
btnTouch.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btnTouch.btn.onPress = function () {
soundPlayer("s_select");
if (dbzTouch) {
dbzTouch = (btnTouch.check._visible = false);
} else {
dbzTouch = (btnTouch.check._visible = true);
}
};
btnSound.txt.text = "sound";
btnSound.check._visible = dbzSound;
btnSound.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btnSound.btn.onPress = function () {
if (dbzSound) {
dbzSound = (btnSound.check._visible = false);
} else {
dbzSound = (btnSound.check._visible = true);
soundPlayer("s_select");
}
};
btnMusic.txt.text = "music";
btnMusic.check._visible = dbzMusic;
btnMusic.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btnMusic.btn.onPress = function () {
if (dbzMusic) {
s_music.stop();
dbzMusic = (btnMusic.check._visible = false);
} else {
dbzMusic = (btnMusic.check._visible = true);
}
soundPlayer("s_select");
};
btnFullscreen._visible = false;
btnFullscreen.txt.text = "fullscreen";
btnFullscreen.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btnFullscreen.btn.onPress = function () {
Stage.displayState = ((Stage.displayState == "normal") ? "FULL_SCREEN_INTERACTIVE" : "normal");
soundPlayer("s_select");
};
var clicBall = 0;
var fps = 0;
var systemTest = undefined;
info.text = gameVersion;
title.useHandCursor = false;
title.onPress = function () {
clicBall++;
if (clicBall == 5) {
onEnterFrame = function () {
fps++;
};
systemTest = setInterval(systemResults, 1000);
}
};
systemResults = function () {
delete onEnterFrame;
clearInterval(systemTest);
if (gameUpdate) {
info.text = info.text + " x";
} else {
info.text = info.text + " ok";
}
info.text = info.text + (" - " + gameID);
if (gameAd) {
info.text = info.text + " ok";
} else {
info.text = info.text + " x";
}
if (gameEmbed) {
info.text = info.text + " - embed";
}
info.text = info.text + ((" - " + fps) + " fps");
};
initMenuSetup = function (i) {
var btnTemp = setupKey["btn" + i];
btnTemp.btn.onRollOver = function () {
if (!keyWait) {
soundPlayer("s_rollover");
}
};
btnTemp.btn.onPress = function () {
if (!keyWait) {
soundPlayer("s_select");
keySelect = i;
btnTemp.txt.htmlText = "...";
keyWait = true;
var _local2;
var _local1;
switch (keySelect) {
case 1 :
case 3 :
case 5 :
case 7 :
case 9 :
case 11 :
_local2 = 1;
break;
case 2 :
case 4 :
case 6 :
case 8 :
case 10 :
case 12 :
_local2 = 2;
}
switch (keySelect) {
case 1 :
case 2 :
_local1 = "up";
break;
case 3 :
case 4 :
_local1 = "down";
break;
case 5 :
case 6 :
_local1 = "left";
break;
case 7 :
case 8 :
_local1 = "right";
break;
case 9 :
case 10 :
_local1 = "attack";
break;
case 11 :
case 12 :
_local1 = "defense";
}
panelKey._visible = true;
panelKey.txt.text = (("Player " + _local2) + ", press a key for ") + _local1;
}
};
};
var i = 1;
while (i <= 12) {
initMenuSetup(i);
i++;
}
setupKey.btn1.txt.htmlText = k1.sk_up;
setupKey.btn2.txt.htmlText = k2.sk_up;
setupKey.btn3.txt.htmlText = k1.sk_down;
setupKey.btn4.txt.htmlText = k2.sk_down;
setupKey.btn5.txt.htmlText = k1.sk_left;
setupKey.btn6.txt.htmlText = k2.sk_left;
setupKey.btn7.txt.htmlText = k1.sk_right;
setupKey.btn8.txt.htmlText = k2.sk_right;
setupKey.btn9.txt.htmlText = k1.sk_attack;
setupKey.btn10.txt.htmlText = k2.sk_attack;
setupKey.btn11.txt.htmlText = k1.sk_defense;
setupKey.btn12.txt.htmlText = k2.sk_defense;
};
loadFighter = function (n) {
if (GC.p10.p) {
GC.p10.p.removeMovieClip();
}
GC.p10.attachMovie("fighter", "p", 2);
team1 = [0];
if (gameVersion) {
if (cheatcode) {
GC.p10.p.cible.attachMovie(fighterList[n][0], "p", 1);
GC.p10.lvlMax = fighterList[n].length - 1;
} else {
GC.p10.p.cible.attachMovie(fighterList[dbzFighterList[n]][0], "p", 1);
GC.p10.lvlMax = fighterList[dbzFighterList[n]].length - 1;
}
} else if (_url.substring(11, 16) == "txori") {
GC.p10.p.cible.loadMovie(("http://www.txori.com/data/images/dbz/fighters/" + fighterList[n][0]) + ".png");
GC.p10.lvlMax = fighterList[n].length - 1;
}
GC.p10.choice = n;
GC.p10.lvl = 1;
GC.p10.sprite = 1;
GC.p10.walk = 1;
GC.p10.attack = 1;
GC.p10.fireanim = 1;
GC.p10.hurt = 1;
GC.p10.flyanim = 1;
btn1.txt.text = 1;
btn2.txt.text = 2;
btn3.txt.text = 3;
btn4.txt.text = 4;
btn5.txt.text = 5;
btn2._visible = (btn3._visible = (btn4._visible = (btn5._visible = false)));
if (GC.p10.lvlMax > 1) {
btn2._visible = true;
}
if (GC.p10.lvlMax > 2) {
btn3._visible = true;
}
if (GC.p10.lvlMax > 3) {
btn4._visible = true;
}
if (GC.p10.lvlMax > 4) {
btn5._visible = true;
}
updatePowerStats();
};
updatePowerStats = function () {
var _local2;
var _local4;
var _local3;
if ((!gameVersion) || (cheatcode)) {
_local2 = fighterList[GC.p10.choice][GC.p10.lvl][_STRENGTH];
_local4 = fighterList[GC.p10.choice][GC.p10.lvl][_SPEED];
_local3 = fighterList[GC.p10.choice][GC.p10.lvl][_MIND];
p1Face.gotoAndStop(fighterList[GC.p10.choice][0]);
} else {
_local2 = fighterList[dbzFighterList[GC.p10.choice]][GC.p10.lvl][_STRENGTH];
_local4 = fighterList[dbzFighterList[GC.p10.choice]][GC.p10.lvl][_SPEED];
_local3 = fighterList[dbzFighterList[GC.p10.choice]][GC.p10.lvl][_MIND];
p1Face.gotoAndStop(fighterList[dbzFighterList[GC.p10.choice]][0]);
}
strength.gotoAndStop(_local2);
speed.gotoAndStop(_local4);
mind.gotoAndStop(_local3);
p1Face.pface.gotoAndStop(GC.p10.lvl);
line2._x = _root["btn" + GC.p10.lvl]._x + 10;
};
hurtCycle = function (i) {
var _local1 = GC[("p" + i) + "0"];
_local1.hurt++;
switch (_local1.hurt) {
case 1 :
case 2 :
case 3 :
case 4 :
case 5 :
_local1.sprite = 1;
break;
case 30 :
_local1.hurt = 1;
case 6 :
case 7 :
case 8 :
case 9 :
case 10 :
case 26 :
case 27 :
case 28 :
case 29 :
_local1.sprite = 8;
break;
case 11 :
case 12 :
case 13 :
case 14 :
case 15 :
case 21 :
case 22 :
case 23 :
case 24 :
case 25 :
_local1.sprite = 9;
break;
case 16 :
case 17 :
case 18 :
case 19 :
case 20 :
_local1.sprite = 10;
}
};
fireballCycle = function (i) {
var _local1 = GC[("p" + i) + "0"];
_local1.fireanim++;
switch (_local1.fireanim) {
default :
_local1.sprite = 15;
break;
case 30 :
_local1.fireanim = 1;
case 26 :
case 27 :
case 28 :
case 29 :
_local1.sprite = 18;
break;
case 6 :
case 7 :
case 8 :
case 9 :
case 10 :
_local1.sprite = 16;
break;
case 16 :
case 17 :
case 18 :
case 19 :
case 20 :
_local1.sprite = 17;
}
};
flyCycle = function (i) {
var _local1 = GC[("p" + i) + "0"];
_local1.flyanim++;
switch (_local1.flyanim) {
default :
_local1.sprite = 1;
break;
case 6 :
case 7 :
case 8 :
case 9 :
case 10 :
_local1.sprite = 5;
break;
case 20 :
_local1.flyanim = 1;
case 16 :
case 17 :
case 18 :
case 19 :
case 20 :
_local1.sprite = 6;
}
};
initComboList = function () {
var viewerList = new Array();
switch (gameMode) {
case "database" :
if (gameVersion) {
if (cheatcode) {
var i = 0;
while (i < fighterList.length) {
viewerList.push(fighterList[i][1][0]);
i++;
}
} else {
var i = 0;
while (i < dbzFighterList.length) {
viewerList.push(fighterList[dbzFighterList[i]][1][0]);
i++;
}
}
} else {
var i = 0;
while (i < fighterList.length) {
viewerList.push(fighterList[i][1][0]);
i++;
}
}
break;
case "jukebox" :
var i = 0;
for(;;){
if (i >= musicList.length) {
break;
}
viewerList.push(musicList[i][0]);
i++;
};
}
dropbox.etat = "close";
dropbox.nbBox = viewerList.length;
dropbox.maxSize = 8;
dropbox.box = Math.min(dropbox.maxSize, dropbox.nbBox);
dropbox.yClose = dropbox.container._y;
dropbox.container._y = dropbox.container._y - 2;
dropbox.boxHeight = 20;
dropbox.yOpen = dropbox.yClose + (dropbox.boxHeight * dropbox.box);
dropbox.pName.text = viewerList[0];
dropbox.yPosMax = (-dropbox.boxHeight) * (dropbox.maxSize - 1);
dropbox.yPosMin = (-dropbox.boxHeight) * (dropbox.nbBox - 1);
dropbox.yPos = dropbox.yPosMax;
dropbox.pos = 0;
dropbox.liftUp = -140;
dropbox.liftDown = -40;
dropbox.drag = false;
dropbox.yMouse = _ymouse;
dropbox.i = 0;
dropbox.fleche.gotoAndStop(1);
if (dropbox.nbBox > dropbox.maxSize) {
liftBox = function () {
dropbox.yPos = (-dropbox.boxHeight) * ((dropbox.maxSize - 1) + dropbox.pos);
i = 0;
while (i < dropbox.nbBox) {
var _local1 = dropbox.container["newBox" + i];
_local1._y = dropbox.yPos + (dropbox.boxHeight * i);
_local1._visible = true;
if (_local1._y > 0) {
_local1._visible = false;
}
i++;
}
if (!dropbox.drag) {
dropbox.liftbar.lift._y = dropbox.liftUp + ((dropbox.pos * (dropbox.liftDown - dropbox.liftUp)) / (dropbox.nbBox - dropbox.maxSize));
}
};
var _local5 = new Object();
_local5.onMouseWheel = function (delta) {
if (dropbox.etat == "open") {
delta = delta / Math.abs(delta);
dropbox.pos = dropbox.pos - delta;
if (dropbox.pos < 0) {
dropbox.pos = 0;
}
if (dropbox.pos > (dropbox.nbBox - dropbox.maxSize)) {
dropbox.pos = dropbox.nbBox - dropbox.maxSize;
}
liftBox();
}
};
Mouse.addListener(_local5);
dropbox.liftbar.liftBack.onPress = function () {
if (dropbox.etat == "open") {
dropbox.liftbar.lift._y = ((_ymouse - dropbox._y) - (dropbox.maxSize * dropbox.boxHeight)) - 10;
dropbox.liftbar.lift.startDrag(false, 0, dropbox.liftUp, 0, dropbox.liftDown);
dropbox.liftbar.lift.gotoAndStop(2);
dropbox.drag = true;
}
};
dropbox.liftbar.liftup._y = -dropbox.yOpen;
dropbox.liftbar.liftup.onPress = function () {
if ((dropbox.etat == "open") && (dropbox.pos > 0)) {
dropbox.pos--;
liftBox();
}
};
dropbox.liftbar.liftdown.onPress = function () {
if ((dropbox.etat == "open") && (dropbox.pos < (dropbox.nbBox - dropbox.maxSize))) {
dropbox.pos++;
liftBox();
}
};
dropbox.liftbar.lift.gotoAndStop(1);
dropbox.liftbar.lift.onRollOver = function () {
if (dropbox.etat == "open") {
dropbox.liftbar.lift.gotoAndStop(2);
}
};
dropbox.liftbar.lift.onRollOut = function () {
if (dropbox.etat == "open") {
dropbox.liftbar.lift.gotoAndStop(1);
}
};
dropbox.liftbar.lift.onPress = function () {
if (dropbox.etat == "open") {
dropbox.liftbar.lift.startDrag(false, 0, dropbox.liftUp, 0, dropbox.liftDown);
dropbox.liftbar.lift.gotoAndStop(2);
dropbox.drag = true;
}
};
dropbox.liftbar.liftBack.onRelease = (dropbox.liftbar.liftBack.onReleaseOutside = (dropbox.liftbar.lift.onRelease = (dropbox.liftbar.lift.onReleaseOutside = function () {
if (dropbox.etat == "open") {
dropbox.liftbar.lift.stopDrag();
dropbox.liftbar.lift.gotoAndStop(1);
dropbox.drag = false;
dropbox.liftbar.lift._y = dropbox.liftUp + ((dropbox.pos * (dropbox.liftDown - dropbox.liftUp)) / (dropbox.nbBox - dropbox.maxSize));
}
})));
} else {
dropbox.liftbar._visible = false;
}
i = 0;
while (i < dropbox.nbBox) {
var _local3 = (dropbox.nbBox - i) - 1;
var _local2 = dropbox.container.createEmptyMovieClip("newBox" + _local3, i);
_local2.attachMovie("newbox", "clip", 1);
_local2._x = 0;
if (dropbox.nbBox > dropbox.maxSize) {
_local2._y = dropbox.yPos + (dropbox.boxHeight * _local3);
} else {
_local2._y = (dropbox.yPos + (dropbox.boxHeight * _local3)) - (dropbox.boxHeight * (dropbox.nbBox - dropbox.maxSize));
}
_local2.clip.gotoAndStop("out");
_local2.i = _local3;
_local2.clip.pName.text = viewerList[_local3];
if (_local2._y > 0) {
_local2._visible = false;
}
_local2.onRollOver = function () {
if (dropbox.etat == "open") {
this.clip.gotoAndStop("over");
}
};
_local2.onRollOut = function () {
if (dropbox.etat == "open") {
this.clip.gotoAndStop("out");
}
};
_local2.onPress = function () {
if (dropbox.etat == "open") {
dropbox.etat = "closing";
loadComboData(this.i);
this.clip.gotoAndStop("out");
}
};
i++;
}
loadComboData = function (i) {
if (gameVersion) {
soundPlayer("s_select");
}
dropbox.i = i;
dropbox.pName.text = viewerList[i];
switch (gameMode) {
case "database" :
loadFighter(i);
break;
case "jukebox" :
musicToPlay = i;
}
};
dropbox.button.onRollOut = (dropbox.button.onReleaseOutside = function () {
dropbox.fleche.gotoAndStop(1);
});
dropbox.button.onRollOver = (dropbox.button.onRelease = function () {
dropbox.fleche.gotoAndStop(2);
});
dropbox.button.onPress = function () {
dropbox.fleche.gotoAndStop(3);
switch (dropbox.etat) {
case "close" :
if (gameVersion) {
soundPlayer("s_open");
}
dropbox.fleche._rotation = 180;
dropbox.etat = "opening";
return;
case "open" :
if (gameVersion) {
soundPlayer("s_open");
}
dropbox.fleche._rotation = 0;
dropbox.etat = "closing";
}
};
dropbox.onEnterFrame = function () {
switch (dropbox.etat) {
case "opening" :
if (dropbox.container._y < dropbox.yOpen) {
dropbox.container._y = dropbox.container._y + Math.round((dropbox.yOpen - dropbox.container._y) / 1.2);
} else {
dropbox.etat = "open";
dropbox.container._y = dropbox.yOpen;
}
dropbox.liftbar._y = dropbox.container._y;
break;
case "closing" :
if (dropbox.container._y > dropbox.yClose) {
dropbox.container._y = dropbox.container._y + Math.floor((dropbox.yClose - dropbox.container._y) / 1.2);
} else {
dropbox.etat = "close";
dropbox.container._y = dropbox.yClose - 2;
dropbox.fleche._rotation = 0;
}
dropbox.liftbar._y = dropbox.container._y;
}
if (dropbox.drag) {
if (dropbox.yMouse != _ymouse) {
dropbox.yMouse = _ymouse;
var _local1 = Math.round(((dropbox.liftbar.lift._y - dropbox.liftUp) * (dropbox.nbBox - dropbox.maxSize)) / (dropbox.liftDown - dropbox.liftUp));
dropbox.pos = _local1;
liftBox();
}
}
};
};
screenDatabase = function () {
title.gotoAndStop("database");
loadFighter(0);
GC.p10._alpha = 100;
GC.p10.state = "stand";
GC.p10._xscale = 800;
GC.p10._yscale = 800;
btnZoom.zoomIn = true;
btnZoom.gotoAndStop("minusOut");
btnZoom.onRollOver = function () {
if (gameVersion) {
soundPlayer("s_rollover");
}
if (btnZoom.zoomIn) {
btnZoom.gotoAndStop("minusOver");
} else {
btnZoom.gotoAndStop("plusOver");
}
};
btnZoom.onRollOut = function () {
if (btnZoom.zoomIn) {
btnZoom.gotoAndStop("minusOut");
} else {
btnZoom.gotoAndStop("plusOut");
}
};
btnZoom.onPress = function () {
if (gameVersion) {
soundPlayer("s_select");
}
if (btnZoom.zoomIn) {
btnZoom.zoomIn = false;
GC.p10._xscale = 200;
GC.p10._yscale = 200;
btnZoom.gotoAndStop("plusOver");
} else {
btnZoom.zoomIn = true;
GC.p10._xscale = 800;
GC.p10._yscale = 800;
btnZoom.gotoAndStop("minusOver");
}
};
btnStand.txt.text = "stand";
btnWalk.txt.text = "walk";
btnFly.txt.text = "fly";
btnHurt.txt.text = "hurt";
btnAttack.txt.text = "attack";
btnFireball.txt.text = "KI blast";
btnStand.btn.onPress = function () {
GC.p10.state = "stand";
line1._y = btnStand._y + 10;
if (gameVersion) {
soundPlayer("s_select");
}
};
btnWalk.btn.onPress = function () {
GC.p10.state = "walk";
line1._y = btnWalk._y + 10;
if (gameVersion) {
soundPlayer("s_select");
}
};
btnFly.btn.onPress = function () {
GC.p10.state = "fly";
line1._y = btnFly._y + 10;
if (gameVersion) {
soundPlayer("s_select");
}
};
btnHurt.btn.onPress = function () {
GC.p10.state = "hurt";
line1._y = btnHurt._y + 10;
if (gameVersion) {
soundPlayer("s_select");
}
};
btnAttack.btn.onPress = function () {
GC.p10.state = "attack";
line1._y = btnAttack._y + 10;
if (gameVersion) {
soundPlayer("s_select");
}
};
btnFireball.btn.onPress = function () {
line1._y = btnFireball._y + 10;
GC.p10.state = "fireball";
if (gameVersion) {
soundPlayer("s_select");
}
};
if (gameVersion) {
btnStand.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btnWalk.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btnFly.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btnHurt.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btnAttack.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btnFireball.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
}
btn1.btn.onPress = function () {
GC.p10.lvl = 1;
updatePowerStats();
if (gameVersion) {
soundPlayer("s_select");
}
};
btn2.btn.onPress = function () {
GC.p10.lvl = 2;
updatePowerStats();
if (gameVersion) {
soundPlayer("s_select");
}
};
btn3.btn.onPress = function () {
GC.p10.lvl = 3;
updatePowerStats();
if (gameVersion) {
soundPlayer("s_select");
}
};
btn4.btn.onPress = function () {
GC.p10.lvl = 4;
updatePowerStats();
if (gameVersion) {
soundPlayer("s_select");
}
};
btn5.btn.onPress = function () {
GC.p10.lvl = 5;
updatePowerStats();
if (gameVersion) {
soundPlayer("s_select");
}
};
if (gameVersion) {
btn1.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btn2.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btn3.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btn4.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btn5.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
}
listInit = false;
var pressUP = false;
var pressDOWN = false;
var pressLEFT = false;
var pressRIGHT = false;
var pressSPACE = false;
onEnterFrame = function () {
if (!listInit) {
initComboList();
listInit = true;
}
if (Key.isDown(38)) {
if (!pressUP) {
pressUP = true;
if (gameVersion) {
soundPlayer("s_select");
}
dropbox.i--;
if (dropbox.i < 0) {
dropbox.i = dropbox.nbBox - 1;
}
loadFighterData(dropbox.i);
}
} else {
pressUP = false;
}
if (Key.isDown(40)) {
if (!pressDOWN) {
pressDOWN = true;
if (gameVersion) {
soundPlayer("s_select");
}
dropbox.i++;
if (dropbox.i == dropbox.nbBox) {
dropbox.i = 0;
}
loadFighterData(dropbox.i);
}
} else {
pressDOWN = false;
}
if (Key.isDown(37)) {
if (!pressLEFT) {
pressLEFT = true;
if (gameVersion) {
soundPlayer("s_select");
}
GC.p10.lvl--;
if (GC.p10.lvl < 1) {
GC.p10.lvl = GC.p10.lvlMax;
}
updatePowerStats();
}
} else {
pressLEFT = false;
}
if (Key.isDown(39)) {
if (!pressRIGHT) {
pressRIGHT = true;
if (gameVersion) {
soundPlayer("s_select");
}
GC.p10.lvl++;
if (GC.p10.lvl > GC.p10.lvlMax) {
GC.p10.lvl = 1;
}
updatePowerStats();
}
} else {
pressRIGHT = false;
}
if (Key.isDown(32)) {
if (!pressSPACE) {
pressSPACE = true;
if (gameVersion) {
soundPlayer("s_select");
}
switch (GC.p10.state) {
case "stand" :
GC.p10.state = "walk";
line1._y = btnWalk._y + 10;
break;
case "walk" :
GC.p10.state = "fly";
line1._y = btnFly._y + 10;
break;
case "fly" :
GC.p10.state = "hurt";
line1._y = btnHurt._y + 10;
break;
case "hurt" :
GC.p10.state = "attack";
line1._y = btnAttack._y + 10;
break;
case "attack" :
GC.p10.state = "fireball";
line1._y = btnFireball._y + 10;
break;
case "fireball" :
GC.p10.state = "stand";
line1._y = btnStand._y + 10;
}
}
} else {
pressSPACE = false;
}
switch (GC.p10.state) {
case "stand" :
GC.p10.sprite = 1;
break;
case "walk" :
walkCycle(1);
break;
case "fly" :
flyCycle(1);
break;
case "hurt" :
hurtCycle(1);
break;
case "attack" :
attackCycle(1);
break;
case "fireball" :
fireballCycle(1);
}
GC.p10.p.cible._x = ((-GC.p10.sprite) * 20) + 10;
GC.p10.p.cible._y = ((-GC.p10.lvl) * 20) + 10;
};
if (gameVersion) {
btnBack.onRollOver = function () {
soundPlayer("s_rollover");
};
btnBack.onPress = function () {
soundPlayer("s_cancel");
switchScreen("database", "title");
};
}
};
checkUnlockable = function () {
var _local2 = false;
switch (gameMode) {
case "story" :
if (!dbzStoryComplete) {
if (dbzChapter == dbzChapterMax) {
if (dbzEpisode == dbzEpisodeMax) {
if (dbzEpisodeMax < _root["episodeList" + dbzChapterMax].length) {
_local2 = true;
} else if (dbzChapterMax < chapterList.length) {
_local2 = true;
}
}
}
}
break;
case "oav" :
if (dbzChapterOAV != dbzChapterMaxOAV) {
break;
}
if (dbzEpisodeOAV != dbzEpisodeMaxOAV) {
break;
}
if (dbzEpisodeMaxOAV < _root["oavEpisodeList" + dbzChapterMaxOAV].length) {
_local2 = true;
} else {
if (dbzChapterMaxOAV >= oavList.length) {
break;
}
_local2 = true;
}
}
return(_local2);
};
createUnlockBar = function (i, type, txt) {
var _local1 = createEmptyMovieClip("bar" + i, i);
_local1.attachMovie("unlockBar", "clip", 1);
_local1._x = 160;
_local1._y = 50 + (i * 23);
_local1.clip.gotoAndStop(type);
_local1.clip.txt.text = txt;
balls._y = balls._y + 23;
unlockText._y = unlockText._y + 23;
};
pushFighterAsNumber = function (name) {
var _local2 = 0;
var _local1 = 0;
while (_local1 < fighterList.length) {
if (fighterList[_local1][0] == name) {
_local2 = _local1;
}
_local1++;
}
dbzFighterList.push(_local2);
};
pushStageAsNumber = function (name) {
var _local2 = 0;
var _local1 = 0;
while (_local1 < stageList.length) {
if (stageList[_local1][0] == name) {
_local2 = _local1;
}
_local1++;
}
dbzStageList.push(_local2);
};
screenUnlock = function (gift) {
_quality = "HIGH";
Mouse.show();
title.gotoAndStop("unlock");
mbat = (mbats = undefined);
musicPlayer("m_unlock");
balls._y = 70;
unlockText._y = 90;
unlockText.autoSize = true;
btnNext.onRollOver = function () {
soundPlayer("s_rollover");
};
btnNext.onPress = function () {
soundPlayer("s_ok");
switch (gameMode) {
case "story" :
var _local2 = chapterList.length - 1;
var _local3 = _root["episodeList" + _local2].length - 1;
var _local4 = (("c" + _local2) + "e") + _local3;
if (gift == _local4) {
switchScreen("unlock", "credits");
} else {
switchScreen("unlock", "story");
}
break;
case "oav" :
switchScreen("unlock", "story");
break;
default :
switchScreen("unlock", "title");
}
};
switch (gameMode) {
case "story" :
if (dbzEpisodeMax == (_root["episodeList" + dbzChapterMax].length - 1)) {
if (dbzChapterMax < (chapterList.length - 1)) {
dbzChapter++;
dbzChapterMax++;
dbzEpisode = (dbzEpisodeMax = 0);
}
} else {
dbzEpisode++;
dbzEpisodeMax++;
}
break;
case "oav" :
if (dbzEpisodeMaxOAV >= (_root["oavEpisodeList" + dbzChapterMaxOAV].length - 1)) {
break;
}
dbzEpisodeOAV++;
dbzEpisodeMaxOAV++;
}
switch (gift) {
case "toribot" :
dbzUnlockToribot = true;
unlockText.htmlText = "You have unlocked a secret character!<br/><br/>Tori-Bot is the self representation of Akira Toriyama,<br/>the famous creator of the Dragon Ball Z manga.<br/>Therefore, he have mastered all of the powers and secret techniques!";
createUnlockBar(0, "f", p_toribot[1][0]);
pushFighterAsNumber(p_toribot[0]);
break;
case "roshi" :
dbzUnlockRoshi = true;
unlockText.htmlText = "You have unlocked a secret character!";
createUnlockBar(0, "f", p_roshi[1][0]);
pushFighterAsNumber(p_roshi[0]);
break;
case "story" :
dbzUnlockStory = true;
unlockText.htmlText = "Great job!<br/><br/>You are now ready to enter the story mode and<br/>unlock every secrets of DRAGON BALL Z DEVOLUTION!";
createUnlockBar(0, "f", p_goku[1][0]);
pushFighterAsNumber(p_goku[0]);
createUnlockBar(1, "m", "Story");
}
switch (gift) {
case "c0e0" :
unlockText.htmlText = "Excelent!<br/>You can make your unlocked<br/>fighters battle in versus mode!";
createUnlockBar(0, "f", p_piccolo[1][0]);
pushFighterAsNumber(p_piccolo[0]);
createUnlockBar(1, "b", s_budokai[1]);
pushStageAsNumber(s_budokai[0]);
createUnlockBar(2, "c", chapterList[1]);
createUnlockBar(3, "m", "Versus");
dbzUnlockVS = true;
break;
case "c1e0" :
createUnlockBar(0, "b", s_kamehouse[1]);
pushStageAsNumber(s_kamehouse[0]);
break;
case "c1e1" :
unlockText.htmlText = "With the scouter Bulma took from Raditz,<br/>you can look at your unlocked fighters in the database<br/>and listen to some music!";
createUnlockBar(0, "f", p_raditz[1][0]);
pushFighterAsNumber(p_raditz[0]);
createUnlockBar(1, "b", s_plains[1]);
pushStageAsNumber(s_plains[0]);
createUnlockBar(2, "d", "Database");
dbzUnlockDatabase = true;
dbzUnlockJukebox = true;
break;
case "c1e2" :
createUnlockBar(0, "f", p_gohankid[1][0]);
pushFighterAsNumber(p_gohankid[0]);
createUnlockBar(1, "b", s_desert[1]);
pushStageAsNumber(s_desert[0]);
break;
case "c1e3" :
unlockText.htmlText = "You have unlocked most of the earth warriors!<br/>One more fighter and you'll unlock a new game mode.<br/>Go ahead against Nappa!";
createUnlockBar(0, "f", p_krillin[1][0]);
pushFighterAsNumber(p_krillin[0]);
createUnlockBar(1, "f", p_yamcha[1][0]);
pushFighterAsNumber(p_yamcha[0]);
createUnlockBar(2, "f", p_tien[1][0]);
pushFighterAsNumber(p_tien[0]);
createUnlockBar(3, "f", p_chiaotzu[1][0]);
pushFighterAsNumber(p_chiaotzu[0]);
createUnlockBar(4, "f", p_saibaman[1][0]);
pushFighterAsNumber(p_saibaman[0]);
break;
case "c1e4" :
unlockText.htmlText = "You have now enough fighters<br/>to make them participate to<br/>the Tenkaichi Budokai!";
createUnlockBar(0, "f", p_nappa[1][0]);
pushFighterAsNumber(p_nappa[0]);
createUnlockBar(1, "m", "Tenkaichi Budokai");
dbzUnlockBudokai = true;
break;
case "c1e5" :
unlockText.htmlText = "Son Goku is back from the other world<br/>where he had to walk along the one<br/>million kilometer long Snake Way.";
createUnlockBar(0, "b", s_snakeway[1]);
pushStageAsNumber(s_snakeway[0]);
break;
case "c1e6" :
createUnlockBar(0, "b", s_mountains[1]);
pushStageAsNumber(s_mountains[0]);
break;
case "c1e7" :
unlockText.htmlText = "That was a tough fight.<br/>Let's move on to planet Namek!";
createUnlockBar(0, "f", p_vegeta[1][0]);
pushFighterAsNumber(p_vegeta[0]);
createUnlockBar(1, "f", p_yajirobe[1][0]);
pushFighterAsNumber(p_yajirobe[0]);
createUnlockBar(2, "c", chapterList[2]);
break;
case "c2e0" :
unlockText.htmlText = "New planet means new battlefields!";
createUnlockBar(0, "f", p_cui[1][0]);
pushFighterAsNumber(p_cui[0]);
createUnlockBar(1, "b", s_namek[1]);
pushStageAsNumber(s_namek[0]);
break;
case "c2e1" :
createUnlockBar(0, "f", p_dodoria[1][0]);
pushFighterAsNumber(p_dodoria[0]);
break;
case "c2e2" :
createUnlockBar(0, "f", p_zarbon[1][0]);
pushFighterAsNumber(p_zarbon[0]);
break;
case "c2e3" :
createUnlockBar(0, "c", chapterList[3]);
break;
case "c3e0" :
unlockText.htmlText = "With Guldo, you will be able to stop time.<br/>What you'll do with that power is up to you!";
createUnlockBar(0, "f", p_guldo[1][0]);
pushFighterAsNumber(p_guldo[0]);
break;
case "c3e1" :
break;
case "c3e2" :
createUnlockBar(0, "f", p_recoome[1][0]);
pushFighterAsNumber(p_recoome[0]);
break;
case "c3e3" :
createUnlockBar(0, "f", p_burter[1][0]);
pushFighterAsNumber(p_burter[0]);
break;
case "c3e4" :
break;
case "c3e5" :
createUnlockBar(0, "f", p_jeice[1][0]);
pushFighterAsNumber(p_jeice[0]);
createUnlockBar(1, "b", s_friezaship[1]);
pushStageAsNumber(s_friezaship[0]);
break;
case "c3e6" :
unlockText.htmlText = "You have completed the Ginyu Force.<br/>Tokusentai! Tokusentai! Tokusentai!<br/><br/>You can now experience<br/>the new Tag Team game mode!";
createUnlockBar(0, "f", p_ginyu[1][0]);
pushFighterAsNumber(p_ginyu[0]);
createUnlockBar(1, "m", "Tag Team");
dbzUnlockTagTeam = true;
break;
case "c3e7" :
unlockText.htmlText = "You only have seen a glimpse of<br/>what terror awaits in the next chapter...";
createUnlockBar(0, "f", p_nail[1][0]);
pushFighterAsNumber(p_nail[0]);
createUnlockBar(1, "c", chapterList[4]);
break;
case "c4e0" :
break;
case "c4e1" :
break;
case "c4e2" :
createUnlockBar(0, "f", p_piccolonail[1][0]);
pushFighterAsNumber(p_piccolonail[0]);
break;
case "c4e3" :
break;
case "c4e4" :
break;
case "c4e5" :
break;
case "c4e6" :
unlockText.htmlText = "You have finaly beaten the tyrant Frieza!<br/>Let's head back to earth for some rest...";
createUnlockBar(0, "f", p_frieza[1][0]);
pushFighterAsNumber(p_frieza[0]);
createUnlockBar(1, "b", s_namekexplosion[1]);
pushStageAsNumber(s_namekexplosion[0]);
createUnlockBar(2, "c", chapterList[5]);
break;
case "c5e0" :
createUnlockBar(0, "f", p_mechafrieza[1][0]);
pushFighterAsNumber(p_mechafrieza[0]);
break;
case "c5e1" :
createUnlockBar(0, "f", p_kingcold[1][0]);
pushFighterAsNumber(p_kingcold[0]);
createUnlockBar(1, "b", s_coldship[1]);
pushStageAsNumber(s_coldship[0]);
break;
case "c5e2" :
createUnlockBar(0, "f", p_trunksfuture[1][0]);
pushFighterAsNumber(p_trunksfuture[0]);
createUnlockBar(1, "c", chapterList[6]);
break;
case "c6e0" :
createUnlockBar(0, "b", s_city[1]);
pushStageAsNumber(s_city[0]);
break;
case "c6e1" :
break;
case "c6e2" :
unlockText.htmlText = "Absorb KI blasts like a vacuum cleaner!";
createUnlockBar(0, "f", p_a19[1][0]);
pushFighterAsNumber(p_a19[0]);
break;
case "c6e3" :
createUnlockBar(0, "f", p_gero[1][0]);
pushFighterAsNumber(p_gero[0]);
break;
case "c6e4" :
unlockText.htmlText = "Gero's androids are fitted with infinite energy supply.";
createUnlockBar(0, "f", p_a17[1][0]);
pushFighterAsNumber(p_a17[0]);
break;
case "c6e5" :
createUnlockBar(0, "f", p_a18[1][0]);
pushFighterAsNumber(p_a18[0]);
createUnlockBar(1, "b", s_roads[1]);
pushStageAsNumber(s_roads[0]);
break;
case "c6e6" :
createUnlockBar(0, "c", chapterList[7]);
break;
case "c7e0" :
createUnlockBar(0, "f", p_piccolokami[1][0]);
pushFighterAsNumber(p_piccolokami[0]);
break;
case "c7e1" :
break;
case "c7e2" :
break;
case "c7e3" :
unlockText.htmlText = "One year inside the chamber is the equivalent to one day on the outside.";
createUnlockBar(0, "b", s_timechamber[1]);
pushStageAsNumber(s_timechamber[0]);
break;
case "c7e4" :
createUnlockBar(0, "f", p_a16[1][0]);
pushFighterAsNumber(p_a16[0]);
createUnlockBar(1, "c", chapterList[8]);
break;
case "c8e0" :
createUnlockBar(0, "f", p_vegetassj[1][0]);
pushFighterAsNumber(p_vegetassj[0]);
break;
case "c8e1" :
break;
case "c8e2" :
createUnlockBar(0, "b", s_islands[1]);
pushStageAsNumber(s_islands[0]);
break;
case "c8e3" :
createUnlockBar(0, "f", p_trunkssuper[1][0]);
pushFighterAsNumber(p_trunkssuper[0]);
break;
case "c8e4" :
createUnlockBar(0, "c", chapterList[9]);
break;
case "c9e0" :
unlockText.htmlText = "You have unlocked the great Mr. Satan!";
createUnlockBar(0, "f", p_satan[1][0]);
pushFighterAsNumber(p_satan[0]);
break;
case "c9e1" :
unlockText.htmlText = "Cell destroyed his own stadium so nobody<br/>could loose by hiting the ground.";
createUnlockBar(0, "b", s_cellgame[1]);
pushStageAsNumber(s_cellgame[0]);
break;
case "c9e2" :
break;
case "c9e3" :
unlockText.htmlText = "I shall call him... Mini-Me!";
createUnlockBar(0, "f", p_celljr[1][0]);
pushFighterAsNumber(p_celljr[0]);
break;
case "c9e4" :
break;
case "c9e5" :
createUnlockBar(0, "f", p_cell[1][0]);
pushFighterAsNumber(p_cell[0]);
break;
case "c9e6" :
unlockText.htmlText = "You have beaten the monstrous Cell!<br/>Earth is finally at peace,<br/><br/>for now...";
createUnlockBar(0, "f", p_gohanteen[1][0]);
pushFighterAsNumber(p_gohanteen[0]);
createUnlockBar(1, "c", chapterList[10]);
break;
case "c10e0" :
createUnlockBar(0, "f", p_videl[1][0]);
pushFighterAsNumber(p_videl[0]);
break;
case "c10e1" :
createUnlockBar(0, "f", p_gsm[1][0]);
pushFighterAsNumber(p_gsm[0]);
break;
case "c10e2" :
createUnlockBar(0, "b", s_gravityroom[1]);
pushStageAsNumber(s_gravityroom[0]);
createUnlockBar(1, "c", chapterList[11]);
break;
case "c11e0" :
createUnlockBar(0, "f", p_goten[1][0]);
pushFighterAsNumber(p_goten[0]);
break;
case "c11e1" :
unlockText.htmlText = "It seems that Mr. Satan was suffering from is stomach...";
createUnlockBar(0, "f", p_trunkskid[1][0]);
pushFighterAsNumber(p_trunkskid[0]);
break;
case "c11e2" :
createUnlockBar(0, "f", p_supremekai[1][0]);
pushFighterAsNumber(p_supremekai[0]);
break;
case "c11e3" :
createUnlockBar(0, "f", p_spopovich[1][0]);
pushFighterAsNumber(p_spopovich[0]);
break;
case "c11e4" :
createUnlockBar(0, "f", p_kibito[1][0]);
pushFighterAsNumber(p_kibito[0]);
break;
case "c11e5" :
createUnlockBar(0, "f", p_yamu[1][0]);
pushFighterAsNumber(p_yamu[0]);
break;
case "c11e6" :
createUnlockBar(0, "f", p_mightymask[1][0]);
pushFighterAsNumber(p_mightymask[0]);
break;
case "c11e7" :
unlockText.htmlText = "Once again, Mr. Satan proved<br/>to be the earth champion!";
createUnlockBar(0, "b", s_budokai2[1]);
pushStageAsNumber(s_budokai2[0]);
createUnlockBar(1, "c", chapterList[12]);
break;
case "c12e0" :
createUnlockBar(0, "f", p_krillinold[1][0]);
pushFighterAsNumber(p_krillinold[0]);
break;
case "c12e1" :
unlockText.htmlText = "In order to decide who would fight against Pui Pui,<br/>Goku, Gohan and Vegeta played the Janken mini-game!";
createUnlockBar(0, "f", p_puipui[1][0]);
pushFighterAsNumber(p_puipui[0]);
createUnlockBar(1, "m", "Janken");
dbzUnlockJanken = true;
break;
case "c12e2" :
createUnlockBar(0, "f", p_yakon[1][0]);
pushFighterAsNumber(p_yakon[0]);
createUnlockBar(1, "b", s_babidiship[1]);
pushStageAsNumber(s_babidiship[0]);
break;
case "c12e3" :
createUnlockBar(0, "f", p_dabura[1][0]);
pushFighterAsNumber(p_dabura[0]);
break;
case "c12e4" :
createUnlockBar(0, "c", chapterList[13]);
break;
case "c13e0" :
createUnlockBar(0, "f", p_buumajin[1][0]);
pushFighterAsNumber(p_buumajin[0]);
break;
case "c13e1" :
break;
case "c13e2" :
createUnlockBar(0, "f", p_vegetamajin[1][0]);
pushFighterAsNumber(p_vegetamajin[0]);
break;
case "c13e3" :
unlockText.htmlText = "Paparapapa!";
createUnlockBar(0, "f", p_babidi[1][0]);
pushFighterAsNumber(p_babidi[0]);
break;
case "c13e4" :
createUnlockBar(0, "f", p_gokussj[1][0]);
pushFighterAsNumber(p_gokussj[0]);
break;
case "c13e5" :
createUnlockBar(0, "c", chapterList[14]);
break;
case "c14e0" :
createUnlockBar(0, "f", p_buuevil[1][0]);
pushFighterAsNumber(p_buuevil[0]);
break;
case "c14e1" :
createUnlockBar(0, "f", p_gotenks[1][0]);
pushFighterAsNumber(p_gotenks[0]);
break;
case "c14e2" :
unlockText.htmlText = "Please, wipe your feet before entering the Lookout.<br/>Mr. Popo is watching you...<br/>O_O";
createUnlockBar(0, "b", s_lookout[1]);
pushStageAsNumber(s_lookout[0]);
break;
case "c14e3" :
createUnlockBar(0, "f", p_gohan[1][0]);
pushFighterAsNumber(p_gohan[0]);
break;
case "c14e4" :
break;
case "c14e5" :
createUnlockBar(0, "f", p_vegito[1][0]);
pushFighterAsNumber(p_vegito[0]);
break;
case "c14e6" :
createUnlockBar(0, "f", p_buu[1][0]);
pushFighterAsNumber(p_buu[0]);
createUnlockBar(1, "b", s_insidebuu[1]);
pushStageAsNumber(s_insidebuu[0]);
createUnlockBar(2, "c", chapterList[15]);
break;
case "c15e0" :
break;
case "c15e1" :
createUnlockBar(0, "f", p_gokussj[1][0]);
pushFighterAsNumber(p_gokussj[0]);
break;
case "c15e2" :
createUnlockBar(0, "b", s_kaioshinkai[1]);
pushStageAsNumber(s_kaioshinkai[0]);
break;
case "c15e3" :
unlockText.htmlText = "A Happy Ending!<br/><br/>And Then...";
createUnlockBar(0, "f", p_buukid[1][0]);
pushFighterAsNumber(p_buukid[0]);
createUnlockBar(1, "c", chapterList[16]);
break;
case "c16e0" :
unlockText.htmlText = "You have completed the story mode!<br/><br/>Farewell Dragon world...<br/><br/>Until next DRAGON BALL Z DEVOLUTION update!";
createUnlockBar(0, "f", p_gokuold[1][0]);
pushFighterAsNumber(p_gokuold[0]);
createUnlockBar(1, "f", p_uub[1][0]);
pushFighterAsNumber(p_uub[0]);
createUnlockBar(2, "f", p_pan[1][0]);
pushFighterAsNumber(p_pan[0]);
}
if ((_root.bar0 == undefined) || (cheatcode)) {
switch (gameMode) {
case "story" :
switchScreen("unlock", "story");
break;
case "oav" :
switchScreen("unlock", "story");
}
} else {
saveCookie();
}
};
screenCredits = function () {
_quality = "HIGH";
mbat = (mbats = undefined);
musicPlayer("m_credits");
var _local1 = "DRAGON BALL Z DEVOLUTION";
_local1 = _local1 + "<br/>-<br/>Made by<br/>";
_local1 = _local1 + "Etienne B\u00E9gu\u00E9<br/>";
_local1 = _local1 + "<br/><br/><br/><br/><br/><br/><br/>";
_local1 = _local1 + "<br/><br/><br/><br/><br/><br/><br/>";
_local1 = _local1 + "Special thanks for the help from<br/><br/>";
_local1 = _local1 + "Amine<br/>";
_local1 = _local1 + "Andr\u00E9as<br/>";
_local1 = _local1 + "Aroffff<br/>";
_local1 = _local1 + "Avion<br/>";
_local1 = _local1 + "BrolySSj<br/>";
_local1 = _local1 + "Chrisis<br/>";
_local1 = _local1 + "Darvel<br/>";
_local1 = _local1 + "Driss1993<br/>";
_local1 = _local1 + "Dyno<br/>";
_local1 = _local1 + "Funrush<br/>";
_local1 = _local1 + "Gogtoto<br/>";
_local1 = _local1 + "Jim<br/>";
_local1 = _local1 + "Kario<br/>";
_local1 = _local1 + "MatthewK<br/>";
_local1 = _local1 + "Metapro<br/>";
_local1 = _local1 + "Mikey2001<br/>";
_local1 = _local1 + "Nicole Pong<br/>";
_local1 = _local1 + "Rayandbz<br/>";
_local1 = _local1 + "ssj3Vegeta<br/>";
_local1 = _local1 + "Tacowarrior<br/>";
_local1 = _local1 + "Talisker<br/>";
_local1 = _local1 + "Zelkova<br/>";
_local1 = _local1 + "Zipper49<br/>";
_local1 = _local1 + "<br/>You guys are awesome!<br/>";
_local1 = _local1 + "<br/><br/><br/><br/><br/><br/><br/>";
_local1 = _local1 + "Original music composed by<br/>";
_local1 = _local1 + "Shunsuke Kikuchi<br/>";
_local1 = _local1 + "<br/>8-bits remixed by<br/>";
_local1 = _local1 + "Darvel<br/>";
_local1 = _local1 + "<br/><br/><br/><br/><br/><br/><br/>";
_local1 = _local1 + "This game is a tribute to<br/>";
_local1 = _local1 + "<br/><br/><br/><br/>";
_local1 = _local1 + "AKIRA TORIYAMA<br/>";
_local1 = _local1 + "<br/><br/><br/><br/><br/><br/><br/>";
_local1 = _local1 + "THANKS FOR PLAYING !";
credits.htmlText = _local1;
credits.autoSize = true;
credits.yStart = 390;
setupBG("kamehouse");
GC.bg._alpha = 40;
var yDBZ = (credits.yStart - 60);
var yDevolution = (credits.yStart - 20);
var yTxori = (credits.yStart + 180);
var yToribot = (credits.yStart + 1100);
credits._y = credits.yStart;
dragonball._y = yDBZ;
devolution._y = yDevolution;
txori._y = yTxori;
txori.onPress = function () {
getURL ("http://www.txori.com");
};
toribot._y = yToribot;
toribot.useHandCursor = false;
toribot.onPress = function () {
if ((!dbzUnlockToribot) && (!cheatcode)) {
soundPlayer("s_rollover");
switchScreen("credits", "unlock", "toribot");
}
};
btnBack.onRollOver = function () {
soundPlayer("s_rollover");
};
btnBack.onPress = function () {
soundPlayer("s_cancel");
switchScreen("credits", "title");
};
onEnterFrame = function () {
credits._y = credits._y - 1;
dragonball._y = dragonball._y - 1;
devolution._y = devolution._y - 1;
txori._y = txori._y - 1;
toribot._y = toribot._y - 1;
if ((credits._y + credits._height) < 0) {
credits._y = credits.yStart;
dragonball._y = yDBZ;
devolution._y = yDevolution;
txori._y = yTxori;
toribot._y = yToribot;
}
};
};
screenVS = function () {
_quality = "HIGH";
title.gotoAndStop("versus");
panelCoverflow._visible = false;
btnPC2.btn._xscale = -100;
btnPC2.btn._x = 90;
mbat = (mbats = undefined);
musicPlayer("m_versus");
stopTimer = 0;
cleanRoosters();
updatePlayerVS = function (p) {
var _local2 = _root["k" + p];
var _local3 = _root[("p" + p) + "Face"];
var _local4 = _root["btn" + p];
if (cheatcode) {
_local3.gotoAndStop(fighterList[_local2.choice][0]);
_local4.txt.htmlText = fighterList[_local2.choice][1][0];
} else {
_local3.gotoAndStop(fighterList[dbzFighterList[_local2.choice]][0]);
_local4.txt.htmlText = fighterList[dbzFighterList[_local2.choice]][1][0];
}
_local3.pface.stop();
};
updateStageVS = function (i) {
if (cheatcode) {
GC.bg.choice = stageList[i][0];
btn3.txt.htmlText = stageList[i][1];
} else {
GC.bg.choice = stageList[dbzStageList[i]][0];
btn3.txt.htmlText = stageList[dbzStageList[i]][1];
}
setupBG(GC.bg.choice);
};
var maxperso;
var maxstage;
var stageNumber;
if (cheatcode) {
maxperso = fighterList.length;
maxstage = stageList.length;
} else {
maxperso = dbzFighterList.length;
maxstage = dbzStageList.length;
}
if (maxstage < 2) {
fleche31._visible = (fleche32._visible = false);
}
GC.bg._alpha = 40;
randomAllVS = function () {
k1.choice = random(maxperso);
k2.choice = random(maxperso);
while (k1.choice == k2.choice) {
k2.choice = random(maxperso);
}
updateSliderLVL(1);
updateSliderLVL(2);
updatePlayerVS(1);
updatePlayerVS(2);
stageNumber = random(maxstage);
updateStageVS(stageNumber);
};
initMenuVS = function (i) {
var flecheTemp1 = _root[("fleche" + i) + "1"];
var flecheTemp2 = _root[("fleche" + i) + "2"];
var _local2 = _root["btn" + i];
var _local4 = _root[("btn" + i) + "txt"];
_local2.btn.onRollOver = function () {
soundPlayer("s_rollover");
flecheTemp1.play();
flecheTemp2.play();
};
_local2.btn.onRollOut = function () {
flecheTemp1.gotoAndStop(1);
flecheTemp2.gotoAndStop(1);
};
};
i = 1;
while (i <= 3) {
initArrow(i);
initMenuVS(i);
i++;
}
btnRandom.onRollOver = function () {
soundPlayer("s_rollover");
};
btnRandom.onPress = function () {
soundPlayer("s_ok");
randomAllVS();
xSlider(slideHP1, random(5));
xSlider(slideHP2, random(5));
xSlider(slideKI1, random(5));
xSlider(slideKI2, random(5));
xSlider(slideLVL1, random(5));
limitSliderLVL(1);
xSlider(slideLVL2, random(5));
limitSliderLVL(2);
xSlider(slideTime, random(5));
};
menuBtnCom(1);
menuBtnCom(2);
btnPC1.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btnPC1.btn.onPress = function () {
menuSwitchCom(1);
};
btnPC2.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btnPC2.btn.onPress = function () {
menuSwitchCom(2);
};
p1Face.onPress = (btn1.btn.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 1);
});
p2Face.onPress = (btn2.btn.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 2);
});
fleche31.onPress = function () {
soundPlayer("s_select");
stageNumber--;
if (stageNumber < 0) {
stageNumber = maxstage - 1;
}
updateStageVS(stageNumber);
};
fleche32.onPress = (btn3.btn.onPress = function () {
soundPlayer("s_select");
stageNumber++;
if (stageNumber == maxstage) {
stageNumber = 0;
}
updateStageVS(stageNumber);
});
btnNext.onRollOver = function () {
soundPlayer("s_rollover");
};
btnNext.onPress = function () {
soundPlayer("s_ok");
rooster1[0][0] = k1.choice;
rooster1[0][_HP] = 1 + slideHP1.x;
rooster1[0][_KI] = 1;
rooster1[0][_KIMAX] = 1 + slideKI1.x;
rooster1[0][_LVL] = 1;
rooster2[0][0] = k2.choice;
rooster2[0][_HP] = 1 + slideHP2.x;
rooster2[0][_KI] = 1;
rooster2[0][_KIMAX] = 1 + slideKI2.x;
rooster2[0][_LVL] = 1;
gameTime = (gameTimeMax = 300 * slideTime.x);
var _local2 = 1 + slideLVL1.x;
var _local1 = 1 + slideLVL2.x;
if (cheatcode) {
rooster1[0][_LVLMAX] = Math.min(_local2, fighterList[k1.choice].length - 1);
rooster2[0][_LVLMAX] = Math.min(_local1, fighterList[k2.choice].length - 1);
} else {
rooster1[0][_LVLMAX] = Math.min(_local2, fighterList[dbzFighterList[k1.choice]].length - 1);
rooster2[0][_LVLMAX] = Math.min(_local1, fighterList[dbzFighterList[k2.choice]].length - 1);
}
switchScreen("versus", "ready");
};
btnBack.onRollOver = function () {
soundPlayer("s_rollover");
};
btnBack.onPress = function () {
soundPlayer("s_cancel");
switchScreen("versus", "title");
};
onEnterFrame = function () {
moveClouds();
};
randomAllVS();
initSlider(slideHP1, "hp", 2);
initSlider(slideHP2, "hp", 2);
initSlider(slideKI1, "ki", 2);
initSlider(slideKI2, "ki", 2);
initSlider(slideLVL1, "lvl", 4);
initSlider(slideLVL2, "lvl", 4);
initSlider(slideTime, "time", 0);
updateSliderLVL(1);
updateSliderLVL(2);
};
screenTagTeam = function () {
_quality = "HIGH";
title.gotoAndStop("tagteam");
panelCoverflow._visible = false;
btnPC2.btn._xscale = -100;
btnPC2.btn._x = 90;
mbat = (mbats = undefined);
musicPlayer("m_versus");
stopTimer = 0;
cleanRoosters();
rooster1[1] = new Array();
rooster1[2] = new Array();
rooster1[3] = new Array();
rooster1[4] = new Array();
rooster1[5] = new Array();
rooster1[6] = new Array();
rooster1[7] = new Array();
rooster2[1] = new Array();
rooster2[2] = new Array();
rooster2[3] = new Array();
rooster2[4] = new Array();
rooster2[5] = new Array();
rooster2[6] = new Array();
rooster2[7] = new Array();
updatePlayerTeam = function (p, i) {
var _local2 = _root[(("p" + p) + i) + "Face"];
if (cheatcode) {
_local2.gotoAndStop(fighterList[_root["rooster" + p][i]][0]);
} else {
_local2.gotoAndStop(fighterList[dbzFighterList[_root["rooster" + p][i]]][0]);
}
_local2.pface.stop();
};
updateStageVS = function (i) {
if (cheatcode) {
GC.bg.choice = stageList[i][0];
btn3.txt.htmlText = stageList[i][1];
} else {
GC.bg.choice = stageList[dbzStageList[i]][0];
btn3.txt.htmlText = stageList[dbzStageList[i]][1];
}
setupBG(GC.bg.choice);
};
var maxperso;
var maxstage;
var stageNumber;
var _local12;
var _local11;
if (cheatcode) {
maxperso = fighterList.length;
maxstage = stageList.length;
} else {
maxperso = dbzFighterList.length;
maxstage = dbzStageList.length;
}
if (maxstage < 2) {
fleche31._visible = (fleche32._visible = false);
}
GC.bg._alpha = 40;
randomAllTeam = function () {
var _local7 = random(7) + 1;
var _local5 = new Array();
var _local4 = 0;
while (_local4 < maxperso) {
_local5[_local4] = _local4;
_local4++;
}
_local4 = 1;
while (_local4 <= 2) {
var _local6 = _root["rooster" + _local4];
_root["nbTag" + _local4] = random(7) + 1;
addTagFighter(_local4, 0);
var _local3 = 0;
while (_local3 <= 7) {
var _local2 = random(maxperso);
while (_local5[_local2] == "x") {
_local2 = random(maxperso);
}
_local5[_local2] = "x";
_local6[_local3][0] = _local2;
updatePlayerTeam(_local4, _local3);
_local3++;
}
_local4++;
}
stageNumber = random(maxstage);
updateStageVS(stageNumber);
};
initMenuVS = function (i) {
var flecheTemp1 = _root[("fleche" + i) + "1"];
var flecheTemp2 = _root[("fleche" + i) + "2"];
var _local2 = _root["btn" + i];
var _local4 = _root[("btn" + i) + "txt"];
_local2.btn.onRollOver = function () {
soundPlayer("s_rollover");
flecheTemp1.play();
flecheTemp2.play();
};
_local2.btn.onRollOut = function () {
flecheTemp1.gotoAndStop(1);
flecheTemp2.gotoAndStop(1);
};
};
i = 1;
while (i <= 3) {
initArrow(i);
initMenuVS(i);
i++;
}
btnRandom.onRollOver = function () {
soundPlayer("s_rollover");
};
btnRandom.onPress = function () {
soundPlayer("s_ok");
randomAllTeam();
xSlider(slideHP1, random(5));
xSlider(slideHP2, random(5));
xSlider(slideKI1, random(5));
xSlider(slideKI2, random(5));
xSlider(slideTime, random(5));
};
menuBtnCom(1);
menuBtnCom(2);
btnPC1.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btnPC1.btn.onPress = function () {
menuSwitchCom(1);
};
btnPC2.btn.onRollOver = function () {
soundPlayer("s_rollover");
};
btnPC2.btn.onPress = function () {
menuSwitchCom(2);
};
p10Face.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 1, 0);
};
p11Face.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 1, 1);
};
p12Face.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 1, 2);
};
p13Face.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 1, 3);
};
p14Face.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 1, 4);
};
p15Face.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 1, 5);
};
p16Face.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 1, 6);
};
p17Face.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 1, 7);
};
p20Face.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 2, 0);
};
p21Face.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 2, 1);
};
p22Face.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 2, 2);
};
p23Face.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 2, 3);
};
p24Face.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 2, 4);
};
p25Face.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 2, 5);
};
p26Face.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 2, 6);
};
p27Face.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 2, 7);
};
addTagFighter = function (p, s) {
_root["nbTag" + p] = Math.max(0, Math.min(_root["nbTag" + p] + s, 7));
var _local2 = 0;
while (_local2 <= 7) {
var _local3 = _root[(("p" + p) + _local2) + "Face"];
if (_local2 <= _root["nbTag" + p]) {
_local3._visible = true;
} else {
_local3._visible = false;
}
_local2++;
}
};
btnPlus1.gotoAndStop("plusOut");
btnPlus1.onRollOver = function () {
soundPlayer("s_rollover");
btnPlus1.gotoAndStop("plusOver");
};
btnPlus1.onRollOut = (btnPlus1.onReleaseOutside = function () {
btnPlus1.gotoAndStop("plusOut");
});
btnPlus1.onPress = function () {
soundPlayer("s_select");
addTagFighter(1, 1);
};
btnMinus1.gotoAndStop("minusOut");
btnMinus1.onRollOver = function () {
soundPlayer("s_rollover");
btnMinus1.gotoAndStop("minusOver");
};
btnMinus1.onRollOut = (btnMinus1.onReleaseOutside = function () {
btnMinus1.gotoAndStop("minusOut");
});
btnMinus1.onPress = function () {
soundPlayer("s_select");
addTagFighter(1, -1);
};
btnPlus2.gotoAndStop("plusOut");
btnPlus2.onRollOver = function () {
soundPlayer("s_rollover");
btnPlus2.gotoAndStop("plusOver");
};
btnPlus2.onRollOut = (btnPlus2.onReleaseOutside = function () {
btnPlus2.gotoAndStop("plusOut");
});
btnPlus2.onPress = function () {
soundPlayer("s_select");
addTagFighter(2, 1);
};
btnMinus2.gotoAndStop("minusOut");
btnMinus2.onRollOver = function () {
soundPlayer("s_rollover");
btnMinus2.gotoAndStop("minusOver");
};
btnMinus2.onRollOut = (btnMinus2.onReleaseOutside = function () {
btnMinus2.gotoAndStop("minusOut");
});
btnMinus2.onPress = function () {
soundPlayer("s_select");
addTagFighter(2, -1);
};
fleche31.onPress = function () {
soundPlayer("s_select");
stageNumber--;
if (stageNumber < 0) {
stageNumber = maxstage - 1;
}
updateStageVS(stageNumber);
};
fleche32.onPress = (btn3.btn.onPress = function () {
soundPlayer("s_select");
stageNumber++;
if (stageNumber == maxstage) {
stageNumber = 0;
}
updateStageVS(stageNumber);
});
btnNext.onRollOver = function () {
soundPlayer("s_rollover");
};
btnNext.onPress = function () {
soundPlayer("s_ok");
var _local4 = 1;
while (_local4 <= 2) {
var _local3 = _root["rooster" + _local4];
var _local5 = 7 - _root["nbTag" + _local4];
while (_local5 > 0) {
_root["rooster" + _local4].pop();
_local5--;
}
var _local2 = 0;
while (_local2 <= _root["nbTag" + _local4]) {
_local3[_local2][_HP] = 1 + _root["slideHP" + _local4].x;
_local3[_local2][_KI] = 1;
_local3[_local2][_KIMAX] = 1 + _root["slideKI" + _local4].x;
_local3[_local2][_LVL] = 1;
if (cheatcode) {
_local3[_local2][_LVLMAX] = fighterList[_local3[_local2][0]].length - 1;
} else {
_local3[_local2][_LVLMAX] = fighterList[dbzFighterList[_local3[_local2][0]]].length - 1;
}
_local2++;
}
_local4++;
}
gameTime = (gameTimeMax = 300 * slideTime.x);
switchScreen("tagteam", "ready");
};
btnBack.onRollOver = function () {
soundPlayer("s_rollover");
};
btnBack.onPress = function () {
soundPlayer("s_cancel");
switchScreen("tagteam", "title");
};
onEnterFrame = function () {
moveClouds();
};
randomAllTeam();
initSlider(slideHP1, "hp", 2);
initSlider(slideHP2, "hp", 2);
initSlider(slideKI1, "ki", 2);
initSlider(slideKI2, "ki", 2);
initSlider(slideTime, "time", 0);
};
screenJanken = function () {
_quality = "HIGH";
title.gotoAndStop("janken");
panelCoverflow._visible = false;
mbat = (mbats = undefined);
musicPlayer("m_versus");
stopTimer = 0;
cleanRoosters();
k1.com = (k2.com = 0);
storyTxt.txt.autoSize = true;
storyTxt.txt.htmlText = "<br/>The rock blunts the scissors, scissors cuts the paper, paper covers the rock.<br/>The game plays automatically and randomly.<br/>If you want to choose, just press your player's keys:<br/>left for rock, up for scissors, right for paper.";
storyTxt.txt._y = (storyTxt.fond._height * 0.5) - (storyTxt.txt._height * 0.5);
updatePlayerVS = function (p) {
var _local2 = _root["k" + p];
var _local3 = _root[("p" + p) + "Face"];
var _local4 = _root["btn" + p];
if (cheatcode) {
_local3.gotoAndStop(fighterList[_local2.choice][0]);
_local4.txt.htmlText = fighterList[_local2.choice][1][0];
} else {
_local3.gotoAndStop(fighterList[dbzFighterList[_local2.choice]][0]);
_local4.txt.htmlText = fighterList[dbzFighterList[_local2.choice]][1][0];
}
_local3.pface.stop();
};
updateStageVS = function (i) {
if (cheatcode) {
GC.bg.choice = stageList[i][0];
btn3.txt.htmlText = stageList[i][1];
} else {
GC.bg.choice = stageList[dbzStageList[i]][0];
btn3.txt.htmlText = stageList[dbzStageList[i]][1];
}
setupBG(GC.bg.choice);
};
var maxperso;
var maxstage;
var stageNumber;
if (cheatcode) {
maxperso = fighterList.length;
maxstage = stageList.length;
} else {
maxperso = dbzFighterList.length;
maxstage = dbzStageList.length;
}
if (maxstage < 2) {
fleche31._visible = (fleche32._visible = false);
}
GC.bg._alpha = 40;
randomAllVS = function () {
k1.choice = random(maxperso);
k2.choice = random(maxperso);
while (k1.choice == k2.choice) {
k2.choice = random(maxperso);
}
updatePlayerVS(1);
updatePlayerVS(2);
stageNumber = random(maxstage);
updateStageVS(stageNumber);
};
randomAllVS();
initMenuVS = function (i) {
var flecheTemp1 = _root[("fleche" + i) + "1"];
var flecheTemp2 = _root[("fleche" + i) + "2"];
var _local2 = _root["btn" + i];
var _local4 = _root[("btn" + i) + "txt"];
_local2.btn.onRollOver = function () {
soundPlayer("s_rollover");
flecheTemp1.play();
flecheTemp2.play();
};
_local2.btn.onRollOut = function () {
flecheTemp1.gotoAndStop(1);
flecheTemp2.gotoAndStop(1);
};
};
i = 1;
while (i <= 3) {
initArrow(i);
initMenuVS(i);
i++;
}
btnRandom.onRollOver = function () {
soundPlayer("s_rollover");
};
btnRandom.onPress = function () {
soundPlayer("s_ok");
randomAllVS();
};
p1Face.onPress = (btn1.btn.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 1);
});
p2Face.onPress = (btn2.btn.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, 2);
});
fleche31.onPress = function () {
soundPlayer("s_select");
stageNumber--;
if (stageNumber < 0) {
stageNumber = maxstage - 1;
}
updateStageVS(stageNumber);
};
fleche32.onPress = (btn3.btn.onPress = function () {
soundPlayer("s_select");
stageNumber++;
if (stageNumber == maxstage) {
stageNumber = 0;
}
updateStageVS(stageNumber);
});
btnNext.onRollOver = function () {
soundPlayer("s_rollover");
};
btnNext.onPress = function () {
soundPlayer("s_ok");
rooster1[0][0] = k1.choice;
rooster1[0][_HP] = 3;
rooster1[0][_KI] = (rooster1[0][_KIMAX] = 0);
rooster1[0][_LVL] = (rooster1[0][_LVLMAX] = 1);
rooster2[0][0] = k2.choice;
rooster2[0][_HP] = 3;
rooster2[0][_KI] = (rooster2[0][_KIMAX] = 0);
rooster2[0][_LVL] = (rooster2[0][_LVLMAX] = 1);
gameTime = (gameTimeMax = 0);
switchScreen("janken", "ready");
};
btnBack.onRollOver = function () {
soundPlayer("s_rollover");
};
btnBack.onPress = function () {
soundPlayer("s_cancel");
switchScreen("janken", "title");
};
onEnterFrame = function () {
moveClouds();
};
};
screenStory = function () {
_quality = "HIGH";
musicPlayer("m_sum" + (random(2) + 1));
GC.bg._alpha = 40;
GC.bg._x = (GC.bg._y = 0);
stopTimer = 0;
title.gotoAndStop("story");
versus.gotoAndStop("vs");
storyTxt.txt.autoSize = true;
cleanRoosters();
initMenuStory = function (i) {
var _local2 = _root["btn" + i];
var flecheTemp1 = _root[("fleche" + i) + "1"];
var flecheTemp2 = _root[("fleche" + i) + "2"];
_local2.btn.onRollOver = function () {
soundPlayer("s_rollover");
flecheTemp1.play();
flecheTemp2.play();
};
_local2.btn.onRollOut = function () {
flecheTemp1.gotoAndStop(1);
flecheTemp2.gotoAndStop(1);
};
};
i = 3;
while (i <= 4) {
initArrow(i);
initMenuStory(i);
i++;
}
nextChapter = function () {
soundPlayer("s_select");
switch (gameMode) {
case "story" :
dbzChapter++;
dbzEpisode = 0;
break;
case "oav" :
dbzChapterOAV++;
dbzEpisodeOAV = 0;
}
updateStory();
};
previousChapter = function () {
soundPlayer("s_select");
switch (gameMode) {
case "story" :
dbzChapter--;
dbzEpisode = 0;
break;
case "oav" :
dbzChapterOAV--;
dbzEpisodeOAV = 0;
}
updateStory();
};
btn3.btn.onPress = (fleche32.onPress = function () {
if (fleche32._visible) {
nextChapter();
}
});
fleche31.onPress = function () {
previousChapter();
};
nextEpisode = function () {
soundPlayer("s_select");
switch (gameMode) {
case "story" :
if (dbzChapter == dbzChapterMax) {
if (dbzEpisode < dbzEpisodeMax) {
dbzEpisode++;
}
} else if (dbzEpisode < _root["episodeList" + dbzChapter].length) {
dbzEpisode++;
}
break;
case "oav" :
if (dbzChapterOAV == dbzChapterMaxOAV) {
if (dbzEpisodeOAV < dbzEpisodeMaxOAV) {
dbzEpisodeOAV++;
}
} else {
if (dbzEpisodeOAV >= _root["oavEpisodeList" + dbzChapterOAV].length) {
break;
}
dbzEpisodeOAV++;
}
}
updateStory();
};
previousEpisode = function () {
soundPlayer("s_select");
switch (gameMode) {
case "story" :
dbzEpisode--;
break;
case "oav" :
dbzEpisodeOAV--;
}
updateStory();
};
btn4.btn.onPress = (fleche42.onPress = function () {
if (fleche42._visible) {
nextEpisode();
}
});
fleche41.onPress = function () {
previousEpisode();
};
btnNext.onRollOver = function () {
soundPlayer("s_rollover");
};
btnNext.onPress = function () {
soundPlayer("s_ok");
switchScreen("story", "ready");
};
btnBack.onRollOver = function () {
soundPlayer("s_rollover");
};
btnBack.onPress = function () {
soundPlayer("s_cancel");
switchScreen("story", "title");
};
storyCreateBtn = function (p, i) {
var _local2 = createEmptyMovieClip(("face" + p) + i, (p * 10) + i);
_local2.attachMovie("dbzFaces", "clip", 1);
_local2.clip.gotoAndStop(fighterList[_root["rooster" + p][i][0]][0]);
_local2.clip.pface.gotoAndStop(_root["rooster" + p][i][4]);
if (p == 1) {
_local2._x = 184 - (i * 36);
} else {
_local2._x = 284 + (i * 36);
}
_local2._y = 98;
if (i > 5) {
if (p == 1) {
_local2._x = 4 + ((_root["rooster" + p].length - i) * 36);
} else {
_local2._x = 464 - ((_root["rooster" + p].length - i) * 36);
}
_local2._y = 54;
}
};
updateStory = function () {
if (rooster1) {
cleanStoryBtn(1, rooster1.length);
}
if (rooster2) {
cleanStoryBtn(2, rooster2.length);
}
fleche31._visible = (fleche32._visible = true);
fleche41._visible = (fleche42._visible = true);
var _local3;
switch (gameMode) {
case "story" :
_local3 = (("c" + dbzChapter) + "e") + dbzEpisode;
btn3.txt.htmlText = chapterList[dbzChapter];
btn4.txt.htmlText = _root["episodeList" + dbzChapter][dbzEpisode];
if (dbzChapter == 0) {
fleche31._visible = false;
}
if (dbzChapter == (chapterList.length - 1)) {
fleche32._visible = false;
}
if (dbzEpisode == 0) {
fleche41._visible = false;
}
if (dbzEpisode == (_root["episodeList" + dbzChapter].length - 1)) {
fleche42._visible = false;
}
if (dbzChapter == dbzChapterMax) {
fleche32._visible = false;
if (dbzEpisode == dbzEpisodeMax) {
fleche42._visible = false;
}
}
break;
case "oav" :
_local3 = (("oav" + dbzChapterOAV) + "e") + dbzEpisodeOAV;
btn3.txt.htmlText = oavList[dbzChapterOAV];
btn4.txt.htmlText = _root["oavEpisodeList" + dbzChapterOAV][dbzEpisodeOAV];
if (dbzChapterOAV == 0) {
fleche31._visible = false;
}
if (dbzChapterOAV == (chapterList.length - 1)) {
fleche32._visible = false;
}
if (dbzEpisodeOAV == 0) {
fleche41._visible = false;
}
if (dbzEpisodeOAV == (_root["oavEpisodeList" + dbzChapterOAV].length - 1)) {
fleche42._visible = false;
}
if (dbzChapterOAV != dbzChapterMaxOAV) {
break;
}
fleche32._visible = false;
if (dbzEpisodeOAV != dbzEpisodeMaxOAV) {
break;
}
fleche42._visible = false;
}
storyData(_local3);
storyTxt.txt._y = (storyTxt.fond._height * 0.5) - (storyTxt.txt._height * 0.5);
var _local2 = 0;
while (_local2 < rooster1.length) {
storyCreateBtn(1, _local2);
_local2++;
}
_local2 = 0;
while (_local2 < rooster2.length) {
storyCreateBtn(2, _local2);
_local2++;
}
setupBG(GC.bg.choice);
};
updateStory();
onEnterFrame = function () {
moveClouds();
};
};
convertNameData = function () {
var _local3 = 1;
while (_local3 <= 2) {
var _local2 = 0;
while (_local2 < _root["rooster" + _local3].length) {
_root["rooster" + _local3][_local2][0] = nameToNumber(_root["rooster" + _local3][_local2][0]);
_local2++;
}
_local3++;
}
};
nameToNumber = function (name) {
var _local1 = 0;
while (_local1 < fighterList.length) {
if (name == fighterList[_local1][0]) {
return(_local1);
}
if (_local1 == (fighterList.length - 1)) {
trace("ERROR: could not find " + name);
}
_local1++;
}
};
copyRoosterData = function (p, n) {
var _local2 = _root["rooster" + p];
var _local3 = GC[("p" + p) + n];
_local3.hpmax = _local2[n][_HP] * 100;
_local3.ki = _local2[n][_KI] * 100;
_local3.kimax = _local2[n][_KIMAX] * 100;
_local3.lvl = _local2[n][_LVL];
_local3.lvlmax = _local2[n][_LVLMAX];
};
screenStories = function () {
_quality = "HIGH";
GC.bg._alpha = 40;
GC.bg._x = (GC.bg._y = 0);
stopTimer = 0;
title.gotoAndStop("stories");
initMenuStory = function (i) {
var _local2 = _root["btn" + i];
var flecheTemp1 = _root[("fleche" + i) + "1"];
var flecheTemp2 = _root[("fleche" + i) + "2"];
_local2.btn.onRollOver = function () {
soundPlayer("s_rollover");
flecheTemp1.play();
flecheTemp2.play();
};
_local2.btn.onRollOut = function () {
flecheTemp1.gotoAndStop(1);
flecheTemp2.gotoAndStop(1);
};
};
initArrow(3);
initMenuStory(3);
nextChapter = function () {
soundPlayer("s_select");
switch (gameMode) {
case "stories" :
dbzChapter++;
dbzEpisode = 0;
break;
case "oav" :
dbzChapterOAV++;
dbzEpisodeOAV = 0;
}
updateStory();
};
previousChapter = function () {
soundPlayer("s_select");
switch (gameMode) {
case "stories" :
dbzChapter--;
dbzEpisode = 0;
break;
case "oav" :
dbzChapterOAV--;
dbzEpisodeOAV = 0;
}
updateStory();
};
btn3.btn.onPress = (fleche32.onPress = function () {
if (fleche32._visible) {
nextChapter();
}
});
fleche31.onPress = function () {
previousChapter();
};
btnBack.onRollOver = function () {
soundPlayer("s_rollover");
};
btnBack.onPress = function () {
soundPlayer("s_cancel");
switchScreen("stories", "title");
};
};
screenBudokai = function () {
mbat = (mbats = undefined);
musicPlayer("m_versus");
stopTimer = 0;
GC.bg.choice = "budokai";
setupBG(GC.bg.choice);
GC.bg._alpha = 40;
panelCoverflow._visible = false;
title.gotoAndStop("budokai");
var maxperso;
if (cheatcode) {
maxperso = fighterList.length;
} else {
maxperso = dbzFighterList.length;
}
i = 1;
while (i <= 7) {
_root[("match" + i) + "Winner"] = 0;
i++;
}
budoChoice = new Array();
randomAllBudokai = function () {
var _local1 = 0;
while (_local1 < 8) {
budoChoice[_local1] = random(maxperso);
_local1++;
}
while (budoChoice[0] == budoChoice[1]) {
budoChoice[1] = random(maxperso);
}
while ((budoChoice[0] == budoChoice[2]) || (budoChoice[1] == budoChoice[2])) {
budoChoice[2] = random(maxperso);
}
while (((budoChoice[0] == budoChoice[3]) || (budoChoice[1] == budoChoice[3])) || (budoChoice[2] == budoChoice[3])) {
budoChoice[3] = random(maxperso);
}
while ((((budoChoice[0] == budoChoice[4]) || (budoChoice[1] == budoChoice[4])) || (budoChoice[2] == budoChoice[4])) || (budoChoice[3] == budoChoice[4])) {
budoChoice[4] = random(maxperso);
}
while (((((budoChoice[0] == budoChoice[5]) || (budoChoice[1] == budoChoice[5])) || (budoChoice[2] == budoChoice[5])) || (budoChoice[3] == budoChoice[5])) || (budoChoice[4] == budoChoice[5])) {
budoChoice[5] = random(maxperso);
}
while ((((((budoChoice[0] == budoChoice[6]) || (budoChoice[1] == budoChoice[6])) || (budoChoice[2] == budoChoice[6])) || (budoChoice[3] == budoChoice[6])) || (budoChoice[4] == budoChoice[6])) || (budoChoice[5] == budoChoice[6])) {
budoChoice[6] = random(maxperso);
}
while (((((((budoChoice[0] == budoChoice[7]) || (budoChoice[1] == budoChoice[7])) || (budoChoice[2] == budoChoice[7])) || (budoChoice[3] == budoChoice[7])) || (budoChoice[4] == budoChoice[7])) || (budoChoice[5] == budoChoice[7])) || (budoChoice[6] == budoChoice[7])) {
budoChoice[7] = random(maxperso);
}
};
randomAllBudokai();
budoN = [1, 2, 3, 4, 5, 6, 7, 8];
budoCOM = [0, 1, 1, 1, 1, 1, 1, 1];
updateFaceBudokai = function (i) {
var _local2 = _root[("p" + i) + "Face"];
if (cheatcode) {
_local2.gotoAndStop(fighterList[budoChoice[i]][0]);
} else {
_local2.gotoAndStop(fighterList[dbzFighterList[budoChoice[i]]][0]);
}
_local2.pface.stop();
};
initMenuBudokai = function (i) {
var flecheTemp1 = _root[("fleche" + i) + "1"];
var flecheTemp2 = _root[("fleche" + i) + "2"];
var btnTemp = _root["btn" + i];
var _local2 = _root[("p" + i) + "Face"];
btnTemp.txt.text = getBudoName(i);
updateFaceBudokai(i);
btnTemp.btn.onRollOver = function () {
soundPlayer("s_rollover");
flecheTemp1.play();
flecheTemp2.play();
};
btnTemp.btn.onRollOut = function () {
flecheTemp1.gotoAndStop(1);
flecheTemp2.gotoAndStop(1);
};
btnTemp.btn.onPress = function () {
soundPlayer("s_select");
if (budoCOM[i]) {
budoCOM[i] = 0;
} else {
budoCOM[i] = 1;
}
btnTemp.txt.text = getBudoName(i);
};
_local2.onPress = function () {
soundPlayer("s_select");
createCoverflow(maxperso, i);
};
};
var i = 0;
while (i < 8) {
initMenuBudokai(i);
i++;
}
initSlider(slideHP, "hp", 2);
initSlider(slideKI, "ki", 2);
initSlider(slideLVL, "lvl", 4);
initSlider(slideTime, "time", 3);
btnRandom.onRollOver = function () {
soundPlayer("s_rollover");
};
btnRandom.onPress = function () {
soundPlayer("s_ok");
randomAllBudokai();
var _local1 = 0;
while (_local1 < 8) {
updateFaceBudokai(_local1);
_local1++;
}
xSlider(slideHP, random(5));
xSlider(slideKI, random(5));
xSlider(slideLVL, random(5));
xSlider(slideTime, random(5));
};
btnNext.onRollOver = function () {
soundPlayer("s_rollover");
};
btnNext.onPress = function () {
soundPlayer("s_ok");
var _local3 = new Array(1, 1, 1, 1, 1, 1, 1, 1);
var _local4 = new Array(1, 1, 1, 1, 1, 1, 1, 1);
var _local6 = new Array(1, 1, 1, 1, 1, 1, 1, 1);
var _local5 = new Array(1, 1, 1, 1, 1, 1, 1, 1);
var _local2 = 0;
while (_local2 < 8) {
var _local1 = random(8);
while (_local3[_local1] == 0) {
_local1 = random(8);
}
_local3[_local1] = 0;
_local4[_local2] = budoN[_local1];
_local6[_local2] = budoCOM[_local1];
_local5[_local2] = budoChoice[_local1];
_local2++;
}
_local2 = 0;
while (_local2 < 8) {
budoN[_local2] = _local4[_local2];
budoChoice[_local2] = _local5[_local2];
budoCOM[_local2] = _local6[_local2];
_local2++;
}
budokaiMatch = 1;
phpmax = 1 + slideHP.x;
pkimax = 1 + slideKI.x;
plvlmax = 1 + slideLVL.x;
gameTimeMax = 300 * slideTime.x;
switchScreen("budokai", "grid");
};
btnBack.onRollOver = function () {
soundPlayer("s_rollover");
};
btnBack.onPress = function () {
soundPlayer("s_cancel");
switchScreen("budokai", "title");
};
onEnterFrame = function () {
moveClouds();
};
};
screenGrid = function () {
_quality = "HIGH";
mbat = (mbats = undefined);
musicPlayer("m_budokai");
stopTimer = 0;
cleanRoosters();
title.gotoAndStop("budokai");
randomBG();
setupBG(GC.bg.choice);
GC.bg._alpha = 40;
panelQuit._visible = false;
panelQuit.back.useHandCursor = false;
panelQuit.back.onPress = function () {
};
panelQuit.btn1.onRollOver = function () {
soundPlayer("s_rollover");
};
panelQuit.btn2.onRollOver = function () {
soundPlayer("s_rollover");
};
panelQuit.btn1.onPress = function () {
soundPlayer("s_ok");
switchScreen("grid", "title");
};
panelQuit.btn2.onPress = function () {
soundPlayer("s_cancel");
panelQuit._visible = false;
};
panelWatch._visible = false;
panelWatch.back.useHandCursor = false;
panelWatch.back.onPress = function () {
};
panelWatch.btn1.onRollOver = function () {
soundPlayer("s_rollover");
};
panelWatch.btn2.onRollOver = function () {
soundPlayer("s_rollover");
};
panelWatch.btn1.onPress = function () {
soundPlayer("s_ok");
switchScreen("grid", "ready");
};
panelWatch.btn2.onPress = function () {
soundPlayer("s_ok");
_root[("match" + budokaiMatch) + "Winner"] = random(2) + 1;
budokaiMatch++;
switchScreen("grid", "grid");
};
panelControl._visible = false;
panelControl.back.useHandCursor = false;
panelControl.back.onPress = function () {
};
panelControl.btn1.onRollOver = function () {
soundPlayer("s_rollover");
};
panelControl.btn2.onRollOver = function () {
soundPlayer("s_rollover");
};
panelControl.btn1.onPress = function () {
soundPlayer("s_ok");
hookControls2();
switchScreen("grid", "ready");
};
panelControl.btn2.onPress = function () {
soundPlayer("s_ok");
switchScreen("grid", "ready");
};
var _local2 = 1;
while (_local2 <= 15) {
var _local3 = _root["way" + _local2];
_local3._visible = false;
_local2++;
}
initFaces = function (i) {
_root[("p" + i) + "txt"].gotoAndStop(1);
_root[("p" + i) + "txt"].name.text = getBudoName(i);
if (cheatcode) {
_root[("p" + i) + "Face"].gotoAndStop(fighterList[budoChoice[i]][0]);
} else {
_root[("p" + i) + "Face"].gotoAndStop(fighterList[dbzFighterList[budoChoice[i]]][0]);
}
_root[("p" + i) + "Face"].pface.stop();
};
_local2 = 0;
while (_local2 < 8) {
initFaces(_local2);
_local2++;
}
fighterOut = function (i) {
_root[("p" + i) + "Face"]._alpha = 50;
};
switch (budokaiMatch) {
case 1 :
case 2 :
case 3 :
case 4 :
_root[("p" + ((budokaiMatch * 2) - 2)) + "txt"].gotoAndStop(2);
_root[("p" + ((budokaiMatch * 2) - 1)) + "txt"].gotoAndStop(2);
break;
case 5 :
_root[("p" + (match1Winner - 1)) + "txt"].gotoAndStop(2);
_root[("p" + (match2Winner + 1)) + "txt"].gotoAndStop(2);
break;
case 6 :
_root[("p" + (match3Winner + 3)) + "txt"].gotoAndStop(2);
_root[("p" + (match4Winner + 5)) + "txt"].gotoAndStop(2);
break;
case 7 :
switch (match5Winner) {
case 1 :
switch (match1Winner) {
case 1 :
p0txt.gotoAndStop(2);
break;
case 2 :
p1txt.gotoAndStop(2);
}
break;
case 2 :
switch (match2Winner) {
case 1 :
p2txt.gotoAndStop(2);
break;
case 2 :
p3txt.gotoAndStop(2);
}
}
switch (match6Winner) {
case 1 :
switch (match3Winner) {
case 1 :
p4txt.gotoAndStop(2);
break;
case 2 :
p5txt.gotoAndStop(2);
}
break;
case 2 :
switch (match4Winner) {
case 1 :
p6txt.gotoAndStop(2);
break;
case 2 :
p7txt.gotoAndStop(2);
}
}
}
switch (match1Winner) {
case 1 :
fighterOut(1);
way1._visible = true;
break;
case 2 :
fighterOut(0);
way2._visible = true;
}
switch (match2Winner) {
case 1 :
fighterOut(3);
way3._visible = true;
break;
case 2 :
fighterOut(2);
way4._visible = true;
}
switch (match3Winner) {
case 1 :
fighterOut(5);
way5._visible = true;
break;
case 2 :
fighterOut(4);
way6._visible = true;
}
switch (match4Winner) {
case 1 :
fighterOut(7);
way7._visible = true;
break;
case 2 :
fighterOut(6);
way8._visible = true;
}
switch (match5Winner) {
case 1 :
fighterOut(2);
fighterOut(3);
way9._visible = true;
break;
case 2 :
fighterOut(0);
fighterOut(1);
way10._visible = true;
}
switch (match6Winner) {
case 1 :
fighterOut(6);
fighterOut(7);
way11._visible = true;
break;
case 2 :
fighterOut(4);
fighterOut(5);
way12._visible = true;
}
switch (match7Winner) {
case 1 :
fighterOut(4);
fighterOut(5);
fighterOut(6);
fighterOut(7);
way13._visible = (way15._visible = true);
break;
case 2 :
fighterOut(0);
fighterOut(1);
fighterOut(2);
fighterOut(3);
way14._visible = (way15._visible = true);
}
initPlayerBudokai = function (i, j) {
var _local2 = _root["k" + i];
var _local3 = getBudoName(j);
_local2.choice = budoChoice[j];
_local2.com = budoCOM[j];
if (cheatcode) {
_local2.name = (_local3 + "- ") + fighterList[_local2.choice][1][0];
} else {
_local2.name = (_local3 + "- ") + fighterList[dbzFighterList[_local2.choice]][1][0];
}
};
btnBack.onRollOver = function () {
soundPlayer("s_rollover");
};
btnBack.onPress = function () {
soundPlayer("s_cancel");
panelQuit._visible = true;
};
btnNext.onRollOver = function () {
soundPlayer("s_rollover");
};
btnNext.onPress = function () {
soundPlayer("s_ok");
switch (budokaiMatch) {
case 1 :
case 2 :
case 3 :
case 4 :
initPlayerBudokai(1, (budokaiMatch * 2) - 2);
initPlayerBudokai(2, (budokaiMatch * 2) - 1);
break;
case 5 :
switch (match1Winner) {
case 1 :
initPlayerBudokai(1, 0);
break;
case 2 :
initPlayerBudokai(1, 1);
}
switch (match2Winner) {
case 1 :
initPlayerBudokai(2, 2);
break;
case 2 :
initPlayerBudokai(2, 3);
}
break;
case 6 :
switch (match3Winner) {
case 1 :
initPlayerBudokai(1, 4);
break;
case 2 :
initPlayerBudokai(1, 5);
}
switch (match4Winner) {
case 1 :
initPlayerBudokai(2, 6);
break;
case 2 :
initPlayerBudokai(2, 7);
}
break;
case 7 :
switch (match5Winner) {
case 1 :
switch (match1Winner) {
case 1 :
initPlayerBudokai(1, 0);
break;
case 2 :
initPlayerBudokai(1, 1);
}
break;
case 2 :
switch (match2Winner) {
case 1 :
initPlayerBudokai(1, 2);
break;
case 2 :
initPlayerBudokai(1, 3);
}
}
switch (match6Winner) {
case 1 :
switch (match3Winner) {
case 1 :
initPlayerBudokai(2, 4);
break;
case 2 :
initPlayerBudokai(2, 5);
}
break;
case 2 :
switch (match4Winner) {
case 1 :
initPlayerBudokai(2, 6);
break;
case 2 :
initPlayerBudokai(2, 7);
}
}
}
gameTime = gameTimeMax;
rooster1[0][0] = k1.choice;
rooster2[0][0] = k2.choice;
rooster1[0][_HP] = (rooster2[0][_HP] = phpmax);
rooster1[0][_KI] = (rooster2[0][_KI] = 1);
rooster1[0][_KIMAX] = (rooster2[0][_KIMAX] = pkimax);
rooster1[0][_LVL] = (rooster2[0][_LVL] = 1);
if (cheatcode) {
rooster1[0][_LVLMAX] = Math.min(plvlmax, fighterList[k1.choice].length - 1);
rooster2[0][_LVLMAX] = Math.min(plvlmax, fighterList[k2.choice].length - 1);
} else {
rooster1[0][_LVLMAX] = Math.min(plvlmax, fighterList[dbzFighterList[k1.choice]].length - 1);
rooster2[0][_LVLMAX] = Math.min(plvlmax, fighterList[dbzFighterList[k2.choice]].length - 1);
}
if (!(budokaiMatch === 8)) {
if (k1.com) {
if (k2.com) {
panelWatch._visible = true;
} else {
panelControl._visible = true;
}
} else {
switchScreen("grid", "ready");
}
} else {
switchScreen("grid", "title");
}
};
onEnterFrame = function () {
moveClouds();
};
};
screenTutorial = function () {
_quality = "LOW";
Mouse.hide();
var _local5 = "Welcome to<br/>the training.<br/><br/>First, move around<br/>";
if (dbzTouch) {
_local5 = _local5 + "by tapping the screen.";
} else {
_local5 = _local5 + (((((((("with " + k1.sk_up) + " ") + k1.sk_down) + " ") + k1.sk_left) + " ") + k1.sk_right) + " keys.");
}
var _local9 = "Dodging attacks is<br/>the most important!<br/><br/>Double tap<br/>a direction key<br/>to dash.<br/><br/>Try all directions!";
var _local3 = "<br/>to perform your<br/>attack moves.";
if (dbzTouch) {
_local3 = "Tap your ennemy (me)" + _local3;
} else {
_local3 = (("Hold ATTACK<br/>button (" + k1.sk_attack) + ")") + _local3;
}
var _local8 = "To break your<br/>opponents guard,<br/>dash in his direction<br/>while holding ATTACK.<br/>Do it now!";
var _local2 = "<br/>protect yourself and<br/>charge up your KI.";
if (dbzTouch) {
_local2 = "Tap the top-left<br/>DEFENSE button to" + _local2;
} else {
_local2 = (("Hold DEFENSE<br/>button (" + k1.sk_defense) + ") to") + _local2;
}
var _local4 = "When you're far from<br/>your opponent,<br/>";
if (dbzTouch) {
_local4 = _local4 + "tap the top-right<br/>ATTACK button<br/>to concentrate your<br/>KI into a KI blast.<br/><br/>Tap anywhere<br/>to launch it.";
} else {
_local4 = _local4 + (("hold ATTACK (" + k1.sk_attack) + ")<br/>to concentrate your<br/>KI into a KI blast.<br/><br/>Release the key<br/>to launch it.");
}
var _local10 = "It's time for the <br/>Kamehameha!<br/><br/>Charge up all your KI,<br/>then concentrate<br/>a huge KI blast.";
var _local6 = "Well done!<br/><br/>";
if (dbzTouch) {
_local6 = _local6 + "Touch controls<br/>are still in beta...<br/>You can change<br/>the difficulty in<br/>the SETUP menu.";
} else {
_local6 = _local6 + "You can change<br/>the keys or<br/>the difficulty in<br/>the SETUP menu.";
}
var tutorialList = [_local5, _local9, _local3, _local8, _local2, _local4, _local10, _local6];
var iTuto = 0;
var iTutoMax = 10;
bulle.txt.autoSize = true;
changeTutorial = function (i) {
var _local1 = tutorialList[i].split("<br/>").length;
bulle.back._height = 20 * _local1;
bulle.back._y = bulle.footer._y;
bulle.header._y = bulle.footer._y - bulle.back._height;
bulle.txt._y = bulle.header._y + _local1;
bulle.txt.htmlText = tutorialList[i];
};
changeTutorial(iTuto);
mbats = (mbat = random(musicBattleList.length));
musicPlayer(musicBattleList[mbats]);
createListener();
chrono._visible = false;
stopTimer = 0;
gameTimeMax = (gameTime = 0);
setChrono = undefined;
iBall = 100;
iBall1 = 10;
iDust = 200;
iBoum = 300;
setupBG("kamehouse");
GC.bg._alpha = 100;
GC.zoom = 100;
GC.createEmptyMovieClip("p10", 10);
GC.createEmptyMovieClip("p20", 20);
team1 = [0];
team2 = [0];
GC.p10.choice = nameToNumber("goku");
GC.p20.choice = nameToNumber("roshi");
GC.p10.attachMovie("fighter", "p", 2);
GC.p10.p.cible.attachMovie("goku", "p", 1);
GC.p10.p._xscale = (GC.p10.p._yscale = 200);
GC.p10.attachMovie("auraspr", "auraspr", 0);
GC.p10.auraspr._x = -2;
GC.p10.auraspr._y = 17;
GC.p10.auraspr.gotoAndStop("white");
GC.p10.auraspr._alpha = 0;
p1Face.gotoAndStop("goku");
p1Face.pface.gotoAndStop(1);
p1NameTxt.htmlText = p_goku[1][0];
GC.p20.attachMovie("fighter", "p", 1);
GC.p20.p.cible.attachMovie("roshi", "p", 1);
GC.p20.p._xscale = (GC.p20.p._yscale = 200);
p2Face.gotoAndStop("roshi");
p2Face.pface.gotoAndStop(1);
p2NameTxt.htmlText = p_roshi[1][0];
GC.p10._x = 100;
GC.p20._x = 370;
GC.p10._y = (GC.p20._y = _YMAX);
GC.p10.lvl = (GC.p10.lvlmax = 1);
GC.p20.lvl = (GC.p20.lvlmax = 1);
GC.p10.sprite = (GC.p20.sprite = 1);
GC.p10._alpha = (GC.p20._alpha = 100);
GC.p10.hp = (GC.p20.hp = 200);
GC.p10.ki = 0;
GC.p10.kimax = 100;
GC.p20.ki = 100;
GC.p10.wound = 0;
GC.p10.fly = 0;
GC.p10.walk = 1;
GC.p10.attack = 0;
GC.p10.fast = 0;
GC.p10.power = 0;
GC.p10.fire = 0;
GC.p10.waitSomeFrame = 0;
GC.p10.strength = fighterList[GC.p10.choice][GC.p10.lvl][_STRENGTH];
GC.p10.speed = fighterList[GC.p10.choice][GC.p10.lvl][_SPEED];
GC.p10.mind = fighterList[GC.p10.choice][GC.p10.lvl][_MIND];
GC.p10.defense = 0;
GC.p20.defense = 0;
GC.p10.attachMovie("kameha", "kameha", 1);
GC.p10.kameha._alpha = 0;
GC.p10.kameha._x = 8;
GC.p10.kameha._y = 6;
GC.p10.kameha.gotoAndStop(fighterList[GC.p10.choice][GC.p10.lvl][_KIBLAST]);
GC.p10.fastTimer = 0;
GC.p10.timer_k_right = 0;
GC.p10.timer_k_left = 0;
GC.p10.timer_k_up = 0;
GC.p10.timer_k_down = 0;
GC.p10.slide = 0;
GC.p10.slideX = 0;
GC.p10.slideY = 0;
GC.p10._xscale = 100;
GC.p10._yscale = 100;
GC.p20._xscale = -100;
GC.p20._yscale = 100;
xcross = 1;
bigFlash._alpha = 0;
updateJauges();
updatePlayerSprite();
ts1_punch1 = (ts2_punch1 = 0);
ts1_punch2 = (ts2_punch2 = 0);
ts1_aura = (ts2_aura = 0);
ts1_kmeaload = (ts2_kmeaload = 0);
btnATT._visible = (btnDEF._visible = false);
if (dbzTouch) {
btnATT._visible = (btnDEF._visible = true);
Mouse.show();
initControlTouch();
}
var tutoKeyRight = false;
var tutoKeyLeft = false;
var tutoKeyUp = false;
var tutoKeyDown = false;
var tutoFastRight = false;
var tutoFastLeft = false;
var tutoFastUp = false;
var tutoFastDown = false;
var tutoWaitDamage = false;
var tutoWaitSlide = false;
var safe_k_attack = k1.k_attack;
var safe_k_defense = k1.k_defense;
k1.k_attack = null;
k1.k_defense = null;
validateTutorial = function (i) {
soundPlayer("s_tuto");
bigFlash._alpha = 100;
tutoKeyWait = 0;
if (i) {
iTuto = iTuto + i;
} else {
iTuto++;
}
changeTutorial(iTuto);
};
btnNext._visible = false;
btnNext.onRollOver = function () {
soundPlayer("s_rollover");
};
btnNext.onPress = function () {
soundPlayer("s_ok");
dbzMainMenu = 1;
if (k1.k_attack == null) {
k1.k_attack = safe_k_attack;
}
if (k1.k_defense == null) {
k1.k_defense = safe_k_defense;
}
if ((!cheatcode) && (!dbzUnlockStory)) {
switchScreen("tutorial", "unlock", "story");
} else {
switchScreen("tutorial", "title");
}
};
p2Face.useHandCursor = false;
p2Face.onPress = function () {
if ((!dbzUnlockRoshi) && (!cheatcode)) {
soundPlayer("s_tuto");
switchScreen("tutorial", "unlock", "roshi");
}
};
onEnterFrame = function () {
if (bigFlash._alpha > 0) {
bigFlash._alpha = bigFlash._alpha - 5;
}
if (dbzTouch) {
controlTouch(1);
} else {
controlPlayer(1);
}
if (GC.p10._x > 300) {
GC.p10._x = 300;
}
if (GC.p20.hp < 200) {
if (tutoWaitDamage) {
tutoWaitDamage = false;
validateTutorial();
}
GC.p20.hp = 200;
}
updateShadow();
updateJauges();
updatePlayerSprite(1);
switch (iTuto) {
case 0 :
if (dbzTouch) {
if ((GC.p10.gotoX != GC.p10._x) && (GC.p10.gotoY != GC.p10._y)) {
validateTutorial(2);
}
} else {
if (Key.isDown(k1.k_right)) {
tutoKeyRight = true;
}
if (Key.isDown(k1.k_left)) {
tutoKeyLeft = true;
}
if (Key.isDown(k1.k_up)) {
tutoKeyUp = true;
}
if (Key.isDown(k1.k_down)) {
tutoKeyDown = true;
}
if (((tutoKeyRight && (tutoKeyLeft)) && (tutoKeyUp)) && (tutoKeyDown)) {
validateTutorial();
}
}
break;
case 1 :
if (GC.p10.fast == 1) {
if (Key.isDown(k1.k_right)) {
tutoFastRight = true;
}
if (Key.isDown(k1.k_left)) {
tutoFastLeft = true;
}
if (Key.isDown(k1.k_up)) {
tutoFastUp = true;
}
if (Key.isDown(k1.k_down)) {
tutoFastDown = true;
}
}
if (((tutoFastRight && (tutoFastLeft)) && (tutoFastUp)) && (tutoFastDown)) {
k1.k_attack = safe_k_attack;
validateTutorial();
}
break;
case 2 :
if (dbzTouch) {
if (GC.p10.attack) {
validateTutorial(2);
}
} else {
if ((GC.p10.ki <= 10) && (Key.isDown(k1.k_attack))) {
tutoKeyWait++;
}
if (tutoKeyWait == 30) {
validateTutorial();
}
}
break;
case 3 :
if (GC.p10.slide) {
tutoWaitSlide = true;
}
if (tutoWaitSlide && (!GC.p10.slide)) {
k1.k_defense = safe_k_defense;
validateTutorial();
}
break;
case 4 :
if (GC.p10.ki > 50) {
validateTutorial();
}
break;
case 5 :
if (GC.p10.ki > 50) {
GC.p10.ki = 50;
}
var _local1 = 0;
while (_local1 <= 5) {
if (GC["p1ball" + _local1]) {
tutoWaitDamage = true;
}
_local1++;
}
break;
case 6 :
_local1 = 0;
while (_local1 <= _BALLMAX) {
if (GC["p1ball" + _local1]) {
if (GC["p1ball" + _local1].power >= 22) {
tutoWaitDamage = true;
}
}
_local1++;
}
break;
case 7 :
btnNext._visible = true;
Mouse.show();
iTuto = iTutoMax;
}
if (Key.isDown(27)) {
if (k1.k_attack == null) {
k1.k_attack = safe_k_attack;
}
if (k1.k_defense == null) {
k1.k_defense = safe_k_defense;
}
switchScreen("tutorial", "title");
}
if (debug) {
if (Key.isDown(32)) {
if ((!keySpace) && (iTuto < iTutoMax)) {
keySpace = true;
iTuto++;
changeTutorial(iTuto);
}
} else {
keySpace = false;
}
}
};
};
screenReady = function () {
_quality = "LOW";
Mouse.hide();
mbats = (mbat = random(musicBattleList.length));
musicPlayer(musicBattleList[mbats]);
if ((!k1.com) || (!k2.com)) {
createListener();
}
toKill = new Array();
GC.zoom = 100;
iBall = 100;
iBall1 = (iBall2 = 10);
iDust = 200;
iBoum = 300;
GC.bg._alpha = 100;
GC.bg._x = (GC.bg._y = 0);
var _local3 = 1;
while (_local3 <= 2) {
var _local8 = _root["k" + _local3];
var _local7 = 0;
while (_local7 < _root["rooster" + _local3].length) {
var _local2 = GC.createEmptyMovieClip(("p" + _local3) + _local7, (_local3 * 10) + _local7);
_local2.attachMovie("fighter", "p", 2);
_local2.attachMovie("auraspr", "auraspr", 0);
_local2.attachMovie("kameha", "kameha", 1);
_local2.choice = _root["rooster" + _local3][_local7][0];
copyRoosterData(_local3, _local7);
if ((cheatcode || (gameMode == "story")) || (gameMode == "oav")) {
_local2.p.cible.attachMovie(fighterList[_local2.choice][0], "p", 1);
_local2.name = fighterList[_local2.choice][_local2.lvl][0];
_local2.auraspr.gotoAndStop(fighterList[_local2.choice][_local2.lvl][_AURA]);
if (_local7 == 0) {
_root[("p" + _local3) + "Face"].gotoAndStop(fighterList[_local2.choice][0]);
}
} else {
_local2.p.cible.attachMovie(fighterList[dbzFighterList[_local2.choice]][0], "p", 1);
if (gameMode == "budokai") {
_local2.name = _local8.name;
} else {
_local2.name = fighterList[dbzFighterList[_local2.choice]][_local2.lvl][0];
}
_local2.auraspr.gotoAndStop(fighterList[dbzFighterList[_local2.choice]][_local2.lvl][_AURA]);
if (_local7 == 0) {
_root[("p" + _local3) + "Face"].gotoAndStop(fighterList[dbzFighterList[_local2.choice]][0]);
}
}
_local2.p._xscale = (_local2.p._yscale = 200);
_local2.auraspr._x = -2;
_local2.auraspr._y = 17;
_local2.auraspr._alpha = 0;
_local2.kameha._alpha = 0;
_local2.kameha._x = 8;
_local2.kameha._y = 6;
if ((cheatcode || (gameMode == "story")) || (gameMode == "oav")) {
_local2.kameha.gotoAndStop(fighterList[_local2.choice][_local2.lvl][_KIBLAST]);
} else {
_local2.kameha.gotoAndStop(fighterList[dbzFighterList[_local2.choice]][_local2.lvl][_KIBLAST]);
}
if (_local7 == 0) {
_root[("p" + _local3) + "Face"].pface.gotoAndStop(_local2.lvl);
_root[("p" + _local3) + "NameTxt"].htmlText = _local2.name;
}
_local2._y = _YMAX;
_local2.sprite = 1;
_local2.spriteFix = 1;
_local2._alpha = 100;
_local2.wound = 0;
_local2.death = "fall";
_local2.fly = 0;
_local2.walk = 1;
_local2.attack = 0;
_local2.fast = 0;
_local2.power = 0;
_local2.fire = 0;
_local2.waitSomeFrame = 0;
if ((cheatcode || (gameMode == "story")) || (gameMode == "oav")) {
_local2.strength = fighterList[_local2.choice][_local2.lvl][_STRENGTH];
_local2.speed = fighterList[_local2.choice][_local2.lvl][_SPEED];
_local2.mind = fighterList[_local2.choice][_local2.lvl][_MIND];
} else {
_local2.strength = fighterList[dbzFighterList[_local2.choice]][_local2.lvl][_STRENGTH];
_local2.speed = fighterList[dbzFighterList[_local2.choice]][_local2.lvl][_SPEED];
_local2.mind = fighterList[dbzFighterList[_local2.choice]][_local2.lvl][_MIND];
}
_local2.defense = 0;
_local2.fastTimer = 0;
_local2.timer_k_right = 0;
_local2.timer_k_left = 0;
_local2.timer_k_up = 0;
_local2.timer_k_down = 0;
_local2.slide = 0;
_local2.slideX = 0;
_local2.slideY = 0;
_local2._rotation = 0;
_local2.com = 0;
if (_local8.com) {
_local2.com = 1;
_local2.COMtimerh = 0;
_local2.COMtimerhmax = 5;
_local2.COMfasth = 0;
_local2.COMtimerv = 0;
_local2.COMtimervmax = 5;
_local2.COMfastv = 0;
_local2.COMattack = 1;
_local2.COMtimerattack = 0;
_local2.COMtimerattackmax = 5;
_local2.COMtimeraura = 0;
_local2.COMtimerauramax = 5;
_local2.COMspecial = 0;
_local2.COMtimerspecial = 0;
_local2.COMtimerspecialmax = 5;
_local2.strength = Math.max(0, _local2.strength + (dbzDifficulty * 3));
_local2.speed = Math.max(0, _local2.speed + (dbzDifficulty * 3));
_local2.mind = Math.max(0, _local2.mind + (dbzDifficulty * 3));
}
_local2.ID_canJump = false;
_local2.ID_fillKi = false;
_local2.ID_fillHp = false;
_local2.ID_rage = false;
_local2.ID_absorbKi = false;
_local2.ID_stopTime = false;
_local2.ID_absorbLight = false;
_local2.ID_noKi = false;
_local2.ID_noKiBlast = false;
_local2.ID_changeBG = false;
var _local6;
if ((cheatcode || (gameMode == "story")) || (gameMode == "oav")) {
_local6 = fighterList[_local2.choice][_local2.lvl].length;
} else {
_local6 = fighterList[dbzFighterList[_local2.choice]][_local2.lvl].length;
}
if (_local6 > 6) {
var _local4 = 6;
while (_local4 < _local6) {
var _local5;
if ((cheatcode || (gameMode == "story")) || (gameMode == "oav")) {
_local5 = fighterList[_local2.choice][_local2.lvl][_local4];
} else {
_local5 = fighterList[dbzFighterList[_local2.choice]][_local2.lvl][_local4];
}
switch (_local5) {
case "ID_canJump" :
_local2.ID_canJump = true;
break;
case "ID_fillKi" :
_local2.ID_fillKi = true;
break;
case "ID_fillHp" :
_local2.ID_fillHp = true;
break;
case "ID_rage" :
_local2.ID_rage = true;
break;
case "ID_absorbKi" :
_local2.ID_absorbKi = true;
break;
case "ID_stopTime" :
_local2.ID_stopTime = true;
break;
case "ID_absorbLight" :
_local2.ID_absorbLight = true;
break;
case "ID_noKi" :
_local2.ID_noKi = true;
break;
case "ID_noKiBlast" :
_local2.ID_noKiBlast = true;
break;
case "ID_changeBG" :
_local2.ID_changeBG = true;
break;
default :
trace("ERROR: Can't find ID " + _local5);
}
_local4++;
}
}
if (_local2.ID_canJump) {
_local2.canJump = true;
_local2.jumpSpeed = 0;
_local2.jump = 0;
}
if (_local2.ID_fillKi || (_local2.ID_rage)) {
_local2.fillKiTimer = 0;
}
if (_local2.ID_fillHp) {
_local2.fillHpTimer = 0;
}
if (_local2.ID_absorbKi) {
_local2.lvl = (_local2.lvlmax = 2);
}
_local2.hp = _local2.hpmax;
if ((gameMode == "story") || (gameMode == "OAV")) {
} else {
_local2.ki = 50;
}
if (_local2.ID_noKi) {
_local2.ki = 0;
}
_local2.p.cible._y = ((-_local2.lvl) * 20) + 10;
_local7++;
}
_local3++;
}
GC.p10._x = 100;
GC.p10._xscale = 100;
GC.p10._yscale = 100;
GC.p20._x = 400;
GC.p20._xscale = -100;
GC.p20._yscale = 100;
team1 = [0];
team2 = [0];
if (rooster1.length > 1) {
var _local7 = 1;
while (_local7 < rooster1.length) {
team1.push(_local7);
GC["p1" + _local7]._x = _XMIN + ((rooster1.length - _local7) * _XTEAM);
GC["p1" + _local7]._y = _YTEAM;
GC["p1" + _local7]._xscale = 50;
GC["p1" + _local7]._yscale = 50;
_local7++;
}
}
if (rooster2.length > 1) {
var _local7 = 1;
while (_local7 < rooster2.length) {
team2.push(_local7);
GC["p2" + _local7]._x = _XMAX - ((rooster2.length - _local7) * _XTEAM);
GC["p2" + _local7]._y = _YTEAM;
GC["p2" + _local7]._xscale = -50;
GC["p2" + _local7]._yscale = 50;
_local7++;
}
}
teamSwapDepth();
xcross = 1;
updateJauges();
updatePlayerSprite();
updateShadow();
bigFlash._alpha = 0;
stopTimer = 0;
chrono.jauge.gotoAndStop(1);
if (!gameTime) {
chrono._visible = false;
}
ts1_punch1 = (ts2_punch1 = 0);
ts1_punch2 = (ts2_punch2 = 0);
ts1_aura = (ts2_aura = 0);
ts1_kmeaload = (ts2_kmeaload = 0);
onEnterFrame = function () {
moveClouds();
};
if (dbzTouch && (!k1.com)) {
btnATT._visible = (btnDEF._visible = true);
Mouse.show();
} else {
btnATT._visible = (btnDEF._visible = false);
}
};
readyfight = function () {
setChrono = undefined;
if (gameTime > 0) {
setChrono = setInterval(updateGameTime, 100);
}
if (gameMode == "janken") {
switchScreen("ready", "chifumi");
} else {
switchScreen("ready", "fight");
}
};
updateGameTime = function () {
if (!stopTimer) {
gameTime--;
}
chrono.jauge._width = (396 * gameTime) / gameTimeMax;
switch (gameTime) {
case 100 :
chrono.jauge.gotoAndPlay(1);
break;
case 0 :
clearInterval(setChrono);
GC["p1" + team1[0]].death = "fall";
GC["p2" + team1[0]].death = "fall";
var _local3 = GC["p1" + team1[0]].hp;
if (team1.length) {
var _local1 = 1;
while (_local1 < team1.length) {
_local3 = _local3 + GC["p1" + team1[_local1]].hp;
_local1++;
}
}
var _local2 = GC["p2" + team2[0]].hp;
if (team2.length) {
var _local1 = 1;
while (_local1 < team2.length) {
_local2 = _local2 + GC["p2" + team2[_local1]].hp;
_local1++;
}
}
if (_local3 == _local2) {
switch (gameMode) {
case "vs" :
case "budokai" :
case "tagteam" :
switchScreen("fight", "chifumi");
break;
default :
switchScreen("fight", "fightOver", 0);
}
} else {
switch (gameMode) {
case "story" :
case "oav" :
var _local4 = (("c" + dbzChapter) + "e") + dbzEpisode;
if (((_local4 == "c9e3") || (_local4 == "c13e4")) || (_local4 == "c15e2")) {
switchScreen("fight", "fightOver", 1);
} else {
switchScreen("fight", "fightOver", 2);
}
break;
default :
if (_local3 > _local2) {
switchScreen("fight", "fightOver", 1);
}
if (_local3 >= _local2) {
break;
}
switchScreen("fight", "fightOver", 2);
}
}
}
};
screenFight = function () {
onEnterFrame = function () {
var _local2 = GC["p1" + team1[0]];
var _local1 = GC["p2" + team2[0]];
var _local3 = _local2.sprite;
var _local4 = _local1.sprite;
switch (xcross) {
case 1 :
if (((_local2.slide == 0) && (_local2.fire <= 1)) && (_local2.kameha._alpha <= 0)) {
_local2._xscale = 100;
}
if (((_local1.slide == 0) && (_local1.fire <= 1)) && (_local1.kameha._alpha <= 0)) {
_local1._xscale = -100;
}
if (_local2._x > _local1._x) {
xcross = -1;
}
break;
case -1 :
if (((_local2.slide == 0) && (_local2.fire <= 1)) && (_local2.kameha._alpha <= 0)) {
_local2._xscale = -100;
}
if (((_local1.slide == 0) && (_local1.fire <= 1)) && (_local1.kameha._alpha <= 0)) {
_local1._xscale = 100;
}
if (_local2._x > _local1._x) {
break;
}
xcross = 1;
}
testDeath(1);
testDeath(2);
if (toKill.length) {
killingPlayer();
}
if (bigFlash._alpha > 0) {
bigFlash._alpha = bigFlash._alpha - 5;
}
poweringUp = false;
if (k1.com) {
controlComputer(1);
} else if (dbzTouch && (!k1.com)) {
controlTouch(1);
} else {
controlPlayer(1);
}
if (!poweringUp) {
if (k2.com) {
controlComputer(2);
} else {
controlPlayer(2);
}
}
moveClouds();
updateShadow();
updateJauges();
if ((_local3 != _local2.sprite) && (_local2.hp > 0)) {
updatePlayerSprite(1);
}
if ((_local4 != _local1.sprite) && (_local1.hp > 0)) {
updatePlayerSprite(2);
}
if (dbzTouch && ((!_local2.com) || (!_local1.com))) {
zoomEngine(100, undefined, undefined, 2);
} else {
zoomEngine();
}
teamPlacing(1);
teamPlacing(2);
if (Key.isDown(27)) {
cleanGame();
switchScreen("fight", "title");
}
if (debug) {
if (Key.isDown(32)) {
switchScreen("fight", "fightOver", 1);
}
}
};
};
screenPowerUp = function (p, s) {
var t1 = GC[("p" + p) + _root["team" + p][0]];
var t2 = GC[("p" + (3 - p)) + _root["team" + (3 - p)][0]];
var t = 0;
var xNew = Math.min(Math.max(t1._x, 62), 438);
var xSafe = t1._x;
if (xNew == t1._x) {
xNew = 0;
}
line._alpha = 0;
GC.p1._xscale = 100 * xcross;
GC.p2._xscale = -100 * xcross;
t1._alpha = (t2._alpha = 100);
t1.fire = (t2.fire = 0);
t1.waitSomeFrame = (t1.waitSomeFrame = 0);
t1._rotation = (t2._rotation = 0);
if (t1.ID_absorbKi) {
t1.sprite = t1.spriteFix;
}
if (!s) {
t1.lvl++;
}
var aura;
if (cheatcode || (gameMode == "story")) {
aura = fighterList[t1.choice][t1.lvl][_AURA];
} else {
aura = fighterList[dbzFighterList[t1.choice]][t1.lvl][_AURA];
}
onEnterFrame = function () {
moveClouds();
if (bigFlash._alpha > 0) {
bigFlash._alpha = bigFlash._alpha - 5;
}
switch (t) {
case 0 :
case 1 :
case 2 :
case 3 :
case 4 :
case 5 :
case 6 :
case 7 :
case 8 :
case 9 :
if (xNew) {
t1._x = t1._x + ((xNew - t1._x) / 2);
t1.sprite = 11;
}
if (line._alpha < 100) {
line._alpha = line._alpha + 12;
}
if (!t1.ID_absorbKi) {
_root["p" + p].auraspr._alpha = 80;
}
if (t1.kameha._alpha > 0) {
t1.kameha._alpha = t1.kameha._alpha - 25;
}
if (t2.kameha._alpha > 0) {
t2.kameha._alpha = t2.kameha._alpha - 25;
}
zoomEngine(500, t1._x, t1._y - 10, 10);
t++;
break;
case 10 :
_root[("p" + p) + "Face"].pface.gotoAndStop(t1.lvl);
t1.auraspr.gotoAndStop(aura);
t1.sprite = 1;
t1.p.cible._y = ((-t1.lvl) * 20) + 10;
if ((!t1.ID_absorbKi) && (!t1.ID_rage)) {
t1.auraspr._alpha = 400;
t1.ki = 50;
updateJauges();
}
var _local4 = 0;
while (_local4++ , _local4 < 40) {
var _local3 = (t1._x + random(100)) - 50;
var _local2 = (t1._y + random(100)) - 50;
createDust(_local3, _local2);
}
bigFlash._alpha = 100;
soundPlayer("s_powerup");
t++;
}
if (t2.ID_absorbLight && (((aura == "ssj") || (aura == "ssj2")) || (aura == "ssj3"))) {
switch (t) {
default :
if (t > 10) {
if (line._alpha > 0) {
line._alpha = line._alpha - 8;
}
}
t++;
break;
case 20 :
t1.lvl--;
if (t1.lvl < 1) {
t1.lvl = 1;
}
t1.ki = 0;
updateJauges();
_root[("p" + p) + "Face"].pface.gotoAndStop(t1.lvl);
var _local6;
if (cheatcode || (gameMode == "story")) {
_local6 = fighterList[t1.choice][t1.lvl][_AURA];
} else {
_local6 = fighterList[dbzFighterList[t1.choice]][t1.lvl][_AURA];
}
t1.auraspr.gotoAndStop(_local6);
t1.auraspr._alpha = 100;
t1.sprite = 8;
t1.p.cible._y = ((-t1.lvl) * 20) + 10;
t++;
break;
case 30 :
case 31 :
case 32 :
case 33 :
case 34 :
case 35 :
case 36 :
case 37 :
case 38 :
case 39 :
zoomEngine(500, t2._x, t2._y - 10, 10);
t++;
break;
case 40 :
var _local5 = calculateAngle(t1, t2);
t2.sprite = 16;
switch (p + xcross) {
case 1 :
case 2 :
if (_local5 < (-_ANGLEMAX)) {
t2.sprite = 17;
}
if (_local5 > _ANGLEMAX) {
t2.sprite = 18;
}
break;
case 0 :
case 3 :
if (_local5 < (-_ANGLEMAX)) {
t2.sprite = 18;
}
if (_local5 <= _ANGLEMAX) {
break;
}
t2.sprite = 17;
}
t2.ki = t2.ki + 100;
updateJauges();
if (_root["k" + p].com) {
t1.COMtimerspecial = t1.COMtimerspecialmax;
}
if (t2.ki > (t2.kimax - 100)) {
t2.lvl = 2;
_root[("p" + (3 - p)) + "Face"].pface.gotoAndStop(t2.lvl);
t2.auraspr.gotoAndStop(aura);
t2.p.cible._y = ((-t2.lvl) * 20) + 10;
}
t2.auraspr._alpha = 400;
_local4 = 0;
while (_local4++ , _local4 < 40) {
var _local3 = (t1._x + random(100)) - 50;
var _local2 = (t1._y + random(100)) - 50;
createDust(_local3, _local2);
}
bigFlash._alpha = 100;
soundPlayer("s_powerup");
t++;
if (t2.ki >= t2.kimax) {
t2.death = "blow";
t2.hp = (t2.ki = 0);
t2.sprite = 8;
kaboum(t2._x, t2._y, 30);
}
break;
case 50 :
initPowerLevel(1);
initPowerLevel(2);
switchScreen("powerUp", "fight");
}
} else if (!(t === 30)) {
if (t > 10) {
if (line._alpha > 0) {
line._alpha = line._alpha - 8;
}
}
if (t > 24) {
if (xNew) {
t1._x = t1._x + ((xSafe - t1._x) / 2);
t1.sprite = 11;
}
}
t++;
} else {
initPowerLevel(1);
initPowerLevel(2);
switchScreen("powerUp", "fight");
}
updatePlayerSprite(1);
updatePlayerSprite(2);
updateShadow();
moveClouds();
};
};
screenCloseCombat = function () {
var t1 = GC["p1" + team1[0]];
var t2 = GC["p2" + team2[0]];
var t = 0;
line._alpha = 0;
fleche._visible = false;
t1._xscale = 100 * xcross;
t2._xscale = -100 * xcross;
t1._alpha = (t2._alpha = 100);
t1._rotation = (t2._rotation = 0);
if (t1.ID_canFly) {
t1.fly = 1;
} else {
t1.jump = 2;
}
if (t2.ID_canFly) {
t1.fly = 1;
} else {
t2.jump = 2;
}
t1.sprite = (t2.sprite = 1);
fightwinner = (timerspr = (timerfight = 0));
timerfightmax = 5 + random(20);
zoom1x = (Math.min(Math.max(((t1._x + t2._x) / 2) - (xcross * 12), 74 - (xcross * 12)), 426 - (xcross * 12)) - t1._x) / 5;
zoom2x = (Math.min(Math.max(((t1._x + t2._x) / 2) + (xcross * 12), 74 + (xcross * 12)), 426 + (xcross * 12)) - t2._x) / 5;
zoom1y = (Math.min(Math.max(((t1._y + t2._y) / 2) + 20, _YMIN), _YMAX) - t1._y) / 5;
zoom2y = (Math.min(Math.max(((t1._y + t2._y) / 2) + 20, _YMIN), _YMAX) - t2._y) / 5;
if (t1.com || (t2.com)) {
zoomcom1 = (zoomcom2 = (zoomcom1max = (zoomcom2max = 0)));
while (zoomcom1max == zoomcom2max) {
zoomcom1max = random(30 - (t1.mind * 2)) + 4;
zoomcom2max = random(30 - (t2.mind * 2)) + 4;
}
}
sensfleche = random(4);
fleche._rotation = sensfleche * 90;
onEnterFrame = function () {
if (toKill.length) {
killingPlayer();
}
if (bigFlash._alpha > 0) {
bigFlash._alpha = bigFlash._alpha - 5;
}
updatePlayerSprite(1);
updatePlayerSprite(2);
switch (t) {
case 0 :
case 1 :
case 2 :
case 3 :
case 4 :
line._alpha = line._alpha + 12;
if (t1.kameha._alpha > 0) {
t1.kameha._alpha = t1.kameha._alpha - 25;
}
if (t2.kameha._alpha > 0) {
t2.kameha._alpha = t2.kameha._alpha - 25;
}
if (t1.auraspr._alpha > 0) {
t1.auraspr._alpha = t1.auraspr._alpha - 25;
}
if (t2.auraspr._alpha > 0) {
t2.auraspr._alpha = t2.auraspr._alpha - 25;
}
t1._x = t1._x + zoom1x;
t2._x = t2._x + zoom2x;
t1._y = t1._y + zoom1y;
t2._y = t2._y + zoom2y;
zoomEngine(400);
t++;
break;
case 5 :
switch (timerspr) {
case 0 :
t1.sprite = 11 + random(4);
t2.sprite = 11 + random(4);
soundPunch(1);
default :
timerspr++;
break;
case 3 :
timerspr = 0;
}
switch (timerfight) {
case timerfightmax - 1 :
fleche._visible = true;
default :
timerfight++;
break;
case timerfightmax :
switch (t1.com) {
case 0 :
if (Key.isDown(k1.k_up)) {
if (sensfleche == 0) {
fightwinner = 1;
} else {
fightwinner = 2;
}
}
if (Key.isDown(k1.k_right)) {
if (sensfleche == 1) {
fightwinner = 1;
} else {
fightwinner = 2;
}
}
if (Key.isDown(k1.k_down)) {
if (sensfleche == 2) {
fightwinner = 1;
} else {
fightwinner = 2;
}
}
if (Key.isDown(k1.k_left)) {
if (sensfleche == 3) {
fightwinner = 1;
} else {
fightwinner = 2;
}
}
break;
case 1 :
if (!(zoomcom1 === zoomcom1max)) {
zoomcom1++;
} else {
fightwinner = 1;
}
}
switch (t2.com) {
case 0 :
if (Key.isDown(k2.k_up)) {
if (sensfleche == 0) {
fightwinner = 2;
} else {
fightwinner = 1;
}
}
if (Key.isDown(k2.k_right)) {
if (sensfleche == 1) {
fightwinner = 2;
} else {
fightwinner = 1;
}
}
if (Key.isDown(k2.k_down)) {
if (sensfleche == 2) {
fightwinner = 2;
} else {
fightwinner = 1;
}
}
if (Key.isDown(k2.k_left)) {
if (sensfleche == 3) {
fightwinner = 2;
} else {
fightwinner = 1;
}
}
break;
case 1 :
if (!(zoomcom2 === zoomcom2max)) {
zoomcom2++;
} else {
fightwinner = 2;
}
}
switch (fightwinner) {
case 1 :
zoomp1x = t1._x - (50 * xcross);
zoomp1y = t1._y - 60;
zoomp2x = t2._x + (40 * xcross);
zoomp2y = t2._y;
t2.wound = 30;
t2.hp = t2.hp - (20 + (t1.lvl * 2));
t = 6;
break;
case 2 :
zoomp1x = t1._x - (40 * xcross);
zoomp1y = t1._y;
zoomp2x = t2._x + (50 * xcross);
zoomp2y = t2._y - 60;
t1.wound = 30;
t1.hp = t1.hp - (20 + (t2.lvl * 2));
t = 6;
}
}
break;
case 6 :
case 7 :
case 8 :
case 9 :
case 10 :
line._alpha = line._alpha - 12;
zoomEngine();
t++;
break;
case 11 :
GC.bg._x = (GC.bg._y = 0);
t1._rotation = (t2._rotation = 0);
switchScreen("closeCombat", "fight");
}
updateShadow();
moveClouds();
};
};
screenPowerBall = function (power) {
if ((!k1.com) || (!k2.com)) {
Key.removeListener(ecouteur);
}
var t1 = GC["p1" + team1[0]];
var t2 = GC["p2" + team2[0]];
soundPlayer("s_powerball");
var keyClash = 0;
var t = 0;
tIA1 = random(1000);
tIA2 = random(1000);
var duelp1x = t1._x;
var duelp1y = t1._y;
var duelp2x = t2._x;
var duelp2y = t2._y;
p1waitkey = 1;
p2waitkey = 1;
t1.fire = (t2.fire = 3);
t1.waitSomeFrame = (t2.waitSomeFrame = 0);
t1._alpha = (t2._alpha = (t1.kameha._alpha = (t2.kameha._alpha = 100)));
t1._rotation = (t2._rotation = 0);
line._alpha = (ballclash._alpha = 0);
if ((cheatcode || (gameMode == "story")) || (gameMode == "oav")) {
ballclash.ball1.gotoAndStop(fighterList[t1.choice][t1.lvl][_KIBLAST]);
ballclash.ball2.gotoAndStop(fighterList[t2.choice][t2.lvl][_KIBLAST]);
} else {
ballclash.ball1.gotoAndStop(fighterList[dbzFighterList[t1.choice]][t1.lvl][_KIBLAST]);
ballclash.ball2.gotoAndStop(fighterList[dbzFighterList[t2.choice]][t2.lvl][_KIBLAST]);
}
var _local5 = calculateDistance(t1, t2);
if (_local5 < 250) {
var _local13 = (t1._y - t2._y) / Math.abs(t1._y - t2._y);
var _local11 = xcross * (250 - _local5);
var _local12 = _local13 * (125 - Math.floor(_local5 / 2));
duelp1x = Math.min(_XMAX, Math.max(_XMIN, t1._x - _local11));
duelp1y = Math.min(_YMAX, Math.max(_YMIN, t1._y + _local12));
duelp2x = Math.min(_XMAX, Math.max(_XMIN, t2._x + _local11));
duelp2y = Math.min(_YMAX, Math.max(_YMIN, t2._y - _local12));
}
var _local9 = calculateAngle(t1, t2);
switch (xcross) {
case 1 :
if (_local9 < (-_ANGLEMAX)) {
t1.sprite = 17;
t2.sprite = 18;
}
if (_local9 > _ANGLEMAX) {
t1.sprite = 18;
t2.sprite = 17;
}
break;
case -1 :
if (_local9 < (-_ANGLEMAX)) {
t1.sprite = 18;
t2.sprite = 17;
}
if (_local9 <= _ANGLEMAX) {
break;
}
t1.sprite = 17;
t2.sprite = 18;
}
updatePlayerSprite(1);
updatePlayerSprite(2);
onEnterFrame = function () {
zoomEngine(100);
if (toKill.length) {
killingPlayer();
}
if (bigFlash._alpha > 0) {
bigFlash._alpha = bigFlash._alpha - 5;
}
switch (t) {
default :
if (t1.auraspr._alpha > 0) {
t1.auraspr._alpha = t1.auraspr._alpha - 20;
}
if (t2.auraspr._alpha > 0) {
t2.auraspr._alpha = t2.auraspr._alpha - 20;
}
line._alpha = line._alpha + 5;
if (ballclash._alpha <= 100) {
ballclash._alpha = ballclash._alpha + 10;
}
t1._x = t1._x + ((duelp1x - t1._x) / 10);
t1._y = t1._y + ((duelp1y - t1._y) / 10);
t2._x = t2._x + ((duelp2x - t2._x) / 10);
t2._y = t2._y + ((duelp2y - t2._y) / 10);
pente = (t2._y - t1._y) / (((((-_KAMEHAX) * 2) * xcross) + t2._x) - t1._x);
var _local11 = Math.round((Math.atan(pente) * 180) / Math.PI);
line._rotation = _local11;
t1.kameha._rotation = _local11 * xcross;
t2.kameha._rotation = -t1.kameha._rotation;
if (t1._x < t2._x) {
ballclash._rotation = _local11;
} else {
ballclash._rotation = _local11 + 180;
}
bor = (_KAMEHAY + t1._y) - (((_KAMEHAX * xcross) + t1._x) * pente);
line._x = (ballclash._x = (t1._x + t2._x) / 2);
line._y = (((_KAMEHAY * 2) + t1._y) + t2._y) / 2;
ballclash._y = (pente * ballclash._x) + bor;
t1.kameha.go._width = calculateDistance(ballclash, t1) - 32;
t2.kameha.go._width = calculateDistance(ballclash, t2) - 32;
t++;
break;
case 21 :
quake();
ballclash._x = ballclash._x + ((keyClash * (t2._x - t1._x)) / 2000);
ballclash._y = (pente * ballclash._x) + bor;
var _local3 = 1;
while (_local3 <= 2) {
var _local2 = GC[("p" + _local3) + _root["team" + _local3][0]];
var _local10 = GC[("p" + (3 - _local3)) + _root["team" + (3 - _local3)][0]];
var _local5 = _root["k" + _local3];
var _local4 = posnega(_local3);
switch (_local5.com) {
case 0 :
if (dbzTouch && (_local3 == 1)) {
if (p1waitkey == 2) {
p1waitkey = 1;
createDust(_local2._x, _local2._y, "sweat");
keyClash = keyClash + (2 * _local4);
}
} else {
if (Key.isDown(_local5.k_attack) && (_root[("p" + _local3) + "waitkey"] == 1)) {
createDust(_local2._x, _local2._y, "sweat");
keyClash = keyClash + _local4;
_root[("p" + _local3) + "waitkey"] = 2;
}
if ((!Key.isDown(_local5.k_attack)) && (_root[("p" + _local3) + "waitkey"] == 2)) {
createDust(_local2._x, _local2._y, "sweat");
keyClash = keyClash + _local4;
_root[("p" + _local3) + "waitkey"] = 1;
}
}
break;
case 1 :
_root["tIA" + _local3]++;
var _local9 = ((20 + (dbzDifficulty * 5)) + (_local2.mind * 6)) - (keyClash * _local4);
var _local8 = -20 * Math.cos(_root["tIA" + _local3] / 40);
var _local7 = Math.random() * 100;
if (_local7 >= (_local9 + _local8)) {
break;
}
createDust(_local2._x, _local2._y, "sweat");
keyClash = keyClash + _local4;
}
var _local6 = calculateDistance(ballclash, _local2);
_local2.kameha.go._width = _local6 - 32;
if (_local6 < _DPOWERBALL) {
_local2.wound = 30;
_local2.hp = _local2.hp - (power - (4 * _local2.strength));
_local2.death = "blow";
kaboum(_local2._x, _local2._y, 60);
t++;
}
_local3++;
}
break;
case 22 :
GC.bg._x = (GC.bg._y = 0);
t1.kameha._alpha = (t2.kameha._alpha = 0);
t1.fire = (t2.fire = 0);
tIA1 = (tIA2 = null);
if ((!_local2.com) || (!_local10.com)) {
createListener();
}
switchScreen("powerBall", "fight");
}
updateShadow();
moveClouds();
};
};
screenChifumi = function () {
var t = 0;
var t1 = GC["p1" + team1[0]];
var t2 = GC["p2" + team2[0]];
chrono._visible = false;
t1._xscale = 100;
t2._xscale = -100;
t1._alpha = (t2._alpha = 100);
t1.sprite = (t2.sprite = 1);
t1._rotation = (t2._rotation = 0);
xcross = 1;
p1hand = random(3) + 1;
p2hand = random(3) + 1;
hand1._visible = false;
hand2._visible = false;
zoomp1x = (225 - t1._x) / 10;
zoomp1y = (_YMAX - t1._y) / 10;
zoomp2x = (285 - t2._x) / 10;
zoomp2y = (_YMAX - t2._y) / 10;
chifumiKeyPress = function () {
if (!t1.com) {
if (Key.isDown(k1.k_left)) {
p1hand = 1;
}
if (Key.isDown(k1.k_up)) {
p1hand = 2;
}
if (Key.isDown(k1.k_right)) {
p1hand = 3;
}
}
if (!t2.com) {
if (Key.isDown(k2.k_left)) {
p2hand = 1;
}
if (Key.isDown(k2.k_up)) {
p2hand = 2;
}
if (Key.isDown(k2.k_right)) {
p2hand = 3;
}
}
};
onEnterFrame = function () {
moveClouds();
if (bigFlash._alpha > 0) {
bigFlash._alpha = bigFlash._alpha - 5;
}
switch (t) {
default :
if (t < 35) {
zoomEngine(350);
}
if ((t > 35) && (t < 60)) {
zoomEngine(440);
}
if (t > 60) {
zoomEngine(550);
}
if (t < 80) {
chifumiKeyPress();
t1.sprite = (t2.sprite = 1);
}
t++;
break;
case 0 :
case 1 :
case 2 :
case 3 :
case 4 :
case 5 :
case 6 :
case 7 :
case 8 :
case 9 :
zoomEngine(100);
t1.sprite = (t2.sprite = 11);
if (t1.kameha._alpha > 0) {
t1.kameha._alpha = t1.kameha._alpha - 25;
}
if (t2.kameha._alpha > 0) {
t2.kameha._alpha = t2.kameha._alpha - 25;
}
if (t1.auraspr._alpha > 0) {
t1.auraspr._alpha = t1.auraspr._alpha - 25;
}
if (t2.auraspr._alpha > 0) {
t2.auraspr._alpha = t2.auraspr._alpha - 25;
}
t1._x = t1._x + zoomp1x;
t1._y = t1._y + zoomp1y;
t2._x = t2._x + zoomp2x;
t2._y = t2._y + zoomp2y;
updateShadow();
t++;
break;
case 30 :
case 31 :
case 32 :
case 33 :
case 34 :
case 55 :
case 56 :
case 57 :
case 58 :
case 59 :
t1.sprite = (t2.sprite = 15);
t++;
break;
case 80 :
t1.sprite = (t2.sprite = 14);
soundPunch(1);
hand1.gotoAndStop(p1hand);
hand1._visible = true;
hand2.gotoAndStop(p2hand);
hand2._visible = true;
t++;
break;
case 130 :
hand1._visible = false;
hand2._visible = false;
var _local1 = (10 * p1hand) + p2hand;
switch (_local1) {
case 11 :
case 22 :
case 33 :
t = 10;
p1hand = random(3) + 1;
p2hand = random(3) + 1;
t1.sprite = (t2.sprite = 11);
break;
case 12 :
case 23 :
case 31 :
switchScreen("chifumi", "fightOver", 1);
break;
case 13 :
case 21 :
case 32 :
switchScreen("chifumi", "fightOver", 2);
}
}
updatePlayerSprite(1);
updatePlayerSprite(2);
};
};
screenFightOver = function (i) {
Mouse.show();
stopTimer = 0;
if (GC.filters) {
GC.filters = undefined;
}
if (sky.filters) {
sky.filters = undefined;
}
chrono._visible = false;
if (gameTime) {
clearInterval(setChrono);
}
panelWinner._alpha = 0;
soundPlayer("s_gong");
var t1 = GC[("p" + i) + _root["team" + i][0]];
var t2 = GC[("p" + (3 - i)) + _root["team" + (3 - i)][0]];
t1._rotation = (t2._rotation = 0);
if (i) {
t2.ki = 0;
updateJauges();
var t = 0;
var xsafe = Math.min(Math.max(t1._x, 62), 438);
if (xsafe == t1._x) {
xsafe = 0;
}
if (_root["team" + i].length > 1) {
panelWinner.winnerTxt.htmlText = "Team " + i;
} else {
panelWinner.winnerTxt.htmlText = t1.name;
}
panelWinner.winnerTxt.htmlText = panelWinner.winnerTxt.htmlText + " wins!";
} else {
panelWinner.winnerTxt.htmlText = "DRAW!";
}
t2._alpha = 100;
onEnterFrame = function () {
if (t1.kameha._alpha > 0) {
t1.kameha._alpha = t1.kameha._alpha - 25;
}
if (t1.auraspr._alpha > 0) {
t1.auraspr._alpha = t1.auraspr._alpha - 25;
}
if (bigFlash._alpha > 0) {
bigFlash._alpha = bigFlash._alpha - 25;
}
if (t1._alpha < 100) {
t1._alpha = t1._alpha + 10;
}
if (t2.kameha._alpha > 0) {
t2.kameha._alpha = t2.kameha._alpha - 25;
}
if (t2.auraspr._alpha > 0) {
t2.auraspr._alpha = t2.auraspr._alpha - 25;
}
t1.sprite = 1;
if (i) {
if (!(t === 40)) {
if ((t < 5) && (xsafe)) {
t1._x = t1._x + ((xsafe - t1._x) / 2);
t1.sprite = 11;
}
if (t > 15) {
if (panelWinner._alpha < 100) {
panelWinner._alpha = panelWinner._alpha + 10;
}
zoomEngine(400, t1._x, t1._y - 14, 14);
}
t++;
} else {
t1.auraspr._alpha = 70;
}
if (toKill.length) {
killingPlayer(true);
}
} else {
if (panelWinner._alpha < 100) {
panelWinner._alpha = panelWinner._alpha + 10;
}
t1.sprite = (t2.sprite = 8);
}
updatePlayerSprite(1);
updatePlayerSprite(2);
updateShadow();
moveClouds();
};
btnNext.onRollOver = function () {
soundPlayer("s_rollover");
};
btnNext.onPress = function () {
soundPlayer("s_ok");
GC._x = (GC._y = 0);
GC.bg._x = (GC.bg._y = 0);
GC._xscale = (GC._yscale = (GC.zoom = 100));
switch (gameMode) {
case "budokai" :
_root[("match" + budokaiMatch) + "Winner"] = i;
budokaiMatch++;
switchScreen("fightOver", "grid");
break;
case "story" :
switch (i) {
case 1 :
if (checkUnlockable()) {
switchScreen("fightOver", "unlock", (("c" + dbzChapter) + "e") + dbzEpisode);
} else {
switchScreen("fightOver", "story");
}
break;
default :
switchScreen("fightOver", "story");
}
break;
case "oav" :
switch (i) {
case 1 :
if (checkUnlockable()) {
switchScreen("fightOver", "unlock", (("oav" + dbzChapterOAV) + "e") + dbzEpisodeOAV);
} else {
switchScreen("fightOver", "story");
}
break;
default :
switchScreen("fightOver", "story");
}
break;
case "versus" :
switchScreen("fightOver", "versus");
break;
case "tagteam" :
switchScreen("fightOver", "tagteam");
break;
case "janken" :
switchScreen("fightOver", "janken");
break;
default :
switchScreen("fightOver", "title");
}
};
};
var musicToPlay = -1;
musicInfo = function (i) {
txtInfo.text = "Now playing:";
txtTitle.text = musicList[i][1];
};
screenJukebox = function () {
setupBG("jukebox");
title.gotoAndStop("jukebox");
mbat = (mbats = undefined);
musicPlaying = false;
s_music.stop();
iDust = 200;
var t = 0;
GC.createEmptyMovieClip("p10", 10);
GC.p10._xscale = 100;
GC.p10.sprite = 5;
GC.p10._rotation = 0;
GC.p10._x = 250;
GC.p10._y = 150;
GC.zoom = (zoom = 100);
GC.p10.attachMovie("rainbow", "auraspr", 1);
GC.p10.auraspr._alpha = 0;
GC.p10.attachMovie("fighter", "p", 2);
GC.p10.p.cible.attachMovie("dodoria", "p", 1);
GC.p10.p.cible._x = ((-GC.p10.sprite) * 20) + 10;
createNyanStar = function () {
var newStar = GC.bg.createEmptyMovieClip("star" + iDust, iDust);
iDust++;
if (iDust > 280) {
iDust = 200;
}
newStar.attachMovie("nyanStar", "clip", 1);
newStar._x = 400;
newStar._y = (GC.p10._y + random(80)) - 40;
newStar.onEnterFrame = function () {
newStar._x = newStar._x - 10;
if (newStar._x < 100) {
delete newStar.onEnterFrame;
removeMovieClip(newStar);
}
};
};
btnPlay.onPress = function () {
zoom = 400;
if (musicToPlay == -1) {
musicToPlay = 0;
}
musicPlaying = true;
musicInfo(musicToPlay);
musicPlayer("m_" + musicList[musicToPlay][0]);
timeline.jauge._width = 0;
};
btnStop.onPress = function () {
zoom = 100;
musicPlaying = false;
s_music.stop();
eraseMusicInfo();
};
eraseMusicInfo = function () {
txtInfo.text = (txtTitle.text = (txtTime.text = ""));
timeline.jauge._width = 0;
};
eraseMusicInfo();
listInit = false;
onEnterFrame = function () {
if (!listInit) {
initComboList();
listInit = true;
}
if (musicPlaying) {
txtTime.text = (("TIME: " + s_music.position) + " / ") + s_music.duration;
timeline.jauge._width = 396 * (s_music.position / s_music.duration);
}
zoomEngine(zoom, GC.p10._x, GC.p10._y);
GC.p10.auraspr._alpha = Math.floor((GC.zoom - 100) * 0.3);
t++;
if (t == 5) {
createNyanStar();
t = 0;
}
};
if (gameVersion) {
btnBack.onRollOver = function () {
soundPlayer("s_rollover");
};
btnBack.onPress = function () {
soundPlayer("s_cancel");
switchScreen("jukebox", "title");
};
}
};
cleanDragon = function () {
var _local2 = 15;
var _local4 = 100;
var _local3 = GC.bg.bg.dragon;
_local3.head.removeMovieClip();
_local3.horn.removeMovieClip();
var _local1 = 0;
while (_local1 <= _local2) {
_local3["body" + _local1].removeMovieClip();
_local1++;
}
_local1 = _local2 + 2;
while (_local1 <= (_local2 + _local4)) {
_local3["dust" + _local1].removeMovieClip();
_local1++;
}
};
screenShenron = function () {
GC.bg.choice = "shenron";
setupBG(GC.bg.choice);
stopTimer = false;
cheatcode = true;
var gmax = 15;
var pmax = 100;
var t = 0;
btnNext.onRollOver = function () {
soundPlayer("s_rollover");
};
btnNext.onPress = function () {
soundPlayer("s_cancel");
switchScreen("shenron", "title");
};
var newDragon = GC.bg.bg.dragon;
createDragon = function () {
newDragon._x = -100;
newDragon._y = 400;
var _local4 = newDragon.createEmptyMovieClip("horn", 0);
_local4.attachMovie("dragonHorn", "clip", 1);
var _local1 = 1;
while (_local1 <= gmax) {
var _local3 = newDragon.createEmptyMovieClip("body" + _local1, _local1);
_local3.attachMovie("dragonBody", "clip", 1);
_local1++;
}
var _local5 = newDragon.createEmptyMovieClip("head", gmax + 1);
_local5.attachMovie("dragonHead", "clip", 1);
_local1 = gmax + 2;
while (_local1 <= (gmax + pmax)) {
var _local2 = newDragon.createEmptyMovieClip("dust" + _local1, _local1);
_local2.attachMovie("dust", "clip", 1);
_local1++;
}
};
createDragon();
onEnterFrame = function () {
moveClouds();
t++;
var _local11 = Math.cos(t / 20);
newDragon._x = newDragon._x - ((newDragon._x - 280) / 30);
newDragon._y = newDragon._y - ((newDragon._y - 200) / 30);
newDragon.horn._x = newDragon.head._x;
newDragon.horn._y = (newDragon.head._y = newDragon.head._y + (_local11 * 2));
var _local9 = _local11 / 4;
newDragon.horn._rotation = (newDragon.head._rotation = (_local9 * 180) / Math.PI);
var _local4 = 0;
while (_local4++ , _local4 <= gmax) {
var _local1 = newDragon["body" + _local4];
var _local2 = newDragon["body" + (_local4 - 1)];
var _local8;
var _local7;
var _local5;
if (_local4 == 1) {
_local8 = newDragon.head._x;
_local7 = newDragon.head._y;
_local5 = newDragon.head._rotation;
} else {
_local8 = _local2._x;
_local7 = _local2._y;
_local5 = _local2._rotation;
}
_local1._x = _local8 - 18;
_local1._y = _local1._y - ((_local1._y - _local7) / 4);
_local1._rotation = _local5 / 1.4;
}
_local4 = gmax + 1;
var _local10 = 1.4;
while (_local4++ , _local4 <= (gmax + pmax)) {
var _local3 = newDragon["dust" + _local4];
var _local6 = newDragon["dust" + (_local4 - 1)];
if (_local4 == (gmax + 2)) {
var _local8 = newDragon.head._x + (96 * Math.cos(_local9));
var _local7 = (newDragon.head._y + (96 * Math.sin(_local9))) + 4;
} else {
var _local8 = _local6._x;
var _local7 = _local6._y;
}
_local3._x = _local8 - 2;
_local10 = _local10 - 0.0008;
_local3._y = _local3._y - ((_local3._y - _local7) / _local10);
}
};
};
switchScreen = function (fromScreen, gotoScreen, parameter) {
switch (fromScreen) {
case "ready" :
case "fight" :
case "fightOver" :
case "grid" :
case "update" :
case "disclaimer" :
case "shenron" :
case "jukebox" :
break;
default :
saveCookie();
}
switch (fromScreen) {
case "update" :
cleanRollOver(panelUpdate.btn1);
cleanPress(panelUpdate.btn1);
cleanRollOver(panelUpdate.btn2);
cleanPress(panelUpdate.btn2);
break;
case "disclaimer" :
cleanPress(wish);
clearInterval(waitSomeTime);
break;
case "title" :
cleanMainMenu();
cleanPress(title);
delete onEnterFrame;
break;
case "versus" :
cleanMenu(3);
cleanSlider(slideHP1);
cleanSlider(slideHP2);
cleanSlider(slideKI1);
cleanSlider(slideKI2);
cleanSlider(slideLVL1);
cleanSlider(slideLVL2);
cleanSlider(slideTime);
cleanRollOver(btnNext);
cleanPress(btnNext);
cleanRollOver(btnBack);
cleanPress(btnBack);
cleanRollOver(btnPC1.btn);
cleanPress(btnPC1.btn);
cleanRollOver(btnPC2.btn);
cleanPress(btnPC2.btn);
delete onEnterFrame;
break;
case "tagteam" :
cleanMenu(3);
cleanSlider(slideHP1);
cleanSlider(slideHP2);
cleanSlider(slideKI1);
cleanSlider(slideKI2);
cleanSlider(slideTime);
cleanRollOver(btnNext);
cleanPress(btnNext);
cleanRollOver(btnBack);
cleanPress(btnBack);
cleanRollOver(btnPC1.btn);
cleanPress(btnPC1.btn);
cleanRollOver(btnPC2.btn);
cleanPress(btnPC2.btn);
delete onEnterFrame;
break;
case "janken" :
cleanMenu(3);
cleanRollOver(btnNext);
cleanPress(btnNext);
cleanRollOver(btnBack);
cleanPress(btnBack);
delete onEnterFrame;
break;
case "story" :
var _local1 = 3;
while (_local1 <= 4) {
cleanMenu(_local1);
_local1++;
}
cleanStoryBtn(1, rooster1.length);
cleanStoryBtn(2, rooster2.length);
cleanRollOver(btnNext);
cleanPress(btnNext);
cleanRollOver(btnBack);
cleanPress(btnBack);
delete onEnterFrame;
break;
case "stories" :
cleanMenu(3);
cleanStoryBtn(1, rooster1.length);
cleanStoryBtn(2, rooster2.length);
cleanRollOver(btnBack);
cleanPress(btnBack);
break;
case "budokai" :
cleanSlider(slideHP);
cleanSlider(slideKI);
cleanSlider(slideLVL);
cleanSlider(slideTime);
cleanRollOver(btnNext);
cleanPress(btnNext);
cleanRollOver(btnBack);
cleanPress(btnBack);
cleanRollOver(btnRandom);
cleanPress(btnRandom);
delete onEnterFrame;
break;
case "grid" :
cleanRollOver(btnBack);
cleanPress(btnBack);
cleanRollOver(btnNext);
cleanPress(btnNext);
cleanRollOver(panelQuit.btn1);
cleanRollOver(panelQuit.btn2);
cleanPress(panelQuit.btn1);
cleanPress(panelQuit.btn2);
cleanPress(panelQuit.back);
cleanRollOver(panelWatch.btn1);
cleanRollOver(panelWatch.btn2);
cleanPress(panelWatch.btn1);
cleanPress(panelWatch.btn2);
cleanPress(panelWatch.back);
cleanRollOver(panelControl.btn1);
cleanRollOver(panelControl.btn2);
cleanPress(panelControl.btn1);
cleanPress(panelControl.btn2);
cleanPress(panelControl.back);
delete onEnterFrame;
break;
case "unlock" :
destroyUnlockBars();
cleanRollOver(btnNext);
cleanPress(btnNext);
break;
case "credits" :
cleanRollOver(btnBack);
cleanPress(btnBack);
cleanPress(atien);
cleanPress(toribot);
delete onEnterFrame;
break;
case "database" :
cleanRollOver(btnBack);
cleanPress(btnBack);
cleanPress(btnStand.btn);
cleanPress(btnWalk.btn);
cleanPress(btnHurt.btn);
cleanPress(btnAttack.btn);
cleanPress(btnFireball.btn);
cleanPress(btnFly.btn);
cleanRollOver(btnStand.btn);
cleanRollOver(btnWalk.btn);
cleanRollOver(btnHurt.btn);
cleanRollOver(btnAttack.btn);
cleanRollOver(btnFireball.btn);
cleanRollOver(btnFly.btn);
cleanPress(btn1.btn);
cleanPress(btn2.btn);
cleanPress(btn3.btn);
cleanPress(btn4.btn);
cleanPress(btn5.btn);
cleanRollOver(btn1.btn);
cleanRollOver(btn2.btn);
cleanRollOver(btn3.btn);
cleanRollOver(btn4.btn);
cleanRollOver(btn5.btn);
cleanRollOver(btnZoom);
cleanPress(btnZoom);
GC.p10.p.removeMovieClip();
delete onEnterFrame;
break;
case "setup" :
_local1 = 1;
while (_local1 <= 12) {
var _local2 = setupKey["btn" + _local1].btn;
cleanRollOver(_local2);
cleanPress(_local2);
_local1++;
}
cleanPress(panelKey.back);
cleanRollOver(btnExit);
cleanPress(btnExit);
cleanRollOver(btnSound.btn);
cleanPress(btnSound.btn);
cleanRollOver(btnMusic.btn);
cleanPress(btnMusic.btn);
cleanRollOver(btnTouch.btn);
cleanPress(btnTouch.btn);
cleanRollOver(btnFullscreen.btn);
cleanPress(btnFullscreen.btn);
cleanRollOver(btnDifficulty.btn);
cleanPress(btnDifficulty.btn);
cleanRollOver(btnDelete.btn);
cleanPress(btnDelete.btn);
cleanRollOver(panelDelete.btn1);
cleanRollOver(panelDelete.btn2);
cleanPress(panelDelete.btn1);
cleanPress(panelDelete.btn2);
cleanPress(panelDelete.back);
cleanPress(title);
Key.removeListener(ecouteurSetup);
break;
case "tutorial" :
cleanRollOver(btnNext);
cleanPress(btnNext);
cleanPress(p2Face);
destroyAllBalls();
cleanGame();
delete onEnterFrame;
break;
case "ready" :
delete onEnterFrame;
break;
case "fight" :
if (dbzTouch && ((!k1.com) || (!k2.com))) {
delete onMouseDown;
}
delete onEnterFrame;
break;
case "powerUp" :
delete onEnterFrame;
break;
case "closeCombat" :
if (dbzTouch && ((!k1.com) || (!k2.com))) {
delete onMouseDown;
}
delete onEnterFrame;
break;
case "powerBall" :
if (dbzTouch && ((!k1.com) || (!k2.com))) {
delete onMouseDown;
}
delete onEnterFrame;
break;
case "chifumi" :
delete onEnterFrame;
break;
case "jukebox" :
cleanRollOver(btnBack);
cleanPress(btnBack);
GC.p10.p.removeMovieClip();
GC.p10.auraspr.removeMovieClip();
delete onEnterFrame;
break;
case "shenron" :
cleanDragon();
cleanRollOver(btnNext);
cleanPress(btnNext);
delete onEnterFrame;
break;
case "fightOver" :
cleanGame();
cleanRollOver(btnNext);
cleanPress(btnNext);
delete onEnterFrame;
}
gotoAndStop(gotoScreen);
switch (gotoScreen) {
case "update" :
screenUpdate();
break;
case "disclaimer" :
screenDisclaimer();
break;
case "title" :
screenTitle();
break;
case "setup" :
screenSetup();
break;
case "database" :
screenDatabase();
break;
case "unlock" :
screenUnlock(parameter);
break;
case "credits" :
screenCredits();
break;
case "story" :
screenStory();
break;
case "stories" :
screenStories();
break;
case "versus" :
screenVS();
break;
case "tagteam" :
screenTagTeam();
break;
case "janken" :
screenJanken();
break;
case "budokai" :
screenBudokai();
break;
case "grid" :
screenGrid();
break;
case "tutorial" :
screenTutorial();
break;
case "ready" :
screenReady();
break;
case "fight" :
screenFight();
if (dbzTouch && (!k1.com)) {
initControlTouch();
}
break;
case "powerUp" :
screenPowerUp(parameter);
break;
case "closeCombat" :
screenCloseCombat();
if (dbzTouch && (!k1.com)) {
initCloseCombatTouch();
}
break;
case "powerBall" :
screenPowerBall(parameter);
if (dbzTouch && (!k1.com)) {
initPowerBallTouch();
}
break;
case "chifumi" :
screenChifumi();
break;
case "fightOver" :
screenFightOver(parameter);
break;
case "jukebox" :
screenJukebox();
break;
case "shenron" :
screenShenron();
}
};
loadCookie();
if (gameUpdate) {
switchScreen("code", "update");
} else {
switchScreen("code", "disclaimer");
}
Symbol 27 MovieClip Frame 1
stop();
Symbol 27 MovieClip Frame 20
stop();
Symbol 33 MovieClip Frame 16
gotoAndPlay ("walk");
Symbol 787 MovieClip Frame 1
stop();
Symbol 795 MovieClip Frame 1
stop();
Symbol 811 MovieClip Frame 1
stop();
Symbol 833 MovieClip Frame 1
stop();
Symbol 973 MovieClip Frame 10
gotoAndPlay (1);
Symbol 1203 MovieClip Frame 25
gotoAndPlay (1);
Symbol 1214 MovieClip Frame 80
_root.readyfight();