public virtual int _do(Monster m,Monster e) { Game game = new Game (); Console.WriteLine (m.name + "の" + this.name + "!"); string wazatype = this.type.name; string entype = e.type.name; return game.judge (this.type.name,e.type.name); }
public override int _do(Monster m,Monster e) { return 0; }
public override int _do(Monster m,Monster e) { int state = base._do (m,e); switch (state) { case 1: Console.WriteLine ("勝ち"); Console.WriteLine ("攻撃力×2!"); e.damage (m.atk*2); break; case -1: Console.WriteLine ("負け"); e.damage (m.atk/2); break; default: Console.WriteLine ("あいこ"); break; } return state; }