public void Magic(Enemy enemy) { Console.WriteLine(name + "の魔法攻撃"); damageF = DamegeF.Magic; attack += 8; enemy.Damage(attack); }
// プレーヤの次の行動を入力する public void SetPlayerAction() { //攻撃 Console.WriteLine("\n 攻撃を入力 \n A.通常攻撃 S.魔法攻撃 D.防御 \n"); string attackKey = Console.ReadLine(); DamegeF nextAction = DamegeF.None; switch (attackKey.ToLower()) { case "a": nextAction = DamegeF.Normal; break; case "s": nextAction = DamegeF.Magic; break; case "d": nextAction = DamegeF.Guard; break; default: break; } this.player.NextAction = nextAction; }
public void Guard() { Console.WriteLine(name + "は防御した"); damageF = DamegeF.Guard; }