mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
Fix perpetual use toughness as power of Walking bulwark (#10138)
* attempted fix * super constructors work like this? * better use of super and java * try this again * fix un-needed code * remove commented code * missed some * Simplify Constructors
This commit is contained in:
parent
171f0a238b
commit
e8892badf1
2 changed files with 8 additions and 3 deletions
|
@ -92,7 +92,7 @@ class WalkingBulwarkEffect extends OneShotEffect {
|
|||
game.addEffect(new CanAttackAsThoughItDidntHaveDefenderTargetEffect(Duration.EndOfTurn), source);
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
filter.add(new MageObjectReferencePredicate(permanent, game));
|
||||
game.addEffect(new CombatDamageByToughnessEffect(filter, false), source);
|
||||
game.addEffect(new CombatDamageByToughnessEffect(filter, false, Duration.EndOfTurn), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,11 +20,17 @@ public class CombatDamageByToughnessEffect extends ContinuousEffectImpl {
|
|||
private final FilterCreaturePermanent filter;
|
||||
private final boolean onlyControlled;
|
||||
|
||||
|
||||
public CombatDamageByToughnessEffect(FilterCreaturePermanent filter, boolean onlyControlled) {
|
||||
super(Duration.WhileOnBattlefield, Layer.RulesEffects, SubLayer.NA, Outcome.Detriment);
|
||||
this(filter, onlyControlled, Duration.WhileOnBattlefield);
|
||||
}
|
||||
|
||||
public CombatDamageByToughnessEffect(FilterCreaturePermanent filter, boolean onlyControlled, Duration duration) {
|
||||
super(duration, Layer.RulesEffects, SubLayer.NA, Outcome.Detriment);
|
||||
this.filter = filter;
|
||||
this.onlyControlled = onlyControlled;
|
||||
}
|
||||
|
||||
|
||||
private CombatDamageByToughnessEffect(final CombatDamageByToughnessEffect effect) {
|
||||
super(effect);
|
||||
|
@ -39,7 +45,6 @@ public class CombatDamageByToughnessEffect extends ContinuousEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
// Change the rule
|
||||
FilterCreaturePermanent filterPermanent;
|
||||
if (onlyControlled) {
|
||||
filterPermanent = filter.copy();
|
||||
|
|
Loading…
Reference in a new issue