diff --git a/src/interaction/policies/policies.js b/src/interaction/policies/policies.js index 56153b9e1c5385a56227ab137f6bc5fd8af84807..080c8f68909abb5ff91c84971e63ca5d73d9a51c 100644 --- a/src/interaction/policies/policies.js +++ b/src/interaction/policies/policies.js @@ -144,10 +144,12 @@ globalThis.policy = function(category) { link = App.UI.DOM.link( "Repeal", () => { - _.set(V, policyVariable, 0); - applyCost(); - if (p.hasOwnProperty("onRepeal")) { - p.onRepeal(); + if (V.rep > 1000) { + _.set(V, policyVariable, 0); + applyCost(); + if (p.hasOwnProperty("onRepeal")) { + p.onRepeal(); + } } policy(category); } @@ -177,10 +179,12 @@ globalThis.policy = function(category) { link = App.UI.DOM.link( "Implement", () => { - _.set(V, policyVariable, enable); - applyCost(); - if (p.hasOwnProperty("onImplementation")) { - p.onImplementation(); + if (V.rep > 1000) { + _.set(V, policyVariable, enable); + applyCost(); + if (p.hasOwnProperty("onImplementation")) { + p.onImplementation(); + } } policy(category); }