Skip to content

Commit

Permalink
create era for great wars
Browse files Browse the repository at this point in the history
  • Loading branch information
ProditorMagnus committed Jan 5, 2025
1 parent 121bbc1 commit 1864a0b
Show file tree
Hide file tree
Showing 5 changed files with 193 additions and 157 deletions.
89 changes: 89 additions & 0 deletions eras/ageless_wars.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#textdomain wesnoth-Ageless_Era

[era]
id=Ageless Wars
name= _ "Ageless Wars"
require_era=yes
{AE_LOAD_REQUIRED_EVENTS_RESOURCE}
description=_ "Similar factions are merged to same recruitment list"
{~add-ons/Ageless_Era/eras/era_events/_main.cfg}

{RANDOM_SIDE}
{~add-ons/Ageless_Era/factions/AE_great_wars.cfg}

# default macro checks only for 4mp, here MIGHT be 3 somewhere too
[event]
name=prestart

[store_unit]
[filter]
canrecruit=yes
formula="$this_unit.max_moves<5 and $this_unit.max_moves>0"
[/filter]

kill=yes
variable=leaders_to_make_quick
[/store_unit]

{FOREACH leaders_to_make_quick i}
[if]
# The variable check is done here instead of in the [store_unit]
# so that all boolean values work
[variable]
name=leaders_to_make_quick[$i].variables.dont_make_me_quick
boolean_equals=yes
[/variable]

[then]
[unstore_unit]
variable=leaders_to_make_quick[$i]
[/unstore_unit]
[/then]

[else]
[if]
[variable]
name=leaders_to_make_quick[$i].race
equals=AE_myh_elemental,AE_chs_elemental
[/variable]
[then]
[set_variables]
name=temp
[literal]
{TRAIT_EMERALD}
[/literal]
[/set_variables]
[/then]
[else]
[set_variables]
name=temp
[literal]
{TRAIT_QUICK}
[/literal]
[/set_variables]
[/else]
[/if]

[set_variables]
name=leaders_to_make_quick[$i].modifications.trait
mode=append

[insert_tag]
name=literal
variable=temp.trait
[/insert_tag]
[/set_variables]

{CLEAR_VARIABLE leaders_to_make_quick[$i].max_moves,leaders_to_make_quick[$i].moves,leaders_to_make_quick[$i].max_hitpoints,leaders_to_make_quick[$i].hitpoints}

[unstore_unit]
variable=leaders_to_make_quick[$i]
[/unstore_unit]
[/else]
[/if]
{NEXT i}

{CLEAR_VARIABLE leaders_to_make_quick,temp}
[/event]
[/era]

Loading

0 comments on commit 1864a0b

Please sign in to comment.