* Brutal Hordechief - Fixed a bug that prevented controller from making block decisions.

This commit is contained in:
LevelX2 2015-03-23 14:15:25 +01:00
parent eac674f69e
commit 254d057218
3 changed files with 23 additions and 15 deletions

View file

@ -150,6 +150,17 @@ class BrutalHordechiefReplacementEffect extends ReplacementEffectImpl {
return false;
}
@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.DECLARING_BLOCKERS;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
Player controller = game.getPlayer(source.getControllerId());
return controller != null && controller.hasOpponent(event.getPlayerId(), game);
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player blockController = game.getPlayer(source.getControllerId());
@ -159,15 +170,4 @@ class BrutalHordechiefReplacementEffect extends ReplacementEffectImpl {
}
return false;
}
@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.DECLARING_BLOCKERS;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
// this won't work correctly if coop formats are supported someday
return event.getPlayerId().equals(source.getSourceId());
}
}

View file

@ -59,7 +59,6 @@ public class AshcloudPhoenix extends CardImpl {
this.expansionSetCode = "KTK";
this.subtype.add("Phoenix");
this.color.setRed(true);
this.power = new MageInt(4);
this.toughness = new MageInt(1);

View file

@ -109,7 +109,16 @@ public class GameEvent {
COUNTER, COUNTERED,
DECLARING_ATTACKERS, DECLARED_ATTACKERS,
DECLARE_ATTACKER, ATTACKER_DECLARED,
DECLARING_BLOCKERS, DECLARED_BLOCKERS,
/* DECLARING_BLOCKERS
targetId attackerId
sourceId not used for this event
playerId attackerId
amount not used for this event
flag not used for this event
*/
DECLARING_BLOCKERS,
DECLARED_BLOCKERS,
DECLARE_BLOCKER, BLOCKER_DECLARED,
CREATURE_BLOCKED,
SEARCH_LIBRARY, LIBRARY_SEARCHED,