Ejemplo n.º 1
0
 /// <summary>
 /// override of Player.canNotAttack()
 /// </summary>
 /// <param name="curPhase  ">this is the current game phase</param>
 /// <param name="game"> this is the current game</param>
 /// <returns></returns>
 public override bool canNotAttack(AttackPhase curPhase, IGame game)
 {
     if (curPhase == null)
     {
         throw new EmptyException(Legends_of_the_Three_Kingdoms.Properties.Resources.curphase_null);
     }
     else if (game == null)
     {
         throw new EmptyException(Legends_of_the_Three_Kingdoms.Properties.Resources.game_null);
     }
     else
     {
         return(curPhase.targets.Length > curPhase.attack.numOfTargets() || curPhase.targets.Length == 0 || curPhase.targets[0] == this);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// check if this player can attack
 /// </summary>
 /// <param name="curPhase"></param>
 /// <param name="game"></param>
 /// <returns></returns>
 public virtual bool canNotAttack(AttackPhase curPhase, IGame game)
 {
     return(curPhase.targets.Length > curPhase.attack.numOfTargets() || curPhase.targets.Length == 0 || curPhase.actionPhase.attackCount >= 1 || curPhase.targets[0] == this);
 }