mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
- Reverted some changes that broke Protective Sphere. #5746
This commit is contained in:
parent
7ea7cf6c18
commit
d6b9d14f97
1 changed files with 11 additions and 7 deletions
|
@ -52,20 +52,20 @@ public final class ProtectiveSphere extends CardImpl {
|
||||||
class ProtectiveSphereEffect extends PreventionEffectImpl {
|
class ProtectiveSphereEffect extends PreventionEffectImpl {
|
||||||
|
|
||||||
private final TargetSource target;
|
private final TargetSource target;
|
||||||
private Mana manaUsed;
|
private static Mana manaUsed;
|
||||||
private List<ObjectColor> colorsOfChosenSource = new ArrayList<>();
|
private static List<ObjectColor> colorsOfChosenSource = new ArrayList<>();
|
||||||
|
|
||||||
public ProtectiveSphereEffect() {
|
public ProtectiveSphereEffect() {
|
||||||
super(Duration.EndOfTurn, Integer.MAX_VALUE, false, false);
|
super(Duration.EndOfTurn, Integer.MAX_VALUE, false, false);
|
||||||
this.staticText = "Prevent all damage that would be dealt to you this turn by a source of your choice that shares a color with the mana spent on this activation cost.";
|
this.staticText = "Prevent all damage that would be dealt to you "
|
||||||
|
+ "this turn by a source of your choice that shares a color "
|
||||||
|
+ "with the mana spent on this activation cost.";
|
||||||
this.target = new TargetSource();
|
this.target = new TargetSource();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProtectiveSphereEffect(final ProtectiveSphereEffect effect) {
|
public ProtectiveSphereEffect(final ProtectiveSphereEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
this.target = effect.target.copy();
|
this.target = effect.target.copy();
|
||||||
manaUsed = effect.manaUsed.copy();
|
|
||||||
colorsOfChosenSource = effect.colorsOfChosenSource;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -81,8 +81,12 @@ class ProtectiveSphereEffect extends PreventionEffectImpl {
|
||||||
Permanent protectiveSphere = game.getPermanent(source.getSourceId());
|
Permanent protectiveSphere = game.getPermanent(source.getSourceId());
|
||||||
if (controller != null
|
if (controller != null
|
||||||
&& protectiveSphere != null) {
|
&& protectiveSphere != null) {
|
||||||
game.getState().setValue("ProtectiveSphere" + source.getSourceId().toString(), source.getManaCostsToPay().getUsedManaToPay()); //store the mana used to pay
|
game.getState().setValue("ProtectiveSphere"
|
||||||
protectiveSphere.addInfo("MANA USED", CardUtil.addToolTipMarkTags("Last mana used for protective ability: " + source.getManaCostsToPay().getUsedManaToPay()), game);
|
+ source.getSourceId().toString(),
|
||||||
|
source.getManaCostsToPay().getUsedManaToPay()); //store the mana used to pay
|
||||||
|
protectiveSphere.addInfo("MANA USED",
|
||||||
|
CardUtil.addToolTipMarkTags("Last mana used for protective ability: "
|
||||||
|
+ source.getManaCostsToPay().getUsedManaToPay()), game);
|
||||||
}
|
}
|
||||||
this.target.choose(Outcome.PreventDamage, source.getControllerId(), source.getSourceId(), game);
|
this.target.choose(Outcome.PreventDamage, source.getControllerId(), source.getSourceId(), game);
|
||||||
super.init(source, game);
|
super.init(source, game);
|
||||||
|
|
Loading…
Reference in a new issue