mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
* Play from top library - fixed that unplayable lands marks as playable;
This commit is contained in:
parent
a381c1954c
commit
c1351c2339
1 changed files with 8 additions and 4 deletions
|
@ -3281,10 +3281,16 @@ public abstract class PlayerImpl implements Player, Serializable {
|
||||||
boolean isPlayLand = (ability instanceof PlayLandAbility);
|
boolean isPlayLand = (ability instanceof PlayLandAbility);
|
||||||
|
|
||||||
// as original controller
|
// as original controller
|
||||||
|
|
||||||
|
// land restrictions
|
||||||
|
if (isPlayLand && game.getContinuousEffects().preventedByRuleModification(
|
||||||
|
GameEvent.getEvent(GameEvent.EventType.PLAY_LAND, ability.getSourceId(),
|
||||||
|
ability.getSourceId(), this.getId()), ability, game, true)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
MageObjectReference permittingObject;
|
MageObjectReference permittingObject;
|
||||||
if (isPlaySpell || isPlayLand) {
|
if (isPlaySpell || isPlayLand) {
|
||||||
// play land restriction
|
|
||||||
|
|
||||||
// play hand from non hand zone
|
// play hand from non hand zone
|
||||||
permittingObject = game.getContinuousEffects().asThough(card.getId(),
|
permittingObject = game.getContinuousEffects().asThough(card.getId(),
|
||||||
AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, ability, this.getId(), game);
|
AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, ability, this.getId(), game);
|
||||||
|
@ -3296,8 +3302,6 @@ public abstract class PlayerImpl implements Player, Serializable {
|
||||||
boolean canActivateAsHandZone = permittingObject != null
|
boolean canActivateAsHandZone = permittingObject != null
|
||||||
|| (fromZone == Zone.GRAVEYARD && canPlayCardsFromGraveyard());
|
|| (fromZone == Zone.GRAVEYARD && canPlayCardsFromGraveyard());
|
||||||
|
|
||||||
// TODO: add play land restrictions
|
|
||||||
|
|
||||||
// as affected controller
|
// as affected controller
|
||||||
UUID savedControllerId = ability.getControllerId();
|
UUID savedControllerId = ability.getControllerId();
|
||||||
ability.setControllerId(this.getId());
|
ability.setControllerId(this.getId());
|
||||||
|
|
Loading…
Reference in a new issue