mirror of
https://github.com/correl/mage.git
synced 2024-12-28 11:14:13 +00:00
- Fixed #8449
This commit is contained in:
parent
e989c05247
commit
a6ca9a095c
1 changed files with 5 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import mage.MageObject;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
|
@ -91,9 +92,10 @@ class GiveControlEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = (Permanent) source.getSourceObjectIfItStillExists(game);
|
MageObject mageObject = source.getSourceObjectIfItStillExists(game);
|
||||||
if (permanent != null) {
|
if (mageObject != null
|
||||||
return permanent.changeControllerId(source.getFirstTarget(), game, source);
|
&& mageObject instanceof Permanent) {
|
||||||
|
return ((Permanent) mageObject).changeControllerId(source.getFirstTarget(), game, source);
|
||||||
} else {
|
} else {
|
||||||
discard();
|
discard();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue