diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -204,16 +204,28 @@ function create_formation_card(id) { if (card.lore_text) append_div(e, "lore_text", card.lore_text) + let reserve = null + if (card.reserve) { + if (Array.isArray(card.reserve) && card.reserve.length > 0) { + reserve = card.reserve.map(c => data.cards[c].alias || data.cards[c].name).join(" or ") + } else { + reserve = card.reserve + } + } + if (card.retire) { - let ee = append_div(e, "retire", "RETIRE") + let ee + if (card.pursuit) + ee = append_div(e, "retire", "RETIRE, PURSUIT") + else if (card.reserve) + ee = append_div(e, "retire", `RETIRE, RESERVE (${reserve})`) + else + ee = append_div(e, "retire", "RETIRE") register_action(ee, "retire", id) } else if (card.pursuit) { append_div(e, "reserve", "PURSUIT") } else if (card.reserve) { - if (card.reserve.length === 0) - append_div(e, "reserve", "IN RESERVE (Commanded)") - else - append_div(e, "reserve", "IN RESERVE (" + card.reserve.map(c => data.cards[c].name).join(" or ") + ")") + append_div(e, "reserve", `IN RESERVE (${reserve})`) } append_div(e, "number", card.number) |