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ll^Fp, Gs^Fds, Gs^Fds, Gs^Fds, Ce, Ce, Gs^Fds, Gs^Fds, Gs^Fds
Gll^Fp, Gll^Fp, Gll^Fp, Gll^Fp, Gll^Fp, Gll^Fms, Gll^Fms, Gll^Fms, Gs^Fds, Gg^Ve, Gs^Fds, Gs^Fds, Gll^Fp, Gs^Fds, Gs^Fds, Gs^Fds, Gs^Fds, Gs^Fds, Gs^Fds, Gs^Fds, Gs^Fds, Gs^Fds
Gll^Fp, Gll^Fp, Gll^Fp, Gll^Fp, Gs^Fds, Gll^Fp, Gll^Fp, Gll^Fms, Gs^Fds, Rp, Gs^Fds, Gll^Fms, Gs^Fds, Gs^Fds, Gs^Fds, Gs^Fds, Gs^Fds, Gs^Fds, Gs^Fds, Gs^Fds, Gs^Fds, Gs^Fds

View file

@ -1,257 +1,5 @@
#textdomain wesnoth-tutorial
#define BADGUY TYPE NAME POSITION
[unit]
id={NAME}
generate_name=yes
type={TYPE}
x,y={POSITION}
moves=0
side=2
animate=yes
[/unit]
[redraw][/redraw]
#enddef
#define DEFEND_ISLAND
[if]
{NUMEQ island_defended 0}
{NUMEQ dumbo_dead 1}
[then]
{VARIABLE island_defended 1}
{LABEL (_"Patch of forest") 10,14}
{TALK_ABOUT_LOC 10,14 (_"Now put an unwounded unit, preferably a Fighter, in that patch of forest on the south-east of the island; a nice, defensible spot.")}
{STUDENT (_"Can one unit survive against all those enemies?")}
{TEACHER (_"With a little help, yes. If you move your Shaman next to the defending unit, she will heal it 4 hitpoints per turn. Just be careful not to expose the Shaman to attack since she is fairly weak herself.")}
{PRINT (_"Move a unit (a Fighter if possible) to the patch of forest")}
[event]
name=moveto
[filter]
x,y=10,14
[/filter]
{UNLABEL 10,14}
{PRINT (_"Advance other units onto the island or to capture villages, then <b>End Turn</b>")}
[allow_undo][/allow_undo]
[/event]
[/then]
[/if]
#enddef
#define CHECK_INTELLIGENT NAME
[if]
[variable]
# Ignoring single-trait units, as we don't have those during the tutorial
name={NAME}.modifications.trait.length
equals=2
[/variable]
[then]
[if]
[variable]
name={NAME}.modifications.trait[0].id
equals=intelligent
[/variable]
[or]
[variable]
name={NAME}.modifications.trait[1].id
equals=intelligent
[/variable]
[/or]
[then]
{VARIABLE is_intelligent yes}
[/then]
[else]
{VARIABLE is_intelligent no}
[/else]
[/if]
[/then]
[else]
{VARIABLE is_intelligent no}
[/else]
[/if]
#enddef
#define IMPORTANT_UNIT NAME
{CHECK_INTELLIGENT {NAME}}
[if]
# Archer needs 44/35(intelligent), Fighter needs 40/32
[variable]
name={NAME}.type
equals=Elvish Archer
[/variable]
{BOOLEQ is_intelligent no}
[variable]
name={NAME}.experience
greater_than=35
[/variable]
[or]
[variable]
name={NAME}.type
equals=Elvish Archer
[/variable]
{BOOLEQ is_intelligent yes}
[variable]
name={NAME}.experience
greater_than=26
[/variable]
[/or]
[or]
[variable]
name={NAME}.type
equals=Elvish Fighter
[/variable]
{BOOLEQ is_intelligent no}
[variable]
name={NAME}.experience
greater_than=31
[/variable]
[/or]
[or]
[variable]
name={NAME}.type
equals=Elvish Fighter
[/variable]
{BOOLEQ is_intelligent yes}
[variable]
name={NAME}.experience
greater_than=23
[/variable]
[/or]
[then]
{VARIABLE commented 0}
{FOREACH galdrad_comments i}
[if]
[variable]
name=galdrad_comments[$i].id
equals=${NAME}.id
[/variable]
[then]
{VARIABLE commented 1}
[/then]
[/if]
{NEXT i}
{CLEAR_VARIABLE i}
[if]
{NUMEQ commented 0}
[then]
[store_unit]
[filter]
id=${NAME}.id
[/filter]
variable=galdrad_comments
mode=append
[/store_unit]
{TEACHER (_"That unit is about one kill (8 experience points) away from gaining a level! Do not let it die!")}
[/then]
[/if]
{CLEAR_VARIABLE commented}
[/then]
[/if]
{CLEAR_VARIABLE is_intelligent}
#enddef
#define DEFENDER_INJURED NAME
[if]
{NUMEQ {NAME}.side 1}
[variable]
name={NAME}.hitpoints
less_than=19
[/variable]
[variable]
name={NAME}.hitpoints
greater_than=0
[/variable]
[then]
{VARIABLE complained 0}
# FIXME: If same unit gets attacked twice in same turn, this
# does not seem to find it the second time. Some internal bug?
{FOREACH unit_complained i}
[if]
[variable]
name=unit_complained[$i].id
equals=${NAME}.id
[/variable]
[then]
{VARIABLE complained 1}
[/then]
[/if]
{NEXT i}
[if]
{NUMEQ complained 0}
[then]
[store_unit]
[filter]
id=${NAME}.id
[/filter]
variable=unit_complained
mode=append
[/store_unit]
[if]
{NUMEQ complain_msg 2}
[then]
[message]
speaker=second_unit
message= _"I hope I have a chance to retreat after this!"
[/message]
{VARIABLE_OP complain_msg add 1}
[/then]
[/if]
[if]
{NUMEQ complain_msg 1}
[then]
[message]
speaker=second_unit
message= _"One lucky attack by an Orcish Grunt, and Im done for!"
[/message]
{VARIABLE_OP complain_msg add 1}
[/then]
[/if]
[if]
{NUMEQ complain_msg 0}
[then]
[message]
speaker=second_unit
message= _"Ouch! I could make use of some healing in a village."
[/message]
{VARIABLE_OP complain_msg add 1}
[/then]
[/if]
[/then]
[/if]
{CLEAR_VARIABLE i}
{CLEAR_VARIABLE complained}
{IMPORTANT_UNIT {NAME}}
[/then]
[/if]
#enddef
#define CHECK_INCOME
[if]
{NUMEQ income_exceeded 0}
[then]
[store_side]
[/store_side]
[if]
[variable]
name=side.gold
greater_than=13
[/variable]
[then]
{VARIABLE income_exceeded 1}
{STUDENT (_"I have $side.gold gold; enough to recruit!")}
{TALK_ABOUT_LOC 9,15 (_"Yes, keep recruiting more units: I think you might need them!")}
[/then]
[/if]
{CLEAR_VARIABLE side}
[/then]
[/if]
#enddef
[tutorial]
id=2_Tutorial
name= _"Wesnoth Tutorial — Part II"
@ -277,6 +25,8 @@
type=Fighter
id=student
name= _"Konrad"
facing=se
[/side]
[side]
@ -292,11 +42,13 @@
id=Thrag
name= _"Thrag"
facing=nw
[unit]
id=Dumbo
generate_name=yes
type=Orcish Grunt
x,y=8,13
x,y=9,13
# Make sure the two archers can't take him out!
[modifications]
{TRAIT_RESILIENT}
@ -304,14 +56,8 @@
[/unit]
[ai]
[aspect]
id=aggression
[facet]
# When we unleash you, you *will* attack.
value=1.0
turns=1-6
[/facet]
[/aspect]
{AI_SIMPLE_ALWAYS_ASPECT aggression 1.00}
{AI_SIMPLE_ALWAYS_ASPECT village_value 0.30}
[/ai]
[/side]
@ -361,17 +107,23 @@
{TURNS_RUN_OUT}
[/objectives]
# TEMP HACK FOR BUG IN MASTER
[move_unit]
id=Dumbo
to_x=11
to_y=14
[/move_unit]
# TODO: determine necessity
{VARIABLE income_exceeded 0}
[disallow_end_turn][/disallow_end_turn]
[/event]
[event]
name=start
# TODO: determine necessity
{VARIABLE villages_around_keep 0}
{VARIABLE village_warn 0}
{VARIABLE recruit_num 1}
{VARIABLE income_exceeded 0}
[message]
speaker=student
#wmllint: local spelling Galdrad
@ -395,12 +147,13 @@
message= _ "What should I do?"
[/message]
{TALK_ABOUT Dumbo (_"First, we will have to deal with the Orcish Grunt stationed in the middle of the river. He should be little trouble.")}
{TALK_ABOUT Thrag (_"By then, their leader will have recruited more units to send against us and the real fight will begin.")}
{TALK_ABOUT Dumbo ( _ "First, we will have to deal with the Orcish Grunt stationed in the middle of the river. He should be little trouble.")}
{TALK_ABOUT_LOC 19,14 (_"See this dark blue water? Its too deep for either side to cross. The orcs could slowly wade through that narrow band of shallow lighter-blue water in the east; but we could stand on the shore and force them to fight us from the water, where they are exposed and we are protected by the forest.")}
{TALK_ABOUT Thrag ( _ "By then, their leader will have recruited more units to send against us and the real fight will begin.")}
{TALK_ABOUT_LOC 9,14 (_"The more likely attack, then, is across the bridge. That middle island is the key: it has a village for healing injured units and forests in which we fight so well.")}
{TALK_ABOUT_LOC 19,14 ( _ "See this dark blue water? Its too deep for either side to cross. The orcs could slowly wade through that narrow band of shallow lighter-blue water in the east; but we could stand on the shore and force them to fight us from the water, where they are exposed and we are protected by the forest.")}
{TALK_ABOUT_LOC 9,14 ( _ "The more likely attack, then, is across the bridge. That middle island is the key: it has a village for healing injured units and forests in which we fight so well.")}
[message]
speaker=student
@ -453,6 +206,7 @@
message= _"In addition to recruiting new units each scenario, you can also <i>recall</i> your experienced veterans from previous scenarios, for the cost of 20 gold each. This allows you to build up a formidable army over the course of multiple scenarios by recalling your highest leveled troops or those with good combinations of traits and abilities. To recall a unit, right click while your leader stands on a keep and select the <i>Recall</i> option. Remember to also recruit new troops in addition to recalling old ones."
[/message]
# TODO: recommend recruits?
[message]
speaker=Galdrad
message= _"You also have two new types of units to recruit this scenario: Elvish Archers and Elvish Shamans. Ill tell you more about them when you recruit them."
@ -471,8 +225,8 @@
[message]
speaker=Galdrad
# TODO: image?
message= _"The Shaman is a fairly weak unit, but she has the ability to <i>heal</i> friendly units around her. She also has a special attack which <i>slows</i> enemies, halving the damage they do for one turn."
image=$unit.profile
message= _ "The Shaman is a fairly weak unit, but she has the ability to <i>heal</i> friendly units around her. She also has a special attack which <i>slows</i> enemies, halving the damage they do for one turn."
[/message]
[/event]
@ -486,8 +240,8 @@
[message]
speaker=Galdrad
# TODO: image?
message= _"Unlike the Elvish Fighter, which has strong melee attacks, the Elvish Archer has strong ranged attacks. Its useful to attack enemy units with strong melee attacks with atrong ranged attacks, and vice versa. This allows your units to take less damage when your enemy counterattacks."
image=$unit.profile
message= _ "Unlike the Elvish Fighter, which has strong melee attacks, the Elvish Archer has strong ranged attacks. Its useful to attack enemy units with strong melee attacks with strong ranged attacks, and vice versa. This allows your units to take less damage when your enemy counterattacks."
[/message]
[/event]
@ -519,13 +273,11 @@
name=capture
[filter]
side=1
# x=7,9,13
# y=4,2,3
[/filter]
{CLEAR_PRINT}
# NOTE: give live income stats?
# NOTE: maybe give live income stats?
[message]
speaker=Galdrad
@ -539,6 +291,8 @@
message= _ "Each turn, you will gain 2 gold pus one for each village you own. However, <i>upkeep</i> is subtracted for that. You can support as many levels worth of units as the number of villages you own; beyond that, you must pay 1 gold per turn. Be careful, as owning too many units can cause you to have negative income and lose gold per turn!"
[/message]
[allow_end_turn][/allow_end_turn]
{PRINT (_"End your turn")}
[/event]
@ -561,7 +315,7 @@
[message]
speaker=student
message= _ "Galdrad, if I go by the ford, I could sneak up near his keep and dispatch him quickly!"
message= _ "Galdrad, if I go by the ford, I could sneak up near his keep and dispatch him quickly."
[/message]
[message]
@ -569,26 +323,17 @@
message= _ "You could. However, elves (and orcs) have bad <i>defense</i> in water. Youll be more vulnerable as you try to wade slowly across the ford; the enemy will have an 80% chance to hit you. Since elves have good defense in the forest, I would advise you keep to the trees and attack the orcs from there; youll only have a 30% chance of being hit in return."
[/message]
[message]
speaker=Galdrad
message= _ "However, keep an eye on that ford. The orcs may try to sneak around behind our forces. It might do to send a few units to defend the banks, and the village there."
[/message]
[message]
speaker=student
message= _ "Alright. The bridge it is, then!"
message= _ "Alright. The bridge it is, then, but I'll be careful about the crossing."
[/message]
[scroll_to_unit]
id=Dumbo
[/scroll_to_unit]
[message]
speaker=Galdrad
scroll=no
message= _ "An Orcish Grunt appears to be blocking our path. He has no ranged attacks, so your archers should be able to engage him with little risk."
[/message]
# TODO: split this section into turn three, or an attack event?
[message]
speaker=Galdrad
message= _ "Your units cannot reach the him this turn, but you should not let them languish! Move them into position so they can attack next turn. There are also other villages on this side of the river. You should secure them for income and healing."
[/message]
{TALK_ABOUT Dumbo ( _ "That Orcish Grunt is still blocking our path. He has no ranged attacks, so your archers should be able to engage him with little risk. Unfortunately, your units cannot reach him this turn, but you should not let them languish! Move them into position so they can attack next turn. There are also other villages on this side of the river. You should secure them for income and healing")}
[message]
speaker=narrator
@ -618,22 +363,32 @@
[event]
name=turn 3
# Explain: Zone of Control
{TALK_ABOUT Dumbo (_"That Grunt is blocking the bridge! We must occupy that island before the Wolf Riders reach it.")}
{STUDENT (_"Cant our units just move around him?")}
{TALK_ABOUT Dumbo ( _ "We must occupy that island before the Wolf Riders reach it!")}
# All around Dumbo (9,14)
# Explain: Zone of Control
[message]
speaker=student
message= _ "Can't we just move around the orcs?"
[/message]
# All around Dumbo
[item]
image=misc/highlight-hex.png
[filter_adjacent]
id=Dumbo
[/filter_adjacent]
[filter_adjacent_location]
[filter]
id=Dumbo
[/filter]
[/filter_adjacent_location]
[/item]
# FIXME: Figure out best unit choice.
{TALK_ABOUT Dumbo (_"No. Once you move close to an enemy unit, you are in its <i>Zone of Control</i> and cannot move further that turn.
To move your troops onto that island without wading slowly through the water, youll have to kill the Grunt.")}
{PRINT (_"Attack the orc with an Archer")}
{TALK_ABOUT Dumbo ( _ "No. Once you move close to an enemy unit, you are in its <i>Zone of Control</i> and cannot move further that turn. To move your troops onto that island without wading slowly through the water, youll have to kill the Grunt.")}
[message]
speaker=narrator
caption= _ "Zone of Control"
image=wesnoth-icon.png
message= _ "The hexes immediately around a unit constitute its <i>Zone of Control</i>. When an enemy unit enters those hexes, they cannot move any further that turn. An exception are units with the <i>skirmish</i> ability, who are unaffected by zones of control. This can be used to create a blockade to prevent stronger enemies from reaching key locations, such as villages, even if you have limited manpower."
[/message]
[remove_item]
image=misc/highlight-hex.png
@ -644,51 +399,29 @@
[filter_second]
id=Dumbo
[/filter_second]
[filter_condition]
# FIXME: bad filter. Perhaps remove?
# No units next to Dumbo who haven't attacked him
[not]
[have_unit]
side=1
[filter_wml]
attacks_left=1
[/filter_wml]
[/have_unit]
[/not]
[/filter_condition]
{CLEAR_PRINT}
[store_unit]
variable=dumbo
kill=no
[filter]
id=Dumbo
[/filter]
[/store_unit]
# This happens before kill event, so we must do this the hard way.
[if]
[variable]
name=dumbo.hitpoints
less_than=1
[/variable]
[then]
{PRINT (_"Advance other units and capture villages, then <b>End Turn</b>")}
[/then]
[else]
[if]
[variable]
name=unit.gender
equals=male
[/variable]
[then]
#po: The unit with unit type $unit.language_name is male.
{STUDENT (_"No other units can reach that orc. I hope my $unit.language_name survives its counter-attack! Id better grab more villages and move everyone closer for next turn.")}
[/then]
[else]
#po: The unit with unit type $unit.language_name is female.
{STUDENT (_"female^No other units can reach that orc. I hope my $unit.language_name survives its counter-attack! Id better grab more villages and move everyone closer for next turn.")}
[/else]
[/if]
{TEACHER (_"Yes. If your Shaman stands just behind that unit on the bridge, she will heal it at the beginning of the next turn.")}
{PRINT (_"Move your Shaman onto the bridge to stand behind your other unit")}
[event]
name=moveto
[filter]
type=Elvish Shaman
[/filter]
{PRINT (_"Advance other units and capture villages, then <b>End Turn</b>")}
[/event]
[/else]
[/if]
{CLEAR_VARIABLE dumbo}
# TODO: don't show if orc is dead
[message]
speaker=student
message= _ "No other units can reach that orc. I hope my units survive its counter-attack! Id better grab more villages and move everyone closer for next turn."
[/message]
[message]
speaker=Galdrad
message= _ "If your Shaman stands just behind your wounded units, she will heal them at the beginning of the next turn."
[/message]
[/event]
[/event]
@ -698,73 +431,87 @@
id=Dumbo
[/filter]
# Only tell them to defend island if not turn 3.
[if]
[message]
speaker=second_unit
message= _ "One fewer orc to deal with, and our way across the bridge is clear! I also gained experience from striking the killing blow!"
[/message]
[/event]
[event]
name=moveto
[filter]
x=9,9,9
y=15,16,17
side=1
[/filter]
[filter_condition]
[variable]
name=turn_number
greater_than=3
less_than=8
[/variable]
[then]
{DEFEND_ISLAND}
[/then]
[/if]
[/filter_condition]
[event]
name=moveto
[filter]
x=9,9,9
y=15,16,17
side=1
[/filter]
[message]
speaker=Galdrad
scroll=no
message= _ "Be careful! If you stand on the bridge you are exposed to attack from multiple directions! Even though the orcs have low defense in water, they will overwhelm you with numbers."
[/message]
[allow_undo][/allow_undo]
[if]
[variable]
name=turn_number
less_than=8
[/variable]
[then]
{TALK_NO_MOVE (_"Be careful: if you stand on the bridge you are exposed to attack from multiple directions!")}
{UNDO_REMINDER}
[/then]
[/if]
[/event]
{UNDO_REMINDER}
[/event]
[event]
name=moveto
[filter]
x=8,10,18,19,20,11
y=14,15,14,15,14,15
side=1
[/filter]
{TEACHER (_"Its very dangerous to stand in water when there are enemies about! Your unit will have an 80% chance of being hit! Cancel, and wait for them to attack you!")}
{UNDO_REMINDER}
[allow_undo][/allow_undo]
[/event]
# Capturing island village
[event]
name=capture
[filter]
side=1
x,y=11,14
[/filter]
[message]
speaker=Galdrad
message= _ "Well done! The island village is ours. You can use the trees to set up a blockade against the orcs; they can only come across the bridge one by one without wading through the water."
[/message]
{TALK_ABOUT_LOC 19,5 ( _ "Dont forget about that last village near the channel. They orcs will capture if it they try to sneak around via the ford! It will be hard to dislodge them of they do.")}
[/event]
[event]
name=moveto
[filter]
x=8,10,18,19,20,11
y=14,15,14,15,14,15
side=1
[/filter]
[message]
speaker=Galdrad
scroll=no
message= _ "Its very dangerous to stand in water when there are enemies about! Your unit will have an 80% chance of being hit. Get back, and wait for them to attack you!"
[/message]
{UNDO_REMINDER}
[/event]
[event]
name=turn 4
[filter_condition]
[have_location]
x,y=11,14
[not]
owner_side=1
[/not]
[/have_location]
[/filter_condition]
{CLEAR_PRINT}
{TALK_ABOUT_LOC 19,5 (_"Dont forget about your Fighter in the east; you can move him south to that last village near the channel.")}
[allow_undo][/allow_undo]
[if]
{NUMEQ dumbo_dead 0}
[then]
{TALK_ABOUT Dumbo (_"We need to occupy that village, otherwise they will take it next turn! Move a unit into the village to stop the orcs capturing it. Whichever unit you choose will benefit from the villages healing, too.")}
[/then]
[else]
{DEFEND_ISLAND}
[/else]
[/if]
{TALK_ABOUT_LOC 11,14 (_"We need to occupy that village, otherwise they will take it next turn! Move a unit into the village to stop the orcs capturing it. Whichever unit you choose will benefit from the villages healing, too.")}
[/event]
[event]
name=turn 5
{DEFEND_ISLAND}
{TALK_ABOUT_LOC 11,14 (_"Careful! It is now nighttime. Orcs are <i>chaotic</i>, which means their attacks are now 25% stronger. By day, their attacks are 25% weaker, which is a noticeable difference. You are <i>lawful</i>: stronger by day and weaker at night. Your elvish warriors are <i>neutral</i>: unaffected by the time of day.")}
{NARRATOR _"Time of Day" _"After this dialog, hold the mouse over the landscape image below the minimap on the right. This brings up a description of the time of day, showing who has the advantage."}
[/event]
@ -807,16 +554,18 @@
x=1-20
y=6-20
[/filter]
[if]
[filter_condition]
[variable]
name=turn_number
less_than=8
[/variable]
[then]
{TEACHER (_"Stay near the keep! You need to be on a keep to recruit more units, and I doubt the orc leader will let you use his!")}
[/then]
[/if]
[/filter_condition]
[message]
speaker=student
message= _ "You're venturing away from your keep. You might need recruit more units, and I doubt the orc leader will let you use his! Careful!"
[/message]
[allow_undo][/allow_undo]
[/event]

View file

@ -65,13 +65,7 @@
[/message]
#enddef
#define STUDENT MESSAGE_TEXT
[message]
speaker=student
message={MESSAGE_TEXT}
[/message]
#enddef
# TODO: decide to use or not
#define NARRATOR CAPTION_TEXT MESSAGE_TEXT
[message]
speaker=narrator
@ -85,9 +79,10 @@
[message]
speaker=narrator
caption= _"Undo"
message= _"Dont forget, you can press <b>u</b> to undo most things; useful for correcting mistakes."
image=wesnoth-icon.png
message= _"Dont forget, you can press <b>u</b> to undo most things; useful for correcting mistakes."
[/message]
[allow_undo][/allow_undo]
#enddef
@ -158,3 +153,218 @@
<big>Click a mouse button or press the spacebar to continue...</big>"
# Note: we would not like the user to "press any key" (for example, Esc)
#enddef
#define CHECK_INTELLIGENT NAME
[if]
[variable]
# Ignoring single-trait units, as we don't have those during the tutorial
name={NAME}.modifications.trait.length
equals=2
[/variable]
[then]
[if]
[variable]
name={NAME}.modifications.trait[0].id
equals=intelligent
[/variable]
[or]
[variable]
name={NAME}.modifications.trait[1].id
equals=intelligent
[/variable]
[/or]
[then]
{VARIABLE is_intelligent yes}
[/then]
[else]
{VARIABLE is_intelligent no}
[/else]
[/if]
[/then]
[else]
{VARIABLE is_intelligent no}
[/else]
[/if]
#enddef
#define IMPORTANT_UNIT NAME
{CHECK_INTELLIGENT {NAME}}
[if]
# Archer needs 44/35(intelligent), Fighter needs 40/32
[variable]
name={NAME}.type
equals=Elvish Archer
[/variable]
{BOOLEQ is_intelligent no}
[variable]
name={NAME}.experience
greater_than=35
[/variable]
[or]
[variable]
name={NAME}.type
equals=Elvish Archer
[/variable]
{BOOLEQ is_intelligent yes}
[variable]
name={NAME}.experience
greater_than=26
[/variable]
[/or]
[or]
[variable]
name={NAME}.type
equals=Elvish Fighter
[/variable]
{BOOLEQ is_intelligent no}
[variable]
name={NAME}.experience
greater_than=31
[/variable]
[/or]
[or]
[variable]
name={NAME}.type
equals=Elvish Fighter
[/variable]
{BOOLEQ is_intelligent yes}
[variable]
name={NAME}.experience
greater_than=23
[/variable]
[/or]
[then]
{VARIABLE commented 0}
{FOREACH galdrad_comments i}
[if]
[variable]
name=galdrad_comments[$i].id
equals=${NAME}.id
[/variable]
[then]
{VARIABLE commented 1}
[/then]
[/if]
{NEXT i}
{CLEAR_VARIABLE i}
[if]
{NUMEQ commented 0}
[then]
[store_unit]
[filter]
id=${NAME}.id
[/filter]
variable=galdrad_comments
mode=append
[/store_unit]
{TEACHER (_"That unit is about one kill (8 experience points) away from gaining a level! Do not let it die!")}
[/then]
[/if]
{CLEAR_VARIABLE commented}
[/then]
[/if]
{CLEAR_VARIABLE is_intelligent}
#enddef
#define DEFENDER_INJURED NAME
[if]
{NUMEQ {NAME}.side 1}
[variable]
name={NAME}.hitpoints
less_than=19
[/variable]
[variable]
name={NAME}.hitpoints
greater_than=0
[/variable]
[then]
{VARIABLE complained 0}
# FIXME: If same unit gets attacked twice in same turn, this
# does not seem to find it the second time. Some internal bug?
{FOREACH unit_complained i}
[if]
[variable]
name=unit_complained[$i].id
equals=${NAME}.id
[/variable]
[then]
{VARIABLE complained 1}
[/then]
[/if]
{NEXT i}
[if]
{NUMEQ complained 0}
[then]
[store_unit]
[filter]
id=${NAME}.id
[/filter]
variable=unit_complained
mode=append
[/store_unit]
[if]
{NUMEQ complain_msg 2}
[then]
[message]
speaker=second_unit
message= _"I hope I have a chance to retreat after this!"
[/message]
{VARIABLE_OP complain_msg add 1}
[/then]
[/if]
[if]
{NUMEQ complain_msg 1}
[then]
[message]
speaker=second_unit
message= _"One lucky attack by an Orcish Grunt, and Im done for!"
[/message]
{VARIABLE_OP complain_msg add 1}
[/then]
[/if]
[if]
{NUMEQ complain_msg 0}
[then]
[message]
speaker=second_unit
message= _"Ouch! I could make use of some healing in a village."
[/message]
{VARIABLE_OP complain_msg add 1}
[/then]
[/if]
[/then]
[/if]
{CLEAR_VARIABLE i}
{CLEAR_VARIABLE complained}
{IMPORTANT_UNIT {NAME}}
[/then]
[/if]
#enddef
#define CHECK_INCOME
[if]
{NUMEQ income_exceeded 0}
[then]
[store_side]
[/store_side]
[if]
[variable]
name=side.gold
greater_than=13
[/variable]
[then]
{VARIABLE income_exceeded 1}
# {STUDENT (_"I have $side.gold gold; enough to recruit!")}
{TALK_ABOUT_LOC 9,15 (_"Yes, keep recruiting more units: I think you might need them!")}
[/then]
[/if]
{CLEAR_VARIABLE side}
[/then]
[/if]
#enddef