mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
* 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:
parent
55f115c39b
commit
2df440b5c8
1 changed files with 19 additions and 14 deletions
|
|
@ -64,10 +64,10 @@ public class BrimazKingOfOreskos extends CardImpl {
|
||||||
|
|
||||||
// Vigilance
|
// Vigilance
|
||||||
this.addAbility(VigilanceAbility.getInstance());
|
this.addAbility(VigilanceAbility.getInstance());
|
||||||
|
|
||||||
// Whenever Brimaz, King of Oreskos attacks, put a 1/1 white Cat Soldier creature token with vigilance onto the battlefield attacking.
|
// Whenever Brimaz, King of Oreskos attacks, put a 1/1 white Cat Soldier creature token with vigilance onto the battlefield attacking.
|
||||||
this.addAbility(new AttacksTriggeredAbility(new CreateTokenEffect(new CatSoldierCreatureToken(), 1, false, true), false));
|
this.addAbility(new AttacksTriggeredAbility(new CreateTokenEffect(new CatSoldierCreatureToken(), 1, false, true), false));
|
||||||
|
|
||||||
// Whenever Brimaz blocks a creature, put a 1/1 white Cat Soldier creature token with vigilance onto the battlefield blocking that creature.
|
// Whenever Brimaz blocks a creature, put a 1/1 white Cat Soldier creature token with vigilance onto the battlefield blocking that creature.
|
||||||
this.addAbility(new BlocksCreatureTriggeredAbility(new BrimazKingOfOreskosEffect(), false, true));
|
this.addAbility(new BlocksCreatureTriggeredAbility(new BrimazKingOfOreskosEffect(), false, true));
|
||||||
}
|
}
|
||||||
|
|
@ -83,44 +83,49 @@ public class BrimazKingOfOreskos extends CardImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
class BrimazKingOfOreskosEffect extends OneShotEffect {
|
class BrimazKingOfOreskosEffect extends OneShotEffect {
|
||||||
|
|
||||||
public BrimazKingOfOreskosEffect() {
|
public BrimazKingOfOreskosEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
this.staticText = "put a 1/1 white Cat Soldier creature token with vigilance onto the battlefield blocking that creature";
|
this.staticText = "put a 1/1 white Cat Soldier creature token with vigilance onto the battlefield blocking that creature";
|
||||||
}
|
}
|
||||||
|
|
||||||
public BrimazKingOfOreskosEffect(final BrimazKingOfOreskosEffect effect) {
|
public BrimazKingOfOreskosEffect(final BrimazKingOfOreskosEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BrimazKingOfOreskosEffect copy() {
|
public BrimazKingOfOreskosEffect copy() {
|
||||||
return new BrimazKingOfOreskosEffect(this);
|
return new BrimazKingOfOreskosEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
|
||||||
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 (attackingCreature != null && game.getState().getCombat() != null) {
|
||||||
if (catToken != null && 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
|
||||||
// enters the battlefield tapped, or it can't block, or the attacking creature
|
// enters the battlefield tapped, or it can't block, or the attacking creature
|
||||||
// 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;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue