Closed Konrad22 closed 6 years ago
Depends on where in the boss battle you are. Here's a rough outline based on the WML for three stages of the sequence:
[...]
#
# Argan absorbs all damage throughout stage 1 once it's possible to land
# hits on him (i.e. once the player can no longer cast the Union on him).
#
[...]
[event]
name=boss stage 2
[...]
#
# In this stage Argan can only take full damage from the Union. Other forms
# of damage will be absorbed. However, because he has a lot more HP than
# Elyssa and we need to bring him down to 0%, we only want him to
# regenerate a percentage of the inflicted damage rather than always go
# back to 100% on each hit (the most common gameplay complaint about legacy
# IftU).
#
# Some code in these three event handlers is supposed to match the
# equivalent in BOSS_ABSORB_DAMAGE_EX.
#
[event]
name=argan absorb damage
first_time_only=no
[filter_second_attack]
[not]
special=union
[/not]
[/filter_second_attack]
[set_variables]
name=unit
mode=merge
[value]
# HACK: cross-event variable!
hitpoints={BOSS_REGEN_ATTACK_DAMAGE {DIFF 0.60 0.85 0.90}}
[/value]
[/set_variables]
[...]
#
# Advance to stage 3 once Argan goes down to 0 HP from the Union.
#
[...]
[event]
name=boss stage 3
[...]
#
# Argan can take hits from everyone for this stage but Elynia must be the
# one to inflict the killing blow.
#
{BOSS_IMMORTALITY Argan ({VARIABLE_NUMERICAL_EQUALS boss_stage 3}) {DIFF 25 40 50}}
[...]
{BUG_ON ({VARIABLE_LEXICAL_NOT_EQUALS second_unit.id Elynia}) ("Boss died to an unexpected unit with id $second_unit.id (cheating?)")}
{BUG_ON (
[not]
[have_unit]
id=Elynia
[filter_adjacent]
id=Argan
[/filter_adjacent]
[/have_unit]
[/not]
) ("Boss and Elynia not adjacent")}
[...]
Oh. Stage 2.
That means, if I deal more than 10 dmg, I can actually lower his hitpoints. Is that allowed?