summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteisuru <31881306+teisuru@users.noreply.github.com>2023-06-07 10:21:42 +0200
committerTor Andersson <tor@ccxvii.net>2023-12-10 18:16:55 +0100
commit6e98cdea8fa7ddedf123a77710d96a8c4cfe37cc (patch)
treeaae91e964770e0c6693dce980bfdebb215d1722d
parent3e24cfcfab744851010f112d0084a5fd87faa684 (diff)
downloadplantagenet-6e98cdea8fa7ddedf123a77710d96a8c4cfe37cc.tar.gz
Added autumn
-rw-r--r--play.js7
-rw-r--r--rules.js12
2 files changed, 12 insertions, 7 deletions
diff --git a/play.js b/play.js
index ce8f490..2a7ac97 100644
--- a/play.js
+++ b/play.js
@@ -192,22 +192,23 @@ const CALENDAR = 100
const SUMMER = 0
const SPRING = 1
const WINTER = 2
+const AUTUMN = 3
const SEASONS = [
WINTER,
SPRING,
SUMMER,
- SPRING,
+ AUTUMN,
WINTER,
WINTER,
SPRING,
SUMMER,
- SPRING,
+ AUTUMN,
WINTER,
WINTER,
SPRING,
SUMMER,
- SPRING,
+ AUTUMN,
WINTER,
null
]
diff --git a/rules.js b/rules.js
index 3fe7e70..567c45e 100644
--- a/rules.js
+++ b/rules.js
@@ -353,22 +353,23 @@ const CALENDAR = 100
const SUMMER = 0
const SPRING = 1
const WINTER = 2
+const AUTUMN = 3
const SEASONS = [
WINTER,
SPRING,
SUMMER,
- SPRING,
+ AUTUMN,
WINTER,
WINTER,
SPRING,
SUMMER,
- SPRING,
+ AUTUMN,
WINTER,
WINTER,
SPRING,
SUMMER,
- SPRING,
+ AUTUMN,
WINTER,
null
]
@@ -417,7 +418,9 @@ function is_winter() {
function is_spring() {
return current_season() === SPRING
}
-
+function is_autumn() {
+ return current_season() === AUTUMN
+}
function is_campaign_phase() {
return (game.turn & 1) === 1
@@ -579,6 +582,7 @@ function set_lord_locale(lord, locale) {
game.pieces.locale[lord] = locale
}
+
function shift_lord_cylinder(lord, dir) {
set_lord_calendar(lord, get_lord_calendar(lord) + dir)
}