mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 06:22:01 -08:00
Fixed bug of Mutilate and Ichor Explosion not locking in the dynamic values.
This commit is contained in:
parent
c8a5596510
commit
d178a774f3
2 changed files with 25 additions and 13 deletions
|
|
@ -50,6 +50,7 @@ public class BoostAllEffect extends ContinuousEffectImpl<BoostAllEffect> {
|
|||
protected DynamicValue toughness;
|
||||
protected boolean excludeSource;
|
||||
protected FilterCreaturePermanent filter;
|
||||
protected boolean lockedInPT;
|
||||
|
||||
public BoostAllEffect(int power, int toughness, Duration duration) {
|
||||
this(power, toughness, duration, new FilterCreaturePermanent(), false);
|
||||
|
|
@ -68,21 +69,26 @@ public class BoostAllEffect extends ContinuousEffectImpl<BoostAllEffect> {
|
|||
}
|
||||
|
||||
public BoostAllEffect(DynamicValue power, DynamicValue toughness, Duration duration, FilterCreaturePermanent filter, boolean excludeSource) {
|
||||
super(duration, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, isCanKill(toughness) ? Outcome.UnboostCreature : Outcome.BoostCreature);
|
||||
this.power = power;
|
||||
this.toughness = toughness;
|
||||
this.filter = filter;
|
||||
this.excludeSource = excludeSource;
|
||||
setText();
|
||||
this(power, toughness, duration, filter, excludeSource, null);
|
||||
}
|
||||
|
||||
|
||||
public BoostAllEffect(DynamicValue power, DynamicValue toughness, Duration duration, FilterCreaturePermanent filter, boolean excludeSource, String rule) {
|
||||
this(power, toughness, duration, filter, excludeSource, null, false);
|
||||
}
|
||||
|
||||
public BoostAllEffect(DynamicValue power, DynamicValue toughness, Duration duration, FilterCreaturePermanent filter, boolean excludeSource, String rule, boolean lockedInPT) {
|
||||
super(duration, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, isCanKill(toughness) ? Outcome.UnboostCreature : Outcome.BoostCreature);
|
||||
this.power = power;
|
||||
this.toughness = toughness;
|
||||
this.filter = filter;
|
||||
this.excludeSource = excludeSource;
|
||||
this.staticText = rule;
|
||||
|
||||
this.lockedInPT = lockedInPT;
|
||||
if (rule == null) {
|
||||
setText();
|
||||
} else {
|
||||
this.staticText = rule;
|
||||
}
|
||||
}
|
||||
|
||||
public BoostAllEffect(final BoostAllEffect effect) {
|
||||
|
|
@ -91,7 +97,7 @@ public class BoostAllEffect extends ContinuousEffectImpl<BoostAllEffect> {
|
|||
this.toughness = effect.toughness;
|
||||
this.filter = effect.filter.copy();
|
||||
this.excludeSource = effect.excludeSource;
|
||||
this.staticText = effect.staticText;
|
||||
this.lockedInPT = effect.lockedInPT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -109,6 +115,10 @@ public class BoostAllEffect extends ContinuousEffectImpl<BoostAllEffect> {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (lockedInPT) {
|
||||
power = new StaticValue(power.calculate(game, source));
|
||||
toughness = new StaticValue(toughness.calculate(game, source));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue