Skip to content

Commit

Permalink
DM utils/sides.cfg: follow up FIXME
Browse files Browse the repository at this point in the history
(cherry-picked from commit 370e50c)
  • Loading branch information
DisherProject authored and sigurdfdragon committed Oct 7, 2018
1 parent 83a6de2 commit 50c4574
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions data/campaigns/Delfadors_Memoirs/utils/sides.cfg
Expand Up @@ -262,21 +262,18 @@

{CLEAR_VARIABLE delfador_store}

# FIXME: Relies on an implementation accident.
# This sequence of declarations happens to put the units where we want
# them - Shock Troopers and Royal Guard north of Delfador, towards the
# enemy, and the White Mages behind him - but this is an accident of the
# vacancy-finding algorithm. Ideally we want to use formula syntax to
# say things like x,y=$({X}-1),$({Y}+1) below, but that doesn't work
# reliably yet in 1.7.0 (units randomly fail to appear when it's tried).
{NAMED_UNIT 1 (Royal Guard) {X} {Y} Clogrin _"Clogrin" (facing=nw)}
{NAMED_UNIT 1 (White Mage) {X} {Y} Theorsten _"Theorsten" (facing=nw)}
{NAMED_UNIT 1 (White Mage) {X} {Y} Igler _"Igler" (facing=nw)}
{NAMED_UNIT 1 (White Mage) {X} {Y} Larsin _"Larsin" (facing=nw)}
{NAMED_UNIT 1 (White Mage) {X} {Y} Aldrin _"Aldrin" (facing=nw)}
{NAMED_UNIT 1 (Shock Trooper) {X} {Y} Gren _"Gren" (facing=nw)}
{NAMED_UNIT 1 (Shock Trooper) {X} {Y} Droni _"Droni" (facing=nw)}
{NAMED_UNIT 1 (Shock Trooper) {X} {Y} Artor _"Artor" (facing=nw)}
# "n" tells us if {X} is even or odd. If it's even, "n" is equal to 1;
# otherwise, it's set to 0
{VARIABLE n "$(if(({X}/2.0 = {X}/2), 1, 0))"}

{NAMED_UNIT 1 (Royal Guard) "$({X}-1)" "$({Y}-(1-$n))" Clogrin _"Clogrin" (facing=nw)}
{NAMED_UNIT 1 (White Mage) "$({X}-1)" "$({Y}+$n)" Theorsten _"Theorsten" (facing=nw)}
{NAMED_UNIT 1 (White Mage) {X} "$({Y}-1)" Igler _"Igler" (facing=nw)}
{NAMED_UNIT 1 (White Mage) {X} "$({Y}+1)" Larsin _"Larsin" (facing=nw)}
{NAMED_UNIT 1 (White Mage) "$({X}+1)" "$({Y}-(1-$n))" Aldrin _"Aldrin" (facing=nw)}
{NAMED_UNIT 1 (Shock Trooper) "$({X}-2)" {Y} Gren _"Gren" (facing=nw)}
{NAMED_UNIT 1 (Shock Trooper) "$({X}-2)" "$({Y}-1)" Droni _"Droni" (facing=nw)}
{NAMED_UNIT 1 (Shock Trooper) "$({X}-1)" "$({Y}-(2-$n))" Artor _"Artor" (facing=nw)}
#enddef

# At the end of Shadows (14), control of side 1 needs to be handed
Expand Down

0 comments on commit 50c4574

Please sign in to comment.