diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -210,10 +210,10 @@ function create_formation_card(id) { et = append_div(ee, "action_type", a.type) register_action(et, "a" + ix, id, "n" + ix) append_div(ee, "action_requirement", a.requirement) - if (Array.isArray(a.target)) - append_div(ee, "action_target", a.target.map(t=>data.cards[t].name).join(", ")) + if (a.target) + append_div(ee, "action_target", a.target.split(", ").map(x=>x.replaceAll(" ", "\xa0")).join(", ")) else - append_div(ee, "action_target", a.target) + append_div(ee, "action_target", "") if (a.effect) { if (a.short) append_div(ee, "action_effect short", a.effect) @@ -516,17 +516,21 @@ function on_log(text) { text = text.substring(4) p.className = "h2" } - else if (text.match(/^\.t0/)) { + else if (text.match(/^\.p1/)) { text = data.scenarios[view.scenario].players[0].name - p.className = "t" + p.className = "p1" } - else if (text.match(/^\.t1/)) { + else if (text.match(/^\.p2/)) { text = data.scenarios[view.scenario].players[1].name - p.className = "t" + p.className = "p2" } - else if (text.match(/^\.i /)) { - text = text.substring(3) - p.className = "i" + else if (text.match(/^\.rule /)) { + text = text.substring(6) + p.className = "rule" + } + else if (text.match(/^\.lore /)) { + text = text.substring(6) + p.className = "lore" } else if (text.match(/^>>/)) { text = text.substring(2) |