mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
Added Standard Bearer, Coalition Flag and Coalition Honor Guard.
This commit is contained in:
parent
a74e0c2ed3
commit
a402d9fa1f
2 changed files with 5 additions and 2 deletions
|
|
@ -65,8 +65,9 @@ public class TargetsHaveToTargetPermanentIfAbleEffect extends ContinuousRuleModi
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Player targetingPlayer = game.getPlayer(event.getPlayerId());
|
||||
if (controller != null
|
||||
&& controller.isHuman() // TODO: This target handling does only work for non AI players so AI logic
|
||||
&& targetingPlayer.isHuman() // TODO: This target handling does only work for non AI players so AI logic
|
||||
&& controller.hasOpponent(event.getPlayerId(), game)) {
|
||||
StackObject stackObject = game.getStack().getStackObject(event.getSourceId());
|
||||
if (stackObject.isCopy()) {
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ public class Targets extends ArrayList<Target> {
|
|||
if (!canChoose(source.getSourceId(), playerId, game)) {
|
||||
return false;
|
||||
}
|
||||
int state = game.bookmarkState();
|
||||
while (!isChosen()) {
|
||||
Target target = this.getUnchosen().get(0);
|
||||
UUID targetController = playerId;
|
||||
|
|
@ -110,7 +111,8 @@ public class Targets extends ArrayList<Target> {
|
|||
// Check if there are some rules for targets are violated, if so reset the targets and start again
|
||||
if (this.getUnchosen().isEmpty()
|
||||
&& game.replaceEvent(new GameEvent(GameEvent.EventType.TARGETS_VALID, source.getSourceId(), source.getSourceId(), source.getControllerId()), source)) {
|
||||
this.clearChosen();
|
||||
game.restoreState(state, "Targets");
|
||||
clearChosen();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue