fixed implementation of Cradle of Vitality (fixes #6428)

This commit is contained in:
Evan Kranzler 2020-04-20 17:51:50 -04:00
parent 506b734235
commit 1f85dcb334
3 changed files with 27 additions and 60 deletions

View file

@ -167,4 +167,7 @@ public class Effects extends ArrayList<Effect> {
}
}
public void setValue(String key, Object value) {
this.stream().forEach(effect -> effect.setValue(key, value));
}
}

View file

@ -167,6 +167,13 @@ public class DoIfCostPaid extends OneShotEffect {
return sb.append(costText).toString();
}
@Override
public void setValue(String key, Object value) {
super.setValue(key, value);
this.executingEffects.setValue(key, value);
this.otherwiseEffects.setValue(key, value);
}
@Override
public DoIfCostPaid copy() {
return new DoIfCostPaid(this);