mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Fixed Banishing Light-type effects to not exile creatures if the source permanent is not on the battlefield when the effect resolves. Closes #8899.
This commit is contained in:
parent
9715021a35
commit
513085bbcc
2 changed files with 18 additions and 7 deletions
|
@ -87,6 +87,11 @@ class LagrellaTheMagpieEffect extends OneShotEffect {
|
|||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
// Like other Banishing Light effects, no permanents get exiled if Lagrella is not in the battlefield when this ability resolves.
|
||||
if (game.getPermanent(source.getSourceId()) == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Cards cards = new CardsImpl();
|
||||
this.getTargetPointer()
|
||||
.getTargets(game, source)
|
||||
|
|
|
@ -30,13 +30,19 @@ public class ExileUntilSourceLeavesEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
ExileTargetEffect effect = new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getIdName());
|
||||
if (targetPointer != null) { // Grasping Giant
|
||||
effect.setTargetPointer(targetPointer);
|
||||
}
|
||||
return effect.apply(game, source);
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
// If Banishing Light leaves the battlefield before its triggered ability resolves, the target permanent won't be exiled.
|
||||
// (2021-03-19)
|
||||
if (game.getPermanent(source.getSourceId()) == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ExileTargetEffect effect = new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getIdName());
|
||||
if (targetPointer != null) { // Grasping Giant
|
||||
effect.setTargetPointer(targetPointer);
|
||||
}
|
||||
return effect.apply(game, source);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue