mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
* Myriad - Fixed a bug that the token was also created to attack the definding player.
This commit is contained in:
parent
82688fd6f2
commit
03c766a485
2 changed files with 9 additions and 2 deletions
|
@ -1059,7 +1059,14 @@ public class HumanPlayer extends PlayerImpl {
|
|||
}
|
||||
}
|
||||
if (chooseTarget(Outcome.Damage, target, null, game)) {
|
||||
declareAttacker(attackerId, response.getUUID(), game, true);
|
||||
UUID defenderId = response.getUUID();
|
||||
for (Player player : game.getPlayers().values()) {
|
||||
if (player.getId().equals(response.getUUID())) {
|
||||
defenderId = player.getId(); // get the correct player object
|
||||
break;
|
||||
}
|
||||
}
|
||||
declareAttacker(attackerId, defenderId, game, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ class MyriadEffect extends OneShotEffect {
|
|||
}
|
||||
List<Permanent> tokens = new ArrayList<>();
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
if (playerId != defendingPlayerId && controller.hasOpponent(playerId, game)) {
|
||||
if (!playerId.equals(defendingPlayerId) && controller.hasOpponent(playerId, game)) {
|
||||
Player opponent = game.getPlayer(playerId);
|
||||
if (opponent != null && controller.chooseUse(Outcome.PutCreatureInPlay,
|
||||
"Put a copy of " + sourceObject.getIdName() + " onto battlefield attacking " + opponent.getName() + "?", source, game)) {
|
||||
|
|
Loading…
Reference in a new issue