Skip to content

Commit

Permalink
refactor: replacement effects don't use apply method now (#11484)
Browse files Browse the repository at this point in the history
  • Loading branch information
xenohedron authored Nov 28, 2023
1 parent 8ad3238 commit 05e2cf1
Show file tree
Hide file tree
Showing 275 changed files with 165 additions and 1,539 deletions.
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/a/AbandonedSarcophagus.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,6 @@ public AbandonedSarcophagusReplacementEffect copy() {
return new AbandonedSarcophagusReplacementEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player controller = game.getPlayer(source.getControllerId());
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/a/Abundance.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ public AbundanceReplacementEffect copy() {
return new AbundanceReplacementEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player controller = game.getPlayer(event.getPlayerId());
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/a/AcolytesReward.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ public void init(Ability source, Game game) {
amount = DevotionCount.W.calculate(game, source, this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
boolean result = false;
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/a/AegisOfHonor.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ private AegisOfHonorEffect(final AegisOfHonorEffect card) {
}


@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.DAMAGE_PLAYER;
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/a/AlhammarretsArchive.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ public AlhammarretsArchiveReplacementEffect copy() {
return new AlhammarretsArchiveReplacementEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player controller = game.getPlayer(source.getControllerId());
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/a/AlmsCollector.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ public AlmsCollectorReplacementEffect copy() {
return new AlmsCollectorReplacementEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player controller = game.getPlayer(source.getControllerId());
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/a/AnafenzaTheForemost.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ public AnafenzaTheForemostEffect copy() {
return new AnafenzaTheForemostEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player controller = game.getPlayer(source.getControllerId());
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/a/AnthemOfRakdos.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ public boolean applies(GameEvent event, Ability source, Game game) {
return game.getControllerId(event.getSourceId()).equals(source.getControllerId()) && HellbentCondition.instance.apply(game, source);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
event.setAmount(CardUtil.overflowMultiply(event.getAmount(), 2));
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/a/ArchmageAscension.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ public ArchmageAscensionReplacementEffect copy() {
return new ArchmageAscensionReplacementEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player player = game.getPlayer(event.getPlayerId());
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/a/ArchonOfCoronation.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ public boolean applies(GameEvent event, Ability source, Game game) {
&& source.isControlledBy(game.getMonarchId());
}

@Override
public boolean apply(Game game, Ability source) {
return false;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
event.setAmount(0);
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/a/ArlinnThePacksHope.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ public boolean applies(GameEvent event, Ability source, Game game) {
return permanent != null && permanent.isControlledBy(source.getControllerId()) && permanent.isCreature(game);
}

@Override
public boolean apply(Game game, Ability source) {
return false;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Permanent target = ((EntersTheBattlefieldEvent) event).getTarget();
Expand Down
10 changes: 0 additions & 10 deletions Mage.Sets/src/mage/cards/a/AvacynGuardianAngel.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,6 @@ private AvacynGuardianAngelPreventToCreaturePreventionEffect(AvacynGuardianAngel
this.color = effect.color;
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (!super.applies(event, source, game)
Expand Down Expand Up @@ -175,11 +170,6 @@ private AvacynGuardianAngelPreventToPlayerPreventionEffect(AvacynGuardianAngelPr
this.color = effect.color;
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (!super.applies(event, source, game) || !event.getTargetId().equals(getTargetPointer().getFirst(game, source))) {
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/b/BarbarianClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,6 @@ public boolean applies(GameEvent event, Ability source, Game game) {
return source.isControlledBy(event.getPlayerId());
}

@Override
public boolean apply(Game game, Ability source) {
return false;
}

@Override
public BarbarianClassEffect copy() {
return new BarbarianClassEffect(this);
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/b/BenevolentUnicorn.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ public BenevolentUnicornEffect copy() {
return new BenevolentUnicornEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
event.setAmount(event.getAmount() - 1);
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/b/BewitchingLeechcraft.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,6 @@ public boolean replaceEvent(GameEvent event, Ability source, Game game) {
return !permanentUntapping.getCounters(game).removeCounter(CounterType.P1P1, 1);
}

@Override
public boolean apply(Game game, Ability source) {
return false;
}

@Override
public boolean applies(GameEvent event, Ability source, Game game) {
return game.getTurnStepType() == PhaseStep.UNTAP
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/b/Biophagus.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,6 @@ public boolean applies(GameEvent event, Ability source, Game game) {
return permanent != null && mor.refersTo(permanent, game);
}

@Override
public boolean apply(Game game, Ability source) {
return false;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Permanent target = ((EntersTheBattlefieldEvent) event).getTarget();
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/b/BitterFeud.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,6 @@ public boolean applies(GameEvent event, Ability source, Game game) {
&& !sourcePlayerId.equals(targetPlayerId);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
event.setAmount(CardUtil.overflowMultiply(event.getAmount(), 2));
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/b/BloodOfTheMartyr.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.DAMAGE_PERMANENT;
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player controller = game.getPlayer(source.getControllerId());
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/b/BloodScrivener.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ public BloodScrivenerReplacementEffect copy() {
return new BloodScrivenerReplacementEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player player = game.getPlayer(event.getPlayerId());
Expand Down
6 changes: 0 additions & 6 deletions Mage.Sets/src/mage/cards/b/BloodletterOfAclazotz.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ public BloodletterOfAclazotzEffect copy() {
return new BloodletterOfAclazotzEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
event.setAmount(CardUtil.overflowMultiply(event.getAmount(), 2));
Expand All @@ -85,4 +80,3 @@ public boolean applies(GameEvent event, Ability source, Game game) {
&& game.getOpponents(source.getControllerId()).contains(event.getPlayerId());
}
}

5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/b/BoonReflection.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ public BoonReflectionEffect copy() {
return new BoonReflectionEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
event.setAmount(CardUtil.overflowMultiply(event.getAmount(), 2));
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/b/BorealOutrider.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ public boolean applies(GameEvent event, Ability source, Game game) {
return spell != null && event.getTargetId().equals(spell.getCard().getId());
}

@Override
public boolean apply(Game game, Ability source) {
return false;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget();
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/b/BraceForImpact.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ public BraceForImpactPreventDamageTargetEffect copy() {
return new BraceForImpactPreventDamageTargetEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
GameEvent preventEvent = new PreventDamageEvent(event.getTargetId(), source.getSourceId(), source, source.getControllerId(), event.getAmount(), ((DamageEvent) event).isCombatDamage());
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/b/BranchingEvolution.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,6 @@ public boolean applies(GameEvent event, Ability source, Game game) {
return false;
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public BranchingEvolutionEffect copy() {
return new BranchingEvolutionEffect(this);
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/b/BreathstealersCrypt.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ public BreathstealersCryptEffect copy() {
return new BreathstealersCryptEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player player = game.getPlayer(event.getPlayerId());
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/b/BruvacTheGrandiloquent.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ public BruvacTheGrandiloquentReplacementEffect copy() {
return new BruvacTheGrandiloquentReplacementEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.MILL_CARDS;
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/c/CallousGiant.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ public CallousGiantEffect copy() {
return new CallousGiantEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
if(event.getAmount() <= 3)
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/c/CandlesGlow.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ public CandlesGlowPreventDamageTargetEffect copy() {
return new CandlesGlowPreventDamageTargetEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
GameEvent preventEvent = new PreventDamageEvent(event.getTargetId(), source.getSourceId(), source, source.getControllerId(), event.getAmount(), ((DamageEvent) event).isCombatDamage());
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/c/ChainsOfMephistopheles.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ public ChainsOfMephistophelesReplacementEffect copy() {
return new ChainsOfMephistophelesReplacementEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player player = game.getPlayer(event.getPlayerId());
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/c/ChannelHarm.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ public ChannelHarmEffect copy() {
return new ChannelHarmEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player sourceController = game.getPlayer(source.getControllerId());
Expand Down
5 changes: 0 additions & 5 deletions Mage.Sets/src/mage/cards/c/ChaosMoon.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,6 @@ public ChaosMoonEvenReplacementEffect copy() {
return new ChaosMoonEvenReplacementEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
return true;
}

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
ManaEvent manaEvent = (ManaEvent) event;
Expand Down
Loading

0 comments on commit 05e2cf1

Please sign in to comment.