mirror of
https://github.com/correl/mage.git
synced 2024-12-24 03:00:14 +00:00
[LRW] added back previously failing test for Aquitect's Will
This commit is contained in:
parent
20968c299c
commit
4db47adc19
2 changed files with 12 additions and 27 deletions
|
@ -1,13 +1,15 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.abilities.mana.BlueManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
|
@ -17,12 +19,10 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.mana.BlueManaAbility;
|
||||
|
||||
/**
|
||||
* @author ilcartographer
|
||||
|
@ -63,26 +63,21 @@ public final class AquitectsWill extends CardImpl {
|
|||
class AquitectsWillEffect extends ContinuousEffectImpl {
|
||||
|
||||
AquitectsWillEffect() {
|
||||
super(Duration.EndOfGame, Outcome.Benefit);
|
||||
super(Duration.EndOfGame, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit);
|
||||
staticText = "That land is an Island in addition to its other types for as long as it has a flood counter on it";
|
||||
}
|
||||
|
||||
AquitectsWillEffect(final AquitectsWillEffect effect) {
|
||||
private AquitectsWillEffect(final AquitectsWillEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AquitectsWillEffect copy() {
|
||||
return new AquitectsWillEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent land = game.getPermanent(this.targetPointer.getFirst(game, source));
|
||||
if (land == null
|
||||
|| land.getCounters(game).getCount(CounterType.FLOOD) < 1) {
|
||||
|
@ -90,22 +85,13 @@ class AquitectsWillEffect extends ContinuousEffectImpl {
|
|||
return false;
|
||||
}
|
||||
// The land is an island intrinsically so the ability is added at layer 4, not layer 6
|
||||
if (land.getCounters(game).getCount(CounterType.FLOOD) > 0) {
|
||||
switch (layer) {
|
||||
case TypeChangingEffects_4:
|
||||
land.addSubType(game, SubType.ISLAND);
|
||||
land.addAbility(new BlueManaAbility(), source.getSourceId(), game);
|
||||
break;
|
||||
}
|
||||
land.addSubType(game, SubType.ISLAND);
|
||||
if (!land.getAbilities(game).containsClass(BlueManaAbility.class)) {
|
||||
land.addAbility(new BlueManaAbility(), source.getSourceId(), game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasLayer(Layer layer) {
|
||||
return layer == Layer.TypeChangingEffects_4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<UUID> isDependentTo(List<ContinuousEffect> allEffectsInLayer) {
|
||||
return allEffectsInLayer
|
||||
|
|
|
@ -18,7 +18,6 @@ public class AquitectsWillTest extends CardTestPlayerBase {
|
|||
private static final String recall = "Ancestral Recall";
|
||||
private static final String hexmage = "Vampire Hexmage";
|
||||
|
||||
@Ignore // TODO: this test currently fails, the mana option is there but can't be selected for some reason
|
||||
@Test
|
||||
public void testProduceBlueDuringCast() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island");
|
||||
|
|
Loading…
Reference in a new issue