summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js21
1 files changed, 20 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index ef17ff4..458a07b 100644
--- a/rules.js
+++ b/rules.js
@@ -3427,7 +3427,8 @@ states.levy_muster_lord = {
view.actions.take_sled = 1
// Add Capability
- view.actions.capability = 1
+ if (can_muster_capability())
+ view.actions.capability = 1
}
view.actions.done = 1
@@ -3623,6 +3624,24 @@ function discard_lord_capability(lord, c) {
throw new Error("capability not found")
}
+function can_muster_capability() {
+ let deck = list_deck()
+ for (let c of deck) {
+ if (is_no_event_card(c))
+ continue
+ if (!data.cards[c].lords || set_has(data.cards[c].lords, game.who)) {
+ if (data.cards[c].this_lord) {
+ if (!lord_already_has_capability(game.who, c))
+ return true
+ } else {
+ if (can_deploy_global_capability(c))
+ return true
+ }
+ }
+ }
+ return false
+}
+
states.muster_capability = {
inactive: "Levy",
prompt() {