Frame 2
if (this.getBytesTotal() <= this.getBytesLoaded()) {
this.gotoAndPlay(11);
}
Frame 3
_quality = "HIGH";
stop();
Frame 12
var appi = (new app.BaseBall());
var gm = app.sys.SysInfo.__get__GameMode();
gm.setNormalMode();
gm.setUseAdMode();
appi.init();
this.onEnterFrame = function () {
appi.move();
};
var snd = new Sound();
snd.setVolume(100);
delete snd;
stop();
Instance of Symbol 3385 MovieClip "hiscore_hc" in Frame 12
//component parameters
onClipEvent (construct) {
gameID = "baseball";
httpObjDepth = 1000000 /* 0x0F4240 */;
}
Symbol 27 MovieClip Frame 1
this.Bar._xscale = 0;
this.onEnterFrame = function () {
total = _parent.getBytesTotal();
now = _parent.getBytesLoaded();
per = (now * 100) / total;
this.Bar._xscale = per;
per = Math.floor(per);
if (per >= 100) {
this.Num_100.gotoAndStop(Math.floor(per / 100) + 1);
this.Num_100._visible = true;
} else {
this.Num_100.stop();
this.Num_100._visible = false;
}
if (per >= 10) {
this.Num_010.gotoAndStop(Math.floor((per % 100) / 10) + 1);
this.Num_010._visible = true;
} else {
this.Num_010.stop();
this.Num_010._visible = false;
}
this.Num_001.gotoAndStop(Math.floor(per % 10) + 1);
this.Num_001._visible = true;
if (total <= now) {
delete this.onEnterFrame;
_parent.play();
}
};
stop();
Symbol 84 MovieClip [DebugMC] Frame 1
stop();
Symbol 88 MovieClip [FPSMC] Frame 1
stop();
Symbol 107 MovieClip Frame 10
stop();
Symbol 108 MovieClip Frame 11
stop();
Symbol 113 MovieClip Frame 10
stop();
Symbol 114 MovieClip Frame 11
stop();
Symbol 118 MovieClip Frame 10
stop();
Symbol 119 MovieClip Frame 11
stop();
Symbol 123 MovieClip Frame 10
stop();
Symbol 124 MovieClip Frame 11
stop();
Symbol 128 MovieClip Frame 10
stop();
Symbol 129 MovieClip Frame 11
stop();
Symbol 151 MovieClip [BonusInfoDisplayMC] Frame 1
stop();
Symbol 3381 MovieClip Frame 1
stop();
Symbol 3386 MovieClip [__Packages.app.sys.GameMode] Frame 0
class app.sys.GameMode
{
var m_mode, m_adUse;
function GameMode () {
m_mode = GM_NORMAL;
m_adUse = false;
}
function setRankingMode() {
m_mode = GM_RANKING;
}
function setNormalMode() {
m_mode = GM_NORMAL;
}
function isRankingMode() {
return(m_mode == GM_RANKING);
}
function isNormalMode() {
return(m_mode == GM_NORMAL);
}
function setUseAdMode() {
m_adUse = true;
}
function setNoneAdMode() {
m_adUse = false;
}
function isAdMode() {
return(m_adUse);
}
static var GM_NORMAL = 1;
static var GM_RANKING = 2;
}
Symbol 3387 MovieClip [__Packages.sys.WorkList] Frame 0
class sys.WorkList
{
var m_list, m_attr;
function WorkList () {
m_list = new util.List();
}
function setAttr(attr) {
m_attr = attr;
}
function append(obj) {
return(m_list.push(obj, m_attr));
}
function appendWithAttr(obj, attr) {
return(m_list.push(obj, attr));
}
function cut(obj) {
obj.cut();
}
function callMove() {
var _local2 = m_list.getFirst();
var _local4 = [];
var _local3;
while (!m_list.isLast(_local2)) {
if (!_local2.m_data.move()) {
_local4.push(_local2);
}
_local2 = _local2.m_next;
}
_local3 = _local4.length - 1;
while (_local3 >= 0) {
_local4[_local3].m_data.destroy();
_local3--;
}
}
function callCtrl() {
var _local2 = m_list.getFirst();
var _local4 = [];
var _local3;
while (!m_list.isLast(_local2)) {
if (!_local2.m_data.ctrl()) {
_local4.push(_local2);
}
_local2 = _local2.m_next;
}
_local3 = _local4.length - 1;
while (_local3 >= 0) {
_local4[_local3].m_data.destroy();
_local3--;
}
}
function callDisp() {
var _local2 = m_list.getFirst();
while (!m_list.isLast(_local2)) {
_local2.m_data.disp();
_local2 = _local2.m_next;
}
}
function callDestroy() {
var _local2 = m_list.getFirst();
while (!m_list.isLast(_local2)) {
_local2.m_data.destroy();
_local2 = m_list.getFirst();
}
}
function callDestroyByAttr(attr) {
var _local2 = m_list.getFirst();
var _local4 = [];
var _local3;
while (!m_list.isLast(_local2)) {
if (_local2.getAttr() == attr) {
_local4.push(_local2);
}
_local2 = _local2.m_next;
}
_local3 = _local4.length - 1;
while (_local3 >= 0) {
_local4[_local3].m_data.destroy();
_local3--;
}
}
}
Symbol 3388 MovieClip [__Packages.util.List] Frame 0
class util.List
{
var m_top, m_last;
function List () {
m_top = new util.ListItem(undefined);
m_last = new util.ListItem(undefined);
m_top.m_next = m_last;
m_last.m_prev = m_top;
}
function push(data, attr) {
var _local3;
var _local2;
_local2 = new util.ListItem(data, attr);
_local3 = m_last.m_prev;
m_last.m_prev = _local2;
_local3.m_next = _local2;
_local2.m_prev = _local3;
_local2.m_next = m_last;
return(_local2);
}
function pop() {
var _local2;
var _local3;
_local2 = m_last.m_prev;
_local2.m_prev.m_next = m_last;
m_last.m_prev = _local2.m_prev;
_local3 = _local2.get();
return(_local3);
}
function unshift(data, attr) {
var _local3;
var _local2;
_local2 = new util.ListItem(data, attr);
_local3 = m_top.m_next;
m_top.m_next = _local2;
_local3.m_prev = _local2;
_local2.m_prev = m_top;
_local2.m_next = _local3;
return(_local2);
}
function shift() {
var _local2;
var _local3;
_local2 = m_top.m_next;
_local2.m_next.m_prev = m_top;
m_top.m_next = _local2.m_next;
_local3 = _local2.get();
return(_local3);
}
function cut(data) {
data.cut();
}
function getFirst() {
return(m_top.m_next);
}
function isLast(data) {
return(data == m_last);
}
function isEmpty() {
return(m_top.m_next == m_last.m_prev);
}
function getLength() {
var _local3;
var _local2;
_local2 = m_top;
_local3 = 0;
while (_local2.m_next != m_last) {
_local2 = _local2.m_next;
_local3++;
}
return(_local3);
}
}
Symbol 3389 MovieClip [__Packages.util.ListItem] Frame 0
class util.ListItem
{
var m_prev, m_next, m_data, m_attr;
function ListItem (data, attr) {
m_prev = undefined;
m_next = undefined;
m_data = data;
m_attr = attr;
}
function get() {
return(m_data);
}
function cut() {
m_prev.m_next = m_next;
m_next.m_prev = m_prev;
}
function getAttr() {
return(m_attr);
}
}
Symbol 3390 MovieClip [__Packages.app.sys.SceneGraph] Frame 0
class app.sys.SceneGraph
{
var m_listener, m_context, m_scenePos, m_activeList, m_time, m_waitTime, m_waitEvent, m_encountEvent, m_labelList, m_isStop, m_frameCount, m_isFrame, m_sceneList;
function SceneGraph () {
m_listener = [];
}
function init(context) {
m_context = context;
m_scenePos = 0;
m_activeList = [];
m_time = 0;
m_waitTime = 0;
m_waitEvent = undefined;
m_encountEvent = undefined;
m_labelList = {};
m_isStop = false;
m_frameCount = 0;
m_isFrame = false;
}
function setScene(sceneList) {
var _local2;
var _local3;
m_sceneList = sceneList;
_local2 = m_sceneList.length - 1;
while (_local2 >= 0) {
_local3 = m_sceneList[_local2];
if (_local3.type == "LABEL") {
m_labelList[_local3.name] = _local2 + 1;
}
_local2--;
}
}
function move() {
var _local2;
var _local3;
var _local5;
var _local4;
if (m_isStop) {
return(undefined);
}
if (((m_waitEvent != undefined) && (m_waitEvent == m_encountEvent)) || ((m_waitEvent == undefined) && (m_time >= m_waitTime))) {
if (m_waitEvent != undefined) {
m_waitEvent = undefined;
m_time = 0;
} else {
m_time = m_time - m_waitTime;
}
do {
if (m_scenePos >= m_sceneList.length) {
break;
}
_local2 = m_sceneList[m_scenePos++];
_local4 = true;
switch (_local2.type) {
case "WAIT" :
m_waitTime = _local2.time;
m_waitEvent = undefined;
_local4 = false;
break;
case "WAITEVENT" :
m_encountEvent = undefined;
m_waitEvent = _local2.id;
_local4 = false;
break;
case "BRANCHEVENT" :
if (_local2.id == m_encountEvent) {
if (_local2.name == undefined) {
m_scenePos = 0;
} else {
m_scenePos = m_labelList[_local2.name];
}
m_time = 0;
}
break;
case "SENDEVENT" :
sendEvent(_local2.id);
break;
case "PLAYER" :
break;
case "LABEL" :
break;
case "LOOP" :
if (_local2.name == undefined) {
m_scenePos = 0;
} else {
m_scenePos = m_labelList[_local2.name];
}
break;
case "ATTR" :
app.sys.SysInfo.updateAttr();
break;
case "FRAME" :
if (_local2.flag == "ON") {
m_isFrame = true;
} else {
m_isFrame = false;
}
break;
default :
m_activeList.push({scene:_local2, time:0, count:0});
}
} while (_local4);
}
_local3 = m_activeList.length - 1;
while (_local3 >= 0) {
_local2 = m_activeList[_local3];
if (_local2.scene.type == "ENEMY") {
_local5 = enemy(_local2);
} else if (_local2.scene.type == "SOUND") {
_local5 = sound(_local2);
}
if (_local5) {
m_activeList.splice(_local3, 1);
}
_local3--;
}
m_time = m_time + app.sys.SysInfo.getSpeed();
if (m_isFrame) {
m_frameCount++;
}
}
function destroy() {
}
function stop() {
m_isStop = true;
}
function clearActiveList() {
m_activeList = [];
}
function getFrame() {
return(m_frameCount);
}
function enemy(obj) {
var _local8;
if (obj.time >= obj.scene.interval) {
var _local6;
var _local3;
_local6 = {};
for (_local3 in obj.scene.param) {
_local6[_local3] = obj.scene.param[_local3];
}
if (obj.scene.inc != undefined) {
for (_local3 in obj.scene.inc) {
_local6[_local3] = _local6[_local3] + (obj.scene.inc[_local3] * obj.count);
}
}
if (obj.scene.random != undefined) {
for (_local3 in obj.scene.random) {
var _local5;
var _local7;
var _local4;
_local5 = obj.scene.random[_local3].min;
_local7 = obj.scene.random[_local3].max;
_local4 = (Math.random() * (_local7 - _local5)) + _local5;
if (obj.scene.random[_local3].neg != undefined) {
if (Math.random() < 0.5) {
_local4 = -_local4;
}
}
_local6[_local3] = _local4;
}
}
_local6.count = obj.count;
_local8 = app.sys.EnemyFactory.create(m_context, obj.scene.id, _local6, obj.time - obj.scene.interval);
obj.time = obj.time - obj.scene.interval;
obj.count++;
}
obj.time = obj.time + app.sys.SysInfo.getSpeed();
return(obj.count >= obj.scene.count);
}
function sound(obj) {
if (obj.scene.action == "PlayMusic") {
} else if (obj.scene.action == "FadeOut") {
}
return(true);
}
function onEvent(eventID, param) {
switch (eventID) {
case EID_PLAYER_IN :
case EID_ENEMY_IN :
case EID_GAME_OVER :
case EID_STAGE_CLEAR :
case EID_SC_GAME_START :
m_encountEvent = eventID;
sendEvent(eventID, param);
break;
default :
sendEvent(eventID, param);
}
}
function addListener(listener) {
var _local2;
for (_local2 in m_listener) {
if (listener == m_listener[_local2]) {
return(undefined);
}
}
m_listener.push(listener);
}
function removeListener(listener) {
var _local2;
for (_local2 in m_listener) {
if (listener == m_listener[_local2]) {
m_listener.splice(_local2, 1);
return(undefined);
}
}
}
function sendEvent(eventID, param) {
var _local3;
var _local2;
trace("SceneGraph:sendEvent: " + eventID);
_local2 = m_listener.length - 1;
while (_local2 >= 0) {
_local3 = app.sys.SceneGraphListener(m_listener[_local2]);
_local3.onSceneGraphEvent(eventID, param);
_local2--;
}
}
static var EID_PLAYER_IN = 1;
static var EID_ENEMY_IN = 2;
static var EID_GAME_START = 3;
static var EID_GAME_OVER = 4;
static var EID_STAGE_CLEAR = 5;
static var EID_GAME_END = 6;
static var EID_ENEMY_DESTROY = 7;
static var EID_STAGE_FINISH = 8;
static var EID_FLOW_START = 10;
static var EID_FLOW_CONTINUE = 11;
static var EID_FLOW_STAGECLEAR = 12;
static var EID_FLOW_GAMEOVER = 13;
static var EID_FLOW_TITLE = 14;
static var EID_FLOW_NEXT = 15;
static var EID_STAGECONTROLL = 20;
static var EID_SC_TITLE_IN = 30;
static var EID_SC_TITLE_IN_END = 31;
static var EID_SC_GAME_IN = 40;
static var EID_SC_GAME_IN_END = 41;
static var EID_SC_GAME_START = 42;
static var EID_SC_GAMEOVER_IN = 50;
static var EID_SC_GAMEOVER_IN_END = 51;
static var EID_SC_FLOORCLEAR_IN = 60;
static var EID_SC_FLOORCLEAR_IN_END = 61;
static var EID_SC_STAGECLEAR_IN = 70;
static var EID_SC_STAGECLEAR_IN_END = 71;
static var EID_SC_GAMECLEAR_IN = 80;
static var EID_SC_GAMECLEAR_IN_END = 81;
static var EID_SC_STORY_IN = 90;
static var EID_SC_STORY_IN_END = 91;
static var EID_GAME_NEXT = 100;
}
Symbol 3391 MovieClip [__Packages.app.sys.Context] Frame 0
class app.sys.Context
{
var m_attr, m_base;
function Context (attr, base) {
m_attr = attr;
m_base = base;
}
function getAttr() {
return(m_attr);
}
function getBase() {
return(m_base);
}
}
Symbol 3392 MovieClip [__Packages.app.sys.EnemyFactory] Frame 0
class app.sys.EnemyFactory
{
function EnemyFactory () {
}
static function create(context, id, param, count) {
var _local3 = 0;
var _local1;
var _local2 = app.enemy;
do {
_local1 = id.indexOf(".", _local3);
if (_local1 == -1) {
_local2 = _local2[id.substring(_local3)];
} else {
_local2 = _local2[id.substring(_local3, _local1)];
_local3 = _local1 + 1;
}
} while (_local1 != -1);
return(_local2.create(context, param, count));
}
}
Symbol 3393 MovieClip [__Packages.app.enemy.EnemyList] Frame 0
class app.enemy.EnemyList
{
function EnemyList () {
}
}
Symbol 3394 MovieClip [__Packages.sys.WorkItem] Frame 0
class sys.WorkItem
{
function WorkItem () {
}
function init() {
}
function reset() {
}
function move() {
return(true);
}
function ctrl() {
return(true);
}
function disp() {
}
function destroy() {
}
function ctrlAndDisp() {
return(true);
}
}
Symbol 3395 MovieClip [__Packages.app.enemy.Enemy] Frame 0
class app.enemy.Enemy extends sys.WorkItem
{
var m_context;
function Enemy (context) {
super();
m_context = context;
}
static var EM_ENEMY = 0;
static var EM_POWERUP = 1;
static var EM_MAX = 2;
}
Symbol 3396 MovieClip [__Packages.app.flow.Flow] Frame 0
class app.flow.Flow
{
var m_mode, m_preFlow, m_context, m_result, m_isDestroy;
function Flow (mode, preFlow) {
m_mode = mode;
m_preFlow = preFlow;
m_context = new app.sys.Context(app.sys.SysInfo.getAttr(), util.MovieClipFactory.getBase());
m_result = 0;
m_isDestroy = false;
}
function move(mode) {
}
function disp(mode) {
}
function isEnd() {
return(m_result != 0);
}
function destroy() {
m_isDestroy = true;
}
function event(id) {
m_result = id;
}
function getResult() {
return(m_result);
}
function getMode() {
return(m_mode);
}
function isDestroy() {
return(m_isDestroy);
}
function getContext() {
return(m_context);
}
static var FM_TITLE = 0;
static var FM_STAGESTART = 1;
static var FM_GAME = 2;
static var FM_FLOORCLEAR = 3;
static var FM_SCORE = 4;
static var FM_GAMEOVER = 5;
static var FM_GAMECLEAR = 6;
static var FM_OTHER = 7;
}
Symbol 3397 MovieClip [__Packages.util.MovieClipFactory] Frame 0
class util.MovieClipFactory
{
static var m_idx, m_depthList, m_mcList, m_basePos, m_baseNum, m_baseNow, m_baseGroupPos;
function MovieClipFactory () {
}
static function init() {
m_idx = 0;
m_depthList = [];
m_mcList = [];
m_basePos = -1;
m_baseNum = -1;
m_baseNow = 0;
m_baseGroupPos = 0;
}
static function reset() {
var _local1 = 0;
while (_local1 < m_idx) {
var _local2 = m_mcList[_local1];
m_depthList[_local1] = _local2.getNextHighestDepth();
_local1++;
}
}
static function append(mc, idx) {
var _local1 = 0;
while (_local1 < idx) {
mc.createEmptyMovieClip("mcf" + _local1, _local1);
m_mcList.push(mc["mcf" + _local1]);
m_depthList.push(0);
_local1++;
}
m_idx = m_idx + idx;
}
static function get(mcidx) {
return(m_mcList[mcidx]);
}
static function setBasePosition(pos) {
m_basePos = pos;
}
static function setBaseNumber(num) {
m_baseNum = num;
}
static function flip() {
if (m_baseNow == 0) {
m_baseNow = 1;
} else {
m_baseNow = 0;
}
}
static function setGroupPos(pos) {
m_baseGroupPos = pos;
}
static function setHighDepth(isHigh) {
var _local2;
var _local1;
if (m_baseNow == 0) {
_local2 = m_mcList[m_baseGroupPos];
_local1 = m_mcList[m_baseGroupPos + 1];
} else {
_local2 = m_mcList[m_baseGroupPos + 1];
_local1 = m_mcList[m_baseGroupPos];
}
if ((_local2.getDepth() > _local1.getDepth()) != isHigh) {
trace("SwapDepths");
_local2.swapDepths(_local1);
}
}
static function getCurrentMC() {
return(m_mcList[m_baseGroupPos + m_baseNow]);
}
static function getCurrentMCDepth() {
return(m_baseGroupPos + m_baseNow);
}
static function getBase() {
return(m_baseNow);
}
static function setBaseDepth(mc, depth) {
mc.MCF_base = depth;
mc.MCF_idx = depth;
}
static function create(mcidx, idname, name) {
var _local3;
var _local4;
var _local2;
if (name == undefined) {
name = MCID;
}
_local4 = m_depthList[mcidx];
_local2 = m_mcList[mcidx];
_local3 = _create(_local2, idname, name, _local4);
m_depthList[mcidx]++;
return(_local3);
}
static function createWithBase(mcidx, idname, name, base) {
mcidx = mcidx + (m_baseNum * base);
return(create(mcidx, idname, name));
}
static function createOnMc(mc, idname, name) {
var _local4;
var _local1;
if (name == undefined) {
name = MCID;
}
_local1 = mc.MCF_idx;
if (_local1 == undefined) {
_local1 = 1;
}
_local4 = _create(mc, idname, name, _local1);
mc.MCF_idx = _local1 + 1;
return(_local4);
}
static function createOnMcDec(mc, idname, name) {
var _local4;
var _local2;
if (name == undefined) {
name = MCID;
}
_local2 = mc.MCF_idx;
if (_local2 == undefined) {
_local2 = mc.MCF_base;
if (_local2 == undefined) {
_local2 = 100000 /* 0x0186A0 */;
}
}
_local4 = _create(mc, idname, name, _local2);
mc.MCF_idx = _local2 - 1;
if (mc.MCF_idx < 1) {
if (mc.MCF_base == undefined) {
mc.MCF_base = 100000 /* 0x0186A0 */;
}
mc.MCF_idx = mc.MCF_base;
}
return(_local4);
}
static function createEmptyOnMc(mc, name) {
var _local3;
var _local1;
if (name == undefined) {
name = MCID;
}
_local1 = mc.MCF_idx;
if (_local1 == undefined) {
_local1 = 1;
}
name = (name + "_") + _local1;
_local3 = mc.createEmptyMovieClip(name, _local1);
_local3._visible = false;
mc.MCF_idx = _local1 + 1;
return(_local3);
}
static function _create(mc, idname, name, depth) {
var _local2;
name = (name + "_") + depth;
mc.attachMovie(idname, name, depth);
_local2 = mc[name];
_local2._visible = false;
if (_local2 == undefined) {
trace((("MovieClipFactory." + arguments.caller) + " error: ") + idname);
}
return(_local2);
}
static var MCID = "mcfo";
}
Symbol 3398 MovieClip [__Packages.sys.Listener] Frame 0
interface sys.Listener
{
}
Symbol 3399 MovieClip [__Packages.app.sys.SceneGraphListener] Frame 0
interface app.sys.SceneGraphListener extends sys.Listener
{
}
Symbol 3400 MovieClip [__Packages.app.sys.Debug] Frame 0
class app.sys.Debug
{
var m_mc, m_active, m_visible, m_str;
function Debug () {
}
function init(x, y) {
m_mc = util.MovieClipFactory.create(app.sys.Screen.OT_SYSTEM, "DebugMC", "Debug");
m_mc._x = x;
m_mc._y = y;
m_active = false;
m_visible = false;
m_str = "";
}
function reset() {
if (m_active) {
m_str = "";
}
}
function setActive(active) {
if (active) {
output = activeOutput;
disp = activeDisp;
} else {
output = undefined;
disp = noDisp;
}
m_active = active;
}
function setVisible(visible) {
m_visible = visible;
}
function activeOutput(str) {
m_str = m_str + (str + newline);
}
function activeDisp() {
m_mc.str = m_str;
m_mc._visible = m_visible;
}
function noDisp() {
m_mc._visible = m_visible;
}
function output() {
}
function disp() {
}
function destroy() {
m_mc.removeMovieClip();
}
function isActive() {
return(m_active);
}
}
Symbol 3401 MovieClip [__Packages.app.sys.Screen] Frame 0
class app.sys.Screen
{
function Screen () {
}
static var WIDTH = 640;
static var HEIGHT = 480;
static var GAME_WIDTH = 640;
static var GAME_HEIGHT = 480;
static var OT_MENU = 0;
static var OT_GAME = 1;
static var OT_SYSTEM = 2;
static var OT_UTIL = 3;
static var OT_TOP_NUM = 4;
static var OT_SCREEN = 4;
static var OT_SCREEN_NUM = 2;
static var OT_BACKGROUND = 6;
static var OT_BGSTAR = 7;
static var OT_BGBACK = 8;
static var OT_ENEMY = 9;
static var OT_PLAYER = 10;
static var OT_BULLET = 11;
static var OT_BGFRONT = 12;
static var OT_STATUS = 13;
static var OT_GAME_NUM = 8;
}
Symbol 3402 MovieClip [__Packages.sys.SoundManager] Frame 0
class sys.SoundManager
{
var m_mc, m_soundWork, m_freeList, m_prioList, m_updateList, m_seEnable, m_bgmEnable, m_seVolume, m_bgmVolume, m_rate, m_resource;
function SoundManager () {
m_mc = _root.createEmptyMovieClip("Sounds", 10000);
m_soundWork = [];
m_freeList = new util.List();
var _local4 = 0;
while (_local4 < SOUND_MAX) {
var _local3 = {};
var _local5;
_local5 = "snd" + _local4;
_local3.id = _local4;
_local3.idf = _local4;
_local3.mc = m_mc.createEmptyMovieClip(_local5, _local4);
_local3.snd = new Sound(_local3.mc);
_local3.func = createCallback(_local4);
_local3.sts = STS_STOP;
m_soundWork.push(_local3);
m_freeList.push(_local4);
_local4++;
}
m_prioList = [];
_local4 = 0;
while (_local4 < PRIO_MAX) {
m_prioList.push(new util.List());
_local4++;
}
m_updateList = new util.List();
m_seEnable = true;
m_bgmEnable = true;
m_seVolume = 100;
m_bgmVolume = 100;
m_rate = 50;
}
function playSE(sname, prio, vol) {
if (!m_seEnable) {
return(-1);
}
if (prio == undefined) {
prio = PRIO_NORMAL;
}
return(playSound(sname, prio, vol));
}
function playBGM(sname, vol) {
if (!m_bgmEnable) {
return(-1);
}
return(playSound(sname, PRIO_BGM, vol));
}
function playSound(sname, prio, vol) {
var _local2;
_local2 = getEmptyWork(prio);
if (_local2 == null) {
return(-1);
}
if (vol == undefined) {
vol = 100;
}
vol = util.Util.limitRange(vol, 0, 100);
_local2.resvol = 100;
_local2.playvol = vol;
_local2.prio = prio;
_local2.pan = 0;
_local2.time = getTimer();
_local2.index = 0;
_local2.playindex = 0;
_local2.data = m_resource[sname];
_local2.sts = STS_PLAY;
_local2.fadeTime = 0;
_local2.fadeCount = 0;
_local2.listPrio = m_prioList[prio].push(_local2.idf);
_local2.listUpdate = undefined;
playSoundOne(_local2.idf);
return(_local2.id);
}
function playSoundOne(id) {
var _local4;
var _local3;
var _local2;
_local2 = getWork(id);
if (_local2.data.length <= _local2.index) {
freeWork(_local2.idf);
return(undefined);
}
_local3 = _local2.snd;
_local4 = _local2.data[_local2.index];
_local2.resvol = _local4.vol;
_local2.snd.setVolume(calcVolume(_local2));
_local2.snd.setPan(_local2.pan);
_local3.attachSound(_local4.id);
_local2.playindex = _local2.index;
if (_local4.loop != 0) {
_local3.start(0, _local4.loop);
_local3.onSoundComplete = _local2.func;
_local2.index++;
} else {
_local3.start(0, 1);
_local3.onSoundComplete = _local2.func;
}
}
function setVolume(id, vol) {
var _local3;
var _local2;
_local2 = getCheckedWork(id);
if (_local2 == null) {
return(undefined);
}
_local2.playvol = util.Util.limitRange(vol, 0, 100);
_local3 = _local2.snd;
_local3.setVolume(calcVolume(_local2));
}
function setPan(id, pan) {
var _local3;
var _local2;
_local2 = getCheckedWork(id);
if (_local2 == null) {
return(undefined);
}
_local2.pan = util.Util.limitRange(pan, -100, 100);
_local3 = _local2.snd;
_local3.setPan(_local2.pan);
}
function stop(id) {
var _local2;
var _local4;
_local2 = getCheckedWork(id);
if (_local2 == null) {
return(undefined);
}
stopMain(_local2);
}
function stopSE() {
var _local2;
_local2 = PRIO_HIGH;
while (_local2 <= PRIO_LOW) {
stopPrio(_local2);
_local2++;
}
}
function stopBGM() {
stopPrio(PRIO_BGM);
}
function stopAll() {
stopSE();
stopBGM();
}
function setData(data) {
m_resource = data;
}
function setSEVolume(vol) {
var _local2;
m_seVolume = util.Util.limitRange(vol, 0, 100);
_local2 = PRIO_HIGH;
while (_local2 <= PRIO_LOW) {
setVolumePrio(_local2);
_local2++;
}
}
function setBGMVolume(vol) {
m_bgmVolume = util.Util.limitRange(vol, 0, 100);
setVolumePrio(PRIO_BGM);
}
function setRate(rate) {
m_rate = rate;
}
function setSEEnable(enable) {
m_seEnable = enable;
}
function setBGMEnable(enable) {
m_bgmEnable = enable;
}
function getInfo(id) {
var _local2;
var _local3;
_local2 = getCheckedWork(id);
if (_local2 == null) {
return(undefined);
}
_local3 = _local2.snd.position;
if (_local3 >= _local2.snd.duration) {
_local3 = 0;
}
return({idx:_local2.playindex, position:_local3});
}
function move() {
}
function destroy() {
stopAll();
var _local2 = 0;
while (_local2 < SOUND_MAX) {
var _local3 = getWork(_local2);
_local3.mc.removeMovieClip();
delete _local3.snd;
_local2++;
}
_local2 = 0;
while (_local2 < PRIO_MAX) {
delete m_prioList[_local2];
_local2++;
}
delete m_updateList;
delete m_freeList;
delete m_prioList;
delete m_soundWork;
m_mc.removeMovieClip();
}
function setVolumePrio(prioNum) {
var _local6;
var _local2;
var _local3;
var _local5;
var _local4;
_local6 = m_prioList[prioNum];
_local2 = _local6.getFirst();
while (!_local6.isLast(_local2)) {
_local4 = Number(_local2.get());
_local3 = getWork(_local4);
_local5 = _local3.snd;
_local5.setVolume(calcVolume(_local3));
_local2 = _local2.m_next;
}
}
function stopPrio(prioNum) {
var _local2;
var _local4;
var _local5;
var _local3;
_local2 = m_prioList[prioNum];
while (!_local2.isEmpty()) {
_local4 = _local2.getFirst();
_local3 = Number(_local4.get());
_local5 = getWork(_local3);
stopMain(_local5);
}
}
function stopMain(work) {
var _local2;
_local2 = work.snd;
_local2.stop();
freeWork(work.idf);
}
function getEmptyWork(prioNum) {
var _local5;
var _local8;
var _local3;
var _local4;
var _local2;
var _local6;
var _local7;
if (!m_freeList.isEmpty()) {
_local4 = Number(m_freeList.pop());
} else {
_local6 = -1;
_local7 = PRIO_LOW;
while (_local7 >= prioNum) {
_local8 = m_prioList[_local7];
_local2 = -1;
_local3 = _local8.getFirst();
while (!_local8.isLast(_local3)) {
_local4 = Number(_local3.get());
_local5 = getWork(_local4);
if ((_local2 == -1) || ((_local2 != -1) && (_local2 > _local5.time))) {
_local6 = _local4;
_local2 = _local5.time;
}
_local3 = _local3.m_next;
}
if (_local6 != -1) {
_local5 = getWork(_local4);
stopMain(_local5);
_local4 = _local6;
break;
}
_local7--;
}
if (_local6 == -1) {
return(null);
}
_local4 = Number(m_freeList.pop());
}
_local5 = getWork(_local4);
_local5.id = _local5.id + SOUND_MAX;
return(_local5);
}
function getWork(id) {
return(m_soundWork[id]);
}
function getCheckedWork(id) {
var _local2;
if (id < 0) {
return(null);
}
_local2 = m_soundWork[id % SOUND_MAX];
if (_local2.sts == STS_STOP) {
return(null);
}
if (_local2.id != id) {
return(null);
}
return(_local2);
}
function freeWork(id) {
var _local3;
var _local2;
_local3 = getWork(id);
_local3.sts = STS_STOP;
_local2 = _local3.listPrio;
_local2.cut();
_local2 = _local3.listUpdate;
if (_local2 != null) {
_local2.cut();
}
m_freeList.push(id);
}
function calcVolume(work) {
var _local3;
if (work.prio == PRIO_BGM) {
_local3 = ((work.playvol * work.resvol) * m_bgmVolume) / 10000;
} else {
_local3 = ((work.playvol * work.resvol) * m_seVolume) / 10000;
}
return(_local3);
}
function createCallback(id) {
var _local3 = function () {
var _local3 = arguments.callee.target;
var _local4 = arguments.callee.func;
var _local2 = arguments.callee.id;
return(_local4.call(_local3, _local2));
};
_local3.target = this;
_local3.func = playSoundOne;
_local3.id = id;
return(_local3);
}
static var SOUND_MAX = 16;
static var PRIO_BGM = 0;
static var PRIO_HIGH = 1;
static var PRIO_NORMAL = 2;
static var PRIO_LOW = 3;
static var PRIO_MAX = 4;
static var STS_STOP = 0;
static var STS_PLAY = 1;
static var STS_PAUSE = 2;
}
Symbol 3403 MovieClip [__Packages.util.Util] Frame 0
class util.Util
{
function Util () {
}
static function limitRange(x, mini, maxi) {
if (x < mini) {
x = mini;
} else if (x > maxi) {
x = maxi;
}
return(x);
}
static function calcTween(startVal, endVal, per, ezVal) {
var _local2;
_local2 = startVal + ((endVal - startVal) * per);
per = per * 100;
_local2 = _local2 + (((((100 * per) - (per * per)) * ezVal) / 1000000) * (endVal - startVal));
return(_local2);
}
static function crossPos(y, x1, y1, x2, y2) {
return(x1 + (((y - y1) * (x2 - x1)) / (y2 - y1)));
}
static function crossPos2(x1, y1, x2, y2, x3, y3, x4, y4) {
var _local3;
var _local4;
var _local1;
var _local2;
var _local9;
var _local8;
_local3 = (y2 - y1) / (x2 - x1);
_local4 = y1 - (_local3 * x1);
_local1 = (y4 - y3) / (x4 - x3);
_local2 = y3 - (_local1 * x3);
_local9 = (_local4 - _local2) / (_local1 - _local3);
_local8 = _local2 + (_local1 * _local9);
return({x:_local9, y:_local8});
}
static function binarySearchNear(data, chknum) {
var _local2;
var _local3;
var _local1;
_local2 = 0;
_local3 = data.length - 1;
do {
_local1 = Math.floor((_local2 + _local3) / 2);
if (data[_local1] < chknum) {
_local2 = _local1 + 1;
} else {
_local3 = _local1;
}
} while (_local2 < _local3);
_local1 = _local2;
if (_local1 == 0) {
_local1 = 1;
}
_local2 = data[_local1 - 1];
_local3 = data[_local1 + 0];
return((_local1 - 1) + ((chknum - _local2) / (_local3 - _local2)));
}
static function binarySearch(data, chknum) {
var _local2;
var _local3;
var _local1;
_local2 = 0;
_local3 = data.length - 1;
do {
_local1 = Math.floor((_local2 + _local3) / 2);
if (data[_local1] < chknum) {
_local2 = _local1 + 1;
} else if (data[_local1] > chknum) {
_local3 = _local1;
} else {
return(_local1);
}
} while (_local2 < _local3);
return(-1);
}
static function plusRad(rad) {
if (rad < 0) {
rad = (Math.PI*2) - ((-rad) % (Math.PI*2));
} else {
rad = rad % (Math.PI*2);
}
return(rad);
}
static function halfRad(rad) {
rad = plusRad(rad);
if (rad >= Math.PI) {
rad = Math.PI - rad;
}
return(rad);
}
static function getDist(x, y) {
return(Math.sqrt((x * x) + (y * y)));
}
static function getRandomHalf(val) {
return((val * Math.random()) - (val / 2));
}
static function getRandom(val) {
return(val * Math.random());
}
static function getRandomInt(val) {
return(Math.floor(val * Math.random()));
}
static function calcDist(x, y) {
return(Math.sqrt((x * x) + (y * y)));
}
static function shortestDist(x1, y1, x2, y2, cx, cy) {
var _local1;
var _local2;
var _local5;
if (x1 == x2) {
if (y1 == y2) {
return(calcDist(cx - x1, cy - y1));
}
_local1 = 1;
_local2 = 0;
_local5 = -x1;
} else {
_local1 = (y2 - y1) / (x2 - x1);
_local5 = y1 - (_local1 * x1);
_local2 = -1;
}
return(Math.abs(((_local1 * cx) + (_local2 * cy)) + _local5) / Math.sqrt((_local1 * _local1) + (_local2 * _local2)));
}
static function crossProduct2(x1, y1, x3, y3) {
return((x3 * y1) - (y3 * x1));
}
static function crossProduct3(x1, y1, x2, y2, x3, y3) {
return(((x3 - x2) * (y1 - y2)) - ((y3 - y2) * (x1 - x2)));
}
}
Symbol 3404 MovieClip [__Packages.app.sys.Option] Frame 0
class app.sys.Option
{
var m_hiScore, m_effect, m_bgm, m_se;
function Option () {
m_hiScore = INIT_HISCORE;
m_effect = true;
m_bgm = true;
m_se = true;
}
function load() {
var _local2;
_local2 = SharedObject.getLocal((SO_ID + "_") + VERSION);
if (_local2.data.HiScore == undefined) {
_local2.data.HiScore = m_hiScore;
}
if (_local2.data.Effect == undefined) {
_local2.data.Effect = m_effect;
}
if (_local2.data.Bgm == undefined) {
_local2.data.Bgm = m_bgm;
}
if (_local2.data.Se == undefined) {
_local2.data.Se = m_se;
}
HiScore = (_local2.data.HiScore);
Effect = (_local2.data.Effect);
Bgm = (_local2.data.Bgm);
Se = (_local2.data.Se);
}
function save() {
var _local2;
_local2 = SharedObject.getLocal((SO_ID + "_") + VERSION);
_local2.data.HiScore = HiScore;
_local2.data.Effect = Effect;
_local2.data.Bgm = Bgm;
_local2.data.Se = Se;
_local2.flush(512);
}
function get HiScore() {
return(m_hiScore);
}
function set HiScore(score) {
if (m_hiScore < score) {
m_hiScore = score;
}
//return(HiScore);
}
function get Effect() {
return(m_effect);
}
function set Effect(onoff) {
m_effect = onoff;
//return(Effect);
}
function get Bgm() {
return(m_bgm);
}
function set Bgm(onoff) {
m_bgm = onoff;
//return(Bgm);
}
function get Se() {
return(m_se);
}
function set Se(onoff) {
m_se = onoff;
//return(Se);
}
static var SO_ID = "BB";
static var VERSION = 0;
static var INIT_HISCORE = 10000;
}
Symbol 3405 MovieClip [__Packages.app.sys.Collision] Frame 0
class app.sys.Collision
{
var m_mode;
function Collision () {
m_mode = MD_NONE;
}
function reset() {
}
function setMode(mode) {
trace("collision::setMode:" + mode);
m_mode = mode;
}
function hitCheck() {
switch (m_mode) {
case MD_NONE :
break;
case MD_GROUND :
var _local19;
_local19 = app.sys.SysInfo.__get__GameInfo().Ball;
if (_local19.isShow() && (!_local19.isOutsideHit())) {
checkWallBall();
}
checkWallFielder();
var _local2;
var _local6;
var _local7;
var _local5;
var _local4;
var _local8;
var _local22;
var _local3;
var _local11;
var _local9;
var _local12;
var _local10;
_local6 = _local19.getOldPosition();
_local7 = _local19.getPosition();
_local22 = _local19.isGroundHit();
if (_local6.x > _local7.x) {
_local11 = _local7.x;
_local9 = _local6.x;
} else {
_local9 = _local7.x;
_local11 = _local6.x;
}
if (_local6.z > _local7.z) {
_local12 = _local7.z;
_local10 = _local6.z;
} else {
_local10 = _local7.z;
_local12 = _local6.z;
}
if (((_local22 || (_local6.y < 180)) || (_local7.y < 180)) && (_local19.isShow())) {
_local3 = app.enemy.CharacterType.GROUND_DEFENSE_START;
while (_local3 <= app.enemy.CharacterType.GROUND_DEFENSE_END) {
_local2 = app.enemy.GroundFielder(app.sys.SysInfo.__get__GameInfo().getGroundCharacter(_local3));
if (_local2.getNoCheckTime() > 0) {
} else {
_local5 = _local2.getX();
_local4 = _local2.getZ();
if ((((_local11 < (_local5 + (CHAR_WIDTH / 2))) && (_local9 > (_local5 - (CHAR_WIDTH / 2)))) && (_local12 < (_local4 + (CHAR_WIDTH / 2)))) && (_local10 > (_local4 - (CHAR_WIDTH / 2)))) {
_local8 = util.Util.shortestDist(_local6.x, _local6.z, _local7.x, _local7.z, _local5, _local4);
if (_local8 < CHAR_WIDTH) {
_local2.hitBall();
break;
}
}
}
_local3++;
}
}
checkRunnerTouch();
break;
case MD_MOUND :
var _local13;
var _local14;
var _local15;
var _local20;
var _local17;
var _local21;
var _local16;
var _local18;
_local13 = app.sys.SysInfo.GameInfo;
_local19 = _local13.Ball;
_local14 = _local19.getPosition();
_local15 = _local19.getOldPosition();
_local20 = _local13.getUserFirst();
_local17 = _local13.getUserLast();
if (_local13.isFirst()) {
_local21 = _local17;
_local16 = _local20;
} else {
_local21 = _local20;
_local16 = _local17;
}
if ((_local14.z <= 0) && (_local15.z > 0)) {
trace((("Batter1:" + _local15.z) + ":") + _local14.z);
_local18 = (1 - (_local15.z / (_local15.z - _local14.z))) * app.sys.SysInfo.getRate();
trace("Batter2:" + _local18);
_local16.hitBatter(_local18);
} else {
if (_local14.z > -420) {
break;
}
_local21.hitPitcher();
trace("check end" + _local16);
}
}
}
function destroy() {
}
function checkWallBall() {
var _local2;
var _local3;
_local2 = app.sys.SysInfo.__get__GameInfo().Ball;
_local3 = _local2.getPosition();
if (checkGroundWall(_local3.x, _local3.z)) {
_local2.hitWall();
}
}
function checkWallFielder() {
var _local2;
var _local5;
var _local4;
var _local3;
var _local6;
_local6 = app.enemy.CharacterType.GROUND_DEFENSE_END;
_local3 = app.enemy.CharacterType.GROUND_DEFENSE_START;
while (_local3 <= _local6) {
_local2 = app.enemy.GroundFielder(app.sys.SysInfo.__get__GameInfo().getGroundCharacter(_local3));
if (!_local2.isMove()) {
} else {
_local5 = _local2.getX();
_local4 = _local2.getZ();
if (checkGroundWall(_local5, _local4)) {
_local2.hitWall();
}
}
_local3++;
}
}
function checkGroundWall(x, z) {
var _local6;
var _local4;
var _local5;
var _local7;
var _local1 = false;
_local4 = Math.atan2(z, x);
if ((_local4 >= OUTSIDE_RAD_MIN) && (_local4 < OUTSIDE_RAD_MAX)) {
_local6 = util.Util.calcDist(x, z);
if (_local6 > (OUTSIDE_MIN_DIST - 500)) {
_local5 = ((_local4 / (Math.PI/180)) - 90) / 45;
_local7 = OUTSIDE_MAX_DIST - ((_local5 * _local5) * (OUTSIDE_MAX_DIST - OUTSIDE_MIN_DIST));
if (_local6 > _local7) {
_local1 = true;
}
}
} else if (((util.Util.crossProduct3(-7275, 6100, -1400, -1750, x, z) > 0) && (util.Util.crossProduct3(-1400, -1750, 1400, -1750, x, z) > 0)) && (util.Util.crossProduct3(1400, -1750, 7275, 6100, x, z) > 0)) {
} else {
_local1 = true;
}
return(_local1);
}
function checkRunnerTouch() {
var _local6;
var _local1;
var _local9;
var _local8;
var _local5;
var _local3;
var _local2;
var _local7;
var _local4;
_local2 = app.sys.SysInfo.__get__GameControl().getBallCarry();
if (_local2 != -1) {
_local4 = app.enemy.CharacterType.GROUND_DEFENSE_START;
while (_local4 <= app.enemy.CharacterType.GROUND_DEFENSE_END) {
_local6 = app.enemy.GroundFielder(app.sys.SysInfo.__get__GameInfo().getGroundCharacter(_local4));
if (_local6.isHaveBall()) {
_local9 = _local6.getX();
_local8 = _local6.getZ();
_local2 = app.sys.SysInfo.__get__GameControl().getFirstRunner();
while (_local2 != -1) {
_local1 = app.sys.SysInfo.__get__GameControl().getRunner(_local2);
if (_local1.isActive()) {
_local5 = _local1.getX();
_local3 = _local1.getZ();
_local7 = util.Util.calcDist(_local9 - _local5, _local8 - _local3);
if (_local7 < (CHAR_WIDTH * 2)) {
_local1.hitBall();
}
}
_local2 = _local1.getNext();
}
break;
}
_local4++;
}
}
}
function checkHomerun(posVec) {
var _local5;
var _local4;
var _local1;
var _local2;
_local5 = Math.atan2(posVec.z, posVec.x);
_local4 = util.Util.getDist(posVec.x, posVec.z);
_local1 = ((_local5 / (Math.PI/180)) - 90) / 45;
_local2 = OUTSIDE_MAX_DIST - ((_local1 * _local1) * (OUTSIDE_MAX_DIST - OUTSIDE_MIN_DIST));
trace((("Collision:" + _local4) + ":") + _local2);
return(_local4 > _local2);
}
static var MD_NONE = 0;
static var MD_GROUND = 1;
static var MD_MOUND = 2;
static var CHAR_WIDTH = 75;
static var OUTSIDE_RAD_MIN = 0.698131700797732;
static var OUTSIDE_RAD_MAX = 2.44346095279206;
static var OUTSIDE_MIN_DIST = 9910;
static var OUTSIDE_MAX_DIST = 12200;
}
Symbol 3406 MovieClip [__Packages.app.enemy.Ball] Frame 0
class app.enemy.Ball extends app.enemy.Enemy
{
var m_nowPosVec, m_oldPosVec, m_startPosVec, m_targetPosVec, m_addPosVec, m_isShow, m_basePosVec, m_downList, m_groundParam, m_groundPosVec, m_mode, m_wl, m_context, m_isGroundCheck, m_isWallCheck, m_speed, m_totalTime, m_time, m_boundTimeIdx, m_boundTimeList, m_boundParamList, m_baseSpeed, m_baseRad, m_isGroundHit, m_baseDir, m_rad, m_isOutsideHit, m_dir, m_flyParam;
function Ball (context) {
super(context);
m_nowPosVec = new util.Vector3(0, 0, 0);
m_oldPosVec = new util.Vector3(0, 0, 0);
m_startPosVec = new util.Vector3(0, 0, 0);
m_targetPosVec = new util.Vector3(0, 0, 0);
m_addPosVec = new util.Vector3(0, 0, 0);
m_isShow = false;
m_basePosVec = new util.Vector3(0, 0, 0);
var _local3;
var _local4;
var _local5;
m_downList = [];
_local3 = 0;
while (_local3 < (DOWN_TIME * 80)) {
_local4 = ((app.sys.SysInfo.getRate() * _local3) / 4) / 1000;
_local5 = MDK * (((MDK * GRAVITY) * (1 - Math.exp((-KDM) * _local4))) - (GRAVITY * _local4));
m_downList.push(-_local5);
_local3++;
}
m_groundParam = {};
m_groundParam.SpeedRate = 0.95;
m_groundParam.BoundRate = 0.6;
m_groundParam.GroundReg = 1111.11111111111;
m_groundPosVec = new util.Vector3(0, 0, 0);
m_mode = MD_NONE;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
m_isGroundCheck = false;
m_isWallCheck = false;
m_oldPosVec.x = m_nowPosVec.x;
m_oldPosVec.y = m_nowPosVec.y;
m_oldPosVec.z = m_nowPosVec.z;
switch (m_mode) {
case MD_NONE :
break;
case MD_MOUND :
var _local14;
var _local13;
var _local12;
var _local5;
_local14 = m_startPosVec.x - m_targetPosVec.x;
_local13 = m_startPosVec.y - m_targetPosVec.y;
_local12 = m_startPosVec.z - m_targetPosVec.z;
m_nowPosVec.z = m_nowPosVec.z - (((((m_speed * 1000) * 100) / 3600) * app.sys.SysInfo.getRate()) / 1000);
m_nowPosVec.z = Math.max(m_nowPosVec.z, m_targetPosVec.z);
_local5 = (m_startPosVec.z - m_nowPosVec.z) / _local12;
m_nowPosVec.y = m_startPosVec.y - (_local13 * _local5);
m_nowPosVec.x = m_startPosVec.x - (_local14 * _local5);
if (_local5 >= CHAGE_PER) {
var _local6;
_local6 = (_local5 - CHAGE_PER) / (1 - CHAGE_PER);
_local6 = _local6 * _local6;
m_nowPosVec.y = m_nowPosVec.y + (m_addPosVec.y * _local6);
m_nowPosVec.x = m_nowPosVec.x + (m_addPosVec.x * _local6);
if (m_nowPosVec.y < 0) {
m_nowPosVec.y = (-m_nowPosVec.y) / 2;
}
}
if (_local5 >= 1) {
m_mode = MD_MOUND_END;
}
break;
case MD_MOUND_END :
break;
case MD_GROUND :
var _local2;
var _local15;
var _local7;
var _local9;
var _local8;
var _local4;
var _local11;
var _local3;
var _local10 = false;
var _local16;
m_totalTime = m_totalTime + (app.sys.SysInfo.getRate() / 1000);
m_time = m_time + (app.sys.SysInfo.getRate() / 1000);
if (m_boundTimeList[m_boundTimeIdx] <= m_totalTime) {
if ((m_boundParamList.length - 1) <= m_boundTimeIdx) {
_local2 = m_boundParamList[m_boundTimeIdx];
m_basePosVec.x = _local2.x;
m_basePosVec.y = _local2.y;
m_basePosVec.z = _local2.z;
m_baseSpeed = _local2.speed;
m_baseRad = 0;
m_time = m_totalTime - m_boundTimeList[m_boundTimeIdx];
_local10 = true;
} else {
_local2 = m_boundParamList[m_boundTimeIdx];
m_basePosVec.x = _local2.x;
m_basePosVec.y = _local2.y;
m_basePosVec.z = _local2.z;
m_baseSpeed = _local2.speed;
m_baseRad = _local2.rad;
if ((m_boundTimeIdx == 1) && (!m_isGroundHit)) {
m_groundPosVec.x = _local2.x;
m_groundPosVec.y = _local2.y;
m_groundPosVec.z = _local2.z;
}
m_isGroundCheck = true;
m_time = m_totalTime - m_boundTimeList[m_boundTimeIdx];
m_boundTimeIdx++;
}
}
if (_local10) {
_local4 = m_baseSpeed * Math.cos(m_baseRad);
_local3 = _local4 / m_groundParam.GroundReg;
_local3 = Math.min(m_time, _local3);
_local7 = (_local4 * _local3) - (((m_groundParam.GroundReg * _local3) * _local3) / 2);
m_nowPosVec.x = m_basePosVec.x + (_local7 * Math.cos(m_baseDir));
m_nowPosVec.z = m_basePosVec.z + (_local7 * Math.sin(m_baseDir));
m_nowPosVec.y = 0;
m_speed = _local4 - (_local3 * m_groundParam.GroundReg);
m_rad = 0;
} else {
_local4 = m_baseSpeed * Math.cos(m_baseRad);
_local11 = m_baseSpeed * Math.sin(m_baseRad);
_local7 = (MDK * _local4) * (1 - Math.exp((-KDM) * m_time));
m_nowPosVec.x = m_basePosVec.x + (_local7 * Math.cos(m_baseDir));
m_nowPosVec.z = m_basePosVec.z + (_local7 * Math.sin(m_baseDir));
m_nowPosVec.y = m_basePosVec.y + (MDK * (((_local11 + (MDK * GRAVITY)) * (1 - Math.exp((-KDM) * m_time))) - (GRAVITY * m_time)));
_local9 = _local4 * Math.exp((-KDM) * m_time);
_local8 = ((_local11 + (MDK * GRAVITY)) * Math.exp((-KDM) * m_time)) - (MDK * GRAVITY);
m_speed = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
m_rad = Math.atan2(_local8, _local9);
}
}
return(true);
}
function hitWall() {
m_isWallCheck = true;
}
function ctrl() {
if (m_isGroundCheck) {
m_isGroundHit = true;
playBoundSE();
}
if (m_isWallCheck) {
var _local2 = false;
if (m_isGroundHit) {
} else if (m_nowPosVec.y < 400) {
m_isGroundHit = true;
m_groundPosVec.x = m_oldPosVec.x;
m_groundPosVec.y = m_oldPosVec.y;
m_groundPosVec.z = m_oldPosVec.z;
} else {
m_isOutsideHit = true;
m_groundPosVec.x = m_nowPosVec.x;
m_groundPosVec.y = m_nowPosVec.y;
m_groundPosVec.z = m_nowPosVec.z;
}
if (m_isGroundHit) {
setPosition(m_oldPosVec.x, m_oldPosVec.y, m_oldPosVec.z);
setPower(m_speed / 2, m_dir + Math.PI, m_rad);
playBoundSE();
}
}
if (m_isOutsideHit) {
if (m_nowPosVec.y < 400) {
hide();
setNoneMode();
}
}
return(true);
}
function disp() {
}
function destroy() {
app.sys.SysInfo.__get__WorkList().cut(m_wl);
}
function playBoundSE() {
app.sys.SysInfo.__get__SoundManager().playSE("Bound");
}
function updateFuture(isFirst) {
var _local12;
var _local14;
var _local10;
var _local13;
var _local6;
var _local7;
var _local16;
var _local11;
var _local9;
var _local3;
var _local17;
var _local8;
var _local5;
var _local4;
var _local2;
var _local15;
m_boundTimeList = [];
m_boundParamList = [];
m_boundTimeIdx = 1;
_local14 = m_nowPosVec.x;
_local10 = m_nowPosVec.y;
_local13 = m_nowPosVec.z;
_local6 = m_speed;
_local7 = m_rad;
_local16 = m_dir;
_local2 = {};
_local2.x = _local14;
_local2.y = _local10;
_local2.z = _local13;
_local2.dx = 0;
_local2.speed = _local6;
_local2.rad = _local7;
m_boundTimeList.push(0);
m_boundParamList.push(_local2);
_local15 = 0;
_local12 = 0;
while (_local12 < BOUND_CNT) {
_local11 = _local6 * Math.cos(_local7);
_local9 = _local6 * Math.sin(_local7);
_local3 = Math.log((_local9 + (MDK * GRAVITY)) / (MDK * GRAVITY)) * MDK;
_local17 = (MDK * (((_local9 + (MDK * GRAVITY)) * (1 - Math.exp((-KDM) * _local3))) - (GRAVITY * _local3))) + _local10;
_local3 = _local3 + (((util.Util.binarySearchNear(m_downList, _local17) * app.sys.SysInfo.getRate()) / 4) / 1000);
_local8 = (MDK * _local11) * (1 - Math.exp((-KDM) * _local3));
_local14 = _local14 + (_local8 * Math.cos(_local16));
_local13 = _local13 + (_local8 * Math.sin(_local16));
_local10 = 0;
_local5 = _local11 * Math.exp((-KDM) * _local3);
_local4 = ((_local9 + (MDK * GRAVITY)) * Math.exp((-KDM) * _local3)) - (MDK * GRAVITY);
_local5 = _local5 * m_groundParam.SpeedRate;
_local4 = _local4 * (-m_groundParam.BoundRate);
_local6 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
_local7 = Math.atan2(_local4, _local5);
_local2 = {};
_local2.x = _local14;
_local2.y = _local10;
_local2.z = _local13;
_local2.dx = _local8;
_local2.speed = _local6;
_local2.rad = _local7;
_local15 = _local15 + _local3;
m_boundTimeList.push(_local15);
m_boundParamList.push(_local2);
if (_local3 < 0.05) {
break;
}
_local12++;
}
}
function setPosition(x, y, z) {
m_nowPosVec.x = x;
m_nowPosVec.y = y;
m_nowPosVec.z = z;
}
function setPower(power, dir, rad) {
m_speed = power;
m_dir = dir;
m_rad = rad;
m_basePosVec.x = m_nowPosVec.x;
m_basePosVec.y = m_nowPosVec.y;
m_basePosVec.z = m_nowPosVec.z;
m_baseSpeed = m_speed;
m_baseRad = m_rad;
m_baseDir = m_dir;
m_totalTime = 0;
m_time = 0;
updateFuture(true);
}
function calcFlyParam() {
var _local11;
var _local10;
var _local2;
var _local14;
var _local5;
var _local7;
var _local8;
var _local6;
var _local9;
var _local13;
var _local12;
var _local4;
var _local3;
_local7 = m_basePosVec.x;
_local8 = m_basePosVec.y;
_local6 = m_basePosVec.z;
_local9 = m_dir;
_local13 = m_rad;
_local12 = m_speed;
_local11 = _local12 * Math.cos(_local13);
_local10 = _local12 * Math.sin(_local13);
_local2 = Math.log((_local10 + (MDK * GRAVITY)) / (MDK * GRAVITY)) * MDK;
_local14 = (MDK * (((_local10 + (MDK * GRAVITY)) * (1 - Math.exp((-KDM) * _local2))) - (GRAVITY * _local2))) + _local8;
_local2 = _local2 + (((util.Util.binarySearchNear(m_downList, _local14 - 150) * app.sys.SysInfo.getRate()) / 4) / 1000);
_local5 = (MDK * _local11) * (1 - Math.exp((-KDM) * _local2));
_local7 = _local7 + (_local5 * Math.cos(_local9));
_local6 = _local6 + (_local5 * Math.sin(_local9));
_local8 = 150;
_local4 = {};
_local4.x = _local7;
_local4.y = _local8;
_local4.z = _local6;
_local4.dist = _local5;
_local4.speed = _local12;
_local4.rad = _local13;
_local4.dir = Math.atan2(_local6, _local7);
_local4.time = _local2;
_local2 = Math.log((_local10 + (MDK * GRAVITY)) / (MDK * GRAVITY)) * MDK;
_local5 = (MDK * _local11) * (1 - Math.exp((-KDM) * _local2));
_local8 = m_basePosVec.y + (MDK * (((_local10 + (MDK * GRAVITY)) * (1 - Math.exp((-KDM) * _local2))) - (GRAVITY * _local2)));
_local7 = m_basePosVec.x + (_local5 * Math.cos(_local9));
_local6 = m_basePosVec.z + (_local5 * Math.sin(_local9));
_local3 = {};
_local3.x = _local7;
_local3.y = _local8;
_local3.z = _local6;
_local3.dist = _local5;
_local3.time = _local2;
_local4.top = _local3;
_local2 = 3;
_local5 = (MDK * _local11) * (1 - Math.exp((-KDM) * _local2));
_local8 = m_basePosVec.y + (MDK * (((_local10 + (MDK * GRAVITY)) * (1 - Math.exp((-KDM) * _local2))) - (GRAVITY * _local2)));
_local7 = m_basePosVec.x + (_local5 * Math.cos(_local9));
_local6 = m_basePosVec.z + (_local5 * Math.sin(_local9));
_local3 = {};
_local3.x = _local7;
_local3.z = _local6;
_local3.dist = _local5;
_local3.time = _local2;
_local4.t2 = _local3;
m_flyParam = _local4;
}
function getFlyParam() {
return(m_flyParam);
}
function setMoundParam(ex, ey, ez, ax, ay, az, speed) {
m_startPosVec.x = MOUND_START_X;
m_startPosVec.y = MOUND_START_Y;
m_startPosVec.z = MOUND_START_Z;
m_targetPosVec.x = ex;
m_targetPosVec.y = ey;
m_targetPosVec.z = ez;
m_addPosVec.x = ax;
m_addPosVec.y = ay;
m_addPosVec.z = az;
m_speed = speed;
m_nowPosVec.x = m_startPosVec.x;
m_nowPosVec.y = m_startPosVec.y;
m_nowPosVec.z = m_startPosVec.z;
}
function getThrowRad(targetDist, speed, endZ) {
var _local5;
var _local9;
var _local7;
var _local2;
var _local6;
var _local11;
var _local3;
var _local10;
var _local8;
var _local4;
var _local14;
_local9 = 0;
_local7 = 0.261799387799149;
_local4 = MDK * GRAVITY;
_local14 = (app.sys.SysInfo.getRate() / 4) / 1000;
_local8 = 16;
do {
_local2 = (_local9 + _local7) / 2;
_local11 = speed * Math.cos(_local2);
_local6 = speed * Math.sin(_local2);
_local3 = Math.log((_local6 + _local4) / _local4) * MDK;
_local10 = MDK * (((_local6 + _local4) * (1 - Math.exp((-KDM) * _local3))) - (GRAVITY * _local3));
_local3 = _local3 + (util.Util.binarySearchNear(m_downList, _local10 + endZ) * _local14);
_local5 = (MDK * _local11) * (1 - Math.exp((-KDM) * _local3));
if (Math.abs(_local5 - targetDist) < 10) {
return(_local2);
}
if (_local5 > targetDist) {
_local7 = _local2;
} else {
_local9 = _local2;
}
_local8--;
} while (_local8 > 0);
_local2 = _local7;
return(_local2);
}
function getPosition() {
return(m_nowPosVec);
}
function getOldPosition() {
return(m_oldPosVec);
}
function setNoneMode() {
m_mode = MD_NONE;
}
function setMoundMode() {
m_mode = MD_MOUND;
}
function setGroundMode() {
m_mode = MD_GROUND;
}
function setSpeed(speed) {
m_speed = speed;
}
function getSpeed() {
return(m_speed);
}
function show() {
m_isShow = true;
}
function hide() {
m_isShow = false;
}
function isShow() {
return(m_isShow);
}
function clearHit() {
m_isGroundHit = false;
m_isOutsideHit = false;
}
function clearHitCheck() {
m_isGroundCheck = false;
m_isWallCheck = false;
}
function isGroundHit() {
return(m_isGroundHit);
}
function getGroundHitPosition() {
return(m_groundPosVec);
}
function isOutsideHit() {
return(m_isOutsideHit);
}
static var MOUND_START_X = -50;
static var MOUND_START_Y = 140;
static var MOUND_START_Z = 1844;
static var MD_NONE = 0;
static var MD_MOUND = 10;
static var MD_MOUND_END = 11;
static var MD_GROUND = 20;
static var CHAGE_PER = 0.7;
static var GRAVITY = 980;
static var FUTURE_MAX = 24;
static var AIR_REGST = 0.25;
static var MDK = 1 / AIR_REGST;
static var KDM = AIR_REGST / 1;
static var DOWN_TIME = 10;
static var BOUND_CNT = 20;
}
Symbol 3407 MovieClip [__Packages.util.Vector3] Frame 0
class util.Vector3
{
var x, y, z;
function Vector3 (x, y, z) {
this.x = x;
this.y = y;
this.z = z;
}
}
Symbol 3408 MovieClip [__Packages.app.enemy.CharacterBase] Frame 0
class app.enemy.CharacterBase extends app.enemy.Enemy
{
var m_mc, m_x, m_y, m_z, m_team, m_motion, m_dir, m_anime, m_show, m_posVec, m_nowPosVec, m_nowTeam, m_nowMotion, m_nowDir, m_nowAnime, m_nowShow, m_baseSize, m_baseScale, m_baseHeight, m_xScale, m_isMotUpdate, m_isPosUpdate, m_wl, m_context;
function CharacterBase (context, parentMC, mcid) {
super(context);
m_mc = util.MovieClipFactory.createOnMc(parentMC, mcid, mcid);
m_mc._x = 0;
m_mc._y = 0;
m_mc._visible = true;
m_mc.stop();
m_x = 0;
m_y = 0;
m_z = 0;
m_team = 1;
m_motion = 1;
m_dir = 1;
m_anime = 1;
m_show = true;
m_posVec = new util.Vector3(0, 0, 0);
m_nowPosVec = new util.Vector3(0, 0, 0);
m_nowTeam = -1;
m_nowMotion = -1;
m_nowDir = -1;
m_nowAnime = -1;
m_nowShow = false;
m_baseSize = 88;
m_baseScale = 200;
m_baseHeight = 180;
m_xScale = 1;
m_isMotUpdate = true;
m_isPosUpdate = true;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
return(true);
}
function ctrl() {
return(true);
}
function disp() {
if (m_isMotUpdate) {
if (((((m_team != m_nowTeam) || (m_motion != m_nowMotion)) || (m_dir != m_nowDir)) || (m_anime != m_nowAnime)) || (m_show != m_nowShow)) {
m_mc.gotoAndStop(m_team);
m_mc.Mot.gotoAndStop(m_motion);
m_mc.Mot.Dir.gotoAndStop(m_dir);
m_mc.Mot.Dir.Anime.gotoAndStop(m_anime % (m_mc.Mot.Dir.Anime._totalframes + 1));
m_mc._visible = m_show;
m_nowTeam = m_team;
m_nowMotion = m_motion;
m_nowDir = m_dir;
m_nowAnime = m_anime;
m_nowShow = m_show;
}
m_isMotUpdate = false;
}
if (m_isPosUpdate) {
if (((m_posVec.x != m_nowPosVec.x) || (m_posVec.y != m_nowPosVec.y)) || (m_posVec.z != m_nowPosVec.z)) {
m_mc._x = m_posVec.x;
m_mc._y = m_posVec.y;
m_mc._yscale = (m_posVec.z / m_baseSize) * m_baseScale;
m_mc._xscale = m_mc._yscale * m_xScale;
m_nowPosVec.x = m_posVec.x;
m_nowPosVec.y = m_posVec.y;
m_nowPosVec.z = m_posVec.z;
}
m_isPosUpdate = false;
}
}
function destroy() {
m_mc.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
}
function setTeam(team) {
m_team = team;
m_isMotUpdate = true;
}
function setMotion(motion) {
m_motion = motion;
m_isMotUpdate = true;
}
function setDir(dir) {
m_dir = dir;
m_isMotUpdate = true;
}
function setAnime(anime) {
m_anime = anime;
m_isMotUpdate = true;
}
function getX() {
return(m_x);
}
function getY() {
return(m_y);
}
function getZ() {
return(m_z);
}
function show() {
m_show = true;
m_isMotUpdate = true;
}
function hide() {
m_show = false;
m_isMotUpdate = true;
}
function initPosition() {
}
}
Symbol 3409 MovieClip [__Packages.app.enemy.GroundCharacter] Frame 0
class app.enemy.GroundCharacter extends app.enemy.CharacterBase
{
var m_type, m_baseSize, m_baseScale, m_motionMode, m_motionTime, m_runSE, m_runSpeed, m_motLoopTime, m_anime, m_motLoopLen, m_isMotUpdate, m_isEndMotion, m_motLoopStart, m_motionWaitTime, m_motLoopWait, m_dir, m_motion, m_targetDir, m_isPosUpdate, m_x, m_y, m_z, m_baseHeight, m_posVec;
function GroundCharacter (context, parentMC, mcid, type) {
super(context, parentMC, mcid);
m_type = type;
m_baseSize = 88;
m_baseScale = 200;
m_motionMode = MOT_STOP;
m_motionTime = 0;
m_runSE = -1;
m_runSpeed = RUN_SPEED;
}
function move() {
m_motionTime = m_motionTime + app.sys.SysInfo.getRate();
switch (m_motionMode) {
case MOT_NONELOOP_LOOP :
break;
case MOT_LOOP_LOOP :
m_motionTime = m_motionTime % m_motLoopTime;
m_anime = (m_motLoopLen * m_motionTime) / m_motLoopTime;
m_isMotUpdate = true;
break;
case MOT_ONELOOPFINISH_LOOP :
if (m_motionTime >= m_motLoopTime) {
m_motionTime = m_motLoopTime;
m_isEndMotion = true;
m_motionMode = MOT_NONELOOP_LOOP;
}
m_anime = Math.floor(m_motLoopStart + (((m_motLoopLen - 1) * m_motionTime) / m_motLoopTime));
m_isMotUpdate = true;
break;
case MOT_ONELOOPWAIT_LOOP :
if (m_motionTime >= m_motLoopTime) {
m_motionTime = m_motLoopTime;
m_motionWaitTime = m_motLoopWait;
m_motionMode = MOT_ONELOOPWAIT_WAIT;
}
m_anime = Math.floor(m_motLoopStart + (((m_motLoopLen - 1) * m_motionTime) / m_motLoopTime));
m_isMotUpdate = true;
break;
case MOT_ONELOOPWAIT_WAIT :
m_motionWaitTime = m_motionWaitTime - app.sys.SysInfo.getRate();
if (m_motionWaitTime < 0) {
m_motionMode = MOT_NONE;
}
break;
case MOT_STOP :
m_anime = 1;
m_dir = 1;
m_isMotUpdate = true;
m_motionMode = MOT_NONELOOP_LOOP;
break;
case MOT_NONE :
m_motion = ANI_NORMAL_MOT;
m_anime = 1;
m_isMotUpdate = true;
m_motionMode = MOT_NONELOOP_LOOP;
break;
case MOT_NORMAL :
m_motion = ANI_NORMAL_MOT;
m_anime = 1;
m_motionTime = 0;
m_motLoopTime = ANI_NORMAL_TIME;
m_motLoopLen = ANI_NORMAL_LEN;
m_motionMode = MOT_LOOP_LOOP;
m_isMotUpdate = true;
break;
case MOT_RUN :
m_motion = ANI_RUN_MOT;
m_anime = 1;
m_motionTime = 0;
m_motLoopTime = ANI_RUN_TIME;
m_motLoopLen = ANI_RUN_LEN;
m_motionMode = MOT_LOOP_LOOP;
m_isMotUpdate = true;
playRunSE();
break;
case MOT_FLY_STANDBY :
m_motion = ANI_FLY_MOT;
m_anime = ANI_FLY_STANDBY_START;
m_motionTime = 0;
m_motionMode = MOT_NONELOOP_LOOP;
m_isMotUpdate = true;
break;
case MOT_FLY_CATCH :
m_motion = ANI_FLY_MOT;
m_anime = ANI_FLY_CATCH_START;
m_motionTime = 0;
m_motLoopTime = ANI_FLY_CATCH_TIME;
m_motLoopStart = ANI_FLY_CATCH_START;
m_motLoopLen = ANI_FLY_CATCH_LEN;
m_motionMode = MOT_ONELOOPFINISH_LOOP;
m_isMotUpdate = true;
break;
case MOT_GOLO_STANDBY :
m_motion = ANI_GOLO_MOT;
m_anime = ANI_GOLO_STANDBY_START;
m_motionTime = 0;
m_motionMode = MOT_NONELOOP_LOOP;
m_isMotUpdate = true;
break;
case MOT_GOLO_CATCH :
m_motion = ANI_GOLO_MOT;
m_anime = ANI_GOLO_CATCH_START;
m_motionTime = 0;
m_motLoopTime = ANI_GOLO_CATCH_TIME;
m_motLoopStart = ANI_GOLO_CATCH_START;
m_motLoopLen = ANI_GOLO_CATCH_LEN;
m_motionMode = MOT_ONELOOPFINISH_LOOP;
m_isMotUpdate = true;
break;
case MOT_CATCH_STANDBY :
m_motion = ANI_CATCH_MOT;
m_anime = ANI_CATCH_STANDBY_START;
m_motionTime = 0;
m_motionMode = MOT_NONELOOP_LOOP;
m_isMotUpdate = true;
break;
case MOT_CATCH_CATCH :
m_motion = ANI_CATCH_MOT;
m_anime = ANI_CATCH_CATCH_START;
m_motionTime = 0;
m_motLoopTime = ANI_CATCH_CATCH_TIME;
m_motLoopStart = ANI_CATCH_CATCH_START;
m_motLoopLen = ANI_CATCH_CATCH_LEN;
m_motionMode = MOT_ONELOOPFINISH_LOOP;
m_isMotUpdate = true;
break;
case MOT_THROW_STANDBY :
m_motion = ANI_THROW_MOT;
m_anime = ANI_THROW_STANDBY_START;
m_motionTime = 0;
m_motLoopTime = ANI_THROW_STANDBY_TIME;
m_motLoopStart = ANI_THROW_STANDBY_START;
m_motLoopLen = ANI_THROW_STANDBY_LEN;
m_motionMode = MOT_ONELOOPFINISH_LOOP;
m_isMotUpdate = true;
break;
case MOT_THROW_THROW :
m_motion = ANI_THROW_MOT;
m_anime = ANI_THROW_THROW_START;
m_motionTime = 0;
m_motLoopTime = ANI_THROW_THROW_TIME;
m_motLoopStart = ANI_THROW_THROW_START;
m_motLoopLen = ANI_THROW_THROW_LEN;
m_motionMode = MOT_ONELOOPFINISH_LOOP;
m_isMotUpdate = true;
break;
case MOT_OUT :
m_motion = ANI_OUT_MOT;
m_anime = ANI_OUT_START;
m_motionTime = 0;
m_motLoopTime = ANI_OUT_TIME;
m_motLoopStart = ANI_OUT_START;
m_motLoopLen = ANI_OUT_LEN;
m_motLoopWait = 1000;
m_motionMode = MOT_ONELOOPWAIT_LOOP;
m_isMotUpdate = true;
break;
case MOT_SAFE :
m_motion = ANI_SAFE_MOT;
m_anime = ANI_SAFE_START;
m_motionTime = 0;
m_motLoopTime = ANI_SAFE_TIME;
m_motLoopStart = ANI_SAFE_START;
m_motLoopLen = ANI_SAFE_LEN;
m_motLoopWait = 1000;
m_motionMode = MOT_ONELOOPWAIT_LOOP;
m_isMotUpdate = true;
}
return(super.move());
}
function disp() {
if (!app.sys.SysInfo.__get__GameInfo().__get__Ground().isVisible()) {
return(undefined);
}
if (m_isMotUpdate) {
var _local3;
_local3 = m_targetDir + 0.392699081698724;
_local3 = (Math.floor(_local3 / (Math.PI/4)) + 9) % 8;
_local3 = 8 - _local3;
m_dir = _local3;
}
if (m_isPosUpdate) {
app.sys.SysInfo.__get__GameInfo().__get__Ground().calcPositionWithSize(m_x, m_y, m_z, m_baseHeight, m_posVec);
}
super.disp();
}
function startMotion(motionMode) {
m_motionMode = motionMode;
m_motionTime = 0;
m_isEndMotion = false;
if (motionMode != MOT_RUN) {
stopRunSE();
}
}
function isEndMotion() {
return(m_isEndMotion);
}
function playRunSE() {
if (m_runSE == -1) {
m_runSE = app.sys.SysInfo.__get__SoundManager().playSE("Run");
}
}
function stopRunSE() {
if (m_runSE != -1) {
app.sys.SysInfo.__get__SoundManager().stop(m_runSE);
m_runSE = -1;
}
}
function setSpeed(speed) {
m_runSpeed = speed;
}
function getSpeed() {
return(m_runSpeed);
}
static var ANI_CATCH_MOT = 1;
static var ANI_CATCH_STANDBY_START = 1;
static var ANI_CATCH_CATCH_START = 4;
static var ANI_CATCH_CATCH_LEN = 5;
static var ANI_CATCH_CATCH_TIME = ((ANI_CATCH_CATCH_LEN - 1) * 50) / 2;
static var ANI_FLY_MOT = 2;
static var ANI_FLY_STANDBY_START = 1;
static var ANI_FLY_CATCH_START = 2;
static var ANI_FLY_CATCH_LEN = 7;
static var ANI_FLY_CATCH_TIME = ((ANI_FLY_CATCH_LEN - 1) * 50) / 2;
static var ANI_GOLO_MOT = 3;
static var ANI_GOLO_STANDBY_START = 1;
static var ANI_GOLO_CATCH_START = 4;
static var ANI_GOLO_CATCH_LEN = 5;
static var ANI_GOLO_CATCH_TIME = ((ANI_GOLO_CATCH_LEN - 1) * 50) / 2;
static var ANI_NORMAL_MOT = 4;
static var ANI_NORMAL_LEN = 11;
static var ANI_NORMAL_TIME = 550;
static var ANI_RUN_MOT = 5;
static var ANI_RUN_LEN = 11;
static var ANI_RUN_TIME = 550;
static var ANI_THROW_MOT = 6;
static var ANI_THROW_STANDBY_START = 1;
static var ANI_THROW_STANDBY_LEN = 9;
static var ANI_THROW_STANDBY_TIME = ((ANI_THROW_STANDBY_LEN - 1) * 50) / 2;
static var ANI_THROW_THROW_START = 10;
static var ANI_THROW_THROW_LEN = 2;
static var ANI_THROW_THROW_TIME = ((ANI_THROW_THROW_LEN - 1) * 50) / 2;
static var ANI_OUT_MOT = 7;
static var ANI_OUT_START = 1;
static var ANI_OUT_LEN = 8;
static var ANI_OUT_TIME = (ANI_OUT_LEN - 1) * 50;
static var ANI_SAFE_MOT = 8;
static var ANI_SAFE_START = 1;
static var ANI_SAFE_LEN = 8;
static var ANI_SAFE_TIME = (ANI_SAFE_LEN - 1) * 50;
static var MOT_NORMAL = 10;
static var MOT_RUN = 20;
static var MOT_FLY_STANDBY = 30;
static var MOT_FLY_CATCH = 40;
static var MOT_GOLO_STANDBY = 50;
static var MOT_GOLO_CATCH = 60;
static var MOT_CATCH_STANDBY = 70;
static var MOT_CATCH_CATCH = 80;
static var MOT_THROW_STANDBY = 90;
static var MOT_THROW_THROW = 100;
static var MOT_OUT = 110;
static var MOT_SAFE = 120;
static var MOT_NONE = 900;
static var MOT_STOP = 999;
static var MOT_NONELOOP_LOOP = 200;
static var MOT_LOOP_LOOP = 201;
static var MOT_ONELOOPFINISH_LOOP = 202;
static var MOT_ONELOOPWAIT_LOOP = 203;
static var MOT_ONELOOPWAIT_WAIT = 204;
static var RUN_SPEED = 694.444444444444;
static var THROW_SPEED = 2777.77777777778;
}
Symbol 3410 MovieClip [__Packages.app.enemy.GroundFielder] Frame 0
class app.enemy.GroundFielder extends app.enemy.GroundCharacter
{
var m_actMode, m_miniMode, m_hasBall, m_throwSpeed, m_noCheckTime, m_nowOnBaseNum, m_oldOnBaseNum, m_checkBase, m_oldPosX, m_x, m_oldPosZ, m_z, m_nowThrowtarget, m_throwTarget, startMotion, m_targetX, m_targetZ, m_targetDir, m_runSpeed, m_isPosUpdate, m_dir, m_targetRunnerIdx, isEndMotion, m_catchDir, m_catchY, m_targetIdx, m_targetDist, m_groundIdx, m_y, m_motion, m_anime, m_isMotUpdate, m_type, m_targetTime;
function GroundFielder (context, parentMC, mcid, type) {
super(context, parentMC, mcid, type);
initPosition();
m_actMode = ACT_NONE;
m_miniMode = -1;
m_hasBall = false;
m_throwSpeed = app.enemy.GroundCharacter.THROW_SPEED;
m_noCheckTime = 0;
m_nowOnBaseNum = -1;
m_oldOnBaseNum = -1;
m_checkBase = false;
m_oldPosX = m_x;
m_oldPosZ = m_z;
}
function move() {
var _local3;
m_oldPosX = m_x;
m_oldPosZ = m_z;
do {
_local3 = false;
switch (m_actMode) {
case ACT_NONE :
break;
case ACT_FLYCATCH :
m_miniMode = FC_START;
m_actMode = ACT_FLYCATCH_LOOP;
_local3 = true;
break;
case ACT_FLYCATCH_LOOP :
if (flyCatchMove()) {
_local3 = true;
}
break;
case ACT_BALLRUN :
m_miniMode = BR_START;
m_actMode = ACT_BALLRUN_LOOP;
_local3 = true;
break;
case ACT_BALLRUN_LOOP :
if (ballRunMove()) {
_local3 = true;
}
break;
case ACT_THROW :
m_miniMode = TH_START;
m_actMode = ACT_THROW_LOOP;
m_nowThrowtarget = -1;
m_throwTarget = -1;
_local3 = true;
break;
case ACT_THROW_LOOP :
if (throwMove()) {
}
break;
case ACT_CATCH :
m_miniMode = CH_START;
m_actMode = ACT_CATCH_LOOP;
_local3 = true;
break;
case ACT_CATCH_LOOP :
if (catchMove()) {
}
break;
case ACT_STANDBY :
m_miniMode = SB_START;
m_actMode = ACT_STANDBY_LOOP;
_local3 = true;
break;
case ACT_STANDBY_LOOP :
if (standbyMove()) {
_local3 = true;
}
break;
case ACT_NORMAL :
m_miniMode = NM_START;
m_actMode = ACT_NORMAL_LOOP;
_local3 = true;
break;
case ACT_NORMAL_LOOP :
if (!normalMove()) {
break;
}
_local3 = true;
}
} while (_local3);
m_noCheckTime = m_noCheckTime - app.sys.SysInfo.getRate();
if (m_noCheckTime < 0) {
m_noCheckTime = 0;
}
var _local5;
var _local6;
var _local4;
m_oldOnBaseNum = m_nowOnBaseNum;
if (m_nowOnBaseNum != -1) {
_local5 = app.sys.SysInfo.__get__GameInfo().__get__Ground().getBasePosition(m_nowOnBaseNum);
_local6 = util.Util.getDist(_local5.x - m_x, _local5.z - m_z);
if (_local6 > 40) {
app.sys.SysInfo.__get__GameControl().decOnBaseCount(m_nowOnBaseNum);
m_nowOnBaseNum = -1;
m_checkBase = false;
}
} else {
_local4 = 1;
while (_local4 <= 4) {
_local5 = app.sys.SysInfo.__get__GameInfo().__get__Ground().getBasePosition(_local4);
_local6 = util.Util.getDist(_local5.x - m_x, _local5.z - m_z);
if (_local6 < 40) {
m_nowOnBaseNum = _local4;
app.sys.SysInfo.__get__GameControl().incOnBaseCount(m_nowOnBaseNum);
}
_local4++;
}
}
return(super.move());
}
function flyCatchMove() {
var _local3;
var _local2;
var _local9;
var _local10 = app.sys.SysInfo.__get__GameControl();
var _local11 = app.sys.SysInfo.__get__GameInfo();
_local2 = m_miniMode;
do {
_local3 = false;
switch (_local2) {
case FC_START :
_local2 = FC_FLY_RUN;
_local3 = true;
break;
case FC_FLY_RUN :
var _local5;
startMotion(app.enemy.GroundCharacter.MOT_RUN);
_local5 = app.sys.SysInfo.__get__GameInfo().__get__Ball().getFlyParam();
m_targetX = _local5.x;
m_targetZ = _local5.z;
m_targetDir = Math.atan2(m_targetZ - m_z, m_targetX - m_x);
_local2 = FC_FLY_RUN_WAIT;
_local3 = true;
break;
case FC_FLY_RUN_WAIT :
var _local8;
var _local4;
var _local7 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
_local8 = util.Util.calcDist(m_targetX - m_x, m_targetZ - m_z);
if (_local8 < ((m_runSpeed * app.sys.SysInfo.getRate()) / 1000)) {
m_x = m_targetX;
m_z = m_targetZ;
_local2 = FC_FLY_STANDBY;
} else {
_local4 = (m_runSpeed * app.sys.SysInfo.getRate()) / 1000;
m_x = m_x + (_local4 * Math.cos(m_targetDir));
m_z = m_z + (_local4 * Math.sin(m_targetDir));
}
if (m_hasBall) {
setCatchMode();
_local9 = true;
} else if (_local7.isGroundHit()) {
setBallRunMode();
} else if (_local10.getBallCarry() != -1) {
setStandbyMode();
}
m_isPosUpdate = true;
break;
case FC_FLY_STANDBY :
_local7 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
var _local6;
_local6 = _local7.getPosition();
m_targetDir = Math.atan2(_local6.z - m_z, _local6.x - m_x);
startMotion(app.enemy.GroundCharacter.MOT_FLY_STANDBY);
_local2 = FC_FLY_STANDBY_WAIT;
break;
case FC_FLY_STANDBY_WAIT :
_local7 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
_local11 = app.sys.SysInfo.__get__GameInfo();
if (m_hasBall) {
setCatchMode();
_local9 = true;
} else if (_local7.isGroundHit()) {
setBallRunMode();
} else {
if (_local10.getBallCarry() == -1) {
break;
}
setStandbyMode();
}
}
} while (_local3);
m_miniMode = _local2;
return(_local9);
}
function flyRunMove() {
var _local3;
var _local2;
var _local9;
var _local10 = app.sys.SysInfo.__get__GameControl();
var _local11 = app.sys.SysInfo.__get__GameInfo();
_local2 = m_miniMode;
do {
_local3 = false;
switch (_local2) {
case FR_START :
_local2 = FR_FOLLOW;
_local3 = true;
break;
case FR_FOLLOW :
startMotion(app.enemy.GroundCharacter.MOT_RUN);
_local2 = FR_FOLLOW_FLY;
_local3 = true;
break;
case FR_FOLLOW_FLY :
var _local5;
_local5 = app.sys.SysInfo.__get__GameInfo().__get__Ball().getFlyParam();
m_targetX = _local5.x;
m_targetZ = _local5.z;
m_targetDir = Math.atan2(m_targetZ - m_z, m_targetX - m_x);
_local2 = FR_FOLLOW_FLY_WAIT;
_local3 = true;
break;
case FR_FOLLOW_FLY_WAIT :
var _local8;
var _local4;
var _local7 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
_local8 = util.Util.calcDist(m_targetX - m_x, m_targetZ - m_z);
_local4 = (m_runSpeed * app.sys.SysInfo.getRate()) / 1000;
m_x = m_x + (_local4 * Math.cos(m_targetDir));
m_z = m_z + (_local4 * Math.sin(m_targetDir));
m_isPosUpdate = true;
if (m_hasBall) {
setCatchMode();
_local9 = true;
} else if (_local7.isGroundHit()) {
_local2 = FR_FOLLOW_BOUND;
} else if (_local10.getBallCarry() != -1) {
setStandbyMode();
}
break;
case FR_FOLLOW_BOUND :
_local2 = FR_FOLLOW_BOUND_WAIT;
_local3 = true;
break;
case FR_FOLLOW_BOUND_WAIT :
_local7 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
_local11 = app.sys.SysInfo.__get__GameInfo();
var _local6;
_local6 = _local7.getPosition();
m_targetX = _local6.x;
m_targetZ = _local6.z;
m_targetDir = Math.atan2(m_targetZ - m_z, m_targetX - m_x);
_local8 = util.Util.calcDist(m_targetX - m_x, m_targetZ - m_z);
if (_local8 < ((m_runSpeed * app.sys.SysInfo.getRate()) / 1000)) {
m_x = m_targetX;
m_z = m_targetZ;
} else {
_local4 = (m_runSpeed * app.sys.SysInfo.getRate()) / 1000;
m_x = m_x + (_local4 * Math.cos(m_targetDir));
m_z = m_z + (_local4 * Math.sin(m_targetDir));
m_dir = m_targetDir;
}
m_isPosUpdate = true;
if (m_hasBall) {
setCatchMode();
_local9 = true;
} else {
if (_local10.getBallCarry() == -1) {
break;
}
setStandbyMode();
}
}
} while (_local3);
m_miniMode = _local2;
return(_local9);
}
function ballRunMove() {
var _local2;
var _local3;
var _local9;
var _local10 = app.sys.SysInfo.__get__GameControl();
var _local8 = app.sys.SysInfo.__get__GameInfo();
_local3 = m_miniMode;
do {
_local2 = false;
switch (_local3) {
case BR_START :
_local3 = BR_FOLLOW;
_local2 = true;
break;
case BR_FOLLOW :
startMotion(app.enemy.GroundCharacter.MOT_RUN);
_local3 = BR_FOLLOW_BOUND;
_local2 = true;
break;
case BR_FOLLOW_BOUND :
_local3 = BR_FOLLOW_BOUND_WAIT;
_local2 = true;
break;
case BR_FOLLOW_BOUND_WAIT :
var _local7;
var _local4;
var _local6 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
_local8 = app.sys.SysInfo.__get__GameInfo();
var _local5;
_local5 = _local6.getPosition();
m_targetX = _local5.x;
m_targetZ = _local5.z;
m_targetDir = Math.atan2(m_targetZ - m_z, m_targetX - m_x);
_local7 = util.Util.calcDist(m_targetX - m_x, m_targetZ - m_z);
if (_local7 < ((m_runSpeed * app.sys.SysInfo.getRate()) / 1000)) {
m_x = m_targetX;
m_z = m_targetZ;
} else {
_local4 = (m_runSpeed * app.sys.SysInfo.getRate()) / 1000;
m_x = m_x + (_local4 * Math.cos(m_targetDir));
m_z = m_z + (_local4 * Math.sin(m_targetDir));
m_dir = m_targetDir;
}
m_isPosUpdate = true;
if (m_hasBall) {
setCatchMode();
_local9 = true;
} else {
if (_local10.getBallCarry() == -1) {
break;
}
setStandbyMode();
}
}
} while (_local2);
m_miniMode = _local3;
return(_local9);
}
function throwMove() {
var _local4;
var _local2;
var _local21;
_local2 = m_miniMode;
do {
_local4 = false;
switch (_local2) {
case TH_START :
_local2 = TH_TARGET;
_local4 = true;
break;
case TH_TARGET :
if (m_throwTarget != -1) {
if (m_nowOnBaseNum == m_throwTarget) {
m_throwTarget = -1;
}
}
if ((m_throwTarget != -1) && (m_nowOnBaseNum != m_throwTarget)) {
var _local7;
m_nowThrowtarget = m_throwTarget;
if (app.sys.SysInfo.__get__GameControl().getOnBaseCount(m_throwTarget) != 0) {
_local7 = app.sys.SysInfo.__get__GameInfo().__get__Ground().getBasePosition(m_nowThrowtarget);
m_targetDir = Math.atan2(_local7.z - m_z, _local7.x - m_x);
_local2 = TH_THROW_STANDBY;
} else {
_local2 = TH_FOLLOW;
}
} else {
var _local13;
var _local9;
var _local5;
var _local17;
var _local16;
var _local18;
var _local8;
var _local14;
var _local12;
var _local10;
var _local11;
var _local3;
_local9 = -1;
_local5 = Number.POSITIVE_INFINITY;
_local3 = app.sys.SysInfo.__get__GameControl().getFirstRunner();
while (_local3 != -1) {
_local13 = app.sys.SysInfo.__get__GameControl().getRunner(_local3);
if (_local13.isActive()) {
_local12 = _local13.getNowDist();
_local10 = _local13.getNowBase();
_local11 = _local13.getFixedBase();
if ((_local12 != 0) || (_local10 != _local11)) {
_local17 = _local13.getX();
_local16 = _local13.getZ();
_local18 = util.Util.getDist(m_x - _local17, m_z - _local16);
if (_local18 < _local5) {
_local5 = _local18;
_local9 = _local3;
}
}
}
_local3 = _local13.getNext();
}
if ((_local9 != -1) && (_local5 < TOUCH_DIST)) {
m_targetRunnerIdx = _local9;
_local2 = TH_TOUCH;
}
}
break;
case TH_TOUCH :
startMotion(app.enemy.GroundCharacter.MOT_RUN);
_local2 = TH_TOUCH_LOOP;
_local4 = true;
break;
case TH_TOUCH_LOOP :
if (m_throwTarget != -1) {
_local2 = TH_TARGET;
_local4 = true;
} else {
var _local13 = app.sys.SysInfo.__get__GameControl().getRunner(m_targetRunnerIdx);
if (_local13.isActive()) {
var _local17 = _local13.getX();
var _local16 = _local13.getZ();
var _local14 = Math.atan2(_local16 - m_z, _local17 - m_x);
var _local8 = ((m_runSpeed * 1.2) * app.sys.SysInfo.getRate()) / 1000;
m_targetDir = _local14;
m_x = m_x + (_local8 * Math.cos(_local14));
m_z = m_z + (_local8 * Math.sin(_local14));
m_isPosUpdate = true;
} else {
startMotion(app.enemy.GroundCharacter.MOT_NORMAL);
_local2 = TH_TARGET;
}
}
break;
case TH_FOLLOW :
startMotion(app.enemy.GroundCharacter.MOT_RUN);
_local2 = TH_FOLLOW_LOOP;
_local4 = true;
break;
case TH_FOLLOW_LOOP :
if (m_nowThrowtarget != m_throwTarget) {
startMotion(app.enemy.GroundCharacter.MOT_NORMAL);
_local2 = TH_TARGET;
} else if (app.sys.SysInfo.__get__GameControl().getOnBaseCount(m_nowThrowtarget) != 0) {
startMotion(app.enemy.GroundCharacter.MOT_NORMAL);
_local2 = TH_TARGET;
} else {
var _local7 = app.sys.SysInfo.__get__GameInfo().__get__Ground().getBasePosition(m_nowThrowtarget);
var _local14 = Math.atan2(_local7.z - m_z, _local7.x - m_x);
var _local18 = util.Util.calcDist(_local7.x - m_x, _local7.z - m_z);
var _local8 = (m_runSpeed * app.sys.SysInfo.getRate()) / 1000;
m_targetDir = _local14;
if (_local18 < ((m_runSpeed * app.sys.SysInfo.getRate()) / 1000)) {
m_x = _local7.x;
m_z = _local7.z;
startMotion(app.enemy.GroundCharacter.MOT_NORMAL);
_local2 = TH_TARGET;
} else {
m_x = m_x + (_local8 * Math.cos(_local14));
m_z = m_z + (_local8 * Math.sin(_local14));
}
m_isPosUpdate = true;
}
break;
case TH_THROW_STANDBY :
startMotion(app.enemy.GroundCharacter.MOT_THROW_STANDBY);
_local2 = TH_THROW_STANDBY_WAIT;
break;
case TH_THROW_STANDBY_WAIT :
if (isEndMotion()) {
var _local19;
var _local20;
var _local15;
var _local6 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
var _local7 = app.sys.SysInfo.__get__GameInfo().__get__Ground().getBasePosition(m_nowThrowtarget);
var _local18 = util.Util.calcDist(_local7.x - m_x, _local7.z - m_z);
var _local14 = Math.atan2(_local7.z - m_z, _local7.x - m_x);
var _local8 = m_throwSpeed;
_local19 = _local6.getThrowRad(_local18, _local8, 30);
_local15 = app.sys.SysInfo.getRate() / 1000;
var _local17 = m_x + ((_local8 * Math.cos(_local14)) * _local15);
var _local16 = m_z + ((_local8 * Math.sin(_local14)) * _local15);
_local20 = 180;
setNoCheckTime();
_local6.setGroundMode();
_local6.setPosition(_local17, _local20, _local16);
_local6.setPower(_local8, _local14, _local19);
_local6.show();
m_hasBall = false;
m_checkBase = false;
app.sys.SysInfo.__get__GameControl().setTargetThrow(m_nowThrowtarget);
app.sys.SysInfo.__get__GameControl().setThrowPosition(_local17, _local16);
app.sys.SysInfo.__get__GameControl().setThrowDist(_local18);
app.sys.SysInfo.__get__SoundManager().playSE("Throw");
_local2 = TH_THROW_THROW;
_local4 = true;
}
break;
case TH_THROW_THROW :
startMotion(app.enemy.GroundCharacter.MOT_THROW_THROW);
_local2 = TH_THROW_THROW_WAIT;
break;
case TH_THROW_THROW_WAIT :
if (!isEndMotion()) {
break;
}
setStandbyMode();
}
} while (_local4);
m_miniMode = _local2;
return(_local21);
}
function catchMove() {
var _local3;
var _local2;
var _local4;
_local2 = m_miniMode;
do {
_local3 = false;
switch (_local2) {
case CH_START :
_local2 = CH_CATCH;
_local3 = true;
break;
case CH_CATCH :
m_targetDir = m_catchDir;
if (m_catchY < 30) {
startMotion(app.enemy.GroundCharacter.MOT_GOLO_CATCH);
app.sys.SysInfo.__get__SoundManager().playSE("Catch2");
} else if (m_catchY < 150) {
startMotion(app.enemy.GroundCharacter.MOT_CATCH_CATCH);
app.sys.SysInfo.__get__SoundManager().playSE("Catch1");
} else {
startMotion(app.enemy.GroundCharacter.MOT_FLY_CATCH);
app.sys.SysInfo.__get__SoundManager().playSE("Catch1");
}
_local2 = CH_CATCH_WAIT;
break;
case CH_CATCH_WAIT :
if (!isEndMotion()) {
break;
}
setThrowMode();
}
} while (_local3);
m_miniMode = _local2;
return(_local4);
}
function standbyMove() {
var _local5;
var _local4;
var _local12;
_local4 = m_miniMode;
do {
_local5 = false;
switch (_local4) {
case SB_START :
_local4 = SB_STANDBY;
_local5 = true;
break;
case SB_STANDBY :
startMotion(app.enemy.GroundCharacter.MOT_NORMAL);
_local4 = SB_STANDBY_WAIT;
_local5 = true;
break;
case SB_STANDBY_WAIT :
var _local10 = app.sys.SysInfo.__get__GameControl();
if (m_nowOnBaseNum < 0) {
var _local6;
var _local9;
var _local7;
var _local2;
var _local3;
_local6 = -1;
_local9 = Number.MAX_VALUE;
_local2 = 0;
while (_local2 < 4) {
if (app.sys.SysInfo.__get__GameControl().getOnBaseCount(_local2) == 0) {
_local3 = app.sys.SysInfo.__get__GameInfo().__get__Ground().getBasePosition(_local2);
_local7 = util.Util.calcDist(_local3.x - m_x, _local3.z - m_z);
if (_local9 > _local7) {
_local9 = _local7;
_local6 = _local2;
}
}
_local2++;
}
if (_local6 >= 0) {
_local3 = app.sys.SysInfo.__get__GameInfo().__get__Ground().getBasePosition(_local6);
m_targetX = _local3.x;
m_targetZ = _local3.z;
m_targetIdx = _local6;
m_targetDist = _local9;
m_targetDir = Math.atan2(m_targetZ - m_z, m_targetX - m_x);
app.sys.SysInfo.__get__GameControl().setOnBaseReserveCount(_local6, _local9);
_local4 = SB_RUN_BASE;
break;
}
if ((_local10.getBallCarry() == -1) && (_local10.getFlyReserve() == -1)) {
if (checkFollowBall()) {
setBallRunMode();
}
}
}
break;
case SB_RUN_BASE :
startMotion(app.enemy.GroundCharacter.MOT_RUN);
_local4 = SB_RUN_BASE_WAIT;
_local5 = true;
break;
case SB_RUN_BASE_WAIT :
var _local8;
var _local11;
if (app.sys.SysInfo.__get__GameControl().getOnBaseCount(m_targetIdx) > 0) {
_local4 = SB_STANDBY;
_local5 = true;
} else {
var _local9 = util.Util.calcDist(m_targetX - m_x, m_targetZ - m_z);
_local8 = (m_runSpeed * app.sys.SysInfo.getRate()) / 1000;
_local11 = app.sys.SysInfo.__get__GameControl().getOnBaseReserveCount(m_targetIdx);
if (_local11 > (_local9 - _local8)) {
if (_local9 < ((m_runSpeed * app.sys.SysInfo.getRate()) / 1000)) {
m_x = m_targetX;
m_z = m_targetZ;
_local4 = SB_STANDBY;
_local5 = true;
} else {
m_x = m_x + (_local8 * Math.cos(m_targetDir));
m_z = m_z + (_local8 * Math.sin(m_targetDir));
m_dir = m_targetDir;
_local9 = _local9 - _local8;
}
m_isPosUpdate = true;
app.sys.SysInfo.__get__GameControl().setOnBaseReserveCount(m_targetIdx, _local9);
} else {
_local4 = SB_STANDBY;
_local5 = true;
}
}
}
} while (_local5);
m_miniMode = _local4;
if (m_hasBall) {
setCatchMode();
_local12 = true;
trace("standby Chatch");
}
return(_local12);
}
function normalMove() {
var _local2;
var _local3;
var _local4;
_local3 = m_miniMode;
do {
_local2 = false;
switch (_local3) {
case NM_START :
_local3 = NM_STANDBY;
_local2 = true;
break;
case NM_STANDBY :
startMotion(app.enemy.GroundCharacter.MOT_NORMAL);
m_targetDir = Math.atan2(-m_z, -m_x);
_local3 = NM_STANDBY_WAIT;
_local2 = true;
break;
case NM_STANDBY_WAIT :
}
} while (_local2);
m_miniMode = _local3;
return(_local4);
}
function hitBall() {
var _local2 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
var _local3 = app.sys.SysInfo.__get__GameControl();
var _local4;
_local4 = _local2.getOldPosition();
m_catchY = _local4.y;
m_catchDir = Math.atan2(_local4.z - m_z, _local4.x - m_x);
_local2.setNoneMode();
_local2.setPosition(m_x, 120, m_z);
_local2.hide();
_local2.clearHitCheck();
_local3.setBallReserve();
_local3.setBallCarry(m_groundIdx);
_local3.setThrowDist(-1);
_local3.setFlyReserve(-1);
m_hasBall = true;
}
function hitWall() {
m_x = m_oldPosX;
m_z = m_oldPosZ;
m_isPosUpdate = true;
}
function checkFollowBall() {
return(false);
}
function ctrl() {
if (m_hasBall) {
if (!m_checkBase) {
if (m_nowOnBaseNum != -1) {
app.sys.SysInfo.__get__GameControl().retouchCheckRuunner(m_nowOnBaseNum);
app.sys.SysInfo.__get__GameControl().forceOutRunner(m_nowOnBaseNum);
app.sys.SysInfo.__get__GameControl().safeCheckRunner(m_nowOnBaseNum);
m_checkBase = true;
}
}
app.sys.SysInfo.__get__GameInfo().__get__Ball().setPosition(m_x, m_y, m_z);
}
return(super.ctrl());
}
function initPosition() {
m_oldPosX = m_x;
m_oldPosZ = m_z;
m_motion = 1;
m_dir = 1;
m_anime = 1;
m_isPosUpdate = true;
m_isMotUpdate = true;
}
function checkMoveMode() {
var _local2 = app.sys.SysInfo.__get__GameControl().getGameStatus();
trace((("checkMoveMode():" + m_type) + ":") + _local2);
switch (_local2) {
case app.enemy.GameStatus.GS_MOUND :
break;
case app.enemy.GameStatus.GS_GROUND_SHOT :
var _local3;
var _local4;
_local3 = app.sys.SysInfo.__get__GameInfo().__get__Ball().getFlyParam();
m_targetDist = util.Util.calcDist(_local3.x - m_x, _local3.z - m_z);
m_targetTime = m_targetDist / m_runSpeed;
break;
case app.enemy.GameStatus.GS_GROUND_FAIR :
break;
case app.enemy.GameStatus.GS_GROUND_CATCH :
break;
case app.enemy.GameStatus.GS_GROUND_FOUL :
break;
case app.enemy.GameStatus.GS_GROUND_SHOT_OUT :
break;
case app.enemy.GameStatus.GS_GROUND_CHECK :
break;
case app.enemy.GameStatus.GS_GROUND_HOMERUN :
}
}
function setFlyCatchMode() {
m_actMode = ACT_FLYCATCH;
}
function setFlyRunMode() {
m_actMode = ACT_FLYRUN;
}
function setBallRunMode() {
m_actMode = ACT_BALLRUN;
}
function setStandbyMode() {
m_actMode = ACT_STANDBY;
}
function setThrowMode() {
m_actMode = ACT_THROW;
}
function setCatchMode() {
m_actMode = ACT_CATCH;
}
function setNormalMode() {
m_actMode = ACT_NORMAL;
}
function setNoneMode() {
m_actMode = ACT_NONE;
}
function setNoCheckTime() {
m_noCheckTime = 250;
}
function getNoCheckTime() {
return(m_noCheckTime);
}
function isHaveBall() {
return(m_hasBall);
}
function setHaveBall() {
var _local2 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
var _local3 = app.sys.SysInfo.__get__GameControl();
m_hasBall = true;
_local2.setNoneMode();
_local2.setPosition(m_x, 120, m_z);
_local2.hide();
_local2.clearHitCheck();
_local3.setBallReserve();
_local3.setBallCarry(m_groundIdx);
_local3.setThrowDist(-1);
setThrowMode();
}
function setThrowTarget(baseNum) {
m_throwTarget = baseNum;
}
function getNowOnBaseNum() {
return(m_nowOnBaseNum);
}
function getOldOnBaseNum() {
return(m_oldOnBaseNum);
}
function setBaseCheck() {
m_checkBase = true;
}
function isBaseCheck() {
return(m_checkBase);
}
function clearStatus() {
m_hasBall = false;
m_checkBase = false;
m_throwTarget = -1;
m_nowOnBaseNum = -1;
m_oldOnBaseNum = -1;
}
function getTargetTime() {
return(m_targetTime);
}
function getTargetDist() {
return(m_targetDist);
}
function isMove() {
return((m_x != m_oldPosX) || (m_z != m_oldPosZ));
}
function getThrowSpeed() {
return(m_throwSpeed);
}
function isThrowStandby() {
return(m_actMode == ACT_THROW_LOOP);
}
function getTouchLimit() {
return(TOUCH_DIST);
}
function btrace(str) {
trace(((TypeStr[m_type] + "[ ") + str) + " ]");
}
static var ACT_NONE = 0;
static var ACT_FLYCATCH = 100;
static var ACT_FLYCATCH_LOOP = 110;
static var ACT_FLYRUN = 100;
static var ACT_FLYRUN_LOOP = 110;
static var ACT_BALLRUN = 200;
static var ACT_BALLRUN_LOOP = 210;
static var ACT_THROW = 300;
static var ACT_THROW_LOOP = 310;
static var ACT_CATCH = 350;
static var ACT_CATCH_LOOP = 360;
static var ACT_STANDBY = 400;
static var ACT_STANDBY_LOOP = 410;
static var ACT_NORMAL = 500;
static var ACT_NORMAL_LOOP = 510;
static var FC_START = 0;
static var BC_START = 0;
static var TH_START = 0;
static var FC_CHECK_DROP = 10;
static var FC_CHECK_DROP_MOVE = 11;
static var FC_FLY_RUN = 20;
static var FC_FLY_RUN_WAIT = 30;
static var FC_FLY_STANDBY = 40;
static var FC_FLY_STANDBY_WAIT = 41;
static var FC_FLY_CATCH = 42;
static var FC_FLY_CATCH_WAIT = 43;
static var FC_FOLLOW = 100;
static var FC_FOLLOW_FLY = 110;
static var FC_FOLLOW_FLY_WAIT = 111;
static var FC_FOLLOW_BOUND = 130;
static var FC_FOLLOW_BOUND_WAIT = 131;
static var FC_FOLLOW_CATCH = 140;
static var FC_FOLLOW_CATCH_WAIT = 141;
static var FC_STANDBY = 200;
static var FC_STANDBY_LOOP = 201;
static var FR_START = 0;
static var FR_FOLLOW = 100;
static var FR_FOLLOW_FLY = 110;
static var FR_FOLLOW_FLY_WAIT = 111;
static var FR_FOLLOW_BOUND = 130;
static var FR_FOLLOW_BOUND_WAIT = 131;
static var FR_FOLLOW_CATCH = 140;
static var FR_FOLLOW_CATCH_WAIT = 141;
static var FR_STANDBY = 200;
static var FR_STANDBY_LOOP = 201;
static var BR_START = 0;
static var BR_FOLLOW = 100;
static var BR_FOLLOW_BOUND = 110;
static var BR_FOLLOW_BOUND_WAIT = 120;
static var BR_FOLLOW_CATCH = 130;
static var BR_FOLLOW_CATCH_WAIT = 140;
static var BR_STANDBY = 200;
static var BR_STANDBY_LOOP = 201;
static var TH_TARGET = 10;
static var TH_THROW_STANDBY = 20;
static var TH_THROW_STANDBY_WAIT = 21;
static var TH_THROW_THROW = 30;
static var TH_THROW_THROW_WAIT = 31;
static var TH_TOUCH = 40;
static var TH_TOUCH_LOOP = 41;
static var TH_FOLLOW = 50;
static var TH_FOLLOW_LOOP = 51;
static var TOUCH_DIST = 914.366666666667;
static var CH_START = 10;
static var CH_CATCH = 100;
static var CH_CATCH_WAIT = 110;
static var SB_START = 10;
static var SB_STANDBY = 100;
static var SB_STANDBY_WAIT = 110;
static var SB_RUN_BASE = 200;
static var SB_RUN_BASE_WAIT = 210;
static var NM_START = 10;
static var NM_STANDBY = 100;
static var NM_STANDBY_WAIT = 110;
static var TypeStr = [" ", "LEFT ", "RIGHT ", "CENTER ", "FIRST ", "SECOND ", "SHORT ", "THIRD ", "CATCHER", "PITCHER", "BATTER ", "RUNNER ", " "];
}
Symbol 3411 MovieClip [__Packages.app.sys.GameControl] Frame 0
class app.sys.GameControl
{
var m_onBaseList, m_onBaseReserveList, m_isBallReserve, m_ballCarry, m_targetThrow, m_throwTargetDist, m_flyReserve, m_throwTargetX, m_throwTargetZ, m_gameStatus, m_catchTime, m_messageList, m_messageCount, m_runnerFirst;
function GameControl () {
m_onBaseList = [];
m_onBaseReserveList = [];
}
function initBallStatus() {
m_isBallReserve = false;
m_ballCarry = -1;
m_targetThrow = -1;
m_throwTargetDist = -1;
m_flyReserve = -1;
}
function setBallReserve() {
trace("BallReserve");
m_isBallReserve = true;
}
function isBallReserve() {
return(m_isBallReserve);
}
function setBallCarry(carry) {
m_ballCarry = carry;
}
function getBallCarry() {
return(m_ballCarry);
}
function setTargetThrow(target) {
m_targetThrow = target;
}
function getTargetThrow() {
return(m_targetThrow);
}
function setThrowPosition(x, z) {
m_throwTargetX = x;
m_throwTargetZ = z;
}
function setThrowDist(dist) {
m_throwTargetDist = dist;
}
function getThrowX() {
return(m_throwTargetX);
}
function getThrowZ() {
return(m_throwTargetZ);
}
function getThrowDist() {
return(m_throwTargetDist);
}
function setFlyReserve(type) {
m_flyReserve = type;
}
function getFlyReserve() {
return(m_flyReserve);
}
function setStartStatus() {
m_gameStatus = app.enemy.GameStatus.GS_MOUND;
m_catchTime = 0;
}
function setBatHitStatus() {
m_gameStatus = app.enemy.GameStatus.GS_GROUND_SHOT;
m_catchTime = 0;
}
function setFairStatus() {
m_gameStatus = app.enemy.GameStatus.GS_GROUND_FAIR;
m_catchTime = -1;
}
function setFlyCatchStatus() {
m_gameStatus = app.enemy.GameStatus.GS_GROUND_CATCH;
m_catchTime = app.sys.SysInfo.getTotalCount();
}
function setFoulStatus() {
m_gameStatus = app.enemy.GameStatus.GS_GROUND_FOUL;
}
function setHomerunStatus() {
m_gameStatus = app.enemy.GameStatus.GS_GROUND_HOMERUN;
m_catchTime = -1;
}
function setCheckStatus() {
m_gameStatus = app.enemy.GameStatus.GS_GROUND_CHECK;
m_catchTime = -1;
}
function setPushRunStatus() {
m_gameStatus = app.enemy.GameStatus.GS_GROUND_PUSH;
m_catchTime = -1;
}
function getGameStatus() {
return(m_gameStatus);
}
function getCatchTime() {
return(m_catchTime);
}
function initStatusMessage() {
m_messageList = [];
m_messageCount = 0;
}
function addStatusMessage(msg) {
msg.setCount(m_messageCount);
trace((("add Message[" + msg.getCount()) + "]:") + msg.getMessage());
m_messageCount++;
m_messageList.unshift(msg);
}
function getStatusMessageLength() {
return(m_messageList.length);
}
function getStatusMessage(idx) {
return(m_messageList[idx]);
}
function deleteStatusMessage(idx) {
var _local2;
_local2 = m_messageList[idx];
trace((("Delete Message[" + _local2.getCount()) + "]:") + _local2.getMessage());
m_messageList.splice(idx, 1);
}
function clearStatusMessage() {
var _local2;
while (m_messageList.length > 0) {
_local2 = app.enemy.StatusMessage(m_messageList.pop());
trace((("Clear Message[" + _local2.getCount()) + "]:") + _local2.getMessage());
}
}
function spliceStatusMessage(cnt) {
var _local2;
while (cnt > 0) {
_local2 = app.enemy.StatusMessage(m_messageList.pop());
trace((("Splice Message[" + _local2.getCount()) + "]:") + _local2.getMessage());
cnt--;
}
}
function getRunner(idx) {
return(app.enemy.GroundRunner(app.sys.SysInfo.__get__GameInfo().getGroundCharacter(app.enemy.CharacterType.GROUND_RUNNER + idx)));
}
function getFirstRunner() {
return(m_runnerFirst);
}
function initRunner() {
var _local3;
var _local2;
trace("InitRunner");
_local2 = 0;
while (_local2 < RUNNER_MAX) {
_local3 = getRunner(_local2);
_local3.free();
_local2++;
}
}
function connectRunner() {
var _local3;
var _local6;
var _local8;
var _local4;
var _local9;
var _local7;
var _local11;
var _local10;
var _local5;
var _local2;
trace("ConnectRunner");
_local8 = 4;
_local7 = -1;
_local5 = 0;
while (_local5 < RUNNER_MAX) {
_local3 = getRunner(_local5);
_local3.setNext(-1);
_local3.setPrev(-1);
if (_local3.isUse()) {
_local4 = _local3.getFixedBase();
if (_local8 > _local4) {
_local8 = _local4;
_local7 = _local5;
}
}
_local5++;
}
m_runnerFirst = _local7;
if (_local8 >= 4) {
trace("Runner None");
return(undefined);
}
trace("FirstRunner:" + m_runnerFirst);
_local5 = 0;
while (_local5 < RUNNER_MAX) {
_local3 = getRunner(_local5);
if (!_local3.isUse()) {
} else {
_local8 = _local3.getFixedBase();
_local9 = 4;
_local7 = -1;
_local2 = 0;
while (_local2 < RUNNER_MAX) {
if (_local5 == _local2) {
} else {
_local6 = getRunner(_local2);
if (!_local6.isUse()) {
} else {
_local4 = _local6.getFixedBase();
if ((_local8 < _local4) && (_local4 < _local9)) {
_local9 = _local4;
_local7 = _local2;
}
}
}
_local2++;
}
if (_local7 != -1) {
_local3.setNext(_local7);
}
}
_local5++;
}
_local11 = m_runnerFirst;
_local3 = getRunner(_local11);
_local10 = _local3.getNext();
while (_local10 != -1) {
_local6 = getRunner(_local10);
_local6.setPrev(_local11);
_local3 = _local6;
_local11 = _local10;
_local10 = _local3.getNext();
}
}
function backRunner() {
var _local3;
var _local2;
trace("BackRunner");
_local2 = 0;
while (_local2 < RUNNER_MAX) {
_local3 = getRunner(_local2);
if (_local3.isUse()) {
_local3.retry();
}
_local2++;
}
}
function normalRunner() {
var _local3;
var _local2;
trace("NormalRunner");
_local2 = 0;
while (_local2 < RUNNER_MAX) {
_local3 = getRunner(_local2);
if (_local3.isUse()) {
_local3.setNormalMode();
}
_local2++;
}
}
function fixRunner() {
var _local3;
var _local2;
trace("FixRunner");
_local2 = 0;
while (_local2 < RUNNER_MAX) {
_local3 = getRunner(_local2);
if (_local3.isUse() && (!_local3.isActive())) {
_local3.free();
}
_local2++;
}
}
function addRunner() {
var _local3;
var _local4 = -1;
var _local2;
_local2 = 0;
while (_local2 < RUNNER_MAX) {
_local3 = getRunner(_local2);
trace((("addRunner: " + _local2) + ":") + _local3);
if (!_local3.isUse()) {
_local3.get();
_local4 = _local2;
break;
}
_local2++;
}
return(_local4);
}
function showRunner() {
var _local3;
var _local2;
_local2 = 0;
while (_local2 < RUNNER_MAX) {
_local3 = getRunner(_local2);
if (_local3.isUse()) {
_local3.show();
break;
}
_local2++;
}
}
function forceRunRunner() {
var _local3;
var _local2;
_local2 = 0;
while (_local2 < RUNNER_MAX) {
_local3 = getRunner(_local2);
if (_local3.isUse()) {
_local3.setForceRun();
}
_local2++;
}
}
function fourBallsRunner() {
var _local3;
var _local2;
var _local4;
_local4 = 1;
_local2 = m_runnerFirst;
while (_local2 != -1) {
_local3 = getRunner(_local2);
_local3.pushRun(_local4);
_local4++;
_local2 = _local3.getNext();
}
}
function homerunRunner() {
var _local3;
var _local2;
_local2 = m_runnerFirst;
while (_local2 != -1) {
_local3 = getRunner(_local2);
_local3.forceRun(4);
_local2 = _local3.getNext();
}
}
function getRunnerCount() {
var _local2;
var _local4;
var _local3;
_local4 = 0;
_local3 = m_runnerFirst;
while (_local3 != -1) {
_local2 = getRunner(_local3);
if (_local2.isUse() && (_local2.isActive())) {
_local4++;
}
_local3 = _local2.getNext();
}
return(_local4);
}
function isMoveRunner() {
var _local2;
var _local3;
var _local4 = false;
_local3 = m_runnerFirst;
while (_local3 != -1) {
_local2 = getRunner(_local3);
if (_local2.isUse() && (_local2.isActive())) {
if ((_local2.getFixedBase() != _local2.getNowBase()) || (_local2.getNowDist() != 0)) {
_local4 = true;
break;
}
}
_local3 = _local2.getNext();
}
return(_local4);
}
function flyOutRunner() {
var _local2;
if (m_runnerFirst != -1) {
_local2 = getRunner(m_runnerFirst);
_local2.out();
playOut(1);
}
}
function retouchCheckRuunner(base) {
var _local2;
var _local5;
var _local3;
var _local6 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
trace("retouchCheck:" + base);
_local5 = getCatchTime();
if (_local5 <= 0) {
return(undefined);
}
_local3 = m_runnerFirst;
if (_local3 == -1) {
return(undefined);
}
_local2 = getRunner(_local3);
_local3 = _local2.getNext();
while (_local3 != -1) {
_local2 = getRunner(_local3);
if (_local2.isUse() && (_local2.isActive())) {
if (_local2.getFixedBase() == base) {
if (_local2.getLastBaseTime() < _local5) {
_local2.out();
playOut(base);
}
break;
}
}
_local3 = _local2.getNext();
}
}
function forceOutRunner(base) {
var _local3;
var _local2;
var _local4;
trace("ForceOut:" + base);
_local2 = m_runnerFirst;
if (_local2 == -1) {
return(undefined);
}
_local3 = getRunner(_local2);
if (!_local3.isActive()) {
return(undefined);
}
if (_local3.getFixedBase() >= 1) {
return(undefined);
}
_local4 = 1;
while (_local4 < base) {
_local2 = _local3.getNext();
if (_local2 == -1) {
break;
}
if (!_local3.isActive()) {
_local2 = -1;
break;
}
_local3 = getRunner(_local2);
_local4++;
}
if (_local2 == -1) {
return(undefined);
}
if (_local3.getNowBase() < base) {
_local3.out();
playOut(base);
}
}
function calcForceOutBaseRunner(checkIdx) {
var _local3;
var _local2;
var _local4;
_local2 = m_runnerFirst;
if (_local2 == -1) {
return(-1);
}
_local3 = getRunner(_local2);
if (!_local3.isActive()) {
return(-1);
}
if (_local3.getFixedBase() >= 1) {
return(-1);
}
_local4 = 1;
while (_local2 != checkIdx) {
_local2 = _local3.getNext();
if (_local2 == -1) {
return(-1);
}
if (!_local3.isActive()) {
return(-1);
}
_local3 = getRunner(_local2);
_local4++;
}
return(_local4);
}
function safeCheckRunner(base) {
var _local2;
var _local3;
_local3 = m_runnerFirst;
while (_local3 != -1) {
_local2 = getRunner(_local3);
if (_local2.isActive()) {
if ((_local2.getNowBase() == base) && (_local2.getNowDist() == 0)) {
new app.enemy.StatusMessage(app.enemy.Message.RESULT_SAFE);
playSafe(base);
break;
}
}
_local3 = _local2.getNext();
}
}
function getBaseFirstRunner() {
var _local3;
var _local2;
if (m_runnerFirst != -1) {
_local3 = getRunner(m_runnerFirst);
_local2 = _local3.getFixedBase();
trace((("++++++++++++++++:" + _local2) + ":") + _local3.isActive());
if (_local3.isActive() || (_local2 == 4)) {
return(_local2);
}
}
return(-1);
}
function getStealCountRunner() {
var _local2;
var _local4;
var _local6;
var _local5;
var _local3;
_local6 = 0;
_local4 = m_runnerFirst;
while (_local4 != -1) {
_local2 = getRunner(_local4);
_local5 = _local2.getCurrentBase();
_local3 = _local2.getFixedBase();
trace((("StealCheck: " + _local5) + ":") + _local3);
if (_local2.isActive() || (_local3 == 4)) {
if (_local5 != _local3) {
_local6++;
}
}
_local4 = _local2.getNext();
}
return(_local6);
}
function setCurrentBaseRunner() {
var _local2;
var _local3;
trace("setCurrentBase");
_local3 = m_runnerFirst;
while (_local3 != -1) {
_local2 = getRunner(_local3);
if (_local2.isActive()) {
_local2.initCurrentBase();
}
_local3 = _local2.getNext();
}
}
function addBaseRunner(base) {
var _local2;
var _local3;
trace("addBaseRunner:" + base);
_local3 = m_runnerFirst;
while (_local3 != -1) {
_local2 = getRunner(_local3);
if (_local2.isActive()) {
if (base == _local2.getFixedBase()) {
return(undefined);
}
}
_local3 = _local2.getNext();
}
_local3 = addRunner();
_local2 = getRunner(_local3);
_local2.forceBase(base);
}
function clearOnBaseStatus() {
var _local2;
_local2 = 0;
while (_local2 < 4) {
m_onBaseList[_local2] = 0;
m_onBaseReserveList[_local2] = -1;
_local2++;
}
}
function incOnBaseCount(base) {
base = base % 4;
m_onBaseList[base]++;
trace("inc OnBase:" + base);
}
function decOnBaseCount(base) {
base = base % 4;
m_onBaseList[base]--;
if (m_onBaseList[base] == 0) {
m_onBaseReserveList[base] = -1;
}
trace("dec OnBase:" + base);
}
function getOnBaseCount(base) {
base = base % 4;
return(m_onBaseList[base]);
}
function setOnBaseReserveCount(base, time) {
base = base % 4;
if ((m_onBaseReserveList[base] == -1) || (m_onBaseReserveList[base] > time)) {
m_onBaseReserveList[base] = time;
}
}
function getOnBaseReserveCount(base) {
base = base % 4;
return(m_onBaseReserveList[base]);
}
function clearDefense() {
var _local2;
var _local1;
_local1 = app.enemy.CharacterType.GROUND_DEFENSE_START;
while (_local1 <= app.enemy.CharacterType.GROUND_DEFENSE_END) {
_local2 = app.enemy.GroundFielder(app.sys.SysInfo.__get__GameInfo().getGroundCharacter(_local1));
_local2.clearStatus();
_local1++;
}
}
function initPositionDefense() {
var _local2;
var _local1;
_local1 = app.enemy.CharacterType.GROUND_DEFENSE_START;
while (_local1 <= app.enemy.CharacterType.GROUND_DEFENSE_END) {
_local2 = app.enemy.GroundFielder(app.sys.SysInfo.__get__GameInfo().getGroundCharacter(_local1));
_local2.initPosition();
_local1++;
}
}
function normalDefense() {
var _local2;
var _local1;
_local1 = app.enemy.CharacterType.GROUND_DEFENSE_START;
while (_local1 <= app.enemy.CharacterType.GROUND_DEFENSE_END) {
_local2 = app.enemy.GroundFielder(app.sys.SysInfo.__get__GameInfo().getGroundCharacter(_local1));
_local2.setNormalMode();
_local1++;
}
}
function standbyDefense() {
var _local2;
var _local1;
_local1 = app.enemy.CharacterType.GROUND_DEFENSE_START;
while (_local1 <= app.enemy.CharacterType.GROUND_DEFENSE_END) {
_local2 = app.enemy.GroundFielder(app.sys.SysInfo.__get__GameInfo().getGroundCharacter(_local1));
_local2.setStandbyMode();
_local1++;
}
}
function noneDefense() {
var _local2;
var _local1;
_local1 = app.enemy.CharacterType.GROUND_DEFENSE_START;
while (_local1 <= app.enemy.CharacterType.GROUND_DEFENSE_END) {
_local2 = app.enemy.GroundFielder(app.sys.SysInfo.__get__GameInfo().getGroundCharacter(_local1));
_local2.setNoneMode();
_local1++;
}
}
function checkModeDefense() {
var _local1;
_local1 = app.enemy.GroundFielder(app.sys.SysInfo.__get__GameInfo().getGroundCharacter(app.enemy.CharacterType.GROUND_PITCHER));
_local1.setHaveBall();
}
function stealModeDefense() {
var _local1;
_local1 = app.enemy.GroundFielder(app.sys.SysInfo.__get__GameInfo().getGroundCharacter(app.enemy.CharacterType.GROUND_CATCHER));
_local1.setHaveBall();
}
function playStrike() {
var _local1;
_local1 = app.enemy.MoundJudge(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_JUDGE));
_local1.playStrike();
}
function playBall() {
var _local1;
_local1 = app.enemy.MoundJudge(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_JUDGE));
_local1.playBall();
}
function playOut(base) {
var _local1;
base = base % 4;
_local1 = app.enemy.GroundJudge(app.sys.SysInfo.__get__GameInfo().getGroundCharacter(app.enemy.CharacterType.GROUND_JUDGE + base));
_local1.playOut();
trace((("PlayOut:" + base) + ":") + _local1);
}
function playSafe(base) {
var _local1;
base = base % 4;
_local1 = app.enemy.GroundJudge(app.sys.SysInfo.__get__GameInfo().getGroundCharacter(app.enemy.CharacterType.GROUND_JUDGE + base));
_local1.playSafe();
trace((("PlaySafe:" + base) + ":") + _local1);
}
static var RUNNER_MAX = 4;
}
Symbol 3412 MovieClip [__Packages.app.enemy.GameStatus] Frame 0
class app.enemy.GameStatus
{
function GameStatus () {
}
static var GS_MOUND = 100;
static var GS_GROUND_SHOT = 200;
static var GS_GROUND_FAIR = 210;
static var GS_GROUND_CATCH = 215;
static var GS_GROUND_FOUL = 220;
static var GS_GROUND_SHOT_OUT = 230;
static var GS_GROUND_CHECK = 250;
static var GS_GROUND_HOMERUN = 300;
static var GS_GROUND_PUSH = 350;
}
Symbol 3413 MovieClip [__Packages.app.enemy.StatusMessage] Frame 0
class app.enemy.StatusMessage
{
var m_message, m_isAdjust, m_count;
function StatusMessage (messageType) {
m_message = messageType;
m_isAdjust = false;
m_count = 0;
app.sys.SysInfo.__get__GameControl().addStatusMessage(this);
}
function isAdjust() {
return(m_isAdjust);
}
function adjust() {
m_isAdjust = true;
}
function getMessage() {
return(m_message);
}
function setCount(cnt) {
m_count = cnt;
}
function getCount(cnt) {
return(m_count);
}
}
Symbol 3414 MovieClip [__Packages.app.enemy.GroundRunner] Frame 0
class app.enemy.GroundRunner extends app.enemy.GroundCharacter
{
var m_subMode, m_normalDispMode, m_nowIdx, startMotion, m_x, m_y, m_z, hide, m_isBase, m_isAuto, m_isChangeRunDir, m_isForceRun, m_isPosUpdate, m_isReverse, m_pushBase, m_nowBase, m_fixedBase, m_lastBaseTime, m_nowDist, m_isActive, m_nextDist, m_targetDir, m_nextDir, m_startPosVec, m_runSpeed, m_nextIdx, m_prevIdx, m_motion, m_dir, m_anime, show, m_endPosVec, m_currentBase;
function GroundRunner (context, parentMC, idx) {
super(context, parentMC, "GroundRunnerMC", app.enemy.CharacterType.RUNNER);
m_subMode = SM_NONE;
m_normalDispMode = false;
m_nowIdx = idx;
initPosition();
}
function move() {
var _local4;
var _local10 = app.sys.SysInfo.__get__GameInfo();
var _local6 = app.sys.SysInfo.__get__GameControl();
do {
_local4 = false;
switch (m_subMode) {
case SM_NONE :
startMotion(app.enemy.GroundCharacter.MOT_NONE);
m_normalDispMode = false;
m_x = 0;
m_y = 0;
m_z = 0;
hide();
m_subMode = SM_NONE_LOOP;
break;
case SM_NONE_LOOP :
break;
case SM_FIRST_RUN :
startMotion(app.enemy.GroundCharacter.MOT_RUN);
m_normalDispMode = true;
m_isBase = false;
m_subMode = SM_FIRST_RUN_LOOP;
_local4 = true;
break;
case SM_FIRST_RUN_LOOP :
var _local3;
_local3 = moveDist();
_local3 = checkNextRunner(_local3);
if (fixDistAndBase(_local3)) {
m_subMode = SM_BASE;
m_isAuto = false;
m_isChangeRunDir = false;
m_isForceRun = false;
}
m_isPosUpdate = true;
break;
case SM_BASE :
startMotion(app.enemy.GroundCharacter.MOT_NORMAL);
m_isBase = true;
m_isReverse = false;
m_subMode = SM_BASE_LOOP;
_local4 = true;
break;
case SM_BASE_LOOP :
if (m_pushBase != -1) {
if (m_pushBase > m_nowBase) {
m_isReverse = false;
m_isBase = false;
m_isAuto = false;
}
m_isChangeRunDir = false;
m_isForceRun = false;
}
if (m_isChangeRunDir) {
m_isReverse = false;
m_isBase = false;
m_isChangeRunDir = false;
m_isAuto = false;
}
if (m_isForceRun) {
trace("Base Force Run");
m_isReverse = false;
m_isBase = false;
m_isForceRun = false;
m_isAuto = false;
}
if (m_isAuto) {
var _local8;
var _local5 = false;
var _local7;
var _local9;
if (_local6.getGameStatus() == app.enemy.GameStatus.GS_MOUND) {
} else {
_local8 = _local6.getCatchTime();
if (_local8 == -1) {
_local7 = _local6.calcForceOutBaseRunner(m_nowIdx);
if (_local7 > m_nowBase) {
_local5 = true;
}
}
}
if (_local5) {
m_isReverse = false;
m_isBase = false;
}
}
if (!m_isBase) {
m_subMode = SM_RUN;
m_isAuto = false;
} else if (m_fixedBase == m_nowBase) {
m_lastBaseTime = app.sys.SysInfo.getTotalCount();
}
break;
case SM_RUN :
startMotion(app.enemy.GroundCharacter.MOT_RUN);
m_isBase = false;
m_isReverse = false;
m_subMode = SM_RUN_LOOP;
_local4 = true;
break;
case SM_RUN_LOOP :
if (m_pushBase != -1) {
if (m_pushBase > m_nowBase) {
m_isReverse = false;
m_isBase = false;
m_isAuto = false;
}
m_isChangeRunDir = false;
m_isForceRun = false;
}
if (m_isChangeRunDir) {
m_isReverse = !m_isReverse;
m_isChangeRunDir = false;
m_isAuto = false;
}
if (m_isForceRun) {
m_isReverse = false;
m_isForceRun = false;
m_isAuto = false;
}
_local3 = moveDist();
if (_local3 > m_nowDist) {
_local3 = checkNextRunner(_local3);
} else if (_local3 < m_nowDist) {
_local3 = checkPrevRunner(_local3);
}
if (fixDistAndBase(_local3)) {
m_subMode = SM_BASE;
}
m_isPosUpdate = true;
}
} while (_local4);
return(super.move());
}
function hitBall() {
if (m_nowDist != 0) {
trace("Runner Base Outside Out");
out();
} else if (m_nowBase != m_fixedBase) {
trace("Runner None Retouch Out");
out();
}
}
function ctrl() {
if (m_isActive) {
var _local3;
_local3 = app.sys.SysInfo.__get__GameControl().getCatchTime();
if ((m_nowBase <= 3) && (m_nowBase > m_fixedBase)) {
if ((_local3 == -1) || ((_local3 > 0) && (_local3 < m_lastBaseTime))) {
m_fixedBase = m_nowBase;
trace("BaseOn:" + m_fixedBase);
} else {
trace("mada" + m_fixedBase);
}
}
if (((m_fixedBase == 3) && (m_nowDist >= m_nextDist)) && ((_local3 == -1) || ((_local3 > 0) && (_local3 < m_lastBaseTime)))) {
arriveHome();
}
}
return(super.ctrl());
}
function disp() {
if (m_normalDispMode) {
if (m_isBase) {
m_targetDir = m_nextDir + (Math.PI/2);
} else {
m_targetDir = (m_isReverse ? (m_nextDir + Math.PI) : (m_nextDir));
}
m_x = m_startPosVec.x + (m_nowDist * Math.cos(m_nextDir));
m_z = m_startPosVec.z + (m_nowDist * Math.sin(m_nextDir));
}
super.disp();
}
function destroy() {
super.destroy();
}
function moveDist() {
var _local2;
if (m_isReverse) {
_local2 = m_nowDist - ((m_runSpeed * app.sys.SysInfo.getRate()) / 1000);
_local2 = Math.max(_local2, 0);
} else {
_local2 = m_nowDist + ((m_runSpeed * app.sys.SysInfo.getRate()) / 1000);
_local2 = Math.min(_local2, m_nextDist);
}
return(_local2);
}
function getNextRunner() {
var _local4 = app.sys.SysInfo.__get__GameControl();
var _local3;
var _local2;
_local2 = m_nextIdx;
if (_local2 >= 0) {
_local3 = _local4.getRunner(_local2);
while (!_local3.isActive()) {
_local2 = _local3.getNext();
if (_local2 < 0) {
break;
}
_local3 = _local4.getRunner(_local2);
}
}
return(_local2);
}
function getPrevRunner() {
var _local4 = app.sys.SysInfo.__get__GameControl();
var _local3;
var _local2;
_local2 = m_prevIdx;
if (_local2 >= 0) {
_local3 = _local4.getRunner(_local2);
while (!_local3.isActive()) {
_local2 = _local3.getPrev();
if (_local2 < 0) {
break;
}
_local3 = _local4.getRunner(_local2);
}
}
return(_local2);
}
function checkNextRunner(nowDist) {
var _local8 = app.sys.SysInfo.__get__GameControl();
var _local7;
var _local3;
var _local5;
var _local4;
var _local2;
_local4 = getNextRunner();
if (_local4 >= 0) {
_local7 = _local8.getRunner(_local4);
_local3 = _local7.getNowBase();
_local5 = _local7.getNowDist();
if ((_local3 - m_nowBase) == 0) {
_local2 = _local5 - nowDist;
} else if ((_local3 - m_nowBase) == 1) {
_local2 = (_local5 + m_nextDist) - nowDist;
} else {
_local2 = APPROACH_LIMIT;
}
if (_local2 < APPROACH_LIMIT) {
nowDist = m_nowDist;
}
}
return(nowDist);
}
function checkPrevRunner(nowDist) {
var _local9 = app.sys.SysInfo.__get__GameControl();
var _local3;
var _local4;
var _local6;
var _local8;
var _local5;
var _local2;
_local5 = getPrevRunner();
if (_local5 >= 0) {
_local3 = _local9.getRunner(_local5);
_local4 = _local3.getNowBase();
_local6 = _local3.getNowDist();
_local8 = _local3.getNextDist();
if ((m_nowBase - _local4) == 0) {
_local2 = nowDist - _local6;
} else if ((m_nowBase - _local4) == 1) {
_local2 = (nowDist + _local8) - _local6;
} else {
_local2 = APPROACH_LIMIT;
}
if (_local2 < APPROACH_LIMIT) {
nowDist = m_nowDist;
}
}
return(nowDist);
}
function fixDistAndBase(nowDist) {
var _local4 = app.sys.SysInfo.__get__GameControl();
var _local2 = false;
if (m_nowDist != nowDist) {
if ((nowDist == m_nextDist) && (m_nowBase < 3)) {
nowDist = 0;
m_nowBase++;
calcParam(m_nowBase);
}
m_nowDist = nowDist;
if (m_nowDist == 0) {
_local2 = true;
}
}
return(_local2);
}
function initPosition() {
m_x = 0;
m_z = -100;
m_motion = 1;
m_dir = 1;
m_anime = 1;
}
function get() {
m_fixedBase = 0;
m_nowBase = 0;
m_nowDist = 0;
m_isActive = true;
m_isReverse = false;
m_isAuto = true;
m_runSpeed = 555.555555555556;
m_lastBaseTime = 0;
m_pushBase = -1;
m_subMode = SM_FIRST_RUN;
calcParam(m_nowBase);
show();
}
function free() {
m_fixedBase = -1;
m_nowBase = -1;
m_prevIdx = -1;
m_nextIdx = -1;
m_isActive = false;
hide();
}
function retry() {
if (m_fixedBase == 0) {
free();
} else {
m_nowBase = m_fixedBase;
m_nowDist = 0;
m_isReverse = false;
m_isAuto = true;
m_isActive = true;
m_lastBaseTime = 0;
m_pushBase = -1;
calcParam(m_nowBase);
}
}
function isUse() {
return(m_fixedBase >= 0);
}
function pushRun(base) {
m_nowBase = m_fixedBase;
m_nowDist = 0;
m_isAuto = false;
m_pushBase = base;
}
function forceRun(base) {
m_pushBase = base;
}
function calcParam(baseNum) {
baseNum = baseNum % 4;
m_startPosVec = app.sys.SysInfo.__get__GameInfo().__get__Ground().getBasePosition(baseNum);
m_endPosVec = app.sys.SysInfo.__get__GameInfo().__get__Ground().getBasePosition(baseNum + 1);
m_nextDist = util.Util.calcDist(m_startPosVec.x - m_endPosVec.x, m_startPosVec.z - m_endPosVec.z);
m_nextDir = Math.atan2(m_endPosVec.z - m_startPosVec.z, m_endPosVec.x - m_startPosVec.x);
trace((((((("CalcParam:" + m_startPosVec.x) + ":") + m_endPosVec.x) + ":") + m_nextDir) + ":") + m_nextDist);
}
function getFixedBase() {
return(m_fixedBase);
}
function setNext(nextIdx) {
m_nextIdx = nextIdx;
}
function getNext() {
return(m_nextIdx);
}
function setPrev(prevIdx) {
m_prevIdx = prevIdx;
}
function getPrev() {
return(m_prevIdx);
}
function getNowDist() {
return(m_nowDist);
}
function getNowBase() {
return(m_nowBase);
}
function getNextDist() {
return(m_nextDist);
}
function isActive() {
return(m_isActive);
}
function getLastBaseTime() {
return(m_lastBaseTime);
}
function initCurrentBase() {
m_currentBase = m_fixedBase;
}
function getCurrentBase() {
return(m_currentBase);
}
function forceBase(base) {
m_fixedBase = (m_nowBase = base);
calcParam(m_nowBase);
setNormalMode();
}
function isReverse() {
return(m_isReverse);
}
function changeRunDir() {
m_isChangeRunDir = true;
}
function setForceRun() {
m_isForceRun = true;
}
function setNormalMode() {
m_nowDist = 0;
m_isReverse = false;
m_isAuto = true;
m_isActive = true;
m_lastBaseTime = 0;
m_pushBase = -1;
m_normalDispMode = true;
m_subMode = SM_BASE;
}
function advance() {
m_fixedBase++;
m_nowBase = m_fixedBase;
calcParam(m_fixedBase);
if (m_fixedBase >= 4) {
arriveHome();
}
}
function out() {
trace("Out:");
new app.enemy.StatusMessage(app.enemy.Message.RESULT_OUT);
m_isActive = false;
m_subMode = SM_NONE;
}
function arriveHome() {
trace("arriveHome");
new app.enemy.StatusMessage(app.enemy.Message.RESULT_POINT);
m_nowBase = (m_fixedBase = 4);
m_nowDist = 0;
m_isActive = false;
m_subMode = SM_NONE;
}
static var SM_NONE = 1000;
static var SM_NONE_LOOP = 1001;
static var SM_FIRST_RUN = 1010;
static var SM_FIRST_RUN_LOOP = 1011;
static var SM_BASE = 1020;
static var SM_BASE_LOOP = 1021;
static var SM_RUN = 1030;
static var SM_RUN_LOOP = 1031;
static var SM_STOP = 9999;
static var APPROACH_LIMIT = 200;
}
Symbol 3415 MovieClip [__Packages.app.enemy.CharacterType] Frame 0
class app.enemy.CharacterType
{
function CharacterType () {
}
static var LEFT = 1;
static var RIGHT = 2;
static var CENTER = 3;
static var FIRST = 4;
static var SECOND = 5;
static var SHORT = 6;
static var THIRD = 7;
static var CATCHER = 8;
static var PITCHER = 9;
static var BATTER = 10;
static var RUNNER = 11;
static var JUDGE = 12;
static var GROUND_DEFENSE_START = 0;
static var GROUND_LEFT = 0;
static var GROUND_RIGHT = 1;
static var GROUND_CENTER = 2;
static var GROUND_FIRST = 3;
static var GROUND_SECOND = 4;
static var GROUND_SHORT = 5;
static var GROUND_THIRD = 6;
static var GROUND_CATCHER = 7;
static var GROUND_PITCHER = 8;
static var GROUND_DEFENSE_END = 8;
static var GROUND_OFFENSE_START = 9;
static var GROUND_RUNNER = 9;
static var GROUND_JUDGE = 13;
static var GROUND_OFFENSE_END = 16;
static var MOUND_CATCHER = 0;
static var MOUND_PITCHER = 1;
static var MOUND_BATTER = 2;
static var MOUND_JUDGE = 3;
}
Symbol 3416 MovieClip [__Packages.app.sys.GameInfo] Frame 0
class app.sys.GameInfo
{
var m_groundCharacterList, m_moundCharacterList, m_teamStringFirst, m_teamStringLast, m_recordFirst, m_recordLast, m_scoreListFirst, m_scoreListLast, m_heightFirst, m_heightLast, m_dominantFirst, m_dominantLast, m_powerFirst, m_powerLast, m_scoreTotalFirst, m_scoreTotalLast, m_strikeCount, m_ballCount, m_outCount, m_nowFirst, m_nowInning, m_batterNumberFirst, m_batterNumberLast, m_isPlayerFirst, m_teamNumberFirst, m_teamNumberLast, m_userFirst, m_userLast, m_ground, m_ball, m_mound, m_gameStatus;
function GameInfo () {
m_groundCharacterList = [];
m_moundCharacterList = [];
m_teamStringFirst = "S";
m_teamStringLast = "W";
m_recordFirst = [];
m_recordLast = [];
m_scoreListFirst = [];
m_scoreListLast = [];
m_heightFirst = [];
m_heightLast = [];
m_dominantFirst = [];
m_dominantLast = [];
m_powerFirst = [];
m_powerLast = [];
initGame();
}
function initGame() {
var _local2;
var _local3;
_local2 = 0;
while (_local2 < 100) {
m_scoreListFirst[_local2] = -1;
m_scoreListLast[_local2] = -1;
_local2++;
}
_local2 = 0;
while (_local2 <= REC_MAX) {
m_recordFirst[_local2] = 0;
m_recordLast[_local2] = 0;
_local2++;
}
_local2 = 0;
while (_local2 < 9) {
m_heightFirst[_local2] = 100 + util.Util.getRandomHalf(20);
m_heightLast[_local2] = 100 + util.Util.getRandomHalf(20);
m_dominantFirst[_local2] = true;
m_dominantLast[_local2] = true;
m_powerFirst[_local2] = BasePower[_local2];
m_powerLast[_local2] = BasePower[_local2];
_local2++;
}
_local2 = 2 + util.Util.getRandomInt(2);
while (_local2 > 0) {
_local3 = util.Util.getRandomInt(9);
m_dominantFirst[_local3] = false;
_local2--;
}
_local2 = 2 + util.Util.getRandomInt(2);
while (_local2 > 0) {
_local3 = util.Util.getRandomInt(9);
m_dominantLast[_local3] = false;
_local2--;
}
m_scoreTotalFirst = 0;
m_scoreTotalLast = 0;
m_strikeCount = 0;
m_ballCount = 0;
m_outCount = 0;
m_nowFirst = true;
m_nowInning = 1;
m_batterNumberFirst = 0;
m_batterNumberLast = 0;
}
function setIsPlayerFirst(first) {
m_isPlayerFirst = first;
}
function setTeamStringFirst(name) {
m_teamStringFirst = name;
}
function setTeamStringLast(name) {
m_teamStringLast = name;
}
function setTeamNumberFirst(num) {
m_teamNumberFirst = num;
}
function setTeamNumberLast(num) {
m_teamNumberLast = num;
}
function setUserFirst(act) {
m_userFirst = act;
}
function setUserLast(act) {
m_userLast = act;
}
function initInning() {
m_nowFirst = true;
m_strikeCount = 0;
m_ballCount = 0;
m_outCount = 0;
}
function addStrikeCount() {
m_strikeCount++;
}
function addBallCount() {
m_ballCount++;
}
function addOutCount() {
m_outCount++;
}
function clearStrikeCount() {
m_strikeCount = 0;
}
function clearBallCount() {
m_ballCount = 0;
}
function batterOut() {
m_strikeCount = 0;
m_ballCount = 0;
m_outCount++;
}
function nextBatter() {
m_strikeCount = 0;
m_ballCount = 0;
if (m_nowFirst) {
m_batterNumberFirst++;
m_batterNumberFirst = m_batterNumberFirst % 9;
trace("*****************************First: " + m_batterNumberFirst);
} else {
m_batterNumberLast++;
m_batterNumberLast = m_batterNumberLast % 9;
trace("*****************************Last: " + m_batterNumberLast);
}
}
function setScore(score) {
if (m_nowFirst) {
m_scoreListFirst[m_nowInning - 1] = score;
} else {
m_scoreListLast[m_nowInning - 1] = score;
}
}
function addPlayerScore() {
if (m_isPlayerFirst) {
m_scoreListFirst[m_nowInning - 1]++;
m_scoreTotalFirst++;
} else {
m_scoreListLast[m_nowInning - 1]++;
}
}
function change() {
if (m_nowFirst) {
m_scoreTotalFirst = m_scoreTotalFirst + m_scoreListFirst[m_nowInning - 1];
} else {
m_scoreTotalLast = m_scoreTotalLast + m_scoreListLast[m_nowInning - 1];
}
m_nowFirst = !m_nowFirst;
m_strikeCount = 0;
m_ballCount = 0;
m_outCount = 0;
}
function nextInning() {
m_nowInning++;
}
function endGame() {
delete m_scoreListFirst;
delete m_scoreListLast;
}
function getNineHeight() {
var _local2;
if (m_nowFirst) {
_local2 = m_heightFirst[m_batterNumberFirst];
} else {
_local2 = m_heightLast[m_batterNumberLast];
}
return(_local2);
}
function getNineDominant() {
var _local2;
if (m_nowFirst) {
_local2 = m_dominantFirst[m_batterNumberFirst];
} else {
_local2 = m_dominantLast[m_batterNumberLast];
}
return(_local2);
}
function getNinePower() {
var _local2;
if (m_nowFirst) {
_local2 = m_powerFirst[m_batterNumberFirst];
} else {
_local2 = m_powerLast[m_batterNumberLast];
}
return(_local2);
}
function addAtBatCount() {
addRecordCount(REC_AT_BAT, m_nowFirst);
trace("----------Add AtBat");
}
function decAtBatCount() {
decRecordCount(REC_AT_BAT, m_nowFirst);
trace("----------Dec AtBat");
}
function addHitCount(base) {
base--;
base = base % 4;
addRecordCount(REC_HIT + base, m_nowFirst);
if (base > 0) {
addRecordCount(REC_HIT + 0, m_nowFirst);
}
trace("----------Add Hit:" + base);
}
function addStealCount() {
addRecordCount(REC_STEAL, m_nowFirst);
trace("----------Add Steal");
}
function addStrikeOutCount() {
addRecordCount(REC_STRIKEOUT, m_nowFirst);
trace("----------Add StrikeOut");
}
function addFourBallsCount() {
addRecordCount(REC_FOURBALLS, m_nowFirst);
trace("----------Add fourballs");
}
function addErrorCount() {
addRecordCount(REC_ERROR, !m_nowFirst);
trace("----------Add Error");
}
function addRecordCount(type, isFirst) {
var _local2;
_local2 = (isFirst ? (m_recordFirst) : (m_recordLast));
_local2[type]++;
}
function decRecordCount(type, isFirst) {
var _local2;
_local2 = (isFirst ? (m_recordFirst) : (m_recordLast));
_local2[type]--;
}
function getRecordFirst() {
return(m_recordFirst);
}
function getRecordLast() {
return(m_recordLast);
}
function getRecordHitFirst() {
return(m_recordFirst[REC_HIT]);
}
function getRecordHitLast() {
return(m_recordLast[REC_HIT]);
}
function getRecordErrorFirst() {
return(m_recordFirst[REC_ERROR]);
}
function getRecordErrorLast() {
return(m_recordLast[REC_ERROR]);
}
function isPlayerFirst() {
return(m_isPlayerFirst);
}
function getTeamStringFirst() {
return(m_teamStringFirst);
}
function getTeamStringLast() {
return(m_teamStringLast);
}
function getTeamNumberFirst() {
return(m_teamNumberFirst);
}
function getTeamNumberLast() {
return(m_teamNumberLast);
}
function getUserFirst() {
return(m_userFirst);
}
function getUserLast() {
return(m_userLast);
}
function getTotalScoreFirst() {
var _local3;
var _local2;
_local3 = m_scoreTotalFirst;
if (m_nowFirst) {
_local2 = m_scoreListFirst[m_nowInning - 1];
if (_local2 != -1) {
_local3 = _local3 + _local2;
}
}
return(_local3);
}
function getTotalScoreLast() {
var _local3;
var _local2;
_local3 = m_scoreTotalLast;
if (!m_nowFirst) {
_local2 = m_scoreListLast[m_nowInning - 1];
if (_local2 != -1) {
_local3 = _local3 + _local2;
}
}
return(_local3);
}
function getScoreListFirst() {
return(m_scoreListFirst);
}
function getScoreListLast() {
return(m_scoreListLast);
}
function getInning() {
return(m_nowInning);
}
function isFirst() {
return(m_nowFirst);
}
function getStrikeCount() {
return(m_strikeCount);
}
function getBallCount() {
return(m_ballCount);
}
function getOutCount() {
return(m_outCount);
}
function set Ground(obj) {
m_ground = obj;
//return(Ground);
}
function get Ground() {
return(m_ground);
}
function set Ball(obj) {
m_ball = obj;
//return(Ball);
}
function get Ball() {
return(m_ball);
}
function set Mound(obj) {
m_mound = obj;
//return(Mound);
}
function get Mound() {
return(m_mound);
}
function setGroundCharacter(character, idx) {
m_groundCharacterList[idx] = character;
}
function getGroundCharacter(idx) {
return(m_groundCharacterList[idx]);
}
function getGroundCharacterList() {
return(m_groundCharacterList);
}
function setMoundCharacter(character, idx) {
m_moundCharacterList[idx] = character;
}
function getMoundCharacter(idx) {
return(m_moundCharacterList[idx]);
}
function getMoundCharacterList() {
return(m_moundCharacterList);
}
function get GameStatus() {
return(m_gameStatus);
}
function set GameStatus(gameStatus) {
m_gameStatus = gameStatus;
//return(GameStatus);
}
function getOffenseUser() {
return((m_nowFirst ? (m_userFirst) : (m_userLast)));
}
function getDefenseUser() {
return((m_nowFirst ? (m_userLast) : (m_userFirst)));
}
function getDebugString() {
var _local6 = [];
var _local4;
var _local3;
var _local5;
var _local2;
_local4 = "dominant F:";
_local3 = m_dominantFirst;
_local5 = m_batterNumberFirst;
_local2 = 0;
while (_local2 < _local3.length) {
if ((_local5 % 9) == _local2) {
_local4 = _local4 + (("[" + (_local3[_local2] ? "R" : "L")) + "]");
} else {
_local4 = _local4 + ((" " + (_local3[_local2] ? "R" : "L")) + " ");
}
_local2++;
}
_local6.push(_local4);
_local4 = "dominant L:";
_local3 = m_dominantLast;
_local5 = m_batterNumberLast;
_local2 = 0;
while (_local2 < _local3.length) {
if ((_local5 % 9) == _local2) {
_local4 = _local4 + (("[" + (_local3[_local2] ? "R" : "L")) + "]");
} else {
_local4 = _local4 + ((" " + (_local3[_local2] ? "R" : "L")) + " ");
}
_local2++;
}
_local6.push(_local4);
return(_local6);
}
static var REC_AT_BAT = 0;
static var REC_HIT = 1;
static var REC_TWOBASE_HIT = 2;
static var REC_THREEBSE_HIT = 3;
static var REC_HOMERUN = 4;
static var REC_STRIKEOUT = 5;
static var REC_FOURBALLS = 6;
static var REC_STEAL = 7;
static var REC_ERROR = 8;
static var REC_MAX = 8;
static var BasePower = [70, 80, 90, 100, 80, 70, 65, 60, 50];
}
Symbol 3417 MovieClip [__Packages.app.enemy.Action] Frame 0
class app.enemy.Action extends app.enemy.Enemy
{
var m_mode, m_dispMode, m_isAttack, m_targetX, m_targetY, m_wl, m_context, m_power, m_isBunt, m_secondTargetX, m_secondTargetY, m_isBatterReady, m_isFinished, m_isSwing, m_isHit, m_opponent, m_isPitcherReady, m_isPitcherThrow, m_isCheck, m_throwSpeed;
function Action (context) {
super(context);
m_mode = MD_NONE;
m_dispMode = DM_GROUND;
m_isAttack = true;
m_targetX = -1;
m_targetY = -1;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
var _local13;
var _local30 = app.sys.SysInfo.getRate();
var _local3 = app.sys.SysInfo.__get__GameInfo();
var _local10 = app.sys.SysInfo.__get__GameControl();
do {
_local13 = false;
switch (m_mode) {
case MD_NONE :
break;
case MD_BATTER_NEW :
var _local23;
_local23 = app.enemy.MoundBatter(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_BATTER));
_local23.setHeight(app.sys.SysInfo.__get__GameInfo().getNineHeight());
_local23.setDominant(app.sys.SysInfo.__get__GameInfo().getNineDominant());
m_power = app.sys.SysInfo.__get__GameInfo().getNinePower();
_local23.reset();
m_isBunt = false;
m_mode = MD_BATTER;
_local13 = true;
break;
case MD_BATTER_CONTINUE :
m_mode = MD_BATTER;
_local13 = true;
break;
case MD_BATTER :
m_targetX = -1;
m_targetY = -1;
m_secondTargetX = -1;
m_secondTargetY = -1;
m_isBatterReady = false;
m_isFinished = false;
m_isSwing = false;
m_isHit = false;
m_mode = MD_BATTER_MOT;
_local13 = true;
break;
case MD_BATTER_MOT :
_local23 = app.enemy.MoundBatter(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_BATTER));
if (m_isBunt) {
_local23.startMotion(app.enemy.MoundBatter.MOT_BANT_STANDBY);
} else {
_local23.startMotion(app.enemy.MoundBatter.MOT_NONE);
}
m_mode = MD_BATTER_TARGET;
break;
case MD_BATTER_TARGET :
var _local24;
var _local14;
m_targetX = getTargetX();
m_targetY = getTargetY();
_local14 = getRunnerIdx();
if ((m_targetX != -1) && (m_targetY != -1)) {
_local23 = app.enemy.MoundBatter(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_BATTER));
_local23.setTargetX(((((((TARGET_DIV_X - m_targetX) - 1) * TARGET_WIDTH) / TARGET_DIV_X) + ((TARGET_WIDTH / TARGET_DIV_X) / 2)) - (TARGET_WIDTH / 2)) / 2);
if (mouseIsDown()) {
if (m_isBunt) {
} else {
_local23.startMotion(app.enemy.MoundBatter.MOT_CHARGE);
}
m_isBatterReady = true;
m_mode = MD_BATTER_TYPE;
}
} else if (isChangeType()) {
m_isBunt = !m_isBunt;
m_mode = MD_BATTER_MOT;
}
_local14 = getRunnerIdx();
if (_local14 != -1) {
_local24 = _local10.getRunner(_local14);
_local24.changeRunDir();
}
break;
case MD_BATTER_TYPE :
m_secondTargetX = getTargetX();
m_secondTargetY = getTargetY();
if (!mouseIsDown()) {
_local23 = app.enemy.MoundBatter(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_BATTER));
if (m_isBunt) {
_local23.startMotion(app.enemy.MoundBatter.MOT_BANT_SWING);
} else {
_local23.startMotion(app.enemy.MoundBatter.MOT_SWING);
}
m_isSwing = true;
m_isFinished = true;
m_mode = MD_BATTER_SWING;
if (!m_isBunt) {
app.sys.SysInfo.__get__SoundManager().playSE("Bat");
}
}
break;
case MD_BATTER_SWING :
_local23 = app.enemy.MoundBatter(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_BATTER));
if (_local23.isEndMotion()) {
if (!m_opponent.isPitcherThrow()) {
retryBatter();
m_mode = MD_BATTER;
}
}
break;
case MD_RUNNER :
_local14 = getRunnerIdx();
if (_local14 != -1) {
_local24 = _local10.getRunner(_local14);
_local24.changeRunDir();
}
_local14 = getBaseIdx();
if (_local14 != -1) {
if (_local14 == 0) {
_local10.forceRunRunner();
}
}
break;
case MD_PITCHER :
var _local19;
var _local25;
var _local20;
m_targetX = -1;
m_targetY = -1;
m_secondTargetX = -1;
m_secondTargetY = -1;
m_power = -1;
m_isPitcherReady = false;
m_isPitcherThrow = false;
m_isFinished = false;
m_isHit = false;
m_isCheck = false;
_local20 = app.sys.SysInfo.__get__GameInfo().Ball;
_local20.setNoneMode();
_local20.setPosition(0, 160, 1844);
_local20.hide();
_local19 = app.enemy.MoundPitcher(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_PITCHER));
_local19.startMotion(app.enemy.MoundPitcher.MOT_NONE);
_local25 = app.enemy.MoundCatcher(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_CATCHER));
_local25.reset();
trace("Action:MD_PITCHER");
m_mode = MD_PITCHER_TARGET;
break;
case MD_PITCHER_TARGET :
m_targetX = getTargetX();
m_targetY = getTargetY();
_local14 = checkThrowIdx();
if ((m_targetX != -1) && (m_targetY != -1)) {
if (mouseIsDown()) {
_local19 = app.enemy.MoundPitcher(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_PITCHER));
_local19.startMotion(app.enemy.MoundPitcher.MOT_NOD);
m_power = getPower();
m_isPitcherReady = true;
m_mode = MD_PITCHER_TYPE;
}
} else if (((_local14 != -1) && (_local14 > 0)) && (_local14 <= 3)) {
m_isCheck = true;
}
break;
case MD_PITCHER_TYPE :
m_secondTargetX = getTargetX();
m_secondTargetY = getTargetY();
if (!mouseIsDown()) {
m_isFinished = true;
m_mode = MD_PITCHER_PITCHING;
}
_local19 = app.enemy.MoundPitcher(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_PITCHER));
if (_local19.isEndMotion()) {
m_isFinished = true;
m_mode = MD_PITCHER_PITCHING;
_local13 = true;
}
break;
case MD_PITCHER_PITCHING :
_local19 = app.enemy.MoundPitcher(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_PITCHER));
if (_local19.isEndMotion()) {
_local19.startMotion(app.enemy.MoundPitcher.MOT_PITCHING2);
m_isPitcherThrow = true;
_local20 = app.sys.SysInfo.__get__GameInfo().Ball;
trace((((((m_targetX + ":") + m_targetY) + ":") + m_secondTargetX) + ":") + m_secondTargetY);
var _local12;
var _local28;
var _local27;
var _local26;
var _local8;
var _local7;
_local12 = PITCHER_THROW_MIN + ((m_power * (PITCHER_THROW_MAX - PITCHER_THROW_MIN)) / POWER_MAX);
_local12 = _local12 + ((Math.random() * PITCHER_THROW_RANDOM) - (PITCHER_THROW_RANDOM / 2));
_local28 = ((TARGET_WIDTH * ((((TARGET_DIV_X - m_targetX) - 1) * 2) + 1)) / (TARGET_DIV_X * 2)) - (TARGET_WIDTH / 2);
_local27 = ((TARGET_HEIGHT * ((((TARGET_DIV_Y - m_targetY) - 1) * 2) + 1)) / (TARGET_DIV_Y * 2)) + 3;
_local26 = -420;
_local8 = m_targetX - m_secondTargetX;
_local7 = m_targetY - m_secondTargetY;
if (m_power < 50) {
_local8 = util.Util.limitRange(_local8, -2, 2);
_local7 = util.Util.limitRange(_local7, -2, 2);
} else {
_local8 = util.Util.limitRange(_local8, -1, 1);
_local7 = util.Util.limitRange(_local7, -1, 1);
}
_local8 = (_local8 * TARGET_WIDTH) / TARGET_DIV_X;
_local7 = (_local7 * TARGET_WIDTH) / TARGET_DIV_X;
_local20.setMoundMode();
_local20.setMoundParam(_local28, _local27, _local26, _local8, _local7, 0, _local12);
_local20.show();
m_throwSpeed = _local12;
app.sys.SysInfo.__get__SoundManager().playSE("Throw");
m_mode = MD_PITCHER_END;
}
break;
case MD_PITCHER_END :
break;
case MD_DEFENSE :
m_mode = MD_DEFENSE_SHOT;
break;
case MD_DEFENSE_SHOT :
var _local6;
var _local15;
var _local17;
var _local16;
var _local5;
var _local11;
var _local4;
var _local2;
_local6 = app.sys.SysInfo.__get__GameInfo().__get__Ball().getFlyParam();
_local14 = -1;
_local15 = Number.MAX_VALUE;
_local2 = app.enemy.CharacterType.GROUND_DEFENSE_START;
while (_local2 <= app.enemy.CharacterType.GROUND_DEFENSE_END) {
_local4 = app.enemy.GroundFielder(_local3.getGroundCharacter(_local2));
_local17 = _local4.getX();
_local16 = _local4.getZ();
var _local12 = _local4.getSpeed();
_local5 = util.Util.calcDist(_local6.x - _local17, _local6.z - _local16);
_local11 = _local5 / _local12;
trace((_local2 + ":targetTime:") + _local11);
if (_local15 > _local11) {
_local15 = _local11;
_local14 = _local2;
}
_local2++;
}
if (_local15 < _local6.time) {
_local2 = app.enemy.CharacterType.GROUND_DEFENSE_START;
while (_local2 <= app.enemy.CharacterType.GROUND_DEFENSE_END) {
_local4 = app.enemy.GroundFielder(_local3.getGroundCharacter(_local2));
if (_local2 == _local14) {
_local4.setFlyCatchMode();
} else {
_local4.setStandbyMode();
}
_local2++;
}
trace("Fly Catch:" + _local14);
_local10.setFlyReserve(_local14);
m_mode = MD_DEFENSE_SHOT_WAIT;
break;
}
if (_local6.time > 3) {
_local2 = app.enemy.CharacterType.GROUND_DEFENSE_START;
while (_local2 <= app.enemy.CharacterType.GROUND_DEFENSE_END) {
_local4 = app.enemy.GroundFielder(_local3.getGroundCharacter(_local2));
if (_local2 == _local14) {
_local4.setFlyRunMode();
} else {
_local4.setStandbyMode();
}
_local2++;
}
trace("Fly Run:" + _local14);
m_mode = MD_DEFENSE_SHOT_WAIT;
} else {
_local14 = -1;
_local15 = Number.MAX_VALUE;
_local2 = app.enemy.CharacterType.GROUND_DEFENSE_START;
while (_local2 <= app.enemy.CharacterType.GROUND_DEFENSE_END) {
_local4 = app.enemy.GroundFielder(_local3.getGroundCharacter(_local2));
_local17 = _local4.getX();
_local16 = _local4.getZ();
var _local12 = _local4.getSpeed();
_local5 = util.Util.calcDist(_local6.t2.x - _local17, _local6.t2.z - _local16);
_local11 = _local5 / _local12;
if (_local15 > _local11) {
_local15 = _local11;
_local14 = _local2;
}
_local2++;
}
_local2 = app.enemy.CharacterType.GROUND_DEFENSE_START;
while (_local2 <= app.enemy.CharacterType.GROUND_DEFENSE_END) {
_local4 = app.enemy.GroundFielder(_local3.getGroundCharacter(_local2));
if (_local2 == _local14) {
_local4.setBallRunMode();
} else {
_local4.setStandbyMode();
}
trace("Ball Run:" + _local14);
_local2++;
}
m_mode = MD_DEFENSE_SHOT_WAIT;
break;
var _local18;
_local18 = app.sys.SysInfo.__get__GameControl().getBallCarry();
if (_local18 != -1) {
trace("BallCatch Carry: " + _local18);
m_mode = MD_DEFENSE_THROW;
}
break;
m_mode = MD_DEFENSE_THROW_WAIT;
break;
_local18 = app.sys.SysInfo.__get__GameControl().getBallCarry();
if (_local18 != -1) {
_local4 = app.enemy.GroundFielder(_local3.getGroundCharacter(_local18));
if (_local4.isHaveBall()) {
_local14 = getThrowIdx();
if (_local14 != -1) {
_local4.setThrowTarget(_local14);
}
}
}
var _local21;
var _local22;
var _local9;
_local20 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
_local17 = _local10.getThrowX();
_local16 = _local10.getThrowZ();
_local21 = _local10.getThrowDist();
if (_local21 >= 0) {
_local9 = _local20.getPosition();
_local22 = util.Util.calcDist(_local17 - _local9.x, _local16 - _local9.z);
var _local12 = _local20.getSpeed();
if (((_local22 + 100) > _local21) || (_local12 < 18)) {
var _local29;
_local14 = -1;
_local15 = Number.MAX_VALUE;
_local2 = app.enemy.CharacterType.GROUND_DEFENSE_START;
while (_local2 <= app.enemy.CharacterType.GROUND_DEFENSE_END) {
_local4 = app.enemy.GroundFielder(_local3.getGroundCharacter(_local2));
_local17 = _local4.getX();
_local16 = _local4.getZ();
_local12 = _local4.getSpeed();
_local5 = util.Util.calcDist(_local9.x - _local17, _local9.z - _local16);
_local11 = _local5 / _local12;
if (_local15 > _local11) {
_local15 = _local11;
_local14 = _local2;
}
_local2++;
}
_local2 = app.enemy.CharacterType.GROUND_DEFENSE_START;
while (_local2 <= app.enemy.CharacterType.GROUND_DEFENSE_END) {
_local4 = app.enemy.GroundFielder(_local3.getGroundCharacter(_local2));
if (_local2 == _local14) {
_local4.setBallRunMode();
} else {
_local4.setStandbyMode();
}
_local2++;
}
app.sys.SysInfo.__get__GameControl().setBallCarry(-1);
m_mode = MD_DEFENSE_SHOT_WAIT;
}
}
break;
break;
}
case MD_DEFENSE_SHOT_WAIT :
var _local18;
_local18 = app.sys.SysInfo.__get__GameControl().getBallCarry();
if (_local18 != -1) {
trace("BallCatch Carry: " + _local18);
m_mode = MD_DEFENSE_THROW;
}
break;
case MD_DEFENSE_THROW :
m_mode = MD_DEFENSE_THROW_WAIT;
break;
case MD_DEFENSE_THROW_WAIT :
_local18 = app.sys.SysInfo.__get__GameControl().getBallCarry();
if (_local18 != -1) {
_local4 = app.enemy.GroundFielder(_local3.getGroundCharacter(_local18));
if (_local4.isHaveBall()) {
_local14 = getThrowIdx();
if (_local14 != -1) {
_local4.setThrowTarget(_local14);
}
}
}
var _local21;
var _local22;
var _local9;
_local20 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
_local17 = _local10.getThrowX();
_local16 = _local10.getThrowZ();
_local21 = _local10.getThrowDist();
if (_local21 >= 0) {
_local9 = _local20.getPosition();
_local22 = util.Util.calcDist(_local17 - _local9.x, _local16 - _local9.z);
var _local12 = _local20.getSpeed();
if (((_local22 + 100) > _local21) || (_local12 < 18)) {
var _local29;
_local14 = -1;
_local15 = Number.MAX_VALUE;
_local2 = app.enemy.CharacterType.GROUND_DEFENSE_START;
while (_local2 <= app.enemy.CharacterType.GROUND_DEFENSE_END) {
_local4 = app.enemy.GroundFielder(_local3.getGroundCharacter(_local2));
_local17 = _local4.getX();
_local16 = _local4.getZ();
_local12 = _local4.getSpeed();
_local5 = util.Util.calcDist(_local9.x - _local17, _local9.z - _local16);
_local11 = _local5 / _local12;
if (_local15 > _local11) {
_local15 = _local11;
_local14 = _local2;
}
_local2++;
}
_local2 = app.enemy.CharacterType.GROUND_DEFENSE_START;
while (_local2 <= app.enemy.CharacterType.GROUND_DEFENSE_END) {
_local4 = app.enemy.GroundFielder(_local3.getGroundCharacter(_local2));
if (_local2 == _local14) {
_local4.setBallRunMode();
} else {
_local4.setStandbyMode();
}
_local2++;
}
app.sys.SysInfo.__get__GameControl().setBallCarry(-1);
m_mode = MD_DEFENSE_SHOT_WAIT;
}
}
break;
case MD_DEFENSE_GET :
break;
case MD_DEFENSE_GET_WAIT :
}
} while (_local13);
return(true);
}
function hitPitcher() {
var _local2;
var _local3;
var _local4;
_local2 = getFixedSecondTargetX();
_local3 = getFixedSecondTargetY();
_local4 = app.enemy.MoundCatcher(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_CATCHER));
_local4.setMotion(_local2, _local3);
app.sys.SysInfo.__get__SoundManager().playSE("Mitt");
m_isHit = true;
}
function hitBatter(rate) {
if (m_isFinished) {
var _local18;
var _local12;
var _local14;
var _local17;
var _local11;
var _local10;
var _local7;
var _local8;
var _local6;
var _local5;
var _local16;
_local18 = app.enemy.MoundBatter(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_BATTER));
_local12 = _local18.getSwingRate();
_local12 = _local12 - rate;
_local14 = Math.abs(_local12);
_local11 = getFixedTargetX();
_local10 = getFixedTargetY();
_local7 = m_opponent.getFixedSecondTargetX();
_local8 = m_opponent.getFixedSecondTargetY();
if (app.sys.SysInfo.__get__Debug().isActive()) {
if (Key.isDown("S".charCodeAt(0))) {
_local7 = _local11;
_local8 = _local10;
}
if (Key.isDown("W".charCodeAt(0))) {
_local7 = _local11;
_local8 = _local10;
_local8--;
}
if (Key.isDown("X".charCodeAt(0))) {
_local7 = _local11;
_local8 = _local10;
_local8++;
}
if (Key.isDown("A".charCodeAt(0))) {
_local7 = _local11;
_local8 = _local10;
_local7--;
}
if (Key.isDown("D".charCodeAt(0))) {
_local7 = _local11;
_local8 = _local10;
_local7++;
}
}
_local6 = _local11 - _local7;
_local5 = _local10 - _local8;
if (((_local6 == 0) && (Math.abs(_local5) <= 1)) || ((_local5 == 0) && (Math.abs(_local6) <= 1))) {
var _local15;
var _local3;
var _local2;
var _local4;
var _local13;
var _local9 = false;
_local17 = getBatterActionType();
_local15 = m_power;
_local13 = app.sys.SysInfo.__get__GameInfo().Ball;
switch (_local17) {
case app.enemy.ActionType.BATTER_NORMAL :
if (_local14 < NORMAL_HIT_TIME) {
_local3 = (_local15 * (NORMAL_POWER_BASE + (Math.random() * NORMAL_POWER_RND))) / 100;
_local2 = NORMAL_RAD_BASE + (Math.random() * NORMAL_RAD_RND);
_local4 = (((_local12 / GROUNDER_HIT_TIME) * 60) + (Math.random() * 20)) + 90;
if (_local6 != 0) {
if (_local6 < 0) {
_local4 = _local4 + (NORMAL_LR_DIR_BASE + (Math.random() * NORMAL_LR_DIR_RND));
} else {
_local4 = _local4 - (NORMAL_LR_DIR_BASE + (Math.random() * NORMAL_LR_DIR_RND));
}
_local3 = _local3 / (NORMAL_MISS_POWER_BASE + (Math.random() * NORMAL_MISS_POWER_RND));
}
if (_local5 != 0) {
if (_local5 < 0) {
_local2 = _local2 / NORMAL_GORO_DIR_DIV;
} else {
_local2 = _local2 + (NORMAL_FLY_RAD_BASE + (Math.random() * NORMAL_FLY_RAD_RND));
}
_local3 = _local3 / (NORMAL_MISS_POWER_BASE + (Math.random() * NORMAL_MISS_POWER_RND));
}
_local9 = true;
if (_local3 > 150) {
app.sys.SysInfo.__get__SoundManager().playSE("BatHit1");
} else {
app.sys.SysInfo.__get__SoundManager().playSE("BatHit2");
}
}
break;
case app.enemy.ActionType.BATTER_GROUNDER :
if (_local14 < GROUNDER_HIT_TIME) {
_local3 = (_local15 * (GROUNDER_POWER_BASE + (Math.random() * GROUNDER_POWER_RND))) / 100;
_local2 = GROUNDER_RAD_BASE + (Math.random() * GROUNDER_RAD_RND);
_local4 = (((_local12 / GROUNDER_HIT_TIME) * 60) + (Math.random() * 20)) + 90;
if (_local6 != 0) {
if (_local6 < 0) {
_local4 = _local4 + (GROUNDER_LR_DIR_BASE + (Math.random() * GROUNDER_LR_DIR_RND));
} else {
_local4 = _local4 - (GROUNDER_LR_DIR_BASE + (Math.random() * GROUNDER_LR_DIR_RND));
}
_local3 = _local3 / (GROUNDER_MISS_POWER_BASE + (Math.random() * GROUNDER_MISS_POWER_RND));
}
if (_local5 != 0) {
if (_local5 < 0) {
_local2 = _local2 / GROUNDER_GORO_DIR_DIV;
} else {
_local2 = _local2 + (GROUNDER_FLY_RAD_BASE + (Math.random() * GROUNDER_FLY_RAD_RND));
}
_local3 = _local3 / (GROUNDER_MISS_POWER_BASE + (Math.random() * GROUNDER_MISS_POWER_RND));
}
_local9 = true;
app.sys.SysInfo.__get__SoundManager().playSE("BatHit2");
}
break;
case app.enemy.ActionType.BATTER_FLY :
if (_local14 < FLY_HIT_TIME) {
_local3 = (_local15 * (FLY_POWER_BASE + (Math.random() * FLY_POWER_RND))) / 100;
_local2 = FLY_RAD_BASE + (Math.random() * FLY_RAD_RND);
_local4 = (((_local12 / FLY_HIT_TIME) * 60) + (Math.random() * 20)) + 90;
if (_local6 != 0) {
if (_local6 < 0) {
_local4 = _local4 + (FLY_LR_DIR_BASE + (Math.random() * FLY_LR_DIR_RND));
} else {
_local4 = _local4 - (FLY_LR_DIR_BASE + (Math.random() * FLY_LR_DIR_RND));
}
_local3 = _local3 / (FLY_MISS_POWER_BASE + (Math.random() * FLY_MISS_POWER_RND));
}
if (_local5 != 0) {
if (_local5 < 0) {
_local2 = _local2 / FLY_GORO_DIR_DIV;
} else {
_local2 = _local2 + (FLY_FLY_RAD_BASE + (Math.random() * FLY_FLY_RAD_RND));
}
_local3 = _local3 / (FLY_MISS_POWER_BASE + (Math.random() * FLY_MISS_POWER_RND));
}
_local9 = true;
app.sys.SysInfo.__get__SoundManager().playSE("BatHit2");
}
break;
case app.enemy.ActionType.BATTER_BUNT :
if (_local14 >= BUNT_HIT_TIME) {
break;
}
_local3 = BUNT_POWER_BASE + (Math.random() * BUNT_POWER_RND);
_local2 = BUNT_RAD_BASE + (Math.random() * BUNT_RAD_RND);
_local4 = (((_local12 / BUNT_HIT_TIME) * 60) + (Math.random() * 20)) + 90;
if (_local6 != 0) {
if (_local6 < 0) {
}
}
if (_local5 != 0) {
if (_local5 < 0) {
_local2 = _local2 / BUNT_GORO_DIR_DIV;
} else {
_local2 = _local2 + (BUNT_FLY_RAD_BASE + (Math.random() * BUNT_FLY_RAD_RND));
}
}
_local9 = true;
app.sys.SysInfo.__get__SoundManager().playSE("Banto");
}
if (app.sys.SysInfo.__get__Debug().isActive()) {
if (Key.isDown("H".charCodeAt(0))) {
_local9 = true;
_local3 = 200;
_local4 = 85;
_local2 = 35;
}
if (Key.isDown("Q".charCodeAt(0))) {
_local9 = true;
_local3 = 180;
_local4 = 115;
_local2 = 35;
}
}
if (_local9) {
_local16 = _local13.getPosition();
_local13.setGroundMode();
_local13.setPosition(_local16.x, _local16.y, 0);
_local13.setPower(((_local3 * 1000) * 100) / 3600, (_local4 * Math.PI) / 180, (_local2 * Math.PI) / 180);
_local13.calcFlyParam();
m_isHit = true;
}
}
}
}
function ctrl() {
return(true);
}
function disp() {
}
function destroy() {
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
function setOpponent(opponent) {
m_opponent = opponent;
}
function mouseIsDown() {
return(false);
}
function mouseIsUp() {
return(false);
}
function getTargetX() {
return(-1);
}
function getTargetY() {
return(-1);
}
function getPower() {
return(-1);
}
function isChangeType() {
return(false);
}
function getRunnerIdx() {
return(-1);
}
function getBaseIdx() {
return(-1);
}
function getThrowIdx() {
return(-1);
}
function checkThrowIdx() {
return(-1);
}
function retryBatter() {
}
function isButterReady() {
var _local1;
_local1 = app.enemy.MoundBatter(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_BATTER));
return(_local1.isEndMotion());
}
function isPitcherReady() {
return(m_isPitcherReady);
}
function isPitcherThrow() {
return(m_isPitcherThrow);
}
function isBatterReady() {
return(m_isBatterReady);
}
function isFinished() {
return(m_isFinished);
}
function getFixedTargetX() {
return(m_targetX);
}
function getFixedTargetY() {
return(m_targetY);
}
function getFixedSecondTargetX() {
return(m_secondTargetX);
}
function getFixedSecondTargetY() {
return(m_secondTargetY);
}
function getFixedPower() {
return(m_power);
}
function isBunt() {
return(m_isBunt);
}
function isCheck() {
return(m_isCheck);
}
function setBatterMode(isNewBatter) {
m_isAttack = true;
m_dispMode = DM_MOUND;
if (isNewBatter) {
m_mode = MD_BATTER_NEW;
} else {
m_mode = MD_BATTER_CONTINUE;
}
}
function setRunnerMode() {
m_isAttack = true;
m_dispMode = DM_GROUND;
m_mode = MD_RUNNER;
}
function setPitcherMode() {
m_isAttack = false;
m_dispMode = DM_MOUND;
m_mode = MD_PITCHER;
}
function setDefenseMode(isCheck) {
m_isAttack = false;
m_dispMode = DM_GROUND;
if (isCheck) {
m_mode = MD_DEFENSE_THROW;
} else {
m_mode = MD_DEFENSE;
}
}
function noneMode() {
m_mode = MD_NONE;
}
function setFinish() {
m_isFinished = true;
}
function startAttack() {
}
function startDefense() {
}
function end() {
}
function isHit() {
return(m_isHit);
}
function isSwing() {
return(m_isSwing);
}
function isStrike() {
var _local5;
var _local4;
var _local3;
var _local2;
_local4 = getFixedSecondTargetX();
_local3 = getFixedSecondTargetY();
_local2 = false;
if ((((_local4 > 0) && (_local4 < (TARGET_DIV_X - 1))) && (_local3 > 0)) && (_local3 < (TARGET_DIV_Y - 1))) {
_local2 = true;
}
return(_local2);
}
function getBatterActionType() {
var _local3;
var _local4;
var _local2;
if (m_isBunt) {
_local2 = app.enemy.ActionType.BATTER_BUNT;
} else {
_local3 = getFixedTargetY();
_local4 = getFixedSecondTargetY();
if (_local3 > _local4) {
_local2 = app.enemy.ActionType.BATTER_FLY;
} else if (_local3 < _local4) {
_local2 = app.enemy.ActionType.BATTER_GROUNDER;
} else {
_local2 = app.enemy.ActionType.BATTER_NORMAL;
}
}
return(_local2);
}
function getPitcherActionType() {
var _local3;
var _local5;
var _local4;
var _local6;
var _local2;
_local3 = getFixedTargetX();
_local5 = getFixedTargetY();
_local4 = getFixedSecondTargetX();
_local6 = getFixedSecondTargetY();
if (_local3 < _local4) {
_local2 = app.enemy.ActionType.PITCHER_SHOOT;
} else if (_local3 > _local4) {
_local2 = app.enemy.ActionType.PITCHER_CURVE;
} else if (_local5 < _local6) {
_local2 = app.enemy.ActionType.PITCHER_FORK;
} else {
_local2 = app.enemy.ActionType.PITCHER_STRAIGHT;
}
return(_local2);
}
function getThrowSpeed() {
return(m_throwSpeed);
}
function btrace(str) {
trace(str);
}
static var MD_NONE = 0;
static var MD_BATTER_NEW = 100;
static var MD_BATTER_CONTINUE = 101;
static var MD_BATTER = 102;
static var MD_BATTER_MOT = 105;
static var MD_BATTER_TYPE = 111;
static var MD_BATTER_READY = 122;
static var MD_BATTER_CHARGE = 125;
static var MD_BATTER_TARGET = 126;
static var MD_BATTER_SWING = 130;
static var MD_RUNNER = 200;
static var MD_PITCHER = 300;
static var MD_PITCHER_TYPE = 310;
static var MD_PITCHER_TARGET = 320;
static var MD_PITCHER_PITCHING = 330;
static var MD_PITCHER_END = 340;
static var MD_DEFENSE = 400;
static var MD_DEFENSE_SHOT = 500;
static var MD_DEFENSE_SHOT_WAIT = 510;
static var MD_DEFENSE_THROW = 520;
static var MD_DEFENSE_THROW_WAIT = 530;
static var MD_DEFENSE_GET = 540;
static var MD_DEFENSE_GET_WAIT = 550;
static var DM_GROUND = 0;
static var DM_MOUND = 1;
static var TARGET_DIV_X = 3;
static var TARGET_DIV_Y = 3;
static var TARGET_WIDTH = 100;
static var TARGET_HEIGHT = 100;
static var PITCHER_THROW_MIN = 105;
static var PITCHER_THROW_MAX = 155;
static var PITCHER_THROW_RANDOM = 10;
static var POWER_MAX = 100;
static var NORMAL_HIT_TIME = 150;
static var NORMAL_POWER_BASE = 120;
static var NORMAL_POWER_RND = 80;
static var NORMAL_RAD_BASE = 10;
static var NORMAL_RAD_RND = 30;
static var NORMAL_FLY_RAD_BASE = 15;
static var NORMAL_FLY_RAD_RND = 30;
static var NORMAL_LR_DIR_BASE = 45;
static var NORMAL_LR_DIR_RND = 22.5;
static var NORMAL_GORO_DIR_DIV = 4;
static var NORMAL_MISS_POWER_BASE = 1.2;
static var NORMAL_MISS_POWER_RND = 0.2;
static var GROUNDER_HIT_TIME = 150;
static var GROUNDER_POWER_BASE = 70;
static var GROUNDER_POWER_RND = 30;
static var GROUNDER_RAD_BASE = 0;
static var GROUNDER_RAD_RND = 5;
static var GROUNDER_FLY_RAD_BASE = 50;
static var GROUNDER_FLY_RAD_RND = 20;
static var GROUNDER_LR_DIR_BASE = 45;
static var GROUNDER_LR_DIR_RND = 22.5;
static var GROUNDER_GORO_DIR_DIV = 4;
static var GROUNDER_MISS_POWER_BASE = 1.1;
static var GROUNDER_MISS_POWER_RND = 0.1;
static var FLY_HIT_TIME = 150;
static var FLY_POWER_BASE = 120;
static var FLY_POWER_RND = 35;
static var FLY_RAD_BASE = 40;
static var FLY_RAD_RND = 20;
static var FLY_FLY_RAD_BASE = 50;
static var FLY_FLY_RAD_RND = 20;
static var FLY_LR_DIR_BASE = 45;
static var FLY_LR_DIR_RND = 22.5;
static var FLY_GORO_DIR_DIV = 4;
static var FLY_MISS_POWER_BASE = 1.15;
static var FLY_MISS_POWER_RND = 0.15;
static var BUNT_HIT_TIME = 250;
static var BUNT_POWER_BASE = 20;
static var BUNT_POWER_RND = 10;
static var BUNT_RAD_BASE = 0;
static var BUNT_RAD_RND = 10;
static var BUNT_GORO_DIR_DIV = 4;
static var BUNT_FLY_RAD_BASE = 50;
static var BUNT_FLY_RAD_RND = 20;
}
Symbol 3418 MovieClip [__Packages.app.enemy.MoundCharacter] Frame 0
class app.enemy.MoundCharacter extends app.enemy.CharacterBase
{
var m_type, m_isPosUpdate, m_x, m_y, m_z, m_baseHeight, m_posVec;
function MoundCharacter (context, parentMC, mcid, type) {
super(context, parentMC, mcid);
m_type = type;
}
function disp() {
if (!app.sys.SysInfo.__get__GameInfo().__get__Mound().isVisible()) {
return(undefined);
}
if (m_isPosUpdate) {
app.sys.SysInfo.__get__GameInfo().__get__Mound().calcPositionWithSize(m_x, m_y, m_z, m_baseHeight, m_posVec);
}
super.disp();
}
}
Symbol 3419 MovieClip [__Packages.app.enemy.MoundBatter] Frame 0
class app.enemy.MoundBatter extends app.enemy.MoundCharacter
{
var m_baseSize, m_baseScale, m_dominant, m_motionMode, m_motionTime, m_isEndMotion, m_moveX, m_targetX, m_x, m_baseX, m_isPosUpdate, m_motLoopTime, m_anime, m_motLoopLen, m_motLoopStart, m_isMotUpdate, m_motion, m_z, m_team, m_dir, m_xScale;
function MoundBatter (context, parentMC) {
super(context, parentMC, "MoundBatterMC", app.enemy.CharacterType.PITCHER);
m_baseSize = 158;
m_baseScale = 100;
m_dominant = true;
m_motionMode = MOT_NONE;
m_motionTime = 0;
m_isEndMotion = false;
initPosition();
reset();
}
function move() {
if (m_targetX != m_moveX) {
var _local3;
var _local4;
_local3 = (MOVE_SPEED * app.sys.SysInfo.getRate()) / 100;
_local4 = Math.abs(m_targetX - m_moveX);
_local3 = Math.min(_local3, _local4);
if (m_targetX > m_moveX) {
m_moveX = m_moveX + _local3;
} else {
m_moveX = m_moveX - _local3;
}
if (m_dominant) {
m_x = m_baseX + m_moveX;
} else {
m_x = -(m_baseX - m_moveX);
}
m_isPosUpdate = true;
}
m_motionTime = m_motionTime + app.sys.SysInfo.getRate();
switch (m_motionMode) {
case MOT_NONELOOP_LOOP :
break;
case MOT_ONELOOPFINISH_LOOP :
if (m_motionTime >= m_motLoopTime) {
m_motionTime = m_motLoopTime;
m_isEndMotion = true;
m_motionMode = MOT_NONELOOP_LOOP;
}
m_anime = Math.floor(m_motLoopStart + (((m_motLoopLen - 1) * m_motionTime) / m_motLoopTime));
m_isMotUpdate = true;
break;
case MOT_NONE :
m_motion = ANI_BASE_MOT;
m_anime = 1;
m_motionMode = MOT_NONELOOP_LOOP;
m_isMotUpdate = true;
break;
case MOT_CHARGE :
m_motion = ANI_CHARGE_MOT;
m_anime = ANI_CHARGE_START;
m_motionTime = 0;
m_motLoopTime = ANI_CHARGE_TIME;
m_motLoopStart = ANI_CHARGE_START;
m_motLoopLen = ANI_CHARGE_LEN;
m_motionMode = MOT_ONELOOPFINISH_LOOP;
m_isMotUpdate = true;
break;
case MOT_SWING :
m_motion = ANI_SWING_MOT;
m_anime = ANI_SWING_START;
m_motionTime = 0;
m_motLoopTime = ANI_SWING_TIME;
m_motLoopStart = ANI_SWING_START;
m_motLoopLen = ANI_SWING_LEN;
m_motionMode = MOT_ONELOOPFINISH_LOOP;
m_isMotUpdate = true;
break;
case MOT_BANT_STANDBY :
m_motion = ANI_BANT_STANDBY_MOT;
m_anime = ANI_BANT_STANDBY_START;
m_motionTime = 0;
m_motionMode = MOT_NONELOOP_LOOP;
m_isMotUpdate = true;
break;
case MOT_BANT_SWING :
m_motion = ANI_BANT_SWING_MOT;
m_anime = ANI_BANT_SWING_START;
m_motionTime = 0;
m_motLoopTime = ANI_BANT_SWING_TIME;
m_motLoopStart = ANI_BANT_SWING_START;
m_motLoopLen = ANI_BANT_SWING_LEN;
m_motionMode = MOT_ONELOOPFINISH_LOOP;
m_isMotUpdate = true;
}
return(super.move());
}
function initPosition() {
reset();
m_z = -200;
m_team = 1;
m_motion = 1;
m_dir = 1;
m_anime = 1;
m_isMotUpdate = true;
m_isPosUpdate = true;
}
function reset() {
m_baseX = BASE_X;
if (m_dominant) {
m_x = m_baseX;
} else {
m_x = -m_baseX;
}
m_moveX = 0;
m_targetX = 0;
m_anime = 1;
m_isMotUpdate = true;
m_isPosUpdate = true;
}
function setHeight(height) {
m_baseScale = height;
trace("Batter:SetHeight:" + height);
}
function setDominant(isDominant) {
m_dominant = isDominant;
m_xScale = (m_dominant ? 1 : -1);
trace("Batter:setDominant:" + isDominant);
}
function setTargetX(x) {
m_targetX = x;
}
function startMotion(mot) {
m_motionMode = mot;
m_motionTime = 0;
m_isEndMotion = false;
}
function isEndMotion() {
return(m_isEndMotion);
}
function getSwingRate() {
var _local2;
var _local3;
_local2 = ((ANI_SWING_HIT - ANI_SWING_START) * ANI_SWING_TIME) / (ANI_SWING_LEN - 1);
_local3 = m_motionTime - _local2;
trace((("batter8:" + m_motionTime) + ":") + _local2);
return(_local3);
}
static var MOT_NONE = 0;
static var MOT_CHARGE = 10;
static var MOT_SWING = 20;
static var MOT_BANT_STANDBY = 30;
static var MOT_BANT_SWING = 40;
static var MOT_ONELOOPFINISH_LOOP = 100;
static var MOT_NONELOOP_LOOP = 110;
static var ANI_BASE_MOT = 1;
static var ANI_CHARGE_MOT = 1;
static var ANI_CHARGE_START = 2;
static var ANI_CHARGE_LEN = 3;
static var ANI_CHARGE_TIME = (ANI_CHARGE_LEN - 1) * 50;
static var ANI_SWING_MOT = 1;
static var ANI_SWING_START = 6;
static var ANI_SWING_LEN = 16;
static var ANI_SWING_TIME = ((ANI_SWING_LEN - 1) * 50) / 2;
static var ANI_BANT_STANDBY_MOT = 2;
static var ANI_BANT_STANDBY_START = 1;
static var ANI_BANT_SWING_MOT = 2;
static var ANI_BANT_SWING_START = 2;
static var ANI_BANT_SWING_LEN = 7;
static var ANI_BANT_SWING_TIME = (ANI_BANT_SWING_LEN - 1) * 50;
static var ANI_SWING_HIT = 11;
static var BASE_X = -100;
static var MOVE_SPEED = 20;
}
Symbol 3420 MovieClip [__Packages.app.enemy.MoundPitcher] Frame 0
class app.enemy.MoundPitcher extends app.enemy.MoundCharacter
{
var m_baseSize, m_baseScale, m_z, m_motionMode, m_motionTime, m_isEndMotion, m_motLoopTime, m_anime, m_motLoopLen, m_motLoopStart, m_isMotUpdate, m_motLoopMode, m_motion, m_x, m_dir, m_isPosUpdate;
function MoundPitcher (context, parentMC) {
super(context, parentMC, "MoundPitcherMC", app.enemy.CharacterType.PITCHER);
initPosition();
m_baseSize = 195;
m_baseScale = 100 - ((m_z * 30) / 1844);
m_motionMode = MOT_NONE;
m_motionTime = 0;
m_isEndMotion = false;
}
function move() {
m_motionTime = m_motionTime + app.sys.SysInfo.getRate();
switch (m_motionMode) {
case MOT_NONELOOP_LOOP :
break;
case MOT_ONELOOPFINISH_LOOP :
if (m_motionTime >= m_motLoopTime) {
m_motionTime = m_motLoopTime;
m_isEndMotion = true;
m_motionMode = MOT_NONELOOP_LOOP;
}
m_anime = Math.floor(m_motLoopStart + (((m_motLoopLen - 1) * m_motionTime) / m_motLoopTime));
m_isMotUpdate = true;
break;
case MOT_ONELOOPNEXT_LOOP :
if (m_motionTime >= m_motLoopTime) {
m_motionTime = m_motLoopTime;
m_motionMode = m_motLoopMode;
}
m_anime = Math.floor(m_motLoopStart + (((m_motLoopLen - 1) * m_motionTime) / m_motLoopTime));
m_isMotUpdate = true;
break;
case MOT_NONE :
m_motion = ANI_BASE_MOT;
m_anime = 1;
m_motionMode = MOT_NONELOOP_LOOP;
m_isMotUpdate = true;
break;
case MOT_NOD :
m_motion = ANI_NOD_MOT;
m_anime = ANI_NOD_START;
m_motionTime = 0;
m_motLoopTime = ANI_NOD_TIME;
m_motLoopStart = ANI_NOD_START;
m_motLoopLen = ANI_NOD_LEN;
m_motLoopMode = MOT_PITCHING;
m_motionMode = MOT_ONELOOPNEXT_LOOP;
m_isMotUpdate = true;
break;
case MOT_PITCHING :
m_motion = ANI_PITCHING_MOT;
m_anime = ANI_PITCHING_START;
m_motionTime = 0;
m_motLoopTime = ANI_PITCHING_TIME;
m_motLoopStart = ANI_PITCHING_START;
m_motLoopLen = ANI_PITCHING_LEN;
m_motionMode = MOT_ONELOOPFINISH_LOOP;
m_isMotUpdate = true;
break;
case MOT_PITCHING2 :
m_motion = ANI_PITCHING2_MOT;
m_anime = ANI_PITCHING2_START;
m_motionTime = 0;
m_motLoopTime = ANI_PITCHING2_TIME;
m_motLoopStart = ANI_PITCHING2_START;
m_motLoopLen = ANI_PITCHING2_LEN;
m_motionMode = MOT_ONELOOPFINISH_LOOP;
m_isMotUpdate = true;
}
return(super.move());
}
function initPosition() {
m_x = 15;
m_z = 1744;
m_motion = 1;
m_dir = 1;
m_anime = 1;
m_isMotUpdate = true;
m_isPosUpdate = true;
}
function startMotion(mot) {
m_motionMode = mot;
m_motionTime = 0;
m_isEndMotion = false;
}
function isEndMotion() {
return(m_isEndMotion);
}
function reset() {
m_anime = 1;
m_isMotUpdate = true;
}
static var ANI_BASE_MOT = 1;
static var ANI_NOD_MOT = 2;
static var ANI_NOD_START = 1;
static var ANI_NOD_LEN = 8;
static var ANI_NOD_TIME = ((ANI_NOD_LEN - 1) * 50) * 2;
static var ANI_PITCHING_MOT = 1;
static var ANI_PITCHING_START = 2;
static var ANI_PITCHING_LEN = 15;
static var ANI_PITCHING_TIME = (ANI_PITCHING_LEN - 1) * 50;
static var ANI_PITCHING2_MOT = 1;
static var ANI_PITCHING2_START = 17;
static var ANI_PITCHING2_LEN = 12;
static var ANI_PITCHING2_TIME = (ANI_PITCHING2_LEN - 1) * 50;
static var MOT_NONE = 0;
static var MOT_NOD = 5;
static var MOT_PITCHING = 10;
static var MOT_PITCHING2 = 20;
static var MOT_NONELOOP_LOOP = 100;
static var MOT_ONELOOPFINISH_LOOP = 110;
static var MOT_ONELOOPNEXT_LOOP = 120;
}
Symbol 3421 MovieClip [__Packages.app.enemy.MoundCatcher] Frame 0
class app.enemy.MoundCatcher extends app.enemy.MoundCharacter
{
var m_mc, m_baseSize, m_baseScale, m_baseHeight, m_wl, m_context, m_x, m_z, m_motion, m_dir, m_anime, m_isMotUpdate, m_isPosUpdate;
function MoundCatcher (context, parentMC) {
super(context, parentMC, "MoundCatcherMC", app.enemy.CharacterType.CATCHER);
m_mc.cacheAsBitmap = true;
m_baseSize = 151;
m_baseScale = 100;
m_baseHeight = 120;
initPosition();
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function initPosition() {
m_x = 0;
m_z = -450;
m_motion = 1;
m_dir = 1;
m_anime = 5;
m_isMotUpdate = true;
m_isPosUpdate = true;
}
function reset() {
m_anime = 5;
m_isMotUpdate = true;
}
function setMotion(x, y) {
m_anime = (x + (y * 3)) + 1;
m_isMotUpdate = true;
}
}
Symbol 3422 MovieClip [__Packages.app.enemy.ActionType] Frame 0
class app.enemy.ActionType
{
function ActionType () {
}
static var BATTER_NORMAL = 0;
static var BATTER_GROUNDER = 1;
static var BATTER_FLY = 2;
static var BATTER_BUNT = 3;
static var BATTER_MAX = 4;
static var PITCHER_STRAIGHT = 0;
static var PITCHER_CURVE = 1;
static var PITCHER_SHOOT = 2;
static var PITCHER_FORK = 3;
static var PITCHER_MAX = 4;
}
Symbol 3423 MovieClip [__Packages.app.enemy.Ground] Frame 0
class app.enemy.Ground extends app.enemy.Enemy
{
var m_mcBG, m_context, m_mcBase, m_mcGround, m_mcGroundAd, m_mcObject, m_basePositionList, m_dispVec, m_curX, m_curY, m_curZ, m_targetX, m_targetZ, m_scale, m_nowX, m_nowZ, m_nowScale, m_addX, m_addY, m_isLast, m_dispMode, m_isBoardUpdate, m_visible, m_wl;
function Ground (context) {
super(context);
var _local5;
m_mcBG = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "BGColorMC", "BGColor", m_context.getBase());
m_mcBG._x = 0;
m_mcBG._y = 0;
m_mcBG._visible = false;
m_mcBase = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "MaskMC", "Mask", m_context.getBase());
m_mcBase._x = 0;
m_mcBase._y = 0;
m_mcBase._visible = false;
m_mcGround = util.MovieClipFactory.createOnMc(m_mcBase.dummy, "GroundMC", "Ground");
m_mcGround._x = 0;
m_mcGround._y = 0;
m_mcGround.cacheAsBitmap = true;
m_mcGround._visible = true;
if (app.sys.SysInfo.__get__GameMode().isAdMode()) {
m_mcGroundAd = util.MovieClipFactory.createOnMc(m_mcBase.dummy, "GroundAdMC", "AdGround");
m_mcGroundAd._x = 0;
m_mcGroundAd._y = 0;
m_mcGroundAd.cacheAsBitmap = true;
m_mcGroundAd._visible = true;
}
m_mcObject = util.MovieClipFactory.createOnMc(m_mcBase.dummy, "DummyMC", "Dummy");
m_mcObject._x = 0;
m_mcObject._y = 0;
m_mcObject._visible = true;
m_basePositionList = [];
m_basePositionList.push(new util.Vector3(HOME_X, 0, HOME_Z + (HOME_HEIGHT / 2)));
m_basePositionList.push(new util.Vector3(FIRST_BASE_X - (BASE_WIDTH / 2), 0, FIRST_BASE_Z));
m_basePositionList.push(new util.Vector3(SECOND_BASE_X, 0, SECOND_BASE_Z));
m_basePositionList.push(new util.Vector3(THIRD_BASE_X + (BASE_WIDTH / 2), 0, THIRD_BASE_Z));
m_dispVec = new util.Vector3(0, 0, 0);
m_curX = 0;
m_curY = 0;
m_curZ = 0;
m_targetX = 0;
m_targetZ = 0;
m_scale = BASE_SCALE;
m_nowX = 0;
m_nowZ = 0;
m_nowScale = 0;
m_addX = 0;
m_addY = 0;
m_isLast = false;
m_dispMode = DM_NORMAL;
m_isBoardUpdate = true;
m_visible = false;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
var _local3;
var _local4;
_local3 = new app.enemy.GroundOutFielder(m_context, getObjectMC(), app.enemy.CharacterType.LEFT);
app.sys.SysInfo.__get__GameInfo().setGroundCharacter(_local3, app.enemy.CharacterType.GROUND_LEFT);
_local3 = new app.enemy.GroundOutFielder(m_context, getObjectMC(), app.enemy.CharacterType.CENTER);
app.sys.SysInfo.__get__GameInfo().setGroundCharacter(_local3, app.enemy.CharacterType.GROUND_CENTER);
_local3 = new app.enemy.GroundOutFielder(m_context, getObjectMC(), app.enemy.CharacterType.RIGHT);
app.sys.SysInfo.__get__GameInfo().setGroundCharacter(_local3, app.enemy.CharacterType.GROUND_RIGHT);
_local3 = new app.enemy.GroundJudge(m_context, getObjectMC(), 2);
app.sys.SysInfo.__get__GameInfo().setGroundCharacter(_local3, app.enemy.CharacterType.GROUND_JUDGE + 2);
_local3 = new app.enemy.GroundInFielder(m_context, getObjectMC(), app.enemy.CharacterType.FIRST);
app.sys.SysInfo.__get__GameInfo().setGroundCharacter(_local3, app.enemy.CharacterType.GROUND_FIRST);
_local3 = new app.enemy.GroundInFielder(m_context, getObjectMC(), app.enemy.CharacterType.SECOND);
app.sys.SysInfo.__get__GameInfo().setGroundCharacter(_local3, app.enemy.CharacterType.GROUND_SECOND);
_local3 = new app.enemy.GroundInFielder(m_context, getObjectMC(), app.enemy.CharacterType.SHORT);
app.sys.SysInfo.__get__GameInfo().setGroundCharacter(_local3, app.enemy.CharacterType.GROUND_SHORT);
_local3 = new app.enemy.GroundInFielder(m_context, getObjectMC(), app.enemy.CharacterType.THIRD);
app.sys.SysInfo.__get__GameInfo().setGroundCharacter(_local3, app.enemy.CharacterType.GROUND_THIRD);
_local3 = new app.enemy.GroundJudge(m_context, getObjectMC(), 1);
app.sys.SysInfo.__get__GameInfo().setGroundCharacter(_local3, app.enemy.CharacterType.GROUND_JUDGE + 1);
_local3 = new app.enemy.GroundJudge(m_context, getObjectMC(), 3);
app.sys.SysInfo.__get__GameInfo().setGroundCharacter(_local3, app.enemy.CharacterType.GROUND_JUDGE + 3);
_local3 = new app.enemy.GroundCatcher(m_context, getObjectMC());
app.sys.SysInfo.__get__GameInfo().setGroundCharacter(_local3, app.enemy.CharacterType.GROUND_CATCHER);
_local3 = new app.enemy.GroundPitcher(m_context, getObjectMC());
app.sys.SysInfo.__get__GameInfo().setGroundCharacter(_local3, app.enemy.CharacterType.GROUND_PITCHER);
_local4 = 0;
while (_local4 < 4) {
_local3 = new app.enemy.GroundRunner(m_context, getObjectMC(), _local4);
app.sys.SysInfo.__get__GameInfo().setGroundCharacter(_local3, app.enemy.CharacterType.GROUND_RUNNER + _local4);
_local4++;
}
_local3 = new app.enemy.GroundJudge(m_context, getObjectMC(), 0);
app.sys.SysInfo.__get__GameInfo().setGroundCharacter(_local3, app.enemy.CharacterType.GROUND_JUDGE + 0);
new app.enemy.GroundBall(m_context, getObjectMC());
}
function move() {
switch (m_dispMode) {
case DM_NORMAL :
var _local4;
_local4 = app.sys.SysInfo.__get__GameInfo().__get__Ball().getPosition();
m_targetX = _local4.x;
m_targetZ = _local4.z;
m_scale = BASE_SCALE;
break;
case DM_FIXED :
break;
case DM_HOMERUN :
_local4 = app.sys.SysInfo.__get__GameInfo().__get__Ball().getPosition();
m_targetX = _local4.x;
m_targetZ = _local4.z;
m_scale = BASE_SCALE;
if (!app.sys.SysInfo.__get__GameInfo().__get__Ball().isShow()) {
m_dispMode = DM_RUNNER;
}
break;
case DM_RUNNER :
var _local2;
var _local3;
_local3 = app.sys.SysInfo.__get__GameControl().getFirstRunner();
if (_local3 == -1) {
break;
}
_local2 = app.sys.SysInfo.__get__GameControl().getRunner(_local3);
if (!_local2.isActive()) {
break;
}
m_targetX = _local2.getX();
m_targetZ = _local2.getZ();
m_scale = BASE_SCALE;
}
m_curX = m_curX + ((m_targetX - m_curX) / 2);
m_curZ = m_curZ + ((m_targetZ - m_curZ) / 2);
if (util.Util.calcDist(m_targetZ - m_curZ, m_targetX - m_curX) < 1) {
m_curX = m_targetX;
m_curZ = m_targetZ;
}
return(true);
}
function ctrl() {
return(true);
}
function disp() {
if (!m_visible) {
return(undefined);
}
if (m_isBoardUpdate) {
boardUpdate();
m_isBoardUpdate = false;
}
if (((m_nowX != m_curX) || (m_nowZ != m_curZ)) || (m_nowScale != m_scale)) {
calcPosition(m_curX, 0, m_curZ, m_dispVec);
var _local2 = m_scale;
if (m_nowScale != m_scale) {
m_mcBase.dummy._xscale = (m_mcBase.dummy._yscale = _local2);
}
m_mcBase.dummy._x = ((((-m_dispVec.x) * _local2) / 100) + m_addX) + (app.sys.Screen.WIDTH / 2);
m_mcBase.dummy._y = ((((-m_dispVec.y) * _local2) / 100) + m_addY) + (app.sys.Screen.HEIGHT / 2);
m_nowX = m_curX;
m_nowZ = m_curY;
m_nowScale = m_scale;
}
}
function destroy() {
m_mcObject.removeMovieClip();
m_mcGround.removeMovieClip();
if (app.sys.SysInfo.__get__GameMode().isAdMode()) {
m_mcGroundAd.removeMovieClip();
}
m_mcBase.removeMovieClip();
m_mcBG.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
}
function calcPosition(x, y, z, outVec) {
var _local8;
var _local7;
var _local1;
var _local6;
var _local5;
x = ((x * TRANS_SCALE) + TRANS_POS_X) - CAM_PX;
y = ((y * TRANS_SCALE) + TRANS_POS_Y) - CAM_PY;
z = ((z * TRANS_SCALE) + TRANS_POS_Z) - CAM_PZ;
_local8 = x;
_local7 = (y * COS_X) + (z * SIN_X);
_local1 = ((-y) * SIN_X) + (z * COS_X);
_local6 = _local8 / _local1;
_local5 = _local7 / _local1;
outVec.x = (_local6 * DISP_SCALE) + DISP_CENTER_X;
outVec.y = ((-_local5) * DISP_SCALE) + DISP_CENTER_Y;
outVec.z = _local1;
}
function calcPositionWithSize(x, y, z, height, outVec) {
var _local8;
var _local5;
var _local2;
var _local7;
var _local4;
x = ((x * TRANS_SCALE) + TRANS_POS_X) - CAM_PX;
y = ((y * TRANS_SCALE) + TRANS_POS_Y) - CAM_PY;
z = ((z * TRANS_SCALE) + TRANS_POS_Z) - CAM_PZ;
_local8 = x;
_local5 = (y * COS_X) + (z * SIN_X);
_local2 = ((-y) * SIN_X) + (z * COS_X);
_local7 = _local8 / _local2;
_local4 = _local5 / _local2;
outVec.x = (_local7 * DISP_SCALE) + DISP_CENTER_X;
outVec.y = ((-_local4) * DISP_SCALE) + DISP_CENTER_Y;
y = y + (height * TRANS_SCALE);
_local5 = (y * COS_X) + (z * SIN_X);
_local2 = ((-y) * SIN_X) + (z * COS_X);
_local4 = _local5 / _local2;
outVec.z = outVec.y - (((-_local4) * DISP_SCALE) + DISP_CENTER_Y);
}
function getBasePosition(baseNumber) {
baseNumber = baseNumber % 4;
return(m_basePositionList[baseNumber]);
}
function getObjectMC() {
return(m_mcObject);
}
function setCenterPosition(x, y, z) {
m_targetX = (m_curX = x);
m_curY = y;
m_targetZ = (m_curZ = z);
}
function setScale(scale) {
m_scale = scale;
}
function setVisible(visible) {
m_visible = visible;
m_mcBG._visible = visible;
m_mcBase._visible = visible;
}
function isVisible() {
return(m_visible);
}
function updateBoard() {
m_isBoardUpdate = true;
}
function setNormalMode() {
m_dispMode = DM_NORMAL;
m_addX = CENTER_ADD_X;
m_addY = CENTER_ADD_Y;
}
function setFixedMode() {
m_dispMode = DM_FIXED;
m_addX = 0;
m_addY = 0;
}
function setHomeRunMode() {
m_dispMode = DM_HOMERUN;
m_addX = CENTER_ADD_X;
m_addY = CENTER_ADD_Y;
}
function setRunnerMode() {
m_dispMode = DM_RUNNER;
m_addX = CENTER_ADD_X;
m_addY = CENTER_ADD_Y;
}
function setLast(isLast) {
m_isLast = isLast;
}
function boardUpdate() {
var _local3;
var _local8 = app.sys.SysInfo.__get__GameInfo();
var _local14;
var _local10;
var _local11;
var _local13;
var _local12;
var _local4;
var _local6;
var _local5;
var _local16;
var _local15;
var _local9;
var _local7;
var _local17;
var _local2;
_local3 = m_mcGround.ScoreBoard;
_local14 = app.sys.SysInfo.__get__GameInfo().getTeamStringFirst();
_local3.TEAM_FIRST.text = _local14;
_local14 = app.sys.SysInfo.__get__GameInfo().getTeamStringLast();
_local3.TEAM_LAST.text = _local14;
_local10 = _local8.getScoreListFirst();
_local11 = _local8.getScoreListLast();
_local13 = _local8.getInning();
_local17 = _local8.isFirst();
_local12 = ((_local13 < 10) ? 1 : (_local13 - 8));
_local3.SCORE_LAST_9X.text = "";
_local2 = 1;
while (_local2 <= 9) {
_local4 = (_local2 + _local12) - 1;
_local6 = _local10[_local4 - 1];
_local5 = _local11[_local4 - 1];
_local9 = ((_local6 == -1) ? "" : ("" + _local6));
_local7 = ((_local5 == -1) ? "" : ("" + _local5));
_local3["INNING_" + _local2].text = _local4;
_local3["SCORE_FIRST_" + _local2].text = _local9;
_local3["SCORE_LAST_" + _local2].text = _local7;
_local2++;
}
if ((_local13 >= 9) && (m_isLast)) {
_local16 = _local8.getTotalScoreFirst();
_local15 = _local8.getTotalScoreLast();
_local6 = _local10[_local13 - 1];
_local5 = _local11[_local13 - 1];
if ((_local6 != -1) && (_local16 < _local15)) {
if (_local5 >= 10) {
_local7 = _local5 + "x";
_local3.SCORE_LAST_9.text = "";
_local3.SCORE_LAST_9X.text = _local7;
} else {
if (_local5 == -1) {
_local7 = "x";
} else {
_local7 = _local5 + "x";
}
_local3.SCORE_LAST_9.text = _local7;
_local3.SCORE_LAST_9X.text = "";
}
}
}
_local3.INNING_10.text = "";
_local3.SCORE_FIRST_10.text = "";
_local3.SCORE_LAST_10.text = "";
_local3.SCORE_FIRST_R.text = _local8.getTotalScoreFirst();
_local3.SCORE_LAST_R.text = _local8.getTotalScoreLast();
_local3.SCORE_FIRST_H.text = _local8.getRecordHitFirst();
_local3.SCORE_LAST_H.text = _local8.getRecordHitLast();
_local3.SCORE_FIRST_E.text = _local8.getRecordErrorFirst();
_local3.SCORE_LAST_E.text = _local8.getRecordErrorLast();
}
static var HOME_X = 0;
static var HOME_Z = 0;
static var FIRST_BASE_X = 1939.73532215094;
static var FIRST_BASE_Z = 1939.73532215094;
static var SECOND_BASE_X = 0;
static var SECOND_BASE_Z = 3879.47064430187;
static var THIRD_BASE_X = -1939.73532215094;
static var THIRD_BASE_Z = 1939.73532215094;
static var HOME_WIDTH = 43.18;
static var HOME_HEIGHT = 43.18;
static var BASE_WIDTH = 53.8815367264149;
static var BASE_HEIGHT = 53.8815367264149;
static var CAM_PX = 0;
static var CAM_PY = 3781.409;
static var CAM_PZ = -4124.942;
static var CAM_RX = 0.732811393034859;
static var COS_X = Math.cos(CAM_RX);
static var SIN_X = Math.sin(CAM_RX);
static var TRANS_SCALE = 0.113933069876223;
static var TRANS_POS_X = 0;
static var TRANS_POS_Y = 0;
static var TRANS_POS_Z = -485;
static var DISP_SCALE = 3630;
static var DISP_CENTER_X = 640;
static var DISP_CENTER_Y = 640;
static var BASE_SCALE = 300;
static var DM_NORMAL = 0;
static var DM_FIXED = 1;
static var DM_HOMERUN = 2;
static var DM_RUNNER = 3;
static var CENTER_ADD_X = 0;
static var CENTER_ADD_Y = 30;
}
Symbol 3424 MovieClip [__Packages.app.enemy.GroundOutFielder] Frame 0
class app.enemy.GroundOutFielder extends app.enemy.GroundFielder
{
var m_type, m_groundIdx, m_searchLeft, m_searchRight, m_throwSpeed, m_x, m_z, m_targetDir, m_motion, m_dir, m_anime, m_isMotUpdate, m_isPosUpdate;
function GroundOutFielder (context, parentMC, type) {
super(context, parentMC, "GroundSyubiMC", type);
initPosition();
switch (m_type) {
case app.enemy.CharacterType.LEFT :
m_groundIdx = app.enemy.CharacterType.GROUND_LEFT;
m_searchLeft = 2.53072741539178;
m_searchRight = (Math.PI/2);
break;
case app.enemy.CharacterType.CENTER :
m_groundIdx = app.enemy.CharacterType.GROUND_CENTER;
m_searchLeft = 2.0943951023932;
m_searchRight = 1.0471975511966;
break;
case app.enemy.CharacterType.RIGHT :
m_groundIdx = app.enemy.CharacterType.GROUND_RIGHT;
m_searchLeft = (Math.PI/2);
m_searchRight = 0.610865238198015;
}
m_throwSpeed = app.enemy.GroundCharacter.THROW_SPEED * 1.2;
}
function checkFollowBall() {
var _local3 = false;
var _local5 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
var _local2 = _local5.getPosition();
var _local4;
var _local6;
var _local7;
_local4 = Math.atan2(_local2.z, _local2.x);
_local6 = util.Util.calcDist(_local2.x, _local2.z);
_local7 = util.Util.calcDist(_local2.x - m_x, _local2.z - m_z);
if ((((_local6 >= 3500) && (m_searchRight <= _local4)) && (_local4 <= m_searchLeft)) || (_local7 <= 2000)) {
_local3 = true;
}
return(_local3);
}
function initPosition() {
switch (m_type) {
case app.enemy.CharacterType.LEFT :
m_x = -2678.78402655563;
m_z = 6467.15672757901;
m_targetDir = 5.10508806208341;
break;
case app.enemy.CharacterType.CENTER :
m_x = 5.5107285922007E-13;
m_z = 9000;
m_targetDir = 4.71238898038469;
break;
case app.enemy.CharacterType.RIGHT :
m_x = 2678.78402655563;
m_z = 6467.15672757901;
m_targetDir = 4.31968989868597;
}
m_motion = 1;
m_dir = 1;
m_anime = 1;
m_isMotUpdate = true;
m_isPosUpdate = true;
}
function btrace(str) {
trace(((m_type + "[ ") + str) + " ]");
}
}
Symbol 3425 MovieClip [__Packages.app.enemy.GroundJudge] Frame 0
class app.enemy.GroundJudge extends app.enemy.GroundCharacter
{
var m_base, m_x, m_z, m_targetDir, m_motion, m_dir, m_anime, m_isPosUpdate, m_isMotUpdate, startMotion;
function GroundJudge (context, parentMC, base) {
super(context, parentMC, "GroundJudgeMC", app.enemy.CharacterType.JUDGE);
m_base = base;
initPosition();
}
function initPosition() {
switch (m_base) {
case 0 :
m_x = 0;
m_z = -300;
m_targetDir = (Math.PI/2);
break;
case 1 :
m_x = 2322.50732394744;
m_z = 2222.50732394744;
m_targetDir = 3.92699081698724;
break;
case 2 :
m_x = app.enemy.Ground.SECOND_BASE_X + 0;
m_z = app.enemy.Ground.SECOND_BASE_Z + 200;
m_targetDir = 4.71238898038469;
break;
case 3 :
m_x = -2322.50732394744;
m_z = 2222.50732394744;
m_targetDir = 5.49778714378214;
}
m_motion = 1;
m_dir = 1;
m_anime = 1;
m_isPosUpdate = true;
m_isMotUpdate = true;
}
function playSafe() {
startMotion(app.enemy.GroundCharacter.MOT_SAFE);
}
function playOut() {
startMotion(app.enemy.GroundCharacter.MOT_OUT);
}
}
Symbol 3426 MovieClip [__Packages.app.enemy.GroundInFielder] Frame 0
class app.enemy.GroundInFielder extends app.enemy.GroundFielder
{
var m_groundIdx, m_x, m_z, m_type, m_targetDir, m_motion, m_dir, m_anime, m_isMotUpdate, m_isPosUpdate;
function GroundInFielder (context, parentMC, type) {
super(context, parentMC, "GroundSyubiMC", type);
initPosition();
switch (type) {
case app.enemy.CharacterType.FIRST :
m_groundIdx = app.enemy.CharacterType.GROUND_FIRST;
break;
case app.enemy.CharacterType.SECOND :
m_groundIdx = app.enemy.CharacterType.GROUND_SECOND;
break;
case app.enemy.CharacterType.SHORT :
m_groundIdx = app.enemy.CharacterType.GROUND_SHORT;
break;
case app.enemy.CharacterType.THIRD :
m_groundIdx = app.enemy.CharacterType.GROUND_THIRD;
}
}
function checkFollowBall() {
var _local2 = false;
var _local4 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
var _local3 = _local4.getPosition();
var _local5;
_local5 = util.Util.calcDist(_local3.x - m_x, _local3.z - m_z);
if (_local5 <= 1000) {
_local2 = true;
}
return(_local2);
}
function initPosition() {
switch (m_type) {
case app.enemy.CharacterType.FIRST :
m_x = app.enemy.Ground.FIRST_BASE_X - ((app.enemy.Ground.BASE_WIDTH / 4) * 3);
m_z = app.enemy.Ground.FIRST_BASE_Z;
m_targetDir = 3.92699081698724;
break;
case app.enemy.CharacterType.SECOND :
m_x = app.enemy.Ground.SECOND_BASE_X;
m_z = app.enemy.Ground.SECOND_BASE_Z;
m_targetDir = 4.71238898038469;
break;
case app.enemy.CharacterType.SHORT :
m_x = -1000;
m_z = 3000;
m_targetDir = 5.10508806208341;
break;
case app.enemy.CharacterType.THIRD :
m_x = app.enemy.Ground.THIRD_BASE_X + ((app.enemy.Ground.BASE_WIDTH / 4) * 3);
m_z = app.enemy.Ground.THIRD_BASE_Z;
m_targetDir = 5.49778714378214;
}
m_motion = 1;
m_dir = 1;
m_anime = 1;
m_isMotUpdate = true;
m_isPosUpdate = true;
}
}
Symbol 3427 MovieClip [__Packages.app.enemy.GroundCatcher] Frame 0
class app.enemy.GroundCatcher extends app.enemy.GroundFielder
{
var m_groundIdx, m_x, m_z, m_targetDir, m_motion, m_dir, m_anime, m_isMotUpdate, m_isPosUpdate;
function GroundCatcher (context, parentMC) {
super(context, parentMC, "GroundCatcherMC", app.enemy.CharacterType.CATCHER);
initPosition();
m_groundIdx = app.enemy.CharacterType.GROUND_CATCHER;
}
function checkFollowBall() {
var _local2 = false;
var _local4 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
var _local3 = _local4.getPosition();
var _local5;
_local5 = util.Util.calcDist(_local3.x - m_x, _local3.z - m_z);
if (_local5 <= 1500) {
_local2 = true;
}
return(_local2);
}
function initPosition() {
m_x = 0;
m_z = -100;
m_targetDir = (Math.PI/2);
m_motion = 1;
m_dir = 1;
m_anime = 1;
m_isMotUpdate = true;
m_isPosUpdate = true;
}
}
Symbol 3428 MovieClip [__Packages.app.enemy.GroundPitcher] Frame 0
class app.enemy.GroundPitcher extends app.enemy.GroundFielder
{
var m_groundIdx, m_x, m_z, m_targetDir, m_motion, m_dir, m_anime, m_isMotUpdate, m_isPosUpdate;
function GroundPitcher (context, parentMC) {
super(context, parentMC, "GroundSyubiMC", app.enemy.CharacterType.PITCHER);
initPosition();
m_groundIdx = app.enemy.CharacterType.GROUND_PITCHER;
}
function checkFollowBall() {
var _local2 = false;
var _local4 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
var _local3 = _local4.getPosition();
var _local5;
_local5 = util.Util.calcDist(_local3.x - m_x, _local3.z - m_z);
if (_local5 <= 1500) {
_local2 = true;
}
return(_local2);
}
function initPosition() {
m_x = 0;
m_z = 1844;
m_targetDir = 4.71238898038469;
m_motion = 1;
m_dir = 1;
m_anime = 1;
m_isMotUpdate = true;
m_isPosUpdate = true;
}
}
Symbol 3429 MovieClip [__Packages.app.enemy.GroundBall] Frame 0
class app.enemy.GroundBall extends app.enemy.Enemy
{
var m_mcBase, m_mcShadow, m_mcBall, m_dispVec1, m_dispVec2, m_baseShadowSize, m_baseShadowScale, m_baseBallSize, m_baseBallScale, m_wl, m_context;
function GroundBall (context, parentMC) {
super(context);
m_mcBase = util.MovieClipFactory.createOnMc(parentMC, "DummyMC", "Dummy");
m_mcBase._x = 0;
m_mcBase._y = 0;
m_mcBase._visible = true;
m_mcBase.stop();
m_mcShadow = util.MovieClipFactory.createOnMc(m_mcBase, "ShadowMC", "Shadow");
m_mcShadow._x = 0;
m_mcShadow._y = 0;
m_mcShadow._visible = true;
m_mcShadow.stop();
m_mcBall = util.MovieClipFactory.createOnMc(m_mcBase, "BallMC", "Ball");
m_mcBall._x = 0;
m_mcBall._y = 0;
m_mcBall._visible = true;
m_mcBall.stop();
m_dispVec1 = new util.Vector3(0, 0, 0);
m_dispVec2 = new util.Vector3(0, 0, 0);
m_baseShadowSize = m_mcShadow._width;
m_baseShadowScale = 100;
m_baseBallSize = m_mcBall._width;
m_baseBallScale = 100;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function disp() {
var _local3;
var _local4;
var _local2;
_local3 = app.sys.SysInfo.__get__GameInfo().Ball;
if (_local3.isShow()) {
_local4 = app.sys.SysInfo.__get__GameInfo().Ground;
_local2 = _local3.getPosition();
_local4.calcPosition(_local2.x, 0, _local2.z, m_dispVec1);
m_mcShadow._xscale = (m_mcShadow._yscale = (SHADOW_SIZE / m_baseShadowSize) * m_baseShadowScale);
m_mcBase._x = m_dispVec1.x;
m_mcBase._y = m_dispVec1.y;
_local4.calcPosition(_local2.x, _local2.y, _local2.z, m_dispVec2);
m_mcBall._xscale = (m_mcBall._yscale = ((BALL_SIZE * ((_local2.y / 500) + 1)) / m_baseBallSize) * m_baseBallScale);
m_mcBall._x = 0;
m_mcBall._y = (m_dispVec2.y - m_mcBase._y) - (m_mcBall._height / 2);
m_mcBase._visible = true;
} else {
m_mcBase._visible = false;
}
}
function destroy() {
m_mcShadow.removeMovieClip();
m_mcBall.removeMovieClip();
m_mcBase.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
}
static var SHADOW_SIZE = 4.9;
static var BALL_SIZE = 2.4;
}
Symbol 3430 MovieClip [__Packages.app.enemy.Mound] Frame 0
class app.enemy.Mound extends app.enemy.Enemy
{
var m_mcBG, m_context, m_mcBtn, m_mcBase, m_mcGround, m_mcGroundAd, m_mcAdBase, m_mcObject, m_visible, m_isActive, m_wl, m_checkMouseClick, m_checkMouseMove, m_btnMcList;
function Mound (context) {
super(context);
var _local4;
m_mcBG = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "BGColorMC", "BGColor", m_context.getBase());
m_mcBG._x = 0;
m_mcBG._y = 0;
m_mcBG.stop();
m_mcBG._visible = false;
if (app.sys.SysInfo.__get__GameMode().isAdMode()) {
m_mcBtn = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "MoundAdBtnMC", "MoundBtn", m_context.getBase());
m_mcBtn._x = 0;
m_mcBtn._y = 0;
m_mcBtn.stop();
m_mcBtn._visible = false;
}
m_mcBase = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "MaskMC", "Mask", m_context.getBase());
m_mcBase._x = 0;
m_mcBase._y = 0;
m_mcBase.stop();
m_mcBase._visible = false;
m_mcGround = util.MovieClipFactory.createOnMc(m_mcBase.dummy, "MoundMC", "Mound");
m_mcGround._xscale = (m_mcGround._yscale = 50);
m_mcGround._x = 0;
m_mcGround._y = -95.8;
m_mcGround.cacheAsBitmap = true;
m_mcGround.stop();
m_mcGround._visible = true;
if (app.sys.SysInfo.__get__GameMode().isAdMode()) {
m_mcGroundAd = util.MovieClipFactory.createOnMc(m_mcBase.dummy, "MoundAdMC", "MoundAd");
m_mcGroundAd._xscale = (m_mcGroundAd._yscale = 50);
m_mcGroundAd._x = 0;
m_mcGroundAd._y = -95.8;
m_mcGroundAd.cacheAsBitmap = true;
m_mcGroundAd.stop();
m_mcGroundAd._visible = true;
}
m_mcAdBase = util.MovieClipFactory.createOnMc(m_mcBase.dummy, "DummyMC", "Dummy");
m_mcAdBase._x = 0;
m_mcAdBase._y = 0;
m_mcAdBase._visible = true;
m_mcObject = util.MovieClipFactory.createOnMc(m_mcBase.dummy, "DummyMC", "Dummy");
m_mcObject._xscale = (m_mcObject._yscale = 50);
m_mcObject._x = 0;
m_mcObject._y = -95.8;
m_mcObject.stop();
m_mcObject._visible = true;
m_visible = false;
m_isActive = false;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
var _local3;
_local3 = new app.enemy.MoundJudge(m_context, getObjectMC());
app.sys.SysInfo.__get__GameInfo().setMoundCharacter(_local3, app.enemy.CharacterType.MOUND_JUDGE);
_local3 = new app.enemy.MoundCatcher(m_context, getObjectMC());
app.sys.SysInfo.__get__GameInfo().setMoundCharacter(_local3, app.enemy.CharacterType.MOUND_CATCHER);
_local3 = new app.enemy.MoundBatter(m_context, getObjectMC());
app.sys.SysInfo.__get__GameInfo().setMoundCharacter(_local3, app.enemy.CharacterType.MOUND_BATTER);
new app.enemy.MoundBall(m_context, getObjectMC());
_local3 = new app.enemy.MoundPitcher(m_context, getObjectMC());
app.sys.SysInfo.__get__GameInfo().setMoundCharacter(_local3, app.enemy.CharacterType.MOUND_PITCHER);
Mouse.addListener(this);
m_checkMouseClick = false;
m_checkMouseMove = false;
initMenu();
}
function move() {
if (m_visible && (m_isActive)) {
if (app.sys.SysInfo.__get__GameMode().isAdMode()) {
var _local2;
var _local4;
var _local6;
var _local5;
var _local3;
_local6 = m_mcBtn._xmouse;
_local5 = m_mcBtn._ymouse;
_local4 = -1;
_local2 = m_btnMcList.length - 1;
for ( ; _local2 >= 0 ; _local2--) {
_local3 = m_btnMcList[_local2];
if (_local3.isLeft && (app.sys.SysInfo.__get__GameInfo().isFirst() == app.sys.SysInfo.__get__GameInfo().isPlayerFirst())) {
if (!app.sys.SysInfo.__get__GameInfo().getNineDominant()) {
continue;
}
} else if (hitCheckMC(_local3.mc, _local6, _local5)) {
_local4 = _local2;
break;
}
}
if (_local4 != -1) {
app.sys.SysInfo.__get__Cursor().show();
if (m_checkMouseClick) {
app.ad.Advertisement.open(app.ad.Advertisement.AD_MOUND);
}
}
}
}
m_checkMouseClick = false;
m_checkMouseMove = false;
return(true);
}
function ctrl() {
return(true);
}
function disp() {
if (m_visible != m_mcBG._visible) {
m_mcBG._visible = m_visible;
m_mcBase._visible = m_visible;
if (app.sys.SysInfo.__get__GameMode().isAdMode()) {
m_mcBtn._visible = m_visible;
}
}
}
function destroy() {
Mouse.removeListener(this);
m_mcObject.removeMovieClip();
if (app.sys.SysInfo.__get__GameMode().isAdMode()) {
m_mcGroundAd.removeMovieClip();
}
m_mcGround.removeMovieClip();
m_mcBase.removeMovieClip();
m_mcBG.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
}
function calcPosition(x, y, z, outVec) {
var _local11;
var _local10;
var _local1;
var _local2;
var _local7;
var _local5;
var _local9;
var _local8;
x = ((x * TRANS_SCALE) + TRANS_POS_X) - CAM_PX;
y = ((y * TRANS_SCALE) + TRANS_POS_Y) - CAM_PY;
z = ((z * TRANS_SCALE) + TRANS_POS_Z) - CAM_PZ;
_local2 = x;
_local7 = (y * COS_X) + (z * SIN_X);
_local5 = ((-y) * SIN_X) + (z * COS_X);
_local11 = (_local2 * COS_Y) - (_local5 * SIN_Y);
_local10 = _local7;
_local1 = (_local2 * SIN_Y) + (_local5 * COS_Y);
_local9 = _local11 / _local1;
_local8 = _local10 / _local1;
outVec.x = (_local9 * DISP_SCALE) + DISP_CENTER_X;
outVec.y = ((-_local8) * DISP_SCALE) + DISP_CENTER_Y;
outVec.z = _local1;
}
function calcPositionWithSize(x, y, z, height, outVec) {
var _local9;
var _local8;
var _local2;
var _local1;
var _local6;
var _local4;
var _local11;
var _local7;
x = ((x * TRANS_SCALE) + TRANS_POS_X) - CAM_PX;
y = ((y * TRANS_SCALE) + TRANS_POS_Y) - CAM_PY;
z = ((z * TRANS_SCALE) + TRANS_POS_Z) - CAM_PZ;
_local1 = x;
_local6 = (y * COS_X) + (z * SIN_X);
_local4 = ((-y) * SIN_X) + (z * COS_X);
_local9 = (_local1 * COS_Y) - (_local4 * SIN_Y);
_local8 = _local6;
_local2 = (_local1 * SIN_Y) + (_local4 * COS_Y);
_local11 = _local9 / _local2;
_local7 = _local8 / _local2;
outVec.x = (_local11 * DISP_SCALE) + DISP_CENTER_X;
outVec.y = ((-_local7) * DISP_SCALE) + DISP_CENTER_Y;
y = y + (height * TRANS_SCALE);
_local1 = x;
_local6 = (y * COS_X) + (z * SIN_X);
_local4 = ((-y) * SIN_X) + (z * COS_X);
_local9 = (_local1 * COS_Y) - (_local4 * SIN_Y);
_local8 = _local6;
_local2 = (_local1 * SIN_Y) + (_local4 * COS_Y);
_local11 = _local9 / _local2;
_local7 = _local8 / _local2;
outVec.z = outVec.y - (((-_local7) * DISP_SCALE) + DISP_CENTER_Y);
}
function getObjectMC() {
return(m_mcObject);
}
function getAdBaseMC() {
return(m_mcAdBase);
}
function setVisible(visible) {
var _local4;
var _local2;
var _local3;
var _local5;
m_visible = (m_mcBG._visible = (m_mcBase._visible = visible));
_local4 = app.enemy.MoundCatcher(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_CATCHER));
_local3 = app.enemy.MoundPitcher(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_PITCHER));
_local2 = app.enemy.MoundBatter(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_BATTER));
_local4.reset();
_local3.reset();
_local2.reset();
_local2.hide();
}
function isVisible() {
return(m_visible);
}
function setActive(active) {
m_isActive = active;
}
function initMenu(idx) {
var _local2;
m_btnMcList = [];
if (app.sys.SysInfo.__get__GameMode().isAdMode()) {
_local2 = m_mcBtn;
m_btnMcList.push({mc:_local2.AdBtn01, isLeft:false});
m_btnMcList.push({mc:_local2.AdBtn02, isLeft:true});
m_btnMcList.push({mc:_local2.AdBtn03, isLeft:false});
}
}
function hitCheck(btnIdx, x, y) {
var _local2 = m_btnMcList[btnIdx];
return(hitCheckMC(_local2, x, y));
}
function hitCheckMC(mcb, x, y) {
if (((((mcb._x - (mcb._width / 2)) <= x) && ((mcb._x + (mcb._width / 2)) >= x)) && ((mcb._y - (mcb._height / 2)) <= y)) && ((mcb._y + (mcb._height / 2)) >= y)) {
return(true);
}
return(false);
}
function onMouseDown() {
m_checkMouseClick = true;
}
function onMouseMove() {
m_checkMouseMove = true;
}
function onMouseUp() {
}
function onMouseWheel() {
}
static var CAM_PX = -35.963;
static var CAM_PY = 12.124;
static var CAM_PZ = -54.728;
static var CAM_RX = -0.00996583002888759;
static var CAM_RY = 3.0226659183589;
static var COS_X = Math.cos(CAM_RX);
static var SIN_X = Math.sin(CAM_RX);
static var COS_Y = Math.cos(CAM_RY);
static var SIN_Y = Math.sin(CAM_RY);
static var TRANS_SCALE = 0.113933069876223;
static var TRANS_POS_X = 0;
static var TRANS_POS_Y = 0;
static var TRANS_POS_Z = -485;
static var DISP_SCALE = 7260;
static var DISP_CENTER_X = 640;
static var DISP_CENTER_Y = 640;
}
Symbol 3431 MovieClip [__Packages.app.enemy.MoundJudge] Frame 0
class app.enemy.MoundJudge extends app.enemy.MoundCharacter
{
var m_baseSize, m_baseScale, m_baseHeight, m_motionMode, m_motionTime, m_motLoopTime, m_waitTime, m_anime, m_motLoopLen, m_motLoopStart, m_isMotUpdate, m_motion, m_x, m_z, m_dir, m_isPosUpdate;
function MoundJudge (context, parentMC) {
super(context, parentMC, "MoundJudgeMC", app.enemy.CharacterType.JUDGE);
initPosition();
m_baseSize = 199;
m_baseScale = 100;
m_baseHeight = 160;
m_motionMode = MOT_NONE;
m_motionTime = 0;
}
function move() {
m_motionTime = m_motionTime + app.sys.SysInfo.getRate();
switch (m_motionMode) {
case MOT_NONELOOP_LOOP :
break;
case MOT_ONELOOPWAIT_LOOP :
if (m_motionTime >= m_motLoopTime) {
m_waitTime = ANIME_TIME;
m_motionMode = MOT_ONELOOPWAIT_WAIT;
}
m_anime = Math.floor(m_motLoopStart + (((m_motLoopLen - 1) * m_motionTime) / m_motLoopTime));
m_isMotUpdate = true;
break;
case MOT_ONELOOPWAIT_WAIT :
m_waitTime = m_waitTime - app.sys.SysInfo.getRate();
if (m_waitTime < 0) {
m_motionMode = MOT_NONE;
}
break;
case MOT_NONE :
m_motion = ANI_BASE_MOT;
m_anime = 1;
m_motionMode = MOT_NONELOOP_LOOP;
m_isMotUpdate = true;
break;
case MOT_BALL :
m_motion = ANI_BALL_MOT;
m_anime = ANI_BALL_START;
m_motionTime = 0;
m_motLoopTime = ANI_BALL_TIME;
m_motLoopStart = ANI_BALL_START;
m_motLoopLen = ANI_BALL_LEN;
m_motionMode = MOT_ONELOOPWAIT_LOOP;
m_isMotUpdate = true;
break;
case MOT_STRIKE :
m_motion = ANI_STRIKE_MOT;
m_anime = ANI_STRIKE_START;
m_motionTime = 0;
m_motLoopTime = ANI_STRIKE_TIME;
m_motLoopStart = ANI_STRIKE_START;
m_motLoopLen = ANI_STRIKE_LEN;
m_motionMode = MOT_ONELOOPWAIT_LOOP;
m_isMotUpdate = true;
}
return(super.move());
}
function initPosition() {
m_x = 0;
m_z = -500;
m_motion = 1;
m_dir = 1;
m_anime = 1;
m_isMotUpdate = true;
m_isPosUpdate = true;
}
function startMotion(mot) {
m_motionMode = mot;
m_motionTime = 0;
}
function playStrike() {
startMotion(MOT_STRIKE);
}
function playBall() {
startMotion(MOT_BALL);
}
static var ANI_BASE_MOT = 1;
static var ANI_BALL_MOT = 2;
static var ANI_BALL_START = 1;
static var ANI_BALL_LEN = 8;
static var ANI_BALL_TIME = (ANI_BALL_LEN - 1) * 50;
static var ANI_STRIKE_MOT = 3;
static var ANI_STRIKE_START = 1;
static var ANI_STRIKE_LEN = 8;
static var ANI_STRIKE_TIME = (ANI_STRIKE_LEN - 1) * 50;
static var ANIME_TIME = 1000;
static var MOT_NONE = 0;
static var MOT_BALL = 10;
static var MOT_STRIKE = 20;
static var MOT_NONELOOP_LOOP = 100;
static var MOT_ONELOOPWAIT_LOOP = 110;
static var MOT_ONELOOPWAIT_WAIT = 120;
}
Symbol 3432 MovieClip [__Packages.app.enemy.MoundBall] Frame 0
class app.enemy.MoundBall extends app.enemy.Enemy
{
var m_mcBase, m_mcShadow, m_mcBall, m_dispVec1, m_dispVec2, m_baseShadowSize, m_baseShadowScale, m_baseBallSize, m_baseBallScale, m_wl, m_context;
function MoundBall (context, parentMC) {
super(context);
m_mcBase = util.MovieClipFactory.createOnMc(parentMC, "DummyMC", "Dummy");
m_mcBase._x = 0;
m_mcBase._y = 0;
m_mcBase._visible = true;
m_mcBase.stop();
m_mcShadow = util.MovieClipFactory.createOnMc(m_mcBase, "ShadowMC", "Shadow");
m_mcShadow._x = 0;
m_mcShadow._y = 0;
m_mcShadow._visible = true;
m_mcShadow.stop();
m_mcBall = util.MovieClipFactory.createOnMc(m_mcBase, "BallMC", "Ball");
m_mcBall._x = 0;
m_mcBall._y = 0;
m_mcBall._visible = true;
m_mcBall.stop();
m_dispVec1 = new util.Vector3(0, 0, 0);
m_dispVec2 = new util.Vector3(0, 0, 0);
m_baseShadowSize = m_mcShadow._width;
m_baseShadowScale = 100;
m_baseBallSize = m_mcBall._width;
m_baseBallScale = 100;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
return(true);
}
function ctrl() {
return(true);
}
function disp() {
var _local4;
_local4 = app.sys.SysInfo.__get__GameInfo().Ball;
if (_local4.isShow()) {
var _local3;
var _local2;
var _local5;
_local3 = app.sys.SysInfo.__get__GameInfo().Mound;
_local2 = _local4.getPosition();
_local5 = (_local2.y * (100 - ((_local2.z * 30) / 1844))) / 100;
_local3.calcPosition(_local2.x - (BALL_SIZE / 2), 0, _local2.z, m_dispVec1);
_local3.calcPosition(_local2.x + (BALL_SIZE / 2), 0, _local2.z, m_dispVec2);
m_mcShadow._xscale = (m_mcShadow._yscale = ((m_dispVec2.x - m_dispVec1.x) / m_baseShadowSize) * m_baseShadowScale);
m_mcBase._x = (m_dispVec2.x + m_dispVec1.x) / 2;
m_mcBase._y = m_dispVec1.y;
_local3.calcPosition(_local2.x - (BALL_SIZE / 2), _local5, _local2.z, m_dispVec1);
_local3.calcPosition(_local2.x + (BALL_SIZE / 2), _local5, _local2.z, m_dispVec2);
m_mcBall._xscale = (m_mcBall._yscale = ((m_dispVec2.x - m_dispVec1.x) / m_baseBallSize) * m_baseBallScale);
m_mcBall._x = 0;
m_mcBall._y = (m_dispVec2.y - m_mcBase._y) - (m_mcBall._height / 2);
m_mcBase._visible = true;
} else if (m_mcBase._visible) {
m_mcBase._visible = false;
}
}
function destroy() {
m_mcShadow.removeMovieClip();
m_mcBall.removeMovieClip();
m_mcBase.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
}
static var SHADOW_SIZE = 14.7;
static var BALL_SIZE = 7.2;
}
Symbol 3433 MovieClip [__Packages.app.ad.Advertisement] Frame 0
class app.ad.Advertisement
{
function Advertisement () {
}
static function open(adNum) {
var _local1 = "";
switch (adNum) {
case AD_SCOREBOARD :
_local1 = "/smae/smae_cc.php?cid=swstadium&lid=1&sid=1&uid=aHR0cDovL2RhaWtva3UuZWJpcy5uZS5qcC90cl9zZXQucGhwP2FyZ3VtZW50PXVwWHdOSHdIJmFpPTEwNjc4&rid=1456096398";
break;
case AD_MOUND :
_local1 = "/smae/smae_cc.php?cid=swstadium&lid=2&sid=1&uid=aHR0cDovL2RhaWtva3UuZWJpcy5uZS5qcC90cl9zZXQucGhwP2FyZ3VtZW50PXVwWHdOSHdIJmFpPTEwNjc5&rid=1891953192";
break;
case AD_FLAG1 :
_local1 = "/smae/smae_cc.php?cid=swstadium&lid=3&sid=1&uid=aHR0cDovL2RhaWtva3UuZWJpcy5uZS5qcC90cl9zZXQucGhwP2FyZ3VtZW50PXVwWHdOSHdIJmFpPTEwNjgw&rid=476621284";
break;
case AD_FLAG2 :
_local1 = "/smae/smae_cc.php?cid=swstadium&lid=4&sid=1&uid=aHR0cDovL2RhaWtva3UuZWJpcy5uZS5qcC90cl9zZXQucGhwP2FyZ3VtZW50PXVwWHdOSHdIJmFpPTEwNjgx&rid=148780398";
break;
case AD_FLAG3 :
_local1 = "/smae/smae_cc.php?cid=swstadium&lid=5&sid=1&uid=aHR0cDovL2RhaWtva3UuZWJpcy5uZS5qcC90cl9zZXQucGhwP2FyZ3VtZW50PXVwWHdOSHdIJmFpPTEwNjgy&rid=1948505728";
}
if (_local1 != "") {
getURL (_local1, "_blank");
}
}
static function impression(adNum) {
var _local1 = "";
var _local2;
switch (adNum) {
case AD_SCOREBOARD :
_local1 = "/smae/smae_imp.php?cid=swstadium&lid=1&sid=0&rid=776349246";
break;
case AD_MOUND :
_local1 = "/smae/smae_imp.php?cid=swstadium&lid=2&sid=0&rid=294023293";
break;
case AD_FLAG1 :
_local1 = "/smae/smae_imp.php?cid=swstadium&lid=3&sid=0&rid=2112067143";
break;
case AD_FLAG2 :
_local1 = "/smae/smae_imp.php?cid=swstadium&lid=4&sid=0&rid=1763597058";
break;
case AD_FLAG3 :
_local1 = "/smae/smae_imp.php?cid=swstadium&lid=5&sid=0&rid=354633138";
}
if (_local1 != "") {
_local2 = new LoadVars();
_local2.load(_local1);
}
}
static var AD_SCOREBOARD = 1;
static var AD_MOUND = 2;
static var AD_FLAG1 = 3;
static var AD_FLAG2 = 4;
static var AD_FLAG3 = 5;
static var AD_FLAG = 10;
static var AD_FLAG_NUM = 3;
}
Symbol 3434 MovieClip [__Packages.app.enemy.Message] Frame 0
class app.enemy.Message extends app.enemy.Enemy
{
var m_mcMenu, m_context, m_isUpdate, m_count, m_wl, m_strNumber;
function Message (context, mcName) {
super(context);
m_mcMenu = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, mcName, mcName, m_context.getBase());
m_mcMenu._x = 164;
m_mcMenu._y = 440;
m_mcMenu.cacheAsBitmap = true;
m_mcMenu._visible = false;
m_mcMenu.Str.stop();
m_isUpdate = false;
m_count = -1;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
if (m_count >= 0) {
m_count = m_count + app.sys.SysInfo.getRate();
if (m_count > FADE_TIME) {
m_count = -1;
}
m_isUpdate = true;
}
return(true);
}
function ctrl() {
return(true);
}
function disp() {
if (m_isUpdate) {
var _local3;
var _local2;
var _local4;
if (m_count >= 0) {
if (m_count < IN_TIME) {
_local3 = util.Util.calcTween(-MOVE_X, DISP_X, m_count / IN_SPAN, 100);
_local2 = DISP_Y;
_local4 = 100;
} else if (m_count < DISP_TIME) {
_local3 = DISP_X;
_local2 = DISP_Y;
_local4 = 100;
} else if (m_count < FADE_TIME) {
_local3 = DISP_X;
_local2 = DISP_Y;
_local4 = ((FADE_TIME - m_count) * 100) / FADE_SPAN;
} else {
_local3 = DISP_X;
_local2 = DISP_Y;
_local4 = 0;
}
m_mcMenu._x = _local3;
m_mcMenu._y = _local2;
m_mcMenu._alpha = _local4;
m_mcMenu.Str.gotoAndStop(m_strNumber);
m_mcMenu._visible = true;
} else {
m_mcMenu._visible = false;
}
m_isUpdate = false;
}
}
function destroy() {
m_mcMenu.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
function play(strNumber) {
m_strNumber = strNumber;
m_count = 0;
}
static var IN_TIME = 250;
static var IN_SPAN = 250;
static var DISP_TIME = 750;
static var DISP_SPAN = 500;
static var FADE_TIME = 1000;
static var FADE_SPAN = 250;
static var DISP_X = 0;
static var DISP_Y = 430;
static var MOVE_X = 400;
static var PITCHER_STRAIGHT = 1;
static var PITCHER_CURVE = 2;
static var PITCHER_SHOOT = 3;
static var PITCHER_FORK = 4;
static var BATTER_STRIKE = 1;
static var BATTER_BALL = 2;
static var RESULT_FOUL = 1;
static var RESULT_OUT = 2;
static var RESULT_SAFE = 3;
static var RESULT_FOURBALLS = 4;
static var RESULT_POINT = 5;
static var MSG_STRIKE = 1;
static var MSG_OUT = 2;
static var MSG_SAFE = 3;
static var MSG_CHANGE = 4;
static var MSG_HIT = 5;
static var MSG_FOUL = 6;
}
Symbol 3435 MovieClip [__Packages.app.sys.Cursor] Frame 0
class app.sys.Cursor extends sys.WorkItem
{
var m_isShow, m_nextShow, m_isUpdate, m_cursorList, m_curIdx, m_nextIdx, m_count, m_wl, m_isReverse;
function Cursor () {
super();
}
function init() {
m_isShow = false;
m_nextShow = false;
m_isUpdate = false;
m_cursorList = [];
m_curIdx = 0;
m_nextIdx = -1;
m_count = 0;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this);
}
function move() {
m_count++;
return(true);
}
function ctrl() {
return(true);
}
function disp() {
var _local3;
if (m_isUpdate) {
m_isShow = m_nextShow;
_local3 = m_cursorList[m_curIdx];
if (m_isShow) {
Mouse.hide();
if (m_curIdx != m_nextIdx) {
_local3._visible = false;
m_curIdx = m_nextIdx;
_local3 = m_cursorList[m_curIdx];
}
_local3._visible = true;
_local3._x = _root._xmouse;
_local3._y = _root._ymouse;
_local3._xscale = (m_isReverse ? -100 : 100);
_local3.gotoAndStop((m_count % _local3._totalframes) + 1);
} else {
Mouse.show();
_local3._visible = false;
}
m_nextShow = false;
m_isUpdate = false;
}
}
function destroy() {
var _local3;
var _local2;
Mouse.show();
_local2 = 0;
while (_local2 < m_cursorList.length) {
_local3 = m_cursorList[_local2];
_local3.removeMovieClip();
_local2++;
}
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
function regist(idx, mcid) {
var _local2;
_local2 = util.MovieClipFactory.create(app.sys.Screen.OT_SYSTEM, mcid, "Cursor");
_local2.stop();
_local2._visible = false;
m_cursorList[idx] = _local2;
}
function show(idx, isReverse) {
if (arguments.length < 2) {
isReverse = false;
}
if (arguments.length < 1) {
idx = 0;
}
if (m_curIdx != idx) {
m_nextIdx = idx;
m_count = 0;
}
m_isReverse = isReverse;
m_nextShow = true;
m_isUpdate = true;
}
function hide() {
m_isUpdate = true;
}
function isShow() {
return(m_isShow);
}
}
Symbol 3436 MovieClip [__Packages.app.sys.SysInfo] Frame 0
class app.sys.SysInfo
{
static var m_isPause, m_isRacePause, m_isRacePauseNext, m_perRate, m_isStart, m_frameRate, m_nowStage, m_lastStage, m_nowCourse, m_incCourse, m_lastCourse, m_courseList, m_nowLoop, m_lastLoop, m_scoreStage, m_scoreTotal;
function SysInfo () {
}
static function initFirst() {
Option.load();
setStart(false);
m_isPause = false;
m_isRacePause = false;
m_isRacePauseNext = false;
}
static function initGame() {
clearScore();
initLoopNum();
GameInfo.initGame();
}
static function continueGameLoop() {
clearScore();
}
static function initLoop() {
initStageNum();
initCourseNum();
initCourseList();
}
static function initStage() {
updateSelectCourseNum();
clearStageScore();
setRacePause(false);
}
static function clearStage() {
updateCourseList();
updateStageCourseNum();
incStageNum();
updateScore();
}
static function endGame() {
saveCourseNum();
saveStageNum();
saveLoop();
Option.save();
}
static function clearGame() {
incLoopNum();
}
static function reset() {
}
static function move() {
m_totalCount = m_totalCount + m_perRate;
checkPause();
if (!isPause()) {
updateRacePause();
if (isStart()) {
if (!isRacePause()) {
}
}
}
}
static function disp() {
if (Debug.isActive()) {
}
}
static function checkPause() {
}
static function isPause() {
return(m_isPause);
}
static function isStart() {
return(m_isStart);
}
static function setStart(flag) {
m_isStart = flag;
}
static function getRate() {
return(m_perRate);
}
static function getFrameRate() {
return(m_frameRate);
}
static function getSpeed() {
return(getRate());
}
static function setFrameRate(rate) {
m_frameRate = rate;
m_perRate = 1000 / rate;
}
static function initStageNum() {
m_nowStage = 1;
m_lastStage = 1;
}
static function getStageNum() {
return(m_nowStage);
}
static function incStageNum() {
m_nowStage++;
}
static function continueStageNum() {
m_nowStage = m_lastStage;
}
static function saveStageNum() {
m_lastStage = m_nowStage;
}
static function isLastStage() {
return(m_nowStage >= STAGE_MAX);
}
static function initCourseNum() {
m_nowCourse = 1;
}
static function getCourseNum() {
return(m_nowCourse);
}
static function setNextCourse(incCourse) {
m_incCourse = incCourse;
}
static function updateStageCourseNum() {
m_nowCourse = m_nowCourse + m_nowStage;
}
static function updateSelectCourseNum() {
m_nowCourse = m_nowCourse + m_incCourse;
}
static function continueCourseNum() {
m_nowCourse = m_lastCourse;
}
static function saveCourseNum() {
m_lastCourse = m_nowCourse;
}
static function initCourseList() {
m_courseList = [];
}
static function updateCourseList() {
m_courseList.push(m_nowCourse);
}
static function getCourseList() {
return(m_courseList);
}
static function initLoopNum() {
m_nowLoop = 1;
}
static function incLoopNum() {
m_nowLoop++;
if (m_nowLoop > LOOP_DISP_MAX) {
m_nowLoop = LOOP_DISP_MAX;
}
}
static function getLoop() {
return(m_nowLoop);
}
static function continueLoop() {
m_nowLoop = m_lastLoop;
}
static function saveLoop() {
m_lastLoop = m_nowLoop;
}
static function isContinue() {
return(m_lastCourse >= 0);
}
static function setRacePause(isPause) {
m_isRacePauseNext = isPause;
}
static function isRacePause() {
return(m_isRacePause);
}
static function updateRacePause() {
if (m_isRacePause != m_isRacePauseNext) {
m_isRacePause = m_isRacePauseNext;
}
}
static function setScore(score) {
m_scoreStage = score;
if ((m_scoreTotal + m_scoreStage) > 9999999999) {
m_scoreStage = 9999999999 - m_scoreTotal;
}
}
static function addScore(score) {
m_scoreStage = m_scoreStage + score;
if ((m_scoreTotal + m_scoreStage) > 9999999999) {
m_scoreStage = 9999999999 - m_scoreTotal;
}
}
static function getScore() {
return(m_scoreTotal + m_scoreStage);
}
static function getStageScore() {
return(m_scoreStage);
}
static function clearScore() {
m_scoreTotal = 0;
m_scoreStage = 0;
}
static function clearStageScore() {
m_scoreStage = 0;
}
static function updateScore() {
m_scoreTotal = m_scoreTotal + m_scoreStage;
m_scoreStage = 0;
}
static function getTotalCount() {
return(m_totalCount);
}
static function updateAttr() {
m_attr++;
m_WorkList.setAttr(m_attr);
}
static function getAttr() {
return(m_attr);
}
static function get WorkList() {
return(m_WorkList);
}
static function get SceneGraph() {
return(m_SceneGraph);
}
static function get Debug() {
return(m_Debug);
}
static function get SoundManager() {
return(m_SoundManager);
}
static function get Option() {
return(m_Option);
}
static function get GameMode() {
return(m_GameMode);
}
static function get Collision() {
return(m_Collision);
}
static function get Cursor() {
return(m_Cursor);
}
static function get GameInfo() {
return(m_GameInfo);
}
static function get GameControl() {
return(m_GameControl);
}
static var m_WorkList = new sys.WorkList();
static var m_SceneGraph = new app.sys.SceneGraph();
static var m_Debug = new app.sys.Debug();
static var m_SoundManager = new sys.SoundManager();
static var m_Option = new app.sys.Option();
static var m_GameMode = new app.sys.GameMode();
static var m_Collision = new app.sys.Collision();
static var m_Cursor = new app.sys.Cursor();
static var m_GameInfo = new app.sys.GameInfo();
static var m_GameControl = new app.sys.GameControl();
static var m_attr = 0;
static var m_totalCount = 0;
static var ONE = 960;
static var LOOP_MAX = 1;
static var LOOP_DISP_MAX = 1;
static var STAGE_MAX = 1;
}
Symbol 3437 MovieClip [__Packages.app.BaseBall] Frame 0
class app.BaseBall
{
var m_mode, m_fpsManager, m_flowObject, m_oldFlowObject, m_context;
function BaseBall () {
m_mode = AFM_START;
}
function init() {
var _local3;
util.MovieClipFactory.init();
util.MovieClipFactory.append(_root, app.sys.Screen.OT_TOP_NUM);
_local3 = util.MovieClipFactory.create(app.sys.Screen.OT_GAME, "NoMaskMC", "MASK");
util.MovieClipFactory.append(_local3.dummy, app.sys.Screen.OT_SCREEN_NUM);
_local3._visible = true;
_local3 = util.MovieClipFactory.get(app.sys.Screen.OT_SCREEN + 0);
util.MovieClipFactory.append(_local3, app.sys.Screen.OT_GAME_NUM);
_local3 = util.MovieClipFactory.get(app.sys.Screen.OT_SCREEN + 1);
util.MovieClipFactory.append(_local3, app.sys.Screen.OT_GAME_NUM);
util.MovieClipFactory.setBasePosition(app.sys.Screen.OT_BACKGROUND);
util.MovieClipFactory.setBaseNumber(app.sys.Screen.OT_GAME_NUM);
util.MovieClipFactory.setGroupPos(app.sys.Screen.OT_SCREEN);
util.MovieClipFactory.reset();
app.sys.SysInfo.setFrameRate(20);
app.sys.SysInfo.initFirst();
app.sys.SysInfo.__get__SoundManager().setRate(app.sys.SysInfo.getRate());
app.sys.SysInfo.__get__SoundManager().setData(app.data.SoundResource.getSoundData());
app.sys.SysInfo.__get__SoundManager().setSEEnable(app.sys.SysInfo.__get__Option().__get__Se());
app.sys.SysInfo.__get__SoundManager().setBGMEnable(app.sys.SysInfo.__get__Option().__get__Bgm());
var _local4 = false;
app.sys.SysInfo.__get__Debug().init(0, app.sys.Screen.HEIGHT);
app.sys.SysInfo.__get__Debug().setActive(_local4);
app.sys.SysInfo.__get__Debug().setVisible(_local4);
if (_local4) {
}
m_fpsManager = new sys.FpsManager(app.sys.SysInfo.getFrameRate());
app.sys.SysInfo.__get__Cursor().init();
app.sys.SysInfo.__get__Cursor().regist(app.enemy.CursorType.NORMAL_IDX, app.enemy.CursorType.NORMAL_MCID);
app.sys.SysInfo.__get__Cursor().regist(app.enemy.CursorType.BATTER_IDX, app.enemy.CursorType.BATTER_MCID);
m_flowObject = undefined;
m_oldFlowObject = undefined;
_root._quality = "HIGH";
m_context = new app.sys.Context(app.sys.SysInfo.getAttr(), util.MovieClipFactory.getBase());
app.sys.SysInfo.__get__GameInfo().__set__Ball(new app.enemy.Ball(m_context));
app.sys.SysInfo.__get__GameInfo().__set__Ground(new app.enemy.Ground(m_context));
app.sys.SysInfo.__get__GameInfo().__set__Mound(new app.enemy.Mound(m_context));
}
function move() {
var _local2;
var _local3;
_local2 = m_mode;
do {
_local3 = false;
switch (_local2) {
case AFM_START :
app.sys.SysInfo.initGame();
_local2 = AFM_GAME;
_local2 = AFM_TITLE;
_local3 = true;
break;
case AFM_TITLE :
app.sys.SysInfo.updateAttr();
m_oldFlowObject = m_flowObject;
m_flowObject = new app.flow.TitleFlow(m_oldFlowObject);
m_fpsManager.reset();
_local2 = AFM_TITLE_LOOP;
_local3 = true;
break;
case AFM_TITLE_LOOP :
if (moveFlowObject()) {
switch (m_flowObject.getResult()) {
case app.sys.SceneGraph.EID_FLOW_NEXT :
app.sys.SysInfo.initGame();
_local2 = AFM_TEAMSELECT;
_local3 = true;
break;
default :
trace("GameMain Result Error");
}
m_flowObject.destroy();
m_flowObject = undefined;
}
break;
case AFM_TEAMSELECT :
app.sys.SysInfo.updateAttr();
m_oldFlowObject = m_flowObject;
m_flowObject = new app.flow.TeamSelectFlow(m_oldFlowObject);
m_fpsManager.reset();
_local2 = AFM_TEAMSELECT_LOOP;
_local3 = true;
break;
case AFM_TEAMSELECT_LOOP :
if (moveFlowObject()) {
switch (m_flowObject.getResult()) {
case app.sys.SceneGraph.EID_FLOW_NEXT :
_local2 = AFM_GAME;
_local3 = true;
break;
default :
trace("GameMain Result Error");
}
m_flowObject.destroy();
m_flowObject = undefined;
}
break;
case AFM_GAME :
app.sys.SysInfo.initStage();
app.sys.SysInfo.updateAttr();
m_oldFlowObject = m_flowObject;
m_flowObject = new app.flow.GameFlow(m_oldFlowObject);
m_fpsManager.reset();
_local2 = AFM_GAME_LOOP;
_local3 = true;
break;
case AFM_GAME_LOOP :
if (moveFlowObject()) {
trace("RaceResult:" + m_flowObject.getResult());
switch (m_flowObject.getResult()) {
case app.sys.SceneGraph.EID_FLOW_STAGECLEAR :
app.sys.SysInfo.clearStage();
_local2 = AFM_TITLE;
_local3 = true;
break;
case app.sys.SceneGraph.EID_FLOW_GAMEOVER :
app.sys.SysInfo.clearStage();
_local2 = AFM_TITLE;
_local3 = true;
break;
default :
trace("GameMain Result Error");
}
m_flowObject.destroy();
m_flowObject = undefined;
}
break;
default :
trace("Error Mode:" + _local2);
}
} while (_local3);
m_mode = _local2;
}
function moveFlowObject() {
var _local3 = m_flowObject.getMode();
app.sys.SysInfo.__get__Debug().reset();
app.sys.SysInfo.move();
if (app.sys.SysInfo.isPause() != m_fpsManager.isPause()) {
m_fpsManager.pause();
}
if (!app.sys.SysInfo.isPause()) {
var _local2;
var _local4 = getTimer();
_local2 = m_fpsManager.getLoopCount();
while (_local2 > 0) {
app.sys.SysInfo.__get__SoundManager().move();
m_flowObject.move(_local3);
_local2--;
}
app.sys.SysInfo.__get__Debug().output(("ScriptTime: " + (getTimer() - _local4)) + "ms");
}
m_flowObject.disp(_local3);
app.sys.SysInfo.__get__Debug().disp();
return(m_flowObject.isEnd());
}
static var AFM_START = 0;
static var AFM_TITLE = 100;
static var AFM_TITLE_LOOP = 101;
static var AFM_TEAMSELECT = 150;
static var AFM_TEAMSELECT_LOOP = 151;
static var AFM_GAME = 200;
static var AFM_GAME_LOOP = 201;
}
Symbol 3438 MovieClip [__Packages.sys.FpsManager] Frame 0
class sys.FpsManager
{
var m_fps, m_lastTime, m_pause, m_resetFlag;
function FpsManager (fps) {
m_fps = fps;
m_lastTime = getTimer();
m_pause = false;
m_resetFlag = false;
}
function getLoopCount() {
var _local3;
var _local4;
var _local2;
_local3 = getTimer();
_local4 = _local3 - m_lastTime;
if ((!m_resetFlag) && (_local4 >= (1000 / m_fps))) {
_local2 = Math.floor(_local4 / (1000 / m_fps));
} else {
_local2 = 1;
}
if (_local2 > 4) {
_local2 = 4;
m_lastTime = _local3;
} else {
m_lastTime = m_lastTime + ((1000 / m_fps) * _local2);
if (Math.abs(m_lastTime - _local3) < ((1000 / m_fps) / 10)) {
m_lastTime = _local3;
}
}
if (m_resetFlag) {
m_lastTime = _local3;
m_resetFlag = false;
}
return(_local2);
}
function pause() {
if (m_pause) {
m_lastTime = getTimer();
}
m_pause = !m_pause;
}
function isPause() {
return(m_pause);
}
function reset() {
m_resetFlag = true;
}
}
Symbol 3439 MovieClip [__Packages.app.data.SoundResource] Frame 0
class app.data.SoundResource
{
function SoundResource () {
}
static function getSoundData() {
return(SoundData);
}
static var SoundData = {Bat:[{id:"SE_Bat", vol:50, loop:1}], BatHit1:[{id:"Se_BatHit1", vol:50, loop:1}], BatHit2:[{id:"Se_BatHit2", vol:50, loop:1}], Banto:[{id:"SE_Banto", vol:50, loop:1}], HomeRun:[{id:"SE_HomeRun", vol:50, loop:1}], Bound:[{id:"SE_Bound", vol:50, loop:1}], Run:[{id:"SE_Run", vol:5, loop:0}], Throw:[{id:"SE_Throw", vol:100, loop:1}], Point:[{id:"SE_Point", vol:50, loop:1}], Catch1:[{id:"SE_Catch1", vol:50, loop:1}], Catch2:[{id:"SE_Catch2", vol:50, loop:1}], Mitt:[{id:"SE_Mitt", vol:100, loop:1}], MoveMenu:[{id:"SE_MoveMenu", vol:30, loop:1}], SelectMenu:[{id:"SE_SelectMenu", vol:30, loop:1}], Cheer:[{id:"SE_Cheer", vol:50, loop:99999}, {id:"SE_Cheer", vol:50, loop:0}], Taiko1:[{id:"SE_Taiko1", vol:50, loop:99999}, {id:"SE_Taiko1", vol:50, loop:0}], Taiko2:[{id:"SE_Taiko2", vol:50, loop:99999}, {id:"SE_Taiko2", vol:50, loop:0}], VoiceBall:[{id:"SE_Voice_Ball", vol:50, loop:1}], VoiceBatterOut:[{id:"SE_Voice_BatterOut", vol:50, loop:1}], VoiceFoul:[{id:"SE_Voice_Foul", vol:50, loop:1}], VoiceFourBalls:[{id:"SE_Voice_FourBalls", vol:50, loop:1}], VoiceHomeRun:[{id:"SE_Voice_HomeRun", vol:50, loop:1}], VoiceOut:[{id:"SE_Voice_Out", vol:50, loop:1}], VoiceSafe:[{id:"SE_Voice_Safe", vol:50, loop:1}], VoiceStrike:[{id:"SE_Voice_Strike", vol:50, loop:1}], BGM_Change:[{id:"BGM_Change", vol:40, loop:1}], BGM_Opening:[{id:"BGM_Opening", vol:50, loop:1}], End:{}};
}
Symbol 3440 MovieClip [__Packages.app.enemy.CursorType] Frame 0
class app.enemy.CursorType
{
function CursorType () {
}
static var NORMAL_IDX = 0;
static var BATTER_IDX = 1;
static var NORMAL_MCID = "CursorMC";
static var BATTER_MCID = "BantoCursorMC";
}
Symbol 3441 MovieClip [__Packages.app.flow.TitleFlow] Frame 0
class app.flow.TitleFlow extends app.flow.Flow implements app.sys.SceneGraphListener
{
var m_context, m_isDestroy, m_result;
function TitleFlow (preFlow) {
super(app.flow.Flow.FM_GAME, preFlow);
app.sys.SysInfo.__get__SceneGraph().init(m_context);
app.sys.SysInfo.__get__SceneGraph().addListener(this);
app.sys.SysInfo.__get__SceneGraph().setScene([]);
util.MovieClipFactory.setHighDepth(false);
new app.loop.TitleLoop(m_context, this, preFlow);
}
function move(mode) {
app.sys.SysInfo.__get__WorkList().callMove();
app.sys.SysInfo.__get__WorkList().callCtrl();
}
function disp(mode) {
app.sys.SysInfo.disp();
app.sys.SysInfo.__get__WorkList().callDisp();
}
function destroy() {
trace("TitleFlow::Destory");
app.sys.SysInfo.__get__SceneGraph().removeListener(this);
app.sys.SysInfo.__get__SceneGraph().destroy();
app.sys.SysInfo.__get__WorkList().callDestroyByAttr(m_context.getAttr());
m_isDestroy = true;
}
function onSceneGraphEvent(eventID, param) {
if (eventID == app.sys.SceneGraph.EID_FLOW_NEXT) {
m_result = eventID;
}
}
}
Symbol 3442 MovieClip [__Packages.app.loop.Loop] Frame 0
class app.loop.Loop extends app.enemy.Enemy
{
function Loop (context, nowFlow, preFlow) {
super(context);
}
}
Symbol 3443 MovieClip [__Packages.app.loop.TitleLoop] Frame 0
class app.loop.TitleLoop extends app.loop.Loop
{
var m_mode, m_wl, m_context, m_checkMouseClick, m_checkMouseMove, m_checkMouseWheel, m_menuSEID, m_mainMenuIdx, m_mcMenu, m_bgmID, m_curMenuIdx, m_count, m_isSelectUpdate, m_isShowMenu, m_isMenuUpdate, m_menuAction, m_mcSubMenu, m_manualPage, m_menuMC, m_btnMcList, m_btnShowMcList;
function TitleLoop (context, nowFlow, preFlow) {
super(context, nowFlow, preFlow);
m_mode = MD_START;
Mouse.addListener(this);
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
m_checkMouseClick = false;
m_checkMouseMove = false;
m_checkMouseWheel = 0;
m_menuSEID = -1;
}
function move() {
var _local4;
do {
_local4 = false;
switch (m_mode) {
case MD_START :
m_mainMenuIdx = TITLE_START;
m_mcMenu = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "TitleMainMC", "TitleMain", m_context.getBase());
m_mcMenu._x = app.sys.Screen.WIDTH / 2;
m_mcMenu._y = app.sys.Screen.HEIGHT / 2;
m_mcMenu.gotoAndStop(1);
m_mcMenu._visible = true;
app.sys.SysInfo.__get__GameInfo().__get__Ground().setVisible(true);
app.sys.SysInfo.__get__GameInfo().__get__Mound().setVisible(false);
app.sys.SysInfo.__get__GameInfo().__get__Ground().setFixedMode();
app.sys.SysInfo.__get__GameInfo().__get__Ground().setCenterPosition(0, 0, 4000);
app.sys.SysInfo.__get__GameInfo().__get__Ground().setScale(100);
m_bgmID = app.sys.SysInfo.__get__SoundManager().playBGM("BGM_Opening");
_root.m_bgmID = m_bgmID;
m_mode = MD_MAIN_ACT;
_local4 = true;
break;
case MD_MAIN_ACT :
m_curMenuIdx = MENU_MAIN;
initMenu(m_curMenuIdx);
checkHideMenu(m_curMenuIdx);
m_count = 0;
m_isSelectUpdate = true;
m_isShowMenu = true;
m_isMenuUpdate = true;
m_checkMouseMove = true;
m_mode = MD_MAIN_ACT_WAIT;
_local4 = true;
break;
case MD_MAIN_ACT_WAIT :
var _local5 = m_mainMenuIdx;
if (moveMenu()) {
switch (m_menuAction) {
case ACT_MOVE :
playMove();
break;
case ACT_ENTER :
switch (m_mainMenuIdx) {
case TITLE_START :
playSelect();
app.sys.SysInfo.__get__Cursor().hide();
m_mode = MD_END;
app.sys.SysInfo.__get__SceneGraph().onEvent(app.sys.SceneGraph.EID_FLOW_NEXT, undefined);
break;
case TITLE_MANUAL :
playSelect();
app.sys.SysInfo.__get__Cursor().hide();
m_mode = MD_MANUAL_ACT;
_local4 = true;
}
}
}
if (_local5 != m_mainMenuIdx) {
m_isSelectUpdate = true;
}
break;
case MD_MANUAL_ACT :
m_mcSubMenu = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "ManualMainMC", "ManualMain", m_context.getBase());
m_mcSubMenu._x = app.sys.Screen.WIDTH / 2;
m_mcSubMenu._y = app.sys.Screen.HEIGHT / 2;
m_mcSubMenu.gotoAndStop(1);
m_mcSubMenu.Manual.gotoAndStop(1);
m_mcSubMenu._visible = true;
m_curMenuIdx = MENU_MANUAL;
m_manualPage = 0;
initMenu(m_curMenuIdx);
checkHideMenu(m_curMenuIdx);
m_mainMenuIdx = MANUAL_TITLE;
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
m_checkMouseMove = true;
m_mode = MD_MANUAL_ACT_WAIT;
break;
case MD_MANUAL_ACT_WAIT :
_local5 = m_mainMenuIdx;
if (moveMenu()) {
switch (m_menuAction) {
case ACT_MOVE :
playMove();
break;
case ACT_NEXT :
if (m_manualPage < MANPAGE_MAX) {
playSelect();
m_manualPage++;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
checkHideMenu(m_curMenuIdx);
}
break;
case ACT_PREV :
if (m_manualPage > 0) {
playSelect();
m_manualPage--;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
checkHideMenu(m_curMenuIdx);
}
break;
case ACT_ENTER :
switch (m_mainMenuIdx) {
case MANUAL_PITCHER :
playSelect();
m_manualPage = MANPAGE_PITCHER;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
checkHideMenu(m_curMenuIdx);
break;
case MANUAL_BATTER :
playSelect();
m_manualPage = MANPAGE_BATTER;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
checkHideMenu(m_curMenuIdx);
break;
case MANUAL_DEFENSE :
playSelect();
m_manualPage = MANPAGE_DEFENSE;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
checkHideMenu(m_curMenuIdx);
break;
case MANUAL_RUNNER :
playSelect();
m_manualPage = MANPAGE_RUNNER;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
checkHideMenu(m_curMenuIdx);
break;
case MANUAL_WIN :
playSelect();
m_manualPage = MANPAGE_WIN;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
checkHideMenu(m_curMenuIdx);
break;
case MANUAL_CREDIT :
playSelect();
m_manualPage = MANPAGE_CREDIT;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
checkHideMenu(m_curMenuIdx);
break;
case MANUAL_INDEX :
playSelect();
m_manualPage = MANPAGE_INDEX;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
checkHideMenu(m_curMenuIdx);
break;
case MANUAL_PREV :
playSelect();
m_manualPage--;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
checkHideMenu(m_curMenuIdx);
break;
case MANUAL_NEXT :
playSelect();
m_manualPage++;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
checkHideMenu(m_curMenuIdx);
break;
case MANUAL_TITLE :
playSelect();
app.sys.SysInfo.__get__Cursor().hide();
m_mcSubMenu.removeMovieClip();
m_mainMenuIdx = TITLE_MANUAL;
m_mode = MD_MAIN_ACT;
_local4 = true;
}
}
}
if (_local5 == m_mainMenuIdx) {
break;
}
m_isSelectUpdate = true;
}
} while (_local4);
m_checkMouseClick = false;
m_checkMouseMove = false;
m_checkMouseWheel = 0;
return(super.move());
}
function moveMenu() {
m_menuAction = ACT_NONE;
if (m_checkMouseMove || (m_checkMouseClick)) {
var _local2;
var _local4;
var _local7;
var _local10;
var _local9;
var _local5;
var _local3;
var _local8;
var _local6;
_local10 = m_menuMC._xmouse;
_local9 = m_menuMC._ymouse;
_local4 = -1;
_local8 = {x:_local10, y:_local9};
m_menuMC.localToGlobal(_local8);
_local6 = {};
_local7 = -1;
_local5 = CHANGE_NONE;
_local2 = m_btnMcList.length - 1;
while (_local2 >= 0) {
_local3 = m_btnMcList[_local2];
if (m_btnShowMcList[_local2]) {
if ((_local3.onmc != undefined) && (_local3.offmc != undefined)) {
if (hitCheckMC(_local3.onmc, _local10, _local9)) {
app.sys.SysInfo.__get__Cursor().show();
_local5 = ACT_ON;
_local4 = _local2;
_local7 = 0;
break;
}
if (hitCheckMC(_local3.offmc, _local10, _local9)) {
app.sys.SysInfo.__get__Cursor().show();
_local5 = ACT_OFF;
_local4 = _local2;
_local7 = 1;
break;
}
} else {
_local6.x = _local8.x;
_local6.y = _local8.y;
if (hitCheckMCGlobal(_local3.mc, _local6)) {
app.sys.SysInfo.__get__Cursor().show();
_local5 = ACT_ENTER;
_local4 = _local2;
_local7 = 0;
break;
}
}
}
_local2--;
}
if (_local4 != -1) {
if (m_checkMouseClick) {
m_menuAction = _local5;
} else if (m_mainMenuIdx != _local4) {
m_menuAction = ACT_MOVE;
}
} else {
app.sys.SysInfo.__get__Cursor().hide();
}
m_mainMenuIdx = _local4;
}
if (m_checkMouseWheel != 0) {
if (m_checkMouseWheel < 0) {
m_menuAction = ACT_NEXT;
} else {
m_menuAction = ACT_PREV;
}
}
return(m_menuAction != ACT_NONE);
}
function disp() {
var _local3;
switch (m_curMenuIdx) {
case MENU_MAIN :
if (m_isMenuUpdate) {
_local3 = m_mcMenu;
showMenu(m_isShowMenu);
m_isMenuUpdate = false;
}
if (m_isSelectUpdate) {
selectMenu(m_mainMenuIdx);
m_isSelectUpdate = false;
}
break;
case MENU_MANUAL :
if (m_isMenuUpdate) {
_local3 = m_mcSubMenu;
_local3.Manual.gotoAndStop(m_manualPage + 1);
showMenu(m_isShowMenu);
m_isMenuUpdate = false;
}
if (!m_isSelectUpdate) {
break;
}
selectMenu(m_mainMenuIdx);
m_isSelectUpdate = false;
}
super.disp();
}
function destroy() {
app.sys.SysInfo.__get__Cursor().hide();
Mouse.removeListener(this);
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
m_mcMenu.removeMovieClip();
super.destroy();
}
function playMove() {
if (m_menuSEID != -1) {
app.sys.SysInfo.__get__SoundManager().stop(m_menuSEID);
}
m_menuSEID = app.sys.SysInfo.__get__SoundManager().playSE("MoveMenu");
}
function playSelect() {
app.sys.SysInfo.__get__SoundManager().playSE("SelectMenu");
}
function initMenu(idx) {
var _local2;
m_btnMcList = [];
switch (idx) {
case MENU_MAIN :
_local2 = m_mcMenu;
_local2.StartBtn.stop();
_local2.ManualBtn.stop();
m_btnMcList.push({mc:_local2.StartBtn});
m_btnMcList.push({mc:_local2.ManualBtn});
m_menuMC = _local2;
break;
case MENU_MANUAL :
_local2 = m_mcSubMenu;
_local2.TitleBtn.stop();
_local2.Manual.stop();
_local2.Manual.PitcherBtn.stop();
_local2.Manual.BatterBtn.stop();
_local2.Manual.DefenseBtn.stop();
_local2.Manual.RunnerBtn.stop();
_local2.Manual.WinBtn.stop();
_local2.Manual.CreditBtn.stop();
_local2.Manual.IndexBtn.stop();
_local2.Manual.PrevBtn.stop();
_local2.Manual.NextBtn.stop();
m_btnMcList.push({mc:_local2.Manual.PitcherBtn});
m_btnMcList.push({mc:_local2.Manual.BatterBtn});
m_btnMcList.push({mc:_local2.Manual.DefenseBtn});
m_btnMcList.push({mc:_local2.Manual.RunnerBtn});
m_btnMcList.push({mc:_local2.Manual.WinBtn});
m_btnMcList.push({mc:_local2.Manual.CreditBtn});
m_btnMcList.push({mc:_local2.Manual.IndexBtn});
m_btnMcList.push({mc:_local2.Manual.PrevBtn});
m_btnMcList.push({mc:_local2.Manual.NextBtn});
m_btnMcList.push({mc:_local2.TitleBtn});
m_menuMC = _local2;
}
}
function checkHideMenu(idx) {
var _local2;
m_btnShowMcList = [];
switch (idx) {
case MENU_MAIN :
m_btnShowMcList.push(true);
m_btnShowMcList.push(true);
break;
case MENU_MANUAL :
m_btnShowMcList.push(m_manualPage == 0);
m_btnShowMcList.push(m_manualPage == 0);
m_btnShowMcList.push(m_manualPage == 0);
m_btnShowMcList.push(m_manualPage == 0);
m_btnShowMcList.push(m_manualPage == 0);
m_btnShowMcList.push(m_manualPage == 0);
m_btnShowMcList.push(m_manualPage != 0);
m_btnShowMcList.push(m_manualPage > 0);
m_btnShowMcList.push(m_manualPage < MANPAGE_MAX);
m_btnShowMcList.push(true);
}
}
function showMenu(isShow) {
var _local2;
var _local3;
_local2 = m_btnShowMcList.length - 1;
while (_local2 >= 0) {
_local3 = m_btnMcList[_local2];
if ((_local3.onmc != undefined) && (_local3.offmc != undefined)) {
_local3.onmc._visible = m_btnShowMcList[_local2] && (isShow);
_local3.offmc._visible = m_btnShowMcList[_local2] && (isShow);
} else {
_local3.mc._visible = m_btnShowMcList[_local2] && (isShow);
}
_local2--;
}
}
function selectMenu(idx) {
var _local2;
var _local3;
_local2 = m_btnShowMcList.length - 1;
while (_local2 >= 0) {
_local3 = m_btnMcList[_local2];
_local3.mc.gotoAndStop(((_local2 == idx) ? 2 : 1));
_local2--;
}
}
function hitCheck(btnIdx, x, y) {
var _local2 = m_btnMcList[btnIdx];
return(m_btnShowMcList[btnIdx] && (hitCheckMC(_local2, x, y)));
}
function updateBtn(mc, rollmc, x, y) {
var _local2 = hitCheckMC(mc, x, y);
rollmc._visible = _local2;
return(_local2);
}
function hitCheckMC(mcb, x, y) {
if (((((mcb._x - (mcb._width / 2)) <= x) && ((mcb._x + (mcb._width / 2)) >= x)) && ((mcb._y - (mcb._height / 2)) <= y)) && ((mcb._y + (mcb._height / 2)) >= y)) {
return(true);
}
return(false);
}
function hitCheckGlobal(btnIdx, pt) {
var _local2 = m_btnMcList[btnIdx];
return(hitCheckMCGlobal(_local2, pt));
}
function hitCheckMCGlobal(mcb, pt) {
var _local3;
var _local4;
mcb.globalToLocal(pt);
_local3 = mcb._width * (100 / mcb._xscale);
if ((((-_local3) / 2) <= pt.x) && ((_local3 / 2) >= pt.x)) {
_local4 = mcb._height * (100 / mcb._yscale);
if ((((-_local4) / 2) <= pt.y) && ((_local4 / 2) >= pt.y)) {
return(true);
}
}
return(false);
}
function onMouseDown() {
m_checkMouseClick = true;
}
function onMouseMove() {
m_checkMouseMove = true;
}
function onMouseUp() {
}
function onMouseWheel(delta) {
m_checkMouseWheel = delta;
}
static var MD_START = 0;
static var MD_MAIN_ACT = 12;
static var MD_MAIN_ACT_WAIT = 13;
static var MD_MANUAL_ACT = 32;
static var MD_MANUAL_ACT_WAIT = 33;
static var MD_END = 99;
static var MENU_MAIN = 0;
static var MENU_MANUAL = 1;
static var TITLE_START = 0;
static var TITLE_MANUAL = 1;
static var TITLE_MAX = 1;
static var MANUAL_PITCHER = 0;
static var MANUAL_BATTER = 1;
static var MANUAL_DEFENSE = 2;
static var MANUAL_RUNNER = 3;
static var MANUAL_WIN = 4;
static var MANUAL_CREDIT = 5;
static var MANUAL_INDEX = 6;
static var MANUAL_PREV = 7;
static var MANUAL_NEXT = 8;
static var MANUAL_TITLE = 9;
static var MANPAGE_INDEX = 0;
static var MANPAGE_PITCHER = 1;
static var MANPAGE_BATTER = 2;
static var MANPAGE_DEFENSE = 3;
static var MANPAGE_RUNNER = 4;
static var MANPAGE_WIN = 5;
static var MANPAGE_CREDIT = 6;
static var MANPAGE_MAX = 6;
static var CHANGE_NONE = 0;
static var CHANGE_ON = 1;
static var CHANGE_OFF = 2;
static var CHANGE_CHANGE = 3;
static var CHANGE_ENTER = 4;
static var ACT_NONE = 0;
static var ACT_ON = 1;
static var ACT_OFF = 2;
static var ACT_CHANGE = 3;
static var ACT_ENTER = 4;
static var ACT_MOVE = 5;
static var ACT_NEXT = 6;
static var ACT_PREV = 7;
}
Symbol 3444 MovieClip [__Packages.app.flow.TeamSelectFlow] Frame 0
class app.flow.TeamSelectFlow extends app.flow.Flow implements app.sys.SceneGraphListener
{
var m_context, m_isDestroy, m_result;
function TeamSelectFlow (preFlow) {
super(app.flow.Flow.FM_GAME, preFlow);
app.sys.SysInfo.__get__SceneGraph().init(m_context);
app.sys.SysInfo.__get__SceneGraph().addListener(this);
app.sys.SysInfo.__get__SceneGraph().setScene([]);
util.MovieClipFactory.setHighDepth(false);
new app.loop.TeamSelectLoop(m_context, this, preFlow);
}
function move(mode) {
app.sys.SysInfo.__get__WorkList().callMove();
app.sys.SysInfo.__get__WorkList().callCtrl();
}
function disp(mode) {
app.sys.SysInfo.disp();
app.sys.SysInfo.__get__WorkList().callDisp();
}
function destroy() {
trace("TeamSelectFlow::Destory");
app.sys.SysInfo.__get__SceneGraph().removeListener(this);
app.sys.SysInfo.__get__SceneGraph().destroy();
app.sys.SysInfo.__get__WorkList().callDestroyByAttr(m_context.getAttr());
m_isDestroy = true;
}
function onSceneGraphEvent(eventID, param) {
if (eventID == app.sys.SceneGraph.EID_FLOW_NEXT) {
m_result = eventID;
}
}
}
Symbol 3445 MovieClip [__Packages.app.loop.TeamSelectLoop] Frame 0
class app.loop.TeamSelectLoop extends app.loop.Loop
{
var m_mode, m_wl, m_context, m_isTeam, m_isAttack, m_checkMouseClick, m_checkMouseMove, m_menuSEID, m_mainMenuIdx, m_mcMenu, m_curMenuIdx, m_count, m_isSelectUpdate, m_isShowMenu, m_isMenuUpdate, m_menuAction, m_menuMC, m_btnMcList, m_btnShowMcList;
function TeamSelectLoop (context, nowFlow, preFlow) {
super(context, nowFlow, preFlow);
m_mode = MD_START;
Mouse.addListener(this);
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
m_isTeam = true;
m_isAttack = true;
m_checkMouseClick = false;
m_checkMouseMove = false;
m_menuSEID = -1;
}
function move() {
var _local8;
do {
_local8 = false;
switch (m_mode) {
case MD_START :
m_mainMenuIdx = SELECT_TEAM;
m_mcMenu = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "TeamSelectMC", "TeamSelect", m_context.getBase());
m_mcMenu._x = app.sys.Screen.WIDTH / 2;
m_mcMenu._y = app.sys.Screen.HEIGHT / 2;
m_mcMenu.gotoAndStop(1);
m_mcMenu._visible = true;
app.sys.SysInfo.__get__GameInfo().__get__Ground().setVisible(true);
app.sys.SysInfo.__get__GameInfo().__get__Mound().setVisible(false);
app.sys.SysInfo.__get__GameInfo().__get__Ground().setFixedMode();
app.sys.SysInfo.__get__GameInfo().__get__Ground().setCenterPosition(0, 0, 4000);
app.sys.SysInfo.__get__GameInfo().__get__Ground().setScale(100);
m_mode = MD_MAIN_ACT;
_local8 = true;
break;
case MD_MAIN_ACT :
m_curMenuIdx = MENU_MAIN;
initMenu(m_curMenuIdx);
m_count = 0;
m_isSelectUpdate = true;
m_isShowMenu = true;
m_isMenuUpdate = true;
m_checkMouseMove = true;
m_mode = MD_MAIN_ACT_WAIT;
_local8 = true;
break;
case MD_MAIN_ACT_WAIT :
var _local9 = m_mainMenuIdx;
if (moveMenu()) {
switch (m_menuAction) {
case ACT_MOVE :
playMove();
break;
case ACT_ENTER :
switch (m_mainMenuIdx) {
case SELECT_TEAM :
playSelect();
m_isTeam = !m_isTeam;
m_isMenuUpdate = true;
break;
case SELECT_ATTACK :
playSelect();
m_isAttack = !m_isAttack;
m_isMenuUpdate = true;
break;
case SELECT_PLAY :
var _local7;
var _local4;
var _local6;
var _local5;
playSelect();
app.sys.SysInfo.__get__Cursor().hide();
if (m_isTeam) {
_local7 = "S";
_local6 = 1;
_local4 = "W";
_local5 = 2;
} else {
_local7 = "W";
_local6 = 2;
_local4 = "S";
_local5 = 1;
}
app.sys.SysInfo.__get__GameInfo().setIsPlayerFirst(m_isAttack);
if (m_isAttack) {
app.sys.SysInfo.__get__GameInfo().setTeamStringFirst(_local7);
app.sys.SysInfo.__get__GameInfo().setTeamNumberFirst(_local6);
app.sys.SysInfo.__get__GameInfo().setTeamStringLast(_local4);
app.sys.SysInfo.__get__GameInfo().setTeamNumberLast(_local5);
} else {
app.sys.SysInfo.__get__GameInfo().setTeamStringLast(_local7);
app.sys.SysInfo.__get__GameInfo().setTeamNumberLast(_local6);
app.sys.SysInfo.__get__GameInfo().setTeamStringFirst(_local4);
app.sys.SysInfo.__get__GameInfo().setTeamNumberFirst(_local5);
}
app.sys.SysInfo.__get__SoundManager().stop(_root.m_bgmID);
app.sys.SysInfo.__get__SceneGraph().onEvent(app.sys.SceneGraph.EID_FLOW_NEXT, undefined);
m_mode = MD_END;
}
}
}
if (_local9 == m_mainMenuIdx) {
break;
}
m_isSelectUpdate = true;
}
} while (_local8);
m_checkMouseClick = false;
m_checkMouseMove = false;
return(super.move());
}
function moveMenu() {
m_menuAction = ACT_NONE;
if (m_checkMouseMove || (m_checkMouseClick)) {
var _local2;
var _local4;
var _local6;
var _local8;
var _local7;
var _local5;
var _local3;
_local8 = m_menuMC._xmouse;
_local7 = m_menuMC._ymouse;
_local4 = -1;
_local6 = -1;
_local5 = CHANGE_NONE;
_local2 = m_btnMcList.length - 1;
while (_local2 >= 0) {
_local3 = m_btnMcList[_local2];
if ((_local3.onmc != undefined) && (_local3.offmc != undefined)) {
if (hitCheckMC(_local3.onmc, _local8, _local7)) {
app.sys.SysInfo.__get__Cursor().show();
_local5 = ACT_ON;
_local4 = _local2;
_local6 = 0;
break;
}
if (hitCheckMC(_local3.offmc, _local8, _local7)) {
app.sys.SysInfo.__get__Cursor().show();
_local5 = ACT_OFF;
_local4 = _local2;
_local6 = 1;
break;
}
} else if (hitCheckMC(_local3.mc, _local8, _local7)) {
app.sys.SysInfo.__get__Cursor().show();
_local5 = ACT_ENTER;
_local4 = _local2;
_local6 = 0;
break;
}
_local2--;
}
if (_local4 != -1) {
if (m_checkMouseClick) {
m_menuAction = _local5;
} else if (m_mainMenuIdx != _local4) {
m_menuAction = ACT_MOVE;
}
} else {
app.sys.SysInfo.__get__Cursor().hide();
}
m_mainMenuIdx = _local4;
}
return(m_menuAction != ACT_NONE);
}
function disp() {
var _local3;
if (!(m_curMenuIdx === MENU_MAIN)) {
} else {
if (m_isMenuUpdate) {
_local3 = m_mcMenu;
_local3.TeamPlayer.gotoAndStop((m_isTeam ? 1 : 2));
_local3.TeamCPU.gotoAndStop((m_isTeam ? 2 : 1));
_local3.AttackPlayer.gotoAndStop((m_isAttack ? 1 : 2));
_local3.AttackCPU.gotoAndStop((m_isAttack ? 2 : 1));
showMenu(m_isShowMenu);
m_isMenuUpdate = false;
}
if (m_isSelectUpdate) {
selectMenu(m_mainMenuIdx);
m_isSelectUpdate = false;
}
}
super.disp();
}
function destroy() {
app.sys.SysInfo.__get__Cursor().hide();
Mouse.removeListener(this);
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
m_mcMenu.removeMovieClip();
super.destroy();
}
function playMove() {
if (m_menuSEID != -1) {
app.sys.SysInfo.__get__SoundManager().stop(m_menuSEID);
}
m_menuSEID = app.sys.SysInfo.__get__SoundManager().playSE("MoveMenu");
}
function playSelect() {
app.sys.SysInfo.__get__SoundManager().playSE("SelectMenu");
}
function initMenu(idx) {
var _local2;
m_btnMcList = [];
m_btnShowMcList = [];
if (!(idx === MENU_MAIN)) {
} else {
_local2 = m_mcMenu;
_local2.StartBtn.stop();
_local2.ManualBtn.stop();
m_btnMcList.push({mc:_local2.TeamChangeBtn});
m_btnMcList.push({mc:_local2.AttackChangeBtn});
m_btnMcList.push({mc:_local2.PlayBallBtn});
m_btnShowMcList.push(true);
m_btnShowMcList.push(true);
m_btnShowMcList.push(true);
m_menuMC = _local2;
}
}
function showMenu(isShow) {
var _local2;
var _local3;
_local2 = m_btnShowMcList.length - 1;
while (_local2 >= 0) {
_local3 = m_btnMcList[_local2];
if ((_local3.onmc != undefined) && (_local3.offmc != undefined)) {
_local3.onmc._visible = m_btnShowMcList[_local2] && (isShow);
_local3.offmc._visible = m_btnShowMcList[_local2] && (isShow);
} else {
_local3.mc._visible = m_btnShowMcList[_local2] && (isShow);
}
_local2--;
}
}
function selectMenu(idx) {
var _local2;
var _local3;
_local2 = m_btnShowMcList.length - 1;
while (_local2 >= 0) {
_local3 = m_btnMcList[_local2];
_local3.mc.gotoAndStop(((_local2 == idx) ? 2 : 1));
_local2--;
}
}
function hitCheck(btnIdx, x, y) {
var _local2 = m_btnMcList[btnIdx];
return(m_btnShowMcList[btnIdx] && (hitCheckMC(_local2, x, y)));
}
function updateBtn(mc, rollmc, x, y) {
var _local2 = hitCheckMC(mc, x, y);
rollmc._visible = _local2;
return(_local2);
}
function hitCheckMC(mcb, x, y) {
if (((((mcb._x - (mcb._width / 2)) <= x) && ((mcb._x + (mcb._width / 2)) >= x)) && ((mcb._y - (mcb._height / 2)) <= y)) && ((mcb._y + (mcb._height / 2)) >= y)) {
return(true);
}
return(false);
}
function onMouseDown() {
m_checkMouseClick = true;
}
function onMouseMove() {
m_checkMouseMove = true;
}
function onMouseUp() {
}
function onMouseWheel() {
}
static var MD_START = 0;
static var MD_MAIN_ACT = 12;
static var MD_MAIN_ACT_WAIT = 13;
static var MD_MANUAL_ACT = 32;
static var MD_MANUAL_ACT_WAIT = 33;
static var MD_END = 99;
static var MENU_MAIN = 0;
static var SELECT_TEAM = 0;
static var SELECT_ATTACK = 1;
static var SELECT_PLAY = 2;
static var SELECT_MAX = 2;
static var CHANGE_NONE = 0;
static var CHANGE_ON = 1;
static var CHANGE_OFF = 2;
static var CHANGE_CHANGE = 3;
static var CHANGE_ENTER = 4;
static var ACT_NONE = 0;
static var ACT_ON = 1;
static var ACT_OFF = 2;
static var ACT_CHANGE = 3;
static var ACT_ENTER = 4;
static var ACT_MOVE = 5;
}
Symbol 3446 MovieClip [__Packages.app.flow.GameFlow] Frame 0
class app.flow.GameFlow extends app.flow.Flow implements app.sys.SceneGraphListener
{
var m_context, m_isDestroy, m_result;
function GameFlow (preFlow) {
super(app.flow.Flow.FM_GAME, preFlow);
app.sys.SysInfo.__get__SceneGraph().init(m_context);
app.sys.SysInfo.__get__SceneGraph().addListener(this);
app.sys.SysInfo.__get__SceneGraph().setScene([]);
util.MovieClipFactory.setHighDepth(false);
new app.loop.GameLoop(m_context, this, preFlow);
}
function move(mode) {
app.sys.SysInfo.__get__WorkList().callMove();
app.sys.SysInfo.__get__Collision().hitCheck();
app.sys.SysInfo.__get__WorkList().callCtrl();
}
function disp(mode) {
app.sys.SysInfo.disp();
app.sys.SysInfo.__get__WorkList().callDisp();
}
function destroy() {
trace("GameFlow::Destory");
app.sys.SysInfo.__get__WorkList().callDestroyByAttr(m_context.getAttr());
m_isDestroy = true;
}
function onSceneGraphEvent(eventID, param) {
if ((eventID == app.sys.SceneGraph.EID_FLOW_GAMEOVER) || (eventID == app.sys.SceneGraph.EID_FLOW_STAGECLEAR)) {
trace("EVENT:" + eventID);
m_result = eventID;
}
}
}
Symbol 3447 MovieClip [__Packages.app.loop.GameLoop] Frame 0
class app.loop.GameLoop extends app.loop.Loop
{
var m_mode, m_count, m_mainMenuIdx, m_checkMouseClick, m_checkMouseMove, m_wl, m_context, m_ball, m_ground, m_mound, m_gameInfoDisplay, m_messagePitcher, m_messageBatter, m_messageResult, m_messageScore, m_recordBoard, m_messageBig, m_mcMenu, m_curMenuIdx, m_isShowMenu, m_isMenuUpdate, m_isSelectUpdate, m_menuAction, m_gameMode, m_isAdCheck, m_resultGameEnd, m_resultFirstWin, m_resultDraw, m_cheerGirlLoop, m_offenseUser, m_defenseUser, m_bonusGameLoop, m_mcResult, m_mcGameSet, m_confetti, m_mcBase, m_nowPoint, m_isNewBatter, m_isChange, m_isHit, m_isSteal, m_curOutCount, m_homerunCount, m_messageWait, m_groundEndCount, m_homerunMessage, m_btnMcList, m_menuSEID, m_bgseID, m_bgseStr, m_btnShowMcList;
function GameLoop (context, nowFlow, preFlow) {
super(context, nowFlow, preFlow);
m_mode = MD_INIT;
m_count = 0;
m_mainMenuIdx = MENU_GAME;
m_checkMouseClick = false;
m_checkMouseMove = false;
util.Quality.setMiddle();
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
var _local3;
do {
_local3 = false;
switch (m_mode) {
case MD_INIT :
var _local6;
var _local7;
m_ball = app.sys.SysInfo.__get__GameInfo().Ball;
m_ground = app.sys.SysInfo.__get__GameInfo().Ground;
m_mound = app.sys.SysInfo.__get__GameInfo().Mound;
m_gameInfoDisplay = new app.enemy.GameInfoDisplay(m_context);
m_messagePitcher = new app.enemy.Message(m_context, "MessagePitcherMC");
m_messageBatter = new app.enemy.Message(m_context, "MessageBatterMC");
m_messageResult = new app.enemy.Message(m_context, "MessageResultMC");
m_messageScore = new app.enemy.ScoreMessage(m_context);
m_recordBoard = new app.enemy.RecordBoard(m_context);
m_messageBig = new app.enemy.BigMessage(m_context);
_local6 = new app.enemy.ActionPlayer(m_context);
_local7 = new app.enemy.ActionComputer(m_context);
_local6.setOpponent(_local7);
_local7.setOpponent(_local6);
if (app.sys.SysInfo.__get__GameInfo().isPlayerFirst()) {
app.sys.SysInfo.__get__GameInfo().setUserFirst(_local6);
app.sys.SysInfo.__get__GameInfo().setUserLast(_local7);
} else {
app.sys.SysInfo.__get__GameInfo().setUserFirst(_local7);
app.sys.SysInfo.__get__GameInfo().setUserLast(_local6);
}
if (app.sys.SysInfo.__get__Debug().isActive()) {
if (Key.isDown("F".charCodeAt(0))) {
var _local4 = 1;
while (_local4 <= 8) {
app.sys.SysInfo.__get__GameInfo().initInning();
app.sys.SysInfo.__get__GameInfo().setScore(10);
app.sys.SysInfo.__get__GameInfo().change();
app.sys.SysInfo.__get__GameInfo().setScore(10);
app.sys.SysInfo.__get__GameInfo().change();
app.sys.SysInfo.__get__GameInfo().nextInning();
_local4++;
}
} else if (Key.isDown("L".charCodeAt(0))) {
var _local4 = 1;
while (_local4 <= 8) {
app.sys.SysInfo.__get__GameInfo().initInning();
app.sys.SysInfo.__get__GameInfo().setScore(10);
app.sys.SysInfo.__get__GameInfo().change();
app.sys.SysInfo.__get__GameInfo().setScore(10 + ((_local4 == 8) ? 1 : 0));
app.sys.SysInfo.__get__GameInfo().change();
app.sys.SysInfo.__get__GameInfo().nextInning();
_local4++;
}
}
}
m_ground.setLast(false);
m_ground.updateBoard();
app.sys.SysInfo.setStart(false);
m_mode = MD_START_GAME;
_local3 = true;
break;
case MD_START_GAME :
m_mcMenu = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "NextMenuMC", "NextMenu", m_context.getBase());
m_mcMenu._x = app.sys.Screen.WIDTH / 2;
m_mcMenu._y = app.sys.Screen.HEIGHT / 2;
m_mcMenu.gotoAndStop(1);
m_mcMenu._visible = true;
m_gameInfoDisplay.setVisible(false);
m_recordBoard.update();
m_recordBoard.setVisible(true);
m_ground.setFixedMode();
m_ground.setCenterPosition(0, 0, 13600);
m_ground.setScale(200);
m_ground.setVisible(true);
m_mound.setVisible(false);
m_curMenuIdx = MENU_NEXT;
initMenu(m_curMenuIdx);
m_mainMenuIdx = MENUNEXT_NEXT;
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
if (app.sys.SysInfo.__get__GameMode().isAdMode()) {
app.ad.Advertisement.impression(app.ad.Advertisement.AD_SCOREBOARD);
}
Mouse.addListener(this);
app.sys.SysInfo.__get__SoundManager().playBGM("BGM_Change");
m_checkMouseMove = true;
m_mode = MD_START_GAME_WAIT;
_local3 = true;
break;
case MD_START_GAME_WAIT :
var _local12 = m_mainMenuIdx;
if (moveMenu()) {
switch (m_menuAction) {
case ACT_MOVE :
playMove();
break;
case ACT_ENTER :
playSelect();
switch (m_mainMenuIdx) {
case MENUNEXT_AD :
app.ad.Advertisement.open(app.ad.Advertisement.AD_SCOREBOARD);
break;
case MENUNEXT_NEXT :
app.sys.SysInfo.__get__Cursor().hide();
m_mcMenu.removeMovieClip();
m_recordBoard.setVisible(false);
Mouse.removeListener(this);
m_mode = MD_INNING;
}
}
}
if (_local12 != m_mainMenuIdx) {
m_isSelectUpdate = true;
}
break;
case MD_INNING :
app.sys.SysInfo.__get__GameInfo().initInning();
m_gameInfoDisplay.setVisible(true);
m_recordBoard.setVisible(false);
m_mode = MD_GAME;
_local3 = true;
break;
case MD_BOTTOM :
m_gameInfoDisplay.setVisible(true);
m_recordBoard.setVisible(false);
m_mode = MD_GAME;
_local3 = true;
break;
case MD_GAME :
m_curMenuIdx = MENU_GAME;
m_gameMode = GM_START;
m_mode = MD_GAME_WAIT;
_local3 = true;
break;
case MD_GAME_WAIT :
if (moveGame()) {
m_isAdCheck = true;
if (app.sys.SysInfo.__get__GameMode().isAdMode()) {
app.ad.Advertisement.impression(app.ad.Advertisement.AD_SCOREBOARD);
}
m_mode = MD_CHANGE;
_local3 = true;
}
break;
case MD_CHANGE :
m_mcMenu = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "NextMenuMC", "NextMenu", m_context.getBase());
m_mcMenu._x = app.sys.Screen.WIDTH / 2;
m_mcMenu._y = app.sys.Screen.HEIGHT / 2;
m_mcMenu.gotoAndStop(1);
m_mcMenu._visible = true;
m_gameInfoDisplay.setVisible(false);
m_recordBoard.update();
m_recordBoard.setVisible(true);
m_ground.setFixedMode();
m_ground.setCenterPosition(0, 0, 13600);
m_ground.setScale(200);
m_ground.updateBoard();
m_ground.setVisible(true);
m_mound.setVisible(false);
var _local11;
var _local9;
var _local8;
m_resultGameEnd = false;
m_resultFirstWin = false;
m_resultDraw = false;
_local11 = app.sys.SysInfo.__get__GameInfo().getInning();
_local9 = app.sys.SysInfo.__get__GameInfo().getTotalScoreFirst();
_local8 = app.sys.SysInfo.__get__GameInfo().getTotalScoreLast();
if (app.sys.SysInfo.__get__GameInfo().isFirst()) {
if (_local11 >= 9) {
if (_local9 < _local8) {
m_resultGameEnd = true;
m_resultFirstWin = false;
}
}
} else if (_local11 >= 9) {
if (_local9 > _local8) {
m_resultFirstWin = true;
m_resultGameEnd = true;
} else if (_local9 < _local8) {
m_resultFirstWin = false;
m_resultGameEnd = true;
} else if (_local11 >= MAX_INNING) {
m_resultDraw = true;
m_resultGameEnd = true;
}
}
if (m_resultGameEnd && (m_isAdCheck)) {
m_ground.setLast(true);
m_ground.updateBoard();
}
m_curMenuIdx = MENU_NEXT;
initMenu(m_curMenuIdx);
m_mainMenuIdx = MENUNEXT_NEXT;
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
Mouse.addListener(this);
app.sys.SysInfo.__get__SoundManager().playBGM("BGM_Change");
m_checkMouseMove = true;
m_mode = MD_CHANGE_WAIT;
_local3 = true;
break;
case MD_CHANGE_WAIT :
_local12 = m_mainMenuIdx;
if (moveMenu()) {
switch (m_menuAction) {
case ACT_MOVE :
playMove();
break;
case ACT_ENTER :
playSelect();
switch (m_mainMenuIdx) {
case MENUNEXT_AD :
app.ad.Advertisement.open(app.ad.Advertisement.AD_SCOREBOARD);
break;
case MENUNEXT_NEXT :
if (m_resultGameEnd && (m_isAdCheck)) {
if (m_resultDraw) {
m_mode = MD_DRAW;
} else {
m_resultFirstWin = (app.sys.SysInfo.__get__GameInfo().isPlayerFirst() ? (m_resultFirstWin) : (!m_resultFirstWin));
if (m_resultFirstWin) {
m_mode = MD_WIN;
} else {
m_mode = MD_LOSE;
}
}
} else if (app.sys.SysInfo.__get__GameInfo().isFirst()) {
app.sys.SysInfo.__get__GameInfo().change();
m_mode = MD_BOTTOM;
} else if (m_isAdCheck) {
m_mode = MD_ADCHECK;
} else {
app.sys.SysInfo.__get__GameInfo().change();
app.sys.SysInfo.__get__GameInfo().nextInning();
m_mode = MD_INNING;
}
m_mcMenu.removeMovieClip();
app.sys.SysInfo.__get__Cursor().hide();
Mouse.removeListener(this);
m_recordBoard.setVisible(false);
}
}
}
if (_local12 != m_mainMenuIdx) {
m_isSelectUpdate = true;
}
break;
case MD_ADCHECK :
_local11 = app.sys.SysInfo.__get__GameInfo().getInning();
if (((_local11 % 3) == 0) && (app.sys.SysInfo.__get__GameMode().isAdMode())) {
m_mode = MD_BONUS;
} else if (_local11 == 4) {
m_mode = MD_CHEERGIRL;
} else {
app.sys.SysInfo.__get__GameInfo().change();
app.sys.SysInfo.__get__GameInfo().nextInning();
m_mode = MD_INNING;
}
if (app.sys.SysInfo.__get__Debug().isActive()) {
if (Key.isDown("G".charCodeAt(0))) {
m_mode = MD_CHEERGIRL;
}
if (Key.isDown("B".charCodeAt(0))) {
m_mode = MD_BONUS;
}
}
m_isAdCheck = false;
_local3 = true;
break;
case MD_CHEERGIRL :
var _local5;
m_ground.setFixedMode();
m_ground.setCenterPosition(0, 0, 3700);
m_ground.setScale(300);
m_ground.setVisible(true);
m_mound.setVisible(false);
app.sys.SysInfo.__get__Cursor().hide();
_local5 = app.sys.SysInfo.__get__GameInfo().getGroundCharacterList();
var _local4 = _local5.length - 1;
while (_local4 >= 0) {
_local5[_local4].hide();
_local4--;
}
_local5 = app.sys.SysInfo.__get__GameInfo().getMoundCharacterList();
_local4 = _local5.length - 1;
while (_local4 >= 0) {
_local5[_local4].hide();
_local4--;
}
app.sys.SysInfo.__get__Cursor().hide();
m_cheerGirlLoop = new app.loop.CheerGirlLoop(m_context);
app.sys.SysInfo.__get__SoundManager().playSE("HomeRun");
m_mode = MD_CHEERGIRL_LOOP;
_local3 = true;
break;
case MD_CHEERGIRL_LOOP :
if (!m_cheerGirlLoop.move()) {
m_cheerGirlLoop.destroy();
_local5 = app.sys.SysInfo.__get__GameInfo().getGroundCharacterList();
_local4 = _local5.length - 1;
while (_local4 >= 0) {
_local5[_local4].show();
_local4--;
}
_local5 = app.sys.SysInfo.__get__GameInfo().getMoundCharacterList();
_local4 = _local5.length - 1;
while (_local4 >= 0) {
_local5[_local4].show();
_local4--;
}
app.sys.SysInfo.__get__Cursor().hide();
m_mode = MD_CHANGE;
_local3 = true;
}
break;
case MD_BONUS :
var _local10;
m_ground.setVisible(false);
m_mound.setVisible(true);
m_offenseUser.noneMode();
m_defenseUser.noneMode();
m_ball.hide();
m_ball.clearHit();
_local5 = app.sys.SysInfo.__get__GameInfo().getMoundCharacterList();
_local5[app.enemy.CharacterType.MOUND_CATCHER].hide();
_local5[app.enemy.CharacterType.MOUND_JUDGE].hide();
_local5[app.enemy.CharacterType.MOUND_PITCHER].show();
if (app.sys.SysInfo.__get__GameInfo().isPlayerFirst()) {
_local5[app.enemy.CharacterType.MOUND_PITCHER].setTeam(app.sys.SysInfo.__get__GameInfo().getTeamNumberFirst());
_local10 = app.sys.SysInfo.__get__GameInfo().getTeamNumberFirst();
} else {
_local5[app.enemy.CharacterType.MOUND_PITCHER].setTeam(app.sys.SysInfo.__get__GameInfo().getTeamNumberLast());
_local10 = app.sys.SysInfo.__get__GameInfo().getTeamNumberLast();
}
app.sys.SysInfo.__get__Cursor().hide();
if (_local10 == 1) {
playBgSE("Taiko1");
} else {
playBgSE("Taiko2");
}
m_bonusGameLoop = new app.loop.BonusGameLoop(m_context, m_gameInfoDisplay);
m_mode = MD_BONUS_LOOP;
_local3 = true;
break;
case MD_BONUS_LOOP :
if (!m_bonusGameLoop.move()) {
m_bonusGameLoop.destroy();
_local5 = app.sys.SysInfo.__get__GameInfo().getMoundCharacterList();
_local4 = _local5.length - 1;
while (_local4 >= 0) {
_local5[_local4].show();
_local4--;
}
app.sys.SysInfo.__get__GameInfo().__get__Ground().updateBoard();
app.sys.SysInfo.__get__Cursor().hide();
stopBgSE();
m_mode = MD_CHANGE;
_local3 = true;
}
break;
case MD_WIN :
m_mcMenu = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "ResultMenuMC", "ResultMenu", m_context.getBase());
m_mcMenu._x = app.sys.Screen.WIDTH / 2;
m_mcMenu._y = app.sys.Screen.HEIGHT / 2;
m_mcMenu.gotoAndStop(1);
m_mcMenu._visible = true;
m_mcResult = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "ResultMC", "ResultMenu", m_context.getBase());
m_mcResult._x = app.sys.Screen.WIDTH / 2;
m_mcResult._y = 364;
m_mcResult.gotoAndStop(1);
m_mcResult._visible = true;
m_mcGameSet = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "GameSetMC", "ResultMenu", m_context.getBase());
m_mcGameSet._x = app.sys.Screen.WIDTH / 2;
m_mcGameSet._y = 143;
m_mcGameSet._xscale = (m_mcGameSet._yscale = 438.7);
m_mcGameSet.gotoAndStop(1);
m_mcGameSet._visible = true;
m_gameInfoDisplay.setVisible(false);
m_confetti = new app.enemy.Confetti(m_context, 30);
m_recordBoard.setVisible(false);
m_ground.setFixedMode();
m_ground.setCenterPosition(0, 0, 13600);
m_ground.setScale(200);
m_curMenuIdx = MENU_TITLE;
initMenu(m_curMenuIdx);
m_mainMenuIdx = MENUTITLE_TITLE;
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
Mouse.addListener(this);
m_checkMouseMove = true;
m_mode = MD_WIN_WAIT;
_local3 = true;
break;
case MD_WIN_WAIT :
_local12 = m_mainMenuIdx;
if (moveMenu()) {
switch (m_menuAction) {
case ACT_MOVE :
playMove();
break;
case ACT_ENTER :
playSelect();
switch (m_mainMenuIdx) {
case MENUTITLE_AD :
app.ad.Advertisement.open(app.ad.Advertisement.AD_SCOREBOARD);
break;
case MENUTITLE_TITLE :
app.sys.SysInfo.__get__Cursor().hide();
m_mcMenu.removeMovieClip();
m_mcResult.removeMovieClip();
m_mcGameSet.removeMovieClip();
m_confetti.destroy();
Mouse.removeListener(this);
app.sys.SysInfo.__get__SceneGraph().onEvent(app.sys.SceneGraph.EID_FLOW_STAGECLEAR, undefined);
m_mode = MD_GAMEEND;
_local3 = true;
}
}
}
if (_local12 != m_mainMenuIdx) {
m_isSelectUpdate = true;
}
break;
case MD_LOSE :
m_mcMenu = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "ResultMenuMC", "ResultMenu", m_context.getBase());
m_mcMenu._x = app.sys.Screen.WIDTH / 2;
m_mcMenu._y = app.sys.Screen.HEIGHT / 2;
m_mcMenu.gotoAndStop(1);
m_mcMenu._visible = true;
m_mcResult = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "ResultMC", "ResultMenu", m_context.getBase());
m_mcResult._x = app.sys.Screen.WIDTH / 2;
m_mcResult._y = 364;
m_mcResult.gotoAndStop(2);
m_mcResult._visible = true;
m_mcGameSet = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "GameSetMC", "ResultMenu", m_context.getBase());
m_mcGameSet._x = app.sys.Screen.WIDTH / 2;
m_mcGameSet._y = 143;
m_mcGameSet._xscale = (m_mcGameSet._yscale = 438.7);
m_mcGameSet.gotoAndStop(1);
m_mcGameSet._visible = true;
m_gameInfoDisplay.setVisible(false);
m_recordBoard.setVisible(false);
m_ground.setFixedMode();
m_ground.setCenterPosition(0, 0, 13600);
m_ground.setScale(200);
m_curMenuIdx = MENU_TITLE;
initMenu(m_curMenuIdx);
m_mainMenuIdx = MENUTITLE_TITLE;
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
Mouse.addListener(this);
m_checkMouseMove = true;
m_mode = MD_LOSE_WAIT;
_local3 = true;
break;
case MD_LOSE_WAIT :
_local12 = m_mainMenuIdx;
if (moveMenu()) {
switch (m_menuAction) {
case ACT_MOVE :
playMove();
break;
case ACT_ENTER :
playSelect();
switch (m_mainMenuIdx) {
case MENUTITLE_AD :
app.ad.Advertisement.open(app.ad.Advertisement.AD_SCOREBOARD);
break;
case MENUTITLE_TITLE :
app.sys.SysInfo.__get__Cursor().hide();
m_mcMenu.removeMovieClip();
m_mcResult.removeMovieClip();
m_mcGameSet.removeMovieClip();
Mouse.removeListener(this);
app.sys.SysInfo.__get__SceneGraph().onEvent(app.sys.SceneGraph.EID_FLOW_GAMEOVER, undefined);
m_mode = MD_GAMEEND;
_local3 = true;
}
}
}
if (_local12 != m_mainMenuIdx) {
m_isSelectUpdate = true;
}
break;
case MD_DRAW :
m_mcMenu = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "ResultMenuMC", "ResultMenu", m_context.getBase());
m_mcMenu._x = app.sys.Screen.WIDTH / 2;
m_mcMenu._y = app.sys.Screen.HEIGHT / 2;
m_mcMenu.gotoAndStop(1);
m_mcMenu._visible = true;
m_mcResult = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "ResultMC", "ResultMenu", m_context.getBase());
m_mcResult._x = app.sys.Screen.WIDTH / 2;
m_mcResult._y = 364;
m_mcResult.gotoAndStop(3);
m_mcResult._visible = true;
m_mcGameSet = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_BACKGROUND, "GameSetMC", "ResultMenu", m_context.getBase());
m_mcGameSet._x = app.sys.Screen.WIDTH / 2;
m_mcGameSet._y = 143;
m_mcGameSet._xscale = (m_mcGameSet._yscale = 438.7);
m_mcGameSet.gotoAndStop(1);
m_mcGameSet._visible = true;
m_gameInfoDisplay.setVisible(false);
m_recordBoard.setVisible(false);
m_ground.setFixedMode();
m_ground.setCenterPosition(0, 0, 13600);
m_ground.setScale(200);
m_curMenuIdx = MENU_TITLE;
initMenu(m_curMenuIdx);
m_mainMenuIdx = MENUTITLE_TITLE;
m_isShowMenu = true;
m_isMenuUpdate = true;
m_isSelectUpdate = true;
Mouse.addListener(this);
m_checkMouseMove = true;
m_mode = MD_DRAW_WAIT;
_local3 = true;
break;
case MD_DRAW_WAIT :
_local12 = m_mainMenuIdx;
if (moveMenu()) {
switch (m_menuAction) {
case ACT_MOVE :
playMove();
break;
case ACT_ENTER :
playSelect();
switch (m_mainMenuIdx) {
case MENUTITLE_AD :
app.ad.Advertisement.open(app.ad.Advertisement.AD_SCOREBOARD);
break;
case MENUTITLE_TITLE :
app.sys.SysInfo.__get__Cursor().hide();
m_mcMenu.removeMovieClip();
m_mcResult.removeMovieClip();
m_mcGameSet.removeMovieClip();
Mouse.removeListener(this);
app.sys.SysInfo.__get__SceneGraph().onEvent(app.sys.SceneGraph.EID_FLOW_GAMEOVER, undefined);
m_mode = MD_GAMEEND;
_local3 = true;
}
}
}
if (_local12 != m_mainMenuIdx) {
m_isSelectUpdate = true;
}
break;
case MD_GAMEEND :
m_mode = MD_END;
_local3 = true;
break;
case MD_END :
}
} while (_local3);
m_checkMouseClick = false;
m_checkMouseMove = false;
return(super.move());
}
function disp() {
var _local5;
switch (m_curMenuIdx) {
case MENU_GAME :
break;
case MENU_NEXT :
if (m_isMenuUpdate) {
_local5 = m_mcMenu;
showMenu(m_isShowMenu);
m_isMenuUpdate = false;
}
if (m_isSelectUpdate) {
selectMenu(m_mainMenuIdx);
m_isSelectUpdate = false;
}
break;
case MENU_TITLE :
if (m_isMenuUpdate) {
showMenu(m_isShowMenu);
m_isMenuUpdate = false;
}
if (!m_isSelectUpdate) {
break;
}
selectMenu(m_mainMenuIdx);
m_isSelectUpdate = false;
}
app.sys.SysInfo.__get__Debug().output("1,2,3: AddRnner B: BatterHit H: HomeRun C: FullCount");
var _local4;
var _local3;
_local4 = app.sys.SysInfo.__get__GameInfo().getDebugString();
_local3 = 0;
while (_local3 < _local4.length) {
app.sys.SysInfo.__get__Debug().output(_local4[_local3]);
_local3++;
}
super.disp();
}
function destroy() {
m_mcBase.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
super.destroy();
}
function moveGame() {
var _local31 = false;
var _local5;
var _local2 = app.sys.SysInfo.__get__GameInfo();
var _local3 = app.sys.SysInfo.__get__GameControl();
var _local9 = app.sys.SysInfo.getRate();
do {
_local5 = false;
switch (m_gameMode) {
case GM_START :
var _local16;
var _local12;
var _local11;
var _local8;
var _local4;
if (_local2.isFirst()) {
m_offenseUser = _local2.getUserFirst();
m_defenseUser = _local2.getUserLast();
_local16 = _local2.getTeamNumberFirst();
_local12 = _local2.getTeamNumberLast();
} else {
m_offenseUser = _local2.getUserLast();
m_defenseUser = _local2.getUserFirst();
_local16 = _local2.getTeamNumberLast();
_local12 = _local2.getTeamNumberFirst();
}
_local4 = app.enemy.CharacterType.GROUND_DEFENSE_START;
while (_local4 <= app.enemy.CharacterType.GROUND_DEFENSE_END) {
_local8 = _local2.getGroundCharacter(_local4);
_local8.setTeam(_local12);
_local4++;
}
_local4 = app.enemy.CharacterType.GROUND_OFFENSE_START;
while (_local4 <= app.enemy.CharacterType.GROUND_OFFENSE_END) {
_local8 = _local2.getGroundCharacter(_local4);
_local8.setTeam(_local16);
_local4++;
}
_local11 = _local2.getMoundCharacter(app.enemy.CharacterType.MOUND_CATCHER);
_local11.setTeam(_local12);
_local11 = _local2.getMoundCharacter(app.enemy.CharacterType.MOUND_PITCHER);
_local11.setTeam(_local12);
_local11 = _local2.getMoundCharacter(app.enemy.CharacterType.MOUND_BATTER);
_local11.setTeam(_local16);
m_offenseUser.startAttack();
m_defenseUser.startDefense();
m_ground.setNormalMode();
m_ground.setCenterPosition(0, 0, 0);
_local3.initStatusMessage();
_local3.initRunner();
_local3.connectRunner();
m_nowPoint = 0;
_local2.setScore(m_nowPoint);
m_isNewBatter = true;
m_isChange = false;
initBgSE();
if (app.sys.SysInfo.__get__GameMode().isAdMode()) {
app.ad.Advertisement.impression(app.ad.Advertisement.AD_MOUND);
}
m_gameMode = GM_MOUND;
_local5 = true;
break;
case GM_MOUND :
var _local27;
_local3.setStartStatus();
_local3.initBallStatus();
_local3.clearDefense();
_local3.initPositionDefense();
_local3.clearOnBaseStatus();
_local3.normalDefense();
_local3.connectRunner();
_local3.setCurrentBaseRunner();
m_ground.setVisible(false);
m_mound.setVisible(true);
m_mound.setActive(true);
m_offenseUser.setBatterMode(m_isNewBatter);
m_defenseUser.setPitcherMode();
m_ball.hide();
m_ball.clearHit();
_local27 = app.enemy.MoundBatter(_local2.getMoundCharacter(app.enemy.CharacterType.MOUND_BATTER));
_local27.show();
if (app.sys.SysInfo.__get__Debug().isActive()) {
if (Key.isDown("C".charCodeAt(0))) {
_local2.clearStrikeCount();
_local2.clearBallCount();
while (_local2.getOutCount() < 2) {
_local2.addOutCount();
}
_local2.addStrikeCount();
_local2.addStrikeCount();
_local2.addBallCount();
_local2.addBallCount();
_local2.addBallCount();
}
if (Key.isDown("1".charCodeAt(0))) {
_local3.addBaseRunner(1);
}
if (Key.isDown("2".charCodeAt(0))) {
_local3.addBaseRunner(2);
}
if (Key.isDown("3".charCodeAt(0))) {
_local3.addBaseRunner(3);
}
_local3.connectRunner();
_local3.setCurrentBaseRunner();
}
m_gameInfoDisplay.update();
m_isHit = false;
m_isSteal = false;
m_isNewBatter = false;
m_curOutCount = _local2.getOutCount();
app.sys.SysInfo.__get__Collision().setMode(app.sys.Collision.MD_MOUND);
var _local23;
if (_local2.isFirst()) {
_local23 = _local2.getTeamNumberFirst();
} else {
_local23 = _local2.getTeamNumberLast();
}
if (_local23 == 1) {
playBgSE("Taiko1");
} else {
playBgSE("Taiko2");
}
m_homerunCount = 0;
m_gameMode = GM_MOUND_WAIT;
break;
case GM_MOUND_WAIT :
if (m_defenseUser.isCheck()) {
m_isNewBatter = false;
m_gameMode = GM_GROUND_CHECK;
} else if (m_offenseUser.isHit()) {
_local3.addRunner();
_local3.connectRunner();
_local2.addAtBatCount();
playBgSE("Cheer");
m_isHit = true;
m_gameMode = GM_GROUND;
} else if (m_defenseUser.isHit()) {
var _local17 = false;
if (_local3.isMoveRunner()) {
if ((m_defenseUser.isStrike() || (m_offenseUser.isSwing())) || (m_offenseUser.isBunt())) {
if ((_local2.getStrikeCount() == 2) && (_local2.getOutCount() == 2)) {
_local17 = true;
}
} else if (_local2.getBallCount() == 3) {
_local17 = true;
}
} else {
_local17 = true;
}
if (_local17) {
app.sys.SysInfo.__get__Collision().setMode(app.sys.Collision.MD_NONE);
m_offenseUser.setFinish();
m_defenseUser.setFinish();
m_gameMode = GM_MOUND_RESULT_PITCHER;
} else {
m_isNewBatter = false;
if ((m_defenseUser.isStrike() || (m_offenseUser.isSwing())) || (m_offenseUser.isBunt())) {
if (_local2.getStrikeCount() == 2) {
new app.enemy.StatusMessage(app.enemy.Message.RESULT_OUT);
_local2.nextBatter();
_local2.addAtBatCount();
_local2.addStrikeOutCount();
m_isNewBatter = true;
} else {
_local2.addStrikeCount();
}
} else {
_local2.addBallCount();
}
m_gameMode = GM_GROUND_STEAL;
}
}
break;
case GM_MOUND_RESULT_PITCHER :
var _local18 = m_defenseUser.getPitcherActionType();
var _local10 = 1;
if (_local18 == app.enemy.ActionType.PITCHER_STRAIGHT) {
_local10 = app.enemy.Message.PITCHER_STRAIGHT;
} else if (_local18 == app.enemy.ActionType.PITCHER_CURVE) {
_local10 = app.enemy.Message.PITCHER_CURVE;
} else if (_local18 == app.enemy.ActionType.PITCHER_SHOOT) {
_local10 = app.enemy.Message.PITCHER_SHOOT;
} else if (_local18 == app.enemy.ActionType.PITCHER_FORK) {
_local10 = app.enemy.Message.PITCHER_FORK;
}
m_messagePitcher.play(_local10);
m_count = 750;
if ((m_defenseUser.isStrike() || (m_offenseUser.isSwing())) || (m_offenseUser.isBunt())) {
_local2.addStrikeCount();
_local3.playStrike();
app.sys.SysInfo.__get__SoundManager().playSE("VoiceStrike");
m_messageBig.setMoundMode();
m_messageBig.setMessage(app.enemy.Message.MSG_STRIKE);
} else {
_local2.addBallCount();
_local3.playBall();
app.sys.SysInfo.__get__SoundManager().playSE("VoiceBall");
}
new app.enemy.ThrowSpeed(m_context, m_defenseUser.getThrowSpeed());
m_gameMode = GM_MOUND_RESULT_PITCHER_WAIT;
break;
case GM_MOUND_RESULT_PITCHER_WAIT :
m_count = m_count - _local9;
if (m_count <= 0) {
m_gameMode = GM_MOUND_RESULT_BATTER;
}
break;
case GM_MOUND_RESULT_BATTER :
if ((m_defenseUser.isStrike() || (m_offenseUser.isSwing())) || (m_offenseUser.isBunt())) {
_local10 = app.enemy.Message.BATTER_STRIKE;
} else {
_local10 = app.enemy.Message.BATTER_BALL;
}
m_gameInfoDisplay.update();
m_messageBatter.play(_local10);
m_count = 750;
m_gameMode = GM_MOUND_RESULT_BATTER_WAIT;
break;
case GM_MOUND_RESULT_BATTER_WAIT :
m_count = m_count - _local9;
if (m_count <= 0) {
m_gameMode = GM_MOUND_RESULT_RESULT;
}
break;
case GM_MOUND_RESULT_RESULT :
_local10 = -1;
if (_local2.getStrikeCount() >= 3) {
m_isNewBatter = true;
_local27 = app.enemy.MoundBatter(_local2.getMoundCharacter(app.enemy.CharacterType.MOUND_BATTER));
_local27.hide();
_local2.addAtBatCount();
_local2.addStrikeOutCount();
_local2.batterOut();
_local2.nextBatter();
m_gameInfoDisplay.update();
m_messageResult.play(app.enemy.Message.RESULT_OUT);
m_count = 1000;
m_messageBig.setMoundMode();
m_messageBig.setMessage(app.enemy.Message.MSG_OUT);
app.sys.SysInfo.__get__SoundManager().playSE("VoiceBatterOut");
m_gameMode = GM_MOUND_RESULT_RESULT_WAIT;
} else if (_local2.getBallCount() >= 4) {
m_isNewBatter = true;
_local2.addAtBatCount();
_local2.addFourBallsCount();
_local2.nextBatter();
_local3.addRunner();
_local3.connectRunner();
_local3.fourBallsRunner();
m_gameInfoDisplay.update();
m_ground.setRunnerMode();
app.sys.SysInfo.__get__SoundManager().playSE("VoiceFourBalls");
m_messageResult.play(app.enemy.Message.RESULT_FOURBALLS);
m_gameMode = GM_GROUND_FOURBALLS;
} else {
m_count = 250;
m_gameMode = GM_MOUND_RESULT_RESULT_WAIT;
}
break;
case GM_MOUND_RESULT_RESULT_WAIT :
m_count = m_count - _local9;
if (m_count <= 0) {
if (_local2.getOutCount() >= 3) {
var _local25;
var _local21;
var _local19;
var _local20;
_local25 = _local2.getInning();
_local20 = _local2.isFirst();
_local21 = _local2.getTotalScoreFirst();
_local19 = _local2.getTotalScoreLast();
if (((_local25 >= 9) && ((_local20 && (_local21 < _local19)) || ((!_local20) && (_local21 != _local19)))) || (((_local25 >= MAX_INNING) && (!_local20)) && (_local21 == _local19))) {
m_gameMode = GM_MOUND_GAMESET;
} else {
m_gameMode = GM_MOUND_CHANGE;
}
} else {
m_gameMode = GM_MOUND;
}
}
break;
case GM_MOUND_CHANGE :
if (app.sys.SysInfo.__get__GameMode().isAdMode()) {
m_messageBig.setAdMoundChangeMode();
m_count = 2250;
new app.enemy.GroundAdChangeFlag(m_context, m_count);
} else {
m_messageBig.setChangeMode();
m_count = 1000;
}
m_messageBig.setMessage(app.enemy.Message.MSG_CHANGE);
m_mound.setActive(false);
m_gameMode = GM_MOUND_CHANGE_WAIT;
_local5 = true;
break;
case GM_MOUND_CHANGE_WAIT :
m_count = m_count - _local9;
if (m_count <= 0) {
m_gameMode = GM_CHANGE;
}
break;
case GM_MOUND_GAMESET :
m_count = 1000;
m_gameMode = GM_MOUND_GAMESET_WAIT;
_local5 = true;
break;
case GM_MOUND_GAMESET_WAIT :
m_count = m_count - _local9;
if (m_count <= 0) {
m_gameMode = GM_CHANGE;
}
break;
case GM_GROUND :
m_ground.setVisible(true);
m_ground.setNormalMode();
m_mound.setVisible(false);
m_offenseUser.setRunnerMode();
m_defenseUser.setDefenseMode(false);
_local3.setBatHitStatus();
_local3.clearStatusMessage();
_local3.showRunner();
app.sys.SysInfo.__get__Collision().setMode(app.sys.Collision.MD_GROUND);
m_gameMode = GM_GROUND_WAIT;
_local5 = true;
break;
case GM_GROUND_WAIT :
var _local15 = _local2.__get__Ball();
var _local13;
var _local14;
if (_local3.isBallReserve()) {
m_gameMode = GM_GROUND_FLY_OUT;
_local5 = true;
} else if (_local15.isOutsideHit()) {
_local13 = _local15.getGroundHitPosition();
_local14 = util.Util.plusRad(Math.atan2(_local13.z, _local13.x));
if ((_local14 >= (Math.PI/4)) && (_local14 <= 2.35619449019234)) {
m_gameMode = GM_GROUND_HOMERUN;
} else {
m_gameMode = GM_GROUND_FOUL;
}
_local5 = true;
} else if (_local15.isGroundHit()) {
_local13 = _local15.getGroundHitPosition();
_local14 = util.Util.plusRad(Math.atan2(_local13.z, _local13.x));
if ((_local14 >= (Math.PI/4)) && (_local14 <= 2.35619449019234)) {
m_gameMode = GM_GROUND_HIT;
_local5 = true;
} else {
m_gameMode = GM_GROUND_FOUL;
_local5 = true;
}
}
break;
case GM_GROUND_CHECK :
m_ground.setVisible(true);
m_mound.setVisible(false);
m_offenseUser.setRunnerMode();
m_defenseUser.setDefenseMode(true);
_local3.setCheckStatus();
_local3.standbyDefense();
_local3.checkModeDefense();
_local3.showRunner();
app.sys.SysInfo.__get__Collision().setMode(app.sys.Collision.MD_GROUND);
m_gameMode = GM_GROUND_NORMAL;
_local5 = true;
break;
case GM_GROUND_STEAL :
m_ground.setVisible(true);
m_mound.setVisible(false);
m_offenseUser.setRunnerMode();
m_defenseUser.setDefenseMode(true);
_local3.setCheckStatus();
_local3.standbyDefense();
_local3.stealModeDefense();
_local3.showRunner();
app.sys.SysInfo.__get__Collision().setMode(app.sys.Collision.MD_GROUND);
m_isSteal = true;
m_gameMode = GM_GROUND_NORMAL;
_local5 = true;
break;
case GM_GROUND_FOURBALLS :
m_ground.setVisible(true);
m_mound.setVisible(false);
m_offenseUser.setRunnerMode();
m_defenseUser.setDefenseMode(true);
_local3.setPushRunStatus();
_local3.stealModeDefense();
_local3.normalDefense();
_local3.showRunner();
app.sys.SysInfo.__get__Collision().setMode(app.sys.Collision.MD_NONE);
m_gameMode = GM_GROUND_NORMAL;
_local5 = true;
break;
case GM_GROUND_FLY_OUT :
_local3.setFlyCatchStatus();
_local3.flyOutRunner();
m_isNewBatter = true;
m_gameMode = GM_GROUND_NORMAL;
_local5 = true;
break;
case GM_GROUND_HIT :
_local3.setFairStatus();
m_isNewBatter = true;
m_gameMode = GM_GROUND_NORMAL;
_local5 = true;
break;
case GM_GROUND_NORMAL :
m_gameMode = GM_GROUND_NORMAL_LOOP;
m_messageWait = 0;
m_groundEndCount = 0;
_local5 = true;
break;
case GM_GROUND_NORMAL_LOOP :
var _local7;
var _local6;
if ((!m_isChange) && (_local2.getOutCount() < 3)) {
_local7 = _local3.getStatusMessageLength();
_local4 = _local7 - 1;
while (_local4 >= 0) {
_local6 = _local3.getStatusMessage(_local4);
if (!_local6.isAdjust()) {
_local10 = _local6.getMessage();
switch (_local10) {
case app.enemy.Message.RESULT_SAFE :
app.sys.SysInfo.__get__SoundManager().playSE("VoiceSafe");
m_messageBig.setGroundMode();
m_messageBig.setMessage(app.enemy.Message.MSG_SAFE);
break;
case app.enemy.Message.RESULT_OUT :
_local2.addOutCount();
m_gameInfoDisplay.update();
app.sys.SysInfo.__get__SoundManager().playSE("VoiceOut");
m_messageBig.setGroundMode();
m_messageBig.setMessage(app.enemy.Message.MSG_OUT);
break;
case app.enemy.Message.RESULT_POINT :
m_nowPoint++;
_local2.setScore(m_nowPoint);
m_gameInfoDisplay.update();
}
_local6.adjust();
}
var _local25 = _local2.getInning();
var _local20 = _local2.isFirst();
var _local21 = _local2.getTotalScoreFirst();
var _local19 = _local2.getTotalScoreLast();
if ((_local2.getOutCount() >= 3) || (((!_local20) && (_local25 >= 9)) && (_local21 < _local19))) {
_local3.spliceStatusMessage(_local4);
_local3.normalDefense();
m_offenseUser.noneMode();
m_defenseUser.noneMode();
m_isChange = true;
break;
}
_local4--;
}
} else if (_local2.getOutCount() >= 3) {
_local3.spliceStatusMessage(0);
}
m_homerunCount = m_homerunCount - app.sys.SysInfo.getRate();
_local7 = _local3.getStatusMessageLength();
if (_local7 > 0) {
_local4 = _local7 - 1;
while (_local4 >= 0) {
_local6 = _local3.getStatusMessage(_local4);
if (_local6.getMessage() == app.enemy.Message.RESULT_POINT) {
if (m_homerunCount < 0) {
m_messageScore.play();
} else {
m_messageScore.playAd();
}
_local3.deleteStatusMessage(_local4);
app.sys.SysInfo.__get__SoundManager().playSE("Point");
}
_local4--;
}
}
m_messageWait = m_messageWait - app.sys.SysInfo.getRate();
if (m_messageWait <= 0) {
_local7 = _local3.getStatusMessageLength();
if (_local7 > 0) {
_local4 = _local7 - 1;
_local6 = _local3.getStatusMessage(_local4);
_local10 = _local6.getMessage();
_local3.deleteStatusMessage(_local4);
m_messageResult.play(_local10);
m_messageWait = MESSAGE_TIME;
}
}
if (m_messageWait < 0) {
var _local28;
var _local30;
var _local26;
var _local29;
_local28 = _local3.getRunnerCount();
_local30 = _local3.isMoveRunner();
_local26 = _local3.getBallCarry();
_local29 = _local2.getOutCount();
if (((_local28 == 0) || ((!_local30) && (_local26 != -1))) || (m_isChange)) {
m_groundEndCount = m_groundEndCount + app.sys.SysInfo.getRate();
} else {
m_groundEndCount = 0;
}
if ((m_groundEndCount >= GROUND_END_TIME) || (m_isChange && (m_groundEndCount >= GROUND_CHNAGE_TIME))) {
if (_local3.getGameStatus() == app.enemy.GameStatus.GS_GROUND_HOMERUN) {
m_homerunMessage.destroy();
m_confetti.destroy();
}
if (m_isNewBatter) {
_local2.nextBatter();
}
if (m_isChange) {
var _local25 = _local2.getInning();
var _local20 = _local2.isFirst();
var _local21 = _local2.getTotalScoreFirst();
var _local19 = _local2.getTotalScoreLast();
if (((_local25 >= 9) && ((_local20 && (_local21 < _local19)) || ((!_local20) && (_local21 != _local19)))) || (((_local25 >= MAX_INNING) && (!_local20)) && (_local21 == _local19))) {
m_gameMode = GM_GROUND_GAMESET;
} else {
m_gameMode = GM_GROUND_CHANGE;
}
_local5 = true;
} else {
if (m_isHit) {
if (m_curOutCount == _local29) {
var _local24;
_local24 = _local3.getBaseFirstRunner();
if (_local24 != -1) {
_local2.addHitCount(_local24);
}
}
}
if (m_isSteal) {
var _local22;
_local22 = _local3.getStealCountRunner();
_local4 = 0;
while (_local4 < _local22) {
_local2.addStealCount();
_local4++;
}
}
m_gameMode = GM_MOUND;
}
_local3.fixRunner();
_local3.normalRunner();
_local3.connectRunner();
}
}
break;
case GM_GROUND_FOUL :
if (_local2.getStrikeCount() < 2) {
_local2.addStrikeCount();
}
_local3.setFoulStatus();
_local2.decAtBatCount();
m_isNewBatter = false;
m_messageResult.play(app.enemy.Message.RESULT_FOUL);
m_count = 1500;
m_messageBig.setGroundMode();
m_messageBig.setMessage(app.enemy.Message.MSG_FOUL);
app.sys.SysInfo.__get__SoundManager().playSE("VoiceFoul");
m_gameMode = GM_GROUND_FOUL_WAIT;
break;
case GM_GROUND_FOUL_WAIT :
m_count = m_count - _local9;
if (m_count <= 0) {
_local3.backRunner();
_local3.normalRunner();
_local3.connectRunner();
m_gameMode = GM_MOUND;
}
break;
case GM_GROUND_HOMERUN :
_local3.setHomerunStatus();
_local3.normalDefense();
_local3.homerunRunner();
m_isNewBatter = true;
m_homerunCount = 6000;
if (app.sys.SysInfo.__get__GameMode().isAdMode()) {
m_homerunMessage = new app.enemy.HomeRunAdMessage(m_context);
new app.enemy.GroundAdHomeRunFlag(m_context, m_homerunCount);
} else {
m_homerunMessage = new app.enemy.HomeRunNormalMessage(m_context);
}
m_confetti = new app.enemy.Confetti(m_context, 20);
m_ground.setHomeRunMode();
app.sys.SysInfo.__get__SoundManager().playSE("VoiceHomeRun");
app.sys.SysInfo.__get__SoundManager().playSE("HomeRun");
m_gameMode = GM_GROUND_NORMAL;
break;
case GM_GROUND_CHANGE :
if (app.sys.SysInfo.__get__GameMode().isAdMode()) {
m_messageBig.setAdGroundChangeMode();
m_count = 2250;
new app.enemy.GroundAdChangeFlag(m_context, m_count);
} else {
m_messageBig.setGroundMode();
m_count = 1500;
}
m_messageBig.setMessage(app.enemy.Message.MSG_CHANGE);
m_gameMode = GM_GROUND_CHANGE_WAIT;
break;
case GM_GROUND_CHANGE_WAIT :
m_count = m_count - _local9;
if (m_count <= 0) {
m_gameMode = GM_CHANGE;
_local5 = true;
}
break;
case GM_GROUND_GAMESET :
m_gameMode = GM_GROUND_GAMESET_WAIT;
m_count = 1500;
break;
case GM_GROUND_GAMESET_WAIT :
m_count = m_count - _local9;
if (m_count <= 0) {
m_gameMode = GM_CHANGE;
_local5 = true;
}
break;
case GM_CHANGE :
stopBgSE();
m_offenseUser.end();
m_defenseUser.end();
m_messageBig.setNoneMode();
_local3.initRunner();
_local3.clearDefense();
_local3.initPositionDefense();
_local3.normalDefense();
m_ball.hide();
m_ball.clearHit();
m_ball.setNoneMode();
app.sys.SysInfo.__get__Collision().setMode(app.sys.Collision.MD_NONE);
m_mound.setActive(false);
_local31 = true;
}
} while (_local5);
return(_local31);
}
function moveMenu() {
m_menuAction = ACT_NONE;
if (m_checkMouseMove || (m_checkMouseClick)) {
var _local2;
var _local4;
var _local7;
var _local6;
var _local5;
var _local3;
_local7 = m_mcMenu._xmouse;
_local6 = m_mcMenu._ymouse;
_local4 = -1;
_local5 = ACT_NONE;
_local2 = m_btnMcList.length - 1;
while (_local2 >= 0) {
_local3 = m_btnMcList[_local2];
if (hitCheckMC(_local3.mc, _local7, _local6)) {
app.sys.SysInfo.__get__Cursor().show();
_local5 = ACT_ENTER;
_local4 = _local2;
break;
}
_local2--;
}
if (_local4 != -1) {
if (m_checkMouseClick) {
m_menuAction = _local5;
} else if (m_mainMenuIdx != _local4) {
m_menuAction = ACT_MOVE;
}
} else {
app.sys.SysInfo.__get__Cursor().hide();
}
m_mainMenuIdx = _local4;
}
return(m_menuAction != ACT_NONE);
}
function playMove() {
if (m_menuSEID != -1) {
app.sys.SysInfo.__get__SoundManager().stop(m_menuSEID);
}
m_menuSEID = app.sys.SysInfo.__get__SoundManager().playSE("MoveMenu");
}
function playSelect() {
app.sys.SysInfo.__get__SoundManager().playSE("SelectMenu");
}
function initBgSE() {
m_bgseID = -1;
m_bgseStr = "";
}
function playBgSE(seidStr) {
if (m_bgseID != -1) {
if (m_bgseStr != seidStr) {
app.sys.SysInfo.__get__SoundManager().stop(m_bgseID);
m_bgseID = app.sys.SysInfo.__get__SoundManager().playSE(seidStr);
}
} else {
m_bgseID = app.sys.SysInfo.__get__SoundManager().playSE(seidStr);
}
m_bgseStr = seidStr;
}
function stopBgSE() {
if (m_bgseID != -1) {
app.sys.SysInfo.__get__SoundManager().stop(m_bgseID);
m_bgseID = -1;
}
}
function initMenu(idx) {
var _local2;
m_btnMcList = [];
m_btnShowMcList = [];
switch (idx) {
case MENU_NEXT :
_local2 = m_mcMenu;
_local2.NextBtn.stop();
m_btnMcList.push({mc:_local2.NextBtn});
m_btnShowMcList.push(true);
if (app.sys.SysInfo.__get__GameMode().isAdMode()) {
m_btnMcList.push({mc:_local2.AdBtn});
m_btnShowMcList.push(true);
}
break;
case MENU_TITLE :
_local2 = m_mcMenu;
_local2.TitleBtn.stop();
m_btnMcList.push({mc:_local2.TitleBtn});
m_btnShowMcList.push(true);
if (!app.sys.SysInfo.__get__GameMode().isAdMode()) {
break;
}
m_btnMcList.push({mc:_local2.AdBtn});
m_btnShowMcList.push(true);
}
}
function showMenu(isShow) {
var _local2;
var _local3;
_local2 = m_btnShowMcList.length - 1;
while (_local2 >= 0) {
_local3 = m_btnMcList[_local2];
_local3.mc._visible = m_btnShowMcList[_local2] && (isShow);
_local2--;
}
}
function selectMenu(idx) {
var _local2;
var _local3;
_local2 = m_btnShowMcList.length - 1;
while (_local2 >= 0) {
_local3 = m_btnMcList[_local2];
_local3.mc.gotoAndStop(((_local2 == idx) ? 2 : 1));
_local2--;
}
}
function hitCheckMC(mcb, x, y) {
if (((((mcb._x - (mcb._width / 2)) <= x) && ((mcb._x + (mcb._width / 2)) >= x)) && ((mcb._y - (mcb._height / 2)) <= y)) && ((mcb._y + (mcb._height / 2)) >= y)) {
return(true);
}
return(false);
}
function onMouseDown() {
m_checkMouseClick = true;
}
function onMouseMove() {
m_checkMouseMove = true;
}
function onMouseUp() {
}
function onMouseWheel() {
}
static var MD_INIT = 0;
static var MD_START_GAME = 50;
static var MD_START_GAME_WAIT = 60;
static var MD_INNING = 100;
static var MD_BOTTOM = 110;
static var MD_GAME = 200;
static var MD_GAME_WAIT = 210;
static var MD_CHANGE = 300;
static var MD_CHANGE_WAIT = 310;
static var MD_ADCHECK = 400;
static var MD_CHEERGIRL = 410;
static var MD_CHEERGIRL_LOOP = 420;
static var MD_BONUS = 430;
static var MD_BONUS_LOOP = 440;
static var MD_WIN = 500;
static var MD_WIN_WAIT = 510;
static var MD_LOSE = 600;
static var MD_LOSE_WAIT = 610;
static var MD_DRAW = 700;
static var MD_DRAW_WAIT = 710;
static var MD_GAMEEND = 800;
static var MD_END = 999;
static var GM_START = 0;
static var GM_GROUND = 100;
static var GM_GROUND_WAIT = 110;
static var GM_GROUND_CHECK = 120;
static var GM_GROUND_STEAL = 130;
static var GM_GROUND_FOURBALLS = 140;
static var GM_MOUND = 200;
static var GM_MOUND_WAIT = 210;
static var GM_MOUND_RESULT_PITCHER = 220;
static var GM_MOUND_RESULT_PITCHER_WAIT = 230;
static var GM_MOUND_RESULT_BATTER = 240;
static var GM_MOUND_RESULT_BATTER_WAIT = 250;
static var GM_MOUND_RESULT_RESULT = 260;
static var GM_MOUND_RESULT_RESULT_WAIT = 270;
static var GM_MOUND_CHANGE = 280;
static var GM_MOUND_CHANGE_WAIT = 290;
static var GM_MOUND_GAMESET = 300;
static var GM_MOUND_GAMESET_WAIT = 310;
static var GM_GROUND_FLY_OUT = 400;
static var GM_GROUND_HIT = 410;
static var GM_GROUND_NORMAL = 420;
static var GM_GROUND_NORMAL_LOOP = 430;
static var GM_GROUND_FOUL = 440;
static var GM_GROUND_FOUL_WAIT = 450;
static var GM_GROUND_HOMERUN = 460;
static var GM_GROUND_HOMERUN_WAIT = 470;
static var GM_GROUND_CHANGE = 500;
static var GM_GROUND_CHANGE_WAIT = 510;
static var GM_GROUND_GAMESET = 520;
static var GM_GROUND_GAMESET_WAIT = 530;
static var GM_CHANGE = 999;
static var MESSAGE_TIME = 1000;
static var GROUND_END_TIME = 3000;
static var GROUND_CHNAGE_TIME = 500;
static var MENU_GAME = 1;
static var MENU_NEXT = 2;
static var MENU_TITLE = 3;
static var MENUNEXT_NEXT = 0;
static var MENUNEXT_AD = 1;
static var MENUTITLE_TITLE = 0;
static var MENUTITLE_AD = 1;
static var ACT_NONE = 0;
static var ACT_ON = 1;
static var ACT_OFF = 2;
static var ACT_CHANGE = 3;
static var ACT_ENTER = 4;
static var ACT_MOVE = 5;
static var MAX_INNING = 12;
}
Symbol 3448 MovieClip [__Packages.app.enemy.GameInfoDisplay] Frame 0
class app.enemy.GameInfoDisplay extends app.enemy.Enemy
{
var m_mcInfo, m_context, m_strikeList, m_ballList, m_outList, m_x, m_y, m_isVisible, m_isUpdate, m_wl;
function GameInfoDisplay (context) {
super(context);
m_mcInfo = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "GameInfoDisplayMC", "GameInfoDisplay", m_context.getBase());
m_mcInfo._x = 0;
m_mcInfo._y = 0;
m_mcInfo._visible = true;
m_strikeList = [];
m_strikeList.push(m_mcInfo.S_1);
m_strikeList.push(m_mcInfo.S_2);
m_ballList = [];
m_ballList.push(m_mcInfo.B_1);
m_ballList.push(m_mcInfo.B_2);
m_ballList.push(m_mcInfo.B_3);
m_outList = [];
m_outList.push(m_mcInfo.O_1);
m_outList.push(m_mcInfo.O_2);
m_x = 0;
m_y = 0;
m_isVisible = false;
m_isUpdate = true;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
return(true);
}
function ctrl() {
return(true);
}
function disp() {
var _local4;
var _local6;
var _local7;
var _local8;
var _local5;
var _local3;
var _local2;
if (m_isUpdate) {
if (m_isVisible) {
_local6 = app.sys.SysInfo.__get__GameInfo().getInning();
m_mcInfo.INNING.text = _local6;
m_mcInfo.INNING_S.text = _local6;
m_mcInfo.FIRSTLAST.gotoAndStop((app.sys.SysInfo.__get__GameInfo().isFirst() ? 1 : 2));
m_mcInfo._x = m_x;
m_mcInfo._y = m_y;
_local4 = app.sys.SysInfo.__get__GameInfo().getStrikeCount();
_local2 = 0;
while (_local2 < 2) {
_local3 = m_strikeList[_local2];
_local3.gotoAndStop(((_local4 > _local2) ? 2 : 1));
_local2++;
}
_local4 = app.sys.SysInfo.__get__GameInfo().getBallCount();
_local2 = 0;
while (_local2 < 3) {
_local3 = m_ballList[_local2];
_local3.gotoAndStop(((_local4 > _local2) ? 3 : 1));
_local2++;
}
_local4 = app.sys.SysInfo.__get__GameInfo().getOutCount();
_local2 = 0;
while (_local2 < 2) {
_local3 = m_outList[_local2];
_local3.gotoAndStop(((_local4 > _local2) ? 4 : 1));
_local2++;
}
_local5 = app.sys.SysInfo.__get__GameInfo().getTeamStringFirst();
m_mcInfo.SCORE.TFW.text = _local5;
m_mcInfo.SCORE.TFB.text = _local5;
_local5 = app.sys.SysInfo.__get__GameInfo().getTeamStringLast();
m_mcInfo.SCORE.TLW.text = _local5;
m_mcInfo.SCORE.TLB.text = _local5;
_local4 = app.sys.SysInfo.__get__GameInfo().getTotalScoreFirst();
_local4 = Math.min(_local4, 99);
_local5 = "" + _local4;
m_mcInfo.SCORE.SFW.text = _local5;
m_mcInfo.SCORE.SFB.text = _local5;
_local4 = app.sys.SysInfo.__get__GameInfo().getTotalScoreLast();
_local4 = Math.min(_local4, 99);
_local5 = "" + _local4;
m_mcInfo.SCORE.SLW.text = _local5;
m_mcInfo.SCORE.SLB.text = _local5;
if (app.sys.SysInfo.__get__GameInfo().isFirst()) {
m_mcInfo.AttackFirst._visible = true;
m_mcInfo.AttackLast._visible = false;
} else {
m_mcInfo.AttackFirst._visible = false;
m_mcInfo.AttackLast._visible = true;
}
}
m_mcInfo._visible = m_isVisible;
m_isUpdate = false;
}
}
function destroy() {
m_mcInfo.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
function update() {
m_isUpdate = true;
}
function setVisible(visible) {
m_isVisible = visible;
m_isUpdate = true;
}
function setPosition(x, y) {
if ((m_x != x) || (m_y != y)) {
m_x = x;
m_y = y;
m_isUpdate = true;
}
}
}
Symbol 3449 MovieClip [__Packages.app.enemy.ScoreMessage] Frame 0
class app.enemy.ScoreMessage extends app.enemy.Enemy
{
var m_mcMenu, m_context, m_isContextUpdate, m_isUpdate, m_count, m_isAd, m_wl;
function ScoreMessage (context) {
super(context);
m_mcMenu = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "MessageScoreMC", "MessageScore", m_context.getBase());
m_mcMenu._x = 164;
m_mcMenu._y = 440;
m_mcMenu._visible = false;
m_isContextUpdate = false;
m_isUpdate = false;
m_count = -1;
m_isAd = false;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
if (m_count >= 0) {
m_count = m_count + app.sys.SysInfo.getRate();
if (m_count > OUT_TIME) {
m_count = -1;
}
m_isUpdate = true;
}
return(true);
}
function ctrl() {
return(true);
}
function disp() {
if (m_isContextUpdate) {
var _local2;
var _local3;
_local2 = app.sys.SysInfo.__get__GameInfo().getTeamStringFirst();
m_mcMenu.TFW.text = _local2;
m_mcMenu.TFB.text = _local2;
_local2 = app.sys.SysInfo.__get__GameInfo().getTeamStringLast();
m_mcMenu.TLW.text = _local2;
m_mcMenu.TLB.text = _local2;
_local3 = app.sys.SysInfo.__get__GameInfo().getTotalScoreFirst();
_local3 = Math.min(_local3, 99);
_local2 = "" + _local3;
m_mcMenu.SFW.text = _local2;
m_mcMenu.SFB.text = _local2;
_local3 = app.sys.SysInfo.__get__GameInfo().getTotalScoreLast();
_local3 = Math.min(_local3, 99);
_local2 = "" + _local3;
m_mcMenu.SLW.text = _local2;
m_mcMenu.SLB.text = _local2;
m_isContextUpdate = false;
}
if (m_isUpdate) {
var _local5;
var _local4;
var _local6;
if (m_count >= 0) {
if (m_count < IN_TIME) {
_local5 = util.Util.calcTween(-MOVE_X, DISP_X, m_count / IN_SPAN, 100);
_local4 = (m_isAd ? (DISP_AD_Y) : (DISP_Y));
_local6 = 100;
} else if (m_count < DISP_TIME) {
_local5 = DISP_X;
_local4 = (m_isAd ? (DISP_AD_Y) : (DISP_Y));
_local6 = 100;
} else if (m_count < OUT_TIME) {
_local5 = DISP_X;
_local4 = (m_isAd ? (DISP_AD_Y) : (DISP_Y));
_local6 = 100;
} else {
_local5 = DISP_X;
_local4 = (m_isAd ? (DISP_AD_Y) : (DISP_Y));
_local6 = 100;
}
m_mcMenu._x = _local5;
m_mcMenu._y = _local4;
m_mcMenu._alpha = _local6;
m_mcMenu._visible = true;
} else {
m_mcMenu._visible = false;
}
m_isUpdate = false;
}
}
function destroy() {
m_mcMenu.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
function play() {
m_count = 0;
m_isContextUpdate = true;
m_isAd = false;
}
function playAd() {
m_count = 0;
m_isContextUpdate = true;
m_isAd = true;
}
static var IN_TIME = 250;
static var IN_SPAN = 250;
static var DISP_TIME = 1750;
static var DISP_SPAN = 1500;
static var OUT_TIME = 2000;
static var OUT_SPAN = 250;
static var MOVE_X = 520;
static var DISP_X = 176;
static var DISP_Y = 248;
static var DISP_AD_Y = 431;
}
Symbol 3450 MovieClip [__Packages.app.enemy.RecordBoard] Frame 0
class app.enemy.RecordBoard extends app.enemy.Enemy
{
var m_mc, m_context, m_isUpdate, m_isVisible, m_wl;
function RecordBoard (context) {
super(context);
m_mc = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "RecordBoardMC", "RecordBoard", m_context.getBase());
m_mc._x = 110;
m_mc._y = 288;
m_mc._visible = true;
m_isUpdate = true;
m_isVisible = false;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
return(true);
}
function ctrl() {
return(true);
}
function disp() {
var _local4;
var _local2;
var _local3;
if (m_isUpdate) {
if (m_isVisible) {
_local4 = app.sys.SysInfo.__get__GameInfo().getTeamStringFirst();
m_mc.TEAM_FIRST.text = _local4;
_local4 = app.sys.SysInfo.__get__GameInfo().getTeamStringLast();
m_mc.TEAM_LAST.text = _local4;
_local3 = app.sys.SysInfo.__get__GameInfo().getRecordFirst();
_local2 = 0;
while (_local2 <= 8) {
m_mc["DATA_FIRST_" + (_local2 + 1)].text = _local3[_local2];
_local2++;
}
_local3 = app.sys.SysInfo.__get__GameInfo().getRecordLast();
_local2 = 0;
while (_local2 <= 8) {
m_mc["DATA_LAST_" + (_local2 + 1)].text = _local3[_local2];
_local2++;
}
}
m_mc._visible = m_isVisible;
m_isUpdate = false;
}
}
function destroy() {
m_mc.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
function update() {
m_isUpdate = true;
}
function setVisible(visible) {
m_isVisible = visible;
m_isUpdate = true;
}
}
Symbol 3451 MovieClip [__Packages.app.enemy.BigMessage] Frame 0
class app.enemy.BigMessage extends app.enemy.Enemy
{
var m_mcMenu, m_context, m_isUpdate, m_count, m_mode, m_message, m_x, m_y, m_visible, m_wl;
function BigMessage (context) {
super(context);
m_mcMenu = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "MessageBigMC", "MessageBig", m_context.getBase());
m_mcMenu.cacheAsBitmap = true;
m_mcMenu.stop();
m_mcMenu._visible = false;
m_isUpdate = false;
m_count = -1;
m_mode = MD_NONE;
m_message = 1;
m_x = 0;
m_y = 0;
m_visible = false;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
if (m_count >= 0) {
m_count = m_count + app.sys.SysInfo.getRate();
m_isUpdate = true;
switch (m_mode) {
case MD_NONE :
break;
case MD_HOMERUN :
if (m_count < GROUND_IN_TIME) {
m_y = util.Util.calcTween(GROUND_MOVE_Y, GROUND_DISP_Y, m_count / GROUND_IN_SPAN, -100);
m_x = GROUND_DISP_X;
m_visible = true;
} else {
m_x = GROUND_DISP_X;
m_y = GROUND_DISP_Y;
m_visible = true;
}
m_isUpdate = true;
break;
case MD_GROUND :
if (m_count < GROUND_IN_TIME) {
m_y = util.Util.calcTween(GROUND_MOVE_Y, GROUND_DISP_Y, m_count / GROUND_IN_SPAN, -100);
m_x = GROUND_DISP_X;
m_visible = true;
} else if (m_count < GROUND_WAIT_TIME) {
m_x = GROUND_DISP_X;
m_y = GROUND_DISP_Y;
m_visible = true;
} else {
m_visible = false;
m_count = -1;
m_mode = MD_NONE;
}
m_isUpdate = true;
break;
case MD_MOUND :
if (m_count < MOUND_IN_TIME) {
m_x = util.Util.calcTween(MOUND_IN_X, MOUND_WAIT_X, m_count / MOUND_IN_SPAN, 100);
m_y = MOUND_DISP_Y;
m_visible = true;
} else if (m_count < MOUND_WAIT_TIME) {
m_x = MOUND_WAIT_X;
m_y = MOUND_DISP_Y;
m_visible = true;
} else if (m_count < MOUND_OUT_TIME) {
m_x = util.Util.calcTween(MOUND_WAIT_X, MOUND_OUT_X, (m_count - MOUND_WAIT_TIME) / MOUND_OUT_SPAN, -100);
m_y = MOUND_DISP_Y;
m_visible = true;
} else {
m_count = -1;
m_visible = false;
m_mode = MD_NONE;
}
m_isUpdate = true;
break;
case MD_CHANGE :
m_x = MOUND_WAIT_X;
m_y = MOUND_DISP_Y;
m_visible = true;
m_isUpdate = true;
break;
case MD_AD_MOUND_CHANGE :
m_x = MOUND_AD_WAIT_X;
m_y = MOUND_AD_DISP_Y;
m_visible = true;
m_isUpdate = true;
break;
case MD_AD_GROUND_CHANGE :
if (m_count < GROUND_IN_TIME) {
m_y = util.Util.calcTween(GROUND_AD_MOVE_Y, GROUND_AD_DISP_Y, m_count / GROUND_IN_SPAN, -100);
m_x = GROUND_AD_DISP_X;
m_visible = true;
} else {
m_x = GROUND_AD_DISP_X;
m_y = GROUND_AD_DISP_Y;
m_visible = true;
}
m_isUpdate = true;
break;
case MD_AD_HOMERUN :
if (m_count < GROUND_IN_TIME) {
m_y = util.Util.calcTween(GROUND_AD_HR_MOVE_Y, GROUND_AD_HR_DISP_Y, m_count / GROUND_IN_SPAN, -100);
m_x = GROUND_AD_HR_DISP_X;
m_visible = true;
} else {
m_x = GROUND_AD_HR_DISP_X;
m_y = GROUND_AD_HR_DISP_Y;
m_visible = true;
}
m_isUpdate = true;
}
}
return(true);
}
function ctrl() {
return(true);
}
function disp() {
if (m_isUpdate) {
m_mcMenu._x = m_x;
m_mcMenu._y = m_y;
m_mcMenu.gotoAndStop(m_message);
m_mcMenu._visible = m_visible;
m_isUpdate = false;
}
}
function destroy() {
m_mcMenu.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
function setHomeRunMode() {
m_mode = MD_HOMERUN;
m_count = 0;
}
function setMoundMode() {
m_mode = MD_MOUND;
m_count = 0;
}
function setGroundMode() {
m_mode = MD_GROUND;
m_count = 0;
}
function setChangeMode() {
m_mode = MD_CHANGE;
m_count = 0;
}
function setAdMoundChangeMode() {
m_mode = MD_AD_MOUND_CHANGE;
m_count = 0;
}
function setAdGroundChangeMode() {
m_mode = MD_AD_GROUND_CHANGE;
m_count = 0;
}
function setAdHomerunMode() {
m_mode = MD_AD_HOMERUN;
m_count = 0;
}
function setNoneMode() {
m_mode = MD_NONE;
m_count = -1;
m_isUpdate = true;
m_visible = false;
}
function setMessage(message) {
m_message = message;
}
static var GROUND_IN_TIME = 500;
static var GROUND_IN_SPAN = 500;
static var GROUND_WAIT_TIME = 1500;
static var GROUND_WAIT_SPAN = 1000;
static var GROUND_DISP_X = 320;
static var GROUND_DISP_Y = 190;
static var GROUND_MOVE_Y = -40;
static var MOUND_IN_TIME = 250;
static var MOUND_IN_SPAN = 250;
static var MOUND_WAIT_TIME = 1250;
static var MOUND_WAIT_SPAN = 1000;
static var MOUND_OUT_TIME = 1500;
static var MOUND_OUT_SPAN = 250;
static var MOUND_IN_X = 760;
static var MOUND_WAIT_X = 320;
static var MOUND_OUT_X = -120;
static var MOUND_DISP_Y = 240;
static var MOUND_AD_WAIT_X = 320;
static var MOUND_AD_DISP_Y = 100;
static var GROUND_AD_DISP_X = 320;
static var GROUND_AD_DISP_Y = 90;
static var GROUND_AD_MOVE_Y = -40;
static var GROUND_AD_HR_DISP_X = 320;
static var GROUND_AD_HR_MOVE_Y = -40;
static var GROUND_AD_HR_DISP_Y = 90;
static var MD_NONE = 0;
static var MD_HOMERUN = 1;
static var MD_GROUND = 2;
static var MD_MOUND = 3;
static var MD_CHANGE = 4;
static var MD_AD_MOUND_CHANGE = 5;
static var MD_AD_GROUND_CHANGE = 6;
static var MD_AD_HOMERUN = 7;
}
Symbol 3452 MovieClip [__Packages.app.enemy.HomeRunMessage] Frame 0
class app.enemy.HomeRunMessage extends app.enemy.Enemy
{
function HomeRunMessage (context) {
super(context);
}
}
Symbol 3453 MovieClip [__Packages.app.enemy.Confetti] Frame 0
class app.enemy.Confetti extends app.enemy.Enemy
{
var m_colorList, m_num, m_objMC, m_objX, m_objY, m_objSpeedX, m_objSpeedY, m_objScale, m_objRot, m_objAngle, m_objAngleAdd, m_objType, m_mc, m_context, m_wl;
function Confetti (context, paperNum) {
super(context);
var _local12;
var _local11;
var _local3;
var _local6;
var _local9;
var _local5;
var _local10;
var _local7;
var _local13;
var _local8;
var _local4;
m_colorList = [];
m_colorList.push(new flash.geom.ColorTransform(0, 0, 0, 1, 255, 0, 0, 0));
m_colorList.push(new flash.geom.ColorTransform(0, 0, 0, 1, 255, 255, 0, 0));
m_colorList.push(new flash.geom.ColorTransform(0, 0, 0, 1, 51, 255, 255, 0));
m_num = paperNum;
m_objMC = [];
m_objX = [];
m_objY = [];
m_objSpeedX = [];
m_objSpeedY = [];
m_objScale = [];
m_objRot = [];
m_objAngle = [];
m_objAngleAdd = [];
m_objType = [];
m_mc = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "DummyMC", "Dummy", m_context.getBase());
m_mc._x = 0;
m_mc._y = 0;
m_mc._visible = true;
_local4 = 0;
while (_local4 < m_num) {
_local8 = util.MovieClipFactory.createOnMc(m_mc, "PaperMC", "Paper");
_local12 = util.Util.getRandom(app.sys.Screen.WIDTH);
_local11 = util.Util.getRandom(app.sys.Screen.HEIGHT) - app.sys.Screen.HEIGHT;
_local3 = util.Util.getRandomHalf(SPEED_BASE_Y);
_local6 = util.Util.getRandom(SPEED_RAND_Y) + SPEED_BASE_Y;
_local9 = util.Util.getRandom(50) + 100;
_local5 = util.Util.getRandom(360);
_local10 = util.Util.getRandom(360);
_local7 = util.Util.getRandomHalf(40);
_local13 = util.Util.getRandomInt(m_colorList.length);
_local5 = -90 + (Math.atan2(_local6, _local3) / (Math.PI/180));
m_objMC.push(_local8);
m_objX.push(_local12);
m_objY.push(_local11);
m_objSpeedX.push(_local3);
m_objSpeedY.push(_local6);
m_objScale.push(_local9);
m_objRot.push(_local5);
m_objAngle.push(_local10);
m_objAngleAdd.push(_local7);
m_objType.push(_local13);
_local4++;
}
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
var _local3;
var _local4;
var _local5;
var _local7;
var _local9;
var _local6;
var _local10;
var _local8;
var _local11;
var _local2;
_local2 = 0;
while (_local2 < m_num) {
_local3 = m_objX[_local2];
_local4 = m_objY[_local2];
_local3 = _local3 + m_objSpeedX[_local2];
_local4 = _local4 + m_objSpeedY[_local2];
if (((_local4 > (app.sys.Screen.HEIGHT + 20)) || (_local3 < -20)) || (_local3 > (app.sys.Screen.WIDTH + 20))) {
_local3 = util.Util.getRandom(app.sys.Screen.WIDTH);
_local4 = -20;
_local5 = util.Util.getRandomHalf(SPEED_BASE_Y);
_local7 = util.Util.getRandom(SPEED_RAND_Y) + SPEED_BASE_Y;
_local9 = util.Util.getRandom(50) + 100;
_local6 = util.Util.getRandom(360);
_local10 = util.Util.getRandom(360);
_local8 = util.Util.getRandomHalf(40);
_local11 = util.Util.getRandomInt(m_colorList.length);
_local6 = -90 + (Math.atan2(_local7, _local5) / (Math.PI/180));
m_objX[_local2] = _local3;
m_objY[_local2] = _local4;
m_objSpeedX[_local2] = _local5;
m_objSpeedY[_local2] = _local7;
m_objScale[_local2] = _local9;
m_objRot[_local2] = _local6;
m_objAngle[_local2] = _local10;
m_objAngleAdd[_local2] = _local8;
m_objType[_local2] = _local11;
} else {
m_objX[_local2] = _local3;
m_objY[_local2] = _local4;
m_objAngle[_local2] = m_objAngle[_local2] + m_objAngleAdd[_local2];
}
_local2++;
}
return(true);
}
function ctrl() {
return(true);
}
function disp() {
var _local2;
var _local8;
var _local7;
var _local4;
var _local5;
var _local6;
var _local9;
var _local3;
_local3 = 0;
while (_local3 < m_num) {
_local2 = m_objMC[_local3];
_local8 = m_objX[_local3];
_local7 = m_objY[_local3];
_local4 = m_objScale[_local3];
_local5 = m_objRot[_local3];
_local6 = m_objAngle[_local3];
_local9 = m_objType[_local3];
_local2._x = _local8;
_local2._y = _local7;
_local2._xscale = (_local2._yscale = 100);
_local2.mc._rotation = _local5;
_local2.mc.mc._xscale = Math.sin((Math.PI/180) * _local6) * 100;
_local2.mc.mc._yscale = _local4;
_local2.transform.colorTransform = m_colorList[_local9];
_local2._visible = true;
_local3++;
}
}
function destroy() {
var _local2;
while (m_objMC.length > 0) {
_local2 = MovieClip(m_objMC.pop());
_local2.removeMovieClip();
}
m_mc.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
static var SPEED_RAND_X = 10;
static var SPEED_BASE_Y = 5;
static var SPEED_RAND_Y = 10;
}
Symbol 3454 MovieClip [__Packages.app.loop.CheerGirlLoop] Frame 0
class app.loop.CheerGirlLoop extends app.enemy.Enemy
{
var mcList, m_confetti, m_context, m_mcAd, m_count, m_mode;
function CheerGirlLoop (context) {
super(context);
mcList = [];
var _local3 = 0;
while (_local3 < 4) {
var _local4;
_local4 = new app.enemy.GroundGirl(context, app.sys.SysInfo.__get__GameInfo().__get__Ground().getObjectMC(), "GroundGirl");
mcList.push(_local4);
_local3++;
}
m_confetti = new app.enemy.Confetti(m_context, 30);
if (app.sys.SysInfo.__get__GameMode().isAdMode()) {
m_mcAd = new app.enemy.GroundAdFlag(m_context, app.ad.Advertisement.AD_FLAG);
} else {
m_mcAd = null;
}
m_count = 0;
m_mode = MD_INIT;
}
function move() {
var _local6 = true;
var _local2;
var _local5 = app.sys.SysInfo.getRate();
do {
_local2 = false;
switch (m_mode) {
case MD_INIT :
m_count = 0;
setMotion(app.enemy.GroundGirl.MOT_RUN);
setScale(1);
m_mode = MD_IN;
_local2 = true;
break;
case MD_IN :
var _local4;
var _local3;
m_count = m_count + _local5;
if (m_count < IN_TIME) {
_local4 = m_count;
_local3 = ((-RUN_SPEED) * (IN_TIME - _local4)) / 1000;
setPosition(_local3 + FLAG_X, FLAG_Z, 0);
} else {
_local4 = IN_TIME;
_local3 = ((-RUN_SPEED) * (IN_TIME - _local4)) / 1000;
setPosition(_local3 + FLAG_X, FLAG_Z, GIRL_DANCE_X);
startDance();
setScale(-1);
m_count = m_count - IN_TIME;
m_mode = MD_WAIT;
_local2 = true;
}
_local3 = (-FLAG_DISPLAY_MOVE_X) * (1 - (_local4 / IN_TIME));
if (m_mcAd != null) {
m_mcAd.setPosition(_local3 + FLAG_DISPLAY_X, FLAG_DISPLAY_Y);
}
break;
case MD_WAIT :
m_count = m_count + _local5;
if ((m_count > WAIT_TIME) && (isFinished())) {
setMotion(app.enemy.GroundGirl.MOT_RUN);
setScale(1);
m_count = 0;
m_mode = MD_OUT;
_local2 = true;
} else if (isFinished()) {
startDance();
}
break;
case MD_OUT :
m_count = m_count + _local5;
if (m_count < OUT_TIME) {
_local4 = m_count;
} else {
_local4 = OUT_TIME;
m_count = m_count - OUT_TIME;
m_mode = MD_END;
_local2 = true;
}
_local3 = (RUN_SPEED * m_count) / 1000;
setPosition(_local3 + FLAG_X, FLAG_Z, 0);
_local3 = FLAG_DISPLAY_MOVE_X * (_local4 / OUT_TIME);
if (m_mcAd != null) {
m_mcAd.setPosition(_local3 + FLAG_DISPLAY_X, FLAG_DISPLAY_Y);
}
break;
case MD_END :
_local6 = false;
}
} while (_local2);
return(_local6);
}
function destroy() {
var _local2;
while (mcList.length > 0) {
_local2 = app.enemy.GroundGirl(mcList.pop());
_local2.destroy();
}
if (m_mcAd != null) {
m_mcAd.destroy();
}
m_confetti.destroy();
}
function setMotion(mot) {
var _local2 = 0;
while (_local2 < 4) {
mcList[_local2].startMotion(mot);
_local2++;
}
}
function setPosition(x, z, xadd) {
mcList[0].setPosition((((x - (FLAG_WIDTH / 2)) - xadd) - GIRL_DIFF_X) * GIRL_DIFF_X, z + (FLAG_HEIGHT / 2));
mcList[1].setPosition((x - (FLAG_WIDTH / 2)) - xadd, z - (FLAG_HEIGHT / 2));
mcList[2].setPosition((((x + (FLAG_WIDTH / 2)) + xadd) + GIRL_DIFF_X) * GIRL_DIFF_X, z + (FLAG_HEIGHT / 2));
mcList[3].setPosition((x + (FLAG_WIDTH / 2)) + xadd, z - (FLAG_HEIGHT / 2));
}
function isFinished() {
return(mcList[0].isEndMotion());
}
function startDance() {
if (Math.random() < 0.5) {
setMotion(app.enemy.GroundGirl.MOT_DANCEONE);
} else {
setMotion(app.enemy.GroundGirl.MOT_DANCETWO);
}
}
function setScale(neg) {
mcList[0].setScale(1);
mcList[1].setScale(1);
mcList[2].setScale(neg);
mcList[3].setScale(neg);
}
static var MD_INIT = 0;
static var MD_IN = 10;
static var MD_WAIT = 20;
static var MD_OUT = 30;
static var MD_END = 999;
static var IN_TIME = 4000;
static var WAIT_TIME = 4000;
static var OUT_TIME = 4000;
static var FLAG_WIDTH = 1825;
static var FLAG_HEIGHT = 1800;
static var FLAG_Z = 3250;
static var FLAG_X = -15;
static var GIRL_DANCE_X = 50;
static var GIRL_DIFF_X = 1.015;
static var FLAG_DISPLAY_X = 320;
static var FLAG_DISPLAY_MOVE_X = 636;
static var FLAG_DISPLAY_Y = 240;
static var RUN_SPEED = 694.444444444444;
}
Symbol 3455 MovieClip [__Packages.app.enemy.GroundAdFlag] Frame 0
class app.enemy.GroundAdFlag extends app.enemy.Enemy
{
var m_adNum, m_mc, m_context, m_x, m_y, m_alpha, m_isUpdate, m_isHit, m_wl;
function GroundAdFlag (context, adNum) {
super(context);
if (adNum == app.ad.Advertisement.AD_FLAG) {
m_adNum = Math.floor(Math.random() * app.ad.Advertisement.AD_FLAG_NUM);
}
m_mc = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "AdSpaceMC", "AdSpace", m_context.getBase());
m_mc.gotoAndStop(m_adNum + 1);
m_adNum = m_adNum + app.ad.Advertisement.AD_FLAG1;
app.ad.Advertisement.impression(m_adNum);
m_x = 0;
m_y = 0;
m_alpha = 100;
m_isUpdate = true;
m_isHit = false;
Mouse.addListener(this);
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
var _local3;
var _local2;
_local3 = m_mc._xmouse;
_local2 = m_mc._ymouse;
if ((((_local3 >= 0) && (_local3 <= m_mc._width)) && (_local2 >= 0)) && (_local2 <= m_mc._height)) {
m_isHit = true;
app.sys.SysInfo.__get__Cursor().show();
} else {
m_isHit = false;
app.sys.SysInfo.__get__Cursor().hide();
}
return(true);
}
function ctrl() {
return(true);
}
function disp() {
if (m_isUpdate) {
m_mc._x = m_x - (m_mc._width / 2);
m_mc._y = m_y - (m_mc._height / 2);
m_mc._alpha = m_alpha;
m_mc._visible = true;
m_isUpdate = false;
}
}
function destroy() {
Mouse.removeListener(this);
m_mc.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
function setPosition(x, y) {
if ((m_x != x) || (m_y != y)) {
m_x = x;
m_y = y;
m_isUpdate = true;
}
}
function setAlpha(alpha) {
m_alpha = alpha;
m_isUpdate = true;
}
function onMouseDown() {
if (m_isHit) {
app.ad.Advertisement.open(m_adNum);
}
}
function onMouseMove() {
}
function onMouseUp() {
}
function onMouseWheel() {
}
}
Symbol 3456 MovieClip [__Packages.app.enemy.GroundGirl] Frame 0
class app.enemy.GroundGirl extends app.enemy.Enemy
{
var m_mc, m_x, m_y, m_z, m_motion, m_anime, m_show, m_posVec, m_nowPosVec, m_nowMotion, m_nowAnime, m_nowShow, m_baseSize, m_baseScale, m_baseHeight, m_xScale, m_isMotUpdate, m_isPosUpdate, m_motionMode, m_motionTime, m_wl, m_context, m_motLoopTime, m_motLoopLen, m_isEndMotion, m_motLoopStart;
function GroundGirl (context, parentMC, mcid) {
super(context);
m_mc = util.MovieClipFactory.createOnMc(parentMC, mcid, mcid);
m_mc._x = 0;
m_mc._y = 0;
m_mc._visible = true;
m_mc.stop();
m_x = 0;
m_y = 0;
m_z = 0;
m_motion = 1;
m_anime = 1;
m_show = true;
m_posVec = new util.Vector3(0, 0, 0);
m_nowPosVec = new util.Vector3(0, 0, 0);
m_nowMotion = -1;
m_nowAnime = -1;
m_nowShow = false;
m_baseSize = 88;
m_baseScale = 200;
m_baseHeight = 180;
m_xScale = 1;
m_isMotUpdate = true;
m_isPosUpdate = true;
m_motionMode = MOT_STOP;
m_motionTime = 0;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
m_motionTime = m_motionTime + app.sys.SysInfo.getRate();
switch (m_motionMode) {
case MOT_NONELOOP_LOOP :
break;
case MOT_LOOP_LOOP :
m_motionTime = m_motionTime % m_motLoopTime;
m_anime = (m_motLoopLen * m_motionTime) / m_motLoopTime;
m_isMotUpdate = true;
break;
case MOT_ONELOOPFINISH_LOOP :
if (m_motionTime >= m_motLoopTime) {
m_motionTime = m_motLoopTime;
m_isEndMotion = true;
m_motionMode = MOT_NONELOOP_LOOP;
}
m_anime = Math.floor(m_motLoopStart + (((m_motLoopLen - 1) * m_motionTime) / m_motLoopTime));
m_isMotUpdate = true;
break;
case MOT_DANCEONE :
m_motion = ANI_DANCEONE_MOT;
m_anime = 1;
m_motionTime = 0;
m_motLoopTime = ANI_DANCEONE_TIME;
m_motLoopStart = ANI_DANCEONE_START;
m_motLoopLen = ANI_DANCEONE_LEN;
m_motionMode = MOT_ONELOOPFINISH_LOOP;
m_isMotUpdate = true;
break;
case MOT_DANCETWO :
m_motion = ANI_DANCETWO_MOT;
m_anime = 1;
m_motionTime = 0;
m_motLoopTime = ANI_DANCETWO_TIME;
m_motLoopStart = ANI_DANCETWO_START;
m_motLoopLen = ANI_DANCETWO_LEN;
m_motionMode = MOT_ONELOOPFINISH_LOOP;
m_isMotUpdate = true;
break;
case MOT_RUN :
m_motion = ANI_RUN_MOT;
m_anime = 1;
m_motionTime = 0;
m_motLoopTime = ANI_RUN_TIME;
m_motLoopLen = ANI_RUN_LEN;
m_motionMode = MOT_LOOP_LOOP;
m_isMotUpdate = true;
break;
case MOT_STOP :
m_anime = 1;
m_isMotUpdate = true;
m_motionMode = MOT_NONELOOP_LOOP;
}
return(true);
}
function ctrl() {
return(true);
}
function disp() {
if (!app.sys.SysInfo.__get__GameInfo().__get__Ground().isVisible()) {
return(undefined);
}
if (m_isPosUpdate) {
app.sys.SysInfo.__get__GameInfo().__get__Ground().calcPositionWithSize(m_x, m_y, m_z, m_baseHeight, m_posVec);
}
if (m_isMotUpdate) {
if (((m_motion != m_nowMotion) || (m_anime != m_nowAnime)) || (m_show != m_nowShow)) {
m_mc.gotoAndStop(m_motion);
m_mc.Anime.gotoAndStop((m_anime % m_mc.Anime._totalframes) + 1);
m_mc._visible = m_show;
m_nowMotion = m_motion;
m_nowAnime = m_anime;
m_nowShow = m_show;
}
m_isMotUpdate = false;
}
if (m_isPosUpdate) {
if (((m_posVec.x != m_nowPosVec.x) || (m_posVec.y != m_nowPosVec.y)) || (m_posVec.z != m_nowPosVec.z)) {
m_mc._x = m_posVec.x;
m_mc._y = m_posVec.y;
m_mc._yscale = (m_posVec.z / m_baseSize) * m_baseScale;
m_mc._xscale = m_mc._yscale * m_xScale;
m_nowPosVec.x = m_posVec.x;
m_nowPosVec.y = m_posVec.y;
m_nowPosVec.z = m_posVec.z;
}
m_isPosUpdate = false;
}
}
function destroy() {
m_mc.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
}
function setMotion(motion) {
m_motion = motion;
m_isMotUpdate = true;
}
function setAnime(anime) {
m_anime = anime;
m_isMotUpdate = true;
}
function getX() {
return(m_x);
}
function getY() {
return(m_y);
}
function getZ() {
return(m_z);
}
function show() {
m_show = true;
m_isMotUpdate = true;
}
function hide() {
m_show = false;
m_isMotUpdate = true;
}
function initPosition() {
}
function setPosition(x, z) {
m_x = x;
m_z = z;
m_isPosUpdate = true;
}
function startMotion(motionMode) {
m_motionMode = motionMode;
m_motionTime = 0;
m_isEndMotion = false;
}
function isEndMotion() {
return(m_isEndMotion);
}
function setScale(neg) {
m_xScale = neg;
}
static var MOT_DANCEONE = 10;
static var MOT_DANCETWO = 20;
static var MOT_RUN = 30;
static var MOT_STOP = 999;
static var MOT_NONELOOP_LOOP = 200;
static var MOT_LOOP_LOOP = 201;
static var MOT_ONELOOPFINISH_LOOP = 202;
static var ANI_DANCEONE_MOT = 2;
static var ANI_DANCEONE_LEN = 16;
static var ANI_DANCEONE_TIME = 800;
static var ANI_DANCEONE_START = 1;
static var ANI_DANCETWO_MOT = 3;
static var ANI_DANCETWO_LEN = 16;
static var ANI_DANCETWO_TIME = 800;
static var ANI_DANCETWO_START = 1;
static var ANI_RUN_MOT = 1;
static var ANI_RUN_LEN = 16;
static var ANI_RUN_TIME = 800;
}
Symbol 3457 MovieClip [__Packages.app.loop.BonusGameLoop] Frame 0
class app.loop.BonusGameLoop extends app.enemy.Enemy
{
var m_bonusArea, m_context, m_bonusInfoDisplay, m_gameInfoDisplay, m_count, m_mode, m_rest, m_firstIdx, m_secondIdx, m_mcGroundAdFlag;
function BonusGameLoop (context, gameInfoDisplay) {
super(context);
m_bonusArea = new app.enemy.BonusArea(m_context, app.sys.SysInfo.__get__GameInfo().__get__Mound().getAdBaseMC());
m_bonusInfoDisplay = new app.enemy.BonusInfoDisplay(m_context);
m_bonusInfoDisplay.setPosition(640, 0);
m_bonusInfoDisplay.setVisible(false);
m_gameInfoDisplay = gameInfoDisplay;
m_count = 0;
m_mode = MD_INIT;
}
function move() {
var _local15 = true;
var _local2;
var _local6 = app.sys.SysInfo.getRate();
do {
_local2 = false;
switch (m_mode) {
case MD_INIT :
m_count = 0;
m_rest = THROW_NUM;
m_bonusInfoDisplay.setRestBall(m_rest);
m_bonusInfoDisplay.update();
m_mode = MD_TITLE;
_local2 = true;
break;
case MD_TITLE :
new app.enemy.SpecialStageTitle(m_context);
m_count = 0;
m_mode = MD_TITLE_WAIT;
_local2 = true;
break;
case MD_TITLE_WAIT :
var _local8;
m_count = m_count + _local6;
if (m_count <= INFO_DISP_START_TIME) {
_local8 = INFO_DISP_START_X;
m_gameInfoDisplay.setPosition(_local8 - INFO_DISP_MOVE_X, 0);
m_gameInfoDisplay.setVisible(true);
m_bonusInfoDisplay.setPosition(_local8, 0);
m_bonusInfoDisplay.setVisible(false);
} else if (m_count <= INFO_DISP_END_TIME) {
_local8 = util.Util.calcTween(INFO_DISP_START_X, INFO_DISP_START_X + (INFO_DISP_END_X - INFO_DISP_START_X), (m_count - INFO_DISP_START_TIME) / INFO_DISP_SPAN, 100);
m_gameInfoDisplay.setPosition(_local8 - INFO_DISP_MOVE_X, 0);
m_gameInfoDisplay.setVisible(true);
m_bonusInfoDisplay.setPosition(_local8, 0);
m_bonusInfoDisplay.setVisible(true);
}
if (m_count >= TITLE_TIME) {
m_gameInfoDisplay.setPosition(INFO_DISP_END_X - INFO_DISP_MOVE_X, 0);
m_gameInfoDisplay.setVisible(false);
m_bonusInfoDisplay.setPosition(INFO_DISP_END_X, 0);
m_bonusInfoDisplay.setVisible(true);
m_mode = MD_FIRST;
_local2 = true;
}
break;
case MD_FIRST :
m_firstIdx = -1;
m_secondIdx = -1;
m_mode = MD_TARGET;
_local2 = true;
break;
case MD_TARGET :
var _local7;
var _local5 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
_local7 = app.enemy.MoundPitcher(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_PITCHER));
_local7.startMotion(app.enemy.MoundPitcher.MOT_NONE);
_local5.setNoneMode();
_local5.setPosition(0, 160, 1844);
_local5.hide();
m_bonusInfoDisplay.setRestBall(m_rest);
m_bonusInfoDisplay.update();
m_bonusArea.clear();
m_bonusArea.setActive(true);
m_mode = MD_TARGET_WAIT;
_local2 = true;
break;
case MD_TARGET_WAIT :
var _local4;
_local4 = m_bonusArea.getPosition();
if (_local4 != -1) {
m_bonusArea.setActive(false);
m_bonusArea.clear();
if (m_firstIdx == -1) {
m_firstIdx = _local4;
} else {
m_secondIdx = _local4;
}
m_mode = MD_PITCHING;
}
break;
case MD_PITCHING :
_local7 = app.enemy.MoundPitcher(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_PITCHER));
_local7.startMotion(app.enemy.MoundPitcher.MOT_PITCHING);
m_mode = MD_PITCHING_WAIT;
_local2 = true;
break;
case MD_PITCHING_WAIT :
_local7 = app.enemy.MoundPitcher(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_PITCHER));
if (_local7.isEndMotion()) {
m_mode = MD_THROW;
_local2 = true;
}
break;
case MD_THROW :
_local5 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
var _local9;
var _local14;
var _local12;
var _local11;
var _local13;
_local7 = app.enemy.MoundPitcher(app.sys.SysInfo.__get__GameInfo().getMoundCharacter(app.enemy.CharacterType.MOUND_PITCHER));
if (_local7.isEndMotion()) {
_local7.startMotion(app.enemy.MoundPitcher.MOT_PITCHING2);
_local9 = 130 + (Math.random() * 20);
if (m_secondIdx == -1) {
_local4 = m_firstIdx;
} else {
_local4 = m_secondIdx;
}
_local8 = _local4 % TARGET_DIV_X;
_local13 = Math.floor(_local4 / TARGET_DIV_X);
_local14 = (((TARGET_WIDTH * ((((TARGET_DIV_X - _local8) - 1) * 2) + 1)) / (TARGET_DIV_X * 2)) - (TARGET_WIDTH / 2)) - 2;
_local12 = ((TARGET_HEIGHT * ((((TARGET_DIV_Y - _local13) - 1) * 2) + 1)) / (TARGET_DIV_Y * 2)) + 9;
_local11 = -100;
_local5.setMoundMode();
_local5.setMoundParam(_local14, _local12, _local11, 0, 0, 0, _local9);
_local5.show();
app.sys.SysInfo.__get__SoundManager().playSE("Throw");
m_mode = MD_THROW_WAIT;
_local2 = true;
}
break;
case MD_THROW_WAIT :
_local5 = app.sys.SysInfo.__get__GameInfo().__get__Ball();
var _local10 = _local5.getPosition();
if (_local10.z <= -100) {
_local5.hide();
_local5.setNoneMode();
app.sys.SysInfo.__get__SoundManager().playSE("BatHit2");
if (m_secondIdx != -1) {
m_bonusArea.open(m_secondIdx);
} else {
m_bonusArea.open(m_firstIdx);
}
m_count = 0;
m_mode = MD_OPEN_WAIT;
_local2 = true;
}
break;
case MD_OPEN_WAIT :
m_count = m_count + _local6;
if (m_count >= OPEN_TIME) {
m_mode = MD_CHECK;
_local2 = true;
}
break;
case MD_CHECK :
if (m_secondIdx == -1) {
m_mode = MD_HIT;
} else if (m_bonusArea.isHit2(m_firstIdx, m_secondIdx)) {
m_mode = MD_PLUS;
} else {
m_mode = MD_FAIL;
}
m_rest--;
break;
case MD_FAIL :
m_bonusArea.close();
m_firstIdx = -1;
m_secondIdx = -1;
m_count = 0;
m_mode = MD_FAIL_WAIT;
_local2 = true;
break;
case MD_FAIL_WAIT :
m_count = m_count + _local6;
if (m_count >= CLOSE_TIME) {
m_mode = MD_ENCDCHECK;
_local2 = true;
}
break;
case MD_HIT :
m_mode = MD_TARGET;
_local2 = true;
break;
case MD_PLUS :
m_bonusArea.fix();
m_firstIdx = -1;
m_secondIdx = -1;
app.sys.SysInfo.__get__GameInfo().addPlayerScore();
m_mcGroundAdFlag = new app.enemy.GroundAdFlag(m_context, app.ad.Advertisement.AD_FLAG);
m_mcGroundAdFlag.setAlpha(0);
m_mcGroundAdFlag.setPosition(320, 306);
app.sys.SysInfo.__get__SoundManager().playSE("Point");
new app.enemy.ScorePlus(m_context);
m_count = 0;
m_mode = MD_PLUS_LOOP;
break;
case MD_PLUS_LOOP :
m_count = m_count + _local6;
if (m_count < PLUS_END_TIME) {
var _local3;
if (m_count < PLUS_FADE_IN_TIME) {
_local3 = 0;
} else if (m_count < PLUS_FADE_IN_END_TIME) {
_local3 = (100 * (m_count - PLUS_FADE_IN_TIME)) / PLUS_FADE_IN_SPAN;
} else if (m_count < PLUS_FADE_OUT_TIME) {
_local3 = 100;
} else if (m_count < PLUS_FADE_OUT_END_TIME) {
_local3 = 100 * (1 - ((m_count - PLUS_FADE_OUT_TIME) / PLUS_FADE_OUT_SPAN));
} else {
_local3 = 0;
}
m_mcGroundAdFlag.setAlpha(_local3);
} else {
m_mcGroundAdFlag.destroy();
delete m_mcGroundAdFlag;
m_mode = MD_ENCDCHECK;
}
break;
case MD_ENCDCHECK :
m_bonusInfoDisplay.setRestBall(m_rest);
m_bonusInfoDisplay.update();
if (m_rest > 0) {
m_mode = MD_FIRST;
} else {
m_mode = MD_OUT;
}
_local2 = true;
break;
case MD_OUT :
_local8 = INFO_DISP_START_X;
m_gameInfoDisplay.setPosition(_local8 - INFO_DISP_MOVE_X, 0);
m_gameInfoDisplay.setVisible(true);
m_bonusInfoDisplay.setPosition(_local8, 0);
m_bonusInfoDisplay.setVisible(false);
m_mode = MD_END;
_local2 = true;
break;
case MD_END :
_local15 = false;
}
} while (_local2);
return(_local15);
}
function destroy() {
m_bonusArea.destroy();
m_bonusInfoDisplay.destroy();
}
static var MD_INIT = 0;
static var MD_TITLE = 10;
static var MD_TITLE_WAIT = 11;
static var MD_FIRST = 15;
static var MD_TARGET = 20;
static var MD_TARGET_WAIT = 30;
static var MD_PITCHING = 31;
static var MD_PITCHING_WAIT = 32;
static var MD_THROW = 33;
static var MD_THROW_WAIT = 34;
static var MD_OPEN_WAIT = 50;
static var MD_CHECK = 60;
static var MD_FAIL = 70;
static var MD_FAIL_WAIT = 71;
static var MD_HIT = 80;
static var MD_PLUS = 90;
static var MD_PLUS_LOOP = 91;
static var MD_ENCDCHECK = 100;
static var MD_OUT = 110;
static var MD_END = 999;
static var TITLE_TIME = 2000;
static var OPEN_TIME = 2000;
static var CLOSE_TIME = 1000;
static var PLUS_FADE_IN_TIME = 250;
static var PLUS_FADE_IN_SPAN = 250;
static var PLUS_FADE_IN_END_TIME = 500;
static var PLUS_FADE_OUT_TIME = 2500;
static var PLUS_FADE_OUT_SPAN = 250;
static var PLUS_FADE_OUT_END_TIME = 2750;
static var PLUS_END_TIME = 3000;
static var THROW_NUM = 4;
static var TARGET_DIV_X = 3;
static var TARGET_DIV_Y = 3;
static var TARGET_WIDTH = 192;
static var TARGET_HEIGHT = 186;
static var INFO_DISP_START_TIME = 1500;
static var INFO_DISP_END_TIME = 2000;
static var INFO_DISP_SPAN = 500;
static var INFO_DISP_OUT_TIME = 500;
static var INFO_DISP_START_X = 640;
static var INFO_DISP_END_X = 0;
static var INFO_DISP_MOVE_X = 640;
}
Symbol 3458 MovieClip [__Packages.app.enemy.BonusArea] Frame 0
class app.enemy.BonusArea extends app.enemy.Enemy
{
var m_mc, m_panelMcList, m_panelHitList, m_panelStatusList, m_panelChangeList, m_curSelect, m_fixedSelect, m_isActive, m_isUpdate, m_isPanelUpdate, m_checkMouseClick, m_checkMouseMove, m_wl, m_context;
function BonusArea (context, mc) {
super(context);
m_mc = util.MovieClipFactory.createOnMc(mc, "BonusPanelMC", "BonusPanel");
m_mc._x = MC_X;
m_mc._y = MC_Y;
m_mc._visible = true;
m_panelMcList = [];
m_panelHitList = [];
m_panelStatusList = [];
m_panelChangeList = [];
var _local4 = 0;
while (_local4 < PANEL_TOTAL_NUM) {
m_panelMcList.push(m_mc["P_" + _local4]);
m_panelHitList.push(0);
m_panelStatusList.push(STS_CLOSE);
m_panelChangeList.push(CHANGE_NONE);
_local4++;
}
_local4 = 0;
while (_local4 < PANEL_TOTAL_NUM) {
m_panelMcList[_local4].gotoAndStop(1);
m_panelMcList[_local4].panel.BackImage.gotoAndStop(_local4 + 1);
_local4++;
}
_local4 = PANEL_HIT_NUM;
var _local3 = 0;
while (_local4 > 0) {
_local3 = _local3 + util.Util.getRandomInt(PANEL_TOTAL_NUM);
_local3 = _local3 % PANEL_TOTAL_NUM;
if (!m_panelHitList[_local3]) {
m_panelHitList[_local3] = Math.floor((_local4 + 1) / 2);
trace((("HitSet:" + _local3) + ":") + m_panelHitList[_local3]);
_local4--;
}
}
m_mc.Ball._visible = false;
m_curSelect = -1;
m_fixedSelect = -1;
m_isActive = false;
m_isUpdate = true;
m_isPanelUpdate = false;
m_checkMouseClick = false;
m_checkMouseMove = true;
Mouse.addListener(this);
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
var _local3;
var _local2;
if (m_isActive) {
_local3 = m_mc._xmouse;
_local2 = m_mc._ymouse;
if ((((_local3 >= 0) && (_local3 < MC_WIDTH)) && (_local2 >= 0)) && (_local2 < MC_HEIGHT)) {
m_curSelect = Math.floor(_local3 / (MC_WIDTH / MC_DIV_X)) + (Math.floor(_local2 / (MC_HEIGHT / MC_DIV_Y)) * 3);
if (m_panelStatusList[m_curSelect] == STS_CLOSE) {
app.sys.SysInfo.__get__Cursor().show();
} else {
m_curSelect = -1;
app.sys.SysInfo.__get__Cursor().hide();
}
} else {
m_curSelect = -1;
app.sys.SysInfo.__get__Cursor().hide();
}
m_isUpdate = true;
} else {
app.sys.SysInfo.__get__Cursor().hide();
}
if (m_checkMouseClick) {
if (m_curSelect != -1) {
m_fixedSelect = m_curSelect;
}
}
m_checkMouseClick = false;
m_checkMouseMove = false;
return(true);
}
function ctrl() {
return(true);
}
function disp() {
if (m_isUpdate) {
if ((m_curSelect != -1) && (m_isActive)) {
m_mc.Ball._x = (((m_curSelect % 3) * 2) + 1) * ((MC_WIDTH / MC_DIV_X) / 2);
m_mc.Ball._y = ((Math.floor(m_curSelect / 3) * 2) + 1) * ((MC_HEIGHT / MC_DIV_Y) / 2);
m_mc.Ball._visible = true;
} else {
m_mc.Ball._visible = false;
}
m_isUpdate = false;
}
if (m_isPanelUpdate) {
var _local2 = 0;
while (_local2 < PANEL_TOTAL_NUM) {
var _local3 = m_panelChangeList[_local2];
var _local4;
if (_local3 != CHANGE_NONE) {
_local4 = (m_panelHitList[_local2] * 2) + ((_local3 == CHANGE_OPEN) ? 2 : 3);
m_panelMcList[_local2].gotoAndStop(_local4);
m_panelMcList[_local2].panel.Base.BackImage.gotoAndStop(_local2 + 1);
m_panelStatusList[_local2] = ((_local3 == CHANGE_OPEN) ? (STS_OPEN) : (STS_CLOSE));
m_panelChangeList[_local2] = CHANGE_NONE;
}
_local2++;
}
m_isPanelUpdate = false;
}
}
function destroy() {
app.sys.SysInfo.__get__Cursor().hide();
Mouse.removeListener(this);
m_mc.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
function onMouseDown() {
m_checkMouseClick = true;
}
function onMouseMove() {
m_checkMouseMove = true;
}
function onMouseUp() {
}
function onMouseWheel() {
}
function getPosition() {
return(m_fixedSelect);
}
function clear() {
m_fixedSelect = -1;
m_checkMouseClick = false;
m_isUpdate = true;
}
function setActive(isActive) {
m_isActive = isActive;
m_isUpdate = true;
}
function open(idx) {
m_panelChangeList[idx] = CHANGE_OPEN;
m_isPanelUpdate = true;
}
function close() {
var _local2 = 0;
while (_local2 < PANEL_TOTAL_NUM) {
if (m_panelStatusList[_local2] == STS_OPEN) {
trace((("Close[" + _local2) + "] ") + m_panelStatusList[_local2]);
m_panelChangeList[_local2] = CHANGE_CLOSE;
}
_local2++;
}
m_isPanelUpdate = true;
}
function fix() {
var _local2 = 0;
while (_local2 < PANEL_TOTAL_NUM) {
if (m_panelStatusList[_local2] == STS_OPEN) {
trace((("Fix[" + _local2) + "] ") + m_panelStatusList[_local2]);
m_panelStatusList[_local2] = STS_OPEN_FIX;
}
_local2++;
}
}
function isHit(idx) {
trace((("isHit[" + idx) + "]:") + m_panelHitList[idx]);
return(m_panelHitList[idx]);
}
function isHit2(idx1, idx2) {
var _local3;
var _local2;
_local3 = m_panelHitList[idx1];
_local2 = m_panelHitList[idx2];
return(_local3 == _local2);
}
static var MC_X = 370;
static var MC_Y = 97;
static var MC_WIDTH = 180;
static var MC_HEIGHT = 180;
static var MC_DIV_X = 3;
static var MC_DIV_Y = 3;
static var PANEL_TOTAL_NUM = 9;
static var PANEL_HIT_NUM = 8;
static var STS_CLOSE = 0;
static var STS_OPEN = 1;
static var STS_OPEN_FIX = 2;
static var CHANGE_NONE = 0;
static var CHANGE_OPEN = 1;
static var CHANGE_CLOSE = 2;
}
Symbol 3459 MovieClip [__Packages.app.enemy.BonusInfoDisplay] Frame 0
class app.enemy.BonusInfoDisplay extends app.enemy.Enemy
{
var m_mcInfo, m_context, m_restNum, m_x, m_y, m_isVisible, m_isUpdate, m_wl;
function BonusInfoDisplay (context) {
super(context);
m_mcInfo = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "BonusInfoDisplayMC", "BonusInfoDisplay", m_context.getBase());
m_mcInfo._x = 0;
m_mcInfo._y = 0;
m_mcInfo._visible = true;
m_restNum = 0;
m_x = 0;
m_y = 0;
m_isVisible = false;
m_isUpdate = true;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
return(true);
}
function ctrl() {
return(true);
}
function disp() {
var _local5;
var _local3;
var _local7;
var _local8;
var _local4;
var _local2;
var _local6;
if (m_isUpdate) {
if (m_isVisible) {
m_mcInfo._x = m_x;
m_mcInfo._y = m_y;
m_mcInfo.RestBall.text = "" + m_restNum;
}
m_mcInfo._visible = m_isVisible;
m_isUpdate = false;
}
}
function destroy() {
m_mcInfo.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
function update() {
m_isUpdate = true;
}
function setVisible(visible) {
m_isVisible = visible;
m_isUpdate = true;
}
function setRestBall(rest) {
m_restNum = rest;
m_isUpdate = true;
}
function setPosition(x, y) {
if ((m_x != x) || (m_y != y)) {
m_x = x;
m_y = y;
m_isUpdate = true;
}
}
}
Symbol 3460 MovieClip [__Packages.app.enemy.SpecialStageTitle] Frame 0
class app.enemy.SpecialStageTitle extends app.enemy.Enemy
{
var m_mc, m_context, m_count, m_wl;
function SpecialStageTitle (context) {
super(context);
m_mc = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "SpecialStageTitleMC", "SpecialStageTitle", m_context.getBase());
m_mc._x = DISP_X;
m_mc._y = MOVE_IN_Y;
m_mc.cacheAsBitmap = true;
m_mc._visible = false;
m_count = 0;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
var _local2 = true;
m_count = m_count + app.sys.SysInfo.getRate();
if (m_count > OUT_TIME) {
_local2 = false;
}
return(_local2);
}
function disp() {
var _local3;
var _local2;
var _local4;
if (m_count >= 0) {
if (m_count < IN_TIME) {
_local3 = DISP_X;
_local2 = util.Util.calcTween(MOVE_IN_Y, DISP_Y, m_count / IN_SPAN, 100);
} else if (m_count < DISP_TIME) {
_local3 = DISP_X;
_local2 = DISP_Y;
} else if (m_count < OUT_TIME) {
_local3 = DISP_X;
_local2 = util.Util.calcTween(DISP_Y, MOVE_OUT_Y, (m_count - DISP_TIME) / OUT_SPAN, -100);
} else {
_local3 = DISP_X;
_local2 = MOVE_OUT_Y;
}
m_mc._x = _local3;
m_mc._y = _local2;
m_mc._visible = true;
} else {
m_mc._visible = false;
}
}
function destroy() {
m_mc.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
static var IN_TIME = 500;
static var IN_SPAN = 500;
static var DISP_TIME = 1500;
static var DISP_SPAN = 1000;
static var OUT_TIME = 2000;
static var OUT_SPAN = 500;
static var DISP_X = 320;
static var DISP_Y = 240;
static var MOVE_IN_Y = -100;
static var MOVE_OUT_Y = 520;
}
Symbol 3461 MovieClip [__Packages.app.enemy.ScorePlus] Frame 0
class app.enemy.ScorePlus extends app.enemy.Enemy
{
var m_mc, m_context, m_count, m_wl;
function ScorePlus (context) {
super(context);
m_mc = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "ScorePlusMC", "ScorePlus", m_context.getBase());
m_mc._x = DISP_X;
m_mc._y = MOVE_IN_Y;
m_mc.cacheAsBitmap = true;
m_mc._visible = false;
m_count = 0;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
var _local2 = true;
m_count = m_count + app.sys.SysInfo.getRate();
if (m_count > OUT_TIME) {
_local2 = false;
}
return(_local2);
}
function disp() {
var _local3;
var _local2;
var _local4;
if (m_count >= 0) {
if (m_count < IN_TIME) {
_local3 = DISP_X;
_local2 = util.Util.calcTween(MOVE_IN_Y, DISP_Y, m_count / IN_SPAN, 100);
} else if (m_count < DISP_TIME) {
_local3 = DISP_X;
_local2 = DISP_Y;
} else if (m_count < OUT_TIME) {
_local3 = DISP_X;
_local2 = util.Util.calcTween(DISP_Y, MOVE_OUT_Y, (m_count - DISP_TIME) / OUT_SPAN, -100);
} else {
_local3 = DISP_X;
_local2 = MOVE_OUT_Y;
}
m_mc._x = _local3;
m_mc._y = _local2;
m_mc._visible = true;
} else {
m_mc._visible = false;
}
}
function destroy() {
m_mc.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
static var IN_TIME = 500;
static var IN_SPAN = 500;
static var DISP_TIME = 2500;
static var DISP_SPAN = 2000;
static var OUT_TIME = 3000;
static var OUT_SPAN = 500;
static var DISP_X = 320;
static var DISP_Y = 118;
static var MOVE_IN_Y = -200;
static var MOVE_OUT_Y = 511;
}
Symbol 3462 MovieClip [__Packages.util.Quality] Frame 0
class util.Quality
{
function Quality () {
}
static function setHigh() {
_root._quality = "HIGH";
}
static function setMiddle() {
_root._quality = "MEDIUM";
}
static function setLow() {
_root._quality = "LOW";
}
}
Symbol 3463 MovieClip [__Packages.app.enemy.ActionPlayer] Frame 0
class app.enemy.ActionPlayer extends app.enemy.Action
{
var m_subMode, m_isMouseDown, m_controlArea, m_targetArea, m_powerGage, m_selectX, m_selectY, m_changeType, m_swingChangeArea, isBatterReady, getFixedTargetX, getFixedTargetY, m_selectRunnerIdx, isFinished, m_selectBaseIdx, m_pitchPower, m_throwTarget, isPitcherReady, getFixedPower, m_checkMouseMove, m_context;
function ActionPlayer (context) {
super(context);
m_subMode = SD_NONE;
m_isMouseDown = false;
m_controlArea = null;
m_targetArea = null;
m_powerGage = null;
Mouse.addListener(this);
}
function move() {
var _local4;
var _local3;
_local3 = m_subMode;
do {
_local4 = false;
switch (_local3) {
case SD_NONE :
break;
case SD_BATTER :
m_selectX = -1;
m_selectY = -1;
m_changeType = false;
createBatterTargetArea();
m_swingChangeArea.clear();
m_swingChangeArea.setActive(true);
m_swingChangeArea.setDominant(app.sys.SysInfo.__get__GameInfo().getNineDominant());
m_targetArea.setDominant(app.sys.SysInfo.__get__GameInfo().getNineDominant());
_local3 = SD_BATTER_TARGET;
break;
case SD_BATTER_TARGET :
m_selectX = m_targetArea.getX();
m_selectY = m_targetArea.getY();
if (isBatterReady()) {
m_targetArea.setDotPosition(getFixedTargetX(), getFixedTargetY());
m_targetArea.setLimit(1);
m_swingChangeArea.setActive(false);
_local3 = SD_BATTER_TYPE;
} else if (m_swingChangeArea.isChange()) {
m_changeType = true;
} else {
m_selectRunnerIdx = m_controlArea.getRunnerIdx();
}
break;
case SD_BATTER_TYPE :
m_selectX = m_targetArea.getX();
m_selectY = m_targetArea.getY();
if (isFinished()) {
_local3 = SD_BATTER_FINISH;
_local4 = true;
}
break;
case SD_BATTER_FINISH :
deleteTargetArea();
_local3 = SD_BATTER_FINISH_WAIT;
break;
case SD_BATTER_FINISH_WAIT :
break;
case SD_RUNNER :
_local3 = SD_RUNNER_WAIT;
break;
case SD_RUNNER_WAIT :
m_selectRunnerIdx = m_controlArea.getRunnerIdx();
m_selectBaseIdx = m_controlArea.getBaseIdx();
break;
case SD_PITCHER :
m_selectX = -1;
m_selectY = -1;
m_pitchPower = 1;
m_throwTarget = -1;
createPitcherTargetArea();
trace("Player:SD_PITCHER");
_local3 = SD_PITCHER_TARGET;
break;
case SD_PITCHER_TARGET :
var _local5;
m_selectX = m_targetArea.getX();
m_selectY = m_targetArea.getY();
m_pitchPower = m_powerGage.getPower();
if (isPitcherReady()) {
m_targetArea.setDotPosition(getFixedTargetX(), getFixedTargetY());
m_targetArea.setLimit(((getFixedPower() > 50) ? 1 : 2));
m_powerGage.setPower(getFixedPower());
_local3 = SD_PITCHER_TYPE;
_local4 = true;
} else {
_local5 = m_controlArea.getBaseIdx();
if (_local5 != -1) {
m_throwTarget = _local5;
}
}
break;
case SD_PITCHER_TYPE :
m_selectX = m_targetArea.getX();
m_selectY = m_targetArea.getY();
if (isFinished()) {
deleteTargetArea();
_local3 = SD_PITCHER_END;
}
break;
case SD_PITCHER_END :
break;
case SD_DEFENSE :
_local3 = SD_DEFENSE_WAIT;
break;
case SD_DEFENSE_WAIT :
_local5 = m_controlArea.getBaseIdx();
if (_local5 == -1) {
break;
}
m_throwTarget = _local5;
}
} while (_local4);
m_subMode = _local3;
return(super.move());
}
function destroy() {
Mouse.removeListener(this);
super.destroy();
}
function onMouseDown() {
m_isMouseDown = true;
}
function onMouseMove() {
m_checkMouseMove = true;
}
function onMouseUp() {
m_isMouseDown = false;
}
function onMouseWheel() {
}
function mouseIsDown() {
return(m_isMouseDown);
}
function mouseIsUp() {
return(false);
}
function getTargetX() {
return(m_selectX);
}
function getTargetY() {
return(m_selectY);
}
function getPower() {
return(m_pitchPower);
}
function getRunnerIdx() {
return(m_selectRunnerIdx);
}
function getBaseIdx() {
return(m_selectBaseIdx);
}
function getThrowIdx() {
var _local2 = m_throwTarget;
m_throwTarget = -1;
return(_local2);
}
function checkThrowIdx() {
return(m_throwTarget);
}
function retryBatter() {
m_subMode = SD_BATTER;
}
function isChangeType() {
var _local2 = m_changeType;
m_changeType = false;
return(_local2);
}
function createBatterTargetArea() {
deleteTargetArea();
m_targetArea = new app.enemy.TargetArea(m_context, app.enemy.TargetArea.MODE_BATTER);
m_swingChangeArea = new app.enemy.SwingChangeArea(m_context);
}
function createPitcherTargetArea() {
deleteTargetArea();
m_targetArea = new app.enemy.TargetArea(m_context, app.enemy.TargetArea.MODE_PITCHER);
m_powerGage = new app.enemy.PowerGage(m_context);
}
function deleteTargetArea() {
if (m_targetArea != null) {
m_targetArea.destroy();
m_targetArea = null;
}
if (m_powerGage != null) {
m_powerGage.destroy();
m_powerGage = null;
}
if (m_swingChangeArea != null) {
m_swingChangeArea.destroy();
m_swingChangeArea = null;
}
}
function setBatterMode(isNewBatter) {
m_subMode = SD_BATTER;
super.setBatterMode(isNewBatter);
}
function setRunnerMode() {
deleteTargetArea();
m_subMode = SD_RUNNER;
super.setRunnerMode();
}
function setPitcherMode() {
m_subMode = SD_PITCHER;
super.setPitcherMode();
}
function setDefenseMode(isCheck) {
deleteTargetArea();
m_subMode = SD_DEFENSE;
super.setDefenseMode(isCheck);
}
function noneMode() {
m_subMode = SD_NONE;
super.noneMode();
}
function startAttack() {
var _local2;
if (app.sys.SysInfo.__get__GameInfo().isFirst()) {
_local2 = app.sys.SysInfo.__get__GameInfo().getTeamNumberFirst();
} else {
_local2 = app.sys.SysInfo.__get__GameInfo().getTeamNumberLast();
}
if (m_controlArea != null) {
m_controlArea.destroy();
}
m_controlArea = new app.enemy.ControlArea(m_context, _local2);
}
function startDefense() {
var _local2;
if (app.sys.SysInfo.__get__GameInfo().isFirst()) {
_local2 = app.sys.SysInfo.__get__GameInfo().getTeamNumberFirst();
} else {
_local2 = app.sys.SysInfo.__get__GameInfo().getTeamNumberLast();
}
if (m_controlArea != null) {
m_controlArea.destroy();
}
m_controlArea = new app.enemy.ControlArea(m_context, _local2);
}
function end() {
deleteTargetArea();
if (m_controlArea != null) {
m_controlArea.destroy();
m_controlArea = null;
}
}
function btrace(str) {
trace("Player:" + str);
}
static var SD_NONE = 0;
static var SD_BATTER = 100;
static var SD_BATTER_TYPE = 110;
static var SD_BATTER_TYPE_WAIT = 120;
static var SD_BATTER_TARGET = 130;
static var SD_BATTER_TARGET_WAIT = 140;
static var SD_BATTER_FINISH = 150;
static var SD_BATTER_FINISH_WAIT = 160;
static var SD_RUNNER = 200;
static var SD_RUNNER_WAIT = 210;
static var SD_PITCHER = 300;
static var SD_PITCHER_TARGET = 310;
static var SD_PITCHER_TYPE = 320;
static var SD_PITCHER_END = 330;
static var SD_DEFENSE = 400;
static var SD_DEFENSE_WAIT = 410;
}
Symbol 3464 MovieClip [__Packages.app.enemy.TargetArea] Frame 0
class app.enemy.TargetArea extends app.enemy.Enemy
{
var m_mc, m_context, m_mode, m_nowX, m_nowY, m_dotX, m_dotY, m_limit, m_isDominant, m_isUpdate, m_checkMouseClick, m_checkMouseMove, m_wl;
function TargetArea (context, mode) {
super(context);
m_mc = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "TargetAreaMC", "TargetArea", m_context.getBase());
m_mc._x = MC_X;
m_mc._y = MC_Y;
m_mc._visible = true;
m_mc.Dot._visible = false;
m_mc.Arrow._visible = false;
m_mc.Dot.gotoAndStop(((mode == MODE_PITCHER) ? 1 : 2));
m_mode = mode;
m_nowX = -1;
m_nowY = -1;
m_dotX = -1;
m_dotY = -1;
m_limit = 1;
m_isDominant = true;
m_isUpdate = true;
m_checkMouseClick = false;
m_checkMouseMove = true;
Mouse.addListener(this);
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
var _local3;
var _local2;
_local3 = m_mc._xmouse;
_local2 = m_mc._ymouse;
if ((m_dotX == -1) && (m_dotY == -1)) {
if ((((_local3 >= 0) && (_local3 < MC_WIDTH)) && (_local2 >= 0)) && (_local2 < MC_HEIGHT)) {
m_nowX = Math.floor(_local3 / (MC_WIDTH / MC_DIV_X));
m_nowY = Math.floor(_local2 / (MC_HEIGHT / MC_DIV_Y));
app.sys.SysInfo.__get__Cursor().show();
} else {
m_nowX = -1;
m_nowY = -1;
app.sys.SysInfo.__get__Cursor().hide();
}
} else if (m_mode == MODE_BATTER) {
m_nowX = m_dotX;
m_nowY = Math.floor(_local2 / (MC_WIDTH / MC_DIV_Y));
if (m_nowY > m_dotY) {
m_nowY = m_dotY + 1;
}
if (m_nowY < m_dotY) {
m_nowY = m_dotY - 1;
}
} else {
if ((((_local3 >= 0) && (_local3 < MC_WIDTH)) && (_local2 >= 0)) && (_local2 < MC_HEIGHT)) {
m_nowX = Math.floor(_local3 / (MC_WIDTH / MC_DIV_X));
m_nowY = Math.floor(_local2 / (MC_HEIGHT / MC_DIV_Y));
if (m_nowY < m_dotY) {
m_nowY = m_dotY;
}
m_nowX = util.Util.limitRange(m_nowX, m_dotX - m_limit, m_dotX + m_limit);
m_nowY = util.Util.limitRange(m_nowY, m_dotY - m_limit, m_dotY + m_limit);
} else {
m_nowX = m_dotX;
m_nowY = m_dotY;
}
app.sys.SysInfo.__get__Cursor().show();
}
m_isUpdate = true;
m_checkMouseClick = false;
m_checkMouseMove = false;
return(true);
}
function ctrl() {
return(true);
}
function disp() {
if (m_isUpdate) {
if ((m_dotX != -1) && (m_dotY != -1)) {
m_mc.Dot._x = ((m_dotX * 2) + 1) * ((MC_WIDTH / MC_DIV_X) / 2);
m_mc.Dot._y = ((m_dotY * 2) + 1) * ((MC_HEIGHT / MC_DIV_Y) / 2);
m_mc.Dot._xscale = (m_isDominant ? 100 : -100);
m_mc.Dot._visible = true;
if ((m_dotX != m_nowX) || (m_dotY != m_nowY)) {
var _local2;
_local2 = (Math.atan2(m_nowY - m_dotY, m_nowX - m_dotX) / (Math.PI/180)) + 90;
m_mc.Arrow._x = ((m_nowX * 2) + 1) * ((MC_WIDTH / MC_DIV_X) / 2);
m_mc.Arrow._y = ((m_nowY * 2) + 1) * ((MC_HEIGHT / MC_DIV_Y) / 2);
m_mc.Arrow._rotation = _local2;
m_mc.Arrow._visible = true;
} else {
m_mc.Arrow._visible = false;
}
} else if ((m_nowX != -1) && (m_nowY != -1)) {
m_mc.Dot._x = ((m_nowX * 2) + 1) * ((MC_WIDTH / MC_DIV_X) / 2);
m_mc.Dot._y = ((m_nowY * 2) + 1) * ((MC_HEIGHT / MC_DIV_Y) / 2);
m_mc.Dot._xscale = (m_isDominant ? 100 : -100);
m_mc.Dot._visible = true;
} else {
m_mc.Dot._visible = false;
}
m_isUpdate = false;
}
}
function destroy() {
app.sys.SysInfo.__get__Cursor().hide();
Mouse.removeListener(this);
m_mc.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
function onMouseDown() {
m_checkMouseClick = true;
}
function onMouseMove() {
m_checkMouseMove = true;
}
function onMouseUp() {
}
function onMouseWheel() {
}
function getX() {
return(m_nowX);
}
function getY() {
return(m_nowY);
}
function setDotPosition(x, y) {
m_dotX = x;
m_dotY = y;
m_isUpdate = true;
}
function setDominant(isDominant) {
m_isDominant = isDominant;
}
function setLimit(limitNum) {
m_limit = limitNum;
}
function clear() {
m_nowX = -1;
m_nowY = -1;
m_dotX = -1;
m_dotY = -1;
m_isUpdate = true;
}
static var MC_X = 436;
static var MC_Y = 185;
static var MC_WIDTH = 90;
static var MC_HEIGHT = 90;
static var MC_DIV_X = 3;
static var MC_DIV_Y = 3;
static var MODE_PITCHER = 0;
static var MODE_BATTER = 1;
}
Symbol 3465 MovieClip [__Packages.app.enemy.PowerGage] Frame 0
class app.enemy.PowerGage extends app.enemy.Enemy
{
var m_mc, m_context, m_count, m_power, m_fixedPower, m_wl;
function PowerGage (context) {
super(context);
m_mc = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "PowerGageMC", "PowerGage", m_context.getBase());
m_mc._x = MC_X;
m_mc._y = MC_Y;
m_mc._visible = true;
m_mc.Bar._xscale = 1;
m_count = 0;
m_power = 1;
m_fixedPower = -1;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
var _local2;
m_count = m_count + app.sys.SysInfo.getRate();
if (m_fixedPower == -1) {
_local2 = m_count % (BAR_TIME * 2);
_local2 = ((_local2 > BAR_TIME) ? ((BAR_TIME * 2) - _local2) : (_local2));
m_power = util.Util.calcTween(1, 100, _local2 / BAR_TIME, -100);
}
return(true);
}
function ctrl() {
return(true);
}
function disp() {
if (m_fixedPower != -1) {
m_mc.Bar._xscale = m_fixedPower;
} else {
m_mc.Bar._xscale = m_power;
}
}
function destroy() {
m_mc.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
function getPower() {
return(m_power);
}
function setPower(power) {
m_fixedPower = power;
}
static var MC_X = 467;
static var MC_Y = 298;
static var BAR_TIME = 500;
}
Symbol 3466 MovieClip [__Packages.app.enemy.ControlArea] Frame 0
class app.enemy.ControlArea extends app.enemy.Enemy
{
var m_mc, m_context, m_runnerMCList, m_baseMCList, m_runnerIdx, m_baseIdx, m_selectRunnerIdx, m_selectBaseIdx, m_checkMouseClick, m_checkMouseMove, m_wl;
function ControlArea (context, teamNum) {
super(context);
var _local3;
var _local4;
m_mc = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "ControlAreaMC", "ControlArea", m_context.getBase());
m_mc._x = MC_X;
m_mc._y = MC_Y;
m_mc._visible = true;
m_mc.Base.cacheAsBitmap = true;
m_runnerMCList = [];
_local4 = 0;
while (_local4 < RUNNER_MAX) {
_local3 = util.MovieClipFactory.createOnMc(m_mc, "CARunnerMC", "CARunner");
_local3._visible = false;
_local3.cacheAsBitmap = true;
_local3.gotoAndStop(teamNum);
m_runnerMCList.push(_local3);
_local4++;
}
m_baseMCList = [];
_local4 = 0;
while (_local4 < BASE_MAX) {
_local3 = m_mc["Base_" + _local4];
_local3.cacheAsBitmap = true;
m_baseMCList.push(_local3);
_local4++;
}
m_runnerIdx = -1;
m_baseIdx = -1;
m_selectRunnerIdx = -1;
m_selectBaseIdx = -1;
m_checkMouseClick = false;
m_checkMouseMove = true;
Mouse.addListener(this);
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
var _local9;
var _local8;
var _local5;
var _local6;
var _local7;
var _local3;
var _local4;
var _local2;
_local9 = m_mc._xmouse;
_local8 = m_mc._ymouse;
m_selectRunnerIdx = -1;
m_selectBaseIdx = -1;
_local2 = 0;
while (_local2 < RUNNER_MAX) {
_local3 = app.sys.SysInfo.__get__GameControl().getRunner(_local2);
if (_local3.isUse() && (_local3.isActive())) {
_local5 = _local3.getX() * TRANS_SCALE;
_local6 = (-_local3.getZ()) * TRANS_SCALE;
_local7 = util.Util.calcDist(_local5 - _local9, _local6 - _local8);
if ((RUNNER_RAD / 2) > _local7) {
m_selectRunnerIdx = _local2;
break;
}
}
_local2++;
}
if (m_checkMouseClick) {
if (m_selectRunnerIdx != -1) {
m_runnerIdx = m_selectRunnerIdx;
}
}
if (m_selectRunnerIdx == -1) {
_local2 = 0;
while (_local2 < BASE_MAX) {
_local4 = m_baseMCList[_local2];
_local5 = _local9 - _local4._x;
_local6 = _local8 - _local4._y;
_local7 = util.Util.calcDist(_local5, _local6);
if ((_local4._width / 2) > _local7) {
m_selectBaseIdx = _local2;
break;
}
_local2++;
}
if (m_checkMouseClick) {
if (m_selectBaseIdx != -1) {
m_baseIdx = m_selectBaseIdx;
trace("click base:" + _local2);
}
}
}
if ((m_selectRunnerIdx != -1) || (m_selectBaseIdx != -1)) {
app.sys.SysInfo.__get__Cursor().show();
} else {
app.sys.SysInfo.__get__Cursor().hide();
}
m_checkMouseClick = false;
m_checkMouseMove = false;
return(true);
}
function ctrl() {
return(true);
}
function disp() {
var _local2;
var _local4;
var _local3;
var _local5;
var _local6;
_local2 = 0;
while (_local2 < RUNNER_MAX) {
_local4 = app.sys.SysInfo.__get__GameControl().getRunner(_local2);
_local3 = m_runnerMCList[_local2];
if (_local4.isUse() && (_local4.isActive())) {
_local5 = _local4.getX() * TRANS_SCALE;
_local6 = (-_local4.getZ()) * TRANS_SCALE;
_local3._x = _local5;
_local3._y = _local6;
_local3.Select.gotoAndStop(((m_selectRunnerIdx == _local2) ? 2 : 1));
_local3._visible = true;
} else {
_local3._visible = false;
}
_local2++;
}
_local2 = 0;
while (_local2 < 4) {
_local3 = m_baseMCList[_local2];
_local3.gotoAndStop(((m_selectBaseIdx == _local2) ? 2 : 1));
_local2++;
}
}
function destroy() {
var _local2;
app.sys.SysInfo.__get__Cursor().hide();
Mouse.removeListener(this);
while (m_runnerMCList.length > 0) {
_local2 = MovieClip(m_runnerMCList.pop());
_local2.removeMovieClip();
}
m_mc.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
function onMouseDown() {
m_checkMouseClick = true;
}
function onMouseMove() {
m_checkMouseMove = true;
}
function onMouseUp() {
}
function onMouseWheel() {
}
function clear() {
m_runnerIdx = -1;
m_baseIdx = -1;
}
function getRunnerIdx() {
var _local2;
_local2 = m_runnerIdx;
m_runnerIdx = -1;
return(_local2);
}
function getBaseIdx() {
var _local2;
_local2 = m_baseIdx;
m_baseIdx = -1;
return(_local2);
}
static var MC_X = 580;
static var MC_Y = 460;
static var RUNNER_MAX = 4;
static var RUNNER_RAD = 16;
static var BASE_MAX = 4;
static var TRANS_SCALE = 0.0223741865729777;
}
Symbol 3467 MovieClip [__Packages.app.enemy.SwingChangeArea] Frame 0
class app.enemy.SwingChangeArea extends app.enemy.Enemy
{
var m_mode, m_checkMouseClick, m_checkMouseMove, m_isActive, m_mouseClick, m_isDominate, m_wl, m_context;
function SwingChangeArea (context) {
super(context);
m_mode = MODE_NORMAL;
m_checkMouseClick = false;
m_checkMouseMove = false;
m_isActive = false;
m_mouseClick = false;
m_isDominate = true;
Mouse.addListener(this);
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
var _local4;
var _local3;
if (m_isActive) {
_local4 = _root._xmouse;
_local3 = _root._ymouse;
if ((m_isDominate && ((((MC_R_X < _local4) && (_local4 < (MC_R_X + MC_R_WIDTH))) && (MC_R_Y < _local3)) && (_local3 < (MC_R_Y + MC_R_HEIGHT)))) || ((!m_isDominate) && ((((MC_L_X < _local4) && (_local4 < (MC_L_X + MC_L_WIDTH))) && (MC_L_Y < _local3)) && (_local3 < (MC_L_Y + MC_L_HEIGHT))))) {
if (m_checkMouseClick) {
m_mouseClick = true;
}
app.sys.SysInfo.__get__Cursor().show(app.enemy.CursorType.BATTER_IDX);
}
}
m_checkMouseClick = false;
m_checkMouseMove = false;
return(true);
}
function ctrl() {
return(true);
}
function disp() {
}
function destroy() {
app.sys.SysInfo.__get__Cursor().hide();
Mouse.removeListener(this);
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
function onMouseDown() {
m_checkMouseClick = true;
}
function onMouseMove() {
m_checkMouseMove = true;
}
function onMouseUp() {
}
function onMouseWheel() {
}
function setActive(active) {
m_isActive = active;
}
function setMode(mode) {
m_mode = mode;
}
function setDominant(isDominant) {
m_isDominate = isDominant;
}
function clear() {
m_mouseClick = false;
}
function isChange() {
var _local2 = false;
if (m_mouseClick) {
_local2 = true;
m_mouseClick = false;
}
return(_local2);
}
static var MC_R_X = 528;
static var MC_R_Y = 124;
static var MC_R_WIDTH = 54;
static var MC_R_HEIGHT = 160;
static var MC_L_X = 328;
static var MC_L_Y = 124;
static var MC_L_WIDTH = 106;
static var MC_L_HEIGHT = 160;
static var MODE_NORMAL = 0;
static var MODE_BANT = 1;
}
Symbol 3468 MovieClip [__Packages.app.enemy.ActionComputer] Frame 0
class app.enemy.ActionComputer extends app.enemy.Action
{
var m_throwWork, m_runnerWork, m_subMode, m_selectX, m_selectY, m_isMouseDown, m_opponent, m_waitCount, m_runnerIdx, m_selectRunnerIdx, m_resultX, m_resultY, m_pitchPower, m_throwTarget, m_targetRunner;
function ActionComputer (context) {
super(context);
var _local3;
m_throwWork = [];
m_runnerWork = [];
_local3 = 0;
while (_local3 <= 4) {
m_throwWork.push(-1);
m_runnerWork.push(-1);
_local3++;
}
m_subMode = SD_NONE;
}
function move() {
var _local26;
var _local7;
_local7 = m_subMode;
do {
_local26 = false;
switch (_local7) {
case SD_NONE :
break;
case SD_BATTER :
m_selectX = -1;
m_selectY = -1;
m_isMouseDown = false;
_local7 = SD_BATTER_WAIT;
break;
case SD_BATTER_WAIT :
if (m_opponent.isPitcherReady()) {
_local7 = SD_BATTER_TARGET;
}
break;
case SD_BATTER_TARGET :
var _local29;
var _local35;
var _local37;
_local29 = app.sys.SysInfo.__get__GameInfo().getBallCount();
_local35 = app.sys.SysInfo.__get__GameInfo().getBallCount();
_local37 = util.Util.limitRange(_local29 - _local35, 0, 3);
if (checkRandom(BATTER_SWING_STRIKE + (BATTER_SWING_STRIKE_LV * _local37))) {
m_selectX = Math.floor(((app.enemy.Action.TARGET_DIV_X + 1) / 2) - 1);
m_selectY = Math.floor(((app.enemy.Action.TARGET_DIV_Y + 1) / 2) - 1);
} else {
m_selectX = Math.floor(Math.random() * app.enemy.Action.TARGET_DIV_X);
m_selectY = Math.floor(Math.random() * app.enemy.Action.TARGET_DIV_Y);
}
m_isMouseDown = true;
_local7 = SD_BATTER_SWING;
break;
case SD_BATTER_SWING :
if (m_opponent.isPitcherThrow()) {
m_waitCount = BATTER_SWING_BASE_WAIT + (Math.random() * BATTER_SWING_RANDOM_WAIT);
_local7 = SD_BATTER_SWING_WAIT;
}
break;
case SD_BATTER_SWING_WAIT :
m_waitCount = m_waitCount - app.sys.SysInfo.getRate();
if (m_waitCount < 0) {
switch (Math.floor(Math.random() * 3)) {
case 0 :
m_selectY--;
break;
case 1 :
break;
case 2 :
m_selectY++;
}
if ((Math.random() * 100) < BATTER_SWING) {
m_isMouseDown = false;
}
_local7 = SD_BATTER_END;
}
break;
case SD_BATTER_END :
break;
case SD_RUNNER :
m_runnerIdx = 0;
m_selectRunnerIdx = -1;
_local7 = SD_RUNNER_LOOP;
break;
case SD_RUNNER_LOOP :
var _local3;
var _local11 = app.sys.SysInfo.__get__GameControl();
var _local27 = app.sys.SysInfo.__get__GameInfo();
var _local9;
var _local8;
var _local36;
var _local33;
var _local20;
var _local16;
var _local21;
var _local5;
m_selectRunnerIdx = -1;
_local3 = _local11.getRunner(m_runnerIdx);
if (_local3.isActive()) {
_local9 = _local3.getNowDist();
_local8 = _local3.getNowBase();
_local36 = _local3.getFixedBase();
_local33 = _local3.getLastBaseTime();
_local20 = _local11.getCatchTime();
_local16 = false;
_local21 = false;
if (_local8 == 0) {
} else if (_local9 == 0) {
if (_local20 == 0) {
if (_local27.getOutCount() >= 2) {
_local16 = true;
} else if (_local36 == 0) {
_local5 = _local3.getNext();
if (_local5 == -1) {
_local16 = true;
} else {
_local3 = _local11.getRunner(_local5);
if (_local3.getFixedBase() > (_local8 + 1)) {
_local16 = true;
}
}
}
} else if (_local20 == -1) {
if (_local11.getBallCarry() < 0) {
trace("Not Ball Carry Run");
_local16 = true;
}
}
if (_local16) {
m_selectRunnerIdx = m_runnerIdx;
}
} else {
if (_local20 == 0) {
} else if (_local20 == -1) {
if (_local11.getBallCarry() < 0) {
_local21 = false;
}
} else if (_local20 < _local33) {
} else {
_local21 = true;
}
if (_local21) {
if (!_local3.isReverse()) {
m_selectRunnerIdx = m_runnerIdx;
}
}
}
} else {
m_selectRunnerIdx = -1;
}
m_runnerIdx++;
m_runnerIdx = m_runnerIdx % 4;
break;
case SD_PITCHER :
m_selectX = -1;
m_selectY = -1;
m_resultX = -1;
m_resultY = -1;
m_pitchPower = -1;
m_isMouseDown = false;
m_throwTarget = -1;
_local7 = SD_PITCHER_STANDBY;
break;
case SD_PITCHER_STANDBY :
m_waitCount = PITCHER_WAIT + (Math.random() * PITCHER_WAIT_RAMDOM);
_local7 = SD_PITCHER_STANDBY_WAIT;
break;
case SD_PITCHER_STANDBY_WAIT :
m_waitCount = m_waitCount - app.sys.SysInfo.getRate();
if (app.sys.SysInfo.__get__GameControl().isMoveRunner()) {
if (m_waitCount >= 500) {
m_waitCount = Math.random() * 500;
_local7 = SD_PITCHER_CHECK;
}
}
if (m_waitCount <= 0) {
_local7 = SD_PITCHER_TYPE;
}
break;
case SD_PITCHER_CHECK :
m_waitCount = m_waitCount - app.sys.SysInfo.getRate();
if (m_waitCount <= 0) {
m_throwTarget = 1;
}
break;
case SD_PITCHER_TYPE :
var _local19;
m_pitchPower = Math.floor(Math.random() * app.enemy.Action.POWER_MAX);
_local19 = ((m_pitchPower > 50) ? 1 : 2);
_local29 = app.sys.SysInfo.__get__GameInfo().getBallCount();
_local35 = app.sys.SysInfo.__get__GameInfo().getBallCount();
_local37 = util.Util.limitRange(_local29 - _local35, 0, 3);
if (checkRandom(PITCHER_STRIKE + (PITCHER_STRIKE_LV * _local37))) {
m_selectX = Math.floor(Math.random() * app.enemy.Action.TARGET_DIV_X);
m_selectY = Math.floor(Math.random() * (app.enemy.Action.TARGET_DIV_Y - 1));
m_resultX = 1;
m_resultY = 1;
} else {
m_selectX = Math.floor(Math.random() * app.enemy.Action.TARGET_DIV_X);
m_selectY = Math.floor(Math.random() * app.enemy.Action.TARGET_DIV_Y);
m_resultX = Math.floor(Math.random() * app.enemy.Action.TARGET_DIV_X);
m_resultY = Math.floor(Math.random() * app.enemy.Action.TARGET_DIV_Y);
m_resultX = util.Util.limitRange(m_resultX, m_selectX - _local19, m_selectX + _local19);
m_resultY = util.Util.limitRange(m_resultY, m_selectY, m_selectY + _local19);
m_resultX = util.Util.limitRange(m_resultX, 0, app.enemy.Action.TARGET_DIV_X - 1);
m_resultY = util.Util.limitRange(m_resultY, 0, app.enemy.Action.TARGET_DIV_Y - 1);
}
m_isMouseDown = true;
m_waitCount = 500;
_local7 = SD_PITCHER_THROW;
break;
case SD_PITCHER_THROW :
m_waitCount = m_waitCount - app.sys.SysInfo.getRate();
if (m_waitCount <= 0) {
m_selectX = m_resultX;
m_selectY = m_resultY;
m_isMouseDown = false;
_local7 = SD_PITCHER_END;
}
break;
case SD_PITCHER_END :
break;
case SD_DEFENSE :
m_throwTarget = -1;
m_targetRunner = -1;
_local7 = SD_DEFENSE_CATCH;
break;
case SD_DEFENSE_CATCH :
_local11 = app.sys.SysInfo.__get__GameControl();
var _local18;
var _local34;
_local34 = _local11.getBallCarry();
if (_local34 != -1) {
_local18 = app.enemy.GroundFielder(app.sys.SysInfo.__get__GameInfo().getGroundCharacter(_local34));
if (_local18.isHaveBall() && (_local18.isThrowStandby())) {
btrace("CATCH And THROW STANBY");
if (m_targetRunner != -1) {
_local7 = SD_DEFENSE_TOUCH;
} else {
_local7 = SD_DEFENSE_THROW;
}
_local26 = true;
}
}
break;
case SD_DEFENSE_TOUCH :
_local11 = app.sys.SysInfo.__get__GameControl();
var _local24;
var _local32;
var _local31;
var _local30;
var _local28;
_local34 = _local11.getBallCarry();
_local18 = app.enemy.GroundFielder(app.sys.SysInfo.__get__GameInfo().getGroundCharacter(_local34));
_local3 = _local11.getRunner(m_targetRunner);
_local24 = Number.POSITIVE_INFINITY;
if (_local3.isActive()) {
_local32 = _local3.getX();
_local31 = _local3.getZ();
_local30 = _local18.getX();
_local28 = _local18.getZ();
_local24 = util.Util.calcDist(_local32 - _local30, _local31 - _local28);
}
if ((_local24 < _local18.getTouchLimit()) && (_local3.getNowDist() > 0)) {
_local7 = SD_DEFENSE_TOUCH_WAIT;
m_waitCount = 500;
} else {
_local7 = SD_DEFENSE_THROW;
}
break;
case SD_DEFENSE_TOUCH_WAIT :
m_waitCount = m_waitCount - app.sys.SysInfo.getRate();
if (m_waitCount < 0) {
_local7 = SD_DEFENSE_TOUCH;
}
break;
case SD_DEFENSE_THROW :
_local11 = app.sys.SysInfo.__get__GameControl();
var _local6;
var _local14;
var _local10;
var _local4;
var _local39 = -1;
var _local13 = false;
var _local17;
var _local38 = app.sys.SysInfo.getRate() / 1000;
var _local25;
var _local23;
var _local22;
_local34 = _local11.getBallCarry();
_local18 = app.enemy.GroundFielder(app.sys.SysInfo.__get__GameInfo().getGroundCharacter(_local34));
_local4 = 0;
while (_local4 <= 4) {
m_throwWork[_local4] = Number.NEGATIVE_INFINITY;
m_runnerWork[_local4] = -1;
_local4++;
}
_local20 = _local11.getCatchTime();
if (_local20 == -1) {
_local5 = _local11.getFirstRunner();
_local4 = 1;
while (_local5 != -1) {
_local3 = _local11.getRunner(_local5);
if (!_local3.isActive()) {
break;
}
_local8 = _local3.getNowBase();
if (_local8 < _local4) {
_local9 = _local3.getNowDist();
_local10 = _local3.getNextDist();
_local6 = (_local10 - _local9) / _local3.getSpeed();
m_throwWork[_local4] = _local6;
_local13 = true;
}
_local5 = _local3.getNext();
}
} else {
_local5 = _local11.getFirstRunner();
_local4 = 1;
while (_local5 != -1) {
_local3 = _local11.getRunner(_local5);
if (_local3.isActive()) {
_local6 = _local3.getLastBaseTime();
if (_local6 <= _local20) {
_local8 = _local3.getNowBase();
_local14 = _local3.getFixedBase();
if (_local8 > _local14) {
m_throwWork[_local8] = 10000;
} else {
_local6 = _local3.getNowDist() / _local3.getSpeed();
m_throwWork[_local14] = _local6;
}
_local13 = true;
}
}
_local5 = _local3.getNext();
}
}
if (!_local13) {
_local5 = _local11.getFirstRunner();
_local4 = 1;
while (_local5 != -1) {
_local3 = _local11.getRunner(_local5);
if (_local3.isActive()) {
_local8 = _local3.getNowBase();
_local9 = _local3.getNowDist();
_local10 = _local3.getNextDist();
if (_local9 != 0) {
if (_local9 < 1000) {
_local6 = _local9 / _local3.getSpeed();
m_throwWork[_local8] = _local6;
m_runnerWork[_local8] = _local5;
} else {
_local6 = (_local10 - _local9) / _local3.getSpeed();
m_throwWork[_local8 + 1] = _local6;
m_runnerWork[_local8 + 1] = _local5;
}
}
}
_local5 = _local3.getNext();
}
}
_local25 = _local18.getX();
_local23 = _local18.getZ();
_local22 = _local18.getThrowSpeed();
var _local12;
var _local15;
_local4 = 0;
while (_local4 <= 4) {
_local12 = m_throwWork[_local4];
if (_local12 != Number.NEGATIVE_INFINITY) {
_local15 = app.sys.SysInfo.__get__GameInfo().__get__Ground().getBasePosition(_local4);
_local10 = util.Util.calcDist(_local15.x - _local25, _local15.z - _local23);
_local17 = (_local10 / _local22) + 0.5;
m_throwWork[_local4] = m_throwWork[_local4] - _local17;
}
_local4++;
}
_local5 = -1;
_local6 = Number.NEGATIVE_INFINITY;
_local4 = 0;
while (_local4 <= 4) {
_local12 = m_throwWork[_local4];
if (_local12 > _local6) {
_local6 = _local12;
_local5 = _local4;
}
_local4++;
}
if (_local5 != -1) {
m_throwTarget = _local5;
m_targetRunner = m_runnerWork[_local5];
} else {
m_throwTarget = -1;
m_targetRunner = -1;
}
_local7 = SD_DEFENSE_THROW_WAIT;
m_waitCount = 600;
break;
case SD_DEFENSE_THROW_WAIT :
m_waitCount = m_waitCount - app.sys.SysInfo.getRate();
if (m_waitCount >= 0) {
break;
}
m_throwTarget = -1;
_local7 = SD_DEFENSE_CATCH;
}
} while (_local26);
m_subMode = _local7;
return(super.move());
}
function checkRandom(per) {
return((Math.random() * 100) < per);
}
function mouseIsDown() {
return(m_isMouseDown);
}
function mouseIsUp() {
return(false);
}
function getTargetX() {
return(m_selectX);
}
function getTargetY() {
return(m_selectY);
}
function getPower() {
return(m_pitchPower);
}
function getRunnerIdx() {
return(m_selectRunnerIdx);
}
function getThrowIdx() {
var _local2 = m_throwTarget;
m_throwTarget = -1;
return(_local2);
}
function checkThrowIdx() {
return(m_throwTarget);
}
function setBatterMode(isNewBatter) {
m_subMode = SD_BATTER;
super.setBatterMode(isNewBatter);
}
function setRunnerMode() {
m_subMode = SD_RUNNER;
super.setRunnerMode();
}
function setPitcherMode() {
m_subMode = SD_PITCHER;
super.setPitcherMode();
}
function setDefenseMode(isCheck) {
m_subMode = SD_DEFENSE;
super.setDefenseMode(isCheck);
}
function noneMode() {
m_subMode = SD_NONE;
super.noneMode();
}
function btrace(str) {
trace("Computer:" + str);
}
static var SD_NONE = 0;
static var SD_BATTER = 100;
static var SD_BATTER_WAIT = 110;
static var SD_BATTER_TARGET = 120;
static var SD_BATTER_SWING = 130;
static var SD_BATTER_SWING_WAIT = 140;
static var SD_BATTER_END = 150;
static var SD_RUNNER = 200;
static var SD_RUNNER_LOOP = 210;
static var SD_PITCHER = 300;
static var SD_PITCHER_STANDBY = 310;
static var SD_PITCHER_STANDBY_WAIT = 320;
static var SD_PITCHER_CHECK = 330;
static var SD_PITCHER_TYPE = 340;
static var SD_PITCHER_THROW = 350;
static var SD_PITCHER_END = 360;
static var SD_DEFENSE = 400;
static var SD_DEFENSE_CATCH = 410;
static var SD_DEFENSE_TOUCH = 412;
static var SD_DEFENSE_TOUCH_WAIT = 413;
static var SD_DEFENSE_THROW = 420;
static var SD_DEFENSE_THROW_WAIT = 430;
static var BATTER_SWING = 50;
static var BATTER_SWING_STRIKE = 60;
static var BATTER_SWING_STRIKE_LV = 10;
static var BATTER_SWING_COMMON = 30;
static var BATTER_SWING_COMMON_LV = 5;
static var BATTER_SWING_BASE_WAIT = 200;
static var BATTER_SWING_RANDOM_WAIT = 400;
static var RUNNER_STEAL = 10;
static var RUNNER_STEAL_PER = 2;
static var PITCHER_STRIKE = 40;
static var PITCHER_STRIKE_LV = 10;
static var PITCHER_WAIT = 2000;
static var PITCHER_WAIT_RAMDOM = 1000;
}
Symbol 3469 MovieClip [__Packages.app.enemy.ThrowSpeed] Frame 0
class app.enemy.ThrowSpeed extends app.enemy.Enemy
{
var m_mc, m_context, m_count, m_wl;
function ThrowSpeed (context, speed) {
super(context);
m_mc = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "ThrowSpeedMC", "ThrowSpeed", m_context.getBase());
m_mc._x = MC_X;
m_mc._y = MC_Y;
m_mc._visible = true;
m_mc.Speed.text = Math.floor(speed) + " km/h";
m_count = 1500;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
m_count = m_count - app.sys.SysInfo.getRate();
return(m_count >= 0);
}
function ctrl() {
return(true);
}
function disp() {
}
function destroy() {
m_mc.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
static var MC_X = 0;
static var MC_Y = 60;
}
Symbol 3470 MovieClip [__Packages.app.enemy.GroundAdChangeFlag] Frame 0
class app.enemy.GroundAdChangeFlag extends app.enemy.Enemy
{
var m_groundAdFlag, m_context, m_count, m_time, m_wl;
function GroundAdChangeFlag (context, time) {
super(context);
m_groundAdFlag = new app.enemy.GroundAdFlag(m_context, app.ad.Advertisement.AD_FLAG);
m_groundAdFlag.setPosition(320, 290);
m_groundAdFlag.setAlpha(0);
m_count = 0;
m_time = time;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
var _local4 = app.sys.SysInfo.getRate();
var _local3 = true;
var _local2;
m_count = m_count + _local4;
if (m_count < FADE_TIME) {
_local2 = util.Util.calcTween(0, 100, m_count / FADE_TIME, 0);
} else if (m_count < (m_time - FADE_TIME)) {
_local2 = 100;
} else if (m_count < m_time) {
_local2 = util.Util.calcTween(100, 0, (m_count - (m_time - FADE_TIME)) / FADE_TIME, 0);
} else {
_local2 = 0;
_local3 = false;
}
m_groundAdFlag.setAlpha(_local2);
return(_local3);
}
function destroy() {
m_groundAdFlag.destroy();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
static var FADE_TIME = 250;
}
Symbol 3471 MovieClip [__Packages.app.enemy.HomeRunAdMessage] Frame 0
class app.enemy.HomeRunAdMessage extends app.enemy.HomeRunMessage
{
var m_mcMenu, m_context, m_isUpdate, m_count, m_wl;
function HomeRunAdMessage (context) {
super(context);
m_mcMenu = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "MessageHomerunMC", "MessageHomerun", m_context.getBase());
m_mcMenu._x = 164;
m_mcMenu._y = 440;
m_mcMenu._xscale = 80;
m_mcMenu._yscale = 80;
m_mcMenu.cacheAsBitmap = true;
m_mcMenu._visible = false;
m_isUpdate = false;
m_count = 0;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
if (m_count >= 0) {
m_count = m_count + app.sys.SysInfo.getRate();
m_isUpdate = true;
}
return(true);
}
function ctrl() {
return(true);
}
function disp() {
if (m_isUpdate) {
var _local3;
var _local2;
if (m_count >= 0) {
if (m_count < IN_TIME) {
_local2 = util.Util.calcTween(MOVE_Y, DISP_Y, m_count / IN_SPAN, -100);
_local3 = DISP_X;
} else {
_local3 = DISP_X;
_local2 = DISP_Y;
}
m_mcMenu._x = _local3;
m_mcMenu._y = _local2;
m_mcMenu._visible = true;
} else {
m_mcMenu._visible = false;
}
m_isUpdate = false;
}
}
function destroy() {
m_mcMenu.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
static var IN_TIME = 500;
static var IN_SPAN = 500;
static var DISP_X = 320;
static var DISP_Y = 88;
static var MOVE_Y = -40;
}
Symbol 3472 MovieClip [__Packages.app.enemy.GroundAdHomeRunFlag] Frame 0
class app.enemy.GroundAdHomeRunFlag extends app.enemy.Enemy
{
var m_groundAdFlag, m_context, m_count, m_time, m_wl;
function GroundAdHomeRunFlag (context, time) {
super(context);
m_groundAdFlag = new app.enemy.GroundAdFlag(m_context, app.ad.Advertisement.AD_FLAG);
m_groundAdFlag.setPosition(320, 272);
m_groundAdFlag.setAlpha(0);
m_count = -WAIT_TIME;
m_time = time - WAIT_TIME;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
var _local4 = app.sys.SysInfo.getRate();
var _local3 = true;
var _local2;
m_count = m_count + _local4;
if (m_count < 0) {
_local2 = 0;
} else if (m_count < FADE_TIME) {
_local2 = util.Util.calcTween(0, 100, m_count / FADE_TIME, 0);
} else if (m_count < (m_time - FADE_TIME)) {
_local2 = 100;
} else if (m_count < m_time) {
_local2 = util.Util.calcTween(100, 0, (m_count - (m_time - FADE_TIME)) / FADE_TIME, 0);
} else {
_local2 = 0;
_local3 = false;
}
m_groundAdFlag.setAlpha(_local2);
return(_local3);
}
function destroy() {
m_groundAdFlag.destroy();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
static var WAIT_TIME = 500;
static var FADE_TIME = 250;
}
Symbol 3473 MovieClip [__Packages.app.enemy.HomeRunNormalMessage] Frame 0
class app.enemy.HomeRunNormalMessage extends app.enemy.HomeRunMessage
{
var m_mcMenu, m_context, m_isUpdate, m_count, m_wl;
function HomeRunNormalMessage (context) {
super(context);
m_mcMenu = util.MovieClipFactory.createWithBase(app.sys.Screen.OT_STATUS, "MessageHomerunMC", "MessageHomerun", m_context.getBase());
m_mcMenu._x = 164;
m_mcMenu._y = 440;
m_mcMenu.cacheAsBitmap = true;
m_mcMenu._visible = false;
m_isUpdate = false;
m_count = 0;
m_wl = app.sys.SysInfo.__get__WorkList().appendWithAttr(this, m_context.getAttr());
}
function move() {
if (m_count >= 0) {
m_count = m_count + app.sys.SysInfo.getRate();
m_isUpdate = true;
}
return(true);
}
function ctrl() {
return(true);
}
function disp() {
if (m_isUpdate) {
var _local3;
var _local2;
if (m_count >= 0) {
if (m_count < IN_TIME) {
_local2 = util.Util.calcTween(MOVE_Y, DISP_Y, m_count / IN_SPAN, -100);
_local3 = DISP_X;
} else {
_local3 = DISP_X;
_local2 = DISP_Y;
}
m_mcMenu._x = _local3;
m_mcMenu._y = _local2;
m_mcMenu._visible = true;
} else {
m_mcMenu._visible = false;
}
m_isUpdate = false;
}
}
function destroy() {
m_mcMenu.removeMovieClip();
app.sys.SysInfo.__get__WorkList().cut(m_wl);
delete m_wl;
}
static var IN_TIME = 500;
static var IN_SPAN = 500;
static var DISP_X = 320;
static var DISP_Y = 190;
static var MOVE_Y = -40;
}
Symbol 3385 MovieClip Frame 1
function connectSWHiscore(functionType, hiscoreID, scoreNum) {
this.createEmptyMovieClip("httpObj", this.httpObjDepth);
switch (functionType) {
case "view" :
this.httpObj.gameid = this.gameID;
this.httpObj.hiscoreid = hiscoreID;
this.httpObj.getURL(this.viewHURL, "_blank", "POST");
break;
case "submit" :
this.recieve_lv = new LoadVars();
this.recieve_lv.hiscoreConnector = this;
this.recieve_lv.onLoad = function (isSuccess) {
if (isSuccess) {
this.hiscoreConnector.httpObj.tempID = this.tempID;
this.hiscoreConnector.httpObj.getURL(this.hiscoreConnector.submitGetHURL, "_blank", "GET");
}
};
this.submit_lv = new LoadVars();
this.submit_lv.score = scoreNum;
this.submit_lv.gameid = this.gameID;
this.submit_lv.hiscoreid = hiscoreID;
this.submit_lv.sendAndLoad(this.submitPostHURL, this.recieve_lv, "POST");
}
}
this.swc_mc._visible = false;
this.viewHURL = "http://hiscore.jp.shockwave.com/rank/member/control/listscore.php";
this.submitPostHURL = "http://hiscore.jp.shockwave.com/rank/member/control/maketemp.php";
this.submitGetHURL = "http://hiscore.jp.shockwave.com/rank/member/control/logintemp.php";
Symbol 3385 MovieClip Frame 2
this.stop();