Skip to content

Commit

Permalink
Revert "add a verify check"
Browse files Browse the repository at this point in the history
This reverts commit e7de47a.
  • Loading branch information
xenohedron committed Nov 18, 2024
1 parent 8d63d54 commit 93e7686
Showing 1 changed file with 3 additions and 35 deletions.
38 changes: 3 additions & 35 deletions Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
import mage.MageObject;
import mage.Mana;
import mage.ObjectColor;
import mage.abilities.*;
import mage.abilities.Ability;
import mage.abilities.AbilityImpl;
import mage.abilities.Mode;
import mage.abilities.common.*;
import mage.abilities.condition.Condition;
import mage.abilities.costs.Cost;
Expand Down Expand Up @@ -34,7 +36,6 @@
import mage.game.command.Dungeon;
import mage.game.command.Plane;
import mage.game.draft.DraftCube;
import mage.game.events.GameEvent;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.TokenImpl;
import mage.game.permanent.token.custom.CreatureToken;
Expand Down Expand Up @@ -62,7 +63,6 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
* @author JayDi85
Expand Down Expand Up @@ -1718,10 +1718,6 @@ private void compareClassRecursive(Object obj1, Object obj2, Card originalCard,
}
}

if (obj1 instanceof Ability) {
checkAbility(originalCard, (Ability) obj1, msg);
}

//System.out.println(msg);
Class class1 = obj1.getClass();
Class class2 = obj2.getClass();
Expand Down Expand Up @@ -1856,34 +1852,6 @@ private void compareClassRecursive(Object obj1, Object obj2, Card originalCard,
}
}

// One (fake) event per batch event type
private static final Set<GameEvent> fakeBatchEvents;

static {
fakeBatchEvents = Stream
.of(GameEvent.EventType.values())
.filter(GameEvent.EventType::isBatch)
.map(eventType -> new GameEvent(eventType, null, null, null))
.collect(Collectors.toSet());
}

/**
* Perform checks on abilities
*/
private void checkAbility(Card originalCard, Ability ability, String msg) {
if (ability instanceof TriggeredAbility) {
// Checks that non-batched triggered ability don't accept batch events.
if (!(ability instanceof BatchTriggeredAbility)) {
for (GameEvent event : fakeBatchEvents) {
if (((TriggeredAbility) ability).checkEventType(event, null)) {
fail(originalCard, "checkAbility", "unexpected non-BatchTriggeredAbility accepting "
+ event.getType() + " " + msg + "<" + ability.getClass() + ">");
}
}
}
}
}

private void checkSubtypes(Card card, MtgJsonCard ref) {
if (skipListHaveName(SKIP_LIST_SUBTYPE, card.getExpansionSetCode(), card.getName())) {
return;
Expand Down

0 comments on commit 93e7686

Please sign in to comment.