Skip to content

Commit

Permalink
SotA: Simplify handling of ally units, recall storing, & merging
Browse files Browse the repository at this point in the history
Allows greater compatibilty with change level as well.
  • Loading branch information
sigurdfdragon committed May 29, 2019
1 parent c8e86ad commit ddd8d3e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 71 deletions.
@@ -1,6 +1,6 @@
Gg, Gg, Gg, Gg, Gg, Gg, Gg, Gs, Gg, Gg, Gg, Wwt, Gg, Gg, Gs^Fds, Gg, Rp, Gs, Gg, Gg
Gg, Gg, Gs, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Wwt, Wwt, Gg, Gg, Gg, Gs, Rp, Gs, Gs, Gs
Gs^Fms, Gg, Gs, Gs, Gs, Gg, Gg, Gs^Fds, Gs^Vl, Gg, Wwt^Bw\, Gg, Ce, Ce, Ce, Gg, Rp, Gg, Gg, Gs
Gs^Fms, Gg, Gs, Gs, Gs, Gg, Gg, Gs^Fds, Gs^Vl, Gg, Wwt^Bw\, Gg, Ce, Ce, 2 Ce, Gg, Rp, Gg, Gg, Gs
Gs^Fms, Gs^Fms, Gs^Fms, Gs, Gs, Gs, Gg, Gg, Wwt, Wwt, Gs^Fms, Gg, Ce, Ke, Ce, Gg, Rp, Gs, Gs, Gg
Gg, Gg, Gg, Gg, Gg, Gg, Gs^Fds, Wwt, Gs^Fds, Gg, Gg, Gg, Gg, Ce, Rp, Rp, Gs, Gs, Gs^Fms, Gs
Gg, Gs, Gs, Gg, Gg, Gg, Wwt, Wwt, Gs^Fds, Gs^Fms, Gs^Fms, Gg, Rp, Rp, Gs^Fds, Gs, Gs^Fds, Gg, Gg, Gg
Expand Down
Expand Up @@ -32,16 +32,18 @@ The tunnel at the back of the cave narrowed and ran on for quite some time. Patc

[side]
side=2
controller=ai
controller=human # sets persistent so the units here will be on the recall list in next scenario
team_name=good
user_team_name= _ "Ras-Tabahn"
# wmllint: who CHARACTER_STATS_RAS-TABAHN is Ras-Tabahn
{CHARACTER_STATS_RAS-TABAHN}
{RAS-TABAHN_RECRUIT_1}
gold=0
color=darkred
facing=sw
[unit]
type=Shadow
id=Shadow
name= _ "Vash-Gorn"
x,y=11,7
facing=nw
[/unit]
Expand Down
22 changes: 0 additions & 22 deletions data/campaigns/Secrets_of_the_Ancients/scenarios/08_Carcyn.cfg
Expand Up @@ -86,28 +86,6 @@ After several days of travel, he approached the frontier town of Carcyn."
[/gold_carryover]
[/objectives]

# Add the units Ras-Tabahn had in his laboratory to his recall list:
[unit]
type=Shadow
side=1
name= _ "Vash-Gorn"
[/unit]
[unit]
type=Ghost
experience=6
side=1
[/unit]
[unit]
type=Skeleton
experience=3
side=1
[/unit]
[unit]
type=Skeleton
experience=16
side=1
[/unit]

[unit]
x,y=14,9
type=Mage
Expand Down
Expand Up @@ -329,38 +329,6 @@
[event]
name=enemies defeated

# Copy Ras-Tabahn and his units to an array, saving them for later. We don't
# kill them because that would remove them from the screen during linger
# mode. They won't automatically be healed, so do that first.
[heal_unit]
[filter]
side=1
[/filter]
amount=full
restore_statuses=yes
[/heal_unit]
[store_unit]
[filter]
side=1
[/filter]
variable=rastabahn_recall_list
[/store_unit]
# Change the location of the copies to be the recall list instead of the map:
[for]
array=rastabahn_recall_list
variable=i
[do]
[set_variable]
name=rastabahn_recall_list[$i].x
value=recall
[/set_variable]
[set_variable]
name=rastabahn_recall_list[$i].y
value=recall
[/set_variable]
[/do]
[/for]

# We want to be able to add Ras-Tabahn's gold to the total when the two
# characters are reunited, but only Ardonna's gold will be carried over
# from the scenario right before that. We are storing R-T's gold now,
Expand Down
Expand Up @@ -29,18 +29,21 @@ I never would have been able to escape the trees without ghosts. They had proven
gold=0
[/side]

[side]
side=2
controller=human
team_name=good
user_team_name= _ "Ras-Tabahn"
{CHARACTER_STATS_RAS-TABAHN}
{RAS-TABAHN_RECRUIT_2}
gold=0
[/side]

[event]
name=prestart

[for]
array=rastabahn_recall_list
variable=i
[do]
[unstore_unit]
variable=rastabahn_recall_list[$i]
[/unstore_unit]
[/do]
[/for]
# Merge Ras-Tabahn's side into Ardonna's
{MODIFY_UNIT (side=2) side 1}
[gold]
side=1
amount=$rastabahn_gold
Expand Down Expand Up @@ -75,7 +78,7 @@ I never would have been able to escape the trees without ghosts. They had proven
[/foreach]

[clear_variable]
name=rastabahn_gold, rastabahn_recall_list, rastabahn_zombies, rastabahn_zombie_array
name=rastabahn_gold, rastabahn_zombies, rastabahn_zombie_array
[/clear_variable]

# Only one Shynal will be recalled.
Expand All @@ -91,10 +94,6 @@ I never would have been able to escape the trees without ghosts. They had proven
id=Carcyn
x,y=14,3
[/recall]
[recall]
id=Ras-Tabahn
x,y=14,2
[/recall]
[modify_unit]
[filter]
side=1
Expand Down

0 comments on commit ddd8d3e

Please sign in to comment.