Use a few more conditional tag elements

This commit is contained in:
Celtic Minstrel 2018-03-17 00:17:36 -04:00
parent ed7c3dbfbc
commit 65ef12466d

View file

@ -107,9 +107,13 @@
{SIMPLE_KEY leader string}
{SIMPLE_KEY random_leader string}
{DEFAULT_KEY random_faction bool no}
# TODO: below two keys only valid if above key is yes
{SIMPLE_KEY choices string_list}
{SIMPLE_KEY except string_list}
[if]
random_faction=no
[then]
{SIMPLE_KEY choices string_list}
{SIMPLE_KEY except string_list}
[/then]
[/if]
{SIMPLE_KEY terrain_liked terrain_list}
[/tag]
@ -195,10 +199,17 @@
[/tag]
# Multiplayer specific
# TODO: These are probably only allowed if type is mp or hybrid?
{DEFAULT_KEY min_players int 2}
{SIMPLE_KEY max_players int}
{DEFAULT_KEY allow_era_choice bool yes}
{DEFAULT_KEY require_campaign bool yes}
[if]
[not]
type=sp
[/not]
[then]
{DEFAULT_KEY min_players int 2}
{SIMPLE_KEY max_players int}
{DEFAULT_KEY allow_era_choice bool yes}
{DEFAULT_KEY require_campaign bool yes}
[/then]
[/if]
[/tag]
[tag]
name="era"
@ -298,9 +309,15 @@
{SIMPLE_KEY victory_music string}
{SIMPLE_KEY theme string_list}
{DEFAULT_KEY victory_when_enemies_defeated bool yes}
# TODO: The following two keys are only valid if the above key is yes (or omitted)
{SIMPLE_KEY carryover_percentage int}
{SIMPLE_KEY carryover_add bool}
[if]
[not]
victory_when_enemies_defeated=no
[/not]
[then]
{SIMPLE_KEY carryover_percentage int}
{SIMPLE_KEY carryover_add bool}
[/then]
[/if]
{DEFAULT_KEY remove_from_carryover_on_defeat bool yes}
{DEFAULT_KEY disallow_recall bool no}
{DEFAULT_KEY experience_modifier int_percent 100}