summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-10-12 16:10:55 +0200
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-10-12 16:10:55 +0200
commit655d4cb31abca1f377ea7b71e87a122f4d6f5528 (patch)
tree3cfa0c31020515ae834533a4a4d757152dd20b15 /rules.js
parentb19d26cfcb0a3d28802554edc7510257917f2a43 (diff)
downloadalgeria-655d4cb31abca1f377ea7b71e87a122f4d6f5528.tar.gz
build cost fix
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/rules.js b/rules.js
index 5ac85a6..844315d 100644
--- a/rules.js
+++ b/rules.js
@@ -1912,12 +1912,9 @@ function build_fln_unit(type, where) {
log(`Built U${u} in A${where}`)
set_unit_loc(u, where)
set_unit_box(u, UG)
- let cost = build_cost(type, where)
+ let cost = build_cost(where)
game.fln_ap -= cost
log(`>Paid ${cost} AP`)
- if (game.fln_ap < 0) {
- throw new Error("ASSERT game.fln_ap < 0")
- }
}
function convert_fln_unit(u, type) {
@@ -1930,9 +1927,6 @@ function convert_fln_unit(u, type) {
let cost = convert_cost(type)
game.fln_ap -= cost
log(`>Paid ${cost} AP`)
- if (game.fln_ap < 0) {
- throw new Error("ASSERT game.fln_ap < 0")
- }
}
states.fln_reinforcement = {