GameMaker Touhou Engine   Home   Downloads   Documentation

_BOSS_PARENT


The parent object for boss enemies.


Parent: _ENEMY_PARENT


Locals:


Name Type Significance
_HEALTH Integer The amount of health remaining in the boss' current pattern.
_CURR_PHASE Integer The index of the current pattern the boss is on. Shouldn't ever be below -1 or exceed the last index in _PFLOW.
_BAR Non-negative Integer The index of the current health bar the boss is on.
_ARMOR Integer Each time the boss takes damage, reduce it by this amount.
_TIME Integer The index of the starting timer the boss is on. Shouldn't ever be below -1 or exceed the last index in _TIMES.
_PHASES Integer Array The array that stores the amount of health for each pattern.
_PFLOW Object Reference Array The array that stores the object ID for the timeline object dedicated pattern.
_DEATH_EFF Reference to Sprite The sprite to create a particle out of upon the boss' death.
_ITEMS Object Reference Array The array that stores objects to be created when the boss dies (usually items).
_BARS Integer Array The array that stores the index of the last pattern for each health bar (counted from 0).
_TIMES Integer Array The array that stores the timer for each pattern.
_NEXT_TL Reference to Timeline The timeline to start after the boss dies.
_IMMUNE Boolean Whether or not the boss is immune to all forms of damage.
_BIMMUNE Boolean Whether or not the boss is immune to damage from player bombs.
_ACCEL Float The boss' current deacceleration.
_CURRENT_SPELL_ID String The unique identification number of the currently ongoing spell.
_UNTARGETABLE Boolean Indicates whether the boss will interact with the player's shots and bombs. If set to true, player shots and bombs will pass through the boss, and the player will not take damage on collision with the boss.
_SECONDARY_BOSS Boolean In the event that there are multiple bosses, this variable dictates whether or not this instance controls the shifting between phases. Only one boss instance should have this set to true at one time.
_MOVEMENT_TYPE Non-negative Integer The way in which the boss is currently moving. (see _BOSS_MOVE macros)
_MOVEMENT_SPEED Integer The speed at which the boss will start moving when they next stop standing still.
_MOVEMENT_ACCEL Float The boss' deacceleration during the next peformed movement.
_MOVEMENT_SINGLE Boolean Whether or not the boss' next movement should only be peformed once.
_MOVEMENT_INTERVAL Non-negative Integer The time it takes between individual movements.
_MOVEMENT_NEXT_X Integer The X-coordinate of the next point the boss will move to (ignored if the boss is directed to move randomly).
_MOVEMENT_NEXT_Y Integer The Y-coordinate of the next point the boss will move to (ignored if the boss is directed to move randomly).
_MOVEMENT_MIN_X Integer The minimum X-coordinate the boss can move towards when moving randomly.
_MOVEMENT_MIN_Y Integer The minimum Y-coordinate the boss can move towards when moving randomly.
_MOVEMENT_MAX_X Integer The maximum X-coordinate the boss can move towards when moving randomly.
_MOVEMENT_MAX_Y Integer The maximum Y-coordinate the boss can move towards when moving randomly.

Events:


Trigger # Actions
Create 1 Declare local variables, clear all enemies and bullets. Set Alarm 10.
Destroy 1 Clear all bullets from the screen.
Alarm 9 1 If the boss isn't to move, reset this alarm. If it's moving randomly, set it's next X and Y coordinates to random ones within the boundaries. Regardless, start moving towards the designated point and if _MOVEMENT_SINGLE is false, reset this alarm.
Alarm 10 1 Move to the next phase if there isn't an active dialogue sequence, else reset this alarm. Phase -1 indicates that the boss fight has not started yet.
Step 1 Check for collision with the player, the player's bullets and their bombs. If the boss is meant to interact with them, perform appropriate action if collision is found. Perform deacceleration, and if the boss is close enough to it's destination point while moving, stop moving and jump to that point.
End Step 1 If own health is below 0, end the current phase, and also set the health of other present bosses to 0. If it's the final phase, destroy self. If not, clear all the bullets, go invincible and set Alarm 10. Update the info for any possible ongoing spell card.
Draw 1 Draw self. (necessary due to the way _HEALTH_DRAW works)