コード例 #1
0
 public void UseMagic(MagicMove magic)
 {
     if (turn == 1)
     {
         if (player.CurrentMP >= magic.MPCost)
         {
             Move move = new Move(magic.Name, magic.StaminaCost, magic.Target, magic.Stat, magic.Amount);
             UseMove(move, 2);
             player.ModMP(-magic.MPCost);
         }
         else
         {
             ScreenManager.AddScreen(new MessageBox("NOT ENOUGH MP!"));
         }
     }
     else
     {
         if (enemy.CurrentMP >= magic.MPCost)
         {
             Move move = new Move(magic.Name, magic.StaminaCost, magic.Target, magic.Stat, magic.Amount);
             UseMove(move, 2);
         }
         else
         {
             //Not enough MP warning - Enemy won't need this, will search for another possible attack instead
         }
     }
 }
コード例 #2
0
 public void AddMagic(MagicMove spell)
 {
     items.Add(spell);
 }