mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Added a default player to getDefendingPlayer (the player whose turn it is not), if the variable has not been set.
This commit is contained in:
@@ -231,7 +231,7 @@ public class Combat {
|
|||||||
if (attackingPlayer != null) {
|
if (attackingPlayer != null) {
|
||||||
return attackingPlayer;
|
return attackingPlayer;
|
||||||
}
|
}
|
||||||
else return AllZone.getPhase().getPriorityPlayer();
|
else return AllZone.getPhase().getPlayerTurn();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -242,7 +242,10 @@ public class Combat {
|
|||||||
* @return a {@link forge.Player} object.
|
* @return a {@link forge.Player} object.
|
||||||
*/
|
*/
|
||||||
public final Player getDefendingPlayer() {
|
public final Player getDefendingPlayer() {
|
||||||
return defendingPlayer;
|
if (attackingPlayer != null) {
|
||||||
|
return defendingPlayer;
|
||||||
|
}
|
||||||
|
else return AllZone.getPhase().getPlayerTurn().getOpponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user