mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
Fixed tooltip text of Resistance Fighter, Crimson Hellkite and Maze of Ith.
This commit is contained in:
parent
90d516f15d
commit
da3936abfb
4 changed files with 30 additions and 10 deletions
|
|
@ -36,6 +36,7 @@ import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.costs.mana.VariableManaCost;
|
import mage.abilities.costs.mana.VariableManaCost;
|
||||||
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -69,13 +70,15 @@ public class CrimsonHellkite extends CardImpl<CrimsonHellkite> {
|
||||||
// Flying
|
// Flying
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
// {X}, {tap}: Crimson Hellkite deals X damage to target creature. Spend only red mana this way.
|
// {X}, {tap}: Crimson Hellkite deals X damage to target creature. Spend only red mana this way.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new ManacostVariableValue()), new ManaCostsImpl("{X}"));
|
Effect effect = new DamageTargetEffect(new ManacostVariableValue());
|
||||||
|
effect.setText("{this} deals X damage to target creature. Spend only red mana this way");
|
||||||
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}"));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
VariableCost variableCost = ability.getManaCostsToPay().getVariableCosts().get(0);
|
VariableCost variableCost = ability.getManaCostsToPay().getVariableCosts().get(0);
|
||||||
if (variableCost instanceof VariableManaCost) {
|
if (variableCost instanceof VariableManaCost) {
|
||||||
((VariableManaCost) variableCost).setFilter(filterRedMana);
|
((VariableManaCost) variableCost).setFilter(filterRedMana);
|
||||||
}
|
}
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent(true));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,17 +28,17 @@
|
||||||
package mage.sets.thedark;
|
package mage.sets.thedark;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Rarity;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.PreventDamageByTargetEffect;
|
import mage.abilities.effects.common.PreventDamageByTargetEffect;
|
||||||
import mage.abilities.effects.common.PreventDamageToTargetEffect;
|
import mage.abilities.effects.common.PreventDamageToTargetEffect;
|
||||||
import mage.abilities.effects.common.UntapTargetEffect;
|
import mage.abilities.effects.common.UntapTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Rarity;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.target.common.TargetAttackingCreature;
|
import mage.target.common.TargetAttackingCreature;
|
||||||
|
|
||||||
|
|
@ -54,9 +54,13 @@ public class MazeOfIth extends CardImpl<MazeOfIth> {
|
||||||
|
|
||||||
// {tap}: Untap target attacking creature. Prevent all combat damage that would be dealt to and dealt by that creature this turn.
|
// {tap}: Untap target attacking creature. Prevent all combat damage that would be dealt to and dealt by that creature this turn.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new TapSourceCost());
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new TapSourceCost());
|
||||||
ability.addEffect(new PreventDamageByTargetEffect(Duration.EndOfTurn, true));
|
Effect effect = new PreventDamageByTargetEffect(Duration.EndOfTurn, true);
|
||||||
ability.addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, Integer.MAX_VALUE, true));
|
effect.setText("Prevent all combat damage that would be dealt to");
|
||||||
ability.addTarget(new TargetAttackingCreature());
|
ability.addEffect(effect);
|
||||||
|
effect = new PreventDamageToTargetEffect(Duration.EndOfTurn, Integer.MAX_VALUE, true);
|
||||||
|
effect.setText("and dealt by that creature this turn");
|
||||||
|
ability.addEffect(effect);
|
||||||
|
ability.addTarget(new TargetAttackingCreature(true));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -80,12 +80,20 @@ public class PreventDamageByTargetEffect extends PreventionEffectImpl<PreventDam
|
||||||
}
|
}
|
||||||
if (amountToPrevent == Integer.MAX_VALUE) {
|
if (amountToPrevent == Integer.MAX_VALUE) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("Prevent all damage target ");
|
sb.append("Prevent all");
|
||||||
|
if (onlyCombat) {
|
||||||
|
sb.append("combat ");
|
||||||
|
}
|
||||||
|
sb.append(" damage target ");
|
||||||
sb.append(mode.getTargets().get(0).getTargetName()).append(" would deal ").append(duration.toString());
|
sb.append(mode.getTargets().get(0).getTargetName()).append(" would deal ").append(duration.toString());
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
} else {
|
} else {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("Prevent the next ").append(amountToPrevent).append(" damage that ");
|
sb.append("Prevent the next ").append(amountToPrevent);
|
||||||
|
if (onlyCombat) {
|
||||||
|
sb.append("combat ");
|
||||||
|
}
|
||||||
|
sb.append(" damage that ");
|
||||||
sb.append(mode.getTargets().get(0).getTargetName()).append(" would deal ").append(duration.toString());
|
sb.append(mode.getTargets().get(0).getTargetName()).append(" would deal ").append(duration.toString());
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,11 @@ public class TargetAttackingCreature extends TargetPermanent<TargetAttackingCrea
|
||||||
this(1, 1, new FilterAttackingCreature(), false);
|
this(1, 1, new FilterAttackingCreature(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TargetAttackingCreature(boolean required) {
|
||||||
|
this(1, 1, new FilterAttackingCreature(), false);
|
||||||
|
this.setRequired(required);
|
||||||
|
}
|
||||||
|
|
||||||
public TargetAttackingCreature(int numTargets) {
|
public TargetAttackingCreature(int numTargets) {
|
||||||
this(numTargets, numTargets, new FilterAttackingCreature(), false);
|
this(numTargets, numTargets, new FilterAttackingCreature(), false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue