Inheritance: MonoBehaviour
        public override BattleState Execute(Dragon dragon, Enemy enemy, BattleMenu menu)
        {
            BattleState next = this;


            //ジャンケンの勝者が決まっている (=あいこではない)
            Actor winner = getWinner(dragon, enemy);

            if (winner != null)
            {
                var nowAnimState = winner.Anim.GetCurrentAnimatorStateInfo(0);
                if (nowAnimState.fullPathHash != winner.hashAttack)
                {//攻撃アニメーションが終わったら
                    Debug.Log("Dragon HP = " + dragon.HP + " , Enemy HP = " + enemy.HP);

                    //どちらかが死んでたらリザルト(ここらへんは他のメンバーと要相談
                    if (dragon.HP <= 0 || enemy.HP <= 0)
                    {
                        return(new StateResult());
                    }

                    return(new StateDecideHand());
                }
            }
            else
            {
                //あいこだった。即座に次の手を決めよう
                return(new StateDecideHand());
            }
            return(next);
        }
        private void BuildMenu(List <MenuAction> specialMenuActions = null)
        {
            _menu = new BattleMenu(false, null, _input, _output, new MenuFactory(), specialMenuActions);
            _menu.Build(_fighter, _fighterTeam, _enemyTeam, null);

            _fullMenuPromptLength = _menu.MenuActions.Count + 3; //prompt, plus 'help' and 'status' options
        }
        public override BattleState Execute(Dragon dragon, Enemy enemy, BattleMenu menu)
        {
            BattleState next = this;
            bool        end  = menu.CtrlFirstMenu();

            if (end)
            {
                switch (menu.IconFirstPos)
                {
                case 0:
                    next = new StateDecideHand();
                    break;

                case 1:
                    next = new StateOpenInventory();
                    break;

                default:
                    Debug.LogError("error");
                    break;
                }
            }

            return(next);
        }
Example #4
0
    // Wechselt das aktuelle Menü zum übergebenen Menü
    public void changeMenu(BattleMenu battleMenu)
    {
        currentMenu      = battleMenu;
        currentSelection = 1;
        switch (battleMenu)
        {
        case BattleMenu.Selection:
            selectionMenu.gameObject.SetActive(true);
            attackMenu.gameObject.SetActive(false);
            itemsMenu.gameObject.SetActive(false);
            break;

        case BattleMenu.Items:
            itemsMenu.gameObject.SetActive(true);
            selectionMenu.gameObject.SetActive(false);
            attackMenu.gameObject.SetActive(false);
            break;

        case BattleMenu.Attacks:
            attackMenu.gameObject.SetActive(true);
            selectionMenu.SetActive(false);
            itemsMenu.SetActive(false);
            break;
        }
    }
Example #5
0
	// Use this for initialization
	void Start () {
        specialIndex = 0;
        itemIndex = 0;
        PrevMenu = BattleMenu.Main;
        MainMenu();
        UpdateMenu();
	}
Example #6
0
    public BattleVariableControl battle_variable_control;//戦闘をプレイするにあたって、重要な変数の管理

    /*
     * //保存事項------------
     * public int enchant1;
     * public int enchant2;
     *
     * //------------
     */

    public BattleRun1(Summary1 s1)
    {
        set1(s1);

        //    long time1 = m1.get_time();

        battle_flow1 = new BattleFlow1(s1);

        battle_bg   = new BattleBg(s1);
        battle_menu = new BattleMenu(s1);

        battle_member_group = new BattleMemberGroup(s1);
        battle_enemy_group  = new BattleEnemyGroup(s1);

        battle_member_group_attack_run = new BattleMemberGroupAttackRun(s1);
        battle_enemy_group_attack_run  = new BattleEnemyGroupAttackRun(s1);
        battle_enemy_skill_run         = new BattleEnemySkillRun(s1);

        battle_member_group_status_control = new BattleMemberGroupStatusControl(s1);
        battle_enchantment = new BattleEnchantment(s1);
        battle_skill       = new BattleSkill(s1);
        battle_mana        = new BattleMana(s1);



        battle_variable_control = new BattleVariableControl(s1);

        battle_message_window = new BattleMessageWindow(s1);

        //    m1.msbox((m1.get_time() - time1));
    }
Example #7
0
    public override void Activate(List <GameObject> targets)
    {
        List <int> inventory = GameDataTracker.playerData.Inventory;

        //These adds are only here for debugging.
        if (inventory.Count == 0)
        {
            inventory.Add(0);
            inventory.Add(1);
            inventory.Add(2);
            inventory.Add(0);
            inventory.Add(3);
            inventory.Add(1);
        }

        Sprite[]     itemSprite = new Sprite[inventory.Count];
        GameObject[] moveArray  = new GameObject[inventory.Count];
        for (int inv_idx = 0; inv_idx < inventory.Count; inv_idx++)
        {
            GameObject item = ItemMapping.itemMap[inventory[inv_idx]];
            itemSprite[inv_idx] = item.GetComponent <ItemTemplate>().itemImage;
            moveArray[inv_idx]  = item;
        }

        FighterClass stats = character.GetComponent <FighterClass>();
        BattleMenu   menu  = ScriptableObject.CreateInstance <BattleMenu>();

        menu.characterTarget = character;
        menu.characterHeight = stats.CharacterHeight;
        menu.characterWidth  = stats.CharacterWidth;
        menu.movesList       = moveArray;
        menu.spriteList      = itemSprite;

        GameDataTracker.combatExecutor.AddMenu(menu);
    }
Example #8
0
 private void Start()
 {
     currentMenu = builder.Menu;
     ForceUpdate();
     controller.Go();
     //StartCoroutine(controller.WaitFor(Constants.WaitMedium));
 }
Example #9
0
    public void ChangeMenu(BattleMenu m)
    {
        currentMenu = m;
        switch (m)
        {
        case BattleMenu.Selection:
            currentSelection = 1;
            selectionMenu.gameObject.SetActive(true);
            selectionInfo.gameObject.SetActive(true);
            techsMenu.gameObject.SetActive(false);
            techsDetails.gameObject.SetActive(false);
            infoMenu.gameObject.SetActive(false);
            break;

        case BattleMenu.Fight:
            selectionMenu.gameObject.SetActive(false);
            selectionInfo.gameObject.SetActive(false);
            techsMenu.gameObject.SetActive(true);
            techsDetails.gameObject.SetActive(true);
            infoMenu.gameObject.SetActive(false);
            break;

        case BattleMenu.Info:
            selectionMenu.gameObject.SetActive(false);
            selectionInfo.gameObject.SetActive(false);
            techsMenu.gameObject.SetActive(false);
            techsDetails.gameObject.SetActive(false);
            infoMenu.gameObject.SetActive(true);
            break;
        }
    }
Example #10
0
    public void ChangeMenu(BattleMenu m)
    {
        //switches the menu depending on the current choice in the UI. Actives objects accordingly.
        currentmenu      = m;
        currentSelection = 1;
        switch (m)
        {
        case BattleMenu.Selection:
            SelectionMenu.gameObject.SetActive(true);
            SelectionInfo.gameObject.SetActive(true);
            movesMenu.gameObject.SetActive(false);
            MovesDetails.gameObject.SetActive(false);
            InfoMenu.gameObject.SetActive(false);
            break;

        case BattleMenu.Fight:
            SelectionMenu.gameObject.SetActive(false);
            SelectionInfo.gameObject.SetActive(false);
            movesMenu.gameObject.SetActive(true);
            MovesDetails.gameObject.SetActive(true);
            InfoMenu.gameObject.SetActive(false);
            break;

        case BattleMenu.Info:
            SelectionMenu.gameObject.SetActive(false);
            SelectionInfo.gameObject.SetActive(false);
            movesMenu.gameObject.SetActive(false);
            MovesDetails.gameObject.SetActive(false);
            InfoMenu.gameObject.SetActive(true);
            break;
        }
    }
Example #11
0
    /********************************************************************************************/
    /************************************* Initialization ***************************************/
    /********************************************************************************************/

    // Use this for initialization
    void Start()
    {
        // Get the instance of Combat Tracker to switch turns and stuff
        combat     = combat.GetComponent <CombatTracker> ();
        TR         = GetComponent <Transform> ();
        battlemenu = battlemenu.GetComponent <BattleMenu>();
    }
Example #12
0
    public void ChangeMenu(BattleMenu m)
    {
        currentMenu      = m;
        currentSelection = 1;
        switch (m)
        {
        case BattleMenu.Selection:
            selectionMenu.SetActive(true);
            selectionInfo.SetActive(true);
            movesMenu.SetActive(false);
            movesDetails.SetActive(false);
            infoMenu.SetActive(false);
            break;

        case BattleMenu.Fight:
            selectionMenu.SetActive(false);
            selectionInfo.SetActive(false);
            movesMenu.SetActive(true);
            movesDetails.SetActive(true);
            infoMenu.SetActive(false);
            break;

        case BattleMenu.Info:
            selectionMenu.SetActive(false);
            selectionInfo.SetActive(false);
            movesMenu.SetActive(false);
            movesDetails.SetActive(false);
            infoMenu.SetActive(true);
            break;
        }
    }
Example #13
0
 public void CharacterTurn(IBattler character)
 {
     currentCharacter = character;
     specialIndex = 0;
     itemIndex = 0;
     PrevMenu = BattleMenu.Main;
     MainMenu();
     UpdateMenu();
 }
        public override BattleState Execute(Dragon dragon, Enemy enemy, BattleMenu menu)
        {
            BattleState next = this;

            Inventory.Instance.ChooseItem();



            return(next);
        }
    public MenuDialog SetupMenu()
    {
        GameObject uibattlePrefab = ResourcesPath.GetUIBattlePrefab("Menu");
        GameObject gameObject     = UnityEngine.Object.Instantiate <GameObject>(uibattlePrefab);
        Transform  transform      = gameObject.transform;
        BattleMenu component      = transform.GetComponent <BattleMenu>();

        this.helpDialogGO = component.helpDialogGO;
        this.battleMenu   = component;
        return(component.SetupMenu(base.transform));
    }
Example #16
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            DrawPlayerHealthBar(battle.Positions[0], spriteBatch);
            DrawOpponentHealthBar(battle.Positions[1], spriteBatch);
            DrawPlayerPokemon(battle.Positions[0], spriteBatch);
            DrawOpponentPokemon(battle.Positions[1], spriteBatch);

            if (BattleMenu.isVisible)
            {
                BattleMenu.Draw(spriteBatch);
            }
        }
Example #17
0
        public override UpdateResult OnSelect(BattleMenu menu)
        {
            BattleSkillListMenu skillMenu = menu as BattleSkillListMenu;

            if (skillMenu != null)
            {
                m_Selections[skillMenu.m_ID] = skill;
                return(UpdateResult.Completed);
            }

            return(UpdateResult.InProgress);
        }
        public override BattleState Execute(Dragon dragon, Enemy enemy, BattleMenu menu)
        {
            BattleState next = this;

            if (Input.GetKeyDown(KeyCode.Z))
            {
                //仮
                next = new StateDecideHand();
            }

            return(next);
        }
Example #19
0
        public override UpdateResult OnSelect(BattleMenu menu)
        {
            BattleCommandListMenu commandMenu = menu as BattleCommandListMenu;

            if (commandMenu != null)
            {
                commandMenu.Command = command;
                return(UpdateResult.Completed);
            }

            return(UpdateResult.InProgress);
        }
        public override BattleState Execute(Dragon dragon, Enemy enemy, BattleMenu menu)
        {
            BattleState next = this;

            if (Input.GetKeyDown(KeyCode.Z))
            {
                //シーン遷移
                GameObject.Find("SceneSequencer").GetComponent <SceneSequencer>().ChangeScene("World");
            }


            return(next);
        }
Example #21
0
    void PlayerLose()
    {
        if (battleProcess != BATTLE_PROCESS.PLAYER_LOSE)
        {
            return;
        }

        string message = string.Format("{0}はモンスター討伐に失敗した", defender.CharacterName());

        StartCoroutine(BattleMenu.LetterDisplay(message));

        battleProcess = BATTLE_PROCESS.BATTLE_END;
    }
Example #22
0
    void PlayerWin()
    {
        if (battleProcess != BATTLE_PROCESS.PLAYER_WIN)
        {
            return;
        }

        string message = string.Format("{0}はモンスターを退治した", attacker.CharacterName());

        StartCoroutine(BattleMenu.LetterDisplay(message));

        battleProcess = BATTLE_PROCESS.BATTLE_END;
    }
Example #23
0
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    #region [Awake]
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
            DontDestroyOnLoad(instance);
            gameObject.SetActive(false);
        }
        else
        {
            Destroy(this.gameObject);
        }
    }
        public override void Enter(Dragon dragon, Enemy enemy, BattleMenu menu)
        {
            CalculateDamage(ref dragon, ref enemy);
            Debug.Log("Dragon : " + dragon.Action + " Enemy : " + enemy.Action);

            //アニメーション再生!
            Debug.Log("Enter Animation");
            Actor winner = getWinner(dragon, enemy);

            if (winner != null)
            {
                winner.Anim.SetTrigger("Attack");
            }
        }
Example #25
0
        public void startSingleBattle(Trainer trainerOne, Trainer trainerTwo)
        {
            //our state is currently at the start of the battle
            state = State.BattleStart;

            //create instance of battle
            battle = new PokeBattle(trainerOne, trainerTwo);

            //start the battle thread
            thread = new Thread(battle.BattleLoop);
            thread.Start();

            BattleMenu.Initialize(graphics, content, font, battle, this);
        }
Example #26
0
    void Start()
    {
        currentTurn = DetermineStartWith();
        if (currentTurn == CURRENT_TURN.PLAYER)
        {
            battleProcess = BATTLE_PROCESS.NO_BATTLE;
        }
        else
        {
            battleProcess = BATTLE_PROCESS.MONSTER_TURN_ATTACK;
        }

        basicCommandOpen = false;
        battleMenu       = GetComponent <BattleMenu>();
        playerAction     = GetComponent <PlayerAction>();
        playerAction.playerInfo.backFromBattle = false;
    }
        public override void Update(GameTime gameTime)
        {
            //check whether the battle is over so we can end the thread
            if (battle.isOver && state != State.BattleEnd)
            {
                thread.Join();
                state = State.BattleEnd;
                DialogBox dbox = new DialogBox(graphics, content, font, "Battle is now Over");
                ScreenHandler.PushScreen(dbox);
                //DialogBox.newMessage("Battle is now Over");
                if (battle.YouWin)
                {
                    battle.Positions[0].pokemon.pokemon.addExp(4000); // add some made up amount of exp for testing
                    dbox.QueueMessage("You are the Victor!");
                }
                else
                {
                    battle.Positions[1].pokemon.pokemon.addExp(4000);
                    dbox.QueueMessage("You Lose!");
                }
                BattleMenu.isVisible = false;
                BattleMenu.Unload();
            }
            //check whether we are waiting for player input
            else if (battle.waitingForPlayerInput)
            {
                state = State.Input;
                BattleMenu.isVisible = true;
            }
            //otherwise we are in the action state I guess
            else if (state != State.BattleEnd)
            {
                state = State.Action;
            }

            if (BattleMenu.isVisible)
            {
                BattleMenu.Update();
            }

            if (battle.isOver && state == State.BattleEnd)
            {
                ScreenHandler.PopScreen();
            }
        }
Example #28
0
    public void ChangeMenu(BattleMenu m)
    {
        currentMenu      = m;
        currentSelection = 0;
        switch (m)
        {
        case BattleMenu.Selection:
            SelectionMenu.gameObject.SetActive(true);
            SelectionInfo.gameObject.SetActive(true);
            movesMenu.gameObject.SetActive(false);
            movesDetails.gameObject.SetActive(false);
            InfoMenu.gameObject.SetActive(false);
            break;

        case BattleMenu.Fight:
            SelectionMenu.gameObject.SetActive(false);
            SelectionInfo.gameObject.SetActive(false);
            movesMenu.gameObject.SetActive(true);
            movesDetails.gameObject.SetActive(true);
            InfoMenu.gameObject.SetActive(false);
            battleMessagePanel.SetActive(false);
            break;

        case BattleMenu.Info:
            SelectionMenu.gameObject.SetActive(false);
            SelectionInfo.gameObject.SetActive(false);
            movesMenu.gameObject.SetActive(false);
            movesDetails.gameObject.SetActive(false);
            InfoMenu.gameObject.SetActive(true);
            break;

        case BattleMenu.BattleInfo:
            movesMenu.SetActive(false);
            battleMessagePanel.SetActive(true);
            break;

            /*case BattleMenu.Selection:
             *
             *      break;
             *
             * case BattleMenu.Selection:
             *
             *      break;*/
        }
    }
        public override UpdateResult OnSelect(BattleMenu menu)
        {
            BattleSkillElementListMenu elementsMenu = menu as BattleSkillElementListMenu;

            if (elementsMenu != null)
            {
                elementsMenu.m_Next = new BattleSkillListMenu(
                    new ElementSkillFilter(m_Agent.BaseCharacter, labels[0]),
                    elementsMenu.m_ID,
                    elementsMenu.m_SPCost,
                    elementsMenu.m_HPCost
                    );
                elementsMenu.m_Next.Construct();
                return(UpdateResult.InProgress);
            }

            return(UpdateResult.InProgress);
        }
Example #30
0
    public UpdateResult Update(out BattleAction decision)
    {
        UpdateResult result = Update();

        if (result == UpdateResult.Completed)
        {
            BattleMenu menu = Next;
            while (menu != null)
            {
                menu.Destruct();
                menu = menu.Next;
            }

            if (m_Next.Count == m_Command.Selections.Count)
            {
                // Destroy this menu
                Destruct();

                // Construct final decision using m_Command.Actions
                decision = m_Command.Construct(m_Agent, m_Selections);

                if (m_Command.Expends != BattleCommand.Type.None)
                {
                    string turn = "Turn:" + m_Command.Expends;
                    --m_Agent[turn];
                }

                return(result);
            }
            else
            {
                m_Next.Push(m_Command.Selections[m_Next.Count].Construct(m_Agent, m_Selections));
                Next.Construct();

                if (!(Next is BattleListMenu))
                {
                    Destruct();
                }
            }
        }

        decision = null;
        return(result);
    }
Example #31
0
        internal void InitMenu(ScreenState state)
        {
            BattleMenu = new BattleMenu(this, state);

            if (BattleMenu.WMagic)
            {
                MagicMenu = new Screens.Magic.WMagic(this, MagicSpells, state);
            }
            else
            {
                MagicMenu = new Screens.Magic.Main(this, MagicSpells, state);
            }

            if (!MagicMenu.IsValid)
            {
                MagicMenu = null;
            }

            if (BattleMenu.WSummon)
            {
                SummonMenu = new Screens.Summon.WSummon(CurrentBattle, Summons, state);
            }
            else
            {
                SummonMenu = new Screens.Summon.Main(CurrentBattle, Summons, state);
            }

            if (!SummonMenu.IsValid)
            {
                SummonMenu = null;
            }

            IEnumerable <EnemySkillMateria> esms = Materia.Where(x => x is EnemySkillMateria).Cast <EnemySkillMateria>();

            if (esms.Count() > 0)
            {
                EnemySkillMateria m = EnemySkillMateria.Merge(esms);

                if (m.AP > 0)
                {
                    EnemySkillMenu = new Screens.EnemySkill.Main(CurrentBattle, m, state);
                }
            }
        }
Example #32
0
    void Start()
    {
        currentState = BattleStates.Start;
        currentMenu  = BattleMenu.Selection;
        fightT       = fight.text;
        inventoryT   = inventory.text;
        spiritsT     = spirits.text;
        fleeT        = flee.text;
        tech0T       = tech0.text;
        techTT       = techT.text;
        techTHT      = techTH.text;
        techfT       = techf.text;

        p1 = player.GetComponent <Player>();
        //enemyNameT = gm.battleSpirit.name;
        //enemyName.text = enemyNameT;
        //enemyLvlT = gm.battleSpirit.lvl.ToString();
        //enemyLvl.text = "Lvl " + enemyLvlT;
    }
Example #33
0
        public BattleHUD(Battle battle, SpriteFont font)
        {
            _Battle = battle;
            _Font = font; ;
            _TextBox = new Text.TextBox("A wild BULBASAUR has appeared!", _Font, new Rectangle(200, 179, 242, 46),
                new Rectangle(200, 179, 212, 26), 5, 10, TextBoxCloseMode.Manual);
            //Initialize the TextBox.
            _TextBox.Initialize();
            _TextBox.AddText("/c Go! CHARMANDER!");

            //Create the Sprite.
            //_Sprite = new SpriteOld();

            //Create the Healthbars.
            _HealthBarOpponent = new HealthBar(100, 100, 0.5f, new Vector2(153, 79), 48, 2);
            _HealthBarPlayer = new HealthBar(100, 100, 0.5f, new Vector2(280, 136), 47, 2);
            //Create the Experience Bar.
            _ExperienceBarPlayer = new ExperienceBar(100, 0, 0.5f, new Vector2(272, 153), 65, 3);

            //Create the BattleMenu.
            _BattleMenu = new BattleMenu("Battle", new Vector2(270, 179));
        }
Example #34
0
 void Awake()
 {
     S = this;
 }
Example #35
0
 //Choosing an enemy to attack
 void EnemyMenu()
 {
     PrevMenu = BattleMenu;
     BattleMenu = BattleMenu.Enemy;
     //If choosing an enemy to attack with a special attack
     specialIndex = index;
     index = 0;
     switch (PrevMenu)
     {
         //Using a normal attack
         case BattleMenu.Main:
                 listSize = AllEnemies.Count;
                 for (int i = 0; i < maxListSize; i++)
                 {
                     if (i >= listSize)
                     {
                         Text[i].text = "";
                     }
                     else
                     {
                         Text[i].text = AllEnemies[i].Stats.characterName;
                     }
                 }
             break;
         
         //Using a special attack
         case BattleMenu.Special:
             IBattlerAction specialAttack = currentCharacter.BattleBehavior.SpecialActions[specialIndex];
             //Individual enemy
             if (specialAttack.ActionTarget == ActionTarget.Enemy)
             {
                 listSize = AllEnemies.Count;
                 for (int i = 0; i < maxListSize; i++)
                 {
                     if (i >= listSize)
                     {
                         Text[i].text = "";
                     }
                     else
                     {
                         Text[i].text = AllEnemies[i].Stats.characterName;
                     }
                 }
             }
             //All enemies
             else if (specialAttack.ActionTarget == ActionTarget.AllEnemies)
             {
                 listSize = 1;
                 Text[0].text = "All";
                 for (int i = 1; i < maxListSize; i++)
                 {
                     Text[i].text = "";
                 }
             }
             break;
     }
 }
Example #36
0
 //Choosing a special action
 void SpecialMenu()
 {
     IList<IBattlerAction> battleActions = currentCharacter.BattleBehavior.SpecialActions;
     PrevMenu = BattleMenu;
     BattleMenu = BattleMenu.Special;
     index = specialIndex;
     listSize = battleActions.Count;
     for (int i = 0; i < maxListSize; i++)
     {
         if (i >= listSize)
         {
             Text[i].text = "";
         }
         else
         {
             Text[i].text = battleActions[i].Name;
         }
     }
 }
Example #37
0
    void ItemsMenu()
    {
        IList<Item> items = currentCharacter.Inventory;
        PrevMenu = BattleMenu;
        BattleMenu = BattleMenu.Item;
        index = 0;

        if (items.Count > 0)
        {
            listSize = items.Count;
            for (int i = 0; i < maxListSize; i++)
            {
                if (i >= listSize)
                {
                    Text[i].text = "";
                }
                else
                {
                    Text[i].text = items[i].ItemName + " (" + items[i].Quantity + ")";
                }
            }
        }
        else
        {
            listSize = 1;
            Text[0].text = "<Empty>";
            for (int i = 1; i < maxListSize; i++)
            {
                Text[i].text = "";
            }
        }
    }
Example #38
0
    void MainMenu()
    {
        PrevMenu = BattleMenu;
        BattleMenu = BattleMenu.Main;
        switch (PrevMenu)
        {
            case BattleMenu.Enemy:
                index = 0;
                break;

            case BattleMenu.Special:
                index = 1;
                break;

            case BattleMenu.Item:
                index = 2;
                break;
        }
        listSize = 4;
        Text[0].text = "Attack";
        Text[1].text = "Special";
        Text[2].text = "Item";
        Text[3].text = "Defend";
    }
Example #39
0
    public void LoadData()
    {
        ArrayList data = XMLHandler.LoadXML(dir+filename);

        this.system = new BattleSystem();
        this.menu = new BattleMenu();
        this.end = new BattleEnd();
        this.cam = new BattleCam();
        this.control = new BattleControl();

        this.effectTextSettings = new BattleTextSettings();
        this.missTextSettings = new BattleTextSettings("Miss");
        this.blockTextSettings = new BattleTextSettings("Block");
        this.castCancelTextSettings = new BattleTextSettings("Cast canceled");
        this.levelUpTextSettings = new BattleTextSettings("Level up!");
        this.classLevelUpTextSettings = new BattleTextSettings("Class level up!");
        this.counterText = new ArrayList();
        this.allAlliesText = new ArrayList();
        this.allEnemiesText = new ArrayList();
        this.stealItemText = new ArrayList();
        this.stealItemFailText = new ArrayList();
        this.stealMoneyText = new ArrayList();
        this.stealMoneyFailText = new ArrayList();
        this.battleStartText = new ArrayList();
        this.battleVictoryText = new ArrayList();
        this.battleDefeatText = new ArrayList();
        this.battleEscapeText = new ArrayList();

        for(int i=0; i<DataHolder.Languages().GetDataCount(); i++)
        {
            this.counterText.Add("Counter attack");
            this.allAlliesText.Add("All allies");
            this.allEnemiesText.Add("All enemies");
            this.stealItemText.Add("%n stole %");
            this.stealItemFailText.Add("Steal failed");
            this.stealMoneyText.Add("%n stole %");
            this.stealMoneyFailText.Add("Steal failed");
            this.battleStartText.Add("Fight!");
            this.battleVictoryText.Add("Victory");
            this.battleDefeatText.Add("You are defeated");
            this.battleEscapeText.Add("You escaped");
        }

        if(data.Count > 0)
        {
            foreach(Hashtable entry in data)
            {
                if(entry[XMLHandler.NODE_NAME] as string == BattleSystemData.BATTLESYSTEM)
                {
                    if(entry.ContainsKey(XMLHandler.NODES))
                    {
                        ArrayList subs = entry[XMLHandler.NODES] as ArrayList;
                        foreach(Hashtable val in subs)
                        {
                            if(val[XMLHandler.NODE_NAME] as string == BattleSystemData.SYSTEM)
                            {
                                this.system.type = (BattleSystemType)System.Enum.Parse(
                                        typeof(BattleSystemType), (string)val["type"]);
                                if(val.ContainsKey("enemycounting"))
                                {
                                    this.system.enemyCounting = (EnemyCounting)System.Enum.Parse(
                                            typeof(EnemyCounting), (string)val["enemycounting"]);
                                }
                                this.system.turnCalc = int.Parse((string)val["turncalc"]);
                                if(val.ContainsKey("starttimecalc")) this.system.startTimeCalc = int.Parse((string)val["starttimecalc"]);
                                this.system.defendFormula = int.Parse((string)val["defendformula"]);
                                this.system.escapeFormula = int.Parse((string)val["escapeformula"]);
                                this.system.actionBorder = int.Parse((string)val["actionborder"]);
                                if(val.ContainsKey("menuborder"))
                                {
                                    this.system.menuBorder = int.Parse((string)val["menuborder"]);
                                }
                                else this.system.menuBorder = this.system.actionBorder;
                                if(val.ContainsKey("maxtimebar"))
                                {
                                    this.system.maxTimebar = int.Parse((string)val["maxtimebar"]);
                                }
                                else this.system.maxTimebar = this.system.actionBorder;

                                if(val.ContainsKey("enablemultichoice")) this.system.enableMultiChoice = true;
                                if(val.ContainsKey("useallactions")) this.system.useAllActions = true;

                                if(val.ContainsKey("usetimebaraction"))
                                {
                                    this.system.useTimebarAction = (UseTimebarAction)System.Enum.Parse(
                                            typeof(UseTimebarAction), (string)val["usetimebaraction"]);
                                }

                                this.system.activeCommand = bool.Parse((string)val["activecommand"]);
                                this.system.actionPause = bool.Parse((string)val["actionpause"]);
                                if(val.ContainsKey("dynamiccombat"))
                                {
                                    this.system.dynamicCombat = true;
                                    if(val.ContainsKey("mintimebetween"))
                                    {
                                        this.system.minTimeBetween = float.Parse((string)val["mintimebetween"]);
                                    }
                                }
                                if(val.ContainsKey("playdamageanim")) this.system.playDamageAnim = true;
                                if(val.ContainsKey("blockautoatkmenu")) this.system.blockAutoAttackMenu = true;
                                if(val.ContainsKey("turnbonuses"))
                                {
                                    this.system.turnBonuses = true;
                                    this.system.statusBonus = new int[int.Parse((string)val["turnbonuses"])];
                                }
                                if(val.ContainsKey("revivesets"))
                                {
                                    this.system.reviveAfterBattle = true;
                                    int count = int.Parse((string)val["revivesets"]);
                                    this.system.reviveSetStatus = new bool[count];
                                    this.system.reviveStatus = new int[count];
                                }
                                if(val.ContainsKey("startstatuses"))
                                {
                                    this.system.startBattleStatusSettings = true;
                                    int count = int.Parse((string)val["startstatuses"]);
                                    this.system.startSetStatus = new bool[count];
                                    this.system.startStatus = new int[count];
                                }
                                if(val.ContainsKey("endstatuses"))
                                {
                                    this.system.endBattleStatusSettings = true;
                                    int count = int.Parse((string)val["endstatuses"]);
                                    this.system.endSetStatus = new bool[count];
                                    this.system.endStatus = new int[count];
                                }
                                if(val.ContainsKey("attacktimebaruse"))
                                {
                                    this.system.attackEndTurn = false;
                                    this.system.attackTimebarUse = float.Parse((string)val["attacktimebaruse"]);
                                }
                                if(val.ContainsKey("itemtimebaruse"))
                                {
                                    this.system.itemEndTurn = false;
                                    this.system.itemTimebarUse = float.Parse((string)val["itemtimebaruse"]);
                                }
                                if(val.ContainsKey("defendtimebaruse"))
                                {
                                    this.system.defendEndTurn = false;
                                    this.system.defendTimebarUse = float.Parse((string)val["defendtimebaruse"]);
                                }
                                if(val.ContainsKey("escapetimebaruse"))
                                {
                                    this.system.escapeEndTurn = false;
                                    this.system.escapeTimebarUse = float.Parse((string)val["escapetimebaruse"]);
                                }
                                if(val.ContainsKey("atbtickinterval"))
                                {
                                    this.system.atbTickInterval = float.Parse((string)val["atbtickinterval"]);
                                }
                                if(val.ContainsKey("battlerange"))
                                {
                                    this.system.battleRange = float.Parse((string)val["battlerange"]);
                                }
                                if(val.ContainsKey("airange"))
                                {
                                    this.system.aiRange = float.Parse((string)val["airange"]);
                                }
                                if(val.ContainsKey("airechecktime"))
                                {
                                    this.system.aiRecheckTime = float.Parse((string)val["airechecktime"]);
                                }
                                if(val.ContainsKey("blockcontrolmenu")) this.system.blockControlMenu = true;
                                if(val.ContainsKey("blockcontrolaction")) this.system.blockControlAction = true;
                                if(val.ContainsKey("blockmse")) this.system.blockMSE = true;
                                if(val.ContainsKey("freezeaction")) this.system.freezeAction = true;

                                if(val.ContainsKey("enemyspots"))
                                {
                                    this.system.enemySpot = new Vector3[int.Parse((string)val["enemyspots"])];
                                    this.system.enemySpotPA = new Vector3[this.system.enemySpot.Length];
                                    this.system.enemySpotEA = new Vector3[this.system.enemySpot.Length];
                                }
                                if(val.ContainsKey("spotdistance"))
                                {
                                    this.system.spotOnGround = true;
                                    this.system.spotDistance = float.Parse((string)val["spotdistance"]);
                                    this.system.spotLayer = int.Parse((string)val["spotlayer"]);
                                    if(val.ContainsKey("spotx"))
                                    {
                                        this.system.spotOffset = VectorHelper.FromHashtable(val, "spotx", "spoty", "spotz");
                                    }
                                }
                                if(val.ContainsKey("enablepaspots")) this.system.enablePASpots = true;
                                if(val.ContainsKey("enableeaspots")) this.system.enableEASpots = true;

                                if(val.ContainsKey(XMLHandler.NODES))
                                {
                                    ArrayList s = val[XMLHandler.NODES] as ArrayList;
                                    foreach(Hashtable ht in s)
                                    {
                                        if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.BONUS)
                                        {
                                            this.system.statusBonus[int.Parse((string)ht["id"])] = int.Parse((string)ht["value"]);
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.REVIVE)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            this.system.reviveSetStatus[id] = true;
                                            this.system.reviveStatus[id] = int.Parse((string)ht["value"]);
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.STARTSTATUS)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            this.system.startSetStatus[id] = true;
                                            this.system.startStatus[id] = int.Parse((string)ht["value"]);
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.ENDSTATUS)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            this.system.endSetStatus[id] = true;
                                            this.system.endStatus[id] = int.Parse((string)ht["value"]);
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.PARTYADVANTAGE)
                                        {
                                            this.system.partyAdvantage.SetData(ht);
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.ENEMIESADVANTAGE)
                                        {
                                            this.system.enemiesAdvantage.SetData(ht);
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.PARTYSPOT)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.system.partySpot.Length)
                                            {
                                                this.system.partySpot[id] = VectorHelper.FromHashtable(ht);
                                                if(ht.ContainsKey("pax"))
                                                {
                                                    this.system.partySpotPA[id] = VectorHelper.FromHashtable(ht, "pax", "pay", "paz");
                                                }
                                                if(ht.ContainsKey("eax"))
                                                {
                                                    this.system.partySpotEA[id] = VectorHelper.FromHashtable(ht, "eax", "eay", "eaz");
                                                }
                                            }
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.ENEMYSPOT)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.system.enemySpot.Length)
                                            {
                                                this.system.enemySpot[id] = VectorHelper.FromHashtable(ht);
                                                if(ht.ContainsKey("pax"))
                                                {
                                                    this.system.enemySpotPA[id] = VectorHelper.FromHashtable(ht, "pax", "pay", "paz");
                                                }
                                                if(ht.ContainsKey("eax"))
                                                {
                                                    this.system.enemySpotEA[id] = VectorHelper.FromHashtable(ht, "eax", "eay", "eaz");
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                            else if(val[XMLHandler.NODE_NAME] as string == BattleSystemData.MENU)
                            {
                                if(val.ContainsKey("dialogueposition")) this.menu.dialoguePosition = int.Parse((string)val["dialogueposition"]);
                                if(val.ContainsKey("targetposition")) this.menu.targetPosition = int.Parse((string)val["targetposition"]);
                                if(val.ContainsKey("skillposition")) this.menu.skillPosition = int.Parse((string)val["skillposition"]);
                                if(val.ContainsKey("itemposition")) this.menu.itemPosition = int.Parse((string)val["itemposition"]);
                                if(val.ContainsKey("showattack")) this.menu.showAttack = bool.Parse((string)val["showattack"]);
                                if(val.ContainsKey("showskills")) this.menu.showSkills = bool.Parse((string)val["showskills"]);
                                if(val.ContainsKey("combineskills")) this.menu.combineSkills = bool.Parse((string)val["combineskills"]);
                                if(val.ContainsKey("showitems")) this.menu.showItems = bool.Parse((string)val["showitems"]);
                                if(val.ContainsKey("combineitems")) this.menu.combineItems = bool.Parse((string)val["combineitems"]);
                                if(val.ContainsKey("showdefend")) this.menu.showDefend = bool.Parse((string)val["showdefend"]);
                                if(val.ContainsKey("showescape")) this.menu.showEscape = bool.Parse((string)val["showescape"]);
                                if(val.ContainsKey("showendturn")) this.menu.showEndTurn = bool.Parse((string)val["showendturn"]);
                                if(val.ContainsKey("attackicon")) this.menu.attackIconName = val["attackicon"] as string;
                                if(val.ContainsKey("skillicon")) this.menu.skillIconName = val["skillicon"] as string;
                                if(val.ContainsKey("itemicon")) this.menu.itemIconName = val["itemicon"] as string;
                                if(val.ContainsKey("defendicon")) this.menu.defendIconName = val["defendicon"] as string;
                                if(val.ContainsKey("escapeicon")) this.menu.escapeIconName = val["escapeicon"] as string;
                                if(val.ContainsKey("drag")) this.menu.enableDrag = true;
                                if(val.ContainsKey("doubleclick")) this.menu.enableDoubleClick = true;
                                if(val.ContainsKey("addback")) this.menu.addBack = true;
                                if(val.ContainsKey("backfirst")) this.menu.backFirst = true;
                                this.menu.mouseTouch.SetData(val);

                                if(val.ContainsKey("order")) this.menu.SetOrder(val["order"] as string);

                                if(val.ContainsKey(XMLHandler.NODES))
                                {
                                    ArrayList s = val[XMLHandler.NODES] as ArrayList;
                                    foreach(Hashtable ht in s)
                                    {
                                        if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.BACK)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.menu.backName.Count) this.menu.backName[id] = (string)ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.ATTACK)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.menu.attackName.Count) this.menu.attackName[id] = (string)ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.SKILL)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.menu.skillName.Count) this.menu.skillName[id] = (string)ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.ITEM)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.menu.itemName.Count) this.menu.itemName[id] = (string)ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.DEFEND)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.menu.defendName.Count) this.menu.defendName[id] = (string)ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.ESCAPE)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.menu.escapeName.Count) this.menu.escapeName[id] = (string)ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.ENDTURN)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.menu.endTurnName.Count) this.menu.endTurnName[id] = (string)ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.BACKICON)
                                        {
                                            this.menu.backIconName = (string)ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.ATTACKICON)
                                        {
                                            this.menu.attackIconName = (string)ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.SKILLICON)
                                        {
                                            this.menu.skillIconName = (string)ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.ITEMICON)
                                        {
                                            this.menu.itemIconName = (string)ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.DEFENDICON)
                                        {
                                            this.menu.defendIconName = (string)ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.ESCAPEICON)
                                        {
                                            this.menu.escapeIconName = (string)ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.ENDTURNICON)
                                        {
                                            this.menu.endTurnIconName = (string)ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.CURSOR)
                                        {
                                            this.menu.useTargetCursor = true;
                                            this.menu.cursorPrefabName = ht[XMLHandler.CONTENT] as string;
                                            this.menu.cursorOffset.x = float.Parse((string)ht["cox"]);
                                            this.menu.cursorOffset.y = float.Parse((string)ht["coy"]);
                                            this.menu.cursorOffset.z = float.Parse((string)ht["coz"]);
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.CURSORCHILD)
                                        {
                                            this.menu.cursorChildName = ht[XMLHandler.CONTENT] as string;
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.TARGET)
                                        {
                                            this.menu.useTargetMenu = bool.Parse((string)ht["targetmenu"]);
                                            this.menu.useTargetBlink = bool.Parse((string)ht["targetblink"]);
                                            if(this.menu.useTargetBlink)
                                            {
                                                if(ht.ContainsKey("fromcurrent")) this.menu.fromCurrent = true;
                                                this.menu.blinkChildren = bool.Parse((string)ht["children"]);
                                                this.menu.blinkTime = float.Parse((string)ht["time"]);
                                                this.menu.blinkInterpolation = (EaseType)System.Enum.Parse(typeof(EaseType), (string)ht["interpolation"]);
                                                if(ht.ContainsKey("as"))
                                                {
                                                    this.menu.aBlink = true;
                                                    this.menu.aStart = float.Parse((string)ht["as"]);
                                                    this.menu.aEnd = float.Parse((string)ht["ae"]);
                                                }
                                                if(ht.ContainsKey("rs"))
                                                {
                                                    this.menu.rBlink = true;
                                                    this.menu.rStart = float.Parse((string)ht["rs"]);
                                                    this.menu.rEnd = float.Parse((string)ht["re"]);
                                                }
                                                if(ht.ContainsKey("gs"))
                                                {
                                                    this.menu.gBlink = true;
                                                    this.menu.gStart = float.Parse((string)ht["gs"]);
                                                    this.menu.gEnd = float.Parse((string)ht["ge"]);
                                                }
                                                if(ht.ContainsKey("bs"))
                                                {
                                                    this.menu.bBlink = true;
                                                    this.menu.bStart = float.Parse((string)ht["bs"]);
                                                    this.menu.bEnd = float.Parse((string)ht["be"]);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                            else if(val[XMLHandler.NODE_NAME] as string == BattleSystemData.TEXT)
                            {
                                this.showUserDamage = bool.Parse((string)val["showuserdamage"]);
                                if(val.ContainsKey("mounttexts")) this.mountTexts = true;

                                if(val.ContainsKey("bmpos"))
                                {
                                    this.showBattleMessage = true;
                                    this.battleMessagePosition = int.Parse((string)val["bmpos"]);
                                    this.battleMessageShowTime = float.Parse((string)val["bmtime"]);
                                }

                                if(val.ContainsKey("bscolor"))
                                {
                                    this.battleStartColor = int.Parse((string)val["bscolor"]);
                                    this.battleStartSColor = int.Parse((string)val["bsshadowcolor"]);
                                }
                                if(val.ContainsKey("bvcolor"))
                                {
                                    this.battleVictoryColor = int.Parse((string)val["bvcolor"]);
                                    this.battleVictorySColor = int.Parse((string)val["bvshadowcolor"]);
                                }
                                if(val.ContainsKey("bdcolor"))
                                {
                                    this.battleDefeatColor = int.Parse((string)val["bdcolor"]);
                                    this.battleDefeatSColor = int.Parse((string)val["bdshadowcolor"]);
                                }
                                if(val.ContainsKey("becolor"))
                                {
                                    this.battleEscapeColor = int.Parse((string)val["becolor"]);
                                    this.battleEscapeSColor = int.Parse((string)val["beshadowcolor"]);
                                }

                                if(val.ContainsKey(XMLHandler.NODES))
                                {
                                    ArrayList s = val[XMLHandler.NODES] as ArrayList;
                                    foreach(Hashtable ht in s)
                                    {
                                        if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.INFO)
                                        {
                                            this.showInfo = true;
                                            this.infoPosition = int.Parse((string)ht["position"]);
                                            this.infoShowTime = float.Parse((string)ht["time"]);
                                            if(ht.ContainsKey("showskills")) this.showSkills = bool.Parse((string)ht["showskills"]);
                                            if(ht.ContainsKey("showitems")) this.showItems = bool.Parse((string)ht["showitems"]);
                                            if(ht.ContainsKey("showdefend")) this.showDefend = bool.Parse((string)ht["showdefend"]);
                                            if(ht.ContainsKey("showescape")) this.showEscape = bool.Parse((string)ht["showescape"]);
                                            if(ht.ContainsKey("showcounter")) this.showCounter = bool.Parse((string)ht["showcounter"]);
                                            if(ht.ContainsKey("showstealitem")) this.showStealItem = bool.Parse((string)ht["showstealitem"]);
                                            if(ht.ContainsKey("showstealitemfail")) this.showStealItemFail = bool.Parse((string)ht["showstealitemfail"]);
                                            if(ht.ContainsKey("showstealmoney")) this.showStealMoney = bool.Parse((string)ht["showstealmoney"]);
                                            if(ht.ContainsKey("showstealmoneyfail")) this.showStealMoneyFail = bool.Parse((string)ht["showstealmoneyfail"]);
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.DAMAGE)
                                        {
                                            DataHolder.StatusValues().AddDamageTextSettings(int.Parse((string)ht["id"]), ht);
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.REFRESH)
                                        {
                                            DataHolder.StatusValues().AddRefreshTextSettings(int.Parse((string)ht["id"]), ht);
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.EFFECT)
                                        {
                                            this.effectTextSettings.SetData(ht);
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.MISSSETTINGS)
                                        {
                                            this.missTextSettings.SetData(ht);
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.MISS)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.missTextSettings.text.Length)
                                            {
                                                this.missTextSettings.text[id] = ht[XMLHandler.CONTENT] as string;
                                            }
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.COUNTER)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.counterText.Count) this.counterText[id] = ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.ALLIES)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.allAlliesText.Count) this.allAlliesText[id] = ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.ENEMIES)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.allEnemiesText.Count) this.allEnemiesText[id] = ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.BATTLESTART)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.battleStartText.Count) this.battleStartText[id] = ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.BATTLEVICTORY)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.battleVictoryText.Count) this.battleVictoryText[id] = ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.BATTLEDEFEAT)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.battleDefeatText.Count) this.battleDefeatText[id] = ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.BATTLEESCAPE)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.battleEscapeText.Count) this.battleEscapeText[id] = ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.SKIN)
                                        {
                                            this.textSkinName = ht[XMLHandler.CONTENT] as string;
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.CASTCANCEL)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.castCancelTextSettings.text.Length)
                                            {
                                                this.castCancelTextSettings.text[id] = ht[XMLHandler.CONTENT] as string;
                                            }
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.LEVELUP)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.levelUpTextSettings.text.Length)
                                            {
                                                this.levelUpTextSettings.text[id] = ht[XMLHandler.CONTENT] as string;
                                            }
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.CASTCANCELSETTINGS)
                                        {
                                            this.castCancelTextSettings.SetData(ht);
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.LEVELUPSETTINGS)
                                        {
                                            this.levelUpTextSettings.SetData(ht);
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.CLASSLEVELUPSETTINGS)
                                        {
                                            this.classLevelUpTextSettings.SetData(ht);
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.BLOCKSETTINGS)
                                        {
                                            this.blockTextSettings.SetData(ht);
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.STEALITEM)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.stealItemText.Count) this.stealItemText[id] = ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.STEALITEMFAIL)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.stealItemFailText.Count) this.stealItemFailText[id] = ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.STEALMONEY)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.stealMoneyText.Count) this.stealMoneyText[id] = ht[XMLHandler.CONTENT];
                                        }
                                        else if(ht[XMLHandler.NODE_NAME] as string == BattleSystemData.STEALMONEYFAIL)
                                        {
                                            int id = int.Parse((string)ht["id"]);
                                            if(id < this.stealMoneyFailText.Count) this.stealMoneyFailText[id] = ht[XMLHandler.CONTENT];
                                        }
                                    }
                                }
                            }
                            else if(val[XMLHandler.NODE_NAME] as string == BattleSystemData.BATTLEEND)
                            {
                                this.end.SetData(val);
                            }
                            else if(val[XMLHandler.NODE_NAME] as string == BattleSystemData.BATTLECAM)
                            {
                                this.cam.SetData(val);
                            }
                            else if(val[XMLHandler.NODE_NAME] as string == BattleSystemData.BATTLECONTROL)
                            {
                                this.control.SetData(val);
                            }
                        }
                    }
                }
            }
        }
    }