mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
[STX] fixed Valentin, Dean of the Vein effect applying to tokens (fixes #7819)
This commit is contained in:
parent
895430b554
commit
2c2b028980
1 changed files with 5 additions and 2 deletions
|
@ -21,6 +21,7 @@ import mage.filter.StaticFilters;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.game.permanent.PermanentToken;
|
||||
import mage.game.permanent.token.WitherbloomToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -115,8 +116,10 @@ class ValentinDeanOfTheVeinEffect extends ReplacementEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return ((ZoneChangeEvent) event).isDiesEvent()
|
||||
&& game.getOpponents(game.getControllerId(event.getTargetId())).contains(source.getControllerId());
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||
return zEvent.isDiesEvent()
|
||||
&& !(zEvent.getTarget() instanceof PermanentToken)
|
||||
&& game.getOpponents(zEvent.getTarget().getControllerId()).contains(source.getControllerId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue