Deprecated ON_EVENT, ON_PRESTART, ON_START, ON_SIDETURN,
...ON_TURN, ON_VICTORY, ON_DEFEAT, ALLOW_UNDO, and ON_TILE_ONCE.
This commit is contained in:
parent
67c76d2a76
commit
6874d8807f
4 changed files with 223 additions and 178 deletions
|
@ -342,7 +342,8 @@
|
|||
[/message]
|
||||
[/then]
|
||||
[else]
|
||||
{ALLOW_UNDO}
|
||||
[allow_undo]
|
||||
[/allow_undo]
|
||||
[/else]
|
||||
[/if]
|
||||
[/event]
|
||||
|
|
|
@ -177,3 +177,180 @@
|
|||
description = {DESCRIPTION}
|
||||
[/objective]
|
||||
#enddef
|
||||
|
||||
#define ON_EVENT NAME ACTION_WML
|
||||
{DEPRECATE ON_EVENT 1.9.4}
|
||||
|
||||
# Creates a generic event. Strictly a syntactic shortcut
|
||||
[event]
|
||||
name={NAME}
|
||||
{ACTION_WML}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define ON_PRESTART ACTION_WML
|
||||
{DEPRECATE ON_PRESTART 1.9.4}
|
||||
|
||||
# Creates an event that triggers when the scenario starts but before the user
|
||||
# gets any visible output. Strictly a syntactic shortcut.
|
||||
#
|
||||
# For example, you can make side 2 start the scenario with ownership of the
|
||||
# village at 13,15:
|
||||
#
|
||||
#! {ON_PRESTART (
|
||||
#! [capture_village]
|
||||
#! side=2
|
||||
#! x,y=13,15
|
||||
#! [/capture_village]
|
||||
#! )}
|
||||
[event]
|
||||
name=prestart
|
||||
{ACTION_WML}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define ON_START ACTION_WML
|
||||
{DEPRECATE ON_START 1.9.4}
|
||||
|
||||
# Creates an event that triggers when the scenario starts, after the map is
|
||||
# displayed but before the player can act. Strictly a syntactic shortcut.
|
||||
#
|
||||
# For example you could display some dialogue when the scenario starts:
|
||||
#
|
||||
#! {ON_START (
|
||||
#! [message]
|
||||
#! speaker=Konrad
|
||||
#! message= _ "Hey, I can see some enemies up ahead!"
|
||||
#! [/message]
|
||||
#!
|
||||
#! [message]
|
||||
#! speaker=Delfador
|
||||
#! message= _ "Yes, so it would seem. Charge!"
|
||||
#! [/message]
|
||||
#! )}
|
||||
[event]
|
||||
name=start
|
||||
{ACTION_WML}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define ON_SIDETURN ACTION_WML
|
||||
{DEPRECATE ON_SIDETURN 1.9.4}
|
||||
|
||||
# Creates an event that triggers at the start of every players turn
|
||||
# For example, you could set each players gold to a fixed amount every turn.
|
||||
#! {ON_SIDETURN (
|
||||
#! [modify_side]
|
||||
#! side=3
|
||||
#! gold=0
|
||||
#! [/modify_side]
|
||||
#! )}
|
||||
[event]
|
||||
name=side turn
|
||||
first_time_only=no
|
||||
{ACTION_WML}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define ON_TURN TURN ACTION_WML
|
||||
{DEPRECATE ON_TURN 1.9.4}
|
||||
|
||||
# Creates an event that triggers at the start of turn TURN
|
||||
# For example you can create a Wose belonging to player 1 at turn 3:
|
||||
# Strictly a syntactic shortcut.
|
||||
#! {ON_TURN 3 (
|
||||
#! [unit]
|
||||
#! side=1
|
||||
#! type=wose
|
||||
#! x,y=12,4
|
||||
#! [/unit]
|
||||
#! )}
|
||||
[event]
|
||||
name=turn {TURN}
|
||||
{ACTION_WML}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define ON_VICTORY ACTION_WML
|
||||
{DEPRECATE ON_VICTORY 1.9.4}
|
||||
|
||||
# Creates an event that triggers when a player wins the game, before
|
||||
# the game ends. Strictly a syntactic shortcut.
|
||||
#
|
||||
# For example you could congratulate the player:
|
||||
#! {ON_VICTORY (
|
||||
#! [message]
|
||||
#! speaker=narrator
|
||||
#! message="Congratulations!"
|
||||
#! [/message]
|
||||
#! )}
|
||||
[event]
|
||||
name=victory
|
||||
{ACTION_WML}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define ON_DEFEAT ACTION_WML
|
||||
{DEPRECATE ON_DEFEAT 1.9.4}
|
||||
|
||||
# Creates an event that triggers when a player wins the game, before
|
||||
# the game ends. Strictly a syntactic shortcut.
|
||||
#
|
||||
# For example you could suggest an easier difficulty
|
||||
# the player:
|
||||
#! {ON_DEFEAT (
|
||||
#! [message]
|
||||
#! speaker=narrator
|
||||
#! message="Aww.. you lost. Try again with 800g and +40g income?"
|
||||
#! [/message]
|
||||
#! )}
|
||||
[event]
|
||||
name=defeat
|
||||
{ACTION_WML}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define ALLOW_UNDO
|
||||
{DEPRECATE ALLOW_UNDO 1.9.4}
|
||||
|
||||
# Allows the player to undo the effects of a moveto event.
|
||||
# Strictly a syntactic shortcut.
|
||||
#
|
||||
# For example, let's allow undoing reading a note:
|
||||
#! {ON_TILE 5 7 () (
|
||||
#! [message]
|
||||
#! speaker=narrator
|
||||
#! message="This is a note."
|
||||
#! [/message]
|
||||
#! {ALLOW_UNDO}
|
||||
#! )}
|
||||
[allow_undo]
|
||||
[/allow_undo]
|
||||
#enddef
|
||||
|
||||
#define ON_TILE_ONCE X Y FILTER ACTION_WML
|
||||
{DEPRECATE ON_TILE_ONCE 1.9.4}
|
||||
|
||||
# Creates an event that triggers the first time a unit steps on a
|
||||
# given tile. The filter can be used to only affect special units, or
|
||||
# units of a given player.
|
||||
#
|
||||
# For example we could make a text-message
|
||||
# that is only readable once:
|
||||
#! {ON_TILE_ONCE 5 7 () (
|
||||
#! [message]
|
||||
#! speaker=narrator
|
||||
#! message="This is a note."
|
||||
#! [/message]
|
||||
#! )}
|
||||
[event]
|
||||
name=moveto
|
||||
first_time_only=yes
|
||||
[filter]
|
||||
x={X}
|
||||
y={Y}
|
||||
{FILTER}
|
||||
[/filter]
|
||||
{ACTION_WML}
|
||||
[/event]
|
||||
#enddef
|
|
@ -9,165 +9,6 @@
|
|||
# These don't depend on any other macros. Please don't change this.
|
||||
# ! in comments is used in generating HTML documentation, ignore it otherwise.
|
||||
|
||||
#define ON_EVENT NAME ACTION_WML
|
||||
# Creates a generic event. Strictly a syntactic shortcut
|
||||
[event]
|
||||
name={NAME}
|
||||
{ACTION_WML}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define ON_PRESTART ACTION_WML
|
||||
# Creates an event that triggers when the scenario starts but before the user
|
||||
# gets any visible output. Strictly a syntactic shortcut.
|
||||
#
|
||||
# For example, you can make side 2 start the scenario with ownership of the
|
||||
# village at 13,15:
|
||||
#
|
||||
#! {ON_PRESTART (
|
||||
#! [capture_village]
|
||||
#! side=2
|
||||
#! x,y=13,15
|
||||
#! [/capture_village]
|
||||
#! )}
|
||||
[event]
|
||||
name=prestart
|
||||
{ACTION_WML}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define ON_START ACTION_WML
|
||||
# Creates an event that triggers when the scenario starts, after the map is
|
||||
# displayed but before the player can act. Strictly a syntactic shortcut.
|
||||
#
|
||||
# For example you could display some dialogue when the scenario starts:
|
||||
#
|
||||
#! {ON_START (
|
||||
#! [message]
|
||||
#! speaker=Konrad
|
||||
#! message= _ "Hey, I can see some enemies up ahead!"
|
||||
#! [/message]
|
||||
#!
|
||||
#! [message]
|
||||
#! speaker=Delfador
|
||||
#! message= _ "Yes, so it would seem. Charge!"
|
||||
#! [/message]
|
||||
#! )}
|
||||
[event]
|
||||
name=start
|
||||
{ACTION_WML}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define ON_SIDETURN ACTION_WML
|
||||
# Creates an event that triggers at the start of every players turn
|
||||
# For example, you could set each players gold to a fixed amount every turn.
|
||||
#! {ON_SIDETURN (
|
||||
#! [modify_side]
|
||||
#! side=3
|
||||
#! gold=0
|
||||
#! [/modify_side]
|
||||
#! )}
|
||||
[event]
|
||||
name=side turn
|
||||
first_time_only=no
|
||||
{ACTION_WML}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define ON_TURN TURN ACTION_WML
|
||||
# Creates an event that triggers at the start of turn TURN
|
||||
# For example you can create a Wose belonging to player 1 at turn 3:
|
||||
# Strictly a syntactic shortcut.
|
||||
#! {ON_TURN 3 (
|
||||
#! [unit]
|
||||
#! side=1
|
||||
#! type=wose
|
||||
#! x,y=12,4
|
||||
#! [/unit]
|
||||
#! )}
|
||||
[event]
|
||||
name=turn {TURN}
|
||||
{ACTION_WML}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define ON_VICTORY ACTION_WML
|
||||
# Creates an event that triggers when a player wins the game, before
|
||||
# the game ends. Strictly a syntactic shortcut.
|
||||
#
|
||||
# For example you could congratulate the player:
|
||||
#! {ON_VICTORY (
|
||||
#! [message]
|
||||
#! speaker=narrator
|
||||
#! message="Congratulations!"
|
||||
#! [/message]
|
||||
#! )}
|
||||
[event]
|
||||
name=victory
|
||||
{ACTION_WML}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define ON_DEFEAT ACTION_WML
|
||||
# Creates an event that triggers when a player wins the game, before
|
||||
# the game ends. Strictly a syntactic shortcut.
|
||||
#
|
||||
# For example you could suggest an easier difficulty
|
||||
# the player:
|
||||
#! {ON_DEFEAT (
|
||||
#! [message]
|
||||
#! speaker=narrator
|
||||
#! message="Aww.. you lost. Try again with 800g and +40g income?"
|
||||
#! [/message]
|
||||
#! )}
|
||||
[event]
|
||||
name=defeat
|
||||
{ACTION_WML}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define ALLOW_UNDO
|
||||
# Allows the player to undo the effects of a moveto event.
|
||||
# Strictly a syntactic shortcut.
|
||||
#
|
||||
# For example, let's allow undoing reading a note:
|
||||
#! {ON_TILE 5 7 () (
|
||||
#! [message]
|
||||
#! speaker=narrator
|
||||
#! message="This is a note."
|
||||
#! [/message]
|
||||
#! {ALLOW_UNDO}
|
||||
#! )}
|
||||
[allow_undo]
|
||||
[/allow_undo]
|
||||
#enddef
|
||||
|
||||
#define ON_TILE_ONCE X Y FILTER ACTION_WML
|
||||
# Creates an event that triggers the first time a unit steps on a
|
||||
# given tile. The filter can be used to only affect special units, or
|
||||
# units of a given player.
|
||||
#
|
||||
# For example we could make a text-message
|
||||
# that is only readable once:
|
||||
#! {ON_TILE_ONCE 5 7 () (
|
||||
#! [message]
|
||||
#! speaker=narrator
|
||||
#! message="This is a note."
|
||||
#! [/message]
|
||||
#! )}
|
||||
[event]
|
||||
name=moveto
|
||||
first_time_only=yes
|
||||
[filter]
|
||||
x={X}
|
||||
y={Y}
|
||||
{FILTER}
|
||||
[/filter]
|
||||
{ACTION_WML}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define CALL_FUNCTION EVENT_NAME PARAMETER_WML
|
||||
# This will fire an event with a set of parameters, for example:
|
||||
#! {CALL_FUNCTION my_event a,b,c=1,2,3}
|
||||
|
|
|
@ -242,48 +242,74 @@ usage=mask
|
|||
#enddef
|
||||
|
||||
#define TS_SPAWNS
|
||||
{ON_TURN 2 (
|
||||
[event]
|
||||
name=turn 2
|
||||
|
||||
{TS_SPAWN1 "Footpad"}{TS_SPAWN1 "Peasant"}
|
||||
{TS_SPAWN2 "Bowman"}{TS_SPAWN2 "Cavalryman"}
|
||||
)}
|
||||
{ON_TURN 5 (
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=turn 5
|
||||
|
||||
{TS_SPAWN1 "Thief"}{TS_SPAWN1 "Poacher"}
|
||||
{TS_SPAWN2 "Dwarvish Guardsman"}{TS_SPAWN2 "Dwarvish Fighter"}
|
||||
)}
|
||||
{ON_TURN 8 (
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=turn 8
|
||||
|
||||
{TS_SPAWN1 "Elvish Archer"}{TS_SPAWN1 "Elvish Shaman"}
|
||||
{TS_LAKE_SPAWN "Merman Hunter"}
|
||||
{TS_SPAWN2 "Elvish Archer"}
|
||||
)}
|
||||
{ON_TURN 11 (
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=turn 11
|
||||
|
||||
{TS_SPAWN1 "Orcish Slayer"}
|
||||
{TS_LAKE_SPAWN "Naga Fighter"}
|
||||
{TS_SPAWN2 "Troll Hero"}{TS_SPAWN2 "Troll Whelp"}
|
||||
)}
|
||||
{ON_TURN 14 (
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=turn 14
|
||||
|
||||
{TS_SPAWN1 "Drake Warrior"}{TS_SPAWN1 "Drake Glider"}
|
||||
{TS_SPAWN2 "Fire Drake"}{TS_SPAWN2 "Drake Fighter"}
|
||||
)}
|
||||
{ON_TURN 17 (
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=turn 17
|
||||
|
||||
{TS_SPAWN1 "Death Knight"}{TS_SPAWN1 "Walking Corpse"}{TS_SPAWN1 "Walking Corpse"}{TS_SPAWN1 "Walking Corpse"}{TS_SPAWN1 "Vampire Bat"}
|
||||
{TS_SWAMP_SPAWN "Tentacle of the Deep"}
|
||||
{TS_SPAWN2 "Lich"}{TS_SPAWN2 "Walking Corpse"}{TS_SPAWN2 "Walking Corpse"}{TS_SPAWN2 "Walking Corpse"}{TS_SPAWN2 "Vampire Bat"}
|
||||
)}
|
||||
{ON_TURN 20 (
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=turn 20
|
||||
|
||||
{TS_SPAWN1 "Drake Enforcer"}
|
||||
{TS_LAKE_SPAWN "Mermaid Diviner"}{TS_LAKE_SPAWN "Merman Entangler"}
|
||||
{TS_SPAWN2 "Drake Enforcer"}
|
||||
)}
|
||||
{ON_TURN 23 (
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=turn 23
|
||||
|
||||
{TS_SPAWN1 "Dark Sorcerer"}
|
||||
{TS_LAKE_SPAWN "Shadow"}{TS_LAKE_SPAWN "Shadow"}{TS_LAKE_SPAWN "Shadow"}
|
||||
{TS_SPAWN2 "Dark Sorcerer"}
|
||||
)}
|
||||
{ON_TURN 26 (
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=turn 26
|
||||
|
||||
{TS_SPAWN1 "Goblin Rouser"}{TS_SPAWN1 "Goblin Spearman"}{TS_SPAWN1 "Goblin Spearman"}{TS_SPAWN1 "Goblin Spearman"}{TS_SPAWN1 "Goblin Spearman"}{TS_SPAWN1 "Goblin Spearman"}{TS_SPAWN1 "Goblin Spearman"}
|
||||
{TS_SWAMP_SPAWN "Cuttle Fish"}
|
||||
{TS_SPAWN2 "Goblin Rouser"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}{TS_SPAWN2 "Goblin Spearman"}
|
||||
)}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
[multiplayer]
|
||||
|
|
Loading…
Add table
Reference in a new issue