UtBS S06b: Improve Grog spawn

This commit is contained in:
Descacharrado 2021-12-04 20:32:41 +01:00 committed by GitHub
parent 9d5271b98a
commit d0ee13455c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -210,6 +210,7 @@
# remove keep
# create elf units
# create AI=guardian starting units
# create Grog
[event]
name=prestart
@ -288,6 +289,7 @@
value=0
[/set_variable]
{VARIABLE Grog_found no}
{VARIABLE hermit_trigger no}
#possible locations for tentacle spawning (27-30 & 13-17 -> 4*5=20)
@ -406,6 +408,25 @@
# show where to go at start
{PLACE_IMAGE items/gohere.png 28 32}
# create Grog
[unit]
type=Troll
id=Grog
name= _ "Grog"
profile=portraits/trolls/troll-hero-alt.png
x=7
y=28
side=3
unrenamable=yes
hitpoints=25
facing=s
[modifications]
{TRAIT_LOYAL}
{TRAIT_STRONG}
[/modifications]
[/unit]
[/event]
# starting events
@ -786,6 +807,97 @@
# When player sees Vengeful Dwarf and troll prisoner (sighted version disabled)
# Grog and the Dwarf cannot kill eachother unless dwarf advances (many turns)
[event]
name=attack
first_time_only=no
[filter]
id=Grog, Vengeful Dwarf
[/filter]
[store_unit]
[filter]
id=Grog
[/filter]
variable=Grog_var
[/store_unit]
[store_unit]
[filter]
id=Vengeful Dwarf
[/filter]
variable=VDwarf_var
[/store_unit]
[/event]
{FORCE_CHANCE_TO_HIT id="Vengeful Dwarf" id=Grog 0 (
[variable]
name=Grog_var.hitpoints
less_than_equal_to=24
[/variable]
[variable]
name=VDwarf_var.level
equals=1
[/variable]
)}
{FORCE_CHANCE_TO_HIT id=Grog id="Vengeful Dwarf" 0 (
[variable]
name=VDwarf_var.hitpoints
less_than_equal_to=31
[/variable]
[variable]
name=VDwarf_var.level
equals=1
[/variable]
)}
# Everytime Grog is attacked, he loses 1 xp and the dwarf loses 2 xp until the fight is found
[event]
name=attack end
first_time_only=no
[filter]
id=Vengeful Dwarf, Grog
[/filter]
[filter_second]
id=Grog, Vengeful Dwarf
[/filter_second]
[filter_condition]
[and]
[variable]
name=Grog_found
equals=no
[/variable]
[/and]
[/filter_condition]
[modify_unit]
[filter]
id=Grog
[/filter]
[effect]
apply_to=experience
set=0
[/effect]
[/modify_unit]
[modify_unit]
[filter]
id=Vengeful Dwarf
[/filter]
[effect]
apply_to=experience
set=0
[/effect]
[/modify_unit]
[/event]
# When Grog is found, the following event triggers.
[event]
name=moveto
@ -800,21 +912,7 @@
y=27-34
[/remove_shroud]
[unit]
type=Troll
id=Grog
name= _ "Grog"
profile=portraits/trolls/troll-hero-alt.png
x=7
y=28
side=3
hitpoints=25
unrenamable=yes
[modifications]
{TRAIT_LOYAL}
{TRAIT_STRONG}
[/modifications]
[/unit]
{CLEAR_VARIABLE Grog_found}
[message]
speaker=Vengeful Dwarf
@ -1867,7 +1965,7 @@
action=delete
[/micro_ai]
{CLEAR_VARIABLE tentacle_count}
{CLEAR_VARIABLE tentacle_count,Grog_var,VDwarf_var}
[/event]
[event]