Merge pull request #732 from GregoryLundberg/GL_HttT_S05b_randomize_temples

HttT S05b Randomize Temples
This commit is contained in:
Lari Nieminen 2016-09-15 12:43:59 +03:00 committed by GitHub
commit d16ce1b300

View file

@ -218,9 +218,6 @@
[/message]
[/event]
# TODO: randomize temples properly, and make Moremirmu appear at the end of
# scenario if the player never found him
#define EMPTY_TEMPLE_TRAP X Y
[event]
name=moveto
@ -298,6 +295,9 @@
#enddef
#define XAKAE_TRAP X Y
#ifdef EASY
{EMPTY_TEMPLE_TRAP {X} {Y}}
#else
[event]
name=moveto
[filter]
@ -335,60 +335,58 @@
message= _ "Surprise! Searching for magi, and all I get is these foul humans!"
[/message]
[/event]
#endif
#enddef
[event]
name=prestart
#
# Determine the contents of the temples:
# - on easy, Moremirmu shows up in 1 close temple and the others are empty
# - on normal, Moremirmu shows up in 1 close temple and the far one has the revenant
# - on hard, Moremirmu and the revenant show up in the 2 close temples (far one is empty)
#
{RANDOM 1..2}
[if]
[variable]
name=random
numerical_equals=1
[/variable]
#ifdef EASY
[then]
{MOREMIRMU_TRAP 11 13}
{EMPTY_TEMPLE_TRAP 10 17}
{RANDOM 1..6}
[switch]
variable=random
[case]
value=6
{EMPTY_TEMPLE_TRAP 9 15}
[/then]
[else]
{MOREMIRMU_TRAP 10 17}
{EMPTY_TEMPLE_TRAP 11 13}
{EMPTY_TEMPLE_TRAP 9 15}
[/else]
#endif
#ifdef NORMAL
[then]
{MOREMIRMU_TRAP 11 13}
{EMPTY_TEMPLE_TRAP 10 17}
{XAKAE_TRAP 9 15}
[/then]
[else]
{MOREMIRMU_TRAP 10 17}
{EMPTY_TEMPLE_TRAP 11 13}
{XAKAE_TRAP 9 15}
[/else]
#endif
#ifdef HARD
[then]
{MOREMIRMU_TRAP 11 13}
{XAKAE_TRAP 10 17}
{MOREMIRMU_TRAP 11 13}
[/case]
[case]
value=5
{XAKAE_TRAP 9 15}
{EMPTY_TEMPLE_TRAP 10 17}
{MOREMIRMU_TRAP 11 13}
[/case]
[case]
value=4
{EMPTY_TEMPLE_TRAP 9 15}
[/then]
[else]
{MOREMIRMU_TRAP 10 17}
{XAKAE_TRAP 11 13}
{EMPTY_TEMPLE_TRAP 9 15}
[/case]
[case]
value=3
{XAKAE_TRAP 9 15}
{MOREMIRMU_TRAP 10 17}
{EMPTY_TEMPLE_TRAP 11 13}
[/case]
[case]
value=2
{MOREMIRMU_TRAP 9 15}
{EMPTY_TEMPLE_TRAP 10 17}
{XAKAE_TRAP 11 13}
[/case]
[else]
# value=1 and "can't happen, but just in case" case
{MOREMIRMU_TRAP 9 15}
{XAKAE_TRAP 10 17}
{EMPTY_TEMPLE_TRAP 11 13}
[/else]
#endif
[/if]
[/switch]
{CLEAR_VARIABLE random}
[/event]