diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -82,6 +82,25 @@ const CARD_INFO = [ { name: "P4X", type: 2, cost: 4, event: "Demagogue" }, ] +const EVENT_NAME = [ + "None", + "Plague of Cyprian", + "Ardashir", + "Priest King", + "Palmyra Allies", + "Shapur I", + "Postumus", + "Ludi Saeculares", + "Cniva", + "Zenobia", + "Bad Auguries", + "Raiding Parties", + "Preparing for War", + "Inflation", + "Good Auguries", + "Diocletian", +] + const ITALIA = 0 const ASIA = 1 const GALLIA = 2 @@ -1362,7 +1381,7 @@ function sub_region_name(match, p1) { function sub_event_name(match, p1) { let x = p1 | 0 // TODO: tooltip? - return CARD_INFO[CARD_INDEX[x]].event + return EVENT_NAME[x] } function sub_dice_image(match) { @@ -1382,6 +1401,7 @@ function on_log(text) { text = text.replace(/>/g, ">") text = text.replace(/%(\d+)/g, sub_region_name) + text = text.replace(/\bE(\d+)/g, sub_event_name) text = text.replace(/\b[BW]\d\b/g, sub_dice_image) if (text.match(/^.turn/)) { |