_DMG_REAC_ -> _DMG_REACT_

This commit is contained in:
Dragorn421 2025-06-01 17:15:15 +02:00
parent 01a04c2c56
commit 5d95bf33ac
No known key found for this signature in database
GPG Key ID: 381AEBAF3D429335
18 changed files with 807 additions and 807 deletions

View File

@ -128,47 +128,47 @@ static ColliderQuadInit sQuadInit = {
}; };
typedef enum ArmosDamageReaction { typedef enum ArmosDamageReaction {
/* 0 */ AM_DMG_REAC_NONE, // used by anything that can't kill the armos /* 0 */ AM_DMG_REACT_NONE, // used by anything that can't kill the armos
/* 1 */ AM_DMG_REAC_NUT, /* 1 */ AM_DMG_REACT_NUT,
/* 6 */ AM_DMG_REAC_STUN = 6, // doesn't include deku nuts /* 6 */ AM_DMG_REACT_STUN = 6, // doesn't include deku nuts
/* 13 */ AM_DMG_REAC_ICE = 13, /* 13 */ AM_DMG_REACT_ICE = 13,
/* 14 */ AM_DMG_REAC_MAGIC_FIRE_LIGHT, /* 14 */ AM_DMG_REACT_MAGIC_FIRE_LIGHT,
/* 15 */ AM_DMG_REAC_KILL // any damage source that can kill the armos (and isn't a special case) /* 15 */ AM_DMG_REACT_KILL // any damage source that can kill the armos (and isn't a special case)
} ArmosDamageReaction; } ArmosDamageReaction;
static DamageTable sDamageTable = { static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, AM_DMG_REAC_NUT), /* Deku nut */ DMG_ENTRY(0, AM_DMG_REACT_NUT),
/* Deku stick */ DMG_ENTRY(2, AM_DMG_REAC_NONE), /* Deku stick */ DMG_ENTRY(2, AM_DMG_REACT_NONE),
/* Slingshot */ DMG_ENTRY(1, AM_DMG_REAC_NONE), /* Slingshot */ DMG_ENTRY(1, AM_DMG_REACT_NONE),
/* Explosive */ DMG_ENTRY(2, AM_DMG_REAC_KILL), /* Explosive */ DMG_ENTRY(2, AM_DMG_REACT_KILL),
/* Boomerang */ DMG_ENTRY(0, AM_DMG_REAC_STUN), /* Boomerang */ DMG_ENTRY(0, AM_DMG_REACT_STUN),
/* Normal arrow */ DMG_ENTRY(2, AM_DMG_REAC_KILL), /* Normal arrow */ DMG_ENTRY(2, AM_DMG_REACT_KILL),
/* Hammer swing */ DMG_ENTRY(2, AM_DMG_REAC_KILL), /* Hammer swing */ DMG_ENTRY(2, AM_DMG_REACT_KILL),
/* Hookshot */ DMG_ENTRY(0, AM_DMG_REAC_STUN), /* Hookshot */ DMG_ENTRY(0, AM_DMG_REACT_STUN),
/* Kokiri sword */ DMG_ENTRY(1, AM_DMG_REAC_NONE), /* Kokiri sword */ DMG_ENTRY(1, AM_DMG_REACT_NONE),
/* Master sword */ DMG_ENTRY(2, AM_DMG_REAC_KILL), /* Master sword */ DMG_ENTRY(2, AM_DMG_REACT_KILL),
/* Giant's Knife */ DMG_ENTRY(4, AM_DMG_REAC_KILL), /* Giant's Knife */ DMG_ENTRY(4, AM_DMG_REACT_KILL),
/* Fire arrow */ DMG_ENTRY(2, AM_DMG_REAC_KILL), /* Fire arrow */ DMG_ENTRY(2, AM_DMG_REACT_KILL),
/* Ice arrow */ DMG_ENTRY(4, AM_DMG_REAC_ICE), /* Ice arrow */ DMG_ENTRY(4, AM_DMG_REACT_ICE),
/* Light arrow */ DMG_ENTRY(2, AM_DMG_REAC_KILL), /* Light arrow */ DMG_ENTRY(2, AM_DMG_REACT_KILL),
/* Unk arrow 1 */ DMG_ENTRY(2, AM_DMG_REAC_NONE), /* Unk arrow 1 */ DMG_ENTRY(2, AM_DMG_REACT_NONE),
/* Unk arrow 2 */ DMG_ENTRY(2, AM_DMG_REAC_NONE), /* Unk arrow 2 */ DMG_ENTRY(2, AM_DMG_REACT_NONE),
/* Unk arrow 3 */ DMG_ENTRY(2, AM_DMG_REAC_NONE), /* Unk arrow 3 */ DMG_ENTRY(2, AM_DMG_REACT_NONE),
/* Fire magic */ DMG_ENTRY(0, AM_DMG_REAC_MAGIC_FIRE_LIGHT), /* Fire magic */ DMG_ENTRY(0, AM_DMG_REACT_MAGIC_FIRE_LIGHT),
/* Ice magic */ DMG_ENTRY(3, AM_DMG_REAC_ICE), /* Ice magic */ DMG_ENTRY(3, AM_DMG_REACT_ICE),
/* Light magic */ DMG_ENTRY(0, AM_DMG_REAC_MAGIC_FIRE_LIGHT), /* Light magic */ DMG_ENTRY(0, AM_DMG_REACT_MAGIC_FIRE_LIGHT),
/* Shield */ DMG_ENTRY(0, AM_DMG_REAC_NONE), /* Shield */ DMG_ENTRY(0, AM_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, AM_DMG_REAC_NONE), /* Mirror Ray */ DMG_ENTRY(0, AM_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, AM_DMG_REAC_NONE), /* Kokiri spin */ DMG_ENTRY(1, AM_DMG_REACT_NONE),
/* Giant spin */ DMG_ENTRY(4, AM_DMG_REAC_KILL), /* Giant spin */ DMG_ENTRY(4, AM_DMG_REACT_KILL),
/* Master spin */ DMG_ENTRY(2, AM_DMG_REAC_KILL), /* Master spin */ DMG_ENTRY(2, AM_DMG_REACT_KILL),
/* Kokiri jump */ DMG_ENTRY(2, AM_DMG_REAC_NONE), /* Kokiri jump */ DMG_ENTRY(2, AM_DMG_REACT_NONE),
/* Giant jump */ DMG_ENTRY(8, AM_DMG_REAC_KILL), /* Giant jump */ DMG_ENTRY(8, AM_DMG_REACT_KILL),
/* Master jump */ DMG_ENTRY(4, AM_DMG_REAC_KILL), /* Master jump */ DMG_ENTRY(4, AM_DMG_REACT_KILL),
/* Unknown 1 */ DMG_ENTRY(0, AM_DMG_REAC_NONE), /* Unknown 1 */ DMG_ENTRY(0, AM_DMG_REACT_NONE),
/* Unblockable */ DMG_ENTRY(0, AM_DMG_REAC_NONE), /* Unblockable */ DMG_ENTRY(0, AM_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(4, AM_DMG_REAC_KILL), /* Hammer jump */ DMG_ENTRY(4, AM_DMG_REACT_KILL),
/* Unknown 2 */ DMG_ENTRY(0, AM_DMG_REAC_NONE), /* Unknown 2 */ DMG_ENTRY(0, AM_DMG_REACT_NONE),
}; };
static InitChainEntry sInitChain[] = { static InitChainEntry sInitChain[] = {
@ -735,7 +735,7 @@ void EnAm_SetupStunned(EnAm* this, PlayState* play) {
Actor_SetColorFilter(&this->dyna.actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 100); Actor_SetColorFilter(&this->dyna.actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 100);
if (this->damageReaction == AM_DMG_REAC_ICE) { if (this->damageReaction == AM_DMG_REACT_ICE) {
this->iceTimer = 48; this->iceTimer = 48;
} }
@ -810,27 +810,27 @@ void EnAm_UpdateDamage(EnAm* this, PlayState* play) {
} else if ((this->hurtCollider.base.acFlags & AC_HIT) && (this->behavior >= AM_BEHAVIOR_5)) { } else if ((this->hurtCollider.base.acFlags & AC_HIT) && (this->behavior >= AM_BEHAVIOR_5)) {
this->hurtCollider.base.acFlags &= ~AC_HIT; this->hurtCollider.base.acFlags &= ~AC_HIT;
if (this->dyna.actor.colChkInfo.damageReaction != AM_DMG_REAC_MAGIC_FIRE_LIGHT) { if (this->dyna.actor.colChkInfo.damageReaction != AM_DMG_REACT_MAGIC_FIRE_LIGHT) {
this->unk_264 = 0; this->unk_264 = 0;
this->damageReaction = this->dyna.actor.colChkInfo.damageReaction; this->damageReaction = this->dyna.actor.colChkInfo.damageReaction;
Actor_SetDropFlag(&this->dyna.actor, &this->hurtCollider.elem, false); Actor_SetDropFlag(&this->dyna.actor, &this->hurtCollider.elem, false);
if ((this->dyna.actor.colChkInfo.damageReaction == AM_DMG_REAC_NUT) || if ((this->dyna.actor.colChkInfo.damageReaction == AM_DMG_REACT_NUT) ||
(this->dyna.actor.colChkInfo.damageReaction == AM_DMG_REAC_STUN) || (this->dyna.actor.colChkInfo.damageReaction == AM_DMG_REACT_STUN) ||
(this->dyna.actor.colChkInfo.damageReaction == AM_DMG_REAC_ICE)) { (this->dyna.actor.colChkInfo.damageReaction == AM_DMG_REACT_ICE)) {
if (this->behavior != AM_BEHAVIOR_STUNNED) { if (this->behavior != AM_BEHAVIOR_STUNNED) {
EnAm_SetupStunned(this, play); EnAm_SetupStunned(this, play);
if (this->dyna.actor.colChkInfo.damage != 0) { if (this->dyna.actor.colChkInfo.damage != 0) {
this->dyna.actor.colChkInfo.health = 0; this->dyna.actor.colChkInfo.health = 0;
} }
} else if (this->dyna.actor.colChkInfo.damageReaction == AM_DMG_REAC_STUN) { } else if (this->dyna.actor.colChkInfo.damageReaction == AM_DMG_REACT_STUN) {
Vec3f sparkPos = this->dyna.actor.world.pos; Vec3f sparkPos = this->dyna.actor.world.pos;
sparkPos.y += 50.0f; sparkPos.y += 50.0f;
CollisionCheck_SpawnShieldParticlesMetal(play, &sparkPos); CollisionCheck_SpawnShieldParticlesMetal(play, &sparkPos);
} }
} else if ((this->dyna.actor.colChkInfo.damageReaction == AM_DMG_REAC_KILL) || } else if ((this->dyna.actor.colChkInfo.damageReaction == AM_DMG_REACT_KILL) ||
(this->behavior == AM_BEHAVIOR_STUNNED)) { (this->behavior == AM_BEHAVIOR_STUNNED)) {
this->dyna.actor.colChkInfo.health = 0; this->dyna.actor.colChkInfo.health = 0;
@ -857,7 +857,7 @@ void EnAm_Update(Actor* thisx, PlayState* play) {
EnAm_UpdateDamage(this, play); EnAm_UpdateDamage(this, play);
} }
if (this->dyna.actor.colChkInfo.damageReaction != AM_DMG_REAC_MAGIC_FIRE_LIGHT) { if (this->dyna.actor.colChkInfo.damageReaction != AM_DMG_REACT_MAGIC_FIRE_LIGHT) {
if (this->attackTimer != 0) { if (this->attackTimer != 0) {
this->attackTimer--; this->attackTimer--;
} }

View File

@ -74,44 +74,44 @@ static ColliderCylinderInit sCylinderInit = {
}; };
typedef enum AnubiceDamageReaction { typedef enum AnubiceDamageReaction {
/* 0x0 */ ANUBICE_DMG_REAC_NONE, /* 0x0 */ ANUBICE_DMG_REACT_NONE,
/* 0x2 */ ANUBICE_DMG_REAC_FIRE = 2, /* 0x2 */ ANUBICE_DMG_REACT_FIRE = 2,
/* 0xF */ ANUBICE_DMG_REAC_0xF = 0xF // Treated the same as ANUBICE_DMG_REAC_NONE in code /* 0xF */ ANUBICE_DMG_REACT_0xF = 0xF // Treated the same as ANUBICE_DMG_REACT_NONE in code
} AnubiceDamageReaction; } AnubiceDamageReaction;
static DamageTable sDamageTable[] = { static DamageTable sDamageTable[] = {
/* Deku nut */ DMG_ENTRY(0, ANUBICE_DMG_REAC_NONE), /* Deku nut */ DMG_ENTRY(0, ANUBICE_DMG_REACT_NONE),
/* Deku stick */ DMG_ENTRY(0, ANUBICE_DMG_REAC_0xF), /* Deku stick */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Slingshot */ DMG_ENTRY(0, ANUBICE_DMG_REAC_0xF), /* Slingshot */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Explosive */ DMG_ENTRY(0, ANUBICE_DMG_REAC_0xF), /* Explosive */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Boomerang */ DMG_ENTRY(0, ANUBICE_DMG_REAC_0xF), /* Boomerang */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Normal arrow */ DMG_ENTRY(0, ANUBICE_DMG_REAC_0xF), /* Normal arrow */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Hammer swing */ DMG_ENTRY(1, ANUBICE_DMG_REAC_0xF), /* Hammer swing */ DMG_ENTRY(1, ANUBICE_DMG_REACT_0xF),
/* Hookshot */ DMG_ENTRY(2, ANUBICE_DMG_REAC_0xF), /* Hookshot */ DMG_ENTRY(2, ANUBICE_DMG_REACT_0xF),
/* Kokiri sword */ DMG_ENTRY(0, ANUBICE_DMG_REAC_0xF), /* Kokiri sword */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Master sword */ DMG_ENTRY(2, ANUBICE_DMG_REAC_0xF), /* Master sword */ DMG_ENTRY(2, ANUBICE_DMG_REACT_0xF),
/* Giant's Knife */ DMG_ENTRY(6, ANUBICE_DMG_REAC_0xF), /* Giant's Knife */ DMG_ENTRY(6, ANUBICE_DMG_REACT_0xF),
/* Fire arrow */ DMG_ENTRY(2, ANUBICE_DMG_REAC_FIRE), /* Fire arrow */ DMG_ENTRY(2, ANUBICE_DMG_REACT_FIRE),
/* Ice arrow */ DMG_ENTRY(0, ANUBICE_DMG_REAC_0xF), /* Ice arrow */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Light arrow */ DMG_ENTRY(0, ANUBICE_DMG_REAC_0xF), /* Light arrow */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Unk arrow 1 */ DMG_ENTRY(0, ANUBICE_DMG_REAC_0xF), /* Unk arrow 1 */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Unk arrow 2 */ DMG_ENTRY(0, ANUBICE_DMG_REAC_0xF), /* Unk arrow 2 */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Unk arrow 3 */ DMG_ENTRY(0, ANUBICE_DMG_REAC_0xF), /* Unk arrow 3 */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Fire magic */ DMG_ENTRY(3, ANUBICE_DMG_REAC_FIRE), /* Fire magic */ DMG_ENTRY(3, ANUBICE_DMG_REACT_FIRE),
/* Ice magic */ DMG_ENTRY(0, ANUBICE_DMG_REAC_NONE), /* Ice magic */ DMG_ENTRY(0, ANUBICE_DMG_REACT_NONE),
/* Light magic */ DMG_ENTRY(0, ANUBICE_DMG_REAC_NONE), /* Light magic */ DMG_ENTRY(0, ANUBICE_DMG_REACT_NONE),
/* Shield */ DMG_ENTRY(0, ANUBICE_DMG_REAC_NONE), /* Shield */ DMG_ENTRY(0, ANUBICE_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, ANUBICE_DMG_REAC_NONE), /* Mirror Ray */ DMG_ENTRY(0, ANUBICE_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(0, ANUBICE_DMG_REAC_0xF), /* Kokiri spin */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Giant spin */ DMG_ENTRY(6, ANUBICE_DMG_REAC_0xF), /* Giant spin */ DMG_ENTRY(6, ANUBICE_DMG_REACT_0xF),
/* Master spin */ DMG_ENTRY(2, ANUBICE_DMG_REAC_0xF), /* Master spin */ DMG_ENTRY(2, ANUBICE_DMG_REACT_0xF),
/* Kokiri jump */ DMG_ENTRY(0, ANUBICE_DMG_REAC_0xF), /* Kokiri jump */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Giant jump */ DMG_ENTRY(12, ANUBICE_DMG_REAC_0xF), /* Giant jump */ DMG_ENTRY(12, ANUBICE_DMG_REACT_0xF),
/* Master jump */ DMG_ENTRY(4, ANUBICE_DMG_REAC_0xF), /* Master jump */ DMG_ENTRY(4, ANUBICE_DMG_REACT_0xF),
/* Unknown 1 */ DMG_ENTRY(0, ANUBICE_DMG_REAC_NONE), /* Unknown 1 */ DMG_ENTRY(0, ANUBICE_DMG_REACT_NONE),
/* Unblockable */ DMG_ENTRY(0, ANUBICE_DMG_REAC_NONE), /* Unblockable */ DMG_ENTRY(0, ANUBICE_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(0, ANUBICE_DMG_REAC_NONE), /* Hammer jump */ DMG_ENTRY(0, ANUBICE_DMG_REACT_NONE),
/* Unknown 2 */ DMG_ENTRY(0, ANUBICE_DMG_REAC_NONE), /* Unknown 2 */ DMG_ENTRY(0, ANUBICE_DMG_REACT_NONE),
}; };
void EnAnubice_Hover(EnAnubice* this, PlayState* play) { void EnAnubice_Hover(EnAnubice* this, PlayState* play) {
@ -399,7 +399,7 @@ void EnAnubice_Update(Actor* thisx, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) { if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT; this->collider.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageReaction == ANUBICE_DMG_REAC_FIRE) { if (this->actor.colChkInfo.damageReaction == ANUBICE_DMG_REACT_FIRE) {
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP);
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
Enemy_StartFinishingBlow(play, &this->actor); Enemy_StartFinishingBlow(play, &this->actor);

View File

@ -41,7 +41,7 @@ typedef struct EnAnubice {
/* 0x025C */ s16 knockbackTimer; /* 0x025C */ s16 knockbackTimer;
/* 0x025E */ s16 isMirroringPlayer; /* 0x025E */ s16 isMirroringPlayer;
/* 0x0260 */ s16 isPlayerOutOfRange; /* 0x0260 */ s16 isPlayerOutOfRange;
/* 0x0262 */ s16 isKnockedback; // Hit by an attack without ANUBICE_DMG_REAC_FIRE /* 0x0262 */ s16 isKnockedback; // Hit by an attack without ANUBICE_DMG_REACT_FIRE
/* 0x0264 */ s16 hasSearchedForFlameCircles; /* 0x0264 */ s16 hasSearchedForFlameCircles;
/* 0x0268 */ f32 hoverVelocityTimer; /* 0x0268 */ f32 hoverVelocityTimer;
/* 0x026C */ f32 animLastFrame; /* 0x026C */ f32 animLastFrame;

View File

@ -79,47 +79,47 @@ static ColliderCylinderInit sCylinderInit = {
static CollisionCheckInfoInit2 sColChkInfoInit = { 1, 9, 28, -20, 30 }; static CollisionCheckInfoInit2 sColChkInfoInit = { 1, 9, 28, -20, 30 };
typedef enum BiriDamageReaction { typedef enum BiriDamageReaction {
/* 0x0 */ BIRI_DMG_REAC_NONE, /* 0x0 */ BIRI_DMG_REACT_NONE,
/* 0x1 */ BIRI_DMG_REAC_DEKUNUT, /* 0x1 */ BIRI_DMG_REACT_DEKUNUT,
/* 0x2 */ BIRI_DMG_REAC_FIRE, /* 0x2 */ BIRI_DMG_REACT_FIRE,
/* 0x3 */ BIRI_DMG_REAC_ICE, /* 0x3 */ BIRI_DMG_REACT_ICE,
/* 0xE */ BIRI_DMG_REAC_SLINGSHOT = 0xE, /* 0xE */ BIRI_DMG_REACT_SLINGSHOT = 0xE,
/* 0xF */ BIRI_DMG_REAC_SWORD /* 0xF */ BIRI_DMG_REACT_SWORD
} BiriDamageReaction; } BiriDamageReaction;
static DamageTable sDamageTable = { static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, BIRI_DMG_REAC_DEKUNUT), /* Deku nut */ DMG_ENTRY(0, BIRI_DMG_REACT_DEKUNUT),
/* Deku stick */ DMG_ENTRY(2, BIRI_DMG_REAC_NONE), /* Deku stick */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Slingshot */ DMG_ENTRY(0, BIRI_DMG_REAC_SLINGSHOT), /* Slingshot */ DMG_ENTRY(0, BIRI_DMG_REACT_SLINGSHOT),
/* Explosive */ DMG_ENTRY(2, BIRI_DMG_REAC_NONE), /* Explosive */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Boomerang */ DMG_ENTRY(1, BIRI_DMG_REAC_NONE), /* Boomerang */ DMG_ENTRY(1, BIRI_DMG_REACT_NONE),
/* Normal arrow */ DMG_ENTRY(2, BIRI_DMG_REAC_NONE), /* Normal arrow */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Hammer swing */ DMG_ENTRY(2, BIRI_DMG_REAC_NONE), /* Hammer swing */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Hookshot */ DMG_ENTRY(2, BIRI_DMG_REAC_NONE), /* Hookshot */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Kokiri sword */ DMG_ENTRY(1, BIRI_DMG_REAC_SWORD), /* Kokiri sword */ DMG_ENTRY(1, BIRI_DMG_REACT_SWORD),
/* Master sword */ DMG_ENTRY(2, BIRI_DMG_REAC_SWORD), /* Master sword */ DMG_ENTRY(2, BIRI_DMG_REACT_SWORD),
/* Giant's Knife */ DMG_ENTRY(4, BIRI_DMG_REAC_SWORD), /* Giant's Knife */ DMG_ENTRY(4, BIRI_DMG_REACT_SWORD),
/* Fire arrow */ DMG_ENTRY(4, BIRI_DMG_REAC_FIRE), /* Fire arrow */ DMG_ENTRY(4, BIRI_DMG_REACT_FIRE),
/* Ice arrow */ DMG_ENTRY(4, BIRI_DMG_REAC_ICE), /* Ice arrow */ DMG_ENTRY(4, BIRI_DMG_REACT_ICE),
/* Light arrow */ DMG_ENTRY(2, BIRI_DMG_REAC_NONE), /* Light arrow */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Unk arrow 1 */ DMG_ENTRY(2, BIRI_DMG_REAC_NONE), /* Unk arrow 1 */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Unk arrow 2 */ DMG_ENTRY(2, BIRI_DMG_REAC_NONE), /* Unk arrow 2 */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Unk arrow 3 */ DMG_ENTRY(2, BIRI_DMG_REAC_NONE), /* Unk arrow 3 */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Fire magic */ DMG_ENTRY(4, BIRI_DMG_REAC_FIRE), /* Fire magic */ DMG_ENTRY(4, BIRI_DMG_REACT_FIRE),
/* Ice magic */ DMG_ENTRY(4, BIRI_DMG_REAC_ICE), /* Ice magic */ DMG_ENTRY(4, BIRI_DMG_REACT_ICE),
/* Light magic */ DMG_ENTRY(0, BIRI_DMG_REAC_NONE), /* Light magic */ DMG_ENTRY(0, BIRI_DMG_REACT_NONE),
/* Shield */ DMG_ENTRY(0, BIRI_DMG_REAC_NONE), /* Shield */ DMG_ENTRY(0, BIRI_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, BIRI_DMG_REAC_NONE), /* Mirror Ray */ DMG_ENTRY(0, BIRI_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, BIRI_DMG_REAC_NONE), /* Kokiri spin */ DMG_ENTRY(1, BIRI_DMG_REACT_NONE),
/* Giant spin */ DMG_ENTRY(4, BIRI_DMG_REAC_NONE), /* Giant spin */ DMG_ENTRY(4, BIRI_DMG_REACT_NONE),
/* Master spin */ DMG_ENTRY(2, BIRI_DMG_REAC_NONE), /* Master spin */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Kokiri jump */ DMG_ENTRY(2, BIRI_DMG_REAC_NONE), /* Kokiri jump */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Giant jump */ DMG_ENTRY(8, BIRI_DMG_REAC_NONE), /* Giant jump */ DMG_ENTRY(8, BIRI_DMG_REACT_NONE),
/* Master jump */ DMG_ENTRY(4, BIRI_DMG_REAC_NONE), /* Master jump */ DMG_ENTRY(4, BIRI_DMG_REACT_NONE),
/* Unknown 1 */ DMG_ENTRY(0, BIRI_DMG_REAC_NONE), /* Unknown 1 */ DMG_ENTRY(0, BIRI_DMG_REACT_NONE),
/* Unblockable */ DMG_ENTRY(0, BIRI_DMG_REAC_NONE), /* Unblockable */ DMG_ENTRY(0, BIRI_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(4, BIRI_DMG_REAC_NONE), /* Hammer jump */ DMG_ENTRY(4, BIRI_DMG_REACT_NONE),
/* Unknown 2 */ DMG_ENTRY(0, BIRI_DMG_REAC_NONE), /* Unknown 2 */ DMG_ENTRY(0, BIRI_DMG_REACT_NONE),
}; };
static InitChainEntry sInitChain[] = { static InitChainEntry sInitChain[] = {
@ -581,11 +581,11 @@ void EnBili_UpdateDamage(EnBili* this, PlayState* play) {
damageReaction = this->actor.colChkInfo.damageReaction; damageReaction = this->actor.colChkInfo.damageReaction;
if (damageReaction == BIRI_DMG_REAC_DEKUNUT) { if (damageReaction == BIRI_DMG_REACT_DEKUNUT) {
if (this->actionFunc != EnBili_Stunned) { if (this->actionFunc != EnBili_Stunned) {
EnBili_SetupStunned(this); EnBili_SetupStunned(this);
} }
} else if (damageReaction == BIRI_DMG_REAC_SWORD) { } else if (damageReaction == BIRI_DMG_REACT_SWORD) {
if (this->actionFunc != EnBili_Stunned) { if (this->actionFunc != EnBili_Stunned) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 200, COLORFILTER_BUFFLAG_XLU, 10); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 200, COLORFILTER_BUFFLAG_XLU, 10);
@ -596,12 +596,12 @@ void EnBili_UpdateDamage(EnBili* this, PlayState* play) {
} else { } else {
EnBili_SetupBurnt(this); EnBili_SetupBurnt(this);
} }
} else if (damageReaction == BIRI_DMG_REAC_FIRE) { } else if (damageReaction == BIRI_DMG_REACT_FIRE) {
EnBili_SetupBurnt(this); EnBili_SetupBurnt(this);
this->timer = 2; this->timer = 2;
} else if (damageReaction == BIRI_DMG_REAC_ICE) { } else if (damageReaction == BIRI_DMG_REACT_ICE) {
EnBili_SetupFrozen(this, play); EnBili_SetupFrozen(this, play);
} else if (damageReaction == BIRI_DMG_REAC_SLINGSHOT) { } else if (damageReaction == BIRI_DMG_REACT_SLINGSHOT) {
EnBili_SetupRecoil(this); EnBili_SetupRecoil(this);
} else { } else {
EnBili_SetupBurnt(this); EnBili_SetupBurnt(this);

View File

@ -151,83 +151,83 @@ static ColliderJntSphInit sJntSphInit = {
static CollisionCheckInfoInit sColChkInfoInit = { 2, 25, 25, MASS_IMMOVABLE }; static CollisionCheckInfoInit sColChkInfoInit = { 2, 25, 25, MASS_IMMOVABLE };
typedef enum DekuBabaDamageReaction { typedef enum DekuBabaDamageReaction {
/* 0x0 */ DEKUBABA_DMG_REAC_NONE, /* 0x0 */ DEKUBABA_DMG_REACT_NONE,
/* 0x1 */ DEKUBABA_DMG_REAC_DEKUNUT, /* 0x1 */ DEKUBABA_DMG_REACT_DEKUNUT,
/* 0x2 */ DEKUBABA_DMG_REAC_FIRE, /* 0x2 */ DEKUBABA_DMG_REACT_FIRE,
/* 0xE */ DEKUBABA_DMG_REAC_BOOMERANG = 14, /* 0xE */ DEKUBABA_DMG_REACT_BOOMERANG = 14,
/* 0xF */ DEKUBABA_DMG_REAC_SWORD /* 0xF */ DEKUBABA_DMG_REACT_SWORD
} DekuBabaDamageReaction; } DekuBabaDamageReaction;
static DamageTable sDekuBabaDamageTable = { static DamageTable sDekuBabaDamageTable = {
/* Deku nut */ DMG_ENTRY(0, DEKUBABA_DMG_REAC_DEKUNUT), /* Deku nut */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_DEKUNUT),
/* Deku stick */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Deku stick */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Slingshot */ DMG_ENTRY(1, DEKUBABA_DMG_REAC_NONE), /* Slingshot */ DMG_ENTRY(1, DEKUBABA_DMG_REACT_NONE),
/* Explosive */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Explosive */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Boomerang */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_BOOMERANG), /* Boomerang */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_BOOMERANG),
/* Normal arrow */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Normal arrow */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Hammer swing */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Hammer swing */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Hookshot */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Hookshot */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Kokiri sword */ DMG_ENTRY(1, DEKUBABA_DMG_REAC_SWORD), /* Kokiri sword */ DMG_ENTRY(1, DEKUBABA_DMG_REACT_SWORD),
/* Master sword */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_SWORD), /* Master sword */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_SWORD),
/* Giant's Knife */ DMG_ENTRY(4, DEKUBABA_DMG_REAC_SWORD), /* Giant's Knife */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_SWORD),
/* Fire arrow */ DMG_ENTRY(4, DEKUBABA_DMG_REAC_FIRE), /* Fire arrow */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_FIRE),
/* Ice arrow */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Ice arrow */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Light arrow */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Light arrow */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Unk arrow 1 */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Unk arrow 1 */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Unk arrow 2 */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Unk arrow 2 */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Unk arrow 3 */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Unk arrow 3 */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Fire magic */ DMG_ENTRY(4, DEKUBABA_DMG_REAC_FIRE), /* Fire magic */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_FIRE),
/* Ice magic */ DMG_ENTRY(0, DEKUBABA_DMG_REAC_NONE), /* Ice magic */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Light magic */ DMG_ENTRY(0, DEKUBABA_DMG_REAC_NONE), /* Light magic */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Shield */ DMG_ENTRY(0, DEKUBABA_DMG_REAC_NONE), /* Shield */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, DEKUBABA_DMG_REAC_NONE), /* Mirror Ray */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, DEKUBABA_DMG_REAC_SWORD), /* Kokiri spin */ DMG_ENTRY(1, DEKUBABA_DMG_REACT_SWORD),
/* Giant spin */ DMG_ENTRY(4, DEKUBABA_DMG_REAC_SWORD), /* Giant spin */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_SWORD),
/* Master spin */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_SWORD), /* Master spin */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_SWORD),
/* Kokiri jump */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_SWORD), /* Kokiri jump */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_SWORD),
/* Giant jump */ DMG_ENTRY(8, DEKUBABA_DMG_REAC_SWORD), /* Giant jump */ DMG_ENTRY(8, DEKUBABA_DMG_REACT_SWORD),
/* Master jump */ DMG_ENTRY(4, DEKUBABA_DMG_REAC_SWORD), /* Master jump */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_SWORD),
/* Unknown 1 */ DMG_ENTRY(0, DEKUBABA_DMG_REAC_NONE), /* Unknown 1 */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Unblockable */ DMG_ENTRY(0, DEKUBABA_DMG_REAC_NONE), /* Unblockable */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(4, DEKUBABA_DMG_REAC_NONE), /* Hammer jump */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_NONE),
/* Unknown 2 */ DMG_ENTRY(0, DEKUBABA_DMG_REAC_NONE), /* Unknown 2 */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
}; };
// The only difference is that for Big Deku Babas, Hookshot will act the same as Deku Nuts: i.e. it will stun, but // The only difference is that for Big Deku Babas, Hookshot will act the same as Deku Nuts: i.e. it will stun, but
// cannot kill. // cannot kill.
static DamageTable sBigDekuBabaDamageTable = { static DamageTable sBigDekuBabaDamageTable = {
/* Deku nut */ DMG_ENTRY(0, DEKUBABA_DMG_REAC_DEKUNUT), /* Deku nut */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_DEKUNUT),
/* Deku stick */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Deku stick */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Slingshot */ DMG_ENTRY(1, DEKUBABA_DMG_REAC_NONE), /* Slingshot */ DMG_ENTRY(1, DEKUBABA_DMG_REACT_NONE),
/* Explosive */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Explosive */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Boomerang */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_BOOMERANG), /* Boomerang */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_BOOMERANG),
/* Normal arrow */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Normal arrow */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Hammer swing */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Hammer swing */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Hookshot */ DMG_ENTRY(0, DEKUBABA_DMG_REAC_DEKUNUT), /* Hookshot */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_DEKUNUT),
/* Kokiri sword */ DMG_ENTRY(1, DEKUBABA_DMG_REAC_SWORD), /* Kokiri sword */ DMG_ENTRY(1, DEKUBABA_DMG_REACT_SWORD),
/* Master sword */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_SWORD), /* Master sword */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_SWORD),
/* Giant's Knife */ DMG_ENTRY(4, DEKUBABA_DMG_REAC_SWORD), /* Giant's Knife */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_SWORD),
/* Fire arrow */ DMG_ENTRY(4, DEKUBABA_DMG_REAC_FIRE), /* Fire arrow */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_FIRE),
/* Ice arrow */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Ice arrow */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Light arrow */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Light arrow */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Unk arrow 1 */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Unk arrow 1 */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Unk arrow 2 */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Unk arrow 2 */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Unk arrow 3 */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_NONE), /* Unk arrow 3 */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Fire magic */ DMG_ENTRY(4, DEKUBABA_DMG_REAC_FIRE), /* Fire magic */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_FIRE),
/* Ice magic */ DMG_ENTRY(0, DEKUBABA_DMG_REAC_NONE), /* Ice magic */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Light magic */ DMG_ENTRY(0, DEKUBABA_DMG_REAC_NONE), /* Light magic */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Shield */ DMG_ENTRY(0, DEKUBABA_DMG_REAC_NONE), /* Shield */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, DEKUBABA_DMG_REAC_NONE), /* Mirror Ray */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, DEKUBABA_DMG_REAC_SWORD), /* Kokiri spin */ DMG_ENTRY(1, DEKUBABA_DMG_REACT_SWORD),
/* Giant spin */ DMG_ENTRY(4, DEKUBABA_DMG_REAC_SWORD), /* Giant spin */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_SWORD),
/* Master spin */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_SWORD), /* Master spin */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_SWORD),
/* Kokiri jump */ DMG_ENTRY(2, DEKUBABA_DMG_REAC_SWORD), /* Kokiri jump */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_SWORD),
/* Giant jump */ DMG_ENTRY(8, DEKUBABA_DMG_REAC_SWORD), /* Giant jump */ DMG_ENTRY(8, DEKUBABA_DMG_REACT_SWORD),
/* Master jump */ DMG_ENTRY(4, DEKUBABA_DMG_REAC_SWORD), /* Master jump */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_SWORD),
/* Unknown 1 */ DMG_ENTRY(0, DEKUBABA_DMG_REAC_NONE), /* Unknown 1 */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Unblockable */ DMG_ENTRY(0, DEKUBABA_DMG_REAC_NONE), /* Unblockable */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(4, DEKUBABA_DMG_REAC_NONE), /* Hammer jump */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_NONE),
/* Unknown 2 */ DMG_ENTRY(0, DEKUBABA_DMG_REAC_NONE), /* Unknown 2 */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
}; };
static InitChainEntry sInitChain[] = { static InitChainEntry sInitChain[] = {
@ -257,7 +257,7 @@ void EnDekubaba_Init(Actor* thisx, PlayState* play) {
// (Of course they reckoned without each age being able to use the other's items, so Stick and Master Sword // (Of course they reckoned without each age being able to use the other's items, so Stick and Master Sword
// jumpslash can give the Stick drop as adult, and neither will as child.) // jumpslash can give the Stick drop as adult, and neither will as child.)
if (!LINK_IS_ADULT) { if (!LINK_IS_ADULT) {
sBigDekuBabaDamageTable.table[0x1B] = DMG_ENTRY(4, DEKUBABA_DMG_REAC_NONE); // DMG_JUMP_MASTER sBigDekuBabaDamageTable.table[0x1B] = DMG_ENTRY(4, DEKUBABA_DMG_REACT_NONE); // DMG_JUMP_MASTER
} }
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sBigDekuBabaDamageTable, &sColChkInfoInit); CollisionCheck_SetInfo(&this->actor.colChkInfo, &sBigDekuBabaDamageTable, &sColChkInfoInit);
@ -272,7 +272,7 @@ void EnDekubaba_Init(Actor* thisx, PlayState* play) {
} }
if (!LINK_IS_ADULT) { if (!LINK_IS_ADULT) {
sDekuBabaDamageTable.table[0x1B] = DMG_ENTRY(4, DEKUBABA_DMG_REAC_NONE); // DMG_JUMP_MASTER sDekuBabaDamageTable.table[0x1B] = DMG_ENTRY(4, DEKUBABA_DMG_REACT_NONE); // DMG_JUMP_MASTER
} }
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDekuBabaDamageTable, &sColChkInfoInit); CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDekuBabaDamageTable, &sColChkInfoInit);
@ -1049,15 +1049,15 @@ void EnDekubaba_UpdateDamage(EnDekubaba* this, PlayState* play) {
Actor_SetDropFlagJntSph(&this->actor, &this->collider, true); Actor_SetDropFlagJntSph(&this->actor, &this->collider, true);
if ((this->collider.base.colMaterial != COL_MATERIAL_HARD) && if ((this->collider.base.colMaterial != COL_MATERIAL_HARD) &&
((this->actor.colChkInfo.damageReaction != DEKUBABA_DMG_REAC_NONE) || ((this->actor.colChkInfo.damageReaction != DEKUBABA_DMG_REACT_NONE) ||
(this->actor.colChkInfo.damage != 0))) { (this->actor.colChkInfo.damage != 0))) {
phi_s0 = this->actor.colChkInfo.health - this->actor.colChkInfo.damage; phi_s0 = this->actor.colChkInfo.health - this->actor.colChkInfo.damage;
if (this->actionFunc != EnDekubaba_StunnedVertical) { if (this->actionFunc != EnDekubaba_StunnedVertical) {
if ((this->actor.colChkInfo.damageReaction == DEKUBABA_DMG_REAC_BOOMERANG) || if ((this->actor.colChkInfo.damageReaction == DEKUBABA_DMG_REACT_BOOMERANG) ||
(this->actor.colChkInfo.damageReaction == DEKUBABA_DMG_REAC_DEKUNUT)) { (this->actor.colChkInfo.damageReaction == DEKUBABA_DMG_REACT_DEKUNUT)) {
if (this->actor.colChkInfo.damageReaction == DEKUBABA_DMG_REAC_BOOMERANG) { if (this->actor.colChkInfo.damageReaction == DEKUBABA_DMG_REACT_BOOMERANG) {
phi_s0 = this->actor.colChkInfo.health; phi_s0 = this->actor.colChkInfo.health;
} }
@ -1071,14 +1071,14 @@ void EnDekubaba_UpdateDamage(EnDekubaba* this, PlayState* play) {
} else { } else {
EnDekubaba_SetupHit(this, 0); EnDekubaba_SetupHit(this, 0);
} }
} else if ((this->actor.colChkInfo.damageReaction == DEKUBABA_DMG_REAC_BOOMERANG) || } else if ((this->actor.colChkInfo.damageReaction == DEKUBABA_DMG_REACT_BOOMERANG) ||
(this->actor.colChkInfo.damageReaction == DEKUBABA_DMG_REAC_SWORD)) { (this->actor.colChkInfo.damageReaction == DEKUBABA_DMG_REACT_SWORD)) {
if (phi_s0 > 0) { if (phi_s0 > 0) {
EnDekubaba_SetupSway(this); EnDekubaba_SetupSway(this);
} else { } else {
EnDekubaba_SetupPrunedSomersault(this); EnDekubaba_SetupPrunedSomersault(this);
} }
} else if (this->actor.colChkInfo.damageReaction != DEKUBABA_DMG_REAC_DEKUNUT) { } else if (this->actor.colChkInfo.damageReaction != DEKUBABA_DMG_REACT_DEKUNUT) {
EnDekubaba_SetupHit(this, 0); EnDekubaba_SetupHit(this, 0);
} else { } else {
return; return;
@ -1086,7 +1086,7 @@ void EnDekubaba_UpdateDamage(EnDekubaba* this, PlayState* play) {
this->actor.colChkInfo.health = CLAMP_MIN(phi_s0, 0); this->actor.colChkInfo.health = CLAMP_MIN(phi_s0, 0);
if (this->actor.colChkInfo.damageReaction == DEKUBABA_DMG_REAC_FIRE) { if (this->actor.colChkInfo.damageReaction == DEKUBABA_DMG_REACT_FIRE) {
firePos = &this->actor.world.pos; firePos = &this->actor.world.pos;
fireScale = (this->size * 70.0f); fireScale = (this->size * 70.0f);

View File

@ -178,47 +178,47 @@ static ColliderQuadInit sSwordQuadInit = {
}; };
typedef enum EnGeldBDamageReaction { typedef enum EnGeldBDamageReaction {
/* 0x0 */ GELDB_DMG_REAC_NORMAL, /* 0x0 */ GELDB_DMG_REACT_NORMAL,
/* 0x1 */ GELDB_DMG_REAC_STUN, /* 0x1 */ GELDB_DMG_REACT_STUN,
/* 0x6 */ GELDB_DMG_REAC_UNK_6 = 0x6, /* 0x6 */ GELDB_DMG_REACT_UNK_6 = 0x6,
/* 0xD */ GELDB_DMG_REAC_UNK_D = 0xD, /* 0xD */ GELDB_DMG_REACT_UNK_D = 0xD,
/* 0xE */ GELDB_DMG_REAC_UNK_E, /* 0xE */ GELDB_DMG_REACT_UNK_E,
/* 0xF */ GELDB_DMG_REAC_FREEZE /* 0xF */ GELDB_DMG_REACT_FREEZE
} EnGeldBDamageReaction; } EnGeldBDamageReaction;
static DamageTable sDamageTable = { static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, GELDB_DMG_REAC_STUN), /* Deku nut */ DMG_ENTRY(0, GELDB_DMG_REACT_STUN),
/* Deku stick */ DMG_ENTRY(2, GELDB_DMG_REAC_NORMAL), /* Deku stick */ DMG_ENTRY(2, GELDB_DMG_REACT_NORMAL),
/* Slingshot */ DMG_ENTRY(1, GELDB_DMG_REAC_NORMAL), /* Slingshot */ DMG_ENTRY(1, GELDB_DMG_REACT_NORMAL),
/* Explosive */ DMG_ENTRY(2, GELDB_DMG_REAC_NORMAL), /* Explosive */ DMG_ENTRY(2, GELDB_DMG_REACT_NORMAL),
/* Boomerang */ DMG_ENTRY(0, GELDB_DMG_REAC_STUN), /* Boomerang */ DMG_ENTRY(0, GELDB_DMG_REACT_STUN),
/* Normal arrow */ DMG_ENTRY(2, GELDB_DMG_REAC_NORMAL), /* Normal arrow */ DMG_ENTRY(2, GELDB_DMG_REACT_NORMAL),
/* Hammer swing */ DMG_ENTRY(2, GELDB_DMG_REAC_NORMAL), /* Hammer swing */ DMG_ENTRY(2, GELDB_DMG_REACT_NORMAL),
/* Hookshot */ DMG_ENTRY(0, GELDB_DMG_REAC_STUN), /* Hookshot */ DMG_ENTRY(0, GELDB_DMG_REACT_STUN),
/* Kokiri sword */ DMG_ENTRY(1, GELDB_DMG_REAC_NORMAL), /* Kokiri sword */ DMG_ENTRY(1, GELDB_DMG_REACT_NORMAL),
/* Master sword */ DMG_ENTRY(2, GELDB_DMG_REAC_NORMAL), /* Master sword */ DMG_ENTRY(2, GELDB_DMG_REACT_NORMAL),
/* Giant's Knife */ DMG_ENTRY(4, GELDB_DMG_REAC_NORMAL), /* Giant's Knife */ DMG_ENTRY(4, GELDB_DMG_REACT_NORMAL),
/* Fire arrow */ DMG_ENTRY(2, GELDB_DMG_REAC_NORMAL), /* Fire arrow */ DMG_ENTRY(2, GELDB_DMG_REACT_NORMAL),
/* Ice arrow */ DMG_ENTRY(2, GELDB_DMG_REAC_FREEZE), /* Ice arrow */ DMG_ENTRY(2, GELDB_DMG_REACT_FREEZE),
/* Light arrow */ DMG_ENTRY(2, GELDB_DMG_REAC_NORMAL), /* Light arrow */ DMG_ENTRY(2, GELDB_DMG_REACT_NORMAL),
/* Unk arrow 1 */ DMG_ENTRY(2, GELDB_DMG_REAC_NORMAL), /* Unk arrow 1 */ DMG_ENTRY(2, GELDB_DMG_REACT_NORMAL),
/* Unk arrow 2 */ DMG_ENTRY(2, GELDB_DMG_REAC_NORMAL), /* Unk arrow 2 */ DMG_ENTRY(2, GELDB_DMG_REACT_NORMAL),
/* Unk arrow 3 */ DMG_ENTRY(2, GELDB_DMG_REAC_NORMAL), /* Unk arrow 3 */ DMG_ENTRY(2, GELDB_DMG_REACT_NORMAL),
/* Fire magic */ DMG_ENTRY(4, GELDB_DMG_REAC_UNK_E), /* Fire magic */ DMG_ENTRY(4, GELDB_DMG_REACT_UNK_E),
/* Ice magic */ DMG_ENTRY(0, GELDB_DMG_REAC_UNK_6), /* Ice magic */ DMG_ENTRY(0, GELDB_DMG_REACT_UNK_6),
/* Light magic */ DMG_ENTRY(3, GELDB_DMG_REAC_UNK_D), /* Light magic */ DMG_ENTRY(3, GELDB_DMG_REACT_UNK_D),
/* Shield */ DMG_ENTRY(0, GELDB_DMG_REAC_NORMAL), /* Shield */ DMG_ENTRY(0, GELDB_DMG_REACT_NORMAL),
/* Mirror Ray */ DMG_ENTRY(0, GELDB_DMG_REAC_NORMAL), /* Mirror Ray */ DMG_ENTRY(0, GELDB_DMG_REACT_NORMAL),
/* Kokiri spin */ DMG_ENTRY(1, GELDB_DMG_REAC_NORMAL), /* Kokiri spin */ DMG_ENTRY(1, GELDB_DMG_REACT_NORMAL),
/* Giant spin */ DMG_ENTRY(4, GELDB_DMG_REAC_NORMAL), /* Giant spin */ DMG_ENTRY(4, GELDB_DMG_REACT_NORMAL),
/* Master spin */ DMG_ENTRY(2, GELDB_DMG_REAC_NORMAL), /* Master spin */ DMG_ENTRY(2, GELDB_DMG_REACT_NORMAL),
/* Kokiri jump */ DMG_ENTRY(2, GELDB_DMG_REAC_NORMAL), /* Kokiri jump */ DMG_ENTRY(2, GELDB_DMG_REACT_NORMAL),
/* Giant jump */ DMG_ENTRY(8, GELDB_DMG_REAC_NORMAL), /* Giant jump */ DMG_ENTRY(8, GELDB_DMG_REACT_NORMAL),
/* Master jump */ DMG_ENTRY(4, GELDB_DMG_REAC_NORMAL), /* Master jump */ DMG_ENTRY(4, GELDB_DMG_REACT_NORMAL),
/* Unknown 1 */ DMG_ENTRY(4, GELDB_DMG_REAC_NORMAL), /* Unknown 1 */ DMG_ENTRY(4, GELDB_DMG_REACT_NORMAL),
/* Unblockable */ DMG_ENTRY(0, GELDB_DMG_REAC_NORMAL), /* Unblockable */ DMG_ENTRY(0, GELDB_DMG_REACT_NORMAL),
/* Hammer jump */ DMG_ENTRY(4, GELDB_DMG_REAC_NORMAL), /* Hammer jump */ DMG_ENTRY(4, GELDB_DMG_REACT_NORMAL),
/* Unknown 2 */ DMG_ENTRY(0, GELDB_DMG_REAC_NORMAL), /* Unknown 2 */ DMG_ENTRY(0, GELDB_DMG_REACT_NORMAL),
}; };
static InitChainEntry sInitChain[] = { static InitChainEntry sInitChain[] = {
@ -1030,10 +1030,10 @@ void EnGeldB_SetupStunned(EnGeldB* this) {
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
this->actor.speed = 0.0f; this->actor.speed = 0.0f;
} }
if ((this->damageReaction != GELDB_DMG_REAC_FREEZE) || (this->action == GELDB_SPIN_ATTACK)) { if ((this->damageReaction != GELDB_DMG_REACT_FREEZE) || (this->action == GELDB_SPIN_ATTACK)) {
Animation_PlayOnceSetSpeed(&this->skelAnime, &gGerudoRedDamageAnim, 0.0f); Animation_PlayOnceSetSpeed(&this->skelAnime, &gGerudoRedDamageAnim, 0.0f);
} }
if (this->damageReaction == GELDB_DMG_REAC_FREEZE) { if (this->damageReaction == GELDB_DMG_REACT_FREEZE) {
this->iceTimer = 36; this->iceTimer = 36;
} }
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
@ -1390,12 +1390,12 @@ void EnGeldB_CollisionCheck(EnGeldB* this, PlayState* play) {
} else if ((this->bodyCollider.base.acFlags & AC_HIT) && (this->action >= GELDB_READY) && } else if ((this->bodyCollider.base.acFlags & AC_HIT) && (this->action >= GELDB_READY) &&
(this->spinAttackState < 2)) { (this->spinAttackState < 2)) {
this->bodyCollider.base.acFlags &= ~AC_HIT; this->bodyCollider.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageReaction != GELDB_DMG_REAC_UNK_6) { if (this->actor.colChkInfo.damageReaction != GELDB_DMG_REACT_UNK_6) {
this->damageReaction = this->actor.colChkInfo.damageReaction; this->damageReaction = this->actor.colChkInfo.damageReaction;
Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, true); Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, true);
Audio_StopSfxByPosAndId(&this->actor.projectedPos, NA_SE_EN_GERUDOFT_BREATH); Audio_StopSfxByPosAndId(&this->actor.projectedPos, NA_SE_EN_GERUDOFT_BREATH);
if ((this->actor.colChkInfo.damageReaction == GELDB_DMG_REAC_STUN) || if ((this->actor.colChkInfo.damageReaction == GELDB_DMG_REACT_STUN) ||
(this->actor.colChkInfo.damageReaction == GELDB_DMG_REAC_FREEZE)) { (this->actor.colChkInfo.damageReaction == GELDB_DMG_REACT_FREEZE)) {
if (this->action != GELDB_STUNNED) { if (this->action != GELDB_STUNNED) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 80); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 80);
Actor_ApplyDamage(&this->actor); Actor_ApplyDamage(&this->actor);
@ -1429,7 +1429,7 @@ void EnGeldB_Update(Actor* thisx, PlayState* play) {
EnGeldB* this = (EnGeldB*)thisx; EnGeldB* this = (EnGeldB*)thisx;
EnGeldB_CollisionCheck(this, play); EnGeldB_CollisionCheck(this, play);
if (this->actor.colChkInfo.damageReaction != GELDB_DMG_REAC_UNK_6) { if (this->actor.colChkInfo.damageReaction != GELDB_DMG_REACT_UNK_6) {
Actor_MoveXZGravity(&this->actor); Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 15.0f, 30.0f, 60.0f, Actor_UpdateBgCheckInfo(play, &this->actor, 15.0f, 30.0f, 60.0f,
UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 | UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 |

View File

@ -53,11 +53,11 @@ typedef enum EnIkCsDrawMode {
} EnIkCsDrawMode; } EnIkCsDrawMode;
typedef enum EnIkDamageReaction { typedef enum EnIkDamageReaction {
/* 0x0 */ EN_IK_DMG_REAC_NONE, /* 0x0 */ EN_IK_DMG_REACT_NONE,
/* 0x6 */ EN_IK_DMG_REAC_ELEMENTAL_MAGIC = 0x6, /* 0x6 */ EN_IK_DMG_REACT_ELEMENTAL_MAGIC = 0x6,
/* 0xD */ EN_IK_DMG_REAC_SPARKS_NO_DMG = 0xD, /* 0xD */ EN_IK_DMG_REACT_SPARKS_NO_DMG = 0xD,
/* 0xE */ EN_IK_DMG_REAC_PROJECTILE, /* 0xE */ EN_IK_DMG_REACT_PROJECTILE,
/* 0xF */ EN_IK_DMG_REAC_DAMAGE /* 0xF */ EN_IK_DMG_REACT_DAMAGE
} EnIkDamageReaction; } EnIkDamageReaction;
void EnIk_UpdateEnemy(Actor* thisx, PlayState* play); void EnIk_UpdateEnemy(Actor* thisx, PlayState* play);
@ -166,38 +166,38 @@ static ColliderQuadInit sQuadInit = {
}; };
static DamageTable sDamageTable = { static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, EN_IK_DMG_REAC_SPARKS_NO_DMG), /* Deku nut */ DMG_ENTRY(0, EN_IK_DMG_REACT_SPARKS_NO_DMG),
/* Deku stick */ DMG_ENTRY(2, EN_IK_DMG_REAC_DAMAGE), /* Deku stick */ DMG_ENTRY(2, EN_IK_DMG_REACT_DAMAGE),
/* Slingshot */ DMG_ENTRY(1, EN_IK_DMG_REAC_PROJECTILE), /* Slingshot */ DMG_ENTRY(1, EN_IK_DMG_REACT_PROJECTILE),
/* Explosive */ DMG_ENTRY(2, EN_IK_DMG_REAC_DAMAGE), /* Explosive */ DMG_ENTRY(2, EN_IK_DMG_REACT_DAMAGE),
/* Boomerang */ DMG_ENTRY(0, EN_IK_DMG_REAC_SPARKS_NO_DMG), /* Boomerang */ DMG_ENTRY(0, EN_IK_DMG_REACT_SPARKS_NO_DMG),
/* Normal arrow */ DMG_ENTRY(2, EN_IK_DMG_REAC_PROJECTILE), /* Normal arrow */ DMG_ENTRY(2, EN_IK_DMG_REACT_PROJECTILE),
/* Hammer swing */ DMG_ENTRY(2, EN_IK_DMG_REAC_DAMAGE), /* Hammer swing */ DMG_ENTRY(2, EN_IK_DMG_REACT_DAMAGE),
/* Hookshot */ DMG_ENTRY(0, EN_IK_DMG_REAC_SPARKS_NO_DMG), /* Hookshot */ DMG_ENTRY(0, EN_IK_DMG_REACT_SPARKS_NO_DMG),
/* Kokiri sword */ DMG_ENTRY(1, EN_IK_DMG_REAC_DAMAGE), /* Kokiri sword */ DMG_ENTRY(1, EN_IK_DMG_REACT_DAMAGE),
/* Master sword */ DMG_ENTRY(2, EN_IK_DMG_REAC_DAMAGE), /* Master sword */ DMG_ENTRY(2, EN_IK_DMG_REACT_DAMAGE),
/* Giant's Knife */ DMG_ENTRY(4, EN_IK_DMG_REAC_DAMAGE), /* Giant's Knife */ DMG_ENTRY(4, EN_IK_DMG_REACT_DAMAGE),
/* Fire arrow */ DMG_ENTRY(2, EN_IK_DMG_REAC_PROJECTILE), /* Fire arrow */ DMG_ENTRY(2, EN_IK_DMG_REACT_PROJECTILE),
/* Ice arrow */ DMG_ENTRY(2, EN_IK_DMG_REAC_PROJECTILE), /* Ice arrow */ DMG_ENTRY(2, EN_IK_DMG_REACT_PROJECTILE),
/* Light arrow */ DMG_ENTRY(2, EN_IK_DMG_REAC_PROJECTILE), /* Light arrow */ DMG_ENTRY(2, EN_IK_DMG_REACT_PROJECTILE),
/* Unk arrow 1 */ DMG_ENTRY(2, EN_IK_DMG_REAC_PROJECTILE), /* Unk arrow 1 */ DMG_ENTRY(2, EN_IK_DMG_REACT_PROJECTILE),
/* Unk arrow 2 */ DMG_ENTRY(2, EN_IK_DMG_REAC_PROJECTILE), /* Unk arrow 2 */ DMG_ENTRY(2, EN_IK_DMG_REACT_PROJECTILE),
/* Unk arrow 3 */ DMG_ENTRY(15, EN_IK_DMG_REAC_PROJECTILE), /* Unk arrow 3 */ DMG_ENTRY(15, EN_IK_DMG_REACT_PROJECTILE),
/* Fire magic */ DMG_ENTRY(0, EN_IK_DMG_REAC_ELEMENTAL_MAGIC), /* Fire magic */ DMG_ENTRY(0, EN_IK_DMG_REACT_ELEMENTAL_MAGIC),
/* Ice magic */ DMG_ENTRY(0, EN_IK_DMG_REAC_ELEMENTAL_MAGIC), /* Ice magic */ DMG_ENTRY(0, EN_IK_DMG_REACT_ELEMENTAL_MAGIC),
/* Light magic */ DMG_ENTRY(0, EN_IK_DMG_REAC_ELEMENTAL_MAGIC), /* Light magic */ DMG_ENTRY(0, EN_IK_DMG_REACT_ELEMENTAL_MAGIC),
/* Shield */ DMG_ENTRY(0, EN_IK_DMG_REAC_NONE), /* Shield */ DMG_ENTRY(0, EN_IK_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, EN_IK_DMG_REAC_NONE), /* Mirror Ray */ DMG_ENTRY(0, EN_IK_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, EN_IK_DMG_REAC_DAMAGE), /* Kokiri spin */ DMG_ENTRY(1, EN_IK_DMG_REACT_DAMAGE),
/* Giant spin */ DMG_ENTRY(4, EN_IK_DMG_REAC_DAMAGE), /* Giant spin */ DMG_ENTRY(4, EN_IK_DMG_REACT_DAMAGE),
/* Master spin */ DMG_ENTRY(2, EN_IK_DMG_REAC_DAMAGE), /* Master spin */ DMG_ENTRY(2, EN_IK_DMG_REACT_DAMAGE),
/* Kokiri jump */ DMG_ENTRY(2, EN_IK_DMG_REAC_DAMAGE), /* Kokiri jump */ DMG_ENTRY(2, EN_IK_DMG_REACT_DAMAGE),
/* Giant jump */ DMG_ENTRY(8, EN_IK_DMG_REAC_DAMAGE), /* Giant jump */ DMG_ENTRY(8, EN_IK_DMG_REACT_DAMAGE),
/* Master jump */ DMG_ENTRY(4, EN_IK_DMG_REAC_DAMAGE), /* Master jump */ DMG_ENTRY(4, EN_IK_DMG_REACT_DAMAGE),
/* Unknown 1 */ DMG_ENTRY(10, EN_IK_DMG_REAC_DAMAGE), /* Unknown 1 */ DMG_ENTRY(10, EN_IK_DMG_REACT_DAMAGE),
/* Unblockable */ DMG_ENTRY(0, EN_IK_DMG_REAC_NONE), /* Unblockable */ DMG_ENTRY(0, EN_IK_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(4, EN_IK_DMG_REAC_DAMAGE), /* Hammer jump */ DMG_ENTRY(4, EN_IK_DMG_REACT_DAMAGE),
/* Unknown 2 */ DMG_ENTRY(0, EN_IK_DMG_REAC_NONE), /* Unknown 2 */ DMG_ENTRY(0, EN_IK_DMG_REACT_NONE),
}; };
void EnIk_Destroy(Actor* thisx, PlayState* play) { void EnIk_Destroy(Actor* thisx, PlayState* play) {
@ -757,9 +757,9 @@ void EnIk_UpdateDamage(EnIk* this, PlayState* play) {
this->damageReaction = this->actor.colChkInfo.damageReaction; this->damageReaction = this->actor.colChkInfo.damageReaction;
this->bodyCollider.base.acFlags &= ~AC_HIT; this->bodyCollider.base.acFlags &= ~AC_HIT;
if ((this->damageReaction == EN_IK_DMG_REAC_NONE) || (this->damageReaction == EN_IK_DMG_REAC_SPARKS_NO_DMG) || if ((this->damageReaction == EN_IK_DMG_REACT_NONE) || (this->damageReaction == EN_IK_DMG_REACT_SPARKS_NO_DMG) ||
((this->armorStatusFlag == 0) && (this->damageReaction == EN_IK_DMG_REAC_PROJECTILE))) { ((this->armorStatusFlag == 0) && (this->damageReaction == EN_IK_DMG_REACT_PROJECTILE))) {
if (this->damageReaction != EN_IK_DMG_REAC_NONE) { if (this->damageReaction != EN_IK_DMG_REACT_NONE) {
// spawn sparks and don't damage // spawn sparks and don't damage
CollisionCheck_SpawnShieldParticlesMetal(play, &sparksPos); CollisionCheck_SpawnShieldParticlesMetal(play, &sparksPos);
} }

View File

@ -185,81 +185,81 @@ static ColliderQuadInit sAttackColliderQuadInit = {
}; };
typedef enum EnMbDamageReaction { typedef enum EnMbDamageReaction {
/* 0x0 */ ENMB_DMG_REAC_IGNORE, /* 0x0 */ ENMB_DMG_REACT_IGNORE,
/* 0x1 */ ENMB_DMG_REAC_STUN, /* 0x1 */ ENMB_DMG_REACT_STUN,
/* 0x5 */ ENMB_DMG_REAC_FREEZE = 0x5, /* 0x5 */ ENMB_DMG_REACT_FREEZE = 0x5,
/* 0x6 */ ENMB_DMG_REAC_STUN_ICE, /* 0x6 */ ENMB_DMG_REACT_STUN_ICE,
/* 0xF */ ENMB_DMG_REAC_DEFAULT = 0xF /* 0xF */ ENMB_DMG_REACT_DEFAULT = 0xF
} EnMbDamageReaction; } EnMbDamageReaction;
static DamageTable sSpearMoblinDamageTable = { static DamageTable sSpearMoblinDamageTable = {
/* Deku nut */ DMG_ENTRY(0, ENMB_DMG_REAC_FREEZE), /* Deku nut */ DMG_ENTRY(0, ENMB_DMG_REACT_FREEZE),
/* Deku stick */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Deku stick */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Slingshot */ DMG_ENTRY(1, ENMB_DMG_REAC_DEFAULT), /* Slingshot */ DMG_ENTRY(1, ENMB_DMG_REACT_DEFAULT),
/* Explosive */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Explosive */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Boomerang */ DMG_ENTRY(0, ENMB_DMG_REAC_STUN), /* Boomerang */ DMG_ENTRY(0, ENMB_DMG_REACT_STUN),
/* Normal arrow */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Normal arrow */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Hammer swing */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Hammer swing */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Hookshot */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Hookshot */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Kokiri sword */ DMG_ENTRY(1, ENMB_DMG_REAC_DEFAULT), /* Kokiri sword */ DMG_ENTRY(1, ENMB_DMG_REACT_DEFAULT),
/* Master sword */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Master sword */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Giant's Knife */ DMG_ENTRY(4, ENMB_DMG_REAC_DEFAULT), /* Giant's Knife */ DMG_ENTRY(4, ENMB_DMG_REACT_DEFAULT),
/* Fire arrow */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Fire arrow */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Ice arrow */ DMG_ENTRY(4, ENMB_DMG_REAC_STUN_ICE), /* Ice arrow */ DMG_ENTRY(4, ENMB_DMG_REACT_STUN_ICE),
/* Light arrow */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Light arrow */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Unk arrow 1 */ DMG_ENTRY(4, ENMB_DMG_REAC_DEFAULT), /* Unk arrow 1 */ DMG_ENTRY(4, ENMB_DMG_REACT_DEFAULT),
/* Unk arrow 2 */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Unk arrow 2 */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Unk arrow 3 */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Unk arrow 3 */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Fire magic */ DMG_ENTRY(0, ENMB_DMG_REAC_FREEZE), /* Fire magic */ DMG_ENTRY(0, ENMB_DMG_REACT_FREEZE),
/* Ice magic */ DMG_ENTRY(3, ENMB_DMG_REAC_STUN_ICE), /* Ice magic */ DMG_ENTRY(3, ENMB_DMG_REACT_STUN_ICE),
/* Light magic */ DMG_ENTRY(0, ENMB_DMG_REAC_FREEZE), /* Light magic */ DMG_ENTRY(0, ENMB_DMG_REACT_FREEZE),
/* Shield */ DMG_ENTRY(0, ENMB_DMG_REAC_IGNORE), /* Shield */ DMG_ENTRY(0, ENMB_DMG_REACT_IGNORE),
/* Mirror Ray */ DMG_ENTRY(0, ENMB_DMG_REAC_IGNORE), /* Mirror Ray */ DMG_ENTRY(0, ENMB_DMG_REACT_IGNORE),
/* Kokiri spin */ DMG_ENTRY(1, ENMB_DMG_REAC_DEFAULT), /* Kokiri spin */ DMG_ENTRY(1, ENMB_DMG_REACT_DEFAULT),
/* Giant spin */ DMG_ENTRY(4, ENMB_DMG_REAC_DEFAULT), /* Giant spin */ DMG_ENTRY(4, ENMB_DMG_REACT_DEFAULT),
/* Master spin */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Master spin */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Kokiri jump */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Kokiri jump */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Giant jump */ DMG_ENTRY(8, ENMB_DMG_REAC_DEFAULT), /* Giant jump */ DMG_ENTRY(8, ENMB_DMG_REACT_DEFAULT),
/* Master jump */ DMG_ENTRY(4, ENMB_DMG_REAC_DEFAULT), /* Master jump */ DMG_ENTRY(4, ENMB_DMG_REACT_DEFAULT),
/* Unknown 1 */ DMG_ENTRY(0, ENMB_DMG_REAC_FREEZE), /* Unknown 1 */ DMG_ENTRY(0, ENMB_DMG_REACT_FREEZE),
/* Unblockable */ DMG_ENTRY(0, ENMB_DMG_REAC_IGNORE), /* Unblockable */ DMG_ENTRY(0, ENMB_DMG_REACT_IGNORE),
/* Hammer jump */ DMG_ENTRY(4, ENMB_DMG_REAC_DEFAULT), /* Hammer jump */ DMG_ENTRY(4, ENMB_DMG_REACT_DEFAULT),
/* Unknown 2 */ DMG_ENTRY(0, ENMB_DMG_REAC_IGNORE), /* Unknown 2 */ DMG_ENTRY(0, ENMB_DMG_REACT_IGNORE),
}; };
static DamageTable sClubMoblinDamageTable = { static DamageTable sClubMoblinDamageTable = {
/* Deku nut */ DMG_ENTRY(0, ENMB_DMG_REAC_FREEZE), /* Deku nut */ DMG_ENTRY(0, ENMB_DMG_REACT_FREEZE),
/* Deku stick */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Deku stick */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Slingshot */ DMG_ENTRY(0, ENMB_DMG_REAC_IGNORE), /* Slingshot */ DMG_ENTRY(0, ENMB_DMG_REACT_IGNORE),
/* Explosive */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Explosive */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Boomerang */ DMG_ENTRY(0, ENMB_DMG_REAC_IGNORE), /* Boomerang */ DMG_ENTRY(0, ENMB_DMG_REACT_IGNORE),
/* Normal arrow */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Normal arrow */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Hammer swing */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Hammer swing */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Hookshot */ DMG_ENTRY(0, ENMB_DMG_REAC_STUN), /* Hookshot */ DMG_ENTRY(0, ENMB_DMG_REACT_STUN),
/* Kokiri sword */ DMG_ENTRY(1, ENMB_DMG_REAC_DEFAULT), /* Kokiri sword */ DMG_ENTRY(1, ENMB_DMG_REACT_DEFAULT),
/* Master sword */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Master sword */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Giant's Knife */ DMG_ENTRY(4, ENMB_DMG_REAC_DEFAULT), /* Giant's Knife */ DMG_ENTRY(4, ENMB_DMG_REACT_DEFAULT),
/* Fire arrow */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Fire arrow */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Ice arrow */ DMG_ENTRY(4, ENMB_DMG_REAC_STUN_ICE), /* Ice arrow */ DMG_ENTRY(4, ENMB_DMG_REACT_STUN_ICE),
/* Light arrow */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Light arrow */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Unk arrow 1 */ DMG_ENTRY(4, ENMB_DMG_REAC_DEFAULT), /* Unk arrow 1 */ DMG_ENTRY(4, ENMB_DMG_REACT_DEFAULT),
/* Unk arrow 2 */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Unk arrow 2 */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Unk arrow 3 */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Unk arrow 3 */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Fire magic */ DMG_ENTRY(0, ENMB_DMG_REAC_FREEZE), /* Fire magic */ DMG_ENTRY(0, ENMB_DMG_REACT_FREEZE),
/* Ice magic */ DMG_ENTRY(3, ENMB_DMG_REAC_STUN_ICE), /* Ice magic */ DMG_ENTRY(3, ENMB_DMG_REACT_STUN_ICE),
/* Light magic */ DMG_ENTRY(0, ENMB_DMG_REAC_FREEZE), /* Light magic */ DMG_ENTRY(0, ENMB_DMG_REACT_FREEZE),
/* Shield */ DMG_ENTRY(0, ENMB_DMG_REAC_IGNORE), /* Shield */ DMG_ENTRY(0, ENMB_DMG_REACT_IGNORE),
/* Mirror Ray */ DMG_ENTRY(0, ENMB_DMG_REAC_IGNORE), /* Mirror Ray */ DMG_ENTRY(0, ENMB_DMG_REACT_IGNORE),
/* Kokiri spin */ DMG_ENTRY(1, ENMB_DMG_REAC_DEFAULT), /* Kokiri spin */ DMG_ENTRY(1, ENMB_DMG_REACT_DEFAULT),
/* Giant spin */ DMG_ENTRY(4, ENMB_DMG_REAC_DEFAULT), /* Giant spin */ DMG_ENTRY(4, ENMB_DMG_REACT_DEFAULT),
/* Master spin */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Master spin */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Kokiri jump */ DMG_ENTRY(2, ENMB_DMG_REAC_DEFAULT), /* Kokiri jump */ DMG_ENTRY(2, ENMB_DMG_REACT_DEFAULT),
/* Giant jump */ DMG_ENTRY(8, ENMB_DMG_REAC_DEFAULT), /* Giant jump */ DMG_ENTRY(8, ENMB_DMG_REACT_DEFAULT),
/* Master jump */ DMG_ENTRY(4, ENMB_DMG_REAC_DEFAULT), /* Master jump */ DMG_ENTRY(4, ENMB_DMG_REACT_DEFAULT),
/* Unknown 1 */ DMG_ENTRY(0, ENMB_DMG_REAC_FREEZE), /* Unknown 1 */ DMG_ENTRY(0, ENMB_DMG_REACT_FREEZE),
/* Unblockable */ DMG_ENTRY(0, ENMB_DMG_REAC_IGNORE), /* Unblockable */ DMG_ENTRY(0, ENMB_DMG_REACT_IGNORE),
/* Hammer jump */ DMG_ENTRY(4, ENMB_DMG_REAC_DEFAULT), /* Hammer jump */ DMG_ENTRY(4, ENMB_DMG_REACT_DEFAULT),
/* Unknown 2 */ DMG_ENTRY(0, ENMB_DMG_REAC_IGNORE), /* Unknown 2 */ DMG_ENTRY(0, ENMB_DMG_REACT_IGNORE),
}; };
static InitChainEntry sInitChain[] = { static InitChainEntry sInitChain[] = {
@ -605,7 +605,7 @@ void EnMb_SetupStunned(EnMb* this) {
this->state = ENMB_STATE_STUNNED; this->state = ENMB_STATE_STUNNED;
this->actor.speed = 0.0f; this->actor.speed = 0.0f;
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 80); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 80);
if (this->damageReaction == ENMB_DMG_REAC_STUN_ICE) { if (this->damageReaction == ENMB_DMG_REACT_STUN_ICE) {
this->iceEffectTimer = 40; this->iceEffectTimer = 40;
} else { } else {
if (this->actor.params != ENMB_TYPE_CLUB) { if (this->actor.params != ENMB_TYPE_CLUB) {
@ -1440,8 +1440,8 @@ void EnMb_CheckColliding(EnMb* this, PlayState* play) {
this->bodyCollider.base.acFlags &= ~AC_HIT; this->bodyCollider.base.acFlags &= ~AC_HIT;
} else if ((this->bodyCollider.base.acFlags & AC_HIT) && this->state >= ENMB_STATE_STUNNED) { } else if ((this->bodyCollider.base.acFlags & AC_HIT) && this->state >= ENMB_STATE_STUNNED) {
this->bodyCollider.base.acFlags &= ~AC_HIT; this->bodyCollider.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageReaction != ENMB_DMG_REAC_IGNORE && if (this->actor.colChkInfo.damageReaction != ENMB_DMG_REACT_IGNORE &&
this->actor.colChkInfo.damageReaction != ENMB_DMG_REAC_FREEZE) { this->actor.colChkInfo.damageReaction != ENMB_DMG_REACT_FREEZE) {
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) { if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
player->stateFlags2 &= ~PLAYER_STATE2_7; player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL; player->actor.parent = NULL;
@ -1453,8 +1453,8 @@ void EnMb_CheckColliding(EnMb* this, PlayState* play) {
this->damageReaction = this->actor.colChkInfo.damageReaction; this->damageReaction = this->actor.colChkInfo.damageReaction;
this->attack = ENMB_ATTACK_NONE; this->attack = ENMB_ATTACK_NONE;
Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, false); Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, false);
if (this->actor.colChkInfo.damageReaction == ENMB_DMG_REAC_STUN || if (this->actor.colChkInfo.damageReaction == ENMB_DMG_REACT_STUN ||
this->actor.colChkInfo.damageReaction == ENMB_DMG_REAC_STUN_ICE) { this->actor.colChkInfo.damageReaction == ENMB_DMG_REACT_STUN_ICE) {
if (this->state != ENMB_STATE_STUNNED) { if (this->state != ENMB_STATE_STUNNED) {
Actor_ApplyDamage(&this->actor); Actor_ApplyDamage(&this->actor);
EnMb_SetupStunned(this); EnMb_SetupStunned(this);
@ -1485,7 +1485,7 @@ void EnMb_Update(Actor* thisx, PlayState* play) {
s32 pad; s32 pad;
EnMb_CheckColliding(this, play); EnMb_CheckColliding(this, play);
if (thisx->colChkInfo.damageReaction != ENMB_DMG_REAC_FREEZE) { if (thisx->colChkInfo.damageReaction != ENMB_DMG_REACT_FREEZE) {
this->actionFunc(this, play); this->actionFunc(this, play);
Actor_MoveXZGravity(thisx); Actor_MoveXZGravity(thisx);
Actor_UpdateBgCheckInfo(play, thisx, 40.0f, 40.0f, 70.0f, Actor_UpdateBgCheckInfo(play, thisx, 40.0f, 40.0f, 70.0f,

View File

@ -138,47 +138,47 @@ static ColliderQuadInit sQuadInit = {
}; };
typedef enum EnPeehatDamageReaction { typedef enum EnPeehatDamageReaction {
/* 00 */ PEAHAT_DMG_REAC_ATTACK = 0, /* 00 */ PEAHAT_DMG_REACT_ATTACK = 0,
/* 06 */ PEAHAT_DMG_REAC_LIGHT_ICE_ARROW = 6, /* 06 */ PEAHAT_DMG_REACT_LIGHT_ICE_ARROW = 6,
/* 12 */ PEAHAT_DMG_REAC_FIRE = 12, /* 12 */ PEAHAT_DMG_REACT_FIRE = 12,
/* 13 */ PEAHAT_DMG_REAC_HOOKSHOT = 13, /* 13 */ PEAHAT_DMG_REACT_HOOKSHOT = 13,
/* 14 */ PEAHAT_DMG_REAC_BOOMERANG = 14, /* 14 */ PEAHAT_DMG_REACT_BOOMERANG = 14,
/* 15 */ PEAHAT_DMG_REAC_NUT = 15 /* 15 */ PEAHAT_DMG_REACT_NUT = 15
} EnPeehatDamageReaction; } EnPeehatDamageReaction;
static DamageTable sDamageTable = { static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, PEAHAT_DMG_REAC_NUT), /* Deku nut */ DMG_ENTRY(0, PEAHAT_DMG_REACT_NUT),
/* Deku stick */ DMG_ENTRY(2, PEAHAT_DMG_REAC_ATTACK), /* Deku stick */ DMG_ENTRY(2, PEAHAT_DMG_REACT_ATTACK),
/* Slingshot */ DMG_ENTRY(1, PEAHAT_DMG_REAC_ATTACK), /* Slingshot */ DMG_ENTRY(1, PEAHAT_DMG_REACT_ATTACK),
/* Explosive */ DMG_ENTRY(2, PEAHAT_DMG_REAC_ATTACK), /* Explosive */ DMG_ENTRY(2, PEAHAT_DMG_REACT_ATTACK),
/* Boomerang */ DMG_ENTRY(0, PEAHAT_DMG_REAC_BOOMERANG), /* Boomerang */ DMG_ENTRY(0, PEAHAT_DMG_REACT_BOOMERANG),
/* Normal arrow */ DMG_ENTRY(2, PEAHAT_DMG_REAC_ATTACK), /* Normal arrow */ DMG_ENTRY(2, PEAHAT_DMG_REACT_ATTACK),
/* Hammer swing */ DMG_ENTRY(2, PEAHAT_DMG_REAC_ATTACK), /* Hammer swing */ DMG_ENTRY(2, PEAHAT_DMG_REACT_ATTACK),
/* Hookshot */ DMG_ENTRY(2, PEAHAT_DMG_REAC_HOOKSHOT), /* Hookshot */ DMG_ENTRY(2, PEAHAT_DMG_REACT_HOOKSHOT),
/* Kokiri sword */ DMG_ENTRY(1, PEAHAT_DMG_REAC_ATTACK), /* Kokiri sword */ DMG_ENTRY(1, PEAHAT_DMG_REACT_ATTACK),
/* Master sword */ DMG_ENTRY(2, PEAHAT_DMG_REAC_ATTACK), /* Master sword */ DMG_ENTRY(2, PEAHAT_DMG_REACT_ATTACK),
/* Giant's Knife */ DMG_ENTRY(4, PEAHAT_DMG_REAC_ATTACK), /* Giant's Knife */ DMG_ENTRY(4, PEAHAT_DMG_REACT_ATTACK),
/* Fire arrow */ DMG_ENTRY(4, PEAHAT_DMG_REAC_FIRE), /* Fire arrow */ DMG_ENTRY(4, PEAHAT_DMG_REACT_FIRE),
/* Ice arrow */ DMG_ENTRY(2, PEAHAT_DMG_REAC_ATTACK), /* Ice arrow */ DMG_ENTRY(2, PEAHAT_DMG_REACT_ATTACK),
/* Light arrow */ DMG_ENTRY(2, PEAHAT_DMG_REAC_ATTACK), /* Light arrow */ DMG_ENTRY(2, PEAHAT_DMG_REACT_ATTACK),
/* Unk arrow 1 */ DMG_ENTRY(2, PEAHAT_DMG_REAC_ATTACK), /* Unk arrow 1 */ DMG_ENTRY(2, PEAHAT_DMG_REACT_ATTACK),
/* Unk arrow 2 */ DMG_ENTRY(2, PEAHAT_DMG_REAC_ATTACK), /* Unk arrow 2 */ DMG_ENTRY(2, PEAHAT_DMG_REACT_ATTACK),
/* Unk arrow 3 */ DMG_ENTRY(2, PEAHAT_DMG_REAC_ATTACK), /* Unk arrow 3 */ DMG_ENTRY(2, PEAHAT_DMG_REACT_ATTACK),
/* Fire magic */ DMG_ENTRY(3, PEAHAT_DMG_REAC_FIRE), /* Fire magic */ DMG_ENTRY(3, PEAHAT_DMG_REACT_FIRE),
/* Ice magic */ DMG_ENTRY(0, PEAHAT_DMG_REAC_LIGHT_ICE_ARROW), /* Ice magic */ DMG_ENTRY(0, PEAHAT_DMG_REACT_LIGHT_ICE_ARROW),
/* Light magic */ DMG_ENTRY(0, PEAHAT_DMG_REAC_LIGHT_ICE_ARROW), /* Light magic */ DMG_ENTRY(0, PEAHAT_DMG_REACT_LIGHT_ICE_ARROW),
/* Shield */ DMG_ENTRY(0, PEAHAT_DMG_REAC_ATTACK), /* Shield */ DMG_ENTRY(0, PEAHAT_DMG_REACT_ATTACK),
/* Mirror Ray */ DMG_ENTRY(0, PEAHAT_DMG_REAC_ATTACK), /* Mirror Ray */ DMG_ENTRY(0, PEAHAT_DMG_REACT_ATTACK),
/* Kokiri spin */ DMG_ENTRY(1, PEAHAT_DMG_REAC_ATTACK), /* Kokiri spin */ DMG_ENTRY(1, PEAHAT_DMG_REACT_ATTACK),
/* Giant spin */ DMG_ENTRY(4, PEAHAT_DMG_REAC_ATTACK), /* Giant spin */ DMG_ENTRY(4, PEAHAT_DMG_REACT_ATTACK),
/* Master spin */ DMG_ENTRY(2, PEAHAT_DMG_REAC_ATTACK), /* Master spin */ DMG_ENTRY(2, PEAHAT_DMG_REACT_ATTACK),
/* Kokiri jump */ DMG_ENTRY(2, PEAHAT_DMG_REAC_ATTACK), /* Kokiri jump */ DMG_ENTRY(2, PEAHAT_DMG_REACT_ATTACK),
/* Giant jump */ DMG_ENTRY(8, PEAHAT_DMG_REAC_ATTACK), /* Giant jump */ DMG_ENTRY(8, PEAHAT_DMG_REACT_ATTACK),
/* Master jump */ DMG_ENTRY(4, PEAHAT_DMG_REAC_ATTACK), /* Master jump */ DMG_ENTRY(4, PEAHAT_DMG_REACT_ATTACK),
/* Unknown 1 */ DMG_ENTRY(0, PEAHAT_DMG_REAC_ATTACK), /* Unknown 1 */ DMG_ENTRY(0, PEAHAT_DMG_REACT_ATTACK),
/* Unblockable */ DMG_ENTRY(0, PEAHAT_DMG_REAC_ATTACK), /* Unblockable */ DMG_ENTRY(0, PEAHAT_DMG_REACT_ATTACK),
/* Hammer jump */ DMG_ENTRY(4, PEAHAT_DMG_REAC_ATTACK), /* Hammer jump */ DMG_ENTRY(4, PEAHAT_DMG_REACT_ATTACK),
/* Unknown 2 */ DMG_ENTRY(0, PEAHAT_DMG_REAC_ATTACK), /* Unknown 2 */ DMG_ENTRY(0, PEAHAT_DMG_REACT_ATTACK),
}; };
typedef enum PeahatState { typedef enum PeahatState {
@ -902,13 +902,13 @@ void EnPeehat_Adult_CollisionCheck(EnPeehat* this, PlayState* play) {
} else if (this->colliderJntSph.base.acFlags & AC_HIT) { } else if (this->colliderJntSph.base.acFlags & AC_HIT) {
this->colliderJntSph.base.acFlags &= ~AC_HIT; this->colliderJntSph.base.acFlags &= ~AC_HIT;
Actor_SetDropFlagJntSph(&this->actor, &this->colliderJntSph, true); Actor_SetDropFlagJntSph(&this->actor, &this->colliderJntSph, true);
if (this->actor.colChkInfo.damageReaction == PEAHAT_DMG_REAC_NUT || if (this->actor.colChkInfo.damageReaction == PEAHAT_DMG_REACT_NUT ||
this->actor.colChkInfo.damageReaction == PEAHAT_DMG_REAC_LIGHT_ICE_ARROW) { this->actor.colChkInfo.damageReaction == PEAHAT_DMG_REACT_LIGHT_ICE_ARROW) {
return; return;
} }
if (this->actor.colChkInfo.damageReaction == PEAHAT_DMG_REAC_HOOKSHOT) { if (this->actor.colChkInfo.damageReaction == PEAHAT_DMG_REACT_HOOKSHOT) {
this->actor.colChkInfo.health = 0; this->actor.colChkInfo.health = 0;
} else if (this->actor.colChkInfo.damageReaction == PEAHAT_DMG_REAC_BOOMERANG) { } else if (this->actor.colChkInfo.damageReaction == PEAHAT_DMG_REACT_BOOMERANG) {
if (this->state != PEAHAT_STATE_STUNNED) { if (this->state != PEAHAT_STATE_STUNNED) {
EnPeehat_SetStateBoomerangStunned(this); EnPeehat_SetStateBoomerangStunned(this);
} }
@ -919,7 +919,7 @@ void EnPeehat_Adult_CollisionCheck(EnPeehat* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_PIHAT_DAMAGE); Actor_PlaySfx(&this->actor, NA_SE_EN_PIHAT_DAMAGE);
} }
if (this->actor.colChkInfo.damageReaction == PEAHAT_DMG_REAC_FIRE) { if (this->actor.colChkInfo.damageReaction == PEAHAT_DMG_REACT_FIRE) {
Vec3f pos; Vec3f pos;
s32 i; s32 i;
for (i = 4; i >= 0; i--) { for (i = 4; i >= 0; i--) {
@ -949,7 +949,7 @@ void EnPeehat_Update(Actor* thisx, PlayState* play) {
if (thisx->params <= 0) { if (thisx->params <= 0) {
EnPeehat_Adult_CollisionCheck(this, play); EnPeehat_Adult_CollisionCheck(this, play);
} }
if (thisx->colChkInfo.damageReaction != PEAHAT_DMG_REAC_LIGHT_ICE_ARROW) { if (thisx->colChkInfo.damageReaction != PEAHAT_DMG_REACT_LIGHT_ICE_ARROW) {
if (thisx->speed != 0.0f || thisx->velocity.y != 0.0f) { if (thisx->speed != 0.0f || thisx->velocity.y != 0.0f) {
Actor_MoveXZGravity(thisx); Actor_MoveXZGravity(thisx);
Actor_UpdateBgCheckInfo(play, thisx, 25.0f, 30.0f, 30.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2); Actor_UpdateBgCheckInfo(play, thisx, 25.0f, 30.0f, 30.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);

View File

@ -109,47 +109,47 @@ static ColliderCylinderInit sCylinderInit = {
}; };
typedef enum EnRdDamageReaction { typedef enum EnRdDamageReaction {
/* 0x0 */ REDEAD_DMG_REAC_NONE, // Does not interact with the Gibdo/Redead at all /* 0x0 */ REDEAD_DMG_REACT_NONE, // Does not interact with the Gibdo/Redead at all
/* 0x1 */ REDEAD_DMG_REAC_HOOKSHOT, // Stuns the Gibdo/Redead /* 0x1 */ REDEAD_DMG_REACT_HOOKSHOT, // Stuns the Gibdo/Redead
/* 0x6 */ REDEAD_DMG_REAC_ICE_MAGIC = 0x6, // Does not interact with the Gibdo/Redead at all /* 0x6 */ REDEAD_DMG_REACT_ICE_MAGIC = 0x6, // Does not interact with the Gibdo/Redead at all
/* 0xD */ REDEAD_DMG_REAC_LIGHT_MAGIC = 0xD, // Stuns the Gibdo/Redead /* 0xD */ REDEAD_DMG_REACT_LIGHT_MAGIC = 0xD, // Stuns the Gibdo/Redead
/* 0xE */ REDEAD_DMG_REAC_FIRE_MAGIC, // Applies a fire effect /* 0xE */ REDEAD_DMG_REACT_FIRE_MAGIC, // Applies a fire effect
/* 0xF */ REDEAD_DMG_REAC_DAMAGE // Deals damage without stunning or applying an effect /* 0xF */ REDEAD_DMG_REACT_DAMAGE // Deals damage without stunning or applying an effect
} EnRdDamageReaction; } EnRdDamageReaction;
static DamageTable sDamageTable = { static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, REDEAD_DMG_REAC_NONE), /* Deku nut */ DMG_ENTRY(0, REDEAD_DMG_REACT_NONE),
/* Deku stick */ DMG_ENTRY(2, REDEAD_DMG_REAC_DAMAGE), /* Deku stick */ DMG_ENTRY(2, REDEAD_DMG_REACT_DAMAGE),
/* Slingshot */ DMG_ENTRY(0, REDEAD_DMG_REAC_NONE), /* Slingshot */ DMG_ENTRY(0, REDEAD_DMG_REACT_NONE),
/* Explosive */ DMG_ENTRY(0, REDEAD_DMG_REAC_NONE), /* Explosive */ DMG_ENTRY(0, REDEAD_DMG_REACT_NONE),
/* Boomerang */ DMG_ENTRY(0, REDEAD_DMG_REAC_NONE), /* Boomerang */ DMG_ENTRY(0, REDEAD_DMG_REACT_NONE),
/* Normal arrow */ DMG_ENTRY(0, REDEAD_DMG_REAC_NONE), /* Normal arrow */ DMG_ENTRY(0, REDEAD_DMG_REACT_NONE),
/* Hammer swing */ DMG_ENTRY(2, REDEAD_DMG_REAC_DAMAGE), /* Hammer swing */ DMG_ENTRY(2, REDEAD_DMG_REACT_DAMAGE),
/* Hookshot */ DMG_ENTRY(0, REDEAD_DMG_REAC_HOOKSHOT), /* Hookshot */ DMG_ENTRY(0, REDEAD_DMG_REACT_HOOKSHOT),
/* Kokiri sword */ DMG_ENTRY(1, REDEAD_DMG_REAC_DAMAGE), /* Kokiri sword */ DMG_ENTRY(1, REDEAD_DMG_REACT_DAMAGE),
/* Master sword */ DMG_ENTRY(2, REDEAD_DMG_REAC_DAMAGE), /* Master sword */ DMG_ENTRY(2, REDEAD_DMG_REACT_DAMAGE),
/* Giant's Knife */ DMG_ENTRY(4, REDEAD_DMG_REAC_DAMAGE), /* Giant's Knife */ DMG_ENTRY(4, REDEAD_DMG_REACT_DAMAGE),
/* Fire arrow */ DMG_ENTRY(0, REDEAD_DMG_REAC_NONE), /* Fire arrow */ DMG_ENTRY(0, REDEAD_DMG_REACT_NONE),
/* Ice arrow */ DMG_ENTRY(0, REDEAD_DMG_REAC_NONE), /* Ice arrow */ DMG_ENTRY(0, REDEAD_DMG_REACT_NONE),
/* Light arrow */ DMG_ENTRY(0, REDEAD_DMG_REAC_NONE), /* Light arrow */ DMG_ENTRY(0, REDEAD_DMG_REACT_NONE),
/* Unk arrow 1 */ DMG_ENTRY(0, REDEAD_DMG_REAC_NONE), /* Unk arrow 1 */ DMG_ENTRY(0, REDEAD_DMG_REACT_NONE),
/* Unk arrow 2 */ DMG_ENTRY(0, REDEAD_DMG_REAC_NONE), /* Unk arrow 2 */ DMG_ENTRY(0, REDEAD_DMG_REACT_NONE),
/* Unk arrow 3 */ DMG_ENTRY(0, REDEAD_DMG_REAC_NONE), /* Unk arrow 3 */ DMG_ENTRY(0, REDEAD_DMG_REACT_NONE),
/* Fire magic */ DMG_ENTRY(4, REDEAD_DMG_REAC_FIRE_MAGIC), /* Fire magic */ DMG_ENTRY(4, REDEAD_DMG_REACT_FIRE_MAGIC),
/* Ice magic */ DMG_ENTRY(0, REDEAD_DMG_REAC_ICE_MAGIC), /* Ice magic */ DMG_ENTRY(0, REDEAD_DMG_REACT_ICE_MAGIC),
/* Light magic */ DMG_ENTRY(3, REDEAD_DMG_REAC_LIGHT_MAGIC), /* Light magic */ DMG_ENTRY(3, REDEAD_DMG_REACT_LIGHT_MAGIC),
/* Shield */ DMG_ENTRY(0, REDEAD_DMG_REAC_NONE), /* Shield */ DMG_ENTRY(0, REDEAD_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, REDEAD_DMG_REAC_NONE), /* Mirror Ray */ DMG_ENTRY(0, REDEAD_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, REDEAD_DMG_REAC_DAMAGE), /* Kokiri spin */ DMG_ENTRY(1, REDEAD_DMG_REACT_DAMAGE),
/* Giant spin */ DMG_ENTRY(4, REDEAD_DMG_REAC_DAMAGE), /* Giant spin */ DMG_ENTRY(4, REDEAD_DMG_REACT_DAMAGE),
/* Master spin */ DMG_ENTRY(2, REDEAD_DMG_REAC_DAMAGE), /* Master spin */ DMG_ENTRY(2, REDEAD_DMG_REACT_DAMAGE),
/* Kokiri jump */ DMG_ENTRY(2, REDEAD_DMG_REAC_DAMAGE), /* Kokiri jump */ DMG_ENTRY(2, REDEAD_DMG_REACT_DAMAGE),
/* Giant jump */ DMG_ENTRY(8, REDEAD_DMG_REAC_DAMAGE), /* Giant jump */ DMG_ENTRY(8, REDEAD_DMG_REACT_DAMAGE),
/* Master jump */ DMG_ENTRY(4, REDEAD_DMG_REAC_DAMAGE), /* Master jump */ DMG_ENTRY(4, REDEAD_DMG_REACT_DAMAGE),
/* Unknown 1 */ DMG_ENTRY(0, REDEAD_DMG_REAC_NONE), /* Unknown 1 */ DMG_ENTRY(0, REDEAD_DMG_REACT_NONE),
/* Unblockable */ DMG_ENTRY(0, REDEAD_DMG_REAC_NONE), /* Unblockable */ DMG_ENTRY(0, REDEAD_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(4, REDEAD_DMG_REAC_DAMAGE), /* Hammer jump */ DMG_ENTRY(4, REDEAD_DMG_REACT_DAMAGE),
/* Unknown 2 */ DMG_ENTRY(0, REDEAD_DMG_REAC_NONE), /* Unknown 2 */ DMG_ENTRY(0, REDEAD_DMG_REACT_NONE),
}; };
static InitChainEntry sInitChain[] = { static InitChainEntry sInitChain[] = {
@ -768,7 +768,7 @@ void EnRd_SetupStunned(EnRd* this) {
Actor_PlaySfx(&this->actor, NA_SE_EN_LIGHT_ARROW_HIT); Actor_PlaySfx(&this->actor, NA_SE_EN_LIGHT_ARROW_HIT);
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_GRAY, COLORFILTER_INTENSITY_FLAG | 200, Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_GRAY, COLORFILTER_INTENSITY_FLAG | 200,
COLORFILTER_BUFFLAG_OPA, 255); COLORFILTER_BUFFLAG_OPA, 255);
} else if (this->damageReaction == REDEAD_DMG_REAC_HOOKSHOT) { } else if (this->damageReaction == REDEAD_DMG_REACT_HOOKSHOT) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 200, COLORFILTER_BUFFLAG_OPA, 80); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 200, COLORFILTER_BUFFLAG_OPA, 80);
} else { } else {
Actor_PlaySfx(&this->actor, NA_SE_EN_LIGHT_ARROW_HIT); Actor_PlaySfx(&this->actor, NA_SE_EN_LIGHT_ARROW_HIT);
@ -843,9 +843,9 @@ void EnRd_UpdateDamage(EnRd* this, PlayState* play) {
this->unk_31D = player->unk_845; this->unk_31D = player->unk_845;
} }
if ((this->damageReaction != REDEAD_DMG_REAC_NONE) && (this->damageReaction != REDEAD_DMG_REAC_ICE_MAGIC)) { if ((this->damageReaction != REDEAD_DMG_REACT_NONE) && (this->damageReaction != REDEAD_DMG_REACT_ICE_MAGIC)) {
if (((this->damageReaction == REDEAD_DMG_REAC_HOOKSHOT) || if (((this->damageReaction == REDEAD_DMG_REACT_HOOKSHOT) ||
(this->damageReaction == REDEAD_DMG_REAC_LIGHT_MAGIC)) && (this->damageReaction == REDEAD_DMG_REACT_LIGHT_MAGIC)) &&
(this->action != REDEAD_ACTION_STUNNED)) { (this->action != REDEAD_ACTION_STUNNED)) {
Actor_ApplyDamage(&this->actor); Actor_ApplyDamage(&this->actor);
EnRd_SetupStunned(this); EnRd_SetupStunned(this);
@ -855,7 +855,7 @@ void EnRd_UpdateDamage(EnRd* this, PlayState* play) {
this->stunnedBySunsSong = false; this->stunnedBySunsSong = false;
this->sunsSongStunTimer = 0; this->sunsSongStunTimer = 0;
if (this->damageReaction == REDEAD_DMG_REAC_FIRE_MAGIC) { if (this->damageReaction == REDEAD_DMG_REACT_FIRE_MAGIC) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 80); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 80);
this->fireTimer = 40; this->fireTimer = 40;
} else { } else {
@ -887,8 +887,8 @@ void EnRd_Update(Actor* thisx, PlayState* play) {
gSaveContext.sunsSongState = SUNSSONG_INACTIVE; gSaveContext.sunsSongState = SUNSSONG_INACTIVE;
} }
if (this->damageReaction != REDEAD_DMG_REAC_ICE_MAGIC && if (this->damageReaction != REDEAD_DMG_REACT_ICE_MAGIC &&
((this->action != REDEAD_ACTION_RISE_FROM_COFFIN) || (this->damageReaction != REDEAD_DMG_REAC_FIRE_MAGIC))) { ((this->action != REDEAD_ACTION_RISE_FROM_COFFIN) || (this->damageReaction != REDEAD_DMG_REACT_FIRE_MAGIC))) {
if (this->playerStunWaitTimer != 0) { if (this->playerStunWaitTimer != 0) {
this->playerStunWaitTimer--; this->playerStunWaitTimer--;
} }

View File

@ -49,48 +49,48 @@ void EnReeba_Stunned(EnReeba* this, PlayState* play);
void EnReeba_StunDie(EnReeba* this, PlayState* play); void EnReeba_StunDie(EnReeba* this, PlayState* play);
typedef enum LeeverDamageReaction { typedef enum LeeverDamageReaction {
/* 0x00 */ LEEVER_DMG_REAC_NONE, // used by anything that cant kill the Leever /* 0x00 */ LEEVER_DMG_REACT_NONE, // used by anything that cant kill the Leever
/* 0x01 */ LEEVER_DMG_REAC_UNK, // used by "unknown 1" attack /* 0x01 */ LEEVER_DMG_REACT_UNK, // used by "unknown 1" attack
/* 0x03 */ LEEVER_DMG_REAC_ICE = 3, /* 0x03 */ LEEVER_DMG_REACT_ICE = 3,
/* 0x0B */ LEEVER_DMG_REAC_UNUSED = 11, // not used in the damage table, but still checked for. /* 0x0B */ LEEVER_DMG_REACT_UNUSED = 11, // not used in the damage table, but still checked for.
/* 0x0C */ LEEVER_DMG_REAC_BOOMERANG, /* 0x0C */ LEEVER_DMG_REACT_BOOMERANG,
/* 0x0D */ LEEVER_DMG_REAC_HOOKSHOT, /* 0x0D */ LEEVER_DMG_REACT_HOOKSHOT,
/* 0x0E */ LEEVER_DMG_REAC_OTHER /* 0x0E */ LEEVER_DMG_REACT_OTHER
} LeeverDamageReaction; } LeeverDamageReaction;
static DamageTable sDamageTable = { static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, LEEVER_DMG_REAC_NONE), /* Deku nut */ DMG_ENTRY(0, LEEVER_DMG_REACT_NONE),
/* Deku stick */ DMG_ENTRY(2, LEEVER_DMG_REAC_OTHER), /* Deku stick */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Slingshot */ DMG_ENTRY(1, LEEVER_DMG_REAC_OTHER), /* Slingshot */ DMG_ENTRY(1, LEEVER_DMG_REACT_OTHER),
/* Explosive */ DMG_ENTRY(2, LEEVER_DMG_REAC_OTHER), /* Explosive */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Boomerang */ DMG_ENTRY(1, LEEVER_DMG_REAC_BOOMERANG), /* Boomerang */ DMG_ENTRY(1, LEEVER_DMG_REACT_BOOMERANG),
/* Normal arrow */ DMG_ENTRY(2, LEEVER_DMG_REAC_OTHER), /* Normal arrow */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Hammer swing */ DMG_ENTRY(2, LEEVER_DMG_REAC_OTHER), /* Hammer swing */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Hookshot */ DMG_ENTRY(2, LEEVER_DMG_REAC_HOOKSHOT), /* Hookshot */ DMG_ENTRY(2, LEEVER_DMG_REACT_HOOKSHOT),
/* Kokiri sword */ DMG_ENTRY(1, LEEVER_DMG_REAC_OTHER), /* Kokiri sword */ DMG_ENTRY(1, LEEVER_DMG_REACT_OTHER),
/* Master sword */ DMG_ENTRY(4, LEEVER_DMG_REAC_OTHER), /* Master sword */ DMG_ENTRY(4, LEEVER_DMG_REACT_OTHER),
/* Giant's Knife */ DMG_ENTRY(6, LEEVER_DMG_REAC_OTHER), /* Giant's Knife */ DMG_ENTRY(6, LEEVER_DMG_REACT_OTHER),
/* Fire arrow */ DMG_ENTRY(2, LEEVER_DMG_REAC_OTHER), /* Fire arrow */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Ice arrow */ DMG_ENTRY(4, LEEVER_DMG_REAC_ICE), /* Ice arrow */ DMG_ENTRY(4, LEEVER_DMG_REACT_ICE),
/* Light arrow */ DMG_ENTRY(2, LEEVER_DMG_REAC_OTHER), /* Light arrow */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Unk arrow 1 */ DMG_ENTRY(2, LEEVER_DMG_REAC_OTHER), /* Unk arrow 1 */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Unk arrow 2 */ DMG_ENTRY(2, LEEVER_DMG_REAC_OTHER), /* Unk arrow 2 */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Unk arrow 3 */ DMG_ENTRY(2, LEEVER_DMG_REAC_OTHER), /* Unk arrow 3 */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Fire magic */ DMG_ENTRY(0, LEEVER_DMG_REAC_NONE), /* Fire magic */ DMG_ENTRY(0, LEEVER_DMG_REACT_NONE),
/* Ice magic */ DMG_ENTRY(4, LEEVER_DMG_REAC_ICE), /* Ice magic */ DMG_ENTRY(4, LEEVER_DMG_REACT_ICE),
/* Light magic */ DMG_ENTRY(0, LEEVER_DMG_REAC_NONE), /* Light magic */ DMG_ENTRY(0, LEEVER_DMG_REACT_NONE),
/* Shield */ DMG_ENTRY(0, LEEVER_DMG_REAC_NONE), /* Shield */ DMG_ENTRY(0, LEEVER_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, LEEVER_DMG_REAC_NONE), /* Mirror Ray */ DMG_ENTRY(0, LEEVER_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(2, LEEVER_DMG_REAC_OTHER), /* Kokiri spin */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Giant spin */ DMG_ENTRY(8, LEEVER_DMG_REAC_OTHER), /* Giant spin */ DMG_ENTRY(8, LEEVER_DMG_REACT_OTHER),
/* Master spin */ DMG_ENTRY(4, LEEVER_DMG_REAC_OTHER), /* Master spin */ DMG_ENTRY(4, LEEVER_DMG_REACT_OTHER),
/* Kokiri jump */ DMG_ENTRY(2, LEEVER_DMG_REAC_OTHER), /* Kokiri jump */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Giant jump */ DMG_ENTRY(8, LEEVER_DMG_REAC_OTHER), /* Giant jump */ DMG_ENTRY(8, LEEVER_DMG_REACT_OTHER),
/* Master jump */ DMG_ENTRY(4, LEEVER_DMG_REAC_OTHER), /* Master jump */ DMG_ENTRY(4, LEEVER_DMG_REACT_OTHER),
/* Unknown 1 */ DMG_ENTRY(0, LEEVER_DMG_REAC_UNK), /* Unknown 1 */ DMG_ENTRY(0, LEEVER_DMG_REACT_UNK),
/* Unblockable */ DMG_ENTRY(0, LEEVER_DMG_REAC_NONE), /* Unblockable */ DMG_ENTRY(0, LEEVER_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(0, LEEVER_DMG_REAC_NONE), /* Hammer jump */ DMG_ENTRY(0, LEEVER_DMG_REACT_NONE),
/* Unknown 2 */ DMG_ENTRY(0, LEEVER_DMG_REAC_NONE), /* Unknown 2 */ DMG_ENTRY(0, LEEVER_DMG_REACT_NONE),
}; };
ActorProfile En_Reeba_Profile = { ActorProfile En_Reeba_Profile = {
@ -556,8 +556,8 @@ void EnReeba_CheckDamage(EnReeba* this, PlayState* play) {
this->stunType = LEEVER_STUN_NONE; this->stunType = LEEVER_STUN_NONE;
switch (this->actor.colChkInfo.damageReaction) { switch (this->actor.colChkInfo.damageReaction) {
case LEEVER_DMG_REAC_UNUSED: case LEEVER_DMG_REACT_UNUSED:
case LEEVER_DMG_REAC_BOOMERANG: case LEEVER_DMG_REACT_BOOMERANG:
if ((this->actor.colChkInfo.health > 1) && (this->stunType != LEEVER_STUN_OTHER)) { if ((this->actor.colChkInfo.health > 1) && (this->stunType != LEEVER_STUN_OTHER)) {
this->stunType = LEEVER_STUN_OTHER; this->stunType = LEEVER_STUN_OTHER;
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
@ -567,7 +567,7 @@ void EnReeba_CheckDamage(EnReeba* this, PlayState* play) {
break; break;
} }
FALLTHROUGH; FALLTHROUGH;
case LEEVER_DMG_REAC_HOOKSHOT: case LEEVER_DMG_REACT_HOOKSHOT:
if ((this->actor.colChkInfo.health > 2) && (this->stunType != LEEVER_STUN_OTHER)) { if ((this->actor.colChkInfo.health > 2) && (this->stunType != LEEVER_STUN_OTHER)) {
this->stunType = LEEVER_STUN_OTHER; this->stunType = LEEVER_STUN_OTHER;
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA,
@ -577,7 +577,7 @@ void EnReeba_CheckDamage(EnReeba* this, PlayState* play) {
break; break;
} }
FALLTHROUGH; FALLTHROUGH;
case LEEVER_DMG_REAC_OTHER: case LEEVER_DMG_REACT_OTHER:
this->unkDamageField = 6; this->unkDamageField = 6;
Actor_ApplyDamage(&this->actor); Actor_ApplyDamage(&this->actor);
if (this->actor.colChkInfo.health == 0) { if (this->actor.colChkInfo.health == 0) {
@ -593,7 +593,7 @@ void EnReeba_CheckDamage(EnReeba* this, PlayState* play) {
} }
break; break;
case LEEVER_DMG_REAC_ICE: case LEEVER_DMG_REACT_ICE:
Actor_ApplyDamage(&this->actor); Actor_ApplyDamage(&this->actor);
this->unkDamageField = 2; this->unkDamageField = 2;
this->stunType = LEEVER_STUN_ICE; this->stunType = LEEVER_STUN_ICE;
@ -601,7 +601,7 @@ void EnReeba_CheckDamage(EnReeba* this, PlayState* play) {
this->actionfunc = EnReeba_SetupStunned; this->actionfunc = EnReeba_SetupStunned;
break; break;
case LEEVER_DMG_REAC_UNK: case LEEVER_DMG_REACT_UNK:
if (this->stunType != LEEVER_STUN_OTHER) { if (this->stunType != LEEVER_STUN_OTHER) {
this->stunType = LEEVER_STUN_OTHER; this->stunType = LEEVER_STUN_OTHER;
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA,

View File

@ -45,16 +45,16 @@ typedef enum EnRrReachState {
} EnRrReachState; } EnRrReachState;
typedef enum EnRrDamageReaction { typedef enum EnRrDamageReaction {
/* 0x0 */ RR_DMG_REAC_NONE, /* 0x0 */ RR_DMG_REACT_NONE,
/* 0x1 */ RR_DMG_REAC_STUN, /* 0x1 */ RR_DMG_REACT_STUN,
/* 0x2 */ RR_DMG_REAC_FIRE, /* 0x2 */ RR_DMG_REACT_FIRE,
/* 0x3 */ RR_DMG_REAC_ICE, /* 0x3 */ RR_DMG_REACT_ICE,
/* 0x4 */ RR_DMG_REAC_LIGHT_MAGIC, /* 0x4 */ RR_DMG_REACT_LIGHT_MAGIC,
/* 0xB */ RR_DMG_REAC_LIGHT_ARROW = 11, /* 0xB */ RR_DMG_REACT_LIGHT_ARROW = 11,
/* 0xC */ RR_DMG_REAC_SHDW_ARROW, /* 0xC */ RR_DMG_REACT_SHDW_ARROW,
/* 0xD */ RR_DMG_REAC_WIND_ARROW, /* 0xD */ RR_DMG_REACT_WIND_ARROW,
/* 0xE */ RR_DMG_REAC_SPRT_ARROW, /* 0xE */ RR_DMG_REACT_SPRT_ARROW,
/* 0xF */ RR_DMG_REAC_NORMAL /* 0xF */ RR_DMG_REACT_NORMAL
} EnRrDamageReaction; } EnRrDamageReaction;
typedef enum EnRrDropType { typedef enum EnRrDropType {
@ -142,38 +142,38 @@ static ColliderCylinderInitType1 sCylinderInit2 = {
}; };
static DamageTable sDamageTable = { static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, RR_DMG_REAC_NONE), /* Deku nut */ DMG_ENTRY(0, RR_DMG_REACT_NONE),
/* Deku stick */ DMG_ENTRY(2, RR_DMG_REAC_NORMAL), /* Deku stick */ DMG_ENTRY(2, RR_DMG_REACT_NORMAL),
/* Slingshot */ DMG_ENTRY(1, RR_DMG_REAC_NORMAL), /* Slingshot */ DMG_ENTRY(1, RR_DMG_REACT_NORMAL),
/* Explosive */ DMG_ENTRY(2, RR_DMG_REAC_NORMAL), /* Explosive */ DMG_ENTRY(2, RR_DMG_REACT_NORMAL),
/* Boomerang */ DMG_ENTRY(0, RR_DMG_REAC_STUN), /* Boomerang */ DMG_ENTRY(0, RR_DMG_REACT_STUN),
/* Normal arrow */ DMG_ENTRY(2, RR_DMG_REAC_NORMAL), /* Normal arrow */ DMG_ENTRY(2, RR_DMG_REACT_NORMAL),
/* Hammer swing */ DMG_ENTRY(2, RR_DMG_REAC_NORMAL), /* Hammer swing */ DMG_ENTRY(2, RR_DMG_REACT_NORMAL),
/* Hookshot */ DMG_ENTRY(0, RR_DMG_REAC_STUN), /* Hookshot */ DMG_ENTRY(0, RR_DMG_REACT_STUN),
/* Kokiri sword */ DMG_ENTRY(1, RR_DMG_REAC_NORMAL), /* Kokiri sword */ DMG_ENTRY(1, RR_DMG_REACT_NORMAL),
/* Master sword */ DMG_ENTRY(2, RR_DMG_REAC_NORMAL), /* Master sword */ DMG_ENTRY(2, RR_DMG_REACT_NORMAL),
/* Giant's Knife */ DMG_ENTRY(4, RR_DMG_REAC_NORMAL), /* Giant's Knife */ DMG_ENTRY(4, RR_DMG_REACT_NORMAL),
/* Fire arrow */ DMG_ENTRY(4, RR_DMG_REAC_FIRE), /* Fire arrow */ DMG_ENTRY(4, RR_DMG_REACT_FIRE),
/* Ice arrow */ DMG_ENTRY(4, RR_DMG_REAC_ICE), /* Ice arrow */ DMG_ENTRY(4, RR_DMG_REACT_ICE),
/* Light arrow */ DMG_ENTRY(15, RR_DMG_REAC_LIGHT_ARROW), /* Light arrow */ DMG_ENTRY(15, RR_DMG_REACT_LIGHT_ARROW),
/* Unk arrow 1 */ DMG_ENTRY(4, RR_DMG_REAC_WIND_ARROW), /* Unk arrow 1 */ DMG_ENTRY(4, RR_DMG_REACT_WIND_ARROW),
/* Unk arrow 2 */ DMG_ENTRY(15, RR_DMG_REAC_SHDW_ARROW), /* Unk arrow 2 */ DMG_ENTRY(15, RR_DMG_REACT_SHDW_ARROW),
/* Unk arrow 3 */ DMG_ENTRY(15, RR_DMG_REAC_SPRT_ARROW), /* Unk arrow 3 */ DMG_ENTRY(15, RR_DMG_REACT_SPRT_ARROW),
/* Fire magic */ DMG_ENTRY(4, RR_DMG_REAC_FIRE), /* Fire magic */ DMG_ENTRY(4, RR_DMG_REACT_FIRE),
/* Ice magic */ DMG_ENTRY(3, RR_DMG_REAC_ICE), /* Ice magic */ DMG_ENTRY(3, RR_DMG_REACT_ICE),
/* Light magic */ DMG_ENTRY(10, RR_DMG_REAC_LIGHT_MAGIC), /* Light magic */ DMG_ENTRY(10, RR_DMG_REACT_LIGHT_MAGIC),
/* Shield */ DMG_ENTRY(0, RR_DMG_REAC_NONE), /* Shield */ DMG_ENTRY(0, RR_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, RR_DMG_REAC_NONE), /* Mirror Ray */ DMG_ENTRY(0, RR_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, RR_DMG_REAC_NORMAL), /* Kokiri spin */ DMG_ENTRY(1, RR_DMG_REACT_NORMAL),
/* Giant spin */ DMG_ENTRY(4, RR_DMG_REAC_NORMAL), /* Giant spin */ DMG_ENTRY(4, RR_DMG_REACT_NORMAL),
/* Master spin */ DMG_ENTRY(2, RR_DMG_REAC_NORMAL), /* Master spin */ DMG_ENTRY(2, RR_DMG_REACT_NORMAL),
/* Kokiri jump */ DMG_ENTRY(2, RR_DMG_REAC_NORMAL), /* Kokiri jump */ DMG_ENTRY(2, RR_DMG_REACT_NORMAL),
/* Giant jump */ DMG_ENTRY(8, RR_DMG_REAC_NORMAL), /* Giant jump */ DMG_ENTRY(8, RR_DMG_REACT_NORMAL),
/* Master jump */ DMG_ENTRY(4, RR_DMG_REAC_NORMAL), /* Master jump */ DMG_ENTRY(4, RR_DMG_REACT_NORMAL),
/* Unknown 1 */ DMG_ENTRY(10, RR_DMG_REAC_SPRT_ARROW), /* Unknown 1 */ DMG_ENTRY(10, RR_DMG_REACT_SPRT_ARROW),
/* Unblockable */ DMG_ENTRY(0, RR_DMG_REAC_NONE), /* Unblockable */ DMG_ENTRY(0, RR_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(0, RR_DMG_REAC_NONE), /* Hammer jump */ DMG_ENTRY(0, RR_DMG_REACT_NONE),
/* Unknown 2 */ DMG_ENTRY(0, RR_DMG_REAC_NONE), /* Unknown 2 */ DMG_ENTRY(0, RR_DMG_REACT_NONE),
}; };
static InitChainEntry sInitChain[] = { static InitChainEntry sInitChain[] = {
@ -455,19 +455,19 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
CollisionCheck_BlueBlood(play, NULL, &hitPos); CollisionCheck_BlueBlood(play, NULL, &hitPos);
} }
switch (this->actor.colChkInfo.damageReaction) { switch (this->actor.colChkInfo.damageReaction) {
case RR_DMG_REAC_LIGHT_ARROW: case RR_DMG_REACT_LIGHT_ARROW:
dropType++; // purple rupee dropType++; // purple rupee
FALLTHROUGH; FALLTHROUGH;
case RR_DMG_REAC_SHDW_ARROW: case RR_DMG_REACT_SHDW_ARROW:
dropType++; // flexible dropType++; // flexible
FALLTHROUGH; FALLTHROUGH;
case RR_DMG_REAC_WIND_ARROW: case RR_DMG_REACT_WIND_ARROW:
dropType++; // arrow dropType++; // arrow
FALLTHROUGH; FALLTHROUGH;
case RR_DMG_REAC_SPRT_ARROW: case RR_DMG_REACT_SPRT_ARROW:
dropType++; // magic jar dropType++; // magic jar
FALLTHROUGH; FALLTHROUGH;
case RR_DMG_REAC_NORMAL: case RR_DMG_REACT_NORMAL:
// "ouch" // "ouch"
PRINTF(VT_FGCOL(RED) "いてっ( %d : LIFE %d : DAMAGE %d : %x )" VT_RST "\n", this->frameCount, PRINTF(VT_FGCOL(RED) "いてっ( %d : LIFE %d : DAMAGE %d : %x )" VT_RST "\n", this->frameCount,
this->actor.colChkInfo.health, this->actor.colChkInfo.damage, this->actor.colChkInfo.health, this->actor.colChkInfo.damage,
@ -486,7 +486,7 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
EnRr_SetupDeath(this); EnRr_SetupDeath(this);
} }
return; return;
case RR_DMG_REAC_FIRE: // Fire Arrow and Din's Fire case RR_DMG_REACT_FIRE: // Fire Arrow and Din's Fire
Actor_ApplyDamage(&this->actor); Actor_ApplyDamage(&this->actor);
if (this->actor.colChkInfo.health == 0) { if (this->actor.colChkInfo.health == 0) {
this->dropType = RR_DROP_RANDOM_RUPEE; this->dropType = RR_DROP_RANDOM_RUPEE;
@ -495,7 +495,7 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
this->effectTimer = 20; this->effectTimer = 20;
EnRr_SetupStunned(this); EnRr_SetupStunned(this);
return; return;
case RR_DMG_REAC_ICE: // Ice Arrow and unused ice magic case RR_DMG_REACT_ICE: // Ice Arrow and unused ice magic
Actor_ApplyDamage(&this->actor); Actor_ApplyDamage(&this->actor);
if (this->actor.colChkInfo.health == 0) { if (this->actor.colChkInfo.health == 0) {
this->dropType = RR_DROP_RANDOM_RUPEE; this->dropType = RR_DROP_RANDOM_RUPEE;
@ -512,7 +512,7 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
#endif #endif
EnRr_SetupStunned(this); EnRr_SetupStunned(this);
return; return;
case RR_DMG_REAC_LIGHT_MAGIC: // Unused light magic case RR_DMG_REACT_LIGHT_MAGIC: // Unused light magic
Actor_ApplyDamage(&this->actor); Actor_ApplyDamage(&this->actor);
if (this->actor.colChkInfo.health == 0) { if (this->actor.colChkInfo.health == 0) {
this->dropType = RR_DROP_RUPEE_RED; this->dropType = RR_DROP_RUPEE_RED;
@ -520,7 +520,7 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_GRAY, 255, COLORFILTER_BUFFLAG_XLU, 80); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_GRAY, 255, COLORFILTER_BUFFLAG_XLU, 80);
EnRr_SetupStunned(this); EnRr_SetupStunned(this);
return; return;
case RR_DMG_REAC_STUN: // Boomerang and Hookshot case RR_DMG_REACT_STUN: // Boomerang and Hookshot
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_JR_FREEZE); Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_XLU, 80); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_XLU, 80);
EnRr_SetupStunned(this); EnRr_SetupStunned(this);

View File

@ -213,47 +213,47 @@ static ColliderQuadInit sSwordColliderQuadInit = {
}; };
typedef enum StalfosDamageReaction { typedef enum StalfosDamageReaction {
/* 0x0 */ STALFOS_DMG_REAC_NORMAL, /* 0x0 */ STALFOS_DMG_REACT_NORMAL,
/* 0x1 */ STALFOS_DMG_REAC_STUN, /* 0x1 */ STALFOS_DMG_REACT_STUN,
/* 0x6 */ STALFOS_DMG_REAC_FIREMAGIC = 6, /* 0x6 */ STALFOS_DMG_REACT_FIREMAGIC = 6,
/* 0xD */ STALFOS_DMG_REAC_SLING = 0xD, /* 0xD */ STALFOS_DMG_REACT_SLING = 0xD,
/* 0xE */ STALFOS_DMG_REAC_LIGHT, /* 0xE */ STALFOS_DMG_REACT_LIGHT,
/* 0xF */ STALFOS_DMG_REAC_FREEZE /* 0xF */ STALFOS_DMG_REACT_FREEZE
} StalfosDamageReaction; } StalfosDamageReaction;
static DamageTable sDamageTable = { static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, STALFOS_DMG_REAC_STUN), /* Deku nut */ DMG_ENTRY(0, STALFOS_DMG_REACT_STUN),
/* Deku stick */ DMG_ENTRY(2, STALFOS_DMG_REAC_NORMAL), /* Deku stick */ DMG_ENTRY(2, STALFOS_DMG_REACT_NORMAL),
/* Slingshot */ DMG_ENTRY(1, STALFOS_DMG_REAC_SLING), /* Slingshot */ DMG_ENTRY(1, STALFOS_DMG_REACT_SLING),
/* Explosive */ DMG_ENTRY(2, STALFOS_DMG_REAC_NORMAL), /* Explosive */ DMG_ENTRY(2, STALFOS_DMG_REACT_NORMAL),
/* Boomerang */ DMG_ENTRY(0, STALFOS_DMG_REAC_STUN), /* Boomerang */ DMG_ENTRY(0, STALFOS_DMG_REACT_STUN),
/* Normal arrow */ DMG_ENTRY(2, STALFOS_DMG_REAC_NORMAL), /* Normal arrow */ DMG_ENTRY(2, STALFOS_DMG_REACT_NORMAL),
/* Hammer swing */ DMG_ENTRY(2, STALFOS_DMG_REAC_NORMAL), /* Hammer swing */ DMG_ENTRY(2, STALFOS_DMG_REACT_NORMAL),
/* Hookshot */ DMG_ENTRY(0, STALFOS_DMG_REAC_STUN), /* Hookshot */ DMG_ENTRY(0, STALFOS_DMG_REACT_STUN),
/* Kokiri sword */ DMG_ENTRY(1, STALFOS_DMG_REAC_NORMAL), /* Kokiri sword */ DMG_ENTRY(1, STALFOS_DMG_REACT_NORMAL),
/* Master sword */ DMG_ENTRY(2, STALFOS_DMG_REAC_NORMAL), /* Master sword */ DMG_ENTRY(2, STALFOS_DMG_REACT_NORMAL),
/* Giant's Knife */ DMG_ENTRY(4, STALFOS_DMG_REAC_NORMAL), /* Giant's Knife */ DMG_ENTRY(4, STALFOS_DMG_REACT_NORMAL),
/* Fire arrow */ DMG_ENTRY(2, STALFOS_DMG_REAC_NORMAL), /* Fire arrow */ DMG_ENTRY(2, STALFOS_DMG_REACT_NORMAL),
/* Ice arrow */ DMG_ENTRY(4, STALFOS_DMG_REAC_FREEZE), /* Ice arrow */ DMG_ENTRY(4, STALFOS_DMG_REACT_FREEZE),
/* Light arrow */ DMG_ENTRY(2, STALFOS_DMG_REAC_LIGHT), /* Light arrow */ DMG_ENTRY(2, STALFOS_DMG_REACT_LIGHT),
/* Unk arrow 1 */ DMG_ENTRY(2, STALFOS_DMG_REAC_NORMAL), /* Unk arrow 1 */ DMG_ENTRY(2, STALFOS_DMG_REACT_NORMAL),
/* Unk arrow 2 */ DMG_ENTRY(2, STALFOS_DMG_REAC_NORMAL), /* Unk arrow 2 */ DMG_ENTRY(2, STALFOS_DMG_REACT_NORMAL),
/* Unk arrow 3 */ DMG_ENTRY(2, STALFOS_DMG_REAC_NORMAL), /* Unk arrow 3 */ DMG_ENTRY(2, STALFOS_DMG_REACT_NORMAL),
/* Fire magic */ DMG_ENTRY(0, STALFOS_DMG_REAC_FIREMAGIC), /* Fire magic */ DMG_ENTRY(0, STALFOS_DMG_REACT_FIREMAGIC),
/* Ice magic */ DMG_ENTRY(3, STALFOS_DMG_REAC_FREEZE), /* Ice magic */ DMG_ENTRY(3, STALFOS_DMG_REACT_FREEZE),
/* Light magic */ DMG_ENTRY(0, STALFOS_DMG_REAC_LIGHT), /* Light magic */ DMG_ENTRY(0, STALFOS_DMG_REACT_LIGHT),
/* Shield */ DMG_ENTRY(0, STALFOS_DMG_REAC_NORMAL), /* Shield */ DMG_ENTRY(0, STALFOS_DMG_REACT_NORMAL),
/* Mirror Ray */ DMG_ENTRY(0, STALFOS_DMG_REAC_NORMAL), /* Mirror Ray */ DMG_ENTRY(0, STALFOS_DMG_REACT_NORMAL),
/* Kokiri spin */ DMG_ENTRY(1, STALFOS_DMG_REAC_NORMAL), /* Kokiri spin */ DMG_ENTRY(1, STALFOS_DMG_REACT_NORMAL),
/* Giant spin */ DMG_ENTRY(4, STALFOS_DMG_REAC_NORMAL), /* Giant spin */ DMG_ENTRY(4, STALFOS_DMG_REACT_NORMAL),
/* Master spin */ DMG_ENTRY(2, STALFOS_DMG_REAC_NORMAL), /* Master spin */ DMG_ENTRY(2, STALFOS_DMG_REACT_NORMAL),
/* Kokiri jump */ DMG_ENTRY(2, STALFOS_DMG_REAC_NORMAL), /* Kokiri jump */ DMG_ENTRY(2, STALFOS_DMG_REACT_NORMAL),
/* Giant jump */ DMG_ENTRY(8, STALFOS_DMG_REAC_NORMAL), /* Giant jump */ DMG_ENTRY(8, STALFOS_DMG_REACT_NORMAL),
/* Master jump */ DMG_ENTRY(4, STALFOS_DMG_REAC_NORMAL), /* Master jump */ DMG_ENTRY(4, STALFOS_DMG_REACT_NORMAL),
/* Unknown 1 */ DMG_ENTRY(0, STALFOS_DMG_REAC_NORMAL), /* Unknown 1 */ DMG_ENTRY(0, STALFOS_DMG_REACT_NORMAL),
/* Unblockable */ DMG_ENTRY(0, STALFOS_DMG_REAC_NORMAL), /* Unblockable */ DMG_ENTRY(0, STALFOS_DMG_REACT_NORMAL),
/* Hammer jump */ DMG_ENTRY(4, STALFOS_DMG_REAC_NORMAL), /* Hammer jump */ DMG_ENTRY(4, STALFOS_DMG_REACT_NORMAL),
/* Unknown 2 */ DMG_ENTRY(0, STALFOS_DMG_REAC_NORMAL), /* Unknown 2 */ DMG_ENTRY(0, STALFOS_DMG_REACT_NORMAL),
}; };
static InitChainEntry sInitChain[] = { static InitChainEntry sInitChain[] = {
@ -1313,12 +1313,12 @@ void EnTest_SetupStunned(EnTest* this) {
this->skelAnime.playSpeed = 0.0f; this->skelAnime.playSpeed = 0.0f;
this->actor.speed = -4.0f; this->actor.speed = -4.0f;
if (this->lastDamageReaction == STALFOS_DMG_REAC_LIGHT) { if (this->lastDamageReaction == STALFOS_DMG_REACT_LIGHT) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_GRAY, 120, COLORFILTER_BUFFLAG_OPA, 80); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_GRAY, 120, COLORFILTER_BUFFLAG_OPA, 80);
} else { } else {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 80); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 80);
if (this->lastDamageReaction == STALFOS_DMG_REAC_FREEZE) { if (this->lastDamageReaction == STALFOS_DMG_REACT_FREEZE) {
this->iceTimer = 36; this->iceTimer = 36;
} else { } else {
Animation_PlayOnceSetSpeed(&this->skelAnime, &gStalfosFlinchFromHitFrontAnim, 0.0f); Animation_PlayOnceSetSpeed(&this->skelAnime, &gStalfosFlinchFromHitFrontAnim, 0.0f);
@ -1678,8 +1678,8 @@ void EnTest_UpdateDamage(EnTest* this, PlayState* play) {
} else if (this->bodyCollider.base.acFlags & AC_HIT) { } else if (this->bodyCollider.base.acFlags & AC_HIT) {
this->bodyCollider.base.acFlags &= ~AC_HIT; this->bodyCollider.base.acFlags &= ~AC_HIT;
if ((this->actor.colChkInfo.damageReaction != STALFOS_DMG_REAC_SLING) && if ((this->actor.colChkInfo.damageReaction != STALFOS_DMG_REACT_SLING) &&
(this->actor.colChkInfo.damageReaction != STALFOS_DMG_REAC_FIREMAGIC)) { (this->actor.colChkInfo.damageReaction != STALFOS_DMG_REACT_FIREMAGIC)) {
this->lastDamageReaction = this->actor.colChkInfo.damageReaction; this->lastDamageReaction = this->actor.colChkInfo.damageReaction;
if (this->swordState >= 1) { if (this->swordState >= 1) {
this->swordState = 0; this->swordState = 0;
@ -1689,9 +1689,9 @@ void EnTest_UpdateDamage(EnTest* this, PlayState* play) {
Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, false); Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, false);
Audio_StopSfxByPosAndId(&this->actor.projectedPos, NA_SE_EN_STAL_WARAU); Audio_StopSfxByPosAndId(&this->actor.projectedPos, NA_SE_EN_STAL_WARAU);
if ((this->actor.colChkInfo.damageReaction == STALFOS_DMG_REAC_STUN) || if ((this->actor.colChkInfo.damageReaction == STALFOS_DMG_REACT_STUN) ||
(this->actor.colChkInfo.damageReaction == STALFOS_DMG_REAC_FREEZE) || (this->actor.colChkInfo.damageReaction == STALFOS_DMG_REACT_FREEZE) ||
(this->actor.colChkInfo.damageReaction == STALFOS_DMG_REAC_LIGHT)) { (this->actor.colChkInfo.damageReaction == STALFOS_DMG_REACT_LIGHT)) {
if (this->unk_7C8 != 0xB) { if (this->unk_7C8 != 0xB) {
Actor_ApplyDamage(&this->actor); Actor_ApplyDamage(&this->actor);
EnTest_SetupStunned(this); EnTest_SetupStunned(this);
@ -1723,7 +1723,7 @@ void EnTest_Update(Actor* thisx, PlayState* play) {
EnTest_UpdateDamage(this, play); EnTest_UpdateDamage(this, play);
if (this->actor.colChkInfo.damageReaction != STALFOS_DMG_REAC_FIREMAGIC) { if (this->actor.colChkInfo.damageReaction != STALFOS_DMG_REACT_FIREMAGIC) {
Actor_MoveXZGravity(&this->actor); Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 75.0f, 30.0f, 30.0f, Actor_UpdateBgCheckInfo(play, &this->actor, 75.0f, 30.0f, 30.0f,
UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 | UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 |

View File

@ -96,45 +96,45 @@ static ColliderJntSphInit sJntSphInit = {
}; };
typedef enum TailpasaranDamageReaction { typedef enum TailpasaranDamageReaction {
/* 00 */ TAILPASARAN_DMG_REAC_NONE, /* 00 */ TAILPASARAN_DMG_REACT_NONE,
/* 01 */ TAILPASARAN_DMG_REAC_DEKUNUT, /* 01 */ TAILPASARAN_DMG_REACT_DEKUNUT,
/* 14 */ TAILPASARAN_DMG_REAC_SHOCKING = 14, // Kills the Tailpasaran but shocks Player /* 14 */ TAILPASARAN_DMG_REACT_SHOCKING = 14, // Kills the Tailpasaran but shocks Player
/* 15 */ TAILPASARAN_DMG_REAC_INSULATING // Kills the Tailpasaran and does not shock Player /* 15 */ TAILPASARAN_DMG_REACT_INSULATING // Kills the Tailpasaran and does not shock Player
} TailpasaranDamageReaction; } TailpasaranDamageReaction;
static DamageTable sDamageTable = { static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_DEKUNUT), /* Deku nut */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_DEKUNUT),
/* Deku stick */ DMG_ENTRY(2, TAILPASARAN_DMG_REAC_INSULATING), /* Deku stick */ DMG_ENTRY(2, TAILPASARAN_DMG_REACT_INSULATING),
/* Slingshot */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_NONE), /* Slingshot */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Explosive */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_NONE), /* Explosive */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Boomerang */ DMG_ENTRY(1, TAILPASARAN_DMG_REAC_INSULATING), /* Boomerang */ DMG_ENTRY(1, TAILPASARAN_DMG_REACT_INSULATING),
/* Normal arrow */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_NONE), /* Normal arrow */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Hammer swing */ DMG_ENTRY(2, TAILPASARAN_DMG_REAC_SHOCKING), /* Hammer swing */ DMG_ENTRY(2, TAILPASARAN_DMG_REACT_SHOCKING),
/* Hookshot */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_NONE), /* Hookshot */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Kokiri sword */ DMG_ENTRY(1, TAILPASARAN_DMG_REAC_SHOCKING), /* Kokiri sword */ DMG_ENTRY(1, TAILPASARAN_DMG_REACT_SHOCKING),
/* Master sword */ DMG_ENTRY(2, TAILPASARAN_DMG_REAC_SHOCKING), /* Master sword */ DMG_ENTRY(2, TAILPASARAN_DMG_REACT_SHOCKING),
/* Giant's Knife */ DMG_ENTRY(4, TAILPASARAN_DMG_REAC_SHOCKING), /* Giant's Knife */ DMG_ENTRY(4, TAILPASARAN_DMG_REACT_SHOCKING),
/* Fire arrow */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_NONE), /* Fire arrow */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Ice arrow */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_NONE), /* Ice arrow */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Light arrow */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_NONE), /* Light arrow */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Unk arrow 1 */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_NONE), /* Unk arrow 1 */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Unk arrow 2 */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_NONE), /* Unk arrow 2 */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Unk arrow 3 */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_NONE), /* Unk arrow 3 */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Fire magic */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_NONE), /* Fire magic */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Ice magic */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_NONE), /* Ice magic */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Light magic */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_NONE), /* Light magic */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Shield */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_NONE), /* Shield */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_NONE), /* Mirror Ray */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, TAILPASARAN_DMG_REAC_SHOCKING), /* Kokiri spin */ DMG_ENTRY(1, TAILPASARAN_DMG_REACT_SHOCKING),
/* Giant spin */ DMG_ENTRY(4, TAILPASARAN_DMG_REAC_SHOCKING), /* Giant spin */ DMG_ENTRY(4, TAILPASARAN_DMG_REACT_SHOCKING),
/* Master spin */ DMG_ENTRY(2, TAILPASARAN_DMG_REAC_SHOCKING), /* Master spin */ DMG_ENTRY(2, TAILPASARAN_DMG_REACT_SHOCKING),
/* Kokiri jump */ DMG_ENTRY(2, TAILPASARAN_DMG_REAC_SHOCKING), /* Kokiri jump */ DMG_ENTRY(2, TAILPASARAN_DMG_REACT_SHOCKING),
/* Giant jump */ DMG_ENTRY(8, TAILPASARAN_DMG_REAC_SHOCKING), /* Giant jump */ DMG_ENTRY(8, TAILPASARAN_DMG_REACT_SHOCKING),
/* Master jump */ DMG_ENTRY(4, TAILPASARAN_DMG_REAC_SHOCKING), /* Master jump */ DMG_ENTRY(4, TAILPASARAN_DMG_REACT_SHOCKING),
/* Unknown 1 */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_NONE), /* Unknown 1 */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Unblockable */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_NONE), /* Unblockable */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(4, TAILPASARAN_DMG_REAC_SHOCKING), /* Hammer jump */ DMG_ENTRY(4, TAILPASARAN_DMG_REACT_SHOCKING),
/* Unknown 2 */ DMG_ENTRY(0, TAILPASARAN_DMG_REAC_NONE), /* Unknown 2 */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
}; };
static InitChainEntry sInitChain[] = { static InitChainEntry sInitChain[] = {
@ -606,8 +606,8 @@ void EnTp_UpdateDamage(EnTp* this, PlayState* play) {
Actor_SetDropFlagJntSph(&this->actor, &this->collider, true); Actor_SetDropFlagJntSph(&this->actor, &this->collider, true);
this->damageReaction = this->actor.colChkInfo.damageReaction; this->damageReaction = this->actor.colChkInfo.damageReaction;
if (this->actor.colChkInfo.damageReaction != TAILPASARAN_DMG_REAC_NONE) { if (this->actor.colChkInfo.damageReaction != TAILPASARAN_DMG_REACT_NONE) {
if (this->actor.colChkInfo.damageReaction == TAILPASARAN_DMG_REAC_DEKUNUT) { if (this->actor.colChkInfo.damageReaction == TAILPASARAN_DMG_REACT_DEKUNUT) {
phi_s4 = 1; phi_s4 = 1;
} }
@ -686,7 +686,7 @@ void EnTp_Update(Actor* thisx, PlayState* play) {
s16 yawToWall; s16 yawToWall;
if (player->stateFlags1 & PLAYER_STATE1_26) { // Shielding if (player->stateFlags1 & PLAYER_STATE1_26) { // Shielding
this->damageReaction = TAILPASARAN_DMG_REAC_NONE; this->damageReaction = TAILPASARAN_DMG_REACT_NONE;
} }
if (this->actor.colChkInfo.health != 0) { if (this->actor.colChkInfo.health != 0) {
@ -737,7 +737,7 @@ void EnTp_Update(Actor* thisx, PlayState* play) {
this->actor.focus.pos = this->actor.world.pos; this->actor.focus.pos = this->actor.world.pos;
if (this->damageReaction == TAILPASARAN_DMG_REAC_SHOCKING) { if (this->damageReaction == TAILPASARAN_DMG_REACT_SHOCKING) {
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
} }

View File

@ -98,47 +98,47 @@ static ColliderCylinderInit sCylinderInit = {
static CollisionCheckInfoInit sColChkInfoInit = { 2, 18, 32, MASS_HEAVY }; static CollisionCheckInfoInit sColChkInfoInit = { 2, 18, 32, MASS_HEAVY };
typedef enum BariDamageReaction { typedef enum BariDamageReaction {
/* 0x0 */ BARI_DMG_REAC_NONE, /* 0x0 */ BARI_DMG_REACT_NONE,
/* 0x1 */ BARI_DMG_REAC_STUN, /* 0x1 */ BARI_DMG_REACT_STUN,
/* 0x2 */ BARI_DMG_REAC_FIRE, /* 0x2 */ BARI_DMG_REACT_FIRE,
/* 0x3 */ BARI_DMG_REAC_ICE, /* 0x3 */ BARI_DMG_REACT_ICE,
/* 0xE */ BARI_DMG_REAC_SLINGSHOT = 0xE, /* 0xE */ BARI_DMG_REACT_SLINGSHOT = 0xE,
/* 0xF */ BARI_DMG_REAC_SWORD /* 0xF */ BARI_DMG_REACT_SWORD
} BariDamageReaction; } BariDamageReaction;
static DamageTable sDamageTable = { static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, BARI_DMG_REAC_STUN), /* Deku nut */ DMG_ENTRY(0, BARI_DMG_REACT_STUN),
/* Deku stick */ DMG_ENTRY(2, BARI_DMG_REAC_NONE), /* Deku stick */ DMG_ENTRY(2, BARI_DMG_REACT_NONE),
/* Slingshot */ DMG_ENTRY(0, BARI_DMG_REAC_SLINGSHOT), /* Slingshot */ DMG_ENTRY(0, BARI_DMG_REACT_SLINGSHOT),
/* Explosive */ DMG_ENTRY(2, BARI_DMG_REAC_NONE), /* Explosive */ DMG_ENTRY(2, BARI_DMG_REACT_NONE),
/* Boomerang */ DMG_ENTRY(0, BARI_DMG_REAC_STUN), /* Boomerang */ DMG_ENTRY(0, BARI_DMG_REACT_STUN),
/* Normal arrow */ DMG_ENTRY(2, BARI_DMG_REAC_NONE), /* Normal arrow */ DMG_ENTRY(2, BARI_DMG_REACT_NONE),
/* Hammer swing */ DMG_ENTRY(2, BARI_DMG_REAC_NONE), /* Hammer swing */ DMG_ENTRY(2, BARI_DMG_REACT_NONE),
/* Hookshot */ DMG_ENTRY(2, BARI_DMG_REAC_NONE), /* Hookshot */ DMG_ENTRY(2, BARI_DMG_REACT_NONE),
/* Kokiri sword */ DMG_ENTRY(1, BARI_DMG_REAC_SWORD), /* Kokiri sword */ DMG_ENTRY(1, BARI_DMG_REACT_SWORD),
/* Master sword */ DMG_ENTRY(2, BARI_DMG_REAC_SWORD), /* Master sword */ DMG_ENTRY(2, BARI_DMG_REACT_SWORD),
/* Giant's Knife */ DMG_ENTRY(4, BARI_DMG_REAC_SWORD), /* Giant's Knife */ DMG_ENTRY(4, BARI_DMG_REACT_SWORD),
/* Fire arrow */ DMG_ENTRY(4, BARI_DMG_REAC_FIRE), /* Fire arrow */ DMG_ENTRY(4, BARI_DMG_REACT_FIRE),
/* Ice arrow */ DMG_ENTRY(4, BARI_DMG_REAC_ICE), /* Ice arrow */ DMG_ENTRY(4, BARI_DMG_REACT_ICE),
/* Light arrow */ DMG_ENTRY(2, BARI_DMG_REAC_NONE), /* Light arrow */ DMG_ENTRY(2, BARI_DMG_REACT_NONE),
/* Unk arrow 1 */ DMG_ENTRY(2, BARI_DMG_REAC_NONE), /* Unk arrow 1 */ DMG_ENTRY(2, BARI_DMG_REACT_NONE),
/* Unk arrow 2 */ DMG_ENTRY(2, BARI_DMG_REAC_NONE), /* Unk arrow 2 */ DMG_ENTRY(2, BARI_DMG_REACT_NONE),
/* Unk arrow 3 */ DMG_ENTRY(2, BARI_DMG_REAC_NONE), /* Unk arrow 3 */ DMG_ENTRY(2, BARI_DMG_REACT_NONE),
/* Fire magic */ DMG_ENTRY(4, BARI_DMG_REAC_FIRE), /* Fire magic */ DMG_ENTRY(4, BARI_DMG_REACT_FIRE),
/* Ice magic */ DMG_ENTRY(4, BARI_DMG_REAC_ICE), /* Ice magic */ DMG_ENTRY(4, BARI_DMG_REACT_ICE),
/* Light magic */ DMG_ENTRY(0, BARI_DMG_REAC_NONE), /* Light magic */ DMG_ENTRY(0, BARI_DMG_REACT_NONE),
/* Shield */ DMG_ENTRY(0, BARI_DMG_REAC_NONE), /* Shield */ DMG_ENTRY(0, BARI_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, BARI_DMG_REAC_NONE), /* Mirror Ray */ DMG_ENTRY(0, BARI_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, BARI_DMG_REAC_NONE), /* Kokiri spin */ DMG_ENTRY(1, BARI_DMG_REACT_NONE),
/* Giant spin */ DMG_ENTRY(4, BARI_DMG_REAC_NONE), /* Giant spin */ DMG_ENTRY(4, BARI_DMG_REACT_NONE),
/* Master spin */ DMG_ENTRY(2, BARI_DMG_REAC_NONE), /* Master spin */ DMG_ENTRY(2, BARI_DMG_REACT_NONE),
/* Kokiri jump */ DMG_ENTRY(2, BARI_DMG_REAC_NONE), /* Kokiri jump */ DMG_ENTRY(2, BARI_DMG_REACT_NONE),
/* Giant jump */ DMG_ENTRY(8, BARI_DMG_REAC_NONE), /* Giant jump */ DMG_ENTRY(8, BARI_DMG_REACT_NONE),
/* Master jump */ DMG_ENTRY(4, BARI_DMG_REAC_NONE), /* Master jump */ DMG_ENTRY(4, BARI_DMG_REACT_NONE),
/* Unknown 1 */ DMG_ENTRY(0, BARI_DMG_REAC_NONE), /* Unknown 1 */ DMG_ENTRY(0, BARI_DMG_REACT_NONE),
/* Unblockable */ DMG_ENTRY(0, BARI_DMG_REAC_NONE), /* Unblockable */ DMG_ENTRY(0, BARI_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(4, BARI_DMG_REAC_NONE), /* Hammer jump */ DMG_ENTRY(4, BARI_DMG_REACT_NONE),
/* Unknown 2 */ DMG_ENTRY(0, BARI_DMG_REAC_NONE), /* Unknown 2 */ DMG_ENTRY(0, BARI_DMG_REACT_NONE),
}; };
static InitChainEntry sInitChain[] = { static InitChainEntry sInitChain[] = {
@ -512,21 +512,21 @@ void EnVali_UpdateDamage(EnVali* this, PlayState* play) {
this->bodyCollider.base.acFlags &= ~AC_HIT; this->bodyCollider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, true); Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, true);
if ((this->actor.colChkInfo.damageReaction != BARI_DMG_REAC_NONE) || (this->actor.colChkInfo.damage != 0)) { if ((this->actor.colChkInfo.damageReaction != BARI_DMG_REACT_NONE) || (this->actor.colChkInfo.damage != 0)) {
if (Actor_ApplyDamage(&this->actor) == 0) { if (Actor_ApplyDamage(&this->actor) == 0) {
Actor_PlaySfx(&this->actor, NA_SE_EN_BARI_DEAD); Actor_PlaySfx(&this->actor, NA_SE_EN_BARI_DEAD);
Enemy_StartFinishingBlow(play, &this->actor); Enemy_StartFinishingBlow(play, &this->actor);
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
} else if ((this->actor.colChkInfo.damageReaction != BARI_DMG_REAC_STUN) && } else if ((this->actor.colChkInfo.damageReaction != BARI_DMG_REACT_STUN) &&
(this->actor.colChkInfo.damageReaction != BARI_DMG_REAC_SLINGSHOT)) { (this->actor.colChkInfo.damageReaction != BARI_DMG_REACT_SLINGSHOT)) {
Actor_PlaySfx(&this->actor, NA_SE_EN_BARI_DAMAGE); Actor_PlaySfx(&this->actor, NA_SE_EN_BARI_DAMAGE);
} }
if (this->actor.colChkInfo.damageReaction == BARI_DMG_REAC_STUN) { if (this->actor.colChkInfo.damageReaction == BARI_DMG_REACT_STUN) {
if (this->actionFunc != EnVali_Stunned) { if (this->actionFunc != EnVali_Stunned) {
EnVali_SetupStunned(this); EnVali_SetupStunned(this);
} }
} else if (this->actor.colChkInfo.damageReaction == BARI_DMG_REAC_SWORD) { } else if (this->actor.colChkInfo.damageReaction == BARI_DMG_REACT_SWORD) {
if (this->actionFunc != EnVali_Stunned) { if (this->actionFunc != EnVali_Stunned) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 150, COLORFILTER_BUFFLAG_XLU, 30); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 150, COLORFILTER_BUFFLAG_XLU, 30);
this->actor.params = BARI_TYPE_SWORD_DAMAGE; this->actor.params = BARI_TYPE_SWORD_DAMAGE;
@ -534,11 +534,11 @@ void EnVali_UpdateDamage(EnVali* this, PlayState* play) {
} else { } else {
EnVali_SetupRetaliate(this); EnVali_SetupRetaliate(this);
} }
} else if (this->actor.colChkInfo.damageReaction == BARI_DMG_REAC_FIRE) { } else if (this->actor.colChkInfo.damageReaction == BARI_DMG_REACT_FIRE) {
EnVali_SetupBurnt(this); EnVali_SetupBurnt(this);
} else if (this->actor.colChkInfo.damageReaction == BARI_DMG_REAC_ICE) { } else if (this->actor.colChkInfo.damageReaction == BARI_DMG_REACT_ICE) {
EnVali_SetupFrozen(this); EnVali_SetupFrozen(this);
} else if (this->actor.colChkInfo.damageReaction == BARI_DMG_REAC_SLINGSHOT) { } else if (this->actor.colChkInfo.damageReaction == BARI_DMG_REACT_SLINGSHOT) {
if (this->slingshotReactionTimer == 0) { if (this->slingshotReactionTimer == 0) {
this->slingshotReactionTimer = 20; this->slingshotReactionTimer = 20;
} }

View File

@ -83,45 +83,45 @@ static ColliderCylinderInit sCylinderInit = {
static CollisionCheckInfoInit sColChkInfoInit = { 4, 30, 40, 150 }; static CollisionCheckInfoInit sColChkInfoInit = { 4, 30, 40, 150 };
typedef enum EnWallmasDamageReaction { typedef enum EnWallmasDamageReaction {
/* 0 */ WALLMAS_DMG_REAC_NONE, /* 0 */ WALLMAS_DMG_REACT_NONE,
/* 1 */ WALLMAS_DMG_REAC_STUN_BLUE, /* 1 */ WALLMAS_DMG_REACT_STUN_BLUE,
/* 2 */ WALLMAS_DMG_REAC_BURN, /* 2 */ WALLMAS_DMG_REACT_BURN,
/* 4 */ WALLMAS_DMG_REAC_STUN_WHITE = 4 /* 4 */ WALLMAS_DMG_REACT_STUN_WHITE = 4
} EnWallmasDamageReaction; } EnWallmasDamageReaction;
static DamageTable sDamageTable = { static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, WALLMAS_DMG_REAC_STUN_BLUE), /* Deku nut */ DMG_ENTRY(0, WALLMAS_DMG_REACT_STUN_BLUE),
/* Deku stick */ DMG_ENTRY(2, WALLMAS_DMG_REAC_NONE), /* Deku stick */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Slingshot */ DMG_ENTRY(1, WALLMAS_DMG_REAC_NONE), /* Slingshot */ DMG_ENTRY(1, WALLMAS_DMG_REACT_NONE),
/* Explosive */ DMG_ENTRY(2, WALLMAS_DMG_REAC_NONE), /* Explosive */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Boomerang */ DMG_ENTRY(0, WALLMAS_DMG_REAC_STUN_BLUE), /* Boomerang */ DMG_ENTRY(0, WALLMAS_DMG_REACT_STUN_BLUE),
/* Normal arrow */ DMG_ENTRY(2, WALLMAS_DMG_REAC_NONE), /* Normal arrow */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Hammer swing */ DMG_ENTRY(2, WALLMAS_DMG_REAC_NONE), /* Hammer swing */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Hookshot */ DMG_ENTRY(0, WALLMAS_DMG_REAC_STUN_BLUE), /* Hookshot */ DMG_ENTRY(0, WALLMAS_DMG_REACT_STUN_BLUE),
/* Kokiri sword */ DMG_ENTRY(1, WALLMAS_DMG_REAC_NONE), /* Kokiri sword */ DMG_ENTRY(1, WALLMAS_DMG_REACT_NONE),
/* Master sword */ DMG_ENTRY(2, WALLMAS_DMG_REAC_NONE), /* Master sword */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Giant's Knife */ DMG_ENTRY(4, WALLMAS_DMG_REAC_NONE), /* Giant's Knife */ DMG_ENTRY(4, WALLMAS_DMG_REACT_NONE),
/* Fire arrow */ DMG_ENTRY(4, WALLMAS_DMG_REAC_BURN), /* Fire arrow */ DMG_ENTRY(4, WALLMAS_DMG_REACT_BURN),
/* Ice arrow */ DMG_ENTRY(2, WALLMAS_DMG_REAC_NONE), /* Ice arrow */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Light arrow */ DMG_ENTRY(4, WALLMAS_DMG_REAC_STUN_WHITE), /* Light arrow */ DMG_ENTRY(4, WALLMAS_DMG_REACT_STUN_WHITE),
/* Unk arrow 1 */ DMG_ENTRY(4, WALLMAS_DMG_REAC_NONE), /* Unk arrow 1 */ DMG_ENTRY(4, WALLMAS_DMG_REACT_NONE),
/* Unk arrow 2 */ DMG_ENTRY(2, WALLMAS_DMG_REAC_NONE), /* Unk arrow 2 */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Unk arrow 3 */ DMG_ENTRY(2, WALLMAS_DMG_REAC_NONE), /* Unk arrow 3 */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Fire magic */ DMG_ENTRY(4, WALLMAS_DMG_REAC_BURN), /* Fire magic */ DMG_ENTRY(4, WALLMAS_DMG_REACT_BURN),
/* Ice magic */ DMG_ENTRY(0, WALLMAS_DMG_REAC_NONE), /* Ice magic */ DMG_ENTRY(0, WALLMAS_DMG_REACT_NONE),
/* Light magic */ DMG_ENTRY(4, WALLMAS_DMG_REAC_STUN_WHITE), /* Light magic */ DMG_ENTRY(4, WALLMAS_DMG_REACT_STUN_WHITE),
/* Shield */ DMG_ENTRY(0, WALLMAS_DMG_REAC_NONE), /* Shield */ DMG_ENTRY(0, WALLMAS_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, WALLMAS_DMG_REAC_NONE), /* Mirror Ray */ DMG_ENTRY(0, WALLMAS_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, WALLMAS_DMG_REAC_NONE), /* Kokiri spin */ DMG_ENTRY(1, WALLMAS_DMG_REACT_NONE),
/* Giant spin */ DMG_ENTRY(4, WALLMAS_DMG_REAC_NONE), /* Giant spin */ DMG_ENTRY(4, WALLMAS_DMG_REACT_NONE),
/* Master spin */ DMG_ENTRY(2, WALLMAS_DMG_REAC_NONE), /* Master spin */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Kokiri jump */ DMG_ENTRY(2, WALLMAS_DMG_REAC_NONE), /* Kokiri jump */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Giant jump */ DMG_ENTRY(8, WALLMAS_DMG_REAC_NONE), /* Giant jump */ DMG_ENTRY(8, WALLMAS_DMG_REACT_NONE),
/* Master jump */ DMG_ENTRY(4, WALLMAS_DMG_REAC_NONE), /* Master jump */ DMG_ENTRY(4, WALLMAS_DMG_REACT_NONE),
/* Unknown 1 */ DMG_ENTRY(0, WALLMAS_DMG_REAC_NONE), /* Unknown 1 */ DMG_ENTRY(0, WALLMAS_DMG_REACT_NONE),
/* Unblockable */ DMG_ENTRY(0, WALLMAS_DMG_REAC_NONE), /* Unblockable */ DMG_ENTRY(0, WALLMAS_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(4, WALLMAS_DMG_REAC_NONE), /* Hammer jump */ DMG_ENTRY(4, WALLMAS_DMG_REACT_NONE),
/* Unknown 2 */ DMG_ENTRY(0, WALLMAS_DMG_REAC_NONE), /* Unknown 2 */ DMG_ENTRY(0, WALLMAS_DMG_REACT_NONE),
}; };
static InitChainEntry sInitChain[] = { static InitChainEntry sInitChain[] = {
@ -536,13 +536,13 @@ void EnWallmas_ColUpdate(EnWallmas* this, PlayState* play) {
} }
} }
if ((this->actor.colChkInfo.damageReaction == WALLMAS_DMG_REAC_STUN_WHITE) || if ((this->actor.colChkInfo.damageReaction == WALLMAS_DMG_REACT_STUN_WHITE) ||
(this->actor.colChkInfo.damageReaction == WALLMAS_DMG_REAC_STUN_BLUE)) { (this->actor.colChkInfo.damageReaction == WALLMAS_DMG_REACT_STUN_BLUE)) {
if (this->actionFunc != EnWallmas_Stun) { if (this->actionFunc != EnWallmas_Stun) {
EnWallmas_SetupStun(this); EnWallmas_SetupStun(this);
} }
} else { } else {
if (this->actor.colChkInfo.damageReaction == WALLMAS_DMG_REAC_BURN) { if (this->actor.colChkInfo.damageReaction == WALLMAS_DMG_REACT_BURN) {
EffectSsFCircle_Spawn(play, &this->actor, &this->actor.world.pos, 40, 40); EffectSsFCircle_Spawn(play, &this->actor, &this->actor.world.pos, 40, 40);
} }

View File

@ -163,47 +163,47 @@ static ColliderCylinderInit sTailCylinderInit = {
}; };
typedef enum EnWfDamageReaction { typedef enum EnWfDamageReaction {
/* 0 */ ENWF_DMG_REAC_NONE, /* 0 */ ENWF_DMG_REACT_NONE,
/* 1 */ ENWF_DMG_REAC_STUN, /* 1 */ ENWF_DMG_REACT_STUN,
/* 6 */ ENWF_DMG_REAC_ICE_MAGIC = 6, /* 6 */ ENWF_DMG_REACT_ICE_MAGIC = 6,
/* 13 */ ENWF_DMG_REAC_LIGHT_MAGIC = 13, /* 13 */ ENWF_DMG_REACT_LIGHT_MAGIC = 13,
/* 14 */ ENWF_DMG_REAC_FIRE, /* 14 */ ENWF_DMG_REACT_FIRE,
/* 15 */ ENWF_DMG_REAC_UNDEF // used like STUN in the code, but not in the table /* 15 */ ENWF_DMG_REACT_UNDEF // used like STUN in the code, but not in the table
} EnWfDamageReaction; } EnWfDamageReaction;
static DamageTable sDamageTable = { static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, ENWF_DMG_REAC_STUN), /* Deku nut */ DMG_ENTRY(0, ENWF_DMG_REACT_STUN),
/* Deku stick */ DMG_ENTRY(2, ENWF_DMG_REAC_NONE), /* Deku stick */ DMG_ENTRY(2, ENWF_DMG_REACT_NONE),
/* Slingshot */ DMG_ENTRY(1, ENWF_DMG_REAC_NONE), /* Slingshot */ DMG_ENTRY(1, ENWF_DMG_REACT_NONE),
/* Explosive */ DMG_ENTRY(2, ENWF_DMG_REAC_NONE), /* Explosive */ DMG_ENTRY(2, ENWF_DMG_REACT_NONE),
/* Boomerang */ DMG_ENTRY(0, ENWF_DMG_REAC_STUN), /* Boomerang */ DMG_ENTRY(0, ENWF_DMG_REACT_STUN),
/* Normal arrow */ DMG_ENTRY(2, ENWF_DMG_REAC_NONE), /* Normal arrow */ DMG_ENTRY(2, ENWF_DMG_REACT_NONE),
/* Hammer swing */ DMG_ENTRY(2, ENWF_DMG_REAC_NONE), /* Hammer swing */ DMG_ENTRY(2, ENWF_DMG_REACT_NONE),
/* Hookshot */ DMG_ENTRY(0, ENWF_DMG_REAC_STUN), /* Hookshot */ DMG_ENTRY(0, ENWF_DMG_REACT_STUN),
/* Kokiri sword */ DMG_ENTRY(1, ENWF_DMG_REAC_NONE), /* Kokiri sword */ DMG_ENTRY(1, ENWF_DMG_REACT_NONE),
/* Master sword */ DMG_ENTRY(2, ENWF_DMG_REAC_NONE), /* Master sword */ DMG_ENTRY(2, ENWF_DMG_REACT_NONE),
/* Giant's Knife */ DMG_ENTRY(4, ENWF_DMG_REAC_NONE), /* Giant's Knife */ DMG_ENTRY(4, ENWF_DMG_REACT_NONE),
/* Fire arrow */ DMG_ENTRY(4, ENWF_DMG_REAC_FIRE), /* Fire arrow */ DMG_ENTRY(4, ENWF_DMG_REACT_FIRE),
/* Ice arrow */ DMG_ENTRY(2, ENWF_DMG_REAC_NONE), /* Ice arrow */ DMG_ENTRY(2, ENWF_DMG_REACT_NONE),
/* Light arrow */ DMG_ENTRY(2, ENWF_DMG_REAC_NONE), /* Light arrow */ DMG_ENTRY(2, ENWF_DMG_REACT_NONE),
/* Unk arrow 1 */ DMG_ENTRY(2, ENWF_DMG_REAC_NONE), /* Unk arrow 1 */ DMG_ENTRY(2, ENWF_DMG_REACT_NONE),
/* Unk arrow 2 */ DMG_ENTRY(2, ENWF_DMG_REAC_NONE), /* Unk arrow 2 */ DMG_ENTRY(2, ENWF_DMG_REACT_NONE),
/* Unk arrow 3 */ DMG_ENTRY(2, ENWF_DMG_REAC_NONE), /* Unk arrow 3 */ DMG_ENTRY(2, ENWF_DMG_REACT_NONE),
/* Fire magic */ DMG_ENTRY(4, ENWF_DMG_REAC_FIRE), /* Fire magic */ DMG_ENTRY(4, ENWF_DMG_REACT_FIRE),
/* Ice magic */ DMG_ENTRY(0, ENWF_DMG_REAC_ICE_MAGIC), /* Ice magic */ DMG_ENTRY(0, ENWF_DMG_REACT_ICE_MAGIC),
/* Light magic */ DMG_ENTRY(3, ENWF_DMG_REAC_LIGHT_MAGIC), /* Light magic */ DMG_ENTRY(3, ENWF_DMG_REACT_LIGHT_MAGIC),
/* Shield */ DMG_ENTRY(0, ENWF_DMG_REAC_NONE), /* Shield */ DMG_ENTRY(0, ENWF_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, ENWF_DMG_REAC_NONE), /* Mirror Ray */ DMG_ENTRY(0, ENWF_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, ENWF_DMG_REAC_NONE), /* Kokiri spin */ DMG_ENTRY(1, ENWF_DMG_REACT_NONE),
/* Giant spin */ DMG_ENTRY(4, ENWF_DMG_REAC_NONE), /* Giant spin */ DMG_ENTRY(4, ENWF_DMG_REACT_NONE),
/* Master spin */ DMG_ENTRY(2, ENWF_DMG_REAC_NONE), /* Master spin */ DMG_ENTRY(2, ENWF_DMG_REACT_NONE),
/* Kokiri jump */ DMG_ENTRY(2, ENWF_DMG_REAC_NONE), /* Kokiri jump */ DMG_ENTRY(2, ENWF_DMG_REACT_NONE),
/* Giant jump */ DMG_ENTRY(8, ENWF_DMG_REAC_NONE), /* Giant jump */ DMG_ENTRY(8, ENWF_DMG_REACT_NONE),
/* Master jump */ DMG_ENTRY(4, ENWF_DMG_REAC_NONE), /* Master jump */ DMG_ENTRY(4, ENWF_DMG_REACT_NONE),
/* Unknown 1 */ DMG_ENTRY(0, ENWF_DMG_REAC_NONE), /* Unknown 1 */ DMG_ENTRY(0, ENWF_DMG_REACT_NONE),
/* Unblockable */ DMG_ENTRY(0, ENWF_DMG_REAC_NONE), /* Unblockable */ DMG_ENTRY(0, ENWF_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(4, ENWF_DMG_REAC_NONE), /* Hammer jump */ DMG_ENTRY(4, ENWF_DMG_REACT_NONE),
/* Unknown 2 */ DMG_ENTRY(0, ENWF_DMG_REAC_NONE), /* Unknown 2 */ DMG_ENTRY(0, ENWF_DMG_REACT_NONE),
}; };
ActorProfile En_Wf_Profile = { ActorProfile En_Wf_Profile = {
@ -1283,15 +1283,15 @@ void EnWf_UpdateDamage(EnWf* this, PlayState* play) {
this->bodyColliderCylinder.base.acFlags &= ~AC_HIT; this->bodyColliderCylinder.base.acFlags &= ~AC_HIT;
this->tailColliderCylinder.base.acFlags &= ~AC_HIT; this->tailColliderCylinder.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageReaction != ENWF_DMG_REAC_ICE_MAGIC) { if (this->actor.colChkInfo.damageReaction != ENWF_DMG_REACT_ICE_MAGIC) {
this->damageReaction = this->actor.colChkInfo.damageReaction; this->damageReaction = this->actor.colChkInfo.damageReaction;
Actor_SetDropFlag(&this->actor, &this->bodyColliderCylinder.elem, true); Actor_SetDropFlag(&this->actor, &this->bodyColliderCylinder.elem, true);
#if OOT_VERSION >= PAL_1_0 #if OOT_VERSION >= PAL_1_0
this->slashStatus = 0; this->slashStatus = 0;
#endif #endif
if ((this->actor.colChkInfo.damageReaction == ENWF_DMG_REAC_STUN) || if ((this->actor.colChkInfo.damageReaction == ENWF_DMG_REACT_STUN) ||
(this->actor.colChkInfo.damageReaction == ENWF_DMG_REAC_UNDEF)) { (this->actor.colChkInfo.damageReaction == ENWF_DMG_REACT_UNDEF)) {
if (this->action != WOLFOS_ACTION_STUNNED) { if (this->action != WOLFOS_ACTION_STUNNED) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA,
80); 80);
@ -1301,7 +1301,7 @@ void EnWf_UpdateDamage(EnWf* this, PlayState* play) {
} else { // LIGHT_MAGIC, FIRE, NONE } else { // LIGHT_MAGIC, FIRE, NONE
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8);
if (this->damageReaction == ENWF_DMG_REAC_FIRE) { if (this->damageReaction == ENWF_DMG_REACT_FIRE) {
this->fireTimer = 40; this->fireTimer = 40;
} }
@ -1323,7 +1323,7 @@ void EnWf_Update(Actor* thisx, PlayState* play) {
EnWf_UpdateDamage(this, play); EnWf_UpdateDamage(this, play);
if (this->actor.colChkInfo.damageReaction != ENWF_DMG_REAC_ICE_MAGIC) { if (this->actor.colChkInfo.damageReaction != ENWF_DMG_REACT_ICE_MAGIC) {
Actor_MoveXZGravity(&this->actor); Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 32.0f, 30.0f, 60.0f, Actor_UpdateBgCheckInfo(play, &this->actor, 32.0f, 30.0f, 60.0f,
UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 | UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 |

View File

@ -170,46 +170,46 @@ static ColliderQuadInit sSwordQuadInit = {
}; };
typedef enum EnZfDamageReaction { typedef enum EnZfDamageReaction {
/* 0x0 */ ENZF_DMG_REAC_NONE, /* 0x0 */ ENZF_DMG_REACT_NONE,
/* 0x1 */ ENZF_DMG_REAC_STUN, /* 0x1 */ ENZF_DMG_REACT_STUN,
/* 0x6 */ ENZF_DMG_REAC_IMMUNE = 6, // Skips damage code, but also skips the top half of Update /* 0x6 */ ENZF_DMG_REACT_IMMUNE = 6, // Skips damage code, but also skips the top half of Update
/* 0xD */ ENZF_DMG_REAC_PROJECTILE = 0xD, // Projectiles that don't have another damageeffect /* 0xD */ ENZF_DMG_REACT_PROJECTILE = 0xD, // Projectiles that don't have another damageeffect
/* 0xF */ ENZF_DMG_REAC_ICE = 0xF /* 0xF */ ENZF_DMG_REACT_ICE = 0xF
} EnZfDamageReaction; } EnZfDamageReaction;
static DamageTable sDamageTable = { static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, ENZF_DMG_REAC_STUN), /* Deku nut */ DMG_ENTRY(0, ENZF_DMG_REACT_STUN),
/* Deku stick */ DMG_ENTRY(2, ENZF_DMG_REAC_NONE), /* Deku stick */ DMG_ENTRY(2, ENZF_DMG_REACT_NONE),
/* Slingshot */ DMG_ENTRY(1, ENZF_DMG_REAC_PROJECTILE), /* Slingshot */ DMG_ENTRY(1, ENZF_DMG_REACT_PROJECTILE),
/* Explosive */ DMG_ENTRY(2, ENZF_DMG_REAC_NONE), /* Explosive */ DMG_ENTRY(2, ENZF_DMG_REACT_NONE),
/* Boomerang */ DMG_ENTRY(0, ENZF_DMG_REAC_STUN), /* Boomerang */ DMG_ENTRY(0, ENZF_DMG_REACT_STUN),
/* Normal arrow */ DMG_ENTRY(2, ENZF_DMG_REAC_NONE), /* Normal arrow */ DMG_ENTRY(2, ENZF_DMG_REACT_NONE),
/* Hammer swing */ DMG_ENTRY(2, ENZF_DMG_REAC_NONE), /* Hammer swing */ DMG_ENTRY(2, ENZF_DMG_REACT_NONE),
/* Hookshot */ DMG_ENTRY(0, ENZF_DMG_REAC_STUN), /* Hookshot */ DMG_ENTRY(0, ENZF_DMG_REACT_STUN),
/* Kokiri sword */ DMG_ENTRY(1, ENZF_DMG_REAC_NONE), /* Kokiri sword */ DMG_ENTRY(1, ENZF_DMG_REACT_NONE),
/* Master sword */ DMG_ENTRY(2, ENZF_DMG_REAC_NONE), /* Master sword */ DMG_ENTRY(2, ENZF_DMG_REACT_NONE),
/* Giant's Knife */ DMG_ENTRY(4, ENZF_DMG_REAC_NONE), /* Giant's Knife */ DMG_ENTRY(4, ENZF_DMG_REACT_NONE),
/* Fire arrow */ DMG_ENTRY(2, ENZF_DMG_REAC_PROJECTILE), /* Fire arrow */ DMG_ENTRY(2, ENZF_DMG_REACT_PROJECTILE),
/* Ice arrow */ DMG_ENTRY(4, ENZF_DMG_REAC_ICE), /* Ice arrow */ DMG_ENTRY(4, ENZF_DMG_REACT_ICE),
/* Light arrow */ DMG_ENTRY(2, ENZF_DMG_REAC_PROJECTILE), /* Light arrow */ DMG_ENTRY(2, ENZF_DMG_REACT_PROJECTILE),
/* Unk arrow 1 */ DMG_ENTRY(2, ENZF_DMG_REAC_PROJECTILE), /* Unk arrow 1 */ DMG_ENTRY(2, ENZF_DMG_REACT_PROJECTILE),
/* Unk arrow 2 */ DMG_ENTRY(2, ENZF_DMG_REAC_PROJECTILE), /* Unk arrow 2 */ DMG_ENTRY(2, ENZF_DMG_REACT_PROJECTILE),
/* Unk arrow 3 */ DMG_ENTRY(2, ENZF_DMG_REAC_PROJECTILE), /* Unk arrow 3 */ DMG_ENTRY(2, ENZF_DMG_REACT_PROJECTILE),
/* Fire magic */ DMG_ENTRY(0, ENZF_DMG_REAC_IMMUNE), /* Fire magic */ DMG_ENTRY(0, ENZF_DMG_REACT_IMMUNE),
/* Ice magic */ DMG_ENTRY(3, ENZF_DMG_REAC_ICE), /* Ice magic */ DMG_ENTRY(3, ENZF_DMG_REACT_ICE),
/* Light magic */ DMG_ENTRY(0, ENZF_DMG_REAC_IMMUNE), /* Light magic */ DMG_ENTRY(0, ENZF_DMG_REACT_IMMUNE),
/* Shield */ DMG_ENTRY(0, ENZF_DMG_REAC_NONE), /* Shield */ DMG_ENTRY(0, ENZF_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, ENZF_DMG_REAC_NONE), /* Mirror Ray */ DMG_ENTRY(0, ENZF_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, ENZF_DMG_REAC_NONE), /* Kokiri spin */ DMG_ENTRY(1, ENZF_DMG_REACT_NONE),
/* Giant spin */ DMG_ENTRY(4, ENZF_DMG_REAC_NONE), /* Giant spin */ DMG_ENTRY(4, ENZF_DMG_REACT_NONE),
/* Master spin */ DMG_ENTRY(2, ENZF_DMG_REAC_NONE), /* Master spin */ DMG_ENTRY(2, ENZF_DMG_REACT_NONE),
/* Kokiri jump */ DMG_ENTRY(2, ENZF_DMG_REAC_NONE), /* Kokiri jump */ DMG_ENTRY(2, ENZF_DMG_REACT_NONE),
/* Giant jump */ DMG_ENTRY(8, ENZF_DMG_REAC_NONE), /* Giant jump */ DMG_ENTRY(8, ENZF_DMG_REACT_NONE),
/* Master jump */ DMG_ENTRY(4, ENZF_DMG_REAC_NONE), /* Master jump */ DMG_ENTRY(4, ENZF_DMG_REACT_NONE),
/* Unknown 1 */ DMG_ENTRY(0, ENZF_DMG_REAC_NONE), /* Unknown 1 */ DMG_ENTRY(0, ENZF_DMG_REACT_NONE),
/* Unblockable */ DMG_ENTRY(0, ENZF_DMG_REAC_NONE), /* Unblockable */ DMG_ENTRY(0, ENZF_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(4, ENZF_DMG_REAC_NONE), /* Hammer jump */ DMG_ENTRY(4, ENZF_DMG_REACT_NONE),
/* Unknown 2 */ DMG_ENTRY(0, ENZF_DMG_REAC_NONE), /* Unknown 2 */ DMG_ENTRY(0, ENZF_DMG_REACT_NONE),
}; };
static InitChainEntry sInitChain[] = { static InitChainEntry sInitChain[] = {
@ -1324,7 +1324,7 @@ void EnZf_SetupStunned(EnZf* this) {
this->hopAnimIndex = 1; this->hopAnimIndex = 1;
} }
if (this->damageReaction == ENZF_DMG_REAC_ICE) { if (this->damageReaction == ENZF_DMG_REACT_ICE) {
this->iceTimer = 36; this->iceTimer = 36;
} else { } else {
Animation_PlayOnceSetSpeed(&this->skelAnime, &gZfKnockedBackAnim, 0.0f); Animation_PlayOnceSetSpeed(&this->skelAnime, &gZfKnockedBackAnim, 0.0f);
@ -1685,7 +1685,7 @@ void EnZf_Damaged(EnZf* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) { SkelAnime_Update(&this->skelAnime) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
if (D_80B4A1B4 != -1) { if (D_80B4A1B4 != -1) {
if (this->damageReaction == ENZF_DMG_REAC_PROJECTILE) { if (this->damageReaction == ENZF_DMG_REACT_PROJECTILE) {
D_80B4A1B0++; D_80B4A1B0++;
} else { } else {
this->actor.world.rot.y = this->actor.shape.rot.y; this->actor.world.rot.y = this->actor.shape.rot.y;
@ -2028,12 +2028,12 @@ void EnZf_UpdateDamage(EnZf* this, PlayState* play) {
if (((this->actor.params < ENZF_TYPE_LIZALFOS_MINIBOSS_A) /* not miniboss */ || if (((this->actor.params < ENZF_TYPE_LIZALFOS_MINIBOSS_A) /* not miniboss */ ||
(D_80B4A1B4 != this->actor.params)) && (D_80B4A1B4 != this->actor.params)) &&
(this->actor.colChkInfo.damageReaction != ENZF_DMG_REAC_IMMUNE)) { (this->actor.colChkInfo.damageReaction != ENZF_DMG_REACT_IMMUNE)) {
this->damageReaction = this->actor.colChkInfo.damageReaction; this->damageReaction = this->actor.colChkInfo.damageReaction;
Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, false); Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, false);
if ((this->actor.colChkInfo.damageReaction == ENZF_DMG_REAC_STUN) || if ((this->actor.colChkInfo.damageReaction == ENZF_DMG_REACT_STUN) ||
(this->actor.colChkInfo.damageReaction == ENZF_DMG_REAC_ICE)) { (this->actor.colChkInfo.damageReaction == ENZF_DMG_REACT_ICE)) {
if (this->action != ENZF_ACTION_STUNNED) { if (this->action != ENZF_ACTION_STUNNED) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 80); Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 80);
Actor_ApplyDamage(&this->actor); Actor_ApplyDamage(&this->actor);
@ -2056,7 +2056,7 @@ void EnZf_UpdateDamage(EnZf* this, PlayState* play) {
} else { } else {
if ((D_80B4A1B4 != -1) && ((this->actor.colChkInfo.health + this->actor.colChkInfo.damage) >= 4) && if ((D_80B4A1B4 != -1) && ((this->actor.colChkInfo.health + this->actor.colChkInfo.damage) >= 4) &&
(this->actor.colChkInfo.health < 4)) { (this->actor.colChkInfo.health < 4)) {
this->damageReaction = ENZF_DMG_REAC_PROJECTILE; this->damageReaction = ENZF_DMG_REACT_PROJECTILE;
} }
EnZf_SetupDamaged(this); EnZf_SetupDamaged(this);
@ -2072,7 +2072,7 @@ void EnZf_Update(Actor* thisx, PlayState* play) {
s32 pad2; s32 pad2;
EnZf_UpdateDamage(this, play); EnZf_UpdateDamage(this, play);
if (this->actor.colChkInfo.damageReaction != ENZF_DMG_REAC_IMMUNE) { if (this->actor.colChkInfo.damageReaction != ENZF_DMG_REACT_IMMUNE) {
this->unk_3F8 = false; this->unk_3F8 = false;
if ((this->hopAnimIndex != 1) && (this->action != ENZF_ACTION_HOP_AWAY)) { if ((this->hopAnimIndex != 1) && (this->action != ENZF_ACTION_HOP_AWAY)) {
if (this->actor.speed != 0.0f) { if (this->actor.speed != 0.0f) {