use of mage.watchers.common.CastSpellLastTurnWatcher in project mage by magefree.
the class PeerlessSamuraiEffect method init.
@Override
public void init(Ability source, Game game) {
super.init(source, game);
CastSpellLastTurnWatcher watcher = game.getState().getWatcher(CastSpellLastTurnWatcher.class);
if (watcher != null) {
spellsCast = watcher.getAmountOfSpellsPlayerCastOnCurrentTurn(source.getControllerId());
}
}
use of mage.watchers.common.CastSpellLastTurnWatcher in project mage by magefree.
the class IrencragFeatCantCastEffect method applies.
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
CastSpellLastTurnWatcher watcher = game.getState().getWatcher(CastSpellLastTurnWatcher.class);
int spellsCast = watcher.getAmountOfSpellsPlayerCastOnCurrentTurn(source.getControllerId());
// If spellsCast is greater the player has already cast a spell after Irencrag Feat
return event.getPlayerId().equals(source.getControllerId()) && spellsCast > start;
}
use of mage.watchers.common.CastSpellLastTurnWatcher in project mage by magefree.
the class MonologueTaxTriggeredAbility method checkTrigger.
@Override
public boolean checkTrigger(GameEvent event, Game game) {
Player player = game.getPlayer(getControllerId());
CastSpellLastTurnWatcher watcher = game.getState().getWatcher(CastSpellLastTurnWatcher.class);
return player != null && watcher != null && player.hasOpponent(event.getPlayerId(), game) && watcher.getAmountOfSpellsPlayerCastOnCurrentTurn(event.getPlayerId()) == 2;
}
use of mage.watchers.common.CastSpellLastTurnWatcher in project mage by magefree.
the class HardenedBerserkerSpellsCostReductionEffect method init.
@Override
public void init(Ability source, Game game) {
super.init(source, game);
CastSpellLastTurnWatcher watcher = game.getState().getWatcher(CastSpellLastTurnWatcher.class);
if (watcher != null) {
spellsCast = watcher.getAmountOfSpellsPlayerCastOnCurrentTurn(source.getControllerId());
}
}
use of mage.watchers.common.CastSpellLastTurnWatcher in project mage by magefree.
the class SaheeliTheGiftedTokenEffect method init.
@Override
public void init(Ability source, Game game) {
super.init(source, game);
CastSpellLastTurnWatcher watcher = game.getState().getWatcher(CastSpellLastTurnWatcher.class);
if (watcher != null) {
spellsCast = watcher.getAmountOfSpellsPlayerCastOnCurrentTurn(source.getControllerId());
}
}
Aggregations