From f4587c01ee6e37fc5e2390bf21dd9142c230e91e Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Wed, 26 Aug 2020 16:19:40 -0400
Subject: [PATCH] can't pay can't play

---
 src/interaction/policies/policies.js | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/src/interaction/policies/policies.js b/src/interaction/policies/policies.js
index 56153b9e1c5..080c8f68909 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);
 					}
-- 
GitLab