- Implemented Highspire Bell-Ringer (#13495)

- Commonized second spell condition
This commit is contained in:
androosss 2025-04-05 19:44:16 +02:00 committed by GitHub
parent 8e1805c874
commit 97b5341688
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 69 additions and 13 deletions

View file

@ -0,0 +1,19 @@
package mage.abilities.condition.common;
import mage.abilities.Ability;
import mage.abilities.condition.Condition;
import mage.game.Game;
import mage.watchers.common.SpellsCastWatcher;
/**
* @author androosss
*/
public enum YouCastExactOneSpellThisTurnCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
SpellsCastWatcher watcher = game.getState().getWatcher(SpellsCastWatcher.class);
return watcher != null && watcher.getSpellsCastThisTurn(source.getControllerId()).size() == 1;
}
}