forked from External/mage
* Soul Ransom - Fixed handling of some rare cases (e.g. Vedalken Orrery in play using Boomerang and playing Soul Ransom again).
This commit is contained in:
parent
765c42b2c6
commit
2b69f1a311
2 changed files with 8 additions and 3 deletions
|
|
@ -93,7 +93,7 @@ class SoulRansomEffect extends OneShotEffect {
|
|||
|
||||
SoulRansomEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "{this} controller sacrifices it, then draws two cards. Only any opponent may activate this ability";
|
||||
this.staticText = "{this}'s controller sacrifices it, then draws two cards. Only any opponent may activate this ability";
|
||||
}
|
||||
|
||||
SoulRansomEffect(final SoulRansomEffect effect) {
|
||||
|
|
@ -107,7 +107,12 @@ class SoulRansomEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||
if (permanent != null) {
|
||||
permanent.sacrifice(source.getSourceId(), game);
|
||||
} else {
|
||||
permanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);
|
||||
}
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -116,7 +121,6 @@ class SoulRansomEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
controller.drawCards(2, game);
|
||||
permanent.sacrifice(source.getSourceId(), game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -250,6 +250,7 @@ public abstract class ActivatedAbilityImpl extends AbilityImpl implements Activa
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMayActivate(TargetController mayActivate) {
|
||||
this.mayActivate = mayActivate;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue