Hackers Guide to ESPGaluda II: Enemy Behavior/Scoring
State Structure
struct St1boss
{
// 0x000
game_manager_t *gm = game manager;
// 0x0F8
u32 form_0_timeout = 10800; // in frames. 180 seconds
// 0x0FC
u32 form_1_timeout = 10800; // in frames. 180 seconds
// 0x100
u32 switch_0;
// 0x104
u32 switch_1;
// 0x120
boss_manager_t *bman = boss manager;
// 0x18C
u32 form_0_life = 85376;
// 0x190
u32 form_1_life = 84448;
// 0x1E4
u32 current_form = 0;
// 0x1EA
u16 unk_2 = 1;
}
Code
BManMain(St1boss *this)
{
if ( g_tomare != 0 ) // Tomare == stop
return;
if ( this->current_form == 0 )
{
if ( this->switch_0 != 0 )
return;
if ( --(this->form_0_timeout) < 0 )
{
this->form_0_life = 0;
this->switch_0 = 1;
this->unk_2 = 1;
BManAttReleaseAll(this->bman);
BManModeReleaseAll(this->bman);
BManModeReq(this->bman, St1bMode_1, 0); // Requests switching to second form
return;
}
return;
}
else if ( this->current_form == 1 )
{
if ( this->switch_1 != 0 )
return;
if ( --(this->form_1_timeout) >= 0 )
return;
if ( EneEnmei(this->gm) ) // All players dead (Enmei translates to 'life extension')
{
this->form_1_timeout = 180;
return;
}
this->unk_2 = 1;
this->switch_1 = 1;
this->form_1_life = 0;
BossDeathSet(this->gm);
BManAttReleaseAll(this->bman);
BManModeReleaseAll(this->bman);
BManModeReq(this->bman, St1bMode_2, 0); // Requests switching to third form
return;
}
}
[TOP]