1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-05 01:09:06 -09:00

Move canPlaySorcery() to ActivatedAbility.canActivate().

This commit is contained in:
rkfg 2016-03-07 01:07:08 +03:00
parent 88d17d7ed9
commit 66040f0c1f
2 changed files with 3 additions and 6 deletions
Mage/src/main/java/mage

View file

@ -56,7 +56,7 @@ public class PlayLandAbility extends ActivatedAbilityImpl {
return false;
}
//20091005 - 114.2a
return game.getActivePlayerId().equals(playerId) && game.getPlayer(playerId).canPlayLand();
return game.getActivePlayerId().equals(playerId) && game.getPlayer(playerId).canPlayLand() && game.canPlaySorcery(playerId);
}
@Override

View file

@ -1065,10 +1065,7 @@ public abstract class PlayerImpl implements Player, Serializable {
return false;
}
//20091005 - 114.2a
if (!playLandAbility.canActivate(this.playerId, game)) {
return false;
}
if (!ignoreTiming && !game.canPlaySorcery(playerId)) {
if (!ignoreTiming && !playLandAbility.canActivate(this.playerId, game)) {
return false;
}
//20091005 - 305.1
@ -2725,7 +2722,7 @@ public abstract class PlayerImpl implements Player, Serializable {
if (game.getContinuousEffects().preventedByRuleModification(GameEvent.getEvent(GameEvent.EventType.PLAY_LAND, ability.getSourceId(), ability.getSourceId(), playerId), ability, game, true)) {
break;
}
if (canPlay((ActivatedAbility) ability, available, card, game) && game.canPlaySorcery(playerId)) {
if (canPlay((ActivatedAbility) ability, available, card, game)) {
playable.add(card.getId());
break Abilities;
}