[LTC] Implement Champions of Minas Tirith (#10726)

repurposed (and renamed) CantAttackYouEffect.java, that was actually not used.
This commit is contained in:
Susucre 2023-08-05 03:20:55 +02:00 committed by GitHub
parent 9bff5000e0
commit 9979208f05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 141 additions and 22 deletions

View file

@ -30,21 +30,25 @@ public class DoIfCostPaid extends OneShotEffect {
}
public DoIfCostPaid(Effect effectOnPaid, Effect effectOnNotPaid, Cost cost, boolean optional) {
this(effectOnPaid, cost, null, optional);
if (effectOnNotPaid != null) {
this.otherwiseEffects.add(effectOnNotPaid);
}
this(effectOnPaid, effectOnNotPaid, cost, null, optional);
}
public DoIfCostPaid(Effect effectOnPaid, Cost cost, String chooseUseText) {
this(effectOnPaid, cost, chooseUseText, true);
this(effectOnPaid, null, cost, chooseUseText, true);
}
public DoIfCostPaid(Effect effectOnPaid, Cost cost, String chooseUseText, boolean optional) {
this(effectOnPaid, null, cost, chooseUseText, optional);
}
public DoIfCostPaid(Effect effectOnPaid, Effect effectOnNotPaid, Cost cost, String chooseUseText, boolean optional) {
super(Outcome.Benefit);
if (effectOnPaid != null) {
this.executingEffects.add(effectOnPaid);
}
if (effectOnNotPaid != null) {
this.otherwiseEffects.add(effectOnNotPaid);
}
this.cost = cost;
this.chooseUseText = chooseUseText;
this.optional = optional;
@ -149,7 +153,7 @@ public class DoIfCostPaid extends OneShotEffect {
public Cost getCost() {
return cost;
}
@Override
public String getText(Mode mode) {
if (!staticText.isEmpty()) {