[MKC] Implement Merchant of Truth

This commit is contained in:
PurpleCrowbar 2024-02-17 19:28:23 +00:00
parent 4388b7ac8c
commit 63c65680c8
3 changed files with 76 additions and 2 deletions

View file

@ -28,9 +28,21 @@ public class InvestigateEffect extends OneShotEffect {
}
public InvestigateEffect(DynamicValue amount) {
this(amount, true);
}
public InvestigateEffect(boolean showAbilityHint) {
this(1, showAbilityHint);
}
public InvestigateEffect(int amount, boolean showAbilityHint) {
this(StaticValue.get(amount), showAbilityHint);
}
public InvestigateEffect(DynamicValue amount, boolean showAbilityHint) {
super(Outcome.Benefit);
this.amount = amount;
this.staticText = makeText();
this.staticText = makeText(showAbilityHint);
}
protected InvestigateEffect(final InvestigateEffect effect) {
@ -63,7 +75,10 @@ public class InvestigateEffect extends OneShotEffect {
return new InvestigateEffect(this);
}
private String makeText() {
private String makeText(boolean showAbilityHint) {
if (!showAbilityHint) {
return "investigate";
}
String message;
if (amount instanceof StaticValue) {
int value = ((StaticValue) amount).getValue();