mirror of
https://github.com/correl/mage.git
synced 2025-01-11 19:13:02 +00:00
- Fixed #5758
This commit is contained in:
parent
7a35a76248
commit
9cab9bc429
1 changed files with 8 additions and 1 deletions
|
@ -18,6 +18,8 @@ import mage.target.TargetPermanent;
|
|||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.mana.ManaAbility;
|
||||
import mage.game.stack.Spell;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
|
@ -76,7 +78,12 @@ class DovinHandOfControlEffect extends CostModificationEffectImpl {
|
|||
@Override
|
||||
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||
Card card = game.getCard(abilityToModify.getSourceId());
|
||||
return card != null && (card.isInstantOrSorcery() || card.isArtifact())
|
||||
if (!(abilityToModify instanceof SpellAbility)) {
|
||||
return false;
|
||||
}
|
||||
return card != null
|
||||
&& (card.isInstantOrSorcery()
|
||||
|| card.isArtifact())
|
||||
&& game.getOpponents(source.getControllerId()).contains(abilityToModify.getControllerId());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue