GameMaker Touhou Engine   Home   Downloads   Documentation

_BOSS_PARENT


The parent object for boss enemies.


Parent: _ENEMY_PARENT


Locals:


Name Value/Default Significance
_HEALTH <integer>/0 The amount of health remaining in the boss' current pattern.
_CURR_PHASE <integer(-1-)>/-1 The index of the current pattern the boss is on.
_BAR <integer(0-)>/0 The index of the current health bar the boss is on.
_ARMOR <integer>/0 Each time the boss takes damage, reduce it by this amount.
_TIME <integer(-1-)>/-1 The index of the starting timer for the pattern the boss is currently on.
_PHASES <integer array>/noone The array that stores the amount of health for each pattern.
_PFLOW <timeline array>/noone The array that stores the timeline for each pattern.
_DEATH_EFF <sprite>/noone The sprite to create a particle out of upon the boss' death.
_ITEMS <object array>/noone The array that stores objects to be created when the boss dies (usually items).
_BARS <integer array>/noone The array that stores the amount of patterns for each health bar.
_TIMES <integer array>/noone The array that stores the timer for each pattern.
_NEXT_TL <timeline>/noone The timeline to start after the boss dies.
_IMMUNE <boolean>/true true: The boss is impervious to all forms of damage. false: The boss can be hurt at the time of access.
_BIMMUNE <boolean>/true true: The boss is impervious to damage from bombs. false: The boss can be hurt by bombs at the time of access.
_ACCEL <integer>/0 The number that the boss' movement speed is to increase by each step. (regulated in child object)
_CURRENT_SPELL_NAME <string>/"" The internal name of the currently ongoing spell.
_UNTARGETABLE <boolean>/false true: The enemy is untargetable and cannot be affected by player shots (but will also not damage the player upon collision). false: The enemy will collide with and take damage (if not immune) from player shots normally.

Events:


Trigger # Actions
Create 1 Set local variables to default values. Call _ENEMY_KILL_ALL() and _DESTROY_BULLET_ALL(). Set Alarm[10].
Destroy 1 Call _DESTROY_BULLET_ALL().
Alarm[10] 1 If there is no active dialogue sequence, then: increase the locals that relate to the current pattern, start the next timeline in _PFLOW, update own health. Call _UPDATE_SET_BOSS_TIMER(). Set _IMMUNE, _BIMMUNE and global._SURVIVAL_CARD to false. If there isn't an active dialogue sequence, reset Alarm[10] to a small value.
Begin Step 1 Check for collision with player bullets and bombs, reduce own health if colliding and not immune/untargetable. Check for collision with the player, kill them if not untargetable and the player is not immune.
End Step 1 Check if the current pattern has been defeated. If so, then check whether it's the last one. If so, create the objects from _ITEMS and a particle with the sprite designated by _DEATH_EFF, start _NEXT_TL through global._STAGE_OBJECT, perform cleanup, destroy self. If not, transfer to the next phase via Alarm[10]. If the defeated pattern is a spell card, call _UPDATE_SPELL_CAPTURES() (for the current spell), _UPDATE_UNSET_SPELL_BONUS() and _DRAW_SPELLBG_UNSET(). Regardless, call _DESTROY_IF_OUTSIDE_BOUNDS().
Draw 1 Draw self. (necessary due to the way _HEALTH_DRAW works)