Section 1
//CastNumEffect (effect.CastNumEffect)
package effect {
import flash.display.*;
public dynamic class CastNumEffect extends MovieClip {
public var number1_mc:MovieClip;
public var number2_mc:MovieClip;
public function CastNumEffect(){
super();
addFrameScript(25, frame26);
}
function frame26(){
this.visible = false;
}
public function show(castNum:int):void{
var num2:int;
var num1:int;
if (castNum > 100){
castNum = 99;
} else {
if (castNum < 0){
castNum = 0;
};
};
num2 = (castNum / 10);
num1 = (castNum - (num2 * 10));
this.number1_mc.gotoAndStop((num1 + 1));
if (num2 == 0){
this.number2_mc.visible = false;
} else {
this.number2_mc.visible = true;
this.number2_mc.gotoAndStop((num2 + 1));
};
this.visible = true;
this.gotoAndPlay(1);
}
}
}//package effect
Section 2
//ErasedBlockEffect (effect.ErasedBlockEffect)
package effect {
import game.*;
import flash.display.*;
public class ErasedBlockEffect extends MovieClip {
public var pict1_mc:MovieClip;
public var pict2_mc:MovieClip;
public function ErasedBlockEffect(w:int, h:int, blockInfo:BlockInfo){
super();
addFrameScript(15, frame16);
this.x = (Board.UNIT_SIZE * (w - 1));
this.y = ((-1 * Board.UNIT_SIZE) * (h - 1));
this.pict1_mc.gotoAndStop(blockInfo.color);
this.pict2_mc.gotoAndStop(blockInfo.color);
this.play();
}
function frame16(){
this.stop();
this.die();
}
public function die():void{
this.parent.removeChild(this);
}
}
}//package effect
Section 3
//AttackerGadget1 (game.attacker.AttackerGadget1)
package game.attacker {
import game.*;
import net.chibitami.gameUtil.*;
public class AttackerGadget1 implements IAttackerGadget {
private var _random:Random;
private var _fixedLevelArray:Array;
private var _attackPosArray:Array;
private static const MAXNUM:int = 60;
public function AttackerGadget1(randSeed:uint){
super();
this._random = new Random(randSeed);
this._attackPosArray = new Array(4, 3, 4, 2, 3, 4, 1, 2, 3, 4, 2, 3, 4, 3, 4, 4, 3, 4, 2, 3, 4, 1, 2, 3, 4, 2, 3, 4, 3, 4);
this._fixedLevelArray = new Array(1000, 100, 500, 300, 700, 200, 0, 0, 0, 0, 0, 0);
}
private function setBlockInfoArray(level:int, attackNum:int, blockInfoArray:Array):void{
var attackIndex:int;
var hArray:Array;
var w:int;
var blackPosW:int;
var attackPosW:int;
var posW:int;
var type:int;
attackIndex = 0;
hArray = new Array(9);
w = 0;
while (w < 9) {
hArray[w] = 0;
w++;
};
if ((attackNum % 2) == 1){
attackNum++;
};
blackPosW = 8;
if (level < 100){
blackPosW = 9;
} else {
if (level < 200){
blackPosW = 8;
} else {
if (level < 300){
blackPosW = 7;
} else {
if (level < 400){
blackPosW = 6;
} else {
if (level < 500){
blackPosW = 5;
} else {
blackPosW = 4;
};
};
};
};
};
while (attackNum >= 0) {
attackPosW = this._attackPosArray[(attackIndex % this._attackPosArray.length)];
posW = attackPosW;
if ((attackNum % 2) == 1){
posW = (9 - attackPosW);
};
if (posW >= blackPosW){
blockInfoArray[posW][hArray[posW]] = new BlockInfo(BlockInfo.TYPE_NORMAL, BlockInfo.COLOR_BLACK);
var _local11 = hArray;
var _local12 = posW;
var _local13 = (_local11[_local12] + 1);
_local11[_local12] = _local13;
} else {
type = BlockInfo.TYPE_NORMAL;
if ((((attackPosW == (blackPosW - 1))) && ((level < this._fixedLevelArray[hArray[attackPosW]])))){
type = BlockInfo.TYPE_FIXED;
};
blockInfoArray[attackPosW][hArray[attackPosW]] = new BlockInfo(type, this.getRandomColor());
_local11 = hArray;
_local12 = attackPosW;
_local13 = (_local11[_local12] + 1);
_local11[_local12] = _local13;
};
if ((attackNum % 2) == 1){
attackIndex++;
};
attackNum--;
};
}
public function setNextAttackSingle(level:int, blockInfoArray:Array):void{
var attackNum:int;
attackNum = (6 + (2 * (level / 50)));
this.setBlockInfoArray(level, attackNum, blockInfoArray);
}
private function getRandomColor():int{
var rand:Number;
var color:int;
rand = this._random.nextNumber();
if (rand < 0.25){
color = BlockInfo.COLOR_RED;
} else {
if (rand < 0.5){
color = BlockInfo.COLOR_BLUE;
} else {
if (rand < 0.75){
color = BlockInfo.COLOR_GREEN;
} else {
color = BlockInfo.COLOR_YELLOW;
};
};
};
return (color);
}
public function setNextAttackBattle(level:int, erasedNum:int, blockInfoArray:Array):void{
}
public function getFrameToFall(level:int):int{
var ret:int;
if (level < 200){
ret = (900 - (level * 2));
} else {
if (level < 400){
level = (level - 200);
ret = (500 - level);
} else {
if (level < 600){
level = (level - 400);
ret = (300 - (level / 2));
} else {
level = (level - 600);
ret = Math.max((200 - (level / 4)), 90);
};
};
};
return (ret);
}
}
}//package game.attacker
Section 4
//AttackerGadget2 (game.attacker.AttackerGadget2)
package game.attacker {
import game.*;
import net.chibitami.gameUtil.*;
public class AttackerGadget2 implements IAttackerGadget {
private var _random:Random;
private var _fixedLevelArray:Array;
private var _attackPosArray:Array;
private static const MAXNUM:int = 60;
public function AttackerGadget2(randSeed:uint){
super();
this._random = new Random(randSeed);
this._attackPosArray = new Array(4, 3, 4, 2, 3, 4, 1, 2, 3, 4, 2, 3, 4, 3, 4, 4, 3, 4, 2, 3, 4, 1, 2, 3, 4, 2, 3, 4, 3, 4);
this._fixedLevelArray = new Array(1000, 350, 200, 500, 250, 400, 300, 600, 0, 700, 0, 0);
}
private function setBlockInfoArray(level:int, attackNum:int, blockInfoArray:Array):void{
var attackIndex:int;
var hArray:Array;
var w:int;
var blackPosW:int;
var attackPosW:int;
var posW:int;
var type:int;
attackIndex = 0;
hArray = new Array(9);
w = 0;
while (w < 9) {
hArray[w] = 0;
w++;
};
if ((attackNum % 2) == 1){
attackNum++;
};
blackPosW = 8;
if (level < 120){
blackPosW = 7;
} else {
if (level < 240){
blackPosW = 6;
} else {
if (level < 360){
blackPosW = 5;
} else {
blackPosW = 4;
};
};
};
while (attackNum > 0) {
attackPosW = this._attackPosArray[(attackIndex % this._attackPosArray.length)];
posW = attackPosW;
if ((attackNum % 2) == 1){
posW = (9 - attackPosW);
};
if (posW >= blackPosW){
blockInfoArray[posW][hArray[posW]] = new BlockInfo(BlockInfo.TYPE_NORMAL, BlockInfo.COLOR_BLACK);
var _local11 = hArray;
var _local12 = posW;
var _local13 = (_local11[_local12] + 1);
_local11[_local12] = _local13;
} else {
type = BlockInfo.TYPE_NORMAL;
if ((((posW == (blackPosW - 1))) && ((level >= this._fixedLevelArray[hArray[posW]])))){
type = BlockInfo.TYPE_FIXED;
};
blockInfoArray[posW][hArray[posW]] = new BlockInfo(type, this.getRandomColor());
_local11 = hArray;
_local12 = posW;
_local13 = (_local11[_local12] + 1);
_local11[_local12] = _local13;
};
if ((attackNum % 2) == 1){
attackIndex++;
};
attackNum--;
};
}
public function setNextAttackSingle(level:int, blockInfoArray:Array):void{
var attackNum:int;
attackNum = (6 + (2 * (level / 50)));
this.setBlockInfoArray(level, attackNum, blockInfoArray);
}
private function getRandomColor():int{
var rand:Number;
var color:int;
rand = this._random.nextNumber();
if (rand < 0.25){
color = BlockInfo.COLOR_RED;
} else {
if (rand < 0.5){
color = BlockInfo.COLOR_BLUE;
} else {
if (rand < 0.75){
color = BlockInfo.COLOR_GREEN;
} else {
color = BlockInfo.COLOR_YELLOW;
};
};
};
return (color);
}
public function setNextAttackBattle(level:int, erasedNum:int, blockInfoArray:Array):void{
}
public function getFrameToFall(level:int):int{
var ret:int;
if (level < 100){
ret = (1000 - (level * 4));
} else {
if (level < 200){
level = (level - 100);
ret = (600 - level);
} else {
if (level < 300){
level = (level - 200);
ret = (500 - (level / 2));
} else {
level = (level - 300);
ret = Math.max((450 - (level / 5)), 300);
};
};
};
return (ret);
}
}
}//package game.attacker
Section 5
//AttackerSingle (game.attacker.AttackerSingle)
package game.attacker {
import game.*;
public class AttackerSingle {
private var _frameToFall:int;
private var _level:int;
private var _board:Board;
private var _gadget:IAttackerGadget;
private var _frameNum:int;
private var _blockInfoArray:Array;
public function AttackerSingle(board:Board, charaNum:int, randSeed:int){
var w:int;
var h:int;
super();
this._board = board;
this._level = 0;
this._frameNum = 0;
this._frameToFall = 0;
this._blockInfoArray = new Array((Board.BW + 1));
w = 0;
while (w <= Board.BW) {
this._blockInfoArray[w] = new Array(Board.BH);
h = 0;
while (h < Board.BH) {
this._blockInfoArray[w][h] = null;
h++;
};
w++;
};
if (charaNum == 1){
this._gadget = new AttackerGadget1(randSeed);
} else {
if (charaNum == 2){
this._gadget = new AttackerGadget2(randSeed);
} else {
if (charaNum == 3){
this._gadget = new AttackerGadget1(randSeed);
} else {
if (charaNum == 4){
this._gadget = new AttackerGadget1(randSeed);
} else {
if (charaNum == 5){
this._gadget = new AttackerGadget1(randSeed);
} else {
if (charaNum == 6){
this._gadget = new AttackerGadget1(randSeed);
} else {
this._gadget = new AttackerGadget1(randSeed);
};
};
};
};
};
};
}
public function setLevel(level:int):void{
this._level = level;
this._frameToFall = this._gadget.getFrameToFall(this._level);
this._gadget.setNextAttackSingle(this._level, this._blockInfoArray);
}
public function getFallTimeRatio():Number{
return (((this._frameNum * 1) / this._frameToFall));
}
public function check():void{
var w:int;
var h:int;
this._frameNum++;
if (this._frameNum > this._frameToFall){
this._board.damage(this._blockInfoArray);
this._frameNum = 0;
w = 0;
while (w <= Board.BW) {
h = 0;
while (h < Board.BH) {
this._blockInfoArray[w][h] = null;
h++;
};
w++;
};
this._gadget.setNextAttackSingle(this._level, this._blockInfoArray);
};
}
}
}//package game.attacker
Section 6
//IAttackerGadget (game.attacker.IAttackerGadget)
package game.attacker {
public interface IAttackerGadget {
function setNextAttackBattle(_arg1:int, _arg2:int, _arg3:Array):void;
function setNextAttackSingle(_arg1:int, _arg2:Array):void;
function getFrameToFall(:int):int;
}
}//package game.attacker
Section 7
//InputLogger (game.logger.InputLogger)
package game.logger {
import game.*;
public class InputLogger {
private var _logArray:Array;
private var _prevFrame:int;
public function InputLogger(){
super();
this._logArray = new Array();
this._prevFrame = 0;
}
function getNextLog():Array{
var frameNum:int;
var cursor:int;
var button:int;
var log:*;
frameNum = 0;
cursor = 0;
button = 0;
do {
frameNum = 0;
cursor = 0;
button = 0;
if (this._logArray.length == 0){
return (null);
};
log = this._logArray.shift();
frameNum = (log / 20);
log = (log - (20 * frameNum));
cursor = (log / 4);
log = (log - (4 * cursor));
button = log;
this._prevFrame = (this._prevFrame + frameNum);
} while ((((cursor == 0)) && ((button == 0))));
if (cursor == 0){
cursor = Direction.NEUTRAL;
} else {
if (cursor == 1){
cursor = Direction.UP;
} else {
if (cursor == 2){
cursor = Direction.DOWN;
} else {
if (cursor == 3){
cursor = Direction.LEFT;
} else {
if (cursor == 4){
cursor = Direction.RIGHT;
};
};
};
};
};
if (button == 0){
button = 0;
} else {
if (button == 1){
button = Config.KEY_ROTATE_LEFT;
} else {
if (button == 2){
button = Config.KEY_ROTATE_RIGHT;
} else {
if (button == 3){
button = Config.KEY_REFILL;
};
};
};
};
return (new Array(this._prevFrame, cursor, button));
}
function setString(dataStr:String):Boolean{
var index:int;
var log:int;
this._logArray = new Array();
this._prevFrame = 0;
index = 0;
while (index <= dataStr.length) {
this._logArray.push(parseInt(dataStr.substr(index, 2), 16));
index = (index + 2);
};
return (true);
}
function addLog(frameNum:int, cursor:int, button:int):void{
var log:*;
var frameInterval:int;
log = 0;
if (cursor == Direction.UP){
log = (log + 4);
} else {
if (cursor == Direction.DOWN){
log = (log + 8);
} else {
if (cursor == Direction.LEFT){
log = (log + 12);
} else {
if (cursor == Direction.RIGHT){
log = (log + 16);
};
};
};
};
if (button == Config.KEY_ROTATE_LEFT){
log = (log + 1);
} else {
if (button == Config.KEY_ROTATE_RIGHT){
log = (log + 2);
} else {
if (button == Config.KEY_REFILL){
log = (log + 3);
};
};
};
frameInterval = (frameNum - this._prevFrame);
while (frameInterval > 10) {
this._logArray.push(200);
frameInterval = (frameInterval - 10);
};
log = (log + (20 * frameInterval));
this._logArray.push(log);
this._prevFrame = frameNum;
}
function getString():String{
var retStr:String;
var i:int;
retStr = "";
i = 0;
while (i < this._logArray.length) {
retStr = (retStr + (this._logArray[i] as int).toString(16));
i++;
};
return (retStr);
}
}
}//package game.logger
Section 8
//LoggerSingle (game.logger.LoggerSingle)
package game.logger {
import game.*;
public class LoggerSingle {
private var _playInfo:PlayInfo;
private var _inputLogger:InputLogger;
public function LoggerSingle(playInfo:PlayInfo=null){
super();
this._playInfo = playInfo;
this._inputLogger = new InputLogger();
}
public function getNextInputLog():Array{
return (this._inputLogger.getNextLog());
}
public function get playInfo():PlayInfo{
return (this._playInfo);
}
public function addInputLog(frameNum:int, cursor:int, button:int):void{
this._inputLogger.addLog(frameNum, cursor, button);
}
public function getString():String{
return ((((("|" + this._playInfo.getString()) + "|") + this._inputLogger.getString()) + "|"));
}
public function setString(dataStr:String):Boolean{
var strArray:Array;
strArray = dataStr.split("|");
if (strArray.length != 4){
return (false);
};
this._playInfo = new PlayInfo();
if (this._playInfo.setString(strArray[1]) == false){
return (false);
};
this._inputLogger = new InputLogger();
if (this._inputLogger.setString(strArray[2]) == false){
return (false);
};
return (true);
}
}
}//package game.logger
Section 9
//GameDataSingle (game.single.GameDataSingle)
package game.single {
import game.*;
import net.chibitami.gameUtil.*;
public class GameDataSingle {
private var _level:int;
private var _startLevel:int;
private var _timer:GameTimer;
private var _score:int;
private var _scoreMultiply:int;
private var _charaNum:int;
public function GameDataSingle(charaNum:int, startLevel:int){
super();
this._score = 0;
this._timer = new GameTimer();
this._charaNum = charaNum;
this._startLevel = startLevel;
if (startLevel == PlayInfo.LEVEL_PRACTICE){
this._level = 0;
this._scoreMultiply = 0;
} else {
if (startLevel == PlayInfo.LEVEL_EASY){
this._level = 0;
this._scoreMultiply = 1;
} else {
if (startLevel == PlayInfo.LEVEL_NORMAL){
this._level = 100;
this._scoreMultiply = 2;
} else {
if (startLevel == PlayInfo.LEVEL_HARD){
this._level = 200;
this._scoreMultiply = 4;
} else {
this._level = 300;
this._scoreMultiply = 8;
};
};
};
};
}
public function startTimer():void{
this._timer.start();
}
public function get level():int{
return (this._level);
}
public function get score():int{
return (this._score);
}
public function resumeTimer():void{
this._timer.resume();
}
public function stopTimer():void{
this._timer.pause();
}
public function get time():String{
return (this._timer.getString());
}
public function save():void{
var saveData:SaveData;
var savePos:int;
var prevHighScore:int;
saveData = SaveData.getInstance();
savePos = -1;
if (this._startLevel == PlayInfo.LEVEL_EASY){
savePos = 0;
} else {
if (this._startLevel == PlayInfo.LEVEL_NORMAL){
savePos = 1;
} else {
if (this._startLevel == PlayInfo.LEVEL_HARD){
savePos = 2;
} else {
if (this._startLevel == PlayInfo.LEVEL_CHAOS){
savePos = 3;
};
};
};
};
prevHighScore = saveData.highScoreArray[this._charaNum][savePos];
if (this._score > prevHighScore){
saveData.highScoreArray[this._charaNum][savePos] = this._score;
saveData.save();
};
}
public function castEnd(castNum:int, erasedNum:int):void{
this._score = (this._score + (((castNum * erasedNum) * 100) * this._scoreMultiply));
this._level = (this._level + castNum);
}
}
}//package game.single
Section 10
//GameOverMenuSingle (game.single.GameOverMenuSingle)
package game.single {
import flash.display.*;
public class GameOverMenuSingle extends MovieClip {
private var _selected:int;
public var log_mc:MovieClip;
private var _logStr:String;
public var pict_mc:MovieClip;
public static const MENU_QUIT:int = 4;
public static const MENU_LOG:int = 3;
private static const MENUNUM:int = 4;
public static const MENU_CHARASELECT:int = 2;
public static const MENU_RETRY:int = 1;
public function GameOverMenuSingle(){
super();
addFrameScript(7, frame8);
}
private function repaint():void{
this.pict_mc.gotoAndStop(this._selected);
}
public function init():void{
this._selected = MENU_RETRY;
this._logStr = "";
this.log_mc.visible = false;
this.repaint();
}
public function selectNext():void{
this._selected++;
if ((((Config.getInstance().recordLog == false)) && ((this._selected == MENU_LOG)))){
this._selected++;
};
if (this._selected > MENUNUM){
this._selected = 1;
};
this.repaint();
}
public function changeLogView():void{
if (this.log_mc.visible == false){
this.log_mc.visible = true;
this.log_mc.logStrTextArea.text = this._logStr;
} else {
this.log_mc.visible = false;
};
}
function frame8(){
this.stop();
}
public function selectPrev():void{
this._selected--;
if ((((Config.getInstance().recordLog == false)) && ((this._selected == MENU_LOG)))){
this._selected--;
};
if (this._selected <= 0){
this._selected = MENUNUM;
};
this.repaint();
}
public function appear():void{
this.visible = true;
this.gotoAndPlay(1);
}
public function get selected():int{
return (this._selected);
}
public function setLogStr(logStr:String):void{
this._logStr = logStr;
}
}
}//package game.single
Section 11
//GameSingle (game.single.GameSingle)
package game.single {
import game.*;
import game.logger.*;
import net.chibitami.gameUtil.*;
import flash.display.*;
import sound.*;
import game.attacker.*;
import flash.text.*;
public class GameSingle extends MovieClip implements IBoardEventManager {
private var _attackerActiveFlag:Boolean;
private var _keyChecker:KeyChecker;
public var scoreTextArea:TextField;
private var _gameData:GameDataSingle;
public var level_mc:MagicLevelPict;
private var _SEPlayer:SystemSEPlayer;
private var _frameNum:int;
private var _attacker:AttackerSingle;
public var timeTextArea:TextField;
private var _playInfo:PlayInfo;
public var menu_mc:GameOverMenuSingle;
public var pause_mc:MovieClip;
private var _config:Config;
private var _state:int;
public var board_mc:Board;
private var _logger:LoggerSingle;
public var attackTimeBar_mc:MovieClip;
public static const STATE_GAME:int = 1;
public static const STATE_WAIT:int = 3;
public static const STATE_NONE:int = 0;
public static const STATE_PAUSE:int = 2;
public static const STATE_MENU:int = 4;
private static const FRAME_WAIT:int = 30;
public function GameSingle(){
super();
}
public function showMenu():void{
this._state = STATE_MENU;
this.menu_mc.visible = true;
this.menu_mc.setLogStr(this._logger.getString());
this.menu_mc.appear();
}
public function init(playInfo:PlayInfo):void{
this._playInfo = playInfo;
this._state = STATE_NONE;
this._keyChecker = KeyChecker.getInstance();
this._config = Config.getInstance();
this._SEPlayer = new SystemSEPlayer();
this.board_mc.init(this, playInfo, 1, this._config.drawMode);
this.level_mc.init(playInfo.getMyCharaNum(1), playInfo.getMyCharaNum(1));
BGMPlayer.play(playInfo.getMyCharaNum(1));
this.reset();
}
private function repaint():void{
this.timeTextArea.text = this._gameData.time;
this.scoreTextArea.text = this._gameData.score.toString();
this.level_mc.setLevel(this._gameData.level);
this.attackTimeBar_mc.width = (150 * (1 - this._attacker.getFallTimeRatio()));
}
public function notifyCastStart():void{
this._attackerActiveFlag = false;
}
public function reset():void{
this.board_mc.reset();
this._gameData = new GameDataSingle(this._playInfo.getMyCharaNum(1), this._playInfo.level);
this._attacker = new AttackerSingle(this.board_mc, this._playInfo.getMyCharaNum(1), this._playInfo.randSeed);
this._attacker.setLevel(this._gameData.level);
this._attackerActiveFlag = false;
this.menu_mc.init();
this.menu_mc.visible = false;
this.level_mc.setLevel(0);
this.pause_mc.visible = false;
this._logger = new LoggerSingle(this._playInfo);
this._frameNum = 0;
this._state = STATE_GAME;
this.board_mc.ready();
this._gameData.startTimer();
}
public function enterFrame():void{
this.checkPauseKey();
if (this._state == STATE_GAME){
this._frameNum++;
this.checkGameKey();
if (((!((this._playInfo.level == PlayInfo.LEVEL_PRACTICE))) && (this._attackerActiveFlag))){
this._attacker.check();
};
this.board_mc.enterFrame();
} else {
if (this._state == STATE_WAIT){
this._frameNum++;
if (this._frameNum >= FRAME_WAIT){
this._frameNum = 0;
this.showMenu();
};
} else {
if (this._state == STATE_MENU){
this.checkMenuKey();
};
};
};
this.repaint();
}
private function checkMenuKey():void{
var selected:int;
if (this._keyChecker.isPushed(Key.UP)){
this._SEPlayer.play(SystemSEPlayer.SELECT);
this.menu_mc.selectPrev();
} else {
if (this._keyChecker.isPushed(Key.DOWN)){
this._SEPlayer.play(SystemSEPlayer.SELECT);
this.menu_mc.selectNext();
};
};
if (this._keyChecker.isPushed(this._config.getKeyCode(Config.KEY_ROTATE_RIGHT))){
this._SEPlayer.play(SystemSEPlayer.ENTER);
selected = this.menu_mc.selected;
if (selected == GameOverMenuSingle.MENU_RETRY){
this._playInfo.randSeed++;
this.reset();
} else {
if (selected == GameOverMenuSingle.MENU_CHARASELECT){
MainClass.getInstance().startCharaSelectSingle(this._playInfo.charaNum1P, this._playInfo.level);
} else {
if (selected == GameOverMenuSingle.MENU_LOG){
this.menu_mc.changeLogView();
} else {
if (selected == GameOverMenuSingle.MENU_QUIT){
MainClass.getInstance().startTitle();
};
};
};
};
};
}
public function notifyCastEnd(castNum:int, erasedNum:int):void{
this._attackerActiveFlag = true;
this._gameData.castEnd(castNum, erasedNum);
this._attacker.setLevel(this._gameData.level);
}
public function notifyDead():void{
this._attackerActiveFlag = false;
this.gameOver();
}
public function notifyStart():void{
this._attackerActiveFlag = true;
}
public function checkPauseKey():void{
if (this._keyChecker.isPushed(Key.PAUSE)){
this.pause();
};
}
private function checkGameKey():void{
var direction:int;
var key:int;
direction = Direction.NEUTRAL;
if (this._keyChecker.isPushed(Key.UP)){
direction = Direction.UP;
} else {
if (this._keyChecker.isPushed(Key.DOWN)){
direction = Direction.DOWN;
} else {
if (this._keyChecker.isPushed(Key.LEFT)){
direction = Direction.LEFT;
} else {
if (this._keyChecker.isPushed(Key.RIGHT)){
direction = Direction.RIGHT;
};
};
};
};
this.board_mc.moveCursor(direction);
if (this._keyChecker.isPushed(this._config.getKeyCode(Config.KEY_ROTATE_LEFT))){
key = Config.KEY_ROTATE_LEFT;
} else {
if (this._keyChecker.isPushed(this._config.getKeyCode(Config.KEY_ROTATE_RIGHT))){
key = Config.KEY_ROTATE_RIGHT;
} else {
if (this._keyChecker.isPushed(this._config.getKeyCode(Config.KEY_REFILL))){
key = Config.KEY_REFILL;
};
};
};
if (key != 0){
this.board_mc.keyAction(key);
};
if (this._config.recordLog){
if (((!((direction == Direction.NEUTRAL))) || (!((key == 0))))){
this._logger.addInputLog(this._frameNum, direction, key);
};
};
}
public function gameOver():void{
this._frameNum = 0;
this._state = STATE_WAIT;
this._gameData.stopTimer();
this._gameData.save();
}
public function pause():void{
if (this._state == STATE_GAME){
this._state = STATE_PAUSE;
this._SEPlayer.play(SystemSEPlayer.ENTER);
this.pause_mc.visible = true;
this._gameData.stopTimer();
} else {
if (this._state == STATE_PAUSE){
this._state = STATE_GAME;
this._SEPlayer.play(SystemSEPlayer.ENTER);
this.pause_mc.visible = false;
this._gameData.resumeTimer();
};
};
}
}
}//package game.single
Section 12
//ReplayViewerSingle (game.single.ReplayViewerSingle)
package game.single {
import game.*;
import game.logger.*;
import net.chibitami.gameUtil.*;
import flash.display.*;
import sound.*;
import game.attacker.*;
import flash.text.*;
public dynamic class ReplayViewerSingle extends MovieClip implements IBoardEventManager {
private var _keyChecker:KeyChecker;
private var _attackerActiveFlag:Boolean;
public var scoreTextArea:TextField;
private var _gameData:GameDataSingle;
private var _playSpeed:int;
public var level_mc:MagicLevelPict;
private var _SEPlayer:SystemSEPlayer;
private var _frameNum:int;
private var _nextInput:Array;
private var _attacker:AttackerSingle;
private var _playInfo:PlayInfo;
private var _config:Config;
public var speed_mc:MovieClip;
private var _demoMode:Boolean;
public var board_mc:Board;
private var _logger:LoggerSingle;
public var attackTimeBar_mc:MovieClip;
public function ReplayViewerSingle(){
super();
}
private function repaint():void{
this.scoreTextArea.text = this._gameData.score.toString();
this.level_mc.setLevel(this._gameData.level);
this.attackTimeBar_mc.width = (150 * (1 - this._attacker.getFallTimeRatio()));
}
public function init(logger:LoggerSingle, demoMode:Boolean=false):void{
this._playSpeed = 1;
this._demoMode = demoMode;
this._logger = logger;
this._keyChecker = KeyChecker.getInstance();
this._config = Config.getInstance();
this._SEPlayer = new SystemSEPlayer();
this._playInfo = this._logger.playInfo;
this.board_mc.init(this, this._playInfo, 1, this._config.drawMode);
this.level_mc.init(this._playInfo.getMyCharaNum(1), this._playInfo.getMyCharaNum(1));
this.speed_mc.gotoAndStop(1);
this._gameData = new GameDataSingle(this._playInfo.getMyCharaNum(1), this._playInfo.level);
this._attacker = new AttackerSingle(this.board_mc, this._playInfo.getMyCharaNum(1), this._playInfo.randSeed);
this._attacker.setLevel(this._gameData.level);
this._attackerActiveFlag = false;
this._frameNum = 0;
this._nextInput = this._logger.getNextInputLog();
this.board_mc.reset();
this.board_mc.ready();
this._gameData.startTimer();
BGMPlayer.play(this._playInfo.charaNum1P);
}
public function notifyCastStart():void{
this._attackerActiveFlag = false;
}
private function checkKey():void{
if (((this._keyChecker.isPushed(this._config.getKeyCode(Config.KEY_ROTATE_RIGHT))) || (this._keyChecker.isPushed(this._config.getKeyCode(Config.KEY_ROTATE_LEFT))))){
this._SEPlayer.play(SystemSEPlayer.CANCEL);
if (this._demoMode){
MainClass.getInstance().startTitle();
} else {
MainClass.getInstance().startReplayMenu();
};
} else {
if (this._keyChecker.isPushed(Key.LEFT)){
if (this._playSpeed > 1){
this._playSpeed = (this._playSpeed - 1);
this._SEPlayer.play(SystemSEPlayer.SELECT);
};
this.speed_mc.gotoAndStop(this._playSpeed);
} else {
if (this._keyChecker.isPushed(Key.RIGHT)){
if (this._playSpeed < 3){
this._playSpeed = (this._playSpeed + 1);
this._SEPlayer.play(SystemSEPlayer.SELECT);
};
this.speed_mc.gotoAndStop(this._playSpeed);
};
};
};
}
public function enterFrame():void{
var i:int;
this.checkKey();
i = 0;
while (i < this._playSpeed) {
this._frameNum++;
this.checkInputLog();
if (((!((this._playInfo.level == PlayInfo.LEVEL_PRACTICE))) && (this._attackerActiveFlag))){
this._attacker.check();
};
this.board_mc.enterFrame();
i++;
};
this.repaint();
}
private function checkInputLog():void{
var cursor:int;
var key:int;
if (((!((this._nextInput == null))) && ((this._frameNum == this._nextInput[0])))){
cursor = this._nextInput[1];
key = this._nextInput[2];
if (cursor != Direction.NEUTRAL){
this.board_mc.moveCursor(cursor);
};
if (key != 0){
this.board_mc.keyAction(key);
};
this._nextInput = this._logger.getNextInputLog();
};
}
public function notifyStart():void{
this._attackerActiveFlag = true;
}
public function notifyCastEnd(castNum:int, erasedNum:int):void{
this._attackerActiveFlag = true;
this._gameData.castEnd(castNum, erasedNum);
this._attacker.setLevel(this._gameData.level);
}
public function notifyDead():void{
this._attackerActiveFlag = false;
this._gameData.stopTimer();
}
}
}//package game.single
Section 13
//BackgroundField (game.BackgroundField)
package game {
import flash.display.*;
public dynamic class BackgroundField extends MovieClip {
public function BackgroundField(){
super();
}
public function init(charaNum:int):void{
this.gotoAndStop(charaNum);
}
}
}//package game
Section 14
//Block (game.Block)
package game {
import flash.display.*;
public class Block extends MovieClip {
private var _blockInfo:BlockInfo;
private var _moveMarginX:int;
private var _moveMarginY:int;
private static var MOVE_SPEED:int = 10;
public function Block(blockInfo:BlockInfo){
super();
this._blockInfo = blockInfo;
this._moveMarginX = 0;
this._moveMarginY = 0;
this.repaint();
}
private function repaint():void{
if (this._blockInfo.type == BlockInfo.TYPE_DUMMY){
this.visible = false;
} else {
if (this._blockInfo.type == BlockInfo.TYPE_NORMAL){
this.gotoAndStop(this._blockInfo.color);
} else {
if (this._blockInfo.type == BlockInfo.TYPE_FIXED){
this.gotoAndStop((10 + this._blockInfo.color));
};
};
};
}
public function get moveMarginY():int{
return (this._moveMarginY);
}
public function get moveMarginX():int{
return (this._moveMarginX);
}
public function isFallable():Boolean{
if ((((this._moveMarginX == 0)) && ((this._moveMarginY == 0)))){
return (true);
};
return (false);
}
public function setType(type:int):void{
var prevInfo:BlockInfo;
prevInfo = this._blockInfo;
this._blockInfo = new BlockInfo(type, prevInfo.color);
this.repaint();
}
public function move(direction:int):void{
if (direction == Direction.UP){
this._moveMarginX = 0;
this._moveMarginY = (-1 * Board.UNIT_SIZE);
} else {
if (direction == Direction.DOWN){
this._moveMarginX = 0;
this._moveMarginY = Board.UNIT_SIZE;
} else {
if (direction == Direction.LEFT){
this._moveMarginX = Board.UNIT_SIZE;
this._moveMarginY = 0;
} else {
if (direction == Direction.RIGHT){
this._moveMarginX = (-1 * Board.UNIT_SIZE);
this._moveMarginY = 0;
};
};
};
};
}
public function get blockInfo():BlockInfo{
return (this._blockInfo);
}
public function moveMotion():void{
if (this._moveMarginX > 0){
this._moveMarginX = Math.max((this._moveMarginX - MOVE_SPEED), 0);
} else {
if (this._moveMarginX < 0){
this._moveMarginX = Math.min((this._moveMarginX + MOVE_SPEED), 0);
};
};
if (this._moveMarginY > 0){
this._moveMarginY = Math.max((this._moveMarginY - MOVE_SPEED), 0);
} else {
if (this._moveMarginY < 0){
this._moveMarginY = Math.min((this._moveMarginY + MOVE_SPEED), 0);
};
};
}
}
}//package game
Section 15
//BlockField (game.BlockField)
package game {
import flash.display.*;
import effect.*;
public class BlockField extends MovieClip {
private var _fixedBlockArray:Array;
private var _fallingBlockArray:Array;
private var _blockLayer:Sprite;
private var _drawMode:int;
private var _effectLayer:Sprite;
private var _marginArray:Array;
private var _fallingFlag:Boolean;
private var _fallFrameRestArray:Array;
private static const FRAME_ROTATE_TO_FALL:int = 2;
public function BlockField(){
super();
}
public function repaint():void{
var block:Block;
var w:*;
var h:int;
w = 1;
while (w <= Board.BW) {
h = 1;
while (h <= Board.BH) {
if (this._fallingBlockArray[w][h] == null){
} else {
block = Block(this._fallingBlockArray[w][h]);
block.moveMotion();
block.x = ((Board.UNIT_SIZE * (w - 1)) + block.moveMarginX);
block.y = (-1 * (((Board.UNIT_SIZE * (h - 1)) + this._marginArray[w][h]) + block.moveMarginY));
};
h++;
};
w++;
};
w = 1;
while (w <= Board.BW) {
h = 1;
while (h <= Board.BH) {
if (this._fixedBlockArray[w][h] == null){
} else {
block = Block(this._fixedBlockArray[w][h]);
block.moveMotion();
block.x = ((Board.UNIT_SIZE * (w - 1)) + block.moveMarginX);
block.y = (-1 * ((Board.UNIT_SIZE * (h - 1)) + block.moveMarginY));
};
h++;
};
w++;
};
}
public function init(drawMode:int=1):void{
var w:*;
var h:int;
this._blockLayer = new Sprite();
this._effectLayer = new Sprite();
this.addChild(this._blockLayer);
this.addChild(this._effectLayer);
this._drawMode = drawMode;
this._fallingFlag = false;
this._fixedBlockArray = new Array((Board.BW + 2));
this._fallingBlockArray = new Array((Board.BW + 2));
this._marginArray = new Array((Board.BW + 2));
this._fallFrameRestArray = new Array((Board.BW + 2));
w = 0;
while (w < (Board.BW + 2)) {
this._fixedBlockArray[w] = new Array((Board.BH + 1));
this._fallingBlockArray[w] = new Array((Board.BH + 1));
this._marginArray[w] = new Array((Board.BH + 1));
this._fallFrameRestArray[w] = new Array((Board.BH + 1));
h = 0;
while (h < (Board.BH + 1)) {
this._fixedBlockArray[w][h] = null;
this._fallingBlockArray[w][h] = null;
this._marginArray[w][h] = 0;
this._fallFrameRestArray[w][h] = 0;
h++;
};
w++;
};
w = 0;
while (w < (Board.BW + 2)) {
this._fixedBlockArray[w][0] = new Block(new BlockInfo(BlockInfo.TYPE_DUMMY));
w++;
};
h = 1;
while (h < (Board.BH + 1)) {
this._fixedBlockArray[0][h] = new Block(new BlockInfo(BlockInfo.TYPE_DUMMY));
this._fixedBlockArray[(Board.BW + 1)][h] = new Block(new BlockInfo(BlockInfo.TYPE_DUMMY));
h++;
};
}
public function rotate(w:int, h:int, direction:int):void{
var block00:Block;
var block01:Block;
var block10:Block;
var block11:Block;
var tmpBlock:Block;
block00 = this._fixedBlockArray[w][h];
block01 = this._fixedBlockArray[w][(h + 1)];
block10 = this._fixedBlockArray[(w + 1)][h];
block11 = this._fixedBlockArray[(w + 1)][(h + 1)];
if (direction == Direction.RIGHT){
this._fixedBlockArray[w][h] = block10;
this._fixedBlockArray[w][(h + 1)] = block00;
this._fixedBlockArray[(w + 1)][h] = block11;
this._fixedBlockArray[(w + 1)][(h + 1)] = block01;
if (block00 != null){
block00.move(Direction.UP);
};
if (block01 != null){
block01.move(Direction.RIGHT);
};
if (block10 != null){
block10.move(Direction.LEFT);
};
if (block11 != null){
block11.move(Direction.DOWN);
};
} else {
if (direction == Direction.LEFT){
this._fixedBlockArray[w][h] = block01;
this._fixedBlockArray[w][(h + 1)] = block11;
this._fixedBlockArray[(w + 1)][h] = block00;
this._fixedBlockArray[(w + 1)][(h + 1)] = block10;
if (block00 != null){
block00.move(Direction.RIGHT);
};
if (block01 != null){
block01.move(Direction.DOWN);
};
if (block10 != null){
block10.move(Direction.UP);
};
if (block11 != null){
block11.move(Direction.LEFT);
};
};
};
this._fallFrameRestArray[w][h] = FRAME_ROTATE_TO_FALL;
this._fallFrameRestArray[w][(h + 1)] = FRAME_ROTATE_TO_FALL;
this._fallFrameRestArray[(w + 1)][h] = FRAME_ROTATE_TO_FALL;
this._fallFrameRestArray[(w + 1)][(h + 1)] = FRAME_ROTATE_TO_FALL;
}
public function isRefillable():Boolean{
var w:int;
w = 1;
while (w <= Board.BW) {
if (((((((!((this._fixedBlockArray[w][Board.BH] == null))) || (!((this._fallingBlockArray[w][Board.BH] == null))))) || (!((this._fixedBlockArray[w][(Board.BH - 1)] == null))))) || (!((this._fallingBlockArray[w][(Board.BH - 1)] == null))))){
return (false);
};
w++;
};
return (true);
}
public function reset():void{
var block:Block;
var w:int;
var h:int;
this._fallingFlag = false;
w = 1;
while (w <= Board.BW) {
h = 1;
while (h <= Board.BH) {
block = (this._fixedBlockArray[w][h] as Block);
if (block != null){
this._blockLayer.removeChild(block);
};
block = (this._fallingBlockArray[w][h] as Block);
if (block != null){
this._blockLayer.removeChild(block);
};
this._fixedBlockArray[w][h] = null;
this._fallingBlockArray[w][h] = null;
this._marginArray[w][h] = 0;
this._fallFrameRestArray[w][h] = 0;
h++;
};
w++;
};
this.removeChild(this._effectLayer);
this._effectLayer = new Sprite();
this.addChild(this._effectLayer);
}
public function fall(fallSpeed:Number):Boolean{
var fixedFlag:Boolean;
var w:*;
var h:int;
fixedFlag = false;
this._fallingFlag = false;
h = 1;
while (h <= Board.BH) {
w = 1;
while (w <= Board.BW) {
if (this._fallingBlockArray[w][h] != null){
this._fallingFlag = true;
this._marginArray[w][h] = (this._marginArray[w][h] - fallSpeed);
if (this._marginArray[w][h] <= 0){
if (this._fixedBlockArray[w][(h - 1)] != null){
this._fixedBlockArray[w][h] = this._fallingBlockArray[w][h];
this._fallingBlockArray[w][h] = null;
this._marginArray[w][h] = 0;
fixedFlag = true;
} else {
this._fallingBlockArray[w][(h - 1)] = this._fallingBlockArray[w][h];
this._fallingBlockArray[w][h] = null;
this._marginArray[w][(h - 1)] = (Board.UNIT_SIZE + this._marginArray[w][h]);
this._marginArray[w][h] = 0;
};
};
};
w++;
};
h++;
};
h = 2;
while (h <= Board.BH) {
w = 1;
while (w <= Board.BW) {
if (this._fallFrameRestArray[w][h] > 0){
this._fallFrameRestArray[w][h] = (this._fallFrameRestArray[w][h] - 1);
} else {
if (((!((this._fixedBlockArray[w][h] == null))) && ((this._fixedBlockArray[w][(h - 1)] == null)))){
this._fallingBlockArray[w][h] = this._fixedBlockArray[w][h];
this._fixedBlockArray[w][h] = null;
this._marginArray[w][h] = 0;
};
};
w++;
};
h++;
};
return (fixedFlag);
}
public function fallNewBlock(w:int, blockInfo:BlockInfo):Boolean{
var block:Block;
if (this.isBlockFallable(w)){
block = new Block(blockInfo);
this._fallingBlockArray[w][Board.BH] = block;
this._marginArray[w][Board.BH] = Board.UNIT_SIZE;
this._blockLayer.addChild(block);
return (true);
};
return (false);
}
public function get fixedBlockArray():Array{
return (this._fixedBlockArray);
}
public function isRotatable(w:int, h:int):Boolean{
var block:Block;
var i:int;
var j:int;
if ((((((((this._fixedBlockArray[w][h] == null)) && ((this._fixedBlockArray[(w + 1)][h] == null)))) && ((this._fixedBlockArray[w][(h + 1)] == null)))) && ((this._fixedBlockArray[(w + 1)][(h + 1)] == null)))){
return (false);
};
i = 0;
while (i <= 1) {
j = 0;
while (j <= 1) {
if (this._fallingBlockArray[(w + i)][(h + j)] != null){
return (false);
};
block = (this._fixedBlockArray[(w + i)][(h + j)] as Block);
if (((!((block == null))) && ((block.blockInfo.type == BlockInfo.TYPE_FIXED)))){
return (false);
};
j++;
};
i++;
};
return (true);
}
public function erase(w:int, h:int):int{
var erased:int;
erased = 0;
if (this.eraseOne(w, h, true)){
erased++;
};
if (this.eraseOne((w + 1), h, true)){
erased++;
};
if (this.eraseOne(w, (h + 1), true)){
erased++;
};
if (this.eraseOne((w + 1), (h + 1), true)){
erased++;
};
if (this.eraseOne((w - 1), h, false)){
erased++;
};
if (this.eraseOne((w - 1), (h + 1), false)){
erased++;
};
if (this.eraseOne(w, (h - 1), false)){
erased++;
};
if (this.eraseOne(w, (h + 2), false)){
erased++;
};
if (this.eraseOne((w + 1), (h - 1), false)){
erased++;
};
if (this.eraseOne((w + 1), (h + 2), false)){
erased++;
};
if (this.eraseOne((w + 2), h, false)){
erased++;
};
if (this.eraseOne((w + 2), (h + 1), false)){
erased++;
};
return (erased);
}
public function spellCircleCheck(w:int, h:int):Boolean{
var blockArray:Array;
var checkBlock:Block;
var checkInfo:BlockInfo;
var color:int;
var i:int;
if ((((((((this._fixedBlockArray[w][h] == null)) || ((this._fixedBlockArray[(w + 1)][h] == null)))) || ((this._fixedBlockArray[w][(h + 1)] == null)))) || ((this._fixedBlockArray[(w + 1)][(h + 1)] == null)))){
return (false);
};
blockArray = new Array(4);
blockArray[0] = (this._fixedBlockArray[w][h] as Block);
blockArray[1] = (this._fixedBlockArray[(w + 1)][h] as Block);
blockArray[2] = (this._fixedBlockArray[w][(h + 1)] as Block);
blockArray[3] = (this._fixedBlockArray[(w + 1)][(h + 1)] as Block);
color = (blockArray[0] as Block).blockInfo.color;
if (color == BlockInfo.COLOR_BLACK){
return (false);
};
i = 0;
while (i < 4) {
checkBlock = (blockArray[i] as Block);
checkInfo = checkBlock.blockInfo;
if (((!((checkInfo.type == BlockInfo.TYPE_NORMAL))) && (!((checkInfo.type == BlockInfo.TYPE_FIXED))))){
return (false);
};
if (checkInfo.color != color){
return (false);
};
i++;
};
i = 0;
while (i < 4) {
(blockArray[i] as Block).setType(BlockInfo.TYPE_FIXED);
i++;
};
return (true);
}
public function getBlock(w:int, h:int):Block{
return ((this._fixedBlockArray[w][h] as Block));
}
private function eraseOne(w:int, h:int, inner:Boolean):Boolean{
var block:Block;
var eraseFlag:Boolean;
var ret:Boolean;
var blockEffect:ErasedBlockEffect;
if ((((((((w < 1)) || ((w > Board.BW)))) || ((h < 1)))) || ((h > Board.BH)))){
return (false);
};
block = (this._fixedBlockArray[w][h] as Block);
eraseFlag = false;
ret = false;
if (block != null){
if (inner){
eraseFlag = true;
} else {
if (block.blockInfo.type == BlockInfo.TYPE_FIXED){
block.setType(BlockInfo.TYPE_NORMAL);
} else {
if (block.blockInfo.color == BlockInfo.COLOR_BLACK){
eraseFlag = true;
};
};
};
if (eraseFlag){
this._blockLayer.removeChild(this._fixedBlockArray[w][h]);
this._fixedBlockArray[w][h] = null;
if (this._drawMode == Config.DRAWMODE_FULL){
blockEffect = new ErasedBlockEffect(w, h, block.blockInfo);
this._effectLayer.addChild(blockEffect);
};
};
};
if ((((eraseFlag == true)) && (!((block.blockInfo.color == BlockInfo.COLOR_BLACK))))){
ret = true;
};
return (ret);
}
public function isFalling():Boolean{
return (this._fallingFlag);
}
public function isBlockFallable(w:int):Boolean{
if (((!((this._fixedBlockArray[w][Board.BH] == null))) || (!((this._fallingBlockArray[w][Board.BH] == null))))){
return (false);
};
return (true);
}
}
}//package game
Section 16
//BlockInfo (game.BlockInfo)
package game {
public class BlockInfo {
private var _color:int;
private var _type:int;
public static const TYPE_DUMMY:int = 4;
public static const COLOR_GREEN:int = 3;
public static const TYPE_NORMAL:int = 1;
public static const TYPE_FIXED:int = 2;
public static const COLOR_YELLOW:int = 4;
public static const COLOR_BLACK:int = 10;
public static const COLOR_NONE:int = 0;
public static const COLOR_RED:int = 1;
public static const COLOR_BLUE:int = 2;
public function BlockInfo(type:int, color:int=0){
super();
this._type = type;
this._color = color;
}
public function get color():int{
return (this._color);
}
public function get type():int{
return (this._type);
}
}
}//package game
Section 17
//BlockStock (game.BlockStock)
package game {
public class BlockStock {
private var _stockArray:Array;
public function BlockStock(){
var w:int;
super();
this._stockArray = new Array();
w = 0;
while (w < Board.BW) {
this._stockArray[w] = new Array();
w++;
};
}
public function getStockNum(w:int):int{
return ((this._stockArray[(w - 1)] as Array).length);
}
public function push(w:int, blockInfo:BlockInfo):void{
(this._stockArray[(w - 1)] as Array).push(blockInfo);
}
public function fall(blockField:BlockField):int{
var fallCount:int;
var bInfo:BlockInfo;
var w:int;
var arrayLength:int;
fallCount = 0;
w = 0;
while (w < Board.BW) {
arrayLength = (this._stockArray[w] as Array).length;
if (arrayLength == 0){
} else {
if (blockField.fallNewBlock((w + 1), BlockInfo(this._stockArray[w][0])) == true){
(this._stockArray[w] as Array).shift();
fallCount++;
};
};
w++;
};
return (fallCount);
}
public function getStockNumAll():int{
var ret:int;
var w:int;
ret = 0;
w = 1;
while (w <= Board.BW) {
ret = (ret + this.getStockNum(w));
w++;
};
return (ret);
}
}
}//package game
Section 18
//Board (game.Board)
package game {
import net.chibitami.gameUtil.*;
import flash.display.*;
import flash.geom.*;
import sound.*;
public class Board extends MovieClip {
private var _player:int;
private var _blockField:BlockField;
private var _backgroundField:BackgroundField;
private var _spellCircleField:SpellCircleField;
private var _voicePlayer:VoicePlayer;
private var _frameToCutinCastEnd:int;
private var _playInfo:PlayInfo;
private var _frameToStart:int;
private var _blockStock:BlockStock;
private var _frameToNextCast:int;
private var _castNum:int;
private var _eventManager:IBoardEventManager;
private var _cursorField:CursorField;
private var _state:int;
private var _frameToGameOver:int;
private var _erasedNum:int;
private var _boardSEPlayer:BoardSEPlayer;
private var _refiller:Refiller;
private var _mask:Sprite;
private var _cutinField:CutinField;
private static const FRAME_TO_NEXTCAST:int = 8;
public static const BH:int = 12;
private static const FRAME_TO_NORMALCAST:int = 5;
private static const STATE_CAST:int = 3;
public static const BW:int = 8;
private static const FRAME_TO_GAMEOVER:int = 90;
public static const UNIT_SIZE:int = 40;
private static const CIRCLENUM_CUTINCAST:int = 6;
private static const FALL_SPEED:int = 24;
private static const FRAME_TO_START:int = 60;
private static const STATE_DEAD:int = 4;
private static const FRAME_TO_CUTINCAST:int = 20;
private static const STATE_NORMAL:int = 2;
private static const STATE_READY:int = 1;
public function Board(){
super();
}
private function animationCast(circleNum:int):void{
if (circleNum >= CIRCLENUM_CUTINCAST){
this._boardSEPlayer.play(BoardSEPlayer.CUTINCAST);
this._cutinField.animation(CutinField.CUTINCAST);
} else {
this._cutinField.animation(CutinField.NORMALCAST);
};
if (circleNum <= 2){
this._voicePlayer.play(VoicePlayer.CAST1);
} else {
if (circleNum <= 5){
this._voicePlayer.play(VoicePlayer.CAST2);
} else {
if (circleNum <= 8){
this._voicePlayer.play(VoicePlayer.CAST3);
} else {
if (circleNum <= 11){
this._voicePlayer.play(VoicePlayer.CAST4);
} else {
if (circleNum <= 14){
this._voicePlayer.play(VoicePlayer.CAST5);
} else {
this._voicePlayer.play(VoicePlayer.CAST6);
};
};
};
};
};
}
public function keyAction(key:int):void{
if (this._frameToCutinCastEnd > 0){
return;
};
if ((((key == Config.KEY_ROTATE_LEFT)) || ((key == Config.KEY_ROTATE_RIGHT)))){
if (this.isCastable()){
this.cast();
} else {
if (key == Config.KEY_ROTATE_LEFT){
this.rotate(Direction.LEFT);
} else {
if (key == Config.KEY_ROTATE_RIGHT){
this.rotate(Direction.RIGHT);
};
};
};
} else {
if (key == Config.KEY_REFILL){
this.refill();
};
};
}
public function init(eventManager:IBoardEventManager, playInfo:PlayInfo, player:int, drawMode:int=1):void{
var pan:int;
this._eventManager = eventManager;
this._playInfo = playInfo;
this._player = player;
this._state = STATE_READY;
this._frameToNextCast = FRAME_TO_NEXTCAST;
this._frameToCutinCastEnd = 0;
this._frameToGameOver = FRAME_TO_GAMEOVER;
this._castNum = 0;
this._erasedNum = 0;
this._backgroundField = new BackgroundField();
this._blockField = new BlockField();
this._spellCircleField = new SpellCircleField();
this._cursorField = new CursorField();
this._cutinField = new CutinField();
this._backgroundField.init(playInfo.getMyCharaNum(player));
this._blockField.init(drawMode);
this._spellCircleField.init(playInfo.getMyCharaNum(player), drawMode);
this._cursorField.init();
this._cutinField.init(playInfo.getMyCharaNum(player), drawMode);
this.addChild(this._backgroundField);
this.addChild(this._blockField);
this.addChild(this._cursorField);
this.addChild(this._spellCircleField);
this.addChild(this._cutinField);
this._mask = new Sprite();
this._mask.graphics.beginFill(0);
this._mask.graphics.drawRect(0, -480, 320, 480);
this.addChild(this._mask);
this._blockField.mask = this._mask;
this._blockStock = new BlockStock();
this._refiller = new Refiller(playInfo, player);
pan = VoicePlayer.PAN_CENTER;
if (((!((playInfo.mode == PlayInfo.SINGLE))) && ((player == 1)))){
pan = VoicePlayer.PAN_LEFT;
} else {
if (((!((playInfo.mode == PlayInfo.SINGLE))) && ((player == 2)))){
pan = VoicePlayer.PAN_RIGHT;
};
};
this._boardSEPlayer = new BoardSEPlayer(pan);
this._voicePlayer = new VoicePlayer(playInfo.getMyCharaNum(player), pan);
}
private function animationDamage():void{
this._voicePlayer.play(VoicePlayer.DAMAGED);
}
public function castEnd():void{
this._eventManager.notifyCastEnd(this._castNum, this._erasedNum);
this._state = STATE_NORMAL;
this.animationCastEnd(this._castNum, this._erasedNum);
this._castNum = 0;
this._erasedNum = 0;
}
public function refill():void{
if (this.isRefillable()){
this._refiller.refill(this._blockStock);
this.animationRefill();
};
}
private function animationStart():void{
this._cutinField.animation(CutinField.START);
this._voicePlayer.play(VoicePlayer.START);
}
private function isGameOver():Boolean{
var filledFlag:Boolean;
var w:int;
filledFlag = false;
if (this._state == STATE_NORMAL){
w = 1;
while (w <= BW) {
if (this._blockField.getBlock(w, BH) != null){
filledFlag = true;
break;
};
w++;
};
};
if (filledFlag){
this._frameToGameOver--;
if (this._frameToGameOver <= 0){
return (true);
};
return (false);
//unresolved jump
};
this._frameToGameOver = FRAME_TO_GAMEOVER;
return (false);
}
public function cast():void{
var startCastNum:int;
if (this.isCastable()){
this._state = STATE_CAST;
this._castNum = 0;
startCastNum = this._spellCircleField.getSpellCircleNum();
if (startCastNum >= CIRCLENUM_CUTINCAST){
this._frameToNextCast = FRAME_TO_CUTINCAST;
this._frameToCutinCastEnd = FRAME_TO_CUTINCAST;
} else {
this._frameToNextCast = FRAME_TO_NORMALCAST;
};
this.animationCast(startCastNum);
this._eventManager.notifyCastStart();
};
}
public function rotate(direction:int):void{
if (this.isRotatable()){
this._blockField.rotate(this._cursorField.w, this._cursorField.h, direction);
this._boardSEPlayer.play(BoardSEPlayer.ROTATEBLOCK);
} else {
this._boardSEPlayer.play(BoardSEPlayer.ROTATEFAILED);
};
}
private function isCastable():Boolean{
if ((((this._state == STATE_NORMAL)) && (this._spellCircleField.isSpellCircleExists(this._cursorField.w, this._cursorField.h)))){
return (true);
};
return (false);
}
private function dead():void{
this._state = STATE_DEAD;
if (this._playInfo.mode == PlayInfo.SINGLE){
this.animationGameOver();
} else {
this.animationLose();
};
this._eventManager.notifyDead();
}
public function enterFrame():void{
var point:Point;
if (this._state == STATE_CAST){
if (this._frameToCutinCastEnd == 1){
this._cutinField.animation(CutinField.CUTINCASTEND);
};
if (this._frameToCutinCastEnd > 0){
this._frameToCutinCastEnd--;
};
this._frameToNextCast--;
if (this._frameToNextCast <= 0){
point = this._spellCircleField.castNextSpellCircle();
if (point != null){
this._castNum++;
this._erasedNum = (this._erasedNum + this._blockField.erase(point.x, point.y));
this._frameToNextCast = FRAME_TO_NEXTCAST;
this.animationErase();
} else {
this.castEnd();
this._frameToGameOver = FRAME_TO_GAMEOVER;
};
};
} else {
this._blockStock.fall(this._blockField);
if (this._blockField.fall(FALL_SPEED)){
this._boardSEPlayer.play(BoardSEPlayer.FIXBLOCK);
};
if (this.isGameOver()){
this.dead();
};
if (this._frameToGameOver == (FRAME_TO_GAMEOVER - 5)){
this.animationDanger();
} else {
if ((((this._frameToGameOver == 60)) || ((this._frameToGameOver == 30)))){
this._boardSEPlayer.play(BoardSEPlayer.DANGERCOUNT);
};
};
};
if (this.createSpellCircle()){
this.animationCreateCircle();
};
if (this._state == STATE_READY){
this._frameToStart--;
if (this._frameToStart <= 0){
this.start();
};
};
this.updateCursorField();
this._blockField.repaint();
this._cursorField.repaint();
}
public function damage(blockInfoArray:Array):void{
var w:int;
var h:int;
w = 1;
while (w <= Board.BW) {
h = 0;
while (h < blockInfoArray[w].length) {
if (blockInfoArray[w][h] != null){
this._blockStock.push(w, (blockInfoArray[w][h] as BlockInfo));
};
h++;
};
w++;
};
this.animationDamage();
}
private function animationReady():void{
this._cutinField.animation(CutinField.READY);
this._voicePlayer.play(VoicePlayer.READY);
}
private function animationCreateCircle():void{
this._boardSEPlayer.play(BoardSEPlayer.CREATECIRCLE);
}
private function animationErase():void{
this._boardSEPlayer.play(BoardSEPlayer.ERASECIRCLE);
}
public function reset():void{
this._state = STATE_READY;
this._frameToStart = FRAME_TO_START;
this._frameToNextCast = FRAME_TO_NEXTCAST;
this._frameToGameOver = FRAME_TO_GAMEOVER;
this._castNum = 0;
this._erasedNum = 0;
this._blockField.reset();
this._spellCircleField.reset();
this._cursorField.reset();
this._cutinField.animation(CutinField.NONE);
this._blockStock = new BlockStock();
this._refiller = new Refiller(this._playInfo, this._player);
}
private function isRotatable():Boolean{
var w:int;
var h:int;
w = this._cursorField.w;
h = this._cursorField.h;
if (this._frameToCutinCastEnd > 0){
return (false);
};
if (((!((this._state == STATE_NORMAL))) && (!((this._state == STATE_CAST))))){
return (false);
};
if (this._blockField.isRotatable(w, h) == false){
return (false);
};
return (true);
}
public function moveCursor(direction:int):void{
if (this._frameToCutinCastEnd > 0){
return;
};
this._cursorField.moveCursor(direction);
}
public function start():void{
this._state = STATE_NORMAL;
this.animationStart();
this._eventManager.notifyStart();
}
private function animationGameOver():void{
this._cutinField.animation(CutinField.GAMEOVER);
this._boardSEPlayer.play(BoardSEPlayer.DEAD);
this._voicePlayer.play(VoicePlayer.GAMEOVER);
}
private function createSpellCircle():Boolean{
var created:Boolean;
var w:int;
var h:int;
created = false;
w = 1;
while (w <= (BW - 1)) {
h = 1;
while (h <= (BH - 1)) {
if ((((this._spellCircleField.isSpellCircleExists(w, h) == false)) && ((this._blockField.spellCircleCheck(w, h) == true)))){
created = true;
this._spellCircleField.createSpellCircle(w, h);
};
h++;
};
w++;
};
return (created);
}
private function updateCursorField():void{
var w:int;
var h:int;
w = this._cursorField.w;
h = this._cursorField.h;
if (this.isCastable()){
this._cursorField.setState(CursorField.STATE_CAST);
} else {
if (this.isRotatable()){
this._cursorField.setState(CursorField.STATE_NEUTRAL);
} else {
this._cursorField.setState(CursorField.STATE_DISABLE);
};
};
}
private function isRefillable():Boolean{
if ((((this._state == STATE_NORMAL)) || ((this._state == STATE_READY)))){
if (this._blockField.isRefillable()){
return (true);
};
return (false);
//unresolved jump
};
return (false);
}
public function ready():void{
var i:int;
this._state = STATE_READY;
this.animationReady();
i = 0;
while (i < 5) {
this._refiller.refill(this._blockStock);
i++;
};
}
private function animationDanger():void{
this._boardSEPlayer.play(BoardSEPlayer.DANGER);
this._cutinField.animation(CutinField.DANGER);
}
private function animationWin():void{
this._cutinField.animation(CutinField.WIN);
this._voicePlayer.play(VoicePlayer.WIN);
}
private function animationLose():void{
this._cutinField.animation(CutinField.LOSE);
this._voicePlayer.play(VoicePlayer.LOSE);
}
private function animationRefill():void{
this._boardSEPlayer.play(BoardSEPlayer.REFILLBLOCK);
}
private function animationCastEnd(castNum:int, erasedNum:int):void{
this._cutinField.animation(CutinField.CASTEND, new Array(castNum, erasedNum));
}
}
}//package game
Section 19
//CursorField (game.CursorField)
package game {
import flash.display.*;
public class CursorField extends MovieClip {
private var _cursor:CursorPict;
private var _prevState:String;
private var _h:int;
private var _w:int;
public static const STATE_NEUTRAL:String = "neutral";
public static const STATE_DISABLE:String = "disable";
public static const STATE_CAST:String = "cast";
public function CursorField(){
super();
}
public function repaint():void{
this._cursor.moveMotion();
this._cursor.x = ((Board.UNIT_SIZE * (this.w - 1)) + this._cursor.moveMarginX);
this._cursor.y = (-1 * ((Board.UNIT_SIZE * (this.h - 1)) + this._cursor.moveMarginY));
}
public function init():void{
this._cursor = new CursorPict();
this.addChild(this._cursor);
this.reset();
}
public function reset():void{
this._cursor.gotoAndStop(STATE_NEUTRAL);
this._prevState = STATE_NEUTRAL;
this._w = 4;
this._h = 6;
this.repaint();
}
public function get w():int{
return (this._w);
}
public function setState(state:String):void{
if (state != this._prevState){
this._cursor.gotoAndStop(state);
this._prevState = state;
};
}
public function moveCursor(moveTo:int){
if ((((moveTo == Direction.UP)) && ((this._h < (Board.BH - 1))))){
this._h++;
this._cursor.move(moveTo);
} else {
if ((((moveTo == Direction.DOWN)) && ((this._h > 1)))){
this._h--;
this._cursor.move(moveTo);
} else {
if ((((moveTo == Direction.LEFT)) && ((this._w > 1)))){
this._w--;
this._cursor.move(moveTo);
} else {
if ((((moveTo == Direction.RIGHT)) && ((this._w < (Board.BW - 1))))){
this._w++;
this._cursor.move(moveTo);
};
};
};
};
}
public function get h():int{
return (this._h);
}
}
}//package game
Section 20
//CursorPict (game.CursorPict)
package game {
import flash.display.*;
public class CursorPict extends MovieClip {
private var _moveMarginX:int;
private var _moveMarginY:int;
private static var MOVE_SPEED:int = 24;
public function CursorPict(){
super();
this._moveMarginX = 0;
this._moveMarginY = 0;
}
public function get moveMarginY():int{
return (this._moveMarginY);
}
public function get moveMarginX():int{
return (this._moveMarginX);
}
public function move(direction:int){
if (direction == Direction.UP){
this._moveMarginX = 0;
this._moveMarginY = (-1 * Board.UNIT_SIZE);
} else {
if (direction == Direction.DOWN){
this._moveMarginX = 0;
this._moveMarginY = Board.UNIT_SIZE;
} else {
if (direction == Direction.LEFT){
this._moveMarginX = Board.UNIT_SIZE;
this._moveMarginY = 0;
} else {
if (direction == Direction.RIGHT){
this._moveMarginX = (-1 * Board.UNIT_SIZE);
this._moveMarginY = 0;
};
};
};
};
}
public function moveMotion():void{
if (this._moveMarginX > 0){
this._moveMarginX = Math.max((this._moveMarginX - MOVE_SPEED), 0);
} else {
if (this._moveMarginX < 0){
this._moveMarginX = Math.min((this._moveMarginX + MOVE_SPEED), 0);
};
};
if (this._moveMarginY > 0){
this._moveMarginY = Math.max((this._moveMarginY - MOVE_SPEED), 0);
} else {
if (this._moveMarginY < 0){
this._moveMarginY = Math.min((this._moveMarginY + MOVE_SPEED), 0);
};
};
}
}
}//package game
Section 21
//CutinField (game.CutinField)
package game {
import flash.display.*;
public dynamic class CutinField extends MovieClip {
public var lose_mc:MovieClip;
private var _charaNum:int;
public var danger_mc:MovieClip;
private var _drawMode:int;
private var _cutinArray:Array;
public var castEnd_mc:MovieClip;
public var start_mc:MovieClip;
public var gameOver_mc:MovieClip;
public var normalCast_mc:MovieClip;
public var ready_mc:MovieClip;
public var cutinCast_mc:MovieClip;
public var win_mc:MovieClip;
public var cutinCastEnd_mc:MovieClip;
public static const START:int = 1;
public static const READY:int = 0;
public static const CUTINCAST:int = 3;
public static const WIN:int = 7;
public static const DANGER:int = 6;
public static const CUTINCASTEND:int = 4;
public static const LOSE:int = 8;
public static const NONE:int = -1;
public static const GAMEOVER:int = 9;
public static const CASTEND:int = 5;
public static const NORMALCAST:int = 2;
public function CutinField(){
super();
}
public function init(charaNum:int, drawMode:int=1):void{
this._charaNum = charaNum;
this._drawMode = drawMode;
this._cutinArray = new Array(this.ready_mc, this.start_mc, this.normalCast_mc, this.cutinCast_mc, this.cutinCastEnd_mc, this.castEnd_mc, this.danger_mc, this.win_mc, this.lose_mc, this.gameOver_mc);
this.animation(NONE);
}
public function animation(type:int, param:Array=null):void{
var i:int;
var targetMC:MovieClip;
i = 0;
while (i < this._cutinArray.length) {
(this._cutinArray[i] as MovieClip).visible = false;
i++;
};
if (type == NONE){
return;
};
targetMC = (this._cutinArray[type] as MovieClip);
targetMC.visible = true;
targetMC.gotoAndPlay(1);
if ((((type == CUTINCAST)) || ((type == CUTINCASTEND)))){
targetMC.chara_mc.gotoAndStop(this._charaNum);
if (this._drawMode == Config.DRAWMODE_FULL){
targetMC.spellCircle_mc.gotoAndStop(this._charaNum);
} else {
targetMC.spellCircle_mc.visible = false;
};
} else {
if (type == CASTEND){
} else {
if (type == GAMEOVER){
targetMC.chara_mc.gotoAndStop(this._charaNum);
targetMC.spellCircle_mc.pict_mc.gotoAndStop(this._charaNum);
};
};
};
}
}
}//package game
Section 22
//Direction (game.Direction)
package game {
public class Direction {
public static const DOWN:int = 2;
public static const NEUTRAL:int = 0;
public static const DIRECTIONS:Array = new Array(UP, DOWN, LEFT, RIGHT);
public static const UP:int = 1;
public static const RIGHT:int = 4;
public static const LEFT:int = 3;
public function Direction(){
super();
}
public static function opposite(_dir:int):int{
if (_dir == UP){
return (DOWN);
};
if (_dir == DOWN){
return (UP);
};
if (_dir == LEFT){
return (RIGHT);
};
if (_dir == RIGHT){
return (LEFT);
};
return (NEUTRAL);
}
public static function getDiffX(_dir:int):int{
if (_dir == LEFT){
return (-1);
};
if (_dir == RIGHT){
return (1);
};
return (0);
}
public static function getDiffY(_dir:int):int{
if (_dir == UP){
return (1);
};
if (_dir == DOWN){
return (-1);
};
return (0);
}
}
}//package game
Section 23
//IBoardEventManager (game.IBoardEventManager)
package game {
public interface IBoardEventManager {
function notifyCastEnd(_arg1:int, _arg2:int):void;
function notifyStart():void;
function notifyCastStart():void;
function notifyDead():void;
}
}//package game
Section 24
//MagicLevelPict (game.MagicLevelPict)
package game {
import flash.display.*;
import net.chibitami.customMC.*;
public class MagicLevelPict extends MovieClip {
public var red_mc:magicLevelRed;
public var _myCharaNum:int;
public var _enemyCharaNum:int;
public var blue_mc:MagicLevelBlue;
public function MagicLevelPict(){
super();
}
public function init(myCharaNum:int, enemyCharaNum:int):void{
this._myCharaNum = myCharaNum;
this._enemyCharaNum = enemyCharaNum;
this.gotoAndStop(myCharaNum);
this.setLevel(0);
}
public function setLevel(level:int):void{
var targetNumberMC:NumberMC;
if (level >= 1000){
level = 999;
} else {
if (level <= -1000){
level = -999;
};
};
this.blue_mc.visible = false;
this.red_mc.visible = false;
if (level >= 0){
targetNumberMC = this.blue_mc;
this.gotoAndStop(this._myCharaNum);
} else {
targetNumberMC = this.red_mc;
this.gotoAndStop(this._enemyCharaNum);
level = (level * -1);
};
targetNumberMC.visible = true;
targetNumberMC.setNumber(level);
if (level < 10){
targetNumberMC.x = -40;
} else {
if (level < 100){
targetNumberMC.x = -20;
} else {
targetNumberMC.x = 0;
};
};
}
}
}//package game
Section 25
//PlayInfo (game.PlayInfo)
package game {
public class PlayInfo {
public var level:uint;
public var charaNum1P:uint;
private var _randSeed:uint;
public var handicap2P:uint;
public var charaNum2P:uint;
public var mode:uint;
public var handicap1P:uint;
public static const LEVEL_PRACTICE:uint = 1;
public static const LEVEL_HARD:uint = 4;
public static const SINGLE:uint = 1;
public static const LEVEL_NORMAL:uint = 3;
public static const VSCPU:uint = 3;
public static const VSHUMAN:uint = 2;
public static const LEVEL_CHAOS:uint = 5;
public static const LEVEL_EASY:uint = 2;
public function PlayInfo(){
super();
this.mode = SINGLE;
this.charaNum1P = 1;
this.charaNum2P = 1;
this.handicap1P = 0;
this.handicap2P = 0;
this.level = 0;
this._randSeed = 1;
}
public function getString():String{
var retStr:String;
var tmpStr:String;
retStr = "";
retStr = (retStr + this.mode.toString(16));
retStr = (retStr + this.charaNum1P.toString(16));
retStr = (retStr + this.charaNum2P.toString(16));
retStr = (retStr + this.handicap1P.toString(16));
retStr = (retStr + this.handicap2P.toString(16));
tmpStr = (this.level + 65536).toString(16);
retStr = (retStr + tmpStr.substr(1, 4));
tmpStr = (this._randSeed + 65536).toString(16);
retStr = (retStr + tmpStr.substr(1, 4));
return (retStr);
}
public function setString(strData:String):Boolean{
if (strData.length != 13){
return (false);
};
this.mode = parseInt(strData.charAt(0), 16);
this.charaNum1P = parseInt(strData.charAt(1), 16);
this.charaNum2P = parseInt(strData.charAt(2), 16);
this.handicap1P = parseInt(strData.charAt(3), 16);
this.handicap2P = parseInt(strData.charAt(4), 16);
this.level = parseInt(strData.substr(5, 4), 16);
this._randSeed = parseInt(strData.substr(9, 4), 16);
if (((!((this.mode == SINGLE))) && (!((this.mode == VSHUMAN))))){
return (false);
};
if ((((this.charaNum1P <= 0)) || ((this.charaNum1P > Setting.CHARANUM)))){
return (false);
};
if ((((this.charaNum2P <= 0)) || ((this.charaNum2P > Setting.CHARANUM)))){
return (false);
};
return (true);
}
public function getEnemyCharaNum(player:int):int{
if (player == 1){
return (this.charaNum2P);
};
return (this.charaNum1P);
}
public function getEnemyHandicap(player:int):int{
if (player == 1){
return (this.handicap2P);
};
return (this.handicap1P);
}
public function get randSeed():uint{
return (this._randSeed);
}
public function getMyHandicap(player:int):int{
if (player == 1){
return (this.handicap1P);
};
return (this.handicap2P);
}
public function set randSeed(value:uint):void{
this._randSeed = (value % 65536);
}
public function getMyCharaNum(player:int):int{
if (player == 1){
return (this.charaNum1P);
};
return (this.charaNum2P);
}
}
}//package game
Section 26
//Refiller (game.Refiller)
package game {
import net.chibitami.gameUtil.*;
public class Refiller {
private var _refillBlockArray:Array;
private var _random:Random;
public function Refiller(playInfo:PlayInfo, player:int){
var w:int;
super();
this._refillBlockArray = new Array(Board.BW);
w = 0;
while (w < this._refillBlockArray.length) {
this._refillBlockArray[w] = null;
w++;
};
this._random = new Random(playInfo.randSeed);
this.setRefillArray();
}
private function setRefillArray():void{
var color:int;
var type:int;
var w:int;
var rand:Number;
w = 0;
while (w < Board.BW) {
rand = this._random.nextNumber();
if (rand < 0.25){
color = BlockInfo.COLOR_RED;
} else {
if (rand < 0.5){
color = BlockInfo.COLOR_BLUE;
} else {
if (rand < 0.75){
color = BlockInfo.COLOR_GREEN;
} else {
color = BlockInfo.COLOR_YELLOW;
};
};
};
this._refillBlockArray[w] = new BlockInfo(BlockInfo.TYPE_NORMAL, color);
w++;
};
}
public function refill(blockStock:BlockStock):void{
var w:int;
w = 1;
while (w <= Board.BW) {
blockStock.push(w, (this._refillBlockArray[(w - 1)] as BlockInfo));
this._refillBlockArray[(w - 1)] = null;
w++;
};
this.setRefillArray();
}
}
}//package game
Section 27
//SpellCircleField (game.SpellCircleField)
package game {
import flash.display.*;
import flash.geom.*;
import effect.*;
public dynamic class SpellCircleField extends MovieClip {
private var _charaNum:int;
private var _castNumEffect:CastNumEffect;
private var _drawMode:int;
private var _castPointArray:Array;
private var _spellCircleArray:Array;
private var _castCount:int;
public function SpellCircleField(){
super();
}
public function init(charaNum:int, drawMode:int=1):void{
var w:*;
var h:int;
var spellCircle:SpellCirclePict;
this._charaNum = charaNum;
this._drawMode = drawMode;
this._castPointArray = new Array();
this._castCount = 0;
this._spellCircleArray = new Array(Board.BW);
w = 0;
while (w < Board.BW) {
this._spellCircleArray[w] = new Array(Board.BH);
h = 0;
while (h < Board.BH) {
this._spellCircleArray[w][h] = null;
h++;
};
w++;
};
w = 1;
while (w < Board.BW) {
h = 1;
while (h < Board.BH) {
spellCircle = new SpellCirclePict();
spellCircle.x = (Board.UNIT_SIZE * (w - 1));
spellCircle.y = ((-1 * Board.UNIT_SIZE) * (h - 1));
this.addChild(spellCircle);
this._spellCircleArray[w][h] = spellCircle;
spellCircle.init(charaNum);
h++;
};
w++;
};
this._castNumEffect = new CastNumEffect();
this._castNumEffect.x = 200;
this._castNumEffect.y = -180;
this.addChild(this._castNumEffect);
this._castNumEffect.visible = false;
}
public function getSpellCircleNum():int{
var ret:int;
var w:int;
var h:int;
ret = 0;
w = 1;
while (w < Board.BW) {
h = 1;
while (h < Board.BH) {
if ((this._spellCircleArray[w][h] as SpellCirclePict).isActive()){
ret++;
};
h++;
};
w++;
};
return (ret);
}
public function reset():void{
var w:int;
var h:int;
w = 1;
while (w < Board.BW) {
h = 1;
while (h < Board.BH) {
(this._spellCircleArray[w][h] as SpellCirclePict).init(this._charaNum);
h++;
};
w++;
};
this._castPointArray = new Array();
this._castCount = 0;
this._castNumEffect.visible = false;
}
public function createSpellCircle(w:int, h:int):void{
var spellCircle:SpellCirclePict;
spellCircle = this._spellCircleArray[w][h];
if (spellCircle.isActive() == false){
spellCircle.appear();
this._castPointArray.push(new Point(w, h));
};
}
public function isSpellCircleExists(w:int, h:int):Boolean{
if ((((((((w <= 0)) || ((w >= Board.BW)))) || ((h <= 0)))) || ((h >= Board.BH)))){
return (false);
};
if ((this._spellCircleArray[w][h] as SpellCirclePict).isActive()){
return (true);
};
return (false);
}
public function castNextSpellCircle():Point{
var spellCircle:SpellCirclePict;
var point:Point;
while (this._castPointArray.length > 0) {
point = (this._castPointArray.shift() as Point);
spellCircle = (this._spellCircleArray[point.x][point.y] as SpellCirclePict);
if (spellCircle.isActive()){
this._castCount++;
spellCircle.cast(this._castCount);
this._castNumEffect.show(this._castCount);
return (point);
};
};
this._castCount = 0;
return (null);
}
}
}//package game
Section 28
//SpellCirclePict (game.SpellCirclePict)
package game {
import flash.display.*;
public dynamic class SpellCirclePict extends MovieClip {
private var _charaNum:int;
private var _isActive:Boolean;
public var appear_mc:MovieClip;
public var cast_mc:MovieClip;
public function SpellCirclePict(){
super();
}
public function init(charaNum:int):void{
this._charaNum = charaNum;
this._isActive = false;
this.appear_mc.visible = false;
this.cast_mc.visible = false;
this.appear_mc.gotoAndStop(1);
this.cast_mc.gotoAndStop(1);
}
public function cast(castNum:int):void{
this._isActive = false;
this.appear_mc.visible = false;
this.cast_mc.visible = true;
this.cast_mc.gotoAndPlay(1);
this.cast_mc.inner_mc.gotoAndStop(this._charaNum);
}
public function get w():int{
return (this._w);
}
public function get h():int{
return (this._h);
}
public function appear():void{
this._isActive = true;
this.appear_mc.visible = true;
this.cast_mc.visible = false;
this.appear_mc.gotoAndPlay(1);
}
public function isActive():Boolean{
return (this._isActive);
}
}
}//package game
Section 29
//as (MaincClass.as)
package MaincClass {
import flash.display.*;
public dynamic class as extends MovieClip {
public function as(){
super();
}
}
}//package MaincClass
Section 30
//CharaSelectSingle (menu.CharaSelectSingle)
package menu {
import game.*;
import net.chibitami.gameUtil.*;
import flash.display.*;
import sound.*;
public class CharaSelectSingle extends MovieClip {
public var charaAppear_mc:MovieClip;
private var _keyChecker:KeyChecker;
private var _charaNum:int;
public var silhouette_mc:MovieClip;
private var _SEPlayer:SystemSEPlayer;
private var _saveData:SaveData;
private var _frameNum:int;
public var circle1_mc:MovieClip;
private var _levelMCArray:Array;
private var _config:Config;
public var charaName_mc:MovieClip;
public var charaHide_mc:MovieClip;
public var loading_mc:MovieClip;
private var _state:int;
public var circle2_mc:MovieClip;
private var _level:int;
public var startLevel_mc:MovieClip;
public var info_mc:MovieClip;
private static const FRAME_LOADING:int = 30;
private static const STATE_SELECT:int = 1;
private static const STATE_LOADING:int = 2;
public function CharaSelectSingle(){
super();
}
private function selectNextChara():void{
var next:int;
next = (this._charaNum + 1);
if (next > Setting.CHARANUM){
next = 1;
};
this.selectChara(next);
}
public function init(startCharaNum:int=1, startLevel:int=3):void{
var i:int;
this._saveData = SaveData.getInstance();
this._keyChecker = KeyChecker.getInstance();
this._config = Config.getInstance();
this._SEPlayer = new SystemSEPlayer();
this._levelMCArray = new Array(5);
i = 0;
while (i < 5) {
this._levelMCArray[i] = this.startLevel_mc.getChildByName((("level" + (i + 1)) + "_mc"));
i++;
};
this._charaNum = 0;
this.selectChara(startCharaNum);
this.selectLevel(startLevel);
this._state = STATE_SELECT;
this._frameNum = 0;
this.loading_mc.visible = false;
BGMPlayer.play(11);
}
private function repaint():void{
this.startLevel_mc.level2_mc.highScoreTextArea.text = this._saveData.highScoreArray[this._charaNum][0].toString();
this.startLevel_mc.level3_mc.highScoreTextArea.text = this._saveData.highScoreArray[this._charaNum][1].toString();
this.startLevel_mc.level4_mc.highScoreTextArea.text = this._saveData.highScoreArray[this._charaNum][2].toString();
this.startLevel_mc.level5_mc.highScoreTextArea.text = this._saveData.highScoreArray[this._charaNum][3].toString();
}
private function selectChara(nextCharaNum:int):void{
this.charaAppear_mc.gotoAndPlay(1);
this.charaHide_mc.gotoAndPlay(1);
this.charaAppear_mc.visible = true;
this.charaHide_mc.visible = true;
this.charaAppear_mc.pict_mc.gotoAndStop(nextCharaNum);
this.charaHide_mc.pict_mc.gotoAndStop(nextCharaNum);
if (this._charaNum == 0){
this.charaHide_mc.visible = false;
};
this.charaName_mc.gotoAndStop(nextCharaNum);
this.info_mc.gotoAndStop(nextCharaNum);
this.silhouette_mc.gotoAndStop(nextCharaNum);
this.circle1_mc.rotateSpellCircle_mc.pict_mc.gotoAndStop(nextCharaNum);
this.circle1_mc.gotoAndStop(nextCharaNum);
this.circle2_mc.rotateSpellCircle_mc.pict_mc.gotoAndStop(nextCharaNum);
this.circle2_mc.gotoAndStop(nextCharaNum);
this._charaNum = nextCharaNum;
this.repaint();
}
public function enterFrame():void{
if (this._state == STATE_SELECT){
if (this._keyChecker.isPushed(this._config.getKeyCode(Config.KEY_ROTATE_RIGHT))){
this._SEPlayer.play(SystemSEPlayer.ENTER);
BGMPlayer.load(this._charaNum);
this.loading_mc.visible = true;
this._state = STATE_LOADING;
this._frameNum = 0;
} else {
if (this._keyChecker.isPushed(this._config.getKeyCode(Config.KEY_ROTATE_LEFT))){
this._SEPlayer.play(SystemSEPlayer.CANCEL);
MainClass.getInstance().startTitle();
} else {
if (this._keyChecker.isPushed(Key.UP)){
this._SEPlayer.play(SystemSEPlayer.SELECT);
this.selectPrevLevel();
} else {
if (this._keyChecker.isPushed(Key.DOWN)){
this._SEPlayer.play(SystemSEPlayer.SELECT);
this.selectNextLevel();
};
};
};
};
} else {
if (this._state == STATE_LOADING){
this._frameNum++;
if ((((this._frameNum > FRAME_LOADING)) && ((BGMPlayer.getLoadedPercent(this._charaNum) == 100)))){
MainClass.getInstance().startGameSingle(this.getPlayInfo());
};
};
};
}
private function selectPrevLevel():void{
var next:int;
next = (this._level - 1);
if (next <= 0){
next = 5;
};
this.selectLevel(next);
}
public function getPlayInfo():PlayInfo{
var playInfo:PlayInfo;
playInfo = new PlayInfo();
playInfo.mode = PlayInfo.SINGLE;
playInfo.charaNum1P = this._charaNum;
playInfo.level = this._level;
playInfo.randSeed = Math.floor((Math.random() * 65536));
return (playInfo);
}
private function selectNextLevel():void{
var next:int;
next = (this._level + 1);
if (next > 5){
next = 1;
};
this.selectLevel(next);
}
private function selectPrevChara():void{
var next:int;
next = (this._charaNum - 1);
if (next <= 0){
next = Setting.CHARANUM;
};
this.selectChara(next);
}
private function selectLevel(nextLevel:int):void{
var i:int;
this._level = nextLevel;
this.startLevel_mc.gotoAndStop(this._level);
this.repaint();
i = 0;
while (i < 5) {
this._levelMCArray[i].alpha = 0.2;
i++;
};
this._levelMCArray[(this._level - 1)].alpha = 1;
}
}
}//package menu
Section 31
//ConfigMC (menu.ConfigMC)
package menu {
import net.chibitami.gameUtil.*;
import flash.display.*;
import sound.*;
public class ConfigMC extends MovieClip {
private var _selected:int;
private var _keyChecker:KeyChecker;
private var _valueArray:Array;
private var _SEPlayer:SystemSEPlayer;
private var _config:Config;
public var menu_mc:MovieClip;
private var _configMCArray:Array;
private static const MENUNUM:int = 7;
private static const MENU_LOG:int = 7;
private static const MENU_VOLUMESE:int = 2;
private static const MENU_KEY1:int = 3;
private static const MENU_KEY2:int = 4;
private static const MENU_KEY3:int = 5;
private static const MENU_VOLUMEBGM:int = 1;
private static const MENU_DRAWMODE:int = 6;
private static const MAXVALUEARRAY:Array = new Array(0, 11, 11, 3, 3, 3, 2, 2, 0, 0);
private static const MENU_EXIT:int = 9;
private static const MENU_SAVE:int = 8;
public function ConfigMC(){
super();
}
private function setNextValue():void{
var _local1 = this._valueArray;
var _local2 = this._selected;
var _local3 = (_local1[_local2] + 1);
_local1[_local2] = _local3;
if (this._valueArray[this._selected] > MAXVALUEARRAY[this._selected]){
this._valueArray[this._selected] = 1;
};
this.repaint();
}
public function init():void{
var i:int;
this._keyChecker = KeyChecker.getInstance();
this._config = Config.getInstance();
this._SEPlayer = new SystemSEPlayer();
this._configMCArray = new Array((MENUNUM + 1));
this._configMCArray[0] = null;
i = 1;
while (i <= MENUNUM) {
this._configMCArray[i] = this.menu_mc.getChildByName((("config" + i) + "_mc"));
i++;
};
this._valueArray = new Array((MENUNUM + 1));
this._valueArray[0] = 0;
this.load();
this._selected = 1;
this.repaint();
}
private function repaint():void{
var i:int;
this.menu_mc.gotoAndStop(this._selected);
i = 1;
while (i <= MENUNUM) {
this._configMCArray[i].gotoAndStop(this._valueArray[i]);
i++;
};
}
private function selectNext():void{
this._selected++;
if (this._selected > (MENUNUM + 2)){
this._selected = 1;
};
this.repaint();
}
private function selectPrev():void{
this._selected--;
if (this._selected <= 0){
this._selected = (MENUNUM + 2);
};
this.repaint();
}
public function enterFrame():void{
if (this._keyChecker.isPushed(this._config.getKeyCode(Config.KEY_ROTATE_RIGHT))){
if (this._selected == MENU_SAVE){
this._SEPlayer.play(SystemSEPlayer.ENTER);
this.save();
MainClass.getInstance().startTitle();
} else {
if (this._selected == MENU_EXIT){
this._SEPlayer.play(SystemSEPlayer.CANCEL);
MainClass.getInstance().startTitle();
} else {
this._SEPlayer.play(SystemSEPlayer.SELECT);
this.setNextValue();
};
};
} else {
if (this._keyChecker.isPushed(this._config.getKeyCode(Config.KEY_ROTATE_LEFT))){
this._SEPlayer.play(SystemSEPlayer.CANCEL);
MainClass.getInstance().startTitle();
} else {
if (this._keyChecker.isPushed(Key.UP)){
this._SEPlayer.play(SystemSEPlayer.SELECT);
this.selectPrev();
} else {
if (this._keyChecker.isPushed(Key.DOWN)){
this._SEPlayer.play(SystemSEPlayer.SELECT);
this.selectNext();
} else {
if (this._keyChecker.isPushed(Key.LEFT)){
if (((!((this._selected == MENU_SAVE))) && (!((this._selected == MENU_EXIT))))){
this._SEPlayer.play(SystemSEPlayer.SELECT);
this.setPrevValue();
};
} else {
if (this._keyChecker.isPushed(Key.RIGHT)){
if (((!((this._selected == MENU_SAVE))) && (!((this._selected == MENU_EXIT))))){
this._SEPlayer.play(SystemSEPlayer.SELECT);
this.setNextValue();
};
};
};
};
};
};
};
}
public function save():void{
var keyArray:Array;
var i:int;
this._config.volumeBGM = ((this._valueArray[MENU_VOLUMEBGM] - 1) / 10);
this._config.volumeSE = ((this._valueArray[MENU_VOLUMESE] - 1) / 10);
keyArray = new Array(3);
i = 0;
while (i < 3) {
if (this._valueArray[(MENU_KEY1 + i)] == 1){
keyArray[i] = Key.BUTTON1;
} else {
if (this._valueArray[(MENU_KEY1 + i)] == 2){
keyArray[i] = Key.BUTTON2;
} else {
if (this._valueArray[(MENU_KEY1 + i)] == 3){
keyArray[i] = Key.BUTTON3;
};
};
};
i++;
};
this._config.setKeyCode(keyArray[0], keyArray[1], keyArray[2]);
if (this._valueArray[MENU_DRAWMODE] == 1){
this._config.drawMode = Config.DRAWMODE_FULL;
} else {
if (this._valueArray[MENU_DRAWMODE] == 2){
this._config.drawMode = Config.DRAWMODE_SIMPLE;
};
};
if (this._valueArray[MENU_LOG] == 1){
this._config.recordLog = true;
} else {
this._config.recordLog = false;
};
this._config.save();
}
private function setPrevValue():void{
var _local1 = this._valueArray;
var _local2 = this._selected;
var _local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
if (this._valueArray[this._selected] <= 0){
this._valueArray[this._selected] = MAXVALUEARRAY[this._selected];
};
this.repaint();
}
public function load():void{
var keyArray:Array;
var i:int;
this._valueArray[MENU_VOLUMEBGM] = Math.round((1 + (this._config.volumeBGM * 10)));
this._valueArray[MENU_VOLUMESE] = Math.round((1 + (this._config.volumeSE * 10)));
keyArray = new Array(3);
keyArray[0] = this._config.getKeyCode(Config.KEY_ROTATE_RIGHT);
keyArray[1] = this._config.getKeyCode(Config.KEY_ROTATE_LEFT);
keyArray[2] = this._config.getKeyCode(Config.KEY_REFILL);
i = 0;
while (i < 3) {
if (keyArray[i] == Key.BUTTON1){
this._valueArray[(MENU_KEY1 + i)] = 1;
} else {
if (keyArray[i] == Key.BUTTON2){
this._valueArray[(MENU_KEY1 + i)] = 2;
} else {
if (keyArray[i] == Key.BUTTON3){
this._valueArray[(MENU_KEY1 + i)] = 3;
};
};
};
i++;
};
if (this._config.drawMode == Config.DRAWMODE_FULL){
this._valueArray[MENU_DRAWMODE] = 1;
} else {
this._valueArray[MENU_DRAWMODE] = 2;
};
if (this._config.recordLog == true){
this._valueArray[MENU_LOG] = 1;
} else {
this._valueArray[MENU_LOG] = 2;
};
}
}
}//package menu
Section 32
//DemoData (menu.DemoData)
package menu {
import game.logger.*;
import flash.display.*;
import flash.text.*;
public class DemoData extends MovieClip {
public var logStr1TextArea:TextField;
var logger:LoggerSingle;
public function DemoData(){
super();
}
public function init():void{
var rand:int;
rand = Math.random();
this.logger = new LoggerSingle();
this.logger.setString(this.logStr1TextArea.text);
}
}
}//package menu
Section 33
//ManualMC (menu.ManualMC)
package menu {
import net.chibitami.gameUtil.*;
import flash.display.*;
import sound.*;
public class ManualMC extends MovieClip {
private var _keyChecker:KeyChecker;
private var _SEPlayer:SystemSEPlayer;
private var _config:Config;
public function ManualMC(){
super();
}
public function init():void{
this._keyChecker = KeyChecker.getInstance();
this._SEPlayer = new SystemSEPlayer();
this._config = Config.getInstance();
}
public function enterFrame():void{
if (((((this._keyChecker.isPushed(this._config.getKeyCode(Config.KEY_ROTATE_RIGHT))) || (this._keyChecker.isPushed(this._config.getKeyCode(Config.KEY_ROTATE_LEFT))))) || (this._keyChecker.isPushed(this._config.getKeyCode(Config.KEY_REFILL))))){
this._SEPlayer.play(SystemSEPlayer.CANCEL);
MainClass.getInstance().startTitle();
};
}
}
}//package menu
Section 34
//ReplayMenuMC (menu.ReplayMenuMC)
package menu {
import game.logger.*;
import net.chibitami.gameUtil.*;
import flash.display.*;
import sound.*;
import flash.text.*;
public class ReplayMenuMC extends MovieClip {
private var _selected:int;
private var _keyChecker:KeyChecker;
private var _SEPlayer:SystemSEPlayer;
private var _config:Config;
public var menu_mc:MovieClip;
public var loading_mc:MovieClip;
private var _state:int;
private var _logger:LoggerSingle;
public var logStrTextArea:TextField;
private static const MENUNUM:int = 3;
private static const STATE_SELECT:int = 1;
private static const STATE_LOADING:int = 2;
private static const MENU_PASTE:int = 1;
private static const MENU_PLAY:int = 2;
private static const MENU_EXIT:int = 3;
public function ReplayMenuMC(){
super();
}
private function repaint():void{
this.menu_mc.gotoAndStop(this._selected);
}
public function init():void{
this._keyChecker = KeyChecker.getInstance();
this._config = Config.getInstance();
this._SEPlayer = new SystemSEPlayer();
this._logger = null;
this._state = STATE_SELECT;
this.loading_mc.visible = false;
this._selected = 1;
this.repaint();
BGMPlayer.play(0);
}
private function selectNext():void{
this._selected++;
if (this._selected > MENUNUM){
this._selected = 1;
};
this.repaint();
}
private function selectPrev():void{
this._selected--;
if (this._selected <= 0){
this._selected = MENUNUM;
};
this.repaint();
}
public function enterFrame():void{
if (this._state == STATE_SELECT){
if (this._keyChecker.isPushed(this._config.getKeyCode(Config.KEY_ROTATE_RIGHT))){
if (this._selected == MENU_PASTE){
} else {
if (this._selected == MENU_PLAY){
this._SEPlayer.play(SystemSEPlayer.SELECT);
this.createLogger();
if (this._logger != null){
BGMPlayer.load(this._logger.playInfo.charaNum1P);
this.loading_mc.visible = true;
this._state = STATE_LOADING;
} else {
this.logStrTextArea.text = "データが正しくありません";
};
} else {
if (this._selected == MENU_EXIT){
this._SEPlayer.play(SystemSEPlayer.CANCEL);
MainClass.getInstance().startTitle();
};
};
};
} else {
if (this._keyChecker.isPushed(this._config.getKeyCode(Config.KEY_ROTATE_LEFT))){
this._SEPlayer.play(SystemSEPlayer.CANCEL);
MainClass.getInstance().startTitle();
} else {
if (this._keyChecker.isPushed(Key.UP)){
this._SEPlayer.play(SystemSEPlayer.SELECT);
this.selectPrev();
} else {
if (this._keyChecker.isPushed(Key.DOWN)){
this._SEPlayer.play(SystemSEPlayer.SELECT);
this.selectNext();
};
};
};
};
} else {
if (this._state == STATE_LOADING){
if (BGMPlayer.getLoadedPercent(this._logger.playInfo.charaNum1P) == 100){
MainClass.getInstance().startReplaySingle(this._logger);
};
};
};
}
public function ConfigMC(){
}
private function createLogger():Boolean{
var logger:LoggerSingle;
trace(this.logStrTextArea.text);
logger = new LoggerSingle();
if (logger.setString(this.logStrTextArea.text)){
this._logger = logger;
return (true);
};
return (false);
}
}
}//package menu
Section 35
//TitleMC (menu.TitleMC)
package menu {
import net.chibitami.gameUtil.*;
import flash.display.*;
import sound.*;
public class TitleMC extends MovieClip {
private var _selected:int;
private var _keyChecker:KeyChecker;
private var _SEPlayer:SystemSEPlayer;
private var _frameNum:int;
private var _config:Config;
public var menu_mc:MovieClip;
public var loading_mc:MovieClip;
private var _state:int;
private var _demoData:DemoData;
public static const MENU_DEMO:int = 99;
public static const MENU_MANUAL:int = 4;
private static const MENUNUM:int = 4;
public static const MENU_SINGLE:int = 1;
public static const MENU_CONFIG:int = 3;
private static const STATE_SELECT:int = 1;
private static const FRAME_LOADING:int = 20;
public static const MENU_REPLAY:int = 2;
private static const STATE_LOADING:int = 2;
public function TitleMC(){
super();
}
public function init():void{
this._keyChecker = KeyChecker.getInstance();
this._SEPlayer = new SystemSEPlayer();
this._config = Config.getInstance();
this._selected = MENU_SINGLE;
this.menu_mc.gotoAndStop(this._selected);
this._state = STATE_SELECT;
this._frameNum = 0;
this.loading_mc.visible = false;
BGMPlayer.play(0);
BGMPlayer.load(11);
}
private function selectNext():void{
this._selected++;
if (this._selected > MENUNUM){
this._selected = 1;
};
this.menu_mc.gotoAndStop(this._selected);
}
private function selectPrev():void{
this._selected--;
if (this._selected <= 0){
this._selected = MENUNUM;
};
this.menu_mc.gotoAndStop(this._selected);
}
public function enterFrame():void{
if (this._state == STATE_SELECT){
if (this._keyChecker.isPushed(this._config.getKeyCode(Config.KEY_ROTATE_RIGHT))){
this._SEPlayer.play(SystemSEPlayer.ENTER);
this._state = STATE_LOADING;
this.loading_mc.visible = true;
this._frameNum = 0;
} else {
if (this._keyChecker.isPushed(Key.PAUSE)){
this._SEPlayer.play(SystemSEPlayer.ENTER);
this._state = STATE_LOADING;
this.loading_mc.visible = true;
this._frameNum = 0;
this._selected = MENU_DEMO;
this._demoData = new DemoData();
this._demoData.init();
BGMPlayer.load(this._demoData.logger.playInfo.charaNum1P);
} else {
if (this._keyChecker.isPushed(Key.UP)){
this._SEPlayer.play(SystemSEPlayer.SELECT);
this.selectPrev();
} else {
if (this._keyChecker.isPushed(Key.DOWN)){
this._SEPlayer.play(SystemSEPlayer.SELECT);
this.selectNext();
};
};
};
};
} else {
if (this._state == STATE_LOADING){
this._frameNum++;
if (this._frameNum >= FRAME_LOADING){
if (this._selected == MENU_SINGLE){
if (BGMPlayer.getLoadedPercent(11) == 100){
this.enterScene();
};
} else {
if (this._selected == MENU_DEMO){
if (BGMPlayer.getLoadedPercent(this._demoData.logger.playInfo.charaNum1P) == 100){
this.enterScene();
};
} else {
this.enterScene();
};
};
};
};
};
}
private function enterScene():void{
if (this._selected == MENU_SINGLE){
MainClass.getInstance().startCharaSelectSingle(2);
} else {
if (this._selected == MENU_REPLAY){
MainClass.getInstance().startReplayMenu();
} else {
if (this._selected == MENU_MANUAL){
MainClass.getInstance().startManual();
} else {
if (this._selected == MENU_CONFIG){
MainClass.getInstance().startConfig();
} else {
if (this._selected == MENU_DEMO){
MainClass.getInstance().startReplaySingle(this._demoData.logger, true);
};
};
};
};
};
}
}
}//package menu
Section 36
//NumberMC (net.chibitami.customMC.NumberMC)
package net.chibitami.customMC {
import flash.display.*;
public class NumberMC extends MovieClip {
public var number3_mc:MovieClip;
public var number1_mc:MovieClip;
private var _numberMCArray:Array;
public var number2_mc:MovieClip;
public function NumberMC(){
var numberMC:MovieClip;
var i:int;
super();
this._numberMCArray = new Array();
i = 1;
while ((numberMC = (getChildByName((("number" + i) + "_mc")) as MovieClip)) != null) {
this._numberMCArray.push(numberMC);
i++;
};
}
public function setNumber(value:int):void{
var numStr:String;
var figure:int;
var i:int;
var figureNum:int;
numStr = value.toString();
figure = numStr.length;
i = 0;
while (i < figure) {
figureNum = parseInt(numStr.charAt(((figure - i) - 1)));
(this._numberMCArray[i] as MovieClip).gotoAndStop((figureNum + 1));
i++;
};
i = figure;
while (i < this._numberMCArray.length) {
(this._numberMCArray[i] as MovieClip).gotoAndStop(11);
i++;
};
}
}
}//package net.chibitami.customMC
Section 37
//ElapsedTimer (net.chibitami.gameUtil.ElapsedTimer)
package net.chibitami.gameUtil {
import flash.utils.*;
public class ElapsedTimer {
private var previousTime:int;
private var currentTime:int;
public function ElapsedTimer(){
super();
this.currentTime = getTimer();
this.previousTime = -1;
}
public function getElapsedTime():int{
this.previousTime = this.currentTime;
this.currentTime = getTimer();
return ((this.currentTime - this.previousTime));
}
}
}//package net.chibitami.gameUtil
Section 38
//FPSBalancer (net.chibitami.gameUtil.FPSBalancer)
package net.chibitami.gameUtil {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public dynamic class FPSBalancer extends MovieClip {
private var lowFPSCount:int;
private var timer:Timer;
private var enterFrameCount:int;
private var currentFps:int;
private static const CHECK_COUNT:int = 5;
private static const LOWFPS_RATE:Number = 0.833333333333333;
private static const SINGLETON_KEY:Object = new Object();
private static var instance:FPSBalancer;
public function FPSBalancer(_singletonKey:Object=null){
super();
if (_singletonKey != SINGLETON_KEY){
throw (new Error("エラー:FPSBalancerはSingletonです。getInstance()を使用してください。"));
};
this.currentFps = 0;
this.enterFrameCount = 0;
this.lowFPSCount = 0;
}
public function init(_target:DisplayObjectContainer):void{
_target.addChild(this);
this.currentFps = this.stage.frameRate;
this.enterFrameCount = 0;
this.lowFPSCount = 0;
this.timer = new Timer(1000);
this.timer.addEventListener(TimerEvent.TIMER, onTimer, false, 0, true);
this.timer.start();
this.addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true);
}
private function decreaseQuality():void{
if (this.stage.quality == "BEST"){
this.stage.quality = "HIGH";
} else {
if (this.stage.quality == "HIGH"){
this.stage.quality = "MEDIUM";
} else {
if (this.stage.quality == "MEDIUM"){
this.stage.quality = "LOW";
};
};
};
}
private function onTimer(_event:TimerEvent):void{
this.currentFps = this.enterFrameCount;
this.enterFrameCount = 0;
if (this.currentFps < (this.stage.frameRate * LOWFPS_RATE)){
this.lowFPSCount++;
if (this.lowFPSCount >= CHECK_COUNT){
this.decreaseQuality();
this.lowFPSCount = 0;
};
} else {
this.lowFPSCount = 0;
};
}
private function onEnterFrame(_event:Event):void{
this.enterFrameCount++;
}
public function get fps():int{
return (this.currentFps);
}
public function get quality():String{
return (stage.quality);
}
public static function getInstance():FPSBalancer{
if (!instance){
instance = new FPSBalancer(SINGLETON_KEY);
};
return (instance);
}
}
}//package net.chibitami.gameUtil
Section 39
//FrameActionChecker (net.chibitami.gameUtil.FrameActionChecker)
package net.chibitami.gameUtil {
public class FrameActionChecker {
private var _elapsedTimer:ElapsedTimer;
private var _elapsedTime:Number;
private var _timePerFrame:Number;
public function FrameActionChecker(fps:int){
super();
this._elapsedTimer = new ElapsedTimer();
this._elapsedTime = 0;
this._timePerFrame = (1000 / fps);
}
public function getFrameActionCount():int{
var ret:int;
ret = 0;
this._elapsedTime = (this._elapsedTime + this._elapsedTimer.getElapsedTime());
do {
this._elapsedTime = (this._elapsedTime - this._timePerFrame);
ret++;
} while (this._elapsedTime >= this._timePerFrame);
return (ret);
}
}
}//package net.chibitami.gameUtil
Section 40
//GameTimer (net.chibitami.gameUtil.GameTimer)
package net.chibitami.gameUtil {
import flash.events.*;
import flash.utils.*;
public class GameTimer {
private var timer:Timer;
private var time:int;
private var checkTime:int;
private var startTime:int;
private static const TIMER_INTERVAL_DEFAULT:int = 50;
public function GameTimer(_timerInterval:int=50){
super();
this.time = 0;
this.timer = new Timer(_timerInterval);
this.timer.addEventListener(TimerEvent.TIMER, onTimer, false, 0, true);
}
public function start():void{
this.startTime = getTimer();
this.time = 0;
this.checkTime = this.startTime;
this.timer.start();
}
private function updateTime():void{
var tmpCheckTime:int;
tmpCheckTime = getTimer();
this.time = (this.time + (tmpCheckTime - this.checkTime));
this.checkTime = tmpCheckTime;
}
public function getMillSecond():int{
return (this.time);
}
private function onTimer(_event:TimerEvent):void{
this.updateTime();
}
public function getString():String{
var retStr:String;
var timeSec:int;
var timeHour:int;
var timeMin:int;
retStr = "";
timeSec = this.getSecond();
timeHour = Math.floor((timeSec / 3600));
timeSec = (timeSec % 3600);
timeMin = Math.floor((timeSec / 60));
timeSec = (timeSec % 60);
if (timeHour > 0){
if (timeHour < 10){
retStr = (retStr + "0");
};
retStr = (retStr + (timeHour + ":"));
};
if (timeMin < 10){
retStr = (retStr + "0");
};
retStr = (retStr + (timeMin + ":"));
if (timeSec < 10){
retStr = (retStr + "0");
};
retStr = (retStr + timeSec);
return (retStr);
}
public function resume():void{
this.checkTime = getTimer();
this.timer.start();
}
public function getTimeArray():Array{
var array:Array;
var tmp:int;
array = new Array(3);
tmp = this.getSecond();
array[0] = Math.floor((tmp / 3600));
array[1] = Math.floor(((tmp % 3600) / 60));
array[2] = (tmp % 60);
return (array);
}
public function getSecond():int{
return (Math.floor((this.time / 1000)));
}
public function pause():void{
this.updateTime();
this.timer.stop();
}
}
}//package net.chibitami.gameUtil
Section 41
//KeyChecker (net.chibitami.gameUtil.KeyChecker)
package net.chibitami.gameUtil {
import flash.events.*;
import flash.display.*;
public class KeyChecker extends MovieClip {
private var _autoPushFrameBuffer:Object;
private var _frameBuffer:Object;
private var _currentStateBuffer:Object;
private var _keyActionBuffer:Object;
private static const KEYACTION_NONE:int = 0;
private static const STATE_PUSHED:int = 3;
private static const STATE_RELEASED:int = 5;
private static const STATE_DOUBLEPUSHED:int = 4;
private static const KEYACTION_UP:int = 2;
private static const STATE_UP:int = 2;
private static const SINGLETON_KEY:Object = new Object();
private static const KEYACTION_DOWN:int = 1;
private static const STATE_DOWN:int = 1;
private static var instance:KeyChecker;
public static var FRAME_DOUBLEPUSH:int = 4;
public static var FRAME_FIRSTAUTOPUSH:int = 10;
public static var FRAME_AUTOPUSH:int = 3;
public function KeyChecker(_singletonKey:Object=null){
super();
if (_singletonKey != SINGLETON_KEY){
throw (new Error("エラー:KeyCheckerはSingletonです。getInstance()を使用してください。"));
};
this._currentStateBuffer = new Object();
this._frameBuffer = new Object();
this._keyActionBuffer = new Object();
this._autoPushFrameBuffer = new Object();
}
public function isDown(keyCode:uint):Boolean{
var state:int;
state = this._currentStateBuffer[keyCode.toString()];
if ((((((state == STATE_DOWN)) || ((state == STATE_PUSHED)))) || ((state == STATE_DOUBLEPUSHED)))){
return (true);
};
return (false);
}
public function addKey(keyCode:uint, autoPush:Boolean=false):Boolean{
var keyCodeStr:String;
keyCodeStr = keyCode.toString();
if (this._currentStateBuffer[keyCodeStr] != undefined){
return (false);
};
this._currentStateBuffer[keyCodeStr] = STATE_UP;
this._frameBuffer[keyCodeStr] = 0;
this._keyActionBuffer[keyCodeStr] = KEYACTION_NONE;
if (autoPush){
this._autoPushFrameBuffer[keyCodeStr] = FRAME_FIRSTAUTOPUSH;
} else {
this._autoPushFrameBuffer[keyCodeStr] = -1;
};
return (true);
}
public function init(target:DisplayObjectContainer):void{
target.addChild(this);
this.stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownFunc, false, 0, true);
this.stage.addEventListener(KeyboardEvent.KEY_UP, keyUpFunc, false, 0, true);
}
public function isPushed(keyCode:uint):Boolean{
var state:int;
state = this._currentStateBuffer[keyCode.toString()];
if ((((state == STATE_PUSHED)) || ((state == STATE_DOUBLEPUSHED)))){
return (true);
};
return (false);
}
private function keyDownFunc(event:KeyboardEvent):void{
var keyCodeStr:String;
var currentState:int;
keyCodeStr = event.keyCode.toString();
if (this._keyActionBuffer[keyCodeStr] != undefined){
currentState = this._currentStateBuffer[keyCodeStr];
if ((((currentState == STATE_RELEASED)) || ((currentState == STATE_UP)))){
this._keyActionBuffer[keyCodeStr] = KEYACTION_DOWN;
};
};
}
private function keyUpFunc(event:KeyboardEvent):void{
var keyCodeStr:String;
keyCodeStr = event.keyCode.toString();
if (this._keyActionBuffer[keyCodeStr] != undefined){
this._keyActionBuffer[keyCodeStr] = KEYACTION_UP;
};
}
public function isUp(keyCode:uint):Boolean{
var state:int;
state = this._currentStateBuffer[keyCode.toString()];
if ((((state == STATE_UP)) || ((state == STATE_RELEASED)))){
return (true);
};
return (false);
}
public function isReleased(keyCode:uint):Boolean{
var state:int;
state = this._currentStateBuffer[keyCode.toString()];
if (state == STATE_RELEASED){
return (true);
};
return (false);
}
public function isDoublePushed(keyCode:uint):Boolean{
var state:int;
state = this._currentStateBuffer[keyCode.toString()];
if (state == STATE_DOUBLEPUSHED){
return (true);
};
return (false);
}
public function update():void{
var keyCodeStr:String;
var currentState:int;
for (keyCodeStr in this._currentStateBuffer) {
currentState = this._currentStateBuffer[keyCodeStr];
if (this._keyActionBuffer[keyCodeStr] == KEYACTION_DOWN){
if ((((currentState == STATE_UP)) || ((currentState == STATE_RELEASED)))){
if (this._frameBuffer[keyCodeStr] < FRAME_DOUBLEPUSH){
this._currentStateBuffer[keyCodeStr] = STATE_DOUBLEPUSHED;
} else {
this._currentStateBuffer[keyCodeStr] = STATE_PUSHED;
};
};
this._frameBuffer[keyCodeStr] = 0;
if (this._autoPushFrameBuffer[keyCodeStr] != -1){
this._autoPushFrameBuffer[keyCodeStr] = FRAME_FIRSTAUTOPUSH;
};
} else {
if (this._keyActionBuffer[keyCodeStr] == KEYACTION_UP){
if ((((((currentState == STATE_DOWN)) || ((currentState == STATE_PUSHED)))) || ((currentState == STATE_DOUBLEPUSHED)))){
this._currentStateBuffer[keyCodeStr] = STATE_RELEASED;
};
this._frameBuffer[keyCodeStr] = 0;
} else {
var _local5 = this._frameBuffer;
var _local6 = keyCodeStr;
var _local7 = (_local5[_local6] + 1);
_local5[_local6] = _local7;
if (this._frameBuffer[keyCodeStr] > 1000000){
this._frameBuffer[keyCodeStr] = 1000000;
};
if ((((currentState == STATE_PUSHED)) || ((currentState == STATE_DOUBLEPUSHED)))){
this._currentStateBuffer[keyCodeStr] = STATE_DOWN;
} else {
if (currentState == STATE_RELEASED){
this._currentStateBuffer[keyCodeStr] = STATE_UP;
};
};
if ((((((currentState == STATE_DOWN)) || ((currentState == STATE_PUSHED)))) || ((currentState == STATE_DOUBLEPUSHED)))){
if (((!((this._autoPushFrameBuffer[keyCodeStr] == -1))) && ((this._frameBuffer[keyCodeStr] >= this._autoPushFrameBuffer[keyCodeStr])))){
this._frameBuffer[keyCodeStr] = (this._frameBuffer[keyCodeStr] - this._autoPushFrameBuffer[keyCodeStr]);
this._autoPushFrameBuffer[keyCodeStr] = FRAME_AUTOPUSH;
this._currentStateBuffer[keyCodeStr] = STATE_PUSHED;
};
};
};
};
this._keyActionBuffer[keyCodeStr] = KEYACTION_NONE;
};
}
public static function getInstance():KeyChecker{
if (!instance){
instance = new KeyChecker(SINGLETON_KEY);
};
return (instance);
}
}
}//package net.chibitami.gameUtil
Section 42
//Random (net.chibitami.gameUtil.Random)
package net.chibitami.gameUtil {
public class Random {
private const MATRIX_A:uint = 2567483615;
private const UPPER_MASK:uint = 2147483648;
private const LOWER_MASK:uint = 2147483647;
private const M:int = 397;
private const N:int = 624;
private var q:int;
private var r:int;
private var p:int;
private var x:Array;
public function Random(_seed:uint=0){
super();
x = new Array();
if (_seed == 0){
seed = new Date().getTime();
} else {
seed = _seed;
};
}
public function nextNumber():Number{
return ((next(32) / 4294967296));
}
public function set seed(_seed:uint):void{
var i:int;
x[0] = _seed;
i = 1;
while (i < N) {
x[i] = (imul(1812433253, (x[(i - 1)] ^ (x[(i - 1)] >>> 30))) + i);
x[i] = (x[i] & 4294967295);
i++;
};
p = 0;
q = 1;
r = M;
}
private function next(bits:int):uint{
var y:uint;
y = ((x[p] & UPPER_MASK) | (x[q] & LOWER_MASK));
x[p] = ((x[r] ^ (y >>> 1)) ^ ((y & 1) * MATRIX_A));
y = x[p];
if (++p == N){
p = 0;
};
if (++q == N){
q = 0;
};
if (++r == N){
r = 0;
};
y = (y ^ (y >>> 11));
y = (y ^ ((y << 7) & 2636928640));
y = (y ^ ((y << 15) & 4022730752));
y = (y ^ (y >>> 18));
return ((y >>> (32 - bits)));
}
private function imul(a:Number, b:Number):Number{
var al:Number;
var ah:Number;
var bl:Number;
var bh:Number;
var ml:Number;
var mh:Number;
al = (a & 0xFFFF);
ah = (a >>> 16);
bl = (b & 0xFFFF);
bh = (b >>> 16);
ml = (al * bl);
mh = (((((ml >>> 16) + (al * bh)) & 0xFFFF) + (ah * bl)) & 0xFFFF);
return (((mh << 16) | (ml & 0xFFFF)));
}
public function nextInt(_min:int, _max:int):int{
return ((_min + Math.floor((this.nextNumber() * ((_max - _min) + 1)))));
}
}
}//package net.chibitami.gameUtil
Section 43
//BGMObject (sound.BGMObject)
package sound {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class BGMObject {
private var _loaderInfo:LoaderInfo;
private var _sound:Sound;
private var _bytesLoaded:int;
private var _loaderContext:LoaderContext;
private var _completeFlag:Boolean;
private var _loader:Loader;
private var _url:URLRequest;
private var _bytesTotal:int;
private var _soundName:String;
private static const BASEURL = "bgm/";
public function BGMObject(soundName:String){
super();
this._soundName = soundName;
this._url = new URLRequest(((BASEURL + soundName) + ".swf"));
this._loader = new Loader();
this._loaderInfo = this._loader.contentLoaderInfo;
this._loaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoaderInfoProgress);
this._loaderInfo.addEventListener(Event.COMPLETE, onLoaderInfoComplete);
this._loaderContext = new LoaderContext();
this._loaderContext.applicationDomain = ApplicationDomain.currentDomain;
this._sound = null;
this._bytesLoaded = 0;
this._bytesTotal = 100;
this._completeFlag = false;
}
public function getLoadedPercent():int{
var ratio:Number;
if (this._completeFlag){
return (100);
};
ratio = ((this._bytesLoaded * 100) / this._bytesTotal);
return (Math.min(Math.floor(ratio), 99));
}
public function load():void{
if (this._sound == null){
this._loader.load(this._url);
};
}
private function onLoaderInfoProgress(event:ProgressEvent):void{
this._bytesLoaded = event.bytesLoaded;
this._bytesTotal = event.bytesTotal;
}
public function play(loopFlag:Boolean=true, transform:SoundTransform=null):SoundChannel{
var loopCount:int;
loopCount = (loopFlag) ? 0xFFFF : 0;
return (this._sound.play(0, loopCount, transform));
}
private function onLoaderInfoComplete(event:Event):void{
var className:Class;
this._completeFlag = true;
className = (this._loader.contentLoaderInfo.applicationDomain.getDefinition(("bgm_" + this._soundName)) as Class);
this._sound = (new (className) as Sound);
}
}
}//package sound
Section 44
//BGMPlayer (sound.BGMPlayer)
package sound {
import flash.media.*;
public class BGMPlayer {
private static const BGMNAMEARRAY:Array = new Array("", "chara01", "chara02", "chara03", "chara04", "chara05", "chara06", "", "", "", "", "select", "", "", "", "");
private static const MAXNUM:int = 16;
private static var currentChannel:SoundChannel = null;
private static var i:int = 1;
private static var soundArray:Array = new Array(MAXNUM);
public function BGMPlayer(){
super();
}
public static function play(index:int):Boolean{
var bgmObject:BGMObject;
var volume:Number;
var transform:SoundTransform;
if (currentChannel != null){
currentChannel.stop();
};
bgmObject = (soundArray[index] as BGMObject);
if ((((bgmObject == null)) || ((bgmObject.getLoadedPercent() < 100)))){
return (false);
};
volume = Config.getInstance().volumeBGM;
transform = new SoundTransform(volume, 0);
currentChannel = bgmObject.play(true, transform);
return (true);
}
public static function load(index:int):void{
if (index == 0){
return;
};
(soundArray[index] as BGMObject).load();
}
public static function getLoadedPercent(index:int):Number{
if (index == 0){
return (0);
};
return ((soundArray[index] as BGMObject).getLoadedPercent());
}
soundArray[0] = null;
while (i < MAXNUM) {
soundArray[i] = new BGMObject(BGMNAMEARRAY[i]);
i++;
};
}
}//package sound
Section 45
//BoardSEPlayer (sound.BoardSEPlayer)
package sound {
import flash.media.*;
public class BoardSEPlayer {
private var _soundTransform:SoundTransform;
public static const PAN_RIGHT:int = 3;
public static const CUTINCAST:int = 27;
public static const PAN_LEFT:int = 2;
public static const CREATECIRCLE:int = 26;
public static const ERASECIRCLE:int = 25;
public static const PAN_CENTER = 1;
public static const FIXBLOCK:int = 24;
public static const DANGER:int = 28;
public static const ROTATEFAILED:int = 23;
public static const DEAD:int = 30;
public static const ROTATEBLOCK:int = 22;
public static const DANGERCOUNT:int = 29;
public static const REFILLBLOCK:int = 21;
public function BoardSEPlayer(pan:int){
var volume:Number;
super();
volume = Config.getInstance().volumeSE;
if (pan == PAN_LEFT){
this._soundTransform = new SoundTransform((1 * volume), -0.8);
} else {
if (pan == PAN_RIGHT){
this._soundTransform = new SoundTransform((0.7 * volume), 0.8);
} else {
this._soundTransform = new SoundTransform((1 * volume), 0);
};
};
}
public function play(index:int):void{
SoundPool.play(index, this._soundTransform);
}
}
}//package sound
Section 46
//SoundPool (sound.SoundPool)
package sound {
import flash.media.*;
import flash.utils.*;
public class SoundPool {
private static const SOUNDNAME_BOARD:Array = new Array("refillblock", "rotateblock", "rotatefailed", "fixblock", "erasecircle", "createcircle", "cutincast", "danger", "dangercount", "dead");
private static const SOUNDNAME_VOICE:Array = new Array("ready", "start", "damaged", "win", "lose", "gameover", "cast1", "cast2", "cast3", "cast4", "cast5", "cast6");
private static var className:String;
private static var tmpClass:Class;
private static var i = 0;
private static var j:int;
private static var soundArray:Array = new Array(0x0100);
public function SoundPool(){
super();
}
static function play(index:int, transform:SoundTransform):void{
if (soundArray[index] != null){
(soundArray[index] as Sound).play(0, 0, transform);
};
}
while (i < 0x0100) {
soundArray[i] = null;
i++;
};
soundArray[1] = new system_select_wav();
soundArray[2] = new system_enter_wav();
soundArray[3] = new system_cancel_wav();
i = 0;
while (i < SOUNDNAME_BOARD.length) {
className = (("board_" + (SOUNDNAME_BOARD[i] as String)) + "_wav");
tmpClass = Class(getDefinitionByName(className));
soundArray[(21 + i)] = (new tmpClass() as Sound);
i++;
};
i = 1;
while (i <= Setting.CHARANUM) {
j = 0;
while (j < SOUNDNAME_VOICE.length) {
className = (((("voice_" + (SOUNDNAME_VOICE[i] as String)) + "_chara") + i) + "_wav");
tmpClass = Class(getDefinitionByName(className));
soundArray[((41 + (20 * (i - 1))) + j)] = (new tmpClass() as Sound);
j++;
};
i++;
};
}
}//package sound
Section 47
//SystemSEPlayer (sound.SystemSEPlayer)
package sound {
import flash.media.*;
public class SystemSEPlayer {
private var _soundTransform:SoundTransform;
public static const CANCEL:int = 3;
public static const SELECT:int = 1;
public static const ENTER:int = 2;
public function SystemSEPlayer(){
var volume:Number;
super();
volume = Config.getInstance().volumeSE;
this._soundTransform = new SoundTransform((1 * volume), 0);
}
public function play(index:int):void{
SoundPool.play(index, this._soundTransform);
}
}
}//package sound
Section 48
//VoicePlayer (sound.VoicePlayer)
package sound {
import flash.media.*;
public class VoicePlayer {
private var _charaNum:int;
private var _soundTransform:SoundTransform;
public static const START:int = 1;
public static const READY:int = 0;
public static const PAN_LEFT:int = 2;
public static const GAMEOVER:int = 5;
public static const CAST1:int = 6;
public static const CAST2:int = 7;
public static const CAST3:int = 8;
public static const LOSE:int = 4;
public static const CAST5:int = 10;
public static const CAST6:int = 11;
public static const CAST4:int = 9;
public static const PAN_CENTER:int = 1;
public static const DAMAGED:int = 2;
public static const PAN_RIGHT:int = 3;
public static const WIN:int = 3;
public function VoicePlayer(charaNum:int, pan:int){
var volume:Number;
super();
this._charaNum = charaNum;
volume = Config.getInstance().volumeSE;
if (pan == PAN_LEFT){
this._soundTransform = new SoundTransform((1 * volume), -0.8);
} else {
if (pan == PAN_RIGHT){
this._soundTransform = new SoundTransform((0.7 * volume), 0.8);
} else {
this._soundTransform = new SoundTransform((1 * volume), 0);
};
};
}
public function play(index:int):void{
SoundPool.play(((41 + (20 * (this._charaNum - 1))) + index), this._soundTransform);
}
}
}//package sound
Section 49
//EASY_22 (tttt_fla.EASY_22)
package tttt_fla {
import flash.display.*;
import flash.text.*;
public dynamic class EASY_22 extends MovieClip {
public var highScoreTextArea:TextField;
public function EASY_22(){
super();
}
}
}//package tttt_fla
Section 50
//HARD_24 (tttt_fla.HARD_24)
package tttt_fla {
import flash.display.*;
import flash.text.*;
public dynamic class HARD_24 extends MovieClip {
public var highScoreTextArea:TextField;
public function HARD_24(){
super();
}
}
}//package tttt_fla
Section 51
//HELL_25 (tttt_fla.HELL_25)
package tttt_fla {
import flash.display.*;
import flash.text.*;
public dynamic class HELL_25 extends MovieClip {
public var highScoreTextArea:TextField;
public function HELL_25(){
super();
}
}
}//package tttt_fla
Section 52
//NORMAL_23 (tttt_fla.NORMAL_23)
package tttt_fla {
import flash.display.*;
import flash.text.*;
public dynamic class NORMAL_23 extends MovieClip {
public var highScoreTextArea:TextField;
public function NORMAL_23(){
super();
}
}
}//package tttt_fla
Section 53
//Timeline_12 (tttt_fla.Timeline_12)
package tttt_fla {
import flash.display.*;
public dynamic class Timeline_12 extends MovieClip {
public var rotateSpellCircle_mc:MovieClip;
public function Timeline_12(){
super();
}
}
}//package tttt_fla
Section 54
//Timeline_13 (tttt_fla.Timeline_13)
package tttt_fla {
import flash.display.*;
public dynamic class Timeline_13 extends MovieClip {
public var pict_mc:MovieClip;
public function Timeline_13(){
super();
}
}
}//package tttt_fla
Section 55
//Timeline_17 (tttt_fla.Timeline_17)
package tttt_fla {
import flash.display.*;
public dynamic class Timeline_17 extends MovieClip {
public var pict_mc:MovieClip;
public function Timeline_17(){
super();
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package tttt_fla
Section 56
//Timeline_19 (tttt_fla.Timeline_19)
package tttt_fla {
import flash.display.*;
public dynamic class Timeline_19 extends MovieClip {
public var pict_mc:MovieClip;
public function Timeline_19(){
super();
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package tttt_fla
Section 57
//Timeline_20 (tttt_fla.Timeline_20)
package tttt_fla {
import flash.display.*;
public dynamic class Timeline_20 extends MovieClip {
public var level4_mc:MovieClip;
public var level2_mc:MovieClip;
public var level5_mc:MovieClip;
public var level3_mc:MovieClip;
public var level1_mc:MovieClip;
public function Timeline_20(){
super();
}
}
}//package tttt_fla
Section 58
//Timeline_29 (tttt_fla.Timeline_29)
package tttt_fla {
import flash.display.*;
public dynamic class Timeline_29 extends MovieClip {
public var config2_mc:MovieClip;
public var config5_mc:MovieClip;
public var config3_mc:MovieClip;
public var config6_mc:MovieClip;
public var config1_mc:MovieClip;
public var config4_mc:MovieClip;
public var config7_mc:MovieClip;
public function Timeline_29(){
super();
}
}
}//package tttt_fla
Section 59
//Timeline_45 (tttt_fla.Timeline_45)
package tttt_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Timeline_45 extends MovieClip {
public var logStrTextArea:TextField;
public function Timeline_45(){
super();
}
}
}//package tttt_fla
Section 60
//Timeline_51 (tttt_fla.Timeline_51)
package tttt_fla {
import flash.display.*;
public dynamic class Timeline_51 extends MovieClip {
public function Timeline_51(){
super();
addFrameScript(60, frame61);
}
function frame61(){
this.stop();
}
}
}//package tttt_fla
Section 61
//Timeline_52 (tttt_fla.Timeline_52)
package tttt_fla {
import flash.display.*;
public dynamic class Timeline_52 extends MovieClip {
public function Timeline_52(){
super();
addFrameScript(29, frame30);
}
function frame30(){
this.stop();
}
}
}//package tttt_fla
Section 62
//Timeline_53 (tttt_fla.Timeline_53)
package tttt_fla {
import flash.display.*;
public dynamic class Timeline_53 extends MovieClip {
public function Timeline_53(){
super();
addFrameScript(35, frame36);
}
function frame36(){
this.stop();
}
}
}//package tttt_fla
Section 63
//Timeline_54 (tttt_fla.Timeline_54)
package tttt_fla {
import flash.display.*;
public dynamic class Timeline_54 extends MovieClip {
public var spellCircle_mc:MovieClip;
public var chara_mc:MovieClip;
public function Timeline_54(){
super();
addFrameScript(19, frame20);
}
function frame20(){
this.stop();
}
}
}//package tttt_fla
Section 64
//Timeline_56 (tttt_fla.Timeline_56)
package tttt_fla {
import flash.display.*;
public dynamic class Timeline_56 extends MovieClip {
public var spellCircle_mc:MovieClip;
public var chara_mc:MovieClip;
public function Timeline_56(){
super();
addFrameScript(9, frame10);
}
function frame10(){
this.stop();
this.visible = false;
}
}
}//package tttt_fla
Section 65
//Timeline_57 (tttt_fla.Timeline_57)
package tttt_fla {
import flash.display.*;
public dynamic class Timeline_57 extends MovieClip {
public function Timeline_57(){
super();
addFrameScript(7, frame8);
}
function frame8(){
this.stop();
}
}
}//package tttt_fla
Section 66
//Timeline_58 (tttt_fla.Timeline_58)
package tttt_fla {
import flash.display.*;
public dynamic class Timeline_58 extends MovieClip {
public function Timeline_58(){
super();
addFrameScript(49, frame50);
}
function frame50(){
this.stop();
}
}
}//package tttt_fla
Section 67
//Timeline_59 (tttt_fla.Timeline_59)
package tttt_fla {
import game.*;
import flash.display.*;
public dynamic class Timeline_59 extends MovieClip {
public var spellCircle_mc:MovieClip;
public var chara_mc:BackgroundField;
public function Timeline_59(){
super();
addFrameScript(28, frame29);
}
function frame29(){
this.stop();
}
}
}//package tttt_fla
Section 68
//Timeline_61 (tttt_fla.Timeline_61)
package tttt_fla {
import flash.display.*;
public dynamic class Timeline_61 extends MovieClip {
public function Timeline_61(){
super();
addFrameScript(50, frame51);
}
function frame51(){
this.gotoAndPlay(1);
}
}
}//package tttt_fla
Section 69
//Timeline_63 (tttt_fla.Timeline_63)
package tttt_fla {
import flash.display.*;
public dynamic class Timeline_63 extends MovieClip {
public function Timeline_63(){
super();
addFrameScript(49, frame50);
}
function frame50(){
this.gotoAndPlay(5);
}
}
}//package tttt_fla
Section 70
//Timeline_64 (tttt_fla.Timeline_64)
package tttt_fla {
import flash.display.*;
public dynamic class Timeline_64 extends MovieClip {
public var inner_mc:MovieClip;
public function Timeline_64(){
super();
addFrameScript(10, frame11);
}
function frame11(){
this.visible = false;
}
}
}//package tttt_fla
Section 71
//Timeline_70 (tttt_fla.Timeline_70)
package tttt_fla {
import flash.display.*;
public dynamic class Timeline_70 extends MovieClip {
public function Timeline_70(){
super();
addFrameScript(16, frame17);
}
function frame17(){
this.gotoAndPlay(1);
}
}
}//package tttt_fla
Section 72
//board_createcircle_wav (board_createcircle_wav)
package {
import flash.media.*;
public dynamic class board_createcircle_wav extends Sound {
public function board_createcircle_wav(){
super();
}
}
}//package
Section 73
//board_cutincast_wav (board_cutincast_wav)
package {
import flash.media.*;
public dynamic class board_cutincast_wav extends Sound {
public function board_cutincast_wav(){
super();
}
}
}//package
Section 74
//board_danger_wav (board_danger_wav)
package {
import flash.media.*;
public dynamic class board_danger_wav extends Sound {
public function board_danger_wav(){
super();
}
}
}//package
Section 75
//board_dangercount_wav (board_dangercount_wav)
package {
import flash.media.*;
public dynamic class board_dangercount_wav extends Sound {
public function board_dangercount_wav(){
super();
}
}
}//package
Section 76
//board_dead_wav (board_dead_wav)
package {
import flash.media.*;
public dynamic class board_dead_wav extends Sound {
public function board_dead_wav(){
super();
}
}
}//package
Section 77
//board_erasecircle_wav (board_erasecircle_wav)
package {
import flash.media.*;
public dynamic class board_erasecircle_wav extends Sound {
public function board_erasecircle_wav(){
super();
}
}
}//package
Section 78
//board_fixblock_wav (board_fixblock_wav)
package {
import flash.media.*;
public dynamic class board_fixblock_wav extends Sound {
public function board_fixblock_wav(){
super();
}
}
}//package
Section 79
//board_refillblock_wav (board_refillblock_wav)
package {
import flash.media.*;
public dynamic class board_refillblock_wav extends Sound {
public function board_refillblock_wav(){
super();
}
}
}//package
Section 80
//board_rotateblock_wav (board_rotateblock_wav)
package {
import flash.media.*;
public dynamic class board_rotateblock_wav extends Sound {
public function board_rotateblock_wav(){
super();
}
}
}//package
Section 81
//board_rotatefailed_wav (board_rotatefailed_wav)
package {
import flash.media.*;
public dynamic class board_rotatefailed_wav extends Sound {
public function board_rotatefailed_wav(){
super();
}
}
}//package
Section 82
//Config (Config)
package {
public class Config {
public var drawMode:int;
public var volumeSE:Number;
public var recordLog:Boolean;
public var volumeBGM:Number;
private var _keyCodeArray:Array;
public static const DRAWMODE_FULL:int = 1;
public static const DRAWMODE_SIMPLE:int = 2;
private static const SINGLETON_KEY:Object = new Object();
public static const KEY_ROTATE_LEFT:int = 2;
public static const KEY_REFILL:int = 3;
public static const KEY_ROTATE_RIGHT:int = 1;
private static var instance:Config;
public function Config(singletonKey:Object=null){
super();
if (singletonKey != SINGLETON_KEY){
throw (new Error("エラー:ConfigはSingletonです。getInstance()を使用してください。"));
};
this.load();
}
public function getKeyCode(KeyName:int):uint{
return ((this._keyCodeArray[KeyName] as uint));
}
private function initData():void{
this._keyCodeArray = new Array(4);
this._keyCodeArray[KEY_ROTATE_RIGHT] = Key.BUTTON1;
this._keyCodeArray[KEY_ROTATE_LEFT] = Key.BUTTON2;
this._keyCodeArray[KEY_REFILL] = Key.BUTTON3;
this.volumeBGM = 0.7;
this.volumeSE = 0.7;
this.drawMode = DRAWMODE_FULL;
this.recordLog = true;
}
public function setKeyCode(rotateRight:int, rotateLeft:int, refill:int):Boolean{
if (((((!((rotateLeft == rotateRight))) && (!((rotateLeft == refill))))) && (!((rotateRight == refill))))){
this._keyCodeArray[KEY_ROTATE_RIGHT] = rotateRight;
this._keyCodeArray[KEY_ROTATE_LEFT] = rotateLeft;
this._keyCodeArray[KEY_REFILL] = refill;
return (true);
};
return (false);
}
public function load():void{
var configData:Array;
configData = SaveData.getInstance().configData;
if (configData == null){
this.initData();
} else {
this._keyCodeArray = new Array(4);
this._keyCodeArray[KEY_ROTATE_RIGHT] = configData[0];
this._keyCodeArray[KEY_ROTATE_LEFT] = configData[1];
this._keyCodeArray[KEY_REFILL] = configData[2];
this.volumeBGM = configData[3];
this.volumeSE = configData[4];
this.drawMode = configData[5];
this.recordLog = configData[6];
};
}
public function save():void{
var configData:Array;
var saveData:SaveData;
configData = new Array(this._keyCodeArray[KEY_ROTATE_RIGHT], this._keyCodeArray[KEY_ROTATE_LEFT], this._keyCodeArray[KEY_REFILL], this.volumeBGM, this.volumeSE, this.drawMode, this.recordLog);
saveData = SaveData.getInstance();
saveData.configData = configData;
saveData.save();
}
public static function getInstance():Config{
if (!instance){
instance = new Config(SINGLETON_KEY);
};
return (instance);
}
}
}//package
Section 83
//DocumentClass (DocumentClass)
package {
import flash.events.*;
import net.chibitami.gameUtil.*;
import flash.display.*;
import flash.system.*;
import flash.ui.*;
public class DocumentClass extends MovieClip {
private var _keyChecker:KeyChecker;
private var _mainClass:MainClass;
private var _frameActionChecker:FrameActionChecker;
private static var _instance:DocumentClass = null;
public function DocumentClass(){
super();
addFrameScript(0, frame1);
_instance = this;
}
public function init():void{
var context:ContextMenu;
var fpsBalancer:FPSBalancer;
context = new ContextMenu();
context.hideBuiltInItems();
MovieClip(this.root).contextMenu = context;
this.disableIME();
this._keyChecker = KeyChecker.getInstance();
this._keyChecker.init(this.stage);
this._keyChecker.addKey(Key.UP, true);
this._keyChecker.addKey(Key.DOWN, true);
this._keyChecker.addKey(Key.LEFT, true);
this._keyChecker.addKey(Key.RIGHT, true);
this._keyChecker.addKey(Key.BUTTON1);
this._keyChecker.addKey(Key.BUTTON2);
this._keyChecker.addKey(Key.BUTTON3);
this._keyChecker.addKey(Key.PAUSE);
fpsBalancer = FPSBalancer.getInstance();
fpsBalancer.init(this.stage);
this._frameActionChecker = new FrameActionChecker(this.stage.frameRate);
this._mainClass = MainClass.getInstance();
this._mainClass.x = 0;
this._mainClass.y = 600;
this.addChild(this._mainClass);
this.addEventListener(Event.ENTER_FRAME, enterFrame);
}
function frame1(){
init();
}
private function enterFrame(event:Event):void{
var count:int;
var i:*;
count = this._frameActionChecker.getFrameActionCount();
i = 0;
while (i < count) {
this._keyChecker.update();
this._mainClass.enterFrame();
i++;
};
}
private function disableIME():void{
if (Capabilities.hasIME){
IME.enabled = false;
};
//unresolved jump
var _slot1 = error;
trace("IME無効化に失敗");
}
public static function getInstance():DocumentClass{
return (_instance);
}
}
}//package
Section 84
//Key (Key)
package {
public class Key {
public static const BUTTON2:uint = 88;
public static const BUTTON3:uint = 90;
public static const DOWN:uint = 40;
public static const LEFT:uint = 37;
public static const UP:uint = 38;
public static const RIGHT:uint = 39;
public static const PAUSE:uint = 81;
public static const BUTTON1:uint = 67;
public function Key(){
super();
}
}
}//package
Section 85
//MagicLevelBlue (MagicLevelBlue)
package {
import net.chibitami.customMC.*;
public dynamic class MagicLevelBlue extends NumberMC {
public function MagicLevelBlue(){
super();
}
}
}//package
Section 86
//magicLevelRed (magicLevelRed)
package {
import net.chibitami.customMC.*;
public dynamic class magicLevelRed extends NumberMC {
public function magicLevelRed(){
super();
}
}
}//package
Section 87
//MainClass (MainClass)
package {
import game.*;
import game.logger.*;
import flash.display.*;
import game.single.*;
import menu.*;
public class MainClass extends MovieClip {
private var _mode:int;
private var _current_mc:MovieClip;
private static const MODE_CONFIG:int = 21;
private static const MODE_REPLAYMENU:int = 13;
private static const MODE_REPLAYSINGLE:int = 14;
private static const MODE_REPLAYBUTTLE:int = 15;
private static const MODE_MANUAL:int = 22;
private static const SINGLETON_KEY:Object = new Object();
private static const MODE_CHARASELECTSINGLE:int = 11;
private static const MODE_TITLE:int = 1;
private static const MODE_GAMESINGLE:int = 12;
private static var instance:MainClass;
public function MainClass(_singletonKey:Object=null){
super();
if (_singletonKey != SINGLETON_KEY){
throw (new Error("エラー:MainClassはSingletonです。getInstance()を使用してください。"));
};
this.startTitle();
}
public function startGameSingle(playInfo:PlayInfo):void{
var new_mc:GameSingle;
this._mode = MODE_GAMESINGLE;
new_mc = new GameSingle();
this.setMainMC(new_mc);
new_mc.init(playInfo);
}
public function startTitle():void{
var new_mc:TitleMC;
this._mode = MODE_TITLE;
new_mc = new TitleMC();
this.setMainMC(new_mc);
new_mc.init();
}
private function setMainMC(new_mc:MovieClip):void{
if (this._current_mc != null){
this.removeChild(this._current_mc);
};
this._current_mc = new_mc;
this.addChild(this._current_mc);
}
public function startConfig():void{
var new_mc:ConfigMC;
this._mode = MODE_CONFIG;
new_mc = new ConfigMC();
this.setMainMC(new_mc);
new_mc.init();
}
public function enterFrame():void{
if (this._current_mc != null){
this._current_mc.enterFrame();
};
}
public function startReplaySingle(logger:LoggerSingle, demoMode:Boolean=false):void{
var new_mc:ReplayViewerSingle;
this._mode = MODE_REPLAYSINGLE;
new_mc = new ReplayViewerSingle();
this.setMainMC(new_mc);
new_mc.init(logger, demoMode);
}
public function startCharaSelectSingle(startCharaNum:int=1, startLevel:int=3):void{
var new_mc:CharaSelectSingle;
this._mode = MODE_CHARASELECTSINGLE;
new_mc = new CharaSelectSingle();
this.setMainMC(new_mc);
new_mc.init(startCharaNum, startLevel);
}
public function startManual():void{
var new_mc:ManualMC;
this._mode = MODE_MANUAL;
new_mc = new ManualMC();
this.setMainMC(new_mc);
new_mc.init();
}
public function startReplayMenu():void{
var new_mc:ReplayMenuMC;
this._mode = MODE_REPLAYMENU;
new_mc = new ReplayMenuMC();
this.setMainMC(new_mc);
new_mc.init();
}
public static function getInstance():MainClass{
if (!instance){
instance = new MainClass(SINGLETON_KEY);
};
return (instance);
}
}
}//package
Section 88
//SaveData (SaveData)
package {
import flash.net.*;
public class SaveData {
public var highScoreArray:Array;
public var configData:Array;
private var _shared_so:SharedObject;
private static const SINGLETON_KEY:Object = new Object();
private static const SHAREDOBJECT_NAME:String = "net.chibitami.tttt";
private static var instance:SaveData;
public function SaveData(_singletonKey:Object=null){
super();
if (_singletonKey != SINGLETON_KEY){
throw (new Error("エラー:SaveDataはSingletonです。getInstance()を使用してください。"));
};
this._shared_so = SharedObject.getLocal(SHAREDOBJECT_NAME, "/");
if ((((this._shared_so.data.version == undefined)) || ((this._shared_so.data.version < Setting.VERSION)))){
this.clearData();
};
this.load();
}
public function load():void{
this.highScoreArray = this._shared_so.data.highScoreArray;
this.configData = this._shared_so.data.configData;
}
public function clearData():void{
var i:int;
var j:int;
this._shared_so.clear();
this._shared_so.data.version = Setting.VERSION;
this._shared_so.data.highScoreArray = new Array(Setting.CHARNUM_MAX);
i = 0;
while (i <= Setting.CHARNUM_MAX) {
this._shared_so.data.highScoreArray[i] = new Array(4);
j = 0;
while (j < 4) {
this._shared_so.data.highScoreArray[i][j] = 0;
j++;
};
i++;
};
this._shared_so.data.configData = null;
}
public function save():void{
this._shared_so.data.highScoreArray = this.highScoreArray;
this._shared_so.data.configData = this.configData;
}
public static function getInstance():SaveData{
if (!instance){
instance = new SaveData(SINGLETON_KEY);
};
return (instance);
}
}
}//package
Section 89
//Setting (Setting)
package {
public class Setting {
public static const CHARNUM_MAX:int = 16;
public static const VERSION:int = 2;
public static const CHARANUM:int = 3;
public function Setting(){
super();
}
}
}//package
Section 90
//system_cancel_wav (system_cancel_wav)
package {
import flash.media.*;
public dynamic class system_cancel_wav extends Sound {
public function system_cancel_wav(){
super();
}
}
}//package
Section 91
//system_enter_wav (system_enter_wav)
package {
import flash.media.*;
public dynamic class system_enter_wav extends Sound {
public function system_enter_wav(){
super();
}
}
}//package
Section 92
//system_select_wav (system_select_wav)
package {
import flash.media.*;
public dynamic class system_select_wav extends Sound {
public function system_select_wav(){
super();
}
}
}//package
Section 93
//voice_cast1_chara1_wav (voice_cast1_chara1_wav)
package {
import flash.media.*;
public dynamic class voice_cast1_chara1_wav extends Sound {
public function voice_cast1_chara1_wav(){
super();
}
}
}//package
Section 94
//voice_cast1_chara2_wav (voice_cast1_chara2_wav)
package {
import flash.media.*;
public dynamic class voice_cast1_chara2_wav extends Sound {
public function voice_cast1_chara2_wav(){
super();
}
}
}//package
Section 95
//voice_cast1_chara3_wav (voice_cast1_chara3_wav)
package {
import flash.media.*;
public dynamic class voice_cast1_chara3_wav extends Sound {
public function voice_cast1_chara3_wav(){
super();
}
}
}//package
Section 96
//voice_cast2_chara1_wav (voice_cast2_chara1_wav)
package {
import flash.media.*;
public dynamic class voice_cast2_chara1_wav extends Sound {
public function voice_cast2_chara1_wav(){
super();
}
}
}//package
Section 97
//voice_cast2_chara2_wav (voice_cast2_chara2_wav)
package {
import flash.media.*;
public dynamic class voice_cast2_chara2_wav extends Sound {
public function voice_cast2_chara2_wav(){
super();
}
}
}//package
Section 98
//voice_cast2_chara3_wav (voice_cast2_chara3_wav)
package {
import flash.media.*;
public dynamic class voice_cast2_chara3_wav extends Sound {
public function voice_cast2_chara3_wav(){
super();
}
}
}//package
Section 99
//voice_cast3_chara1_wav (voice_cast3_chara1_wav)
package {
import flash.media.*;
public dynamic class voice_cast3_chara1_wav extends Sound {
public function voice_cast3_chara1_wav(){
super();
}
}
}//package
Section 100
//voice_cast3_chara2_wav (voice_cast3_chara2_wav)
package {
import flash.media.*;
public dynamic class voice_cast3_chara2_wav extends Sound {
public function voice_cast3_chara2_wav(){
super();
}
}
}//package
Section 101
//voice_cast3_chara3_wav (voice_cast3_chara3_wav)
package {
import flash.media.*;
public dynamic class voice_cast3_chara3_wav extends Sound {
public function voice_cast3_chara3_wav(){
super();
}
}
}//package
Section 102
//voice_cast4_chara1_wav (voice_cast4_chara1_wav)
package {
import flash.media.*;
public dynamic class voice_cast4_chara1_wav extends Sound {
public function voice_cast4_chara1_wav(){
super();
}
}
}//package
Section 103
//voice_cast4_chara2_wav (voice_cast4_chara2_wav)
package {
import flash.media.*;
public dynamic class voice_cast4_chara2_wav extends Sound {
public function voice_cast4_chara2_wav(){
super();
}
}
}//package
Section 104
//voice_cast4_chara3_wav (voice_cast4_chara3_wav)
package {
import flash.media.*;
public dynamic class voice_cast4_chara3_wav extends Sound {
public function voice_cast4_chara3_wav(){
super();
}
}
}//package
Section 105
//voice_cast5_chara1_wav (voice_cast5_chara1_wav)
package {
import flash.media.*;
public dynamic class voice_cast5_chara1_wav extends Sound {
public function voice_cast5_chara1_wav(){
super();
}
}
}//package
Section 106
//voice_cast5_chara2_wav (voice_cast5_chara2_wav)
package {
import flash.media.*;
public dynamic class voice_cast5_chara2_wav extends Sound {
public function voice_cast5_chara2_wav(){
super();
}
}
}//package
Section 107
//voice_cast5_chara3_wav (voice_cast5_chara3_wav)
package {
import flash.media.*;
public dynamic class voice_cast5_chara3_wav extends Sound {
public function voice_cast5_chara3_wav(){
super();
}
}
}//package
Section 108
//voice_cast6_chara1_wav (voice_cast6_chara1_wav)
package {
import flash.media.*;
public dynamic class voice_cast6_chara1_wav extends Sound {
public function voice_cast6_chara1_wav(){
super();
}
}
}//package
Section 109
//voice_cast6_chara2_wav (voice_cast6_chara2_wav)
package {
import flash.media.*;
public dynamic class voice_cast6_chara2_wav extends Sound {
public function voice_cast6_chara2_wav(){
super();
}
}
}//package
Section 110
//voice_cast6_chara3_wav (voice_cast6_chara3_wav)
package {
import flash.media.*;
public dynamic class voice_cast6_chara3_wav extends Sound {
public function voice_cast6_chara3_wav(){
super();
}
}
}//package
Section 111
//voice_damaged_chara1_wav (voice_damaged_chara1_wav)
package {
import flash.media.*;
public dynamic class voice_damaged_chara1_wav extends Sound {
public function voice_damaged_chara1_wav(){
super();
}
}
}//package
Section 112
//voice_damaged_chara2_wav (voice_damaged_chara2_wav)
package {
import flash.media.*;
public dynamic class voice_damaged_chara2_wav extends Sound {
public function voice_damaged_chara2_wav(){
super();
}
}
}//package
Section 113
//voice_damaged_chara3_wav (voice_damaged_chara3_wav)
package {
import flash.media.*;
public dynamic class voice_damaged_chara3_wav extends Sound {
public function voice_damaged_chara3_wav(){
super();
}
}
}//package
Section 114
//voice_gameover_chara1_wav (voice_gameover_chara1_wav)
package {
import flash.media.*;
public dynamic class voice_gameover_chara1_wav extends Sound {
public function voice_gameover_chara1_wav(){
super();
}
}
}//package
Section 115
//voice_gameover_chara2_wav (voice_gameover_chara2_wav)
package {
import flash.media.*;
public dynamic class voice_gameover_chara2_wav extends Sound {
public function voice_gameover_chara2_wav(){
super();
}
}
}//package
Section 116
//voice_gameover_chara3_wav (voice_gameover_chara3_wav)
package {
import flash.media.*;
public dynamic class voice_gameover_chara3_wav extends Sound {
public function voice_gameover_chara3_wav(){
super();
}
}
}//package
Section 117
//voice_lose_chara1_wav (voice_lose_chara1_wav)
package {
import flash.media.*;
public dynamic class voice_lose_chara1_wav extends Sound {
public function voice_lose_chara1_wav(){
super();
}
}
}//package
Section 118
//voice_lose_chara2_wav (voice_lose_chara2_wav)
package {
import flash.media.*;
public dynamic class voice_lose_chara2_wav extends Sound {
public function voice_lose_chara2_wav(){
super();
}
}
}//package
Section 119
//voice_lose_chara3_wav (voice_lose_chara3_wav)
package {
import flash.media.*;
public dynamic class voice_lose_chara3_wav extends Sound {
public function voice_lose_chara3_wav(){
super();
}
}
}//package
Section 120
//voice_ready_chara1_wav (voice_ready_chara1_wav)
package {
import flash.media.*;
public dynamic class voice_ready_chara1_wav extends Sound {
public function voice_ready_chara1_wav(){
super();
}
}
}//package
Section 121
//voice_ready_chara2_wav (voice_ready_chara2_wav)
package {
import flash.media.*;
public dynamic class voice_ready_chara2_wav extends Sound {
public function voice_ready_chara2_wav(){
super();
}
}
}//package
Section 122
//voice_ready_chara3_wav (voice_ready_chara3_wav)
package {
import flash.media.*;
public dynamic class voice_ready_chara3_wav extends Sound {
public function voice_ready_chara3_wav(){
super();
}
}
}//package
Section 123
//voice_start_chara1_wav (voice_start_chara1_wav)
package {
import flash.media.*;
public dynamic class voice_start_chara1_wav extends Sound {
public function voice_start_chara1_wav(){
super();
}
}
}//package
Section 124
//voice_start_chara2_wav (voice_start_chara2_wav)
package {
import flash.media.*;
public dynamic class voice_start_chara2_wav extends Sound {
public function voice_start_chara2_wav(){
super();
}
}
}//package
Section 125
//voice_start_chara3_wav (voice_start_chara3_wav)
package {
import flash.media.*;
public dynamic class voice_start_chara3_wav extends Sound {
public function voice_start_chara3_wav(){
super();
}
}
}//package
Section 126
//voice_win_chara1_wav (voice_win_chara1_wav)
package {
import flash.media.*;
public dynamic class voice_win_chara1_wav extends Sound {
public function voice_win_chara1_wav(){
super();
}
}
}//package
Section 127
//voice_win_chara2_wav (voice_win_chara2_wav)
package {
import flash.media.*;
public dynamic class voice_win_chara2_wav extends Sound {
public function voice_win_chara2_wav(){
super();
}
}
}//package
Section 128
//voice_win_chara3_wav (voice_win_chara3_wav)
package {
import flash.media.*;
public dynamic class voice_win_chara3_wav extends Sound {
public function voice_win_chara3_wav(){
super();
}
}
}//package