mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Fix Warped Devotion to work whan a token is bounced
This commit is contained in:
parent
3e2963d21d
commit
fc24fc6800
1 changed files with 4 additions and 7 deletions
|
@ -88,20 +88,17 @@ class WarpedDevotionTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
ZoneChangeEvent zce = (ZoneChangeEvent)event;
|
||||
if(zce.getFromZone() == Zone.BATTLEFIELD && zce.getToZone() == Zone.HAND) {
|
||||
Card card = game.getCard(event.getTargetId());
|
||||
if(card != null) {
|
||||
for(Effect effect: getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(card.getOwnerId()));
|
||||
}
|
||||
return true;
|
||||
for(Effect effect: getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(zce.getTarget().getOwnerId()));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever a permanent is returned to a player's hand, that player discards a card";
|
||||
return "Whenever a permanent is returned to a player's hand, that player discards a card.";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue