* Brimaz, King of Oreskos - Fixed that a attacker blocked by Brimaz was not able to set the damage assign order between Brimaz and cat tokens.

This commit is contained in:
LevelX2 2015-09-05 10:58:44 +02:00
parent 55f115c39b
commit 2df440b5c8

View file

@ -105,9 +105,8 @@ class BrimazKingOfOreskosEffect extends OneShotEffect {
if (controller != null) { if (controller != null) {
Token token = new CatSoldierCreatureToken(); Token token = new CatSoldierCreatureToken();
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
Permanent catToken = game.getPermanent(token.getLastAddedToken());
Permanent attackingCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); Permanent attackingCreature = game.getPermanent(getTargetPointer().getFirst(game, source));
if (catToken != null && attackingCreature != null && game.getState().getCombat() != null) { if (attackingCreature != null && game.getState().getCombat() != null) {
// Possible ruling (see Ætherplasm) // Possible ruling (see Ætherplasm)
// The token you put onto the battlefield is blocking the attacking creature, // The token you put onto the battlefield is blocking the attacking creature,
// even if the block couldn't legally be declared (for example, if that creature // even if the block couldn't legally be declared (for example, if that creature
@ -115,8 +114,14 @@ class BrimazKingOfOreskosEffect extends OneShotEffect {
// has protection from it) // has protection from it)
CombatGroup combatGroup = game.getState().getCombat().findGroup(attackingCreature.getId()); CombatGroup combatGroup = game.getState().getCombat().findGroup(attackingCreature.getId());
if (combatGroup != null) { if (combatGroup != null) {
combatGroup.addBlocker(catToken.getId(), source.getControllerId(), game); for (UUID tokenId : token.getLastAddedTokenIds()) {
game.getCombat().addBlockingGroup(catToken.getId(),attackingCreature.getId() , source.getControllerId(), game); Permanent catToken = game.getPermanent(tokenId);
if (catToken != null) {
combatGroup.addBlocker(tokenId, source.getControllerId(), game);
game.getCombat().addBlockingGroup(tokenId, attackingCreature.getId(), controller.getId(), game);
}
}
combatGroup.pickBlockerOrder(attackingCreature.getControllerId(), game);
} }
} }
return true; return true;