예제 #1
0
        private void button13_Click_1(object sender, EventArgs e)
        {
            ChangeLabel(1);
            misc_structure misc = new misc_structure(@"Input\war3mapMisc.txt");

            Bj_structure.function temp = (Bj_structure.function)BJ.substance[BJ.substance.Count - 1];
            temp.content  = "function MeleeStartingHeroLimit takes nothing returns nothing" + Environment.NewLine;
            temp.content += "    local integer index" + Environment.NewLine;
            temp.content += "" + Environment.NewLine;
            temp.content += "    set index = 0" + Environment.NewLine;
            temp.content += "    loop" + Environment.NewLine;
            temp.content += "        // max heroes per player" + Environment.NewLine;
            temp.content += "        call SetPlayerMaxHeroesAllowed(bj_MELEE_HERO_LIMIT, Player(index))" + Environment.NewLine;
            temp.content += "" + Environment.NewLine;
            temp.content += "        // each player is restricted to a limit per hero type as well" + Environment.NewLine;
            for (int i = 0; i < misc.hero.Length; i++)
            {
                temp.content += "        call ReducePlayerTechMaxAllowed(Player(index), '" + misc.hero[i] + "', bj_MELEE_HERO_TYPE_LIMIT)" + Environment.NewLine;
            }
            temp.content += "" + Environment.NewLine;
            temp.content += "        set index = index + 1" + Environment.NewLine;
            temp.content += "        exitwhen index == bj_MAX_PLAYERS" + Environment.NewLine;
            temp.content += "    endloop" + Environment.NewLine;
            temp.content += "endfunction" + Environment.NewLine;

            //MessageBox.Show(temp.content);
            BJ.substance[BJ.substance.Count - 1] = temp;
            ListBJNew();
            ChangeLabel(0);
        }
예제 #2
0
파일: Form1.cs 프로젝트: shawwwn/BJ_Edit
        private void button13_Click_1(object sender, EventArgs e)
        {
            ChangeLabel(1);
            misc_structure misc = new misc_structure(@"Input\war3mapMisc.txt");
            Bj_structure.function temp = (Bj_structure.function)BJ.substance[BJ.substance.Count-1];
            temp.content = "function MeleeStartingHeroLimit takes nothing returns nothing"+Environment.NewLine;
            temp.content += "    local integer index" + Environment.NewLine;
            temp.content += "" + Environment.NewLine;
            temp.content += "    set index = 0" + Environment.NewLine;
            temp.content += "    loop" + Environment.NewLine;
            temp.content += "        // max heroes per player" + Environment.NewLine;
            temp.content += "        call SetPlayerMaxHeroesAllowed(bj_MELEE_HERO_LIMIT, Player(index))" + Environment.NewLine;
            temp.content += "" + Environment.NewLine;
            temp.content += "        // each player is restricted to a limit per hero type as well" + Environment.NewLine;
            for (int i = 0; i < misc.hero.Length; i++)
            {
                temp.content += "        call ReducePlayerTechMaxAllowed(Player(index), '" + misc.hero[i] + "', bj_MELEE_HERO_TYPE_LIMIT)" + Environment.NewLine;
            }
            temp.content += "" + Environment.NewLine;
            temp.content += "        set index = index + 1" + Environment.NewLine;
            temp.content += "        exitwhen index == bj_MAX_PLAYERS" + Environment.NewLine;
            temp.content += "    endloop" + Environment.NewLine;
            temp.content += "endfunction" + Environment.NewLine;

            //MessageBox.Show(temp.content);
            BJ.substance[BJ.substance.Count - 1] = temp;
            ListBJNew();
            ChangeLabel(0);
        }