mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 04:09:54 -08:00
[AVR] Second Guest + tests. Refactored filters.
This commit is contained in:
parent
3fac42fc3c
commit
32e29392d2
184 changed files with 823 additions and 562 deletions
|
|
@ -92,7 +92,7 @@ class BogGnarrTriggeredAbility extends TriggeredAbilityImpl<BogGnarrTriggeredAbi
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.SPELL_CAST) {
|
||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||
if (spell != null && filter.match(spell)) {
|
||||
if (spell != null && filter.match(spell, game)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,15 +27,12 @@
|
|||
*/
|
||||
package mage.sets.apocalypse;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SpellCastTriggeredAbility;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
|
|
@ -43,6 +40,8 @@ import mage.game.Game;
|
|||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
*/
|
||||
|
|
@ -90,7 +89,7 @@ class GladeGnarrTriggeredAbility extends TriggeredAbilityImpl<GladeGnarrTriggere
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.SPELL_CAST) {
|
||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||
if (spell != null && filter.match(spell)) {
|
||||
if (spell != null && filter.match(spell, game)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class TranquilPathEffect extends OneShotEffect<TranquilPathEffect> {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter)) {
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, game)) {
|
||||
permanent.destroy(source.getId(), game, false);
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue