separate 'you may play'|'you may cast' AsThoughtEffect approuvers

Also, reworked Gonti, Lord of Luxury and checks it now works properly with Zoetic Cavern.
This commit is contained in:
Susucre 2024-04-13 12:10:53 +02:00 committed by GitHub
parent 31295eb645
commit c77634c843
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
142 changed files with 464 additions and 531 deletions

View file

@ -3987,9 +3987,14 @@ public abstract class PlayerImpl implements Player, Serializable {
Set<ApprovingObject> approvingObjects;
if ((isPlaySpell || isPlayLand) && (fromZone != Zone.BATTLEFIELD)) {
// play hand from non hand zone (except battlefield - you can't play already played permanents)
approvingObjects = game.getContinuousEffects().asThough(object.getId(),
AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, ability, this.getId(), game);
// play card from non hand zone (except battlefield - you can't play already played permanents)
approvingObjects = new HashSet<>();
approvingObjects.addAll(game.getContinuousEffects().asThough(object.getId(),
AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, ability, this.getId(), game));
if (isPlaySpell) {
approvingObjects.addAll(game.getContinuousEffects().asThough(object.getId(),
AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, ability, this.getId(), game));
}
if (approvingObjects.isEmpty() && isPlaySpell
&& ((SpellAbility) ability).getSpellAbilityType().equals(SpellAbilityType.ADVENTURE_SPELL)) {