mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00: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;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
|
@ -91,9 +92,10 @@ class GiveControlEffect extends ContinuousEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = (Permanent) source.getSourceObjectIfItStillExists(game);
|
||||
if (permanent != null) {
|
||||
return permanent.changeControllerId(source.getFirstTarget(), game, source);
|
||||
MageObject mageObject = source.getSourceObjectIfItStillExists(game);
|
||||
if (mageObject != null
|
||||
&& mageObject instanceof Permanent) {
|
||||
return ((Permanent) mageObject).changeControllerId(source.getFirstTarget(), game, source);
|
||||
} else {
|
||||
discard();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue