mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[40K] Fixed Abaddon the Despoiler and enabled test (fixes #9490)
This commit is contained in:
parent
ba7e9f8600
commit
48df6902e1
3 changed files with 11 additions and 7 deletions
|
@ -1,6 +1,7 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.MyTurnCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
|
@ -73,14 +74,18 @@ public final class AbaddonTheDespoiler extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
enum AbaddonTheDespoilerPredicate implements Predicate<StackObject> {
|
||||
enum AbaddonTheDespoilerPredicate implements Predicate<MageObject> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(StackObject input, Game game) {
|
||||
return input.getManaValue() <= game
|
||||
public boolean apply(MageObject input, Game game) {
|
||||
if (!(input instanceof StackObject)) {
|
||||
return false;
|
||||
}
|
||||
StackObject stackObject = (StackObject) input;
|
||||
return stackObject.getManaValue() <= game
|
||||
.getState()
|
||||
.getWatcher(PlayerLostLifeWatcher.class)
|
||||
.getAllOppLifeLost(input.getControllerId(), game);
|
||||
.getAllOppLifeLost(stackObject.getControllerId(), game);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package org.mage.test.cards.single._40k;
|
|||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
|
@ -17,10 +16,10 @@ public class AbaddonTheDespoilerTest extends CardTestPlayerBase {
|
|||
/**
|
||||
* Reported bug: https://github.com/magefree/mage/issues/9490
|
||||
*/
|
||||
@Ignore
|
||||
@Test
|
||||
public void cascadeWorks() {
|
||||
String lightningBolt = "Lightning Bolt";
|
||||
addCard(Zone.BATTLEFIELD, playerA, abaddonTheDespoiler);
|
||||
addCard(Zone.HAND, playerA, lightningBolt, 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||
addCard(Zone.LIBRARY, playerA, "Crimson Kobolds"); // {0}
|
||||
|
@ -31,6 +30,7 @@ public class AbaddonTheDespoilerTest extends CardTestPlayerBase {
|
|||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, lightningBolt, playerB);
|
||||
setChoice(playerA, true); // Cast with Cascade
|
||||
|
||||
setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
|
||||
execute();
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package mage.abilities.effects;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.MageSingleton;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterObject;
|
||||
|
|
Loading…
Reference in a new issue