public NewSpellCommand(BattleMenu menu, Attack spell) { this.Name = spell.Name; this.Description = "Attack with " + spell.Name; this.menu = menu; this.spell = spell; }
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); }
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(); }
public DefendCommand(BattleMenu menu) { this.Name = "Defend"; this.Description = "Defend from your opponent's next attack"; this.menu = menu; }
public AttackCommand(BattleMenu menu) { this.Name = "Attack"; this.Description = "Attack the opponent with your weapon"; this.menu = menu; }