Skip to content

Commit 7da958c

Browse files
committed
loops: fix accept donations
1 parent 3f9feb4 commit 7da958c

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

loops/actionList.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3463,6 +3463,12 @@ Action.AcceptDonations = new Action("Accept Donations", {
34633463
Spd: 0.3,
34643464
Luck: 0.4
34653465
},
3466+
canStart() {
3467+
return resources.reputation > 0;
3468+
},
3469+
cost() {
3470+
addResource("reputation", -1);
3471+
},
34663472
manaCost() {
34673473
return 2000;
34683474
},
@@ -3473,8 +3479,10 @@ Action.AcceptDonations = new Action("Accept Donations", {
34733479
return towns[4].getLevel("Canvassed") >= 5;
34743480
},
34753481
finish() {
3476-
addResource("gold", 20);
3477-
addResource("reputation", -1);
3482+
towns[4].finishRegular(this.varName, 5, () => {
3483+
addResource("gold", 20);
3484+
return 20;
3485+
});
34783486
},
34793487
});
34803488

loops/lang/en-EN/game.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,7 @@
17401740
<info_text2>Meaningful donations total</info_text2>
17411741
<info_text3>Donations to check for value</info_text3>
17421742
<tooltip><![CDATA[
1743-
After doing some canvassing for the local charity, you're now able to accept some donations on their behalf, since you know the routine.<br>Costs 1 reputation.<br>Meaningful donations are worth 20 gold each.<br>Every 5 donations is worth a meaningful amount.
1743+
After doing some canvassing for the local charity, you're now able to accept some donations on their behalf, since you know the routine.<br>Costs 1 reputation.<br>Requires a reputation above 0.<br>Meaningful donations are worth 20 gold each.<br>Every 5 donations is worth a meaningful amount.
17441744
]]></tooltip>
17451745
<!--TODO: give this action story-->
17461746
</accept_donations>

0 commit comments

Comments
 (0)