mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Added an additional parameter to BecomesBasicLandTargetEffect to allow it to keep it's other land types; Updated Aquitect's Will to actually make the card an island, not just granting it the mana ability
This commit is contained in:
parent
6d036a6085
commit
e5ef66a3cf
2 changed files with 27 additions and 10 deletions
|
@ -33,6 +33,7 @@ import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||||
import mage.abilities.mana.BlueManaAbility;
|
import mage.abilities.mana.BlueManaAbility;
|
||||||
|
@ -64,10 +65,7 @@ public class AquitectsWill extends CardImpl {
|
||||||
this.getSpellAbility().addTarget(new TargetLandPermanent());
|
this.getSpellAbility().addTarget(new TargetLandPermanent());
|
||||||
|
|
||||||
// Add the Flood counter effect
|
// Add the Flood counter effect
|
||||||
Effect effect = new AquitectsWillGainAbilityEffect(
|
this.getSpellAbility().addEffect(new AquitectsWillEffect(Duration.Custom, false, false, "Island"));
|
||||||
new BlueManaAbility(),
|
|
||||||
Duration.Custom, rule);
|
|
||||||
this.getSpellAbility().addEffect(effect);
|
|
||||||
|
|
||||||
// Draw if you control a Merfolk
|
// Draw if you control a Merfolk
|
||||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||||
|
@ -86,13 +84,13 @@ public class AquitectsWill extends CardImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AquitectsWillGainAbilityEffect extends GainAbilityTargetEffect {
|
class AquitectsWillEffect extends BecomesBasicLandTargetEffect {
|
||||||
|
|
||||||
public AquitectsWillGainAbilityEffect(Ability ability, Duration duration, String rule) {
|
public AquitectsWillEffect(Duration duration, boolean chooseLandType, boolean loseType, String... landNames) {
|
||||||
super(ability, duration, rule);
|
super(duration, chooseLandType, loseType, landNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AquitectsWillGainAbilityEffect(final AquitectsWillGainAbilityEffect effect) {
|
public AquitectsWillEffect(final AquitectsWillEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +104,7 @@ class AquitectsWillGainAbilityEffect extends GainAbilityTargetEffect {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AquitectsWillGainAbilityEffect copy() {
|
public AquitectsWillEffect copy() {
|
||||||
return new AquitectsWillGainAbilityEffect(this);
|
return new AquitectsWillEffect(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -59,6 +59,7 @@ public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
protected boolean chooseLandType;
|
protected boolean chooseLandType;
|
||||||
protected ArrayList<String> landTypes = new ArrayList();
|
protected ArrayList<String> landTypes = new ArrayList();
|
||||||
|
protected boolean loseOther; // loses all other abilities, card types, and creature types
|
||||||
|
|
||||||
public BecomesBasicLandTargetEffect(Duration duration) {
|
public BecomesBasicLandTargetEffect(Duration duration) {
|
||||||
this(duration, true, new String[0]);
|
this(duration, true, new String[0]);
|
||||||
|
@ -69,10 +70,15 @@ public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
public BecomesBasicLandTargetEffect(Duration duration, boolean chooseLandType, String... landNames) {
|
public BecomesBasicLandTargetEffect(Duration duration, boolean chooseLandType, String... landNames) {
|
||||||
|
this(duration, chooseLandType, true, landNames);
|
||||||
|
}
|
||||||
|
|
||||||
|
public BecomesBasicLandTargetEffect(Duration duration, boolean chooseLandType, boolean loseOther, String... landNames) {
|
||||||
super(duration, Outcome.Detriment);
|
super(duration, Outcome.Detriment);
|
||||||
this.landTypes.addAll(Arrays.asList(landNames));
|
this.landTypes.addAll(Arrays.asList(landNames));
|
||||||
this.chooseLandType = chooseLandType;
|
this.chooseLandType = chooseLandType;
|
||||||
this.staticText = setText();
|
this.staticText = setText();
|
||||||
|
this.loseOther = loseOther;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,6 +111,19 @@ public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl {
|
||||||
this.discard();
|
this.discard();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!loseOther) {
|
||||||
|
for (UUID targetPermanent : targetPointer.getTargets(game, source)) {
|
||||||
|
Permanent land = game.getPermanent(targetPermanent);
|
||||||
|
if (land != null) {
|
||||||
|
for(String type : land.getSubtype()) {
|
||||||
|
if(!landTypes.contains(type)) {
|
||||||
|
landTypes.add(type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue