stealing action auto-fails if amount is 0

This commit is contained in:
Nicole O'Connor 2025-08-05 18:00:26 -07:00
parent 1b72e899af
commit 5526098a05

View File

@ -121,7 +121,7 @@ async function steal_resource(resource, amount, items) {
.then(res => { return res.json(); }) .then(res => { return res.json(); })
.catch(e => { throw e; }); .catch(e => { throw e; });
if (stealdata["success"]) { if (stealdata["success"] && amount > 0) {
gamestate[resource] += amount; gamestate[resource] += amount;
record_log("Stole " + resource + " from a human: " + items.join(", ")); record_log("Stole " + resource + " from a human: " + items.join(", "));
} }