Exemplo n.º 1
0
 public NewSpellCommand(BattleMenu menu, Attack spell)
 {
     this.Name        = spell.Name;
     this.Description = "Attack with " + spell.Name;
     this.menu        = menu;
     this.spell       = spell;
 }
Exemplo n.º 2
0
        private BattleMenu GenerateSpellMenu()
        {
            List <ISpellswordCommand> newCommands = new List <ISpellswordCommand>();
            List <Attack>             spellList   = player.SpellList;

            foreach (Attack spell in spellList)
            {
                newCommands.Add(new NewSpellCommand(this, spell));
            }
            BattleMenu newMenu = new BattleMenu(thisGame, player, enemy, currentWeapon, newCommands);

            return(newMenu);
        }
Exemplo n.º 3
0
 private void LoadBasicCommands()
 {
     currentCommands.Clear();
     currentCommands.Add(new AttackCommand(this));
     currentCommands.Add(new DefendCommand(this));
     if (currentWeapon.IsFocus)
     {
         BattleMenu        spellMenu      = GenerateSpellMenu();
         SwitchMenuCommand switchToSpells = new SwitchMenuCommand("Spells", thisGame, this, spellMenu);
         currentCommands.Add(switchToSpells);
     }
     currentCommands.Add(new RunCommand(thisGame, player, enemy));
     controller.ResetIndex();
 }
Exemplo n.º 4
0
 public DefendCommand(BattleMenu menu)
 {
     this.Name        = "Defend";
     this.Description = "Defend from your opponent's next attack";
     this.menu        = menu;
 }
Exemplo n.º 5
0
 public AttackCommand(BattleMenu menu)
 {
     this.Name        = "Attack";
     this.Description = "Attack the opponent with your weapon";
     this.menu        = menu;
 }