Address bug #12269 by making Ratheln's appearance trigger...
...any time the dwarves get through the midpoint of the pass and making his survival a requirement for this scenario only. In the process, introduce a REMOVE_HERO_ICON macro to the standard library. I have tweaked Liberty to use it.
This commit is contained in:
parent
42ad75bc00
commit
bdbf60838a
6 changed files with 134 additions and 87 deletions
|
@ -379,21 +379,7 @@
|
|||
id=Harper
|
||||
[/recall]
|
||||
|
||||
[store_unit]
|
||||
[filter]
|
||||
id=Harper
|
||||
[/filter]
|
||||
|
||||
kill=no
|
||||
variable=stored_Harper
|
||||
[/store_unit]
|
||||
|
||||
[remove_unit_overlay]
|
||||
x,y=$stored_Harper.x,$stored_Harper.y
|
||||
image=misc/hero-icon.png
|
||||
[/remove_unit_overlay]
|
||||
|
||||
{CLEAR_VARIABLE stored_Harper}
|
||||
{REMOVE_HERO_ICON id=Harper}
|
||||
|
||||
[message]
|
||||
speaker=Baldras
|
||||
|
|
|
@ -4,19 +4,19 @@ usage=map
|
|||
Mm , Hh , Hh , Ha , Ha , Hh , Hh , Hh , Hh , Gg , Ai , Ai , Ai , Aa^Fpa , Aa^Fpa , Mm , Mm , Gg , Gg , Gg , Gg , Mm , Mm , Mm , Mm , Mm , Mm , Mm , Mm , Mm , Mm , Hh
|
||||
Mm , Mm , Mm , Ha , Ha , Hh , Hh , Hh , Ai , Ai , Ai , Ai , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Gg , Chr , Chr , Chr , Mm , Mm , Mm , Mm , Mm , Mm , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa
|
||||
Mm , Mm , Ha , Ha , Ha , Hh , Ai , Ai , Ai , Ai , Mm , Aa^Fpa , Mm , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Chr , 2 Khr , Chr , Aa^Fpa , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa
|
||||
Mm , Mm , Mm^Xm , Mm , Wo , Ai , Wo , Ai , Mm , Mm , Mm , Aa^Fpa , Mm , Mm^Vhh , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Mm , Chr , Mm , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa
|
||||
Mm , Mm , Mm , Mm , Wo , Wo , Mm , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Mm , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm^Vhh , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa
|
||||
Mm , Mm , Mm^Xm , Mm , Wo , Ai , Wo , Ai , Mm , Mm , Mm , Aa^Fpa , Mm , Mm^Vc , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Mm , Chr , Mm , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa
|
||||
Mm , Mm , Mm , Mm , Wo , Wo , Mm , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Mm , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm^Vc , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa
|
||||
Mm , Mm^Xm , Mm , Wo , Wo , Wo , Mm , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm , Aa^Fpa , Hh , Hh
|
||||
Mm , Mm , Mm , Wo , Wo , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Mm , Mm , Aa^Fpa , Aa^Fpa , Mm^Vhh , Mm , Mm , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Hh , Hh , Hh , Hh
|
||||
Mm , Mm , Mm , Wo , Wo , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Mm , Mm , Aa^Fpa , Aa^Fpa , Mm^Vc , Mm , Mm , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Hh , Hh , Hh , Hh
|
||||
Mm , Mm , Ha , Wo , Wo , Mm , Ha , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Mm , Mm , Hh , Mm , Hh
|
||||
Ha , Ha , Ha , Wo , Wo , Ha , Aa^Fpa , Ha^Vhha , Aa^Fpa , Mm , Re , Mm , Re , Re , Re , Mm , Mm , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm , Mm , Mm^Vhh , Aa^Fpa , Aa^Fpa , Mm , Mm , Hh , Mm , Mm
|
||||
Ha , Ha , Ha , Wo , Wo , Ha , Aa^Fpa , Ha^Vca , Aa^Fpa , Mm , Re , Mm , Re , Re , Re , Mm , Mm , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm , Mm , Mm^Vc , Aa^Fpa , Aa^Fpa , Mm , Mm , Hh , Mm , Mm
|
||||
Wo , Ha , Wo , Wo , Wo , Aa^Fpa , Aa^Fpa , Aa^Fpa , Re , Re , Re , Re , Re , Re , Re , Re , Re , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Hh , Hh
|
||||
Wo , Wo , Wo , Wo , Re , Re , Re , Re , Re , Re , Mm , Re , Mm , Aa^Fpa , Mm , Re , Re , Re , Re , Aa^Vea , Mm , Mm , Re , Mm , Mm , Aa^Fpa , Aa^Fpa , Gg , Mm , Mm^Vhh , Hh , Hh
|
||||
Wo , Wo , Wo , Wo , Re , Re , Re , Re , Re , Re , Mm , Re , Mm , Aa^Fpa , Mm , Re , Re , Re , Re , Ha^Vca , Mm , Mm , Re , Mm , Mm , Aa^Fpa , Aa^Fpa , Gg , Mm , Mm^Vc , Hh , Hh
|
||||
Re , Ce , Ce , Re , Re , Re , Re , Re , Aa^Fpa , Mm , Mm , Mm , Mm , Aa^Fpa , Mm , Mm , Mm , Re , Re , Re , Re , Re , Re , Re , Re , Aa^Fpa , Mm , Mm , Re , Re , Re , Hh
|
||||
Re , 1 Ke , Ce , Re , Aa^Fpa , Aa^Fpa , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm^Vhh , Aa^Fpa , Aa^Fpa , Mm , Mm^Vhh , Aa^Fpa , Aa^Fpa , Re , Re , Re , Mm , Re , Re , Re , Re , Re , Re , Re , Re , Re
|
||||
Re , 1 Ke , Ce , Re , Aa^Fpa , Aa^Fpa , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm^Vc , Aa^Fpa , Aa^Fpa , Mm , Mm^Vc , Aa^Fpa , Aa^Fpa , Re , Re , Re , Mm , Re , Re , Re , Re , Re , Re , Re , Re , Re
|
||||
Re , Ce , Mm , Mm , Mm , Aa^Fpa , Aa^Vea , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Mm , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm , Mm , Mm , Re , Re , Re , Ha , Hh , Hh , Re
|
||||
Hh , Hh , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Mm , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm , Mm , Mm , Mm , Mm^Vhh , Aa^Fpa , Aa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h , Hh , Aa^Fpa
|
||||
Mm , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Mm , Mm , Mm , Aa^Fpa , Aa^Fpa , Aa^Fpa , Mm , Hh , Hh , Hh
|
||||
|
|
|
@ -171,82 +171,120 @@
|
|||
[/event]
|
||||
|
||||
#define RATHELN_ENCOUNTER
|
||||
[if]
|
||||
[have_unit]
|
||||
#wmllint: recognize Ratheln
|
||||
id=Ratheln
|
||||
[/have_unit]
|
||||
[else]
|
||||
[unit]
|
||||
type=Arch Mage
|
||||
id=Ratheln
|
||||
profile=portraits/ratheln.png
|
||||
name= _ "Ratheln"
|
||||
side=1
|
||||
[modifications]
|
||||
{TRAIT_LOYAL}
|
||||
{TRAIT_STRONG}
|
||||
[/modifications]
|
||||
x=19
|
||||
y=11
|
||||
[/unit]
|
||||
|
||||
[message]
|
||||
speaker="Ratheln"
|
||||
message=_"Hail, I am Ratheln. If you're traveling down the pass, please take me with you. I am near freezing and starving to death up here."
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
speaker="Angarthing"
|
||||
message=_"Pardon my curiosity, but what is a firemage doing freezing to death?"
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
speaker="Ratheln"
|
||||
message=_"In case you haven't noticed, there is a serious shortage of both firewood and food in this gods-forsaken slot. And the damned gryphons descend on me whenever I stir out of this shack. I've had nothing to eat but flash-roasted gryphon for the last three weeks."
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
speaker="Aiglondur"
|
||||
message=_"Where were you bound when you got stuck here?"
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
speaker="Ratheln"
|
||||
message=_"There is a school of mages near the east end of the pass. They've an opening for an instructor, and they're expecting me."
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
speaker="Angarthing"
|
||||
message=_"Let's take him with us, Aiglondur. We know little about the country beyond to the east; we've had few reports on it since before the orcs took Knalga. Those mages should know at least rumors."
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
speaker="Aiglondur"
|
||||
message=_"Aye. And I'd not leave anyone who had done my kin no harm stranded to starve."
|
||||
[/message]
|
||||
[/else]
|
||||
[/if]
|
||||
#enddef
|
||||
|
||||
# If user hasn't found Ratheln by a reasonable time, nudge a little.
|
||||
[event]
|
||||
name=turn 8
|
||||
|
||||
[if]
|
||||
[have_unit]
|
||||
#wmllint: recognize Ratheln
|
||||
id=Ratheln
|
||||
[/have_unit]
|
||||
|
||||
[else]
|
||||
[message]
|
||||
speaker="Angarthing"
|
||||
message=_"That hut near the top of the pass...something is glowing inside it. We should investigate."
|
||||
[/message]
|
||||
[/else]
|
||||
[/if]
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=moveto
|
||||
first_time_only=yes
|
||||
[filter]
|
||||
side=1
|
||||
x=19
|
||||
y=10
|
||||
# Should be triggered regardless of how the Dwarves move through.
|
||||
# It will look a little odd if they've all decided to slog through
|
||||
# the mountains to the extreme north or south, but that is quite
|
||||
# unlikely.
|
||||
x=18-21
|
||||
y=4-21
|
||||
[/filter]
|
||||
|
||||
{RATHELN_ENCOUNTER}
|
||||
[if]
|
||||
[have_unit]
|
||||
id=Ratheln
|
||||
[/have_unit]
|
||||
[else]
|
||||
[unit]
|
||||
type=Arch Mage
|
||||
id=Ratheln
|
||||
profile=portraits/ratheln.png
|
||||
name= _ "Ratheln"
|
||||
side=1
|
||||
[modifications]
|
||||
{TRAIT_LOYAL}
|
||||
{TRAIT_STRONG}
|
||||
[/modifications]
|
||||
{IS_HERO}
|
||||
unrenamable=yes
|
||||
x=19
|
||||
y=11
|
||||
[/unit]
|
||||
|
||||
[message]
|
||||
speaker="Ratheln"
|
||||
message=_"Hail, I am Ratheln. If you're traveling down the pass, please take me with you. I am near freezing and starving to death up here."
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
speaker="Angarthing"
|
||||
message=_"Pardon my curiosity, but what is a firemage doing freezing to death?"
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
speaker="Ratheln"
|
||||
message=_"In case you haven't noticed, there is a serious shortage of both firewood and food in this gods-forsaken slot. And the damned gryphons descend on me whenever I stir out of this shack. I've had nothing to eat but flash-roasted gryphon for the last three weeks."
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
speaker="Aiglondur"
|
||||
message=_"Where were you bound when you got stuck here?"
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
speaker="Ratheln"
|
||||
message=_"There is a school of mages near the east end of the pass. They've an opening for an instructor, and they're expecting me."
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
speaker="Angarthing"
|
||||
message=_"Let's take him with us, Aiglondur. We know little about the country beyond to the east; we've had few reports on it since before the orcs took Knalga. Those mages should know at least rumors."
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
speaker="Aiglondur"
|
||||
message=_"Aye. And I'd not leave anyone who had done my kin no harm stranded to starve."
|
||||
[/message]
|
||||
[/else]
|
||||
[/if]
|
||||
[/event]
|
||||
|
||||
# In this scenario only, losing Ratheln is fatal.
|
||||
# This avoids continuity problems in the next one.
|
||||
[event]
|
||||
name=turn 12
|
||||
name=die
|
||||
[filter]
|
||||
id="Ratheln"
|
||||
[/filter]
|
||||
[message]
|
||||
speaker=Ratheln
|
||||
message= _ "This is no fit death for a mage of fire!"
|
||||
[/message]
|
||||
|
||||
{RATHELN_ENCOUNTER}
|
||||
[message]
|
||||
speaker="Angarthing"
|
||||
message=_"The snow has redoubled its fury, as if his presence had been holding it back. I do not see a way forward for us."
|
||||
[/message]
|
||||
|
||||
[endlevel]
|
||||
result=defeat
|
||||
[/endlevel]
|
||||
[/event]
|
||||
#undef RATHELN_ENCOUNTER
|
||||
|
||||
[event]
|
||||
name=turn 9
|
||||
|
@ -290,6 +328,8 @@
|
|||
message=_"Aye. But I've a grim feeling we might be going to discover that in person."
|
||||
[/message]
|
||||
|
||||
{REMOVE_HERO_ICON id=Ratheln}
|
||||
|
||||
[endlevel]
|
||||
result=victory
|
||||
[/endlevel]
|
||||
|
|
|
@ -28,6 +28,27 @@
|
|||
overlays="misc/hero-icon.png"
|
||||
#enddef
|
||||
|
||||
#define REMOVE_HERO_ICON FILTER
|
||||
# Remove the hero icon from a unit by ID or other filter
|
||||
[store_unit]
|
||||
[filter]
|
||||
{FILTER}
|
||||
[/filter]
|
||||
|
||||
kill=no
|
||||
variable=hero_removal_target
|
||||
[/store_unit]
|
||||
|
||||
[remove_unit_overlay]
|
||||
x,y=$hero_removal_target.x,$hero_removal_target.y
|
||||
image=misc/hero-icon.png
|
||||
[/remove_unit_overlay]
|
||||
|
||||
[clear_variable]
|
||||
name=hero_removal_target
|
||||
[/clear_variable]
|
||||
#enddef
|
||||
|
||||
#define DOT X Y
|
||||
# Mark the specified map hex with a dot.
|
||||
[image]
|
||||
|
|
|
@ -17,7 +17,7 @@ sanity-check: unresolved lint images-unused
|
|||
|
||||
lint:
|
||||
# Check for obsolete WML, broken references, consistency.
|
||||
./wmllint --dryrun --nolift $(MAINLINE) $(UMC)
|
||||
./wmllint --dryrun $(MAINLINE) $(UMC)
|
||||
|
||||
unresolved:
|
||||
@echo "# Report on unresolved macro calls and resource references"
|
||||
|
|
|
@ -1612,7 +1612,7 @@ void ai::analyze_potential_recruit_combat()
|
|||
|
||||
unit const &un = j->second;
|
||||
const unit_type_data::unit_type_map::const_iterator enemy_info = unit_type_data::types().find(un.type_id());
|
||||
VALIDATE((enemy_info != unit_type_data::types().end()), _("Unknown unit type : ") + un.type_id());
|
||||
VALIDATE((enemy_info != unit_type_data::types().end()), _("Unknown unit type : ") + un.type_id() + " while soring units.");
|
||||
|
||||
int weight = un.cost() * un.hitpoints() / un.max_hitpoints();
|
||||
weighting += weight;
|
||||
|
|
Loading…
Add table
Reference in a new issue