mirror of
https://github.com/correl/mage.git
synced 2025-01-14 03:00:10 +00:00
Fix Zombie Boa
This commit is contained in:
parent
6892776e28
commit
f4fe4cd1d0
1 changed files with 10 additions and 10 deletions
|
@ -69,18 +69,18 @@ class ZombieBoaEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player player = game.getPlayer(source.getSourceId());
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
if (player == null) {
|
if (player == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ChoiceColor choice = new ChoiceColor(true);
|
ChoiceColor choice = new ChoiceColor();
|
||||||
player.choose(outcome, choice, game);
|
if (player.choose(outcome, choice, game)) {
|
||||||
ObjectColor color = choice.getColor();
|
ObjectColor color = choice.getColor();
|
||||||
if (color == null) {
|
game.informPlayers(player.getLogName() + " chooses " + color);
|
||||||
return false;
|
game.addDelayedTriggeredAbility(new ZombieBoaTriggeredAbility(color), source);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
game.addDelayedTriggeredAbility(new ZombieBoaTriggeredAbility(color), source);
|
return false;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ class ZombieBoaTriggeredAbility extends DelayedTriggeredAbility {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkEventType(GameEvent event, Game game) {
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
return event.getType() == GameEvent.EventType.CREATURE_BLOCKED;
|
return event.getType() == GameEvent.EventType.BLOCKER_DECLARED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -117,7 +117,7 @@ class ZombieBoaTriggeredAbility extends DelayedTriggeredAbility {
|
||||||
if (permanent == null || !permanent.isCreature(game) || !permanent.getColor(game).contains(color)) {
|
if (permanent == null || !permanent.isCreature(game) || !permanent.getColor(game).contains(color)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.getEffects().setTargetPointer(new FixedTarget(permanent, game));
|
this.getEffects().setTargetPointer(new FixedTarget(event.getSourceId(), game));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue