diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -154,6 +154,15 @@ function create_formation_slot(id, top) { return e } +function nbsp_target(target) { + return target + .split(", ") + .map(x=>x.replaceAll(" ", "\xa0")) + .join(", ") + .replaceAll("\xa0or\xa0", " or ") + .replaceAll("\xa0OR\xa0", " OR ") +} + function create_formation_card(id) { let card = data.cards[id] let e = create_div("card formation " + wing_name[card.wing]) @@ -211,7 +220,7 @@ function create_formation_card(id) { register_action(et, "a" + ix, id, "n" + ix) append_div(ee, "action_requirement", a.requirement) if (a.target) - append_div(ee, "action_target", a.target.split(", ").map(x=>x.replaceAll(" ", "\xa0")).join(", ")) + append_div(ee, "action_target", nbsp_target(a.target)) else append_div(ee, "action_target", "") if (a.effect) { |