mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Fixed a bug allowing to cast revealed opponent spells
This commit is contained in:
parent
fc2283898c
commit
ad412af32b
1 changed files with 8 additions and 1 deletions
|
@ -28,7 +28,6 @@
|
|||
|
||||
package mage.abilities;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.AbilityType;
|
||||
import mage.Constants.AsThoughEffectType;
|
||||
import mage.Constants.CardType;
|
||||
|
@ -38,6 +37,8 @@ import mage.abilities.costs.mana.ManaCost;
|
|||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
@ -61,6 +62,12 @@ public class SpellAbility extends ActivatedAbilityImpl<SpellAbility> {
|
|||
object.getAbilities().containsKey(FlashAbility.getInstance().getId()) ||
|
||||
game.getContinuousEffects().asThough(sourceId, AsThoughEffectType.CAST, game) ||
|
||||
game.canPlaySorcery(playerId))) {
|
||||
|
||||
// fix for Gitaxian Probe and casting opponent's spells
|
||||
if (!controllerId.equals(playerId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (costs.canPay(sourceId, controllerId, game) && canChooseTarget(game)) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue