Rename `damageEffect` -> `damageReaction` (#2554)

* CollisionCheckInfo.damageEffect -> damageReaction

* damageEffect -> damageReaction in other structs/temps

* DMGEFF -> DMGREAC

* EnSkb.lastDamageEffect -> lastDamageReaction

* EnTest.lastDamageEffect -> lastDamageReaction

* enums: DamageEffect -> DamageReaction

* cleanup: EnGeldBDamageReactions -> EnGeldBDamageReaction

* DMG_ENTRY effect -> reaction

* cleanup: GELDB_DMG_ -> GELDB_DMGREAC_

* PEAHAT_DMG_EFF -> PEAHAT_DMGREAC

* cleanup: RR_DMG_ -> RR_DMGREAC_

* cleanup: EnWallmas DAMAGE_EFFECT_ -> WALLMAS_DMGREAC_

* cleanup: EnPeehat's DamageReaction -> EnPeehatDamageReaction

* format

* review

* _DMGREAC_ -> _DMG_REAC_

* _DMG_REAC_ -> _DMG_REACT_

* format
This commit is contained in:
Dragorn421 2025-06-04 00:45:32 +02:00 committed by GitHub
parent 0c1b1231d3
commit 31f8c32ed9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
61 changed files with 953 additions and 948 deletions

View File

@ -391,7 +391,7 @@ typedef struct CollisionCheckContext {
#define OCLINE_NONE 0 // Did not have an OcLine collision
#define OCLINE_HIT (1 << 0) // Had an OcLine collision
#define DMG_ENTRY(damage, effect) ((damage) | ((effect) << 4))
#define DMG_ENTRY(damage, reaction) ((damage) | ((reaction) << 4))
#define DMG_DEKU_NUT (1 << 0)
#define DMG_DEKU_STICK (1 << 1)
@ -464,7 +464,7 @@ typedef struct CollisionCheckInfo {
/* 0x16 */ u8 mass; // Used to compute displacement for OC collisions
/* 0x17 */ u8 health; // Note: some actors may use their own health variable instead of this one
/* 0x18 */ u8 damage; // Amount to decrement health by
/* 0x19 */ u8 damageEffect; // Stores what effect should occur when hit by a weapon
/* 0x19 */ u8 damageReaction; // Stores what reaction should occur after being hit
/* 0x1A */ u8 atHitEffect; // Stores what effect should occur when AT connects with an AC
/* 0x1B */ u8 acHitEffect; // Stores what effect should occur when AC is touched by an AT
} CollisionCheckInfo; // size = 0x1C

View File

@ -3027,7 +3027,7 @@ void CollisionCheck_InitInfo(CollisionCheckInfo* info) {
*/
void CollisionCheck_ResetDamage(CollisionCheckInfo* info) {
info->damage = 0;
info->damageEffect = 0;
info->damageReaction = 0;
info->atHitEffect = 0;
info->acHitEffect = 0;
info->displacement.x = info->displacement.y = info->displacement.z = 0.0f;
@ -3108,7 +3108,7 @@ void CollisionCheck_ApplyDamage(PlayState* play, CollisionCheckContext* colChkCt
}
damage = tbl->table[i] & 0xF;
col->actor->colChkInfo.damageEffect = tbl->table[i] >> 4 & 0xF;
col->actor->colChkInfo.damageReaction = tbl->table[i] >> 4 & 0xF;
}
if (!(col->acFlags & AC_HARD)) {
col->actor->colChkInfo.damage += damage;

View File

@ -2552,7 +2552,7 @@ void BossSst_HandCollisionCheck(BossSst* this, PlayState* play) {
s32 bothHands = true;
this->colliderJntSph.base.acFlags &= ~AC_HIT;
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if ((this->actor.colChkInfo.damageReaction != 0) || (this->actor.colChkInfo.damage != 0)) {
this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
this->colliderJntSph.base.acFlags &= ~AC_ON;
this->colliderJntSph.base.ocFlags1 &= ~OC1_NO_PUSH;
@ -2563,7 +2563,7 @@ void BossSst_HandCollisionCheck(BossSst* this, PlayState* play) {
}
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
if (this->actor.colChkInfo.damageEffect == 3) {
if (this->actor.colChkInfo.damageReaction == 3) {
BossSst_HandSetupFrozen(this);
} else {
BossSst_HandSetupReel(this);
@ -2583,7 +2583,7 @@ void BossSst_HandCollisionCheck(BossSst* this, PlayState* play) {
void BossSst_HeadCollisionCheck(BossSst* this, PlayState* play) {
if (this->colliderCylinder.base.acFlags & AC_HIT) {
this->colliderCylinder.base.acFlags &= ~AC_HIT;
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if ((this->actor.colChkInfo.damageReaction != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->actionFunc == BossSst_HeadVulnerable) {
if (Actor_ApplyDamage(&this->actor) == 0) {
Enemy_StartFinishingBlow(play, &this->actor);

View File

@ -1402,7 +1402,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) {
if (this->timer >= 0) {
if (this->invincibilityTimer == 0) {
this->invincibilityTimer = 8;
if (this->actor.colChkInfo.damageEffect != 1) {
if (this->actor.colChkInfo.damageReaction != 1) {
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
Actor_PlaySfx(&this->actor, NA_SE_EN_BALINADE_DAMAGE);
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 12);

View File

@ -127,48 +127,48 @@ static ColliderQuadInit sQuadInit = {
{ { { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } } },
};
typedef enum ArmosDamageEffect {
/* 0 */ AM_DMGEFF_NONE, // used by anything that can't kill the armos
/* 1 */ AM_DMGEFF_NUT,
/* 6 */ AM_DMGEFF_STUN = 6, // doesn't include deku nuts
/* 13 */ AM_DMGEFF_ICE = 13,
/* 14 */ AM_DMGEFF_MAGIC_FIRE_LIGHT,
/* 15 */ AM_DMGEFF_KILL // any damage source that can kill the armos (and isn't a special case)
} ArmosDamageEffect;
typedef enum ArmosDamageReaction {
/* 0 */ AM_DMG_REACT_NONE, // used by anything that can't kill the armos
/* 1 */ AM_DMG_REACT_NUT,
/* 6 */ AM_DMG_REACT_STUN = 6, // doesn't include deku nuts
/* 13 */ AM_DMG_REACT_ICE = 13,
/* 14 */ AM_DMG_REACT_MAGIC_FIRE_LIGHT,
/* 15 */ AM_DMG_REACT_KILL // any damage source that can kill the armos (and isn't a special case)
} ArmosDamageReaction;
static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, AM_DMGEFF_NUT),
/* Deku stick */ DMG_ENTRY(2, AM_DMGEFF_NONE),
/* Slingshot */ DMG_ENTRY(1, AM_DMGEFF_NONE),
/* Explosive */ DMG_ENTRY(2, AM_DMGEFF_KILL),
/* Boomerang */ DMG_ENTRY(0, AM_DMGEFF_STUN),
/* Normal arrow */ DMG_ENTRY(2, AM_DMGEFF_KILL),
/* Hammer swing */ DMG_ENTRY(2, AM_DMGEFF_KILL),
/* Hookshot */ DMG_ENTRY(0, AM_DMGEFF_STUN),
/* Kokiri sword */ DMG_ENTRY(1, AM_DMGEFF_NONE),
/* Master sword */ DMG_ENTRY(2, AM_DMGEFF_KILL),
/* Giant's Knife */ DMG_ENTRY(4, AM_DMGEFF_KILL),
/* Fire arrow */ DMG_ENTRY(2, AM_DMGEFF_KILL),
/* Ice arrow */ DMG_ENTRY(4, AM_DMGEFF_ICE),
/* Light arrow */ DMG_ENTRY(2, AM_DMGEFF_KILL),
/* Unk arrow 1 */ DMG_ENTRY(2, AM_DMGEFF_NONE),
/* Unk arrow 2 */ DMG_ENTRY(2, AM_DMGEFF_NONE),
/* Unk arrow 3 */ DMG_ENTRY(2, AM_DMGEFF_NONE),
/* Fire magic */ DMG_ENTRY(0, AM_DMGEFF_MAGIC_FIRE_LIGHT),
/* Ice magic */ DMG_ENTRY(3, AM_DMGEFF_ICE),
/* Light magic */ DMG_ENTRY(0, AM_DMGEFF_MAGIC_FIRE_LIGHT),
/* Shield */ DMG_ENTRY(0, AM_DMGEFF_NONE),
/* Mirror Ray */ DMG_ENTRY(0, AM_DMGEFF_NONE),
/* Kokiri spin */ DMG_ENTRY(1, AM_DMGEFF_NONE),
/* Giant spin */ DMG_ENTRY(4, AM_DMGEFF_KILL),
/* Master spin */ DMG_ENTRY(2, AM_DMGEFF_KILL),
/* Kokiri jump */ DMG_ENTRY(2, AM_DMGEFF_NONE),
/* Giant jump */ DMG_ENTRY(8, AM_DMGEFF_KILL),
/* Master jump */ DMG_ENTRY(4, AM_DMGEFF_KILL),
/* Unknown 1 */ DMG_ENTRY(0, AM_DMGEFF_NONE),
/* Unblockable */ DMG_ENTRY(0, AM_DMGEFF_NONE),
/* Hammer jump */ DMG_ENTRY(4, AM_DMGEFF_KILL),
/* Unknown 2 */ DMG_ENTRY(0, AM_DMGEFF_NONE),
/* Deku nut */ DMG_ENTRY(0, AM_DMG_REACT_NUT),
/* Deku stick */ DMG_ENTRY(2, AM_DMG_REACT_NONE),
/* Slingshot */ DMG_ENTRY(1, AM_DMG_REACT_NONE),
/* Explosive */ DMG_ENTRY(2, AM_DMG_REACT_KILL),
/* Boomerang */ DMG_ENTRY(0, AM_DMG_REACT_STUN),
/* Normal arrow */ DMG_ENTRY(2, AM_DMG_REACT_KILL),
/* Hammer swing */ DMG_ENTRY(2, AM_DMG_REACT_KILL),
/* Hookshot */ DMG_ENTRY(0, AM_DMG_REACT_STUN),
/* Kokiri sword */ DMG_ENTRY(1, AM_DMG_REACT_NONE),
/* Master sword */ DMG_ENTRY(2, AM_DMG_REACT_KILL),
/* Giant's Knife */ DMG_ENTRY(4, AM_DMG_REACT_KILL),
/* Fire arrow */ DMG_ENTRY(2, AM_DMG_REACT_KILL),
/* Ice arrow */ DMG_ENTRY(4, AM_DMG_REACT_ICE),
/* Light arrow */ DMG_ENTRY(2, AM_DMG_REACT_KILL),
/* Unk arrow 1 */ DMG_ENTRY(2, AM_DMG_REACT_NONE),
/* Unk arrow 2 */ DMG_ENTRY(2, AM_DMG_REACT_NONE),
/* Unk arrow 3 */ DMG_ENTRY(2, AM_DMG_REACT_NONE),
/* Fire magic */ DMG_ENTRY(0, AM_DMG_REACT_MAGIC_FIRE_LIGHT),
/* Ice magic */ DMG_ENTRY(3, AM_DMG_REACT_ICE),
/* Light magic */ DMG_ENTRY(0, AM_DMG_REACT_MAGIC_FIRE_LIGHT),
/* Shield */ DMG_ENTRY(0, AM_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, AM_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, AM_DMG_REACT_NONE),
/* Giant spin */ DMG_ENTRY(4, AM_DMG_REACT_KILL),
/* Master spin */ DMG_ENTRY(2, AM_DMG_REACT_KILL),
/* Kokiri jump */ DMG_ENTRY(2, AM_DMG_REACT_NONE),
/* Giant jump */ DMG_ENTRY(8, AM_DMG_REACT_KILL),
/* Master jump */ DMG_ENTRY(4, AM_DMG_REACT_KILL),
/* Unknown 1 */ DMG_ENTRY(0, AM_DMG_REACT_NONE),
/* Unblockable */ DMG_ENTRY(0, AM_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(4, AM_DMG_REACT_KILL),
/* Unknown 2 */ DMG_ENTRY(0, AM_DMG_REACT_NONE),
};
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);
if (this->damageEffect == AM_DMGEFF_ICE) {
if (this->damageReaction == AM_DMG_REACT_ICE) {
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)) {
this->hurtCollider.base.acFlags &= ~AC_HIT;
if (this->dyna.actor.colChkInfo.damageEffect != AM_DMGEFF_MAGIC_FIRE_LIGHT) {
if (this->dyna.actor.colChkInfo.damageReaction != AM_DMG_REACT_MAGIC_FIRE_LIGHT) {
this->unk_264 = 0;
this->damageEffect = this->dyna.actor.colChkInfo.damageEffect;
this->damageReaction = this->dyna.actor.colChkInfo.damageReaction;
Actor_SetDropFlag(&this->dyna.actor, &this->hurtCollider.elem, false);
if ((this->dyna.actor.colChkInfo.damageEffect == AM_DMGEFF_NUT) ||
(this->dyna.actor.colChkInfo.damageEffect == AM_DMGEFF_STUN) ||
(this->dyna.actor.colChkInfo.damageEffect == AM_DMGEFF_ICE)) {
if ((this->dyna.actor.colChkInfo.damageReaction == AM_DMG_REACT_NUT) ||
(this->dyna.actor.colChkInfo.damageReaction == AM_DMG_REACT_STUN) ||
(this->dyna.actor.colChkInfo.damageReaction == AM_DMG_REACT_ICE)) {
if (this->behavior != AM_BEHAVIOR_STUNNED) {
EnAm_SetupStunned(this, play);
if (this->dyna.actor.colChkInfo.damage != 0) {
this->dyna.actor.colChkInfo.health = 0;
}
} else if (this->dyna.actor.colChkInfo.damageEffect == AM_DMGEFF_STUN) {
} else if (this->dyna.actor.colChkInfo.damageReaction == AM_DMG_REACT_STUN) {
Vec3f sparkPos = this->dyna.actor.world.pos;
sparkPos.y += 50.0f;
CollisionCheck_SpawnShieldParticlesMetal(play, &sparkPos);
}
} else if ((this->dyna.actor.colChkInfo.damageEffect == AM_DMGEFF_KILL) ||
} else if ((this->dyna.actor.colChkInfo.damageReaction == AM_DMG_REACT_KILL) ||
(this->behavior == AM_BEHAVIOR_STUNNED)) {
this->dyna.actor.colChkInfo.health = 0;
@ -857,7 +857,7 @@ void EnAm_Update(Actor* thisx, PlayState* play) {
EnAm_UpdateDamage(this, play);
}
if (this->dyna.actor.colChkInfo.damageEffect != AM_DMGEFF_MAGIC_FIRE_LIGHT) {
if (this->dyna.actor.colChkInfo.damageReaction != AM_DMG_REACT_MAGIC_FIRE_LIGHT) {
if (this->attackTimer != 0) {
this->attackTimer--;
}

View File

@ -23,7 +23,7 @@ typedef struct EnAm {
/* 0x0262 */ s16 panicSpinRot; // used when panicking before death
/* 0x0264 */ s16 unk_264;
/* 0x0266 */ u8 textureBlend; // 0 = statue textures; 255 = enemy textures
/* 0x0267 */ u8 damageEffect;
/* 0x0267 */ u8 damageReaction;
/* 0x0267 */ Vec3f shakeOrigin; // center point to shake around when waking up
/* 0x0274 */ ColliderCylinder hurtCollider;
/* 0x02C0 */ ColliderCylinder blockCollider;

View File

@ -73,45 +73,45 @@ static ColliderCylinderInit sCylinderInit = {
{ 29, 103, 0, { 0, 0, 0 } },
};
typedef enum AnubiceDamageEffect {
/* 0x0 */ ANUBICE_DMGEFF_NONE,
/* 0x2 */ ANUBICE_DMGEFF_FIRE = 2,
/* 0xF */ ANUBICE_DMGEFF_0xF = 0xF // Treated the same as ANUBICE_DMGEFF_NONE in code
} AnubiceDamageEffect;
typedef enum AnubiceDamageReaction {
/* 0x0 */ ANUBICE_DMG_REACT_NONE,
/* 0x2 */ ANUBICE_DMG_REACT_FIRE = 2,
/* 0xF */ ANUBICE_DMG_REACT_0xF = 0xF // Treated the same as ANUBICE_DMG_REACT_NONE in code
} AnubiceDamageReaction;
static DamageTable sDamageTable[] = {
/* Deku nut */ DMG_ENTRY(0, ANUBICE_DMGEFF_NONE),
/* Deku stick */ DMG_ENTRY(0, ANUBICE_DMGEFF_0xF),
/* Slingshot */ DMG_ENTRY(0, ANUBICE_DMGEFF_0xF),
/* Explosive */ DMG_ENTRY(0, ANUBICE_DMGEFF_0xF),
/* Boomerang */ DMG_ENTRY(0, ANUBICE_DMGEFF_0xF),
/* Normal arrow */ DMG_ENTRY(0, ANUBICE_DMGEFF_0xF),
/* Hammer swing */ DMG_ENTRY(1, ANUBICE_DMGEFF_0xF),
/* Hookshot */ DMG_ENTRY(2, ANUBICE_DMGEFF_0xF),
/* Kokiri sword */ DMG_ENTRY(0, ANUBICE_DMGEFF_0xF),
/* Master sword */ DMG_ENTRY(2, ANUBICE_DMGEFF_0xF),
/* Giant's Knife */ DMG_ENTRY(6, ANUBICE_DMGEFF_0xF),
/* Fire arrow */ DMG_ENTRY(2, ANUBICE_DMGEFF_FIRE),
/* Ice arrow */ DMG_ENTRY(0, ANUBICE_DMGEFF_0xF),
/* Light arrow */ DMG_ENTRY(0, ANUBICE_DMGEFF_0xF),
/* Unk arrow 1 */ DMG_ENTRY(0, ANUBICE_DMGEFF_0xF),
/* Unk arrow 2 */ DMG_ENTRY(0, ANUBICE_DMGEFF_0xF),
/* Unk arrow 3 */ DMG_ENTRY(0, ANUBICE_DMGEFF_0xF),
/* Fire magic */ DMG_ENTRY(3, ANUBICE_DMGEFF_FIRE),
/* Ice magic */ DMG_ENTRY(0, ANUBICE_DMGEFF_NONE),
/* Light magic */ DMG_ENTRY(0, ANUBICE_DMGEFF_NONE),
/* Shield */ DMG_ENTRY(0, ANUBICE_DMGEFF_NONE),
/* Mirror Ray */ DMG_ENTRY(0, ANUBICE_DMGEFF_NONE),
/* Kokiri spin */ DMG_ENTRY(0, ANUBICE_DMGEFF_0xF),
/* Giant spin */ DMG_ENTRY(6, ANUBICE_DMGEFF_0xF),
/* Master spin */ DMG_ENTRY(2, ANUBICE_DMGEFF_0xF),
/* Kokiri jump */ DMG_ENTRY(0, ANUBICE_DMGEFF_0xF),
/* Giant jump */ DMG_ENTRY(12, ANUBICE_DMGEFF_0xF),
/* Master jump */ DMG_ENTRY(4, ANUBICE_DMGEFF_0xF),
/* Unknown 1 */ DMG_ENTRY(0, ANUBICE_DMGEFF_NONE),
/* Unblockable */ DMG_ENTRY(0, ANUBICE_DMGEFF_NONE),
/* Hammer jump */ DMG_ENTRY(0, ANUBICE_DMGEFF_NONE),
/* Unknown 2 */ DMG_ENTRY(0, ANUBICE_DMGEFF_NONE),
/* Deku nut */ DMG_ENTRY(0, ANUBICE_DMG_REACT_NONE),
/* Deku stick */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Slingshot */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Explosive */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Boomerang */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Normal arrow */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Hammer swing */ DMG_ENTRY(1, ANUBICE_DMG_REACT_0xF),
/* Hookshot */ DMG_ENTRY(2, ANUBICE_DMG_REACT_0xF),
/* Kokiri sword */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Master sword */ DMG_ENTRY(2, ANUBICE_DMG_REACT_0xF),
/* Giant's Knife */ DMG_ENTRY(6, ANUBICE_DMG_REACT_0xF),
/* Fire arrow */ DMG_ENTRY(2, ANUBICE_DMG_REACT_FIRE),
/* Ice arrow */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Light arrow */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Unk arrow 1 */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Unk arrow 2 */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Unk arrow 3 */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Fire magic */ DMG_ENTRY(3, ANUBICE_DMG_REACT_FIRE),
/* Ice magic */ DMG_ENTRY(0, ANUBICE_DMG_REACT_NONE),
/* Light magic */ DMG_ENTRY(0, ANUBICE_DMG_REACT_NONE),
/* Shield */ DMG_ENTRY(0, ANUBICE_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, ANUBICE_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Giant spin */ DMG_ENTRY(6, ANUBICE_DMG_REACT_0xF),
/* Master spin */ DMG_ENTRY(2, ANUBICE_DMG_REACT_0xF),
/* Kokiri jump */ DMG_ENTRY(0, ANUBICE_DMG_REACT_0xF),
/* Giant jump */ DMG_ENTRY(12, ANUBICE_DMG_REACT_0xF),
/* Master jump */ DMG_ENTRY(4, ANUBICE_DMG_REACT_0xF),
/* Unknown 1 */ DMG_ENTRY(0, ANUBICE_DMG_REACT_NONE),
/* Unblockable */ DMG_ENTRY(0, ANUBICE_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(0, ANUBICE_DMG_REACT_NONE),
/* Unknown 2 */ DMG_ENTRY(0, ANUBICE_DMG_REACT_NONE),
};
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) {
this->collider.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageEffect == ANUBICE_DMGEFF_FIRE) {
if (this->actor.colChkInfo.damageReaction == ANUBICE_DMG_REACT_FIRE) {
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP);
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
Enemy_StartFinishingBlow(play, &this->actor);

View File

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

View File

@ -1169,7 +1169,7 @@ void EnBb_CollisionCheck(EnBb* this, PlayState* play) {
}
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
this->dmgEffect = this->actor.colChkInfo.damageEffect;
this->dmgEffect = this->actor.colChkInfo.damageReaction;
Actor_SetDropFlag(&this->actor, &this->collider.elements[0].base, false);
switch (this->dmgEffect) {
case 7:
@ -1252,7 +1252,7 @@ void EnBb_Update(Actor* thisx, PlayState* play2) {
if (this->actor.params <= ENBB_BLUE) {
EnBb_CollisionCheck(this, play);
}
if (this->actor.colChkInfo.damageEffect != 0xD) {
if (this->actor.colChkInfo.damageReaction != 0xD) {
this->actionFunc(this, play);
if ((this->actor.params <= ENBB_BLUE) && (this->actor.speed >= -6.0f) &&
!(this->actor.flags & ACTOR_FLAG_ATTACHED_TO_ARROW)) {

View File

@ -767,12 +767,12 @@ void func_809BE798(EnBigokuta* this, PlayState* play) {
void EnBigokuta_UpdateDamage(EnBigokuta* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageEffect != 0 || this->actor.colChkInfo.damage != 0) {
if (this->actor.colChkInfo.damageEffect == 1) {
if (this->actor.colChkInfo.damageReaction != 0 || this->actor.colChkInfo.damage != 0) {
if (this->actor.colChkInfo.damageReaction == 1) {
if (this->actionFunc != func_809BE058) {
func_809BD524(this);
}
} else if (this->actor.colChkInfo.damageEffect == 0xF) {
} else if (this->actor.colChkInfo.damageReaction == 0xF) {
func_809BD47C(this);
} else if (!Actor_IsFacingPlayer(&this->actor, 0x4000)) {
if (Actor_ApplyDamage(&this->actor) == 0) { // Dead

View File

@ -78,48 +78,48 @@ static ColliderCylinderInit sCylinderInit = {
static CollisionCheckInfoInit2 sColChkInfoInit = { 1, 9, 28, -20, 30 };
typedef enum BiriDamageEffect {
/* 0x0 */ BIRI_DMGEFF_NONE,
/* 0x1 */ BIRI_DMGEFF_DEKUNUT,
/* 0x2 */ BIRI_DMGEFF_FIRE,
/* 0x3 */ BIRI_DMGEFF_ICE,
/* 0xE */ BIRI_DMGEFF_SLINGSHOT = 0xE,
/* 0xF */ BIRI_DMGEFF_SWORD
} BiriDamageEffect;
typedef enum BiriDamageReaction {
/* 0x0 */ BIRI_DMG_REACT_NONE,
/* 0x1 */ BIRI_DMG_REACT_DEKUNUT,
/* 0x2 */ BIRI_DMG_REACT_FIRE,
/* 0x3 */ BIRI_DMG_REACT_ICE,
/* 0xE */ BIRI_DMG_REACT_SLINGSHOT = 0xE,
/* 0xF */ BIRI_DMG_REACT_SWORD
} BiriDamageReaction;
static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, BIRI_DMGEFF_DEKUNUT),
/* Deku stick */ DMG_ENTRY(2, BIRI_DMGEFF_NONE),
/* Slingshot */ DMG_ENTRY(0, BIRI_DMGEFF_SLINGSHOT),
/* Explosive */ DMG_ENTRY(2, BIRI_DMGEFF_NONE),
/* Boomerang */ DMG_ENTRY(1, BIRI_DMGEFF_NONE),
/* Normal arrow */ DMG_ENTRY(2, BIRI_DMGEFF_NONE),
/* Hammer swing */ DMG_ENTRY(2, BIRI_DMGEFF_NONE),
/* Hookshot */ DMG_ENTRY(2, BIRI_DMGEFF_NONE),
/* Kokiri sword */ DMG_ENTRY(1, BIRI_DMGEFF_SWORD),
/* Master sword */ DMG_ENTRY(2, BIRI_DMGEFF_SWORD),
/* Giant's Knife */ DMG_ENTRY(4, BIRI_DMGEFF_SWORD),
/* Fire arrow */ DMG_ENTRY(4, BIRI_DMGEFF_FIRE),
/* Ice arrow */ DMG_ENTRY(4, BIRI_DMGEFF_ICE),
/* Light arrow */ DMG_ENTRY(2, BIRI_DMGEFF_NONE),
/* Unk arrow 1 */ DMG_ENTRY(2, BIRI_DMGEFF_NONE),
/* Unk arrow 2 */ DMG_ENTRY(2, BIRI_DMGEFF_NONE),
/* Unk arrow 3 */ DMG_ENTRY(2, BIRI_DMGEFF_NONE),
/* Fire magic */ DMG_ENTRY(4, BIRI_DMGEFF_FIRE),
/* Ice magic */ DMG_ENTRY(4, BIRI_DMGEFF_ICE),
/* Light magic */ DMG_ENTRY(0, BIRI_DMGEFF_NONE),
/* Shield */ DMG_ENTRY(0, BIRI_DMGEFF_NONE),
/* Mirror Ray */ DMG_ENTRY(0, BIRI_DMGEFF_NONE),
/* Kokiri spin */ DMG_ENTRY(1, BIRI_DMGEFF_NONE),
/* Giant spin */ DMG_ENTRY(4, BIRI_DMGEFF_NONE),
/* Master spin */ DMG_ENTRY(2, BIRI_DMGEFF_NONE),
/* Kokiri jump */ DMG_ENTRY(2, BIRI_DMGEFF_NONE),
/* Giant jump */ DMG_ENTRY(8, BIRI_DMGEFF_NONE),
/* Master jump */ DMG_ENTRY(4, BIRI_DMGEFF_NONE),
/* Unknown 1 */ DMG_ENTRY(0, BIRI_DMGEFF_NONE),
/* Unblockable */ DMG_ENTRY(0, BIRI_DMGEFF_NONE),
/* Hammer jump */ DMG_ENTRY(4, BIRI_DMGEFF_NONE),
/* Unknown 2 */ DMG_ENTRY(0, BIRI_DMGEFF_NONE),
/* Deku nut */ DMG_ENTRY(0, BIRI_DMG_REACT_DEKUNUT),
/* Deku stick */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Slingshot */ DMG_ENTRY(0, BIRI_DMG_REACT_SLINGSHOT),
/* Explosive */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Boomerang */ DMG_ENTRY(1, BIRI_DMG_REACT_NONE),
/* Normal arrow */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Hammer swing */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Hookshot */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Kokiri sword */ DMG_ENTRY(1, BIRI_DMG_REACT_SWORD),
/* Master sword */ DMG_ENTRY(2, BIRI_DMG_REACT_SWORD),
/* Giant's Knife */ DMG_ENTRY(4, BIRI_DMG_REACT_SWORD),
/* Fire arrow */ DMG_ENTRY(4, BIRI_DMG_REACT_FIRE),
/* Ice arrow */ DMG_ENTRY(4, BIRI_DMG_REACT_ICE),
/* Light arrow */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Unk arrow 1 */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Unk arrow 2 */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Unk arrow 3 */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Fire magic */ DMG_ENTRY(4, BIRI_DMG_REACT_FIRE),
/* Ice magic */ DMG_ENTRY(4, BIRI_DMG_REACT_ICE),
/* Light magic */ DMG_ENTRY(0, BIRI_DMG_REACT_NONE),
/* Shield */ DMG_ENTRY(0, BIRI_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, BIRI_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, BIRI_DMG_REACT_NONE),
/* Giant spin */ DMG_ENTRY(4, BIRI_DMG_REACT_NONE),
/* Master spin */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Kokiri jump */ DMG_ENTRY(2, BIRI_DMG_REACT_NONE),
/* Giant jump */ DMG_ENTRY(8, BIRI_DMG_REACT_NONE),
/* Master jump */ DMG_ENTRY(4, BIRI_DMG_REACT_NONE),
/* Unknown 1 */ DMG_ENTRY(0, BIRI_DMG_REACT_NONE),
/* Unblockable */ DMG_ENTRY(0, BIRI_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(4, BIRI_DMG_REACT_NONE),
/* Unknown 2 */ DMG_ENTRY(0, BIRI_DMG_REACT_NONE),
};
static InitChainEntry sInitChain[] = {
@ -566,26 +566,26 @@ void EnBili_Frozen(EnBili* this, PlayState* play) {
}
void EnBili_UpdateDamage(EnBili* this, PlayState* play) {
u8 damageEffect;
u8 damageReaction;
if ((this->actor.colChkInfo.health != 0) && (this->collider.base.acFlags & AC_HIT)) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if ((this->actor.colChkInfo.damageReaction != 0) || (this->actor.colChkInfo.damage != 0)) {
if (Actor_ApplyDamage(&this->actor) == 0) {
Actor_PlaySfx(&this->actor, NA_SE_EN_BIRI_DEAD);
Enemy_StartFinishingBlow(play, &this->actor);
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
}
damageEffect = this->actor.colChkInfo.damageEffect;
damageReaction = this->actor.colChkInfo.damageReaction;
if (damageEffect == BIRI_DMGEFF_DEKUNUT) {
if (damageReaction == BIRI_DMG_REACT_DEKUNUT) {
if (this->actionFunc != EnBili_Stunned) {
EnBili_SetupStunned(this);
}
} else if (damageEffect == BIRI_DMGEFF_SWORD) {
} else if (damageReaction == BIRI_DMG_REACT_SWORD) {
if (this->actionFunc != EnBili_Stunned) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 200, COLORFILTER_BUFFLAG_XLU, 10);
@ -596,12 +596,12 @@ void EnBili_UpdateDamage(EnBili* this, PlayState* play) {
} else {
EnBili_SetupBurnt(this);
}
} else if (damageEffect == BIRI_DMGEFF_FIRE) {
} else if (damageReaction == BIRI_DMG_REACT_FIRE) {
EnBili_SetupBurnt(this);
this->timer = 2;
} else if (damageEffect == BIRI_DMGEFF_ICE) {
} else if (damageReaction == BIRI_DMG_REACT_ICE) {
EnBili_SetupFrozen(this, play);
} else if (damageEffect == BIRI_DMGEFF_SLINGSHOT) {
} else if (damageReaction == BIRI_DMG_REACT_SLINGSHOT) {
EnBili_SetupRecoil(this);
} else {
EnBili_SetupBurnt(this);

View File

@ -617,7 +617,7 @@ void func_809D01CC(EnBw* this) {
this->actor.speed = 0.0f;
this->unk_25C = (Rand_ZeroOne() * 0.25f) + 1.0f;
this->unk_260 = 0.0f;
if (this->damageEffect == 0xE) {
if (this->damageReaction == 0xE) {
this->iceTimer = 0x50;
}
this->unk_222 = (this->actor.colorFilterParams & 0x4000) ? 25 : 80;
@ -658,7 +658,7 @@ void func_809D0268(EnBw* this, PlayState* play) {
void func_809D03CC(EnBw* this) {
this->actor.speed = 0.0f;
if (this->damageEffect == 0xE) {
if (this->damageReaction == 0xE) {
this->iceTimer = 32;
}
this->unk_23C = this->actor.colorFilterTimer;
@ -706,12 +706,12 @@ void func_809D0584(EnBw* this, PlayState* play) {
} else {
if (this->collider2.base.acFlags & AC_HIT) {
this->collider2.base.acFlags &= ~AC_HIT;
if ((this->actor.colChkInfo.damageEffect == 0) || (this->unk_220 == 6)) {
if ((this->actor.colChkInfo.damageReaction == 0) || (this->unk_220 == 6)) {
return;
}
this->damageEffect = this->actor.colChkInfo.damageEffect;
this->damageReaction = this->actor.colChkInfo.damageReaction;
Actor_SetDropFlag(&this->actor, &this->collider2.elem, false);
if ((this->damageEffect == 1) || (this->damageEffect == 0xE)) {
if ((this->damageReaction == 1) || (this->damageReaction == 0xE)) {
if (this->unk_23C == 0) {
Actor_ApplyDamage(&this->actor);
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 80);
@ -771,7 +771,7 @@ void EnBw_Update(Actor* thisx, PlayState* play2) {
Color_RGBA8 sp44 = { 0, 0, 0, 220 };
func_809D0584(this, play);
if (thisx->colChkInfo.damageEffect != 6) {
if (thisx->colChkInfo.damageReaction != 6) {
this->actionFunc(this, play);
if (this->unk_23C == 0) {
this->unk_23A = (this->unk_23A + 4) & 0x7F;

View File

@ -35,7 +35,7 @@ typedef struct EnBw {
/* 0x0228 */ EnBwActionFunc actionFunc;
/* 0x022C */ Color_RGBA8 color1;
/* 0x0230 */ u8 unk_230;
/* 0x0231 */ u8 damageEffect;
/* 0x0231 */ u8 damageReaction;
/* 0x0232 */ u8 unk_232;
/* 0x0234 */ s16 unk_234;
/* 0x0236 */ s16 unk_236;

View File

@ -169,7 +169,7 @@ void EnCrow_SetupDamaged(EnCrow* this, PlayState* play) {
this->actor.lockOnArrowOffset = 0.0f;
Actor_PlaySfx(&this->actor, NA_SE_EN_KAICHO_DEAD);
if (this->actor.colChkInfo.damageEffect == 3) { // Ice arrows
if (this->actor.colChkInfo.damageReaction == 3) { // Ice arrows
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 40);
for (i = 0; i < 8; i++) {
iceParticlePos.x = ((i & 1 ? 7.0f : -7.0f) * scale) + this->actor.world.pos.x;
@ -178,7 +178,7 @@ void EnCrow_SetupDamaged(EnCrow* this, PlayState* play) {
EffectSsEnIce_SpawnFlyingVec3f(play, &this->actor, &iceParticlePos, 150, 150, 150, 250, 235, 245, 255,
((Rand_ZeroOne() * 0.15f) + 0.85f) * scale);
}
} else if (this->actor.colChkInfo.damageEffect == 2) { // Fire arrows and Din's Fire
} else if (this->actor.colChkInfo.damageReaction == 2) { // Fire arrows and Din's Fire
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 40);
for (i = 0; i < 4; i++) {
@ -426,8 +426,8 @@ void EnCrow_UpdateDamage(EnCrow* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.elements[0].base, true);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->actor.colChkInfo.damageEffect == 1) { // Deku Nuts
if ((this->actor.colChkInfo.damageReaction != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->actor.colChkInfo.damageReaction == 1) { // Deku Nuts
EnCrow_SetupTurnAway(this);
} else {
Actor_ApplyDamage(&this->actor);

View File

@ -150,84 +150,84 @@ static ColliderJntSphInit sJntSphInit = {
static CollisionCheckInfoInit sColChkInfoInit = { 2, 25, 25, MASS_IMMOVABLE };
typedef enum DekuBabaDamageEffect {
/* 0x0 */ DEKUBABA_DMGEFF_NONE,
/* 0x1 */ DEKUBABA_DMGEFF_DEKUNUT,
/* 0x2 */ DEKUBABA_DMGEFF_FIRE,
/* 0xE */ DEKUBABA_DMGEFF_BOOMERANG = 14,
/* 0xF */ DEKUBABA_DMGEFF_SWORD
} DekuBabaDamageEffect;
typedef enum DekuBabaDamageReaction {
/* 0x0 */ DEKUBABA_DMG_REACT_NONE,
/* 0x1 */ DEKUBABA_DMG_REACT_DEKUNUT,
/* 0x2 */ DEKUBABA_DMG_REACT_FIRE,
/* 0xE */ DEKUBABA_DMG_REACT_BOOMERANG = 14,
/* 0xF */ DEKUBABA_DMG_REACT_SWORD
} DekuBabaDamageReaction;
static DamageTable sDekuBabaDamageTable = {
/* Deku nut */ DMG_ENTRY(0, DEKUBABA_DMGEFF_DEKUNUT),
/* Deku stick */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Slingshot */ DMG_ENTRY(1, DEKUBABA_DMGEFF_NONE),
/* Explosive */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Boomerang */ DMG_ENTRY(2, DEKUBABA_DMGEFF_BOOMERANG),
/* Normal arrow */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Hammer swing */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Hookshot */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Kokiri sword */ DMG_ENTRY(1, DEKUBABA_DMGEFF_SWORD),
/* Master sword */ DMG_ENTRY(2, DEKUBABA_DMGEFF_SWORD),
/* Giant's Knife */ DMG_ENTRY(4, DEKUBABA_DMGEFF_SWORD),
/* Fire arrow */ DMG_ENTRY(4, DEKUBABA_DMGEFF_FIRE),
/* Ice arrow */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Light arrow */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Unk arrow 1 */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Unk arrow 2 */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Unk arrow 3 */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Fire magic */ DMG_ENTRY(4, DEKUBABA_DMGEFF_FIRE),
/* Ice magic */ DMG_ENTRY(0, DEKUBABA_DMGEFF_NONE),
/* Light magic */ DMG_ENTRY(0, DEKUBABA_DMGEFF_NONE),
/* Shield */ DMG_ENTRY(0, DEKUBABA_DMGEFF_NONE),
/* Mirror Ray */ DMG_ENTRY(0, DEKUBABA_DMGEFF_NONE),
/* Kokiri spin */ DMG_ENTRY(1, DEKUBABA_DMGEFF_SWORD),
/* Giant spin */ DMG_ENTRY(4, DEKUBABA_DMGEFF_SWORD),
/* Master spin */ DMG_ENTRY(2, DEKUBABA_DMGEFF_SWORD),
/* Kokiri jump */ DMG_ENTRY(2, DEKUBABA_DMGEFF_SWORD),
/* Giant jump */ DMG_ENTRY(8, DEKUBABA_DMGEFF_SWORD),
/* Master jump */ DMG_ENTRY(4, DEKUBABA_DMGEFF_SWORD),
/* Unknown 1 */ DMG_ENTRY(0, DEKUBABA_DMGEFF_NONE),
/* Unblockable */ DMG_ENTRY(0, DEKUBABA_DMGEFF_NONE),
/* Hammer jump */ DMG_ENTRY(4, DEKUBABA_DMGEFF_NONE),
/* Unknown 2 */ DMG_ENTRY(0, DEKUBABA_DMGEFF_NONE),
/* Deku nut */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_DEKUNUT),
/* Deku stick */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Slingshot */ DMG_ENTRY(1, DEKUBABA_DMG_REACT_NONE),
/* Explosive */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Boomerang */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_BOOMERANG),
/* Normal arrow */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Hammer swing */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Hookshot */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Kokiri sword */ DMG_ENTRY(1, DEKUBABA_DMG_REACT_SWORD),
/* Master sword */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_SWORD),
/* Giant's Knife */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_SWORD),
/* Fire arrow */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_FIRE),
/* Ice arrow */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Light arrow */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Unk arrow 1 */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Unk arrow 2 */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Unk arrow 3 */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Fire magic */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_FIRE),
/* Ice magic */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Light magic */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Shield */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, DEKUBABA_DMG_REACT_SWORD),
/* Giant spin */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_SWORD),
/* Master spin */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_SWORD),
/* Kokiri jump */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_SWORD),
/* Giant jump */ DMG_ENTRY(8, DEKUBABA_DMG_REACT_SWORD),
/* Master jump */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_SWORD),
/* Unknown 1 */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Unblockable */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_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
// cannot kill.
static DamageTable sBigDekuBabaDamageTable = {
/* Deku nut */ DMG_ENTRY(0, DEKUBABA_DMGEFF_DEKUNUT),
/* Deku stick */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Slingshot */ DMG_ENTRY(1, DEKUBABA_DMGEFF_NONE),
/* Explosive */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Boomerang */ DMG_ENTRY(2, DEKUBABA_DMGEFF_BOOMERANG),
/* Normal arrow */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Hammer swing */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Hookshot */ DMG_ENTRY(0, DEKUBABA_DMGEFF_DEKUNUT),
/* Kokiri sword */ DMG_ENTRY(1, DEKUBABA_DMGEFF_SWORD),
/* Master sword */ DMG_ENTRY(2, DEKUBABA_DMGEFF_SWORD),
/* Giant's Knife */ DMG_ENTRY(4, DEKUBABA_DMGEFF_SWORD),
/* Fire arrow */ DMG_ENTRY(4, DEKUBABA_DMGEFF_FIRE),
/* Ice arrow */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Light arrow */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Unk arrow 1 */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Unk arrow 2 */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Unk arrow 3 */ DMG_ENTRY(2, DEKUBABA_DMGEFF_NONE),
/* Fire magic */ DMG_ENTRY(4, DEKUBABA_DMGEFF_FIRE),
/* Ice magic */ DMG_ENTRY(0, DEKUBABA_DMGEFF_NONE),
/* Light magic */ DMG_ENTRY(0, DEKUBABA_DMGEFF_NONE),
/* Shield */ DMG_ENTRY(0, DEKUBABA_DMGEFF_NONE),
/* Mirror Ray */ DMG_ENTRY(0, DEKUBABA_DMGEFF_NONE),
/* Kokiri spin */ DMG_ENTRY(1, DEKUBABA_DMGEFF_SWORD),
/* Giant spin */ DMG_ENTRY(4, DEKUBABA_DMGEFF_SWORD),
/* Master spin */ DMG_ENTRY(2, DEKUBABA_DMGEFF_SWORD),
/* Kokiri jump */ DMG_ENTRY(2, DEKUBABA_DMGEFF_SWORD),
/* Giant jump */ DMG_ENTRY(8, DEKUBABA_DMGEFF_SWORD),
/* Master jump */ DMG_ENTRY(4, DEKUBABA_DMGEFF_SWORD),
/* Unknown 1 */ DMG_ENTRY(0, DEKUBABA_DMGEFF_NONE),
/* Unblockable */ DMG_ENTRY(0, DEKUBABA_DMGEFF_NONE),
/* Hammer jump */ DMG_ENTRY(4, DEKUBABA_DMGEFF_NONE),
/* Unknown 2 */ DMG_ENTRY(0, DEKUBABA_DMGEFF_NONE),
/* Deku nut */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_DEKUNUT),
/* Deku stick */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Slingshot */ DMG_ENTRY(1, DEKUBABA_DMG_REACT_NONE),
/* Explosive */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Boomerang */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_BOOMERANG),
/* Normal arrow */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Hammer swing */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Hookshot */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_DEKUNUT),
/* Kokiri sword */ DMG_ENTRY(1, DEKUBABA_DMG_REACT_SWORD),
/* Master sword */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_SWORD),
/* Giant's Knife */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_SWORD),
/* Fire arrow */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_FIRE),
/* Ice arrow */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Light arrow */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Unk arrow 1 */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Unk arrow 2 */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Unk arrow 3 */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_NONE),
/* Fire magic */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_FIRE),
/* Ice magic */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Light magic */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Shield */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, DEKUBABA_DMG_REACT_SWORD),
/* Giant spin */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_SWORD),
/* Master spin */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_SWORD),
/* Kokiri jump */ DMG_ENTRY(2, DEKUBABA_DMG_REACT_SWORD),
/* Giant jump */ DMG_ENTRY(8, DEKUBABA_DMG_REACT_SWORD),
/* Master jump */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_SWORD),
/* Unknown 1 */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Unblockable */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(4, DEKUBABA_DMG_REACT_NONE),
/* Unknown 2 */ DMG_ENTRY(0, DEKUBABA_DMG_REACT_NONE),
};
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
// jumpslash can give the Stick drop as adult, and neither will as child.)
if (!LINK_IS_ADULT) {
sBigDekuBabaDamageTable.table[0x1B] = DMG_ENTRY(4, DEKUBABA_DMGEFF_NONE); // DMG_JUMP_MASTER
sBigDekuBabaDamageTable.table[0x1B] = DMG_ENTRY(4, DEKUBABA_DMG_REACT_NONE); // DMG_JUMP_MASTER
}
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sBigDekuBabaDamageTable, &sColChkInfoInit);
@ -272,7 +272,7 @@ void EnDekubaba_Init(Actor* thisx, PlayState* play) {
}
if (!LINK_IS_ADULT) {
sDekuBabaDamageTable.table[0x1B] = DMG_ENTRY(4, DEKUBABA_DMGEFF_NONE); // DMG_JUMP_MASTER
sDekuBabaDamageTable.table[0x1B] = DMG_ENTRY(4, DEKUBABA_DMG_REACT_NONE); // DMG_JUMP_MASTER
}
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDekuBabaDamageTable, &sColChkInfoInit);
@ -1049,14 +1049,15 @@ void EnDekubaba_UpdateDamage(EnDekubaba* this, PlayState* play) {
Actor_SetDropFlagJntSph(&this->actor, &this->collider, true);
if ((this->collider.base.colMaterial != COL_MATERIAL_HARD) &&
((this->actor.colChkInfo.damageEffect != DEKUBABA_DMGEFF_NONE) || (this->actor.colChkInfo.damage != 0))) {
((this->actor.colChkInfo.damageReaction != DEKUBABA_DMG_REACT_NONE) ||
(this->actor.colChkInfo.damage != 0))) {
phi_s0 = this->actor.colChkInfo.health - this->actor.colChkInfo.damage;
if (this->actionFunc != EnDekubaba_StunnedVertical) {
if ((this->actor.colChkInfo.damageEffect == DEKUBABA_DMGEFF_BOOMERANG) ||
(this->actor.colChkInfo.damageEffect == DEKUBABA_DMGEFF_DEKUNUT)) {
if (this->actor.colChkInfo.damageEffect == DEKUBABA_DMGEFF_BOOMERANG) {
if ((this->actor.colChkInfo.damageReaction == DEKUBABA_DMG_REACT_BOOMERANG) ||
(this->actor.colChkInfo.damageReaction == DEKUBABA_DMG_REACT_DEKUNUT)) {
if (this->actor.colChkInfo.damageReaction == DEKUBABA_DMG_REACT_BOOMERANG) {
phi_s0 = this->actor.colChkInfo.health;
}
@ -1070,14 +1071,14 @@ void EnDekubaba_UpdateDamage(EnDekubaba* this, PlayState* play) {
} else {
EnDekubaba_SetupHit(this, 0);
}
} else if ((this->actor.colChkInfo.damageEffect == DEKUBABA_DMGEFF_BOOMERANG) ||
(this->actor.colChkInfo.damageEffect == DEKUBABA_DMGEFF_SWORD)) {
} else if ((this->actor.colChkInfo.damageReaction == DEKUBABA_DMG_REACT_BOOMERANG) ||
(this->actor.colChkInfo.damageReaction == DEKUBABA_DMG_REACT_SWORD)) {
if (phi_s0 > 0) {
EnDekubaba_SetupSway(this);
} else {
EnDekubaba_SetupPrunedSomersault(this);
}
} else if (this->actor.colChkInfo.damageEffect != DEKUBABA_DMGEFF_DEKUNUT) {
} else if (this->actor.colChkInfo.damageReaction != DEKUBABA_DMG_REACT_DEKUNUT) {
EnDekubaba_SetupHit(this, 0);
} else {
return;
@ -1085,7 +1086,7 @@ void EnDekubaba_UpdateDamage(EnDekubaba* this, PlayState* play) {
this->actor.colChkInfo.health = CLAMP_MIN(phi_s0, 0);
if (this->actor.colChkInfo.damageEffect == DEKUBABA_DMGEFF_FIRE) {
if (this->actor.colChkInfo.damageReaction == DEKUBABA_DMG_REACT_FIRE) {
firePos = &this->actor.world.pos;
fireScale = (this->size * 70.0f);

View File

@ -456,9 +456,9 @@ void EnDekunuts_ColliderCheck(EnDekunuts* this, PlayState* play) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if (this->actor.colChkInfo.mass == 50) {
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->actor.colChkInfo.damageEffect != 1) {
if (this->actor.colChkInfo.damageEffect == 2) {
if ((this->actor.colChkInfo.damageReaction != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->actor.colChkInfo.damageReaction != 1) {
if (this->actor.colChkInfo.damageReaction == 2) {
EffectSsFCircle_Spawn(play, &this->actor, &this->actor.world.pos, 40, 50);
}
EnDekunuts_SetupBeDamaged(this);

View File

@ -507,7 +507,7 @@ void EnDh_CollisionCheck(EnDh* this, PlayState* play) {
if ((this->colliderJntSph.base.acFlags & AC_HIT) && !this->retreat) {
this->colliderJntSph.base.acFlags &= ~AC_HIT;
if ((this->actor.colChkInfo.damageEffect != 0) && (this->actor.colChkInfo.damageEffect != 6)) {
if ((this->actor.colChkInfo.damageReaction != 0) && (this->actor.colChkInfo.damageReaction != 6)) {
this->colliderJntSph.base.atFlags = this->colliderJntSph.elements[0].base.atElemFlags =
AT_NONE; // also ATELEM_NONE
this->colliderJntSph.elements[0].base.atDmgInfo.dmgFlags =

View File

@ -409,7 +409,7 @@ void EnDha_UpdateHealth(EnDha* this, PlayState* play) {
if (!((this->unk_1C0 >= 8) || !(this->collider.base.acFlags & AC_HIT))) {
this->collider.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageEffect == 0 || this->actor.colChkInfo.damageEffect == 6) {
if (this->actor.colChkInfo.damageReaction == 0 || this->actor.colChkInfo.damageReaction == 6) {
return;
} else {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 8);

View File

@ -360,14 +360,14 @@ s32 EnDodojr_CheckDamaged(EnDodojr* this, PlayState* play) {
this->actor.shape.shadowDraw = ActorShadow_DrawCircle;
}
if ((this->actor.colChkInfo.damageEffect == 0) && (this->actor.colChkInfo.damage != 0)) {
if ((this->actor.colChkInfo.damageReaction == 0) && (this->actor.colChkInfo.damage != 0)) {
Enemy_StartFinishingBlow(play, &this->actor);
this->freezeFrameTimer = 2;
this->actionFunc = EnDodojr_WaitFreezeFrames;
return true;
}
if ((this->actor.colChkInfo.damageEffect == 1) && (this->actionFunc != EnDodojr_Stunned) &&
if ((this->actor.colChkInfo.damageReaction == 1) && (this->actionFunc != EnDodojr_Stunned) &&
(this->actionFunc != EnDodojr_StunnedBounce)) {
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
this->stunTimer = 120;

View File

@ -415,7 +415,7 @@ void EnDodongo_SetupStunned(EnDodongo* this) {
Animation_Change(&this->skelAnime, &gDodongoBreatheFireAnim, 0.0f, 25.0f, 0.0f, ANIMMODE_ONCE, -4.0f);
this->actionState = DODONGO_STUNNED;
this->actor.speed = 0.0f;
if (this->damageEffect == 0xF) {
if (this->damageReaction == 0xF) {
this->iceTimer = 36;
}
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
@ -733,9 +733,9 @@ void EnDodongo_CollisionCheck(EnDodongo* this, PlayState* play) {
} else if ((this->bodyCollider.base.acFlags & AC_HIT) && (this->actionState > DODONGO_DEATH)) {
this->bodyCollider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlagJntSph(&this->actor, &this->bodyCollider, false);
if (this->actor.colChkInfo.damageEffect != 0xE) {
this->damageEffect = this->actor.colChkInfo.damageEffect;
if ((this->actor.colChkInfo.damageEffect == 1) || (this->actor.colChkInfo.damageEffect == 0xF)) {
if (this->actor.colChkInfo.damageReaction != 0xE) {
this->damageReaction = this->actor.colChkInfo.damageReaction;
if ((this->actor.colChkInfo.damageReaction == 1) || (this->actor.colChkInfo.damageReaction == 0xF)) {
if (this->actionState != DODONGO_STUNNED) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 80);
Actor_ApplyDamage(&this->actor);
@ -783,7 +783,7 @@ void EnDodongo_Update(Actor* thisx, PlayState* play) {
EnDodongo* this = (EnDodongo*)thisx;
EnDodongo_CollisionCheck(this, play);
if (this->actor.colChkInfo.damageEffect != 0xE) {
if (this->actor.colChkInfo.damageReaction != 0xE) {
this->actionFunc(this, play);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 75.0f, 60.0f, 70.0f,

View File

@ -30,7 +30,7 @@ typedef struct EnDodongo {
/* 0x0358 */ Vec3f icePos[9];
/* 0x03C4 */ Color_RGBA8 bombSmokePrimColor;
/* 0x03C8 */ Color_RGBA8 bombSmokeEnvColor;
/* 0x03CC */ u8 damageEffect;
/* 0x03CC */ u8 damageReaction;
/* 0x03D0 */ s32 blureIdx;
/* 0x03D4 */ ColliderQuad colliderAT;
/* 0x0454 */ ColliderTris colliderHard;

View File

@ -616,7 +616,7 @@ void EnEiyer_UpdateDamage(EnEiyer* this, PlayState* play) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if (this->actor.colChkInfo.damageEffect != 0 || this->actor.colChkInfo.damage != 0) {
if (this->actor.colChkInfo.damageReaction != 0 || this->actor.colChkInfo.damage != 0) {
if (Actor_ApplyDamage(&this->actor) == 0) {
Enemy_StartFinishingBlow(play, &this->actor);
Actor_PlaySfx(&this->actor, NA_SE_EN_EIER_DEAD);
@ -630,7 +630,7 @@ void EnEiyer_UpdateDamage(EnEiyer* this, PlayState* play) {
} else {
EnEiyer_SetupDie(this);
}
} else if (this->actor.colChkInfo.damageEffect == 1) {
} else if (this->actor.colChkInfo.damageReaction == 1) {
if (this->actionFunc != EnEiyer_Stunned) {
EnEiyer_SetupStunned(this);
}

View File

@ -637,21 +637,21 @@ void EnFirefly_Combust(EnFirefly* this, PlayState* play) {
}
void EnFirefly_UpdateDamage(EnFirefly* this, PlayState* play) {
u8 damageEffect;
u8 damageReaction;
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.elements[0].base, true);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if ((this->actor.colChkInfo.damageReaction != 0) || (this->actor.colChkInfo.damage != 0)) {
if (Actor_ApplyDamage(&this->actor) == 0) {
Enemy_StartFinishingBlow(play, &this->actor);
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
}
damageEffect = this->actor.colChkInfo.damageEffect;
damageReaction = this->actor.colChkInfo.damageReaction;
if (damageEffect == 2) { // Din's Fire
if (damageReaction == 2) { // Din's Fire
if (this->actor.params == KEESE_ICE_FLY) {
this->actor.colChkInfo.health = 0;
Enemy_StartFinishingBlow(play, &this->actor);
@ -663,18 +663,18 @@ void EnFirefly_UpdateDamage(EnFirefly* this, PlayState* play) {
EnFirefly_SetupFlyIdle(this);
}
}
} else if (damageEffect == 3) { // Ice Arrows or Ice Magic
} else if (damageReaction == 3) { // Ice Arrows or Ice Magic
if (this->actor.params == KEESE_ICE_FLY) {
EnFirefly_SetupFall(this);
} else {
EnFirefly_SetupFrozenFall(this, play);
}
} else if (damageEffect == 1) { // Deku Nuts
} else if (damageReaction == 1) { // Deku Nuts
if (this->actionFunc != EnFirefly_Stunned) {
EnFirefly_SetupStunned(this);
}
} else { // Fire Arrows
if ((damageEffect == 0xF) && (this->actor.params == KEESE_ICE_FLY)) {
if ((damageReaction == 0xF) && (this->actor.params == KEESE_ICE_FLY)) {
EnFirefly_Combust(this, play);
}
EnFirefly_SetupFall(this);

View File

@ -423,7 +423,7 @@ void EnFloormas_SetupRecover(EnFloormas* this) {
void EnFloormas_SetupFreeze(EnFloormas* this) {
Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 1.5f, 0, 20.0f, ANIMMODE_ONCE, -3.0f);
this->actor.speed = 0.0f;
if (this->actor.colChkInfo.damageEffect == 4) {
if (this->actor.colChkInfo.damageReaction == 4) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_GRAY, 255, COLORFILTER_BUFFLAG_OPA, 80);
} else {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 80);
@ -992,7 +992,7 @@ void EnFloormas_ColliderCheck(EnFloormas* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if ((this->actor.colChkInfo.damageReaction != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->collider.base.colMaterial != COL_MATERIAL_HARD) {
isSmall = false;
if (this->actor.scale.x < 0.01f) {
@ -1000,7 +1000,7 @@ void EnFloormas_ColliderCheck(EnFloormas* this, PlayState* play) {
}
if (isSmall && this->collider.elem.acHitElem->atDmgInfo.dmgFlags & DMG_HOOKSHOT) {
this->actor.colChkInfo.damage = 2;
this->actor.colChkInfo.damageEffect = 0;
this->actor.colChkInfo.damageReaction = 0;
}
if (Actor_ApplyDamage(&this->actor) == 0) {
if (isSmall) {
@ -1014,12 +1014,12 @@ void EnFloormas_ColliderCheck(EnFloormas* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_FALL_DAMAGE);
}
if ((this->actor.colChkInfo.damageEffect == 4) || (this->actor.colChkInfo.damageEffect == 1)) {
if ((this->actor.colChkInfo.damageReaction == 4) || (this->actor.colChkInfo.damageReaction == 1)) {
if (this->actionFunc != EnFloormas_Freeze) {
EnFloormas_SetupFreeze(this);
}
} else {
if (this->actor.colChkInfo.damageEffect == 2) {
if (this->actor.colChkInfo.damageReaction == 2) {
EffectSsFCircle_Spawn(play, &this->actor, &this->actor.world.pos, this->actor.scale.x * 4000.0f,
this->actor.scale.x * 4000.0f);
}

View File

@ -356,7 +356,7 @@ void EnFz_ApplyDamage(EnFz* this, PlayState* play) {
this->collider1.base.acFlags &= ~AC_HIT;
} else if (this->collider1.base.acFlags & AC_HIT) {
this->collider1.base.acFlags &= ~AC_HIT;
switch (this->actor.colChkInfo.damageEffect) {
switch (this->actor.colChkInfo.damageReaction) {
case 0xF:
Actor_ApplyDamage(&this->actor);
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_XLU, 8);

View File

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

View File

@ -48,7 +48,7 @@ typedef struct EnGeldB {
/* 0x02F8 */ s16 unkTimer;
/* 0x02FA */ s16 lookTimer;
/* 0x02FC */ s16 iceTimer;
/* 0x02FE */ u8 damageEffect;
/* 0x02FE */ u8 damageReaction;
/* 0x0300 */ s32 timer;
/* 0x0304 */ f32 approachRate;
/* 0x0308 */ char unk_308[4];

View File

@ -544,7 +544,7 @@ void EnGs_Update(Actor* thisx, PlayState* play2) {
this->unk_19F = 0;
this->collider.base.acFlags &= ~AC_HIT;
switch (this->actor.colChkInfo.damageEffect) {
switch (this->actor.colChkInfo.damageReaction) {
case 15:
this->unk_19E |= 1;
func_80A4F77C(this);

View File

@ -52,13 +52,13 @@ typedef enum EnIkCsDrawMode {
/* 0x02 */ IK_CS_DRAW_DEFEAT
} EnIkCsDrawMode;
typedef enum EnIkDamageEffect {
/* 0x0 */ EN_IK_DMGEFF_NONE,
/* 0x6 */ EN_IK_DMGEFF_ELEMENTAL_MAGIC = 0x6,
/* 0xD */ EN_IK_DMGEFF_SPARKS_NO_DMG = 0xD,
/* 0xE */ EN_IK_DMGEFF_PROJECTILE,
/* 0xF */ EN_IK_DMGEFF_DAMAGE
} EnIkDamageEffect;
typedef enum EnIkDamageReaction {
/* 0x0 */ EN_IK_DMG_REACT_NONE,
/* 0x6 */ EN_IK_DMG_REACT_ELEMENTAL_MAGIC = 0x6,
/* 0xD */ EN_IK_DMG_REACT_SPARKS_NO_DMG = 0xD,
/* 0xE */ EN_IK_DMG_REACT_PROJECTILE,
/* 0xF */ EN_IK_DMG_REACT_DAMAGE
} EnIkDamageReaction;
void EnIk_UpdateEnemy(Actor* thisx, PlayState* play);
void EnIk_DrawEnemy(Actor* thisx, PlayState* play);
@ -166,38 +166,38 @@ static ColliderQuadInit sQuadInit = {
};
static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, EN_IK_DMGEFF_SPARKS_NO_DMG),
/* Deku stick */ DMG_ENTRY(2, EN_IK_DMGEFF_DAMAGE),
/* Slingshot */ DMG_ENTRY(1, EN_IK_DMGEFF_PROJECTILE),
/* Explosive */ DMG_ENTRY(2, EN_IK_DMGEFF_DAMAGE),
/* Boomerang */ DMG_ENTRY(0, EN_IK_DMGEFF_SPARKS_NO_DMG),
/* Normal arrow */ DMG_ENTRY(2, EN_IK_DMGEFF_PROJECTILE),
/* Hammer swing */ DMG_ENTRY(2, EN_IK_DMGEFF_DAMAGE),
/* Hookshot */ DMG_ENTRY(0, EN_IK_DMGEFF_SPARKS_NO_DMG),
/* Kokiri sword */ DMG_ENTRY(1, EN_IK_DMGEFF_DAMAGE),
/* Master sword */ DMG_ENTRY(2, EN_IK_DMGEFF_DAMAGE),
/* Giant's Knife */ DMG_ENTRY(4, EN_IK_DMGEFF_DAMAGE),
/* Fire arrow */ DMG_ENTRY(2, EN_IK_DMGEFF_PROJECTILE),
/* Ice arrow */ DMG_ENTRY(2, EN_IK_DMGEFF_PROJECTILE),
/* Light arrow */ DMG_ENTRY(2, EN_IK_DMGEFF_PROJECTILE),
/* Unk arrow 1 */ DMG_ENTRY(2, EN_IK_DMGEFF_PROJECTILE),
/* Unk arrow 2 */ DMG_ENTRY(2, EN_IK_DMGEFF_PROJECTILE),
/* Unk arrow 3 */ DMG_ENTRY(15, EN_IK_DMGEFF_PROJECTILE),
/* Fire magic */ DMG_ENTRY(0, EN_IK_DMGEFF_ELEMENTAL_MAGIC),
/* Ice magic */ DMG_ENTRY(0, EN_IK_DMGEFF_ELEMENTAL_MAGIC),
/* Light magic */ DMG_ENTRY(0, EN_IK_DMGEFF_ELEMENTAL_MAGIC),
/* Shield */ DMG_ENTRY(0, EN_IK_DMGEFF_NONE),
/* Mirror Ray */ DMG_ENTRY(0, EN_IK_DMGEFF_NONE),
/* Kokiri spin */ DMG_ENTRY(1, EN_IK_DMGEFF_DAMAGE),
/* Giant spin */ DMG_ENTRY(4, EN_IK_DMGEFF_DAMAGE),
/* Master spin */ DMG_ENTRY(2, EN_IK_DMGEFF_DAMAGE),
/* Kokiri jump */ DMG_ENTRY(2, EN_IK_DMGEFF_DAMAGE),
/* Giant jump */ DMG_ENTRY(8, EN_IK_DMGEFF_DAMAGE),
/* Master jump */ DMG_ENTRY(4, EN_IK_DMGEFF_DAMAGE),
/* Unknown 1 */ DMG_ENTRY(10, EN_IK_DMGEFF_DAMAGE),
/* Unblockable */ DMG_ENTRY(0, EN_IK_DMGEFF_NONE),
/* Hammer jump */ DMG_ENTRY(4, EN_IK_DMGEFF_DAMAGE),
/* Unknown 2 */ DMG_ENTRY(0, EN_IK_DMGEFF_NONE),
/* Deku nut */ DMG_ENTRY(0, EN_IK_DMG_REACT_SPARKS_NO_DMG),
/* Deku stick */ DMG_ENTRY(2, EN_IK_DMG_REACT_DAMAGE),
/* Slingshot */ DMG_ENTRY(1, EN_IK_DMG_REACT_PROJECTILE),
/* Explosive */ DMG_ENTRY(2, EN_IK_DMG_REACT_DAMAGE),
/* Boomerang */ DMG_ENTRY(0, EN_IK_DMG_REACT_SPARKS_NO_DMG),
/* Normal arrow */ DMG_ENTRY(2, EN_IK_DMG_REACT_PROJECTILE),
/* Hammer swing */ DMG_ENTRY(2, EN_IK_DMG_REACT_DAMAGE),
/* Hookshot */ DMG_ENTRY(0, EN_IK_DMG_REACT_SPARKS_NO_DMG),
/* Kokiri sword */ DMG_ENTRY(1, EN_IK_DMG_REACT_DAMAGE),
/* Master sword */ DMG_ENTRY(2, EN_IK_DMG_REACT_DAMAGE),
/* Giant's Knife */ DMG_ENTRY(4, EN_IK_DMG_REACT_DAMAGE),
/* Fire arrow */ DMG_ENTRY(2, EN_IK_DMG_REACT_PROJECTILE),
/* Ice arrow */ DMG_ENTRY(2, EN_IK_DMG_REACT_PROJECTILE),
/* Light arrow */ DMG_ENTRY(2, EN_IK_DMG_REACT_PROJECTILE),
/* Unk arrow 1 */ DMG_ENTRY(2, EN_IK_DMG_REACT_PROJECTILE),
/* Unk arrow 2 */ DMG_ENTRY(2, EN_IK_DMG_REACT_PROJECTILE),
/* Unk arrow 3 */ DMG_ENTRY(15, EN_IK_DMG_REACT_PROJECTILE),
/* Fire magic */ DMG_ENTRY(0, EN_IK_DMG_REACT_ELEMENTAL_MAGIC),
/* Ice magic */ DMG_ENTRY(0, EN_IK_DMG_REACT_ELEMENTAL_MAGIC),
/* Light magic */ DMG_ENTRY(0, EN_IK_DMG_REACT_ELEMENTAL_MAGIC),
/* Shield */ DMG_ENTRY(0, EN_IK_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, EN_IK_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, EN_IK_DMG_REACT_DAMAGE),
/* Giant spin */ DMG_ENTRY(4, EN_IK_DMG_REACT_DAMAGE),
/* Master spin */ DMG_ENTRY(2, EN_IK_DMG_REACT_DAMAGE),
/* Kokiri jump */ DMG_ENTRY(2, EN_IK_DMG_REACT_DAMAGE),
/* Giant jump */ DMG_ENTRY(8, EN_IK_DMG_REACT_DAMAGE),
/* Master jump */ DMG_ENTRY(4, EN_IK_DMG_REACT_DAMAGE),
/* Unknown 1 */ DMG_ENTRY(10, EN_IK_DMG_REACT_DAMAGE),
/* Unblockable */ DMG_ENTRY(0, EN_IK_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(4, EN_IK_DMG_REACT_DAMAGE),
/* Unknown 2 */ DMG_ENTRY(0, EN_IK_DMG_REACT_NONE),
};
void EnIk_Destroy(Actor* thisx, PlayState* play) {
@ -747,19 +747,19 @@ void EnIk_UpdateDamage(EnIk* this, PlayState* play) {
} else if (this->bodyCollider.base.acFlags & AC_HIT) {
s16 pad;
u8 prevHealth;
s32 damageEffect;
s32 damageReaction;
Vec3f sparksPos = this->actor.world.pos;
sparksPos.y += 50.0f;
Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, true);
this->damageEffect = this->actor.colChkInfo.damageEffect;
this->damageReaction = this->actor.colChkInfo.damageReaction;
this->bodyCollider.base.acFlags &= ~AC_HIT;
if ((this->damageEffect == EN_IK_DMGEFF_NONE) || (this->damageEffect == EN_IK_DMGEFF_SPARKS_NO_DMG) ||
((this->armorStatusFlag == 0) && (this->damageEffect == EN_IK_DMGEFF_PROJECTILE))) {
if (this->damageEffect != EN_IK_DMGEFF_NONE) {
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_REACT_PROJECTILE))) {
if (this->damageReaction != EN_IK_DMG_REACT_NONE) {
// spawn sparks and don't damage
CollisionCheck_SpawnShieldParticlesMetal(play, &sparksPos);
}

View File

@ -99,7 +99,7 @@ typedef struct EnIk {
/* 0x02FA */ u8 drawArmorFlag;
/* 0x02FB */ u8 armorStatusFlag;
/* 0x02FC */ u8 isBreakingProp;
/* 0x02FD */ u8 damageEffect;
/* 0x02FD */ u8 damageReaction;
/* 0x02FE */ s8 unk_2FE;
/* 0x02FF */ s8 unk_2FF;
/* 0x0300 */ s16 unk_300;

View File

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

View File

@ -23,7 +23,7 @@ typedef enum EnMbState {
typedef struct EnMb {
/* 0x0000 */ Actor actor;
/* 0x014C */ Vec3s bodyPartsPos[10];
/* 0x0188 */ u8 damageEffect;
/* 0x0188 */ u8 damageReaction;
/* 0x018C */ SkelAnime skelAnime;
/* 0x01D0 */ Vec3s jointTable[28];
/* 0x0278 */ Vec3s morphTable[28];

View File

@ -323,7 +323,7 @@ s32 EnNy_CollisionCheck(EnNy* this, PlayState* play) {
effectPos.y = this->collider.elements[0].base.acDmgInfo.hitPos.y;
effectPos.z = this->collider.elements[0].base.acDmgInfo.hitPos.z;
if ((this->unk_1E0 == 0.25f) && (this->unk_1D4 == 0xFF)) {
switch (this->actor.colChkInfo.damageEffect) {
switch (this->actor.colChkInfo.damageReaction) {
case 0xE:
sp3F = 1;
FALLTHROUGH;

View File

@ -570,11 +570,11 @@ void EnOkuta_ColliderCheck(EnOkuta* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if ((this->actor.colChkInfo.damageReaction != 0) || (this->actor.colChkInfo.damage != 0)) {
Enemy_StartFinishingBlow(play, &this->actor);
this->actor.colChkInfo.health = 0;
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
if (this->actor.colChkInfo.damageEffect == 3) {
if (this->actor.colChkInfo.damageReaction == 3) {
EnOkuta_SetupFreeze(this);
} else {
EnOkuta_SetupWaitToDie(this);

View File

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

View File

@ -744,7 +744,7 @@ void EnPoField_SoulInteract(EnPoField* this, PlayState* play) {
void EnPoField_TestForDamage(EnPoField* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageEffect != 0 || this->actor.colChkInfo.damage != 0) {
if (this->actor.colChkInfo.damageReaction != 0 || this->actor.colChkInfo.damage != 0) {
if (Actor_ApplyDamage(&this->actor) == 0) {
Enemy_StartFinishingBlow(play, &this->actor);
Actor_PlaySfx(&this->actor, NA_SE_EN_PO_DEAD);

View File

@ -1166,15 +1166,15 @@ void func_80ADC10C(EnPoSisters* this, PlayState* play) {
Item_DropCollectible(play, &sp24, ITEM00_ARROWS_SMALL);
}
} else if (this->collider.base.colMaterial == COL_MATERIAL_METAL ||
(this->actor.colChkInfo.damageEffect == 0 && this->actor.colChkInfo.damage == 0)) {
(this->actor.colChkInfo.damageReaction == 0 && this->actor.colChkInfo.damage == 0)) {
if (this->unk_194 == 0) {
this->actor.freezeTimer = 0;
}
} else if (this->actor.colChkInfo.damageEffect == 0xF) {
} else if (this->actor.colChkInfo.damageReaction == 0xF) {
this->actor.world.rot.y = this->actor.shape.rot.y;
this->unk_199 |= 2;
func_80AD98F4(this, play);
} else if (this->unk_194 == 0 && this->actor.colChkInfo.damageEffect == 0xE &&
} else if (this->unk_194 == 0 && this->actor.colChkInfo.damageReaction == 0xE &&
this->actionFunc == func_80ADB770) {
if (this->unk_19C == 0) {
this->unk_19C = -45;

View File

@ -880,7 +880,7 @@ void EnPoh_TalkComposer(EnPoh* this, PlayState* play) {
void func_80AE032C(EnPoh* this, PlayState* play) {
if (this->colliderCylinder.base.acFlags & AC_HIT) {
this->colliderCylinder.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageEffect != 0 || this->actor.colChkInfo.damage != 0) {
if (this->actor.colChkInfo.damageReaction != 0 || this->actor.colChkInfo.damage != 0) {
if (Actor_ApplyDamage(&this->actor) == 0) {
Enemy_StartFinishingBlow(play, &this->actor);
Actor_PlaySfx(&this->actor, NA_SE_EN_PO_DEAD);

View File

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

View File

@ -71,7 +71,7 @@ typedef struct EnRd {
/* 0x0319 */ u8 grabDamageTimer;
/* 0x031A */ u8 fireTimer;
/* 0x031B */ u8 action;
/* 0x031C */ u8 damageEffect;
/* 0x031C */ u8 damageReaction;
/* 0x031D */ u8 unk_31D; // related to player->unk_845
/* 0x0320 */ ColliderCylinder collider;
} EnRd; // size = 0x036C

View File

@ -49,49 +49,49 @@ void EnReeba_Die(EnReeba* this, PlayState* play);
void EnReeba_Stunned(EnReeba* this, PlayState* play);
void EnReeba_StunDie(EnReeba* this, PlayState* play);
typedef enum LeeverDamageEffect {
/* 0x00 */ LEEVER_DMGEFF_NONE, // used by anything that cant kill the Leever
/* 0x01 */ LEEVER_DMGEFF_UNK, // used by "unknown 1" attack
/* 0x03 */ LEEVER_DMGEFF_ICE = 3,
/* 0x0B */ LEEVER_DMGEFF_UNUSED = 11, // not used in the damage table, but still checked for.
/* 0x0C */ LEEVER_DMGEFF_BOOMERANG,
/* 0x0D */ LEEVER_DMGEFF_HOOKSHOT,
/* 0x0E */ LEEVER_DMGEFF_OTHER
} LeeverDamageEffect;
typedef enum LeeverDamageReaction {
/* 0x00 */ LEEVER_DMG_REACT_NONE, // used by anything that cant kill the Leever
/* 0x01 */ LEEVER_DMG_REACT_UNK, // used by "unknown 1" attack
/* 0x03 */ LEEVER_DMG_REACT_ICE = 3,
/* 0x0B */ LEEVER_DMG_REACT_UNUSED = 11, // not used in the damage table, but still checked for.
/* 0x0C */ LEEVER_DMG_REACT_BOOMERANG,
/* 0x0D */ LEEVER_DMG_REACT_HOOKSHOT,
/* 0x0E */ LEEVER_DMG_REACT_OTHER
} LeeverDamageReaction;
static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, LEEVER_DMGEFF_NONE),
/* Deku stick */ DMG_ENTRY(2, LEEVER_DMGEFF_OTHER),
/* Slingshot */ DMG_ENTRY(1, LEEVER_DMGEFF_OTHER),
/* Explosive */ DMG_ENTRY(2, LEEVER_DMGEFF_OTHER),
/* Boomerang */ DMG_ENTRY(1, LEEVER_DMGEFF_BOOMERANG),
/* Normal arrow */ DMG_ENTRY(2, LEEVER_DMGEFF_OTHER),
/* Hammer swing */ DMG_ENTRY(2, LEEVER_DMGEFF_OTHER),
/* Hookshot */ DMG_ENTRY(2, LEEVER_DMGEFF_HOOKSHOT),
/* Kokiri sword */ DMG_ENTRY(1, LEEVER_DMGEFF_OTHER),
/* Master sword */ DMG_ENTRY(4, LEEVER_DMGEFF_OTHER),
/* Giant's Knife */ DMG_ENTRY(6, LEEVER_DMGEFF_OTHER),
/* Fire arrow */ DMG_ENTRY(2, LEEVER_DMGEFF_OTHER),
/* Ice arrow */ DMG_ENTRY(4, LEEVER_DMGEFF_ICE),
/* Light arrow */ DMG_ENTRY(2, LEEVER_DMGEFF_OTHER),
/* Unk arrow 1 */ DMG_ENTRY(2, LEEVER_DMGEFF_OTHER),
/* Unk arrow 2 */ DMG_ENTRY(2, LEEVER_DMGEFF_OTHER),
/* Unk arrow 3 */ DMG_ENTRY(2, LEEVER_DMGEFF_OTHER),
/* Fire magic */ DMG_ENTRY(0, LEEVER_DMGEFF_NONE),
/* Ice magic */ DMG_ENTRY(4, LEEVER_DMGEFF_ICE),
/* Light magic */ DMG_ENTRY(0, LEEVER_DMGEFF_NONE),
/* Shield */ DMG_ENTRY(0, LEEVER_DMGEFF_NONE),
/* Mirror Ray */ DMG_ENTRY(0, LEEVER_DMGEFF_NONE),
/* Kokiri spin */ DMG_ENTRY(2, LEEVER_DMGEFF_OTHER),
/* Giant spin */ DMG_ENTRY(8, LEEVER_DMGEFF_OTHER),
/* Master spin */ DMG_ENTRY(4, LEEVER_DMGEFF_OTHER),
/* Kokiri jump */ DMG_ENTRY(2, LEEVER_DMGEFF_OTHER),
/* Giant jump */ DMG_ENTRY(8, LEEVER_DMGEFF_OTHER),
/* Master jump */ DMG_ENTRY(4, LEEVER_DMGEFF_OTHER),
/* Unknown 1 */ DMG_ENTRY(0, LEEVER_DMGEFF_UNK),
/* Unblockable */ DMG_ENTRY(0, LEEVER_DMGEFF_NONE),
/* Hammer jump */ DMG_ENTRY(0, LEEVER_DMGEFF_NONE),
/* Unknown 2 */ DMG_ENTRY(0, LEEVER_DMGEFF_NONE),
/* Deku nut */ DMG_ENTRY(0, LEEVER_DMG_REACT_NONE),
/* Deku stick */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Slingshot */ DMG_ENTRY(1, LEEVER_DMG_REACT_OTHER),
/* Explosive */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Boomerang */ DMG_ENTRY(1, LEEVER_DMG_REACT_BOOMERANG),
/* Normal arrow */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Hammer swing */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Hookshot */ DMG_ENTRY(2, LEEVER_DMG_REACT_HOOKSHOT),
/* Kokiri sword */ DMG_ENTRY(1, LEEVER_DMG_REACT_OTHER),
/* Master sword */ DMG_ENTRY(4, LEEVER_DMG_REACT_OTHER),
/* Giant's Knife */ DMG_ENTRY(6, LEEVER_DMG_REACT_OTHER),
/* Fire arrow */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Ice arrow */ DMG_ENTRY(4, LEEVER_DMG_REACT_ICE),
/* Light arrow */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Unk arrow 1 */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Unk arrow 2 */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Unk arrow 3 */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Fire magic */ DMG_ENTRY(0, LEEVER_DMG_REACT_NONE),
/* Ice magic */ DMG_ENTRY(4, LEEVER_DMG_REACT_ICE),
/* Light magic */ DMG_ENTRY(0, LEEVER_DMG_REACT_NONE),
/* Shield */ DMG_ENTRY(0, LEEVER_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, LEEVER_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Giant spin */ DMG_ENTRY(8, LEEVER_DMG_REACT_OTHER),
/* Master spin */ DMG_ENTRY(4, LEEVER_DMG_REACT_OTHER),
/* Kokiri jump */ DMG_ENTRY(2, LEEVER_DMG_REACT_OTHER),
/* Giant jump */ DMG_ENTRY(8, LEEVER_DMG_REACT_OTHER),
/* Master jump */ DMG_ENTRY(4, LEEVER_DMG_REACT_OTHER),
/* Unknown 1 */ DMG_ENTRY(0, LEEVER_DMG_REACT_UNK),
/* Unblockable */ DMG_ENTRY(0, LEEVER_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(0, LEEVER_DMG_REACT_NONE),
/* Unknown 2 */ DMG_ENTRY(0, LEEVER_DMG_REACT_NONE),
};
ActorProfile En_Reeba_Profile = {
@ -557,9 +557,9 @@ void EnReeba_CheckDamage(EnReeba* this, PlayState* play) {
this->actor.shape.rot.x = this->actor.shape.rot.z = 0;
this->stunType = LEEVER_STUN_NONE;
switch (this->actor.colChkInfo.damageEffect) {
case LEEVER_DMGEFF_UNUSED:
case LEEVER_DMGEFF_BOOMERANG:
switch (this->actor.colChkInfo.damageReaction) {
case LEEVER_DMG_REACT_UNUSED:
case LEEVER_DMG_REACT_BOOMERANG:
if ((this->actor.colChkInfo.health > 1) && (this->stunType != LEEVER_STUN_OTHER)) {
this->stunType = LEEVER_STUN_OTHER;
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
@ -569,7 +569,7 @@ void EnReeba_CheckDamage(EnReeba* this, PlayState* play) {
break;
}
FALLTHROUGH;
case LEEVER_DMGEFF_HOOKSHOT:
case LEEVER_DMG_REACT_HOOKSHOT:
if ((this->actor.colChkInfo.health > 2) && (this->stunType != LEEVER_STUN_OTHER)) {
this->stunType = LEEVER_STUN_OTHER;
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA,
@ -579,7 +579,7 @@ void EnReeba_CheckDamage(EnReeba* this, PlayState* play) {
break;
}
FALLTHROUGH;
case LEEVER_DMGEFF_OTHER:
case LEEVER_DMG_REACT_OTHER:
this->unkDamageField = 6;
Actor_ApplyDamage(&this->actor);
if (this->actor.colChkInfo.health == 0) {
@ -595,7 +595,7 @@ void EnReeba_CheckDamage(EnReeba* this, PlayState* play) {
}
break;
case LEEVER_DMGEFF_ICE:
case LEEVER_DMG_REACT_ICE:
Actor_ApplyDamage(&this->actor);
this->unkDamageField = 2;
this->stunType = LEEVER_STUN_ICE;
@ -603,7 +603,7 @@ void EnReeba_CheckDamage(EnReeba* this, PlayState* play) {
this->actionfunc = EnReeba_SetupStunned;
break;
case LEEVER_DMGEFF_UNK:
case LEEVER_DMG_REACT_UNK:
if (this->stunType != LEEVER_STUN_OTHER) {
this->stunType = LEEVER_STUN_OTHER;
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA,

View File

@ -45,18 +45,18 @@ typedef enum EnRrReachState {
/* 5 */ REACH_CLOSE
} EnRrReachState;
typedef enum EnRrDamageEffect {
/* 0x0 */ RR_DMG_NONE,
/* 0x1 */ RR_DMG_STUN,
/* 0x2 */ RR_DMG_FIRE,
/* 0x3 */ RR_DMG_ICE,
/* 0x4 */ RR_DMG_LIGHT_MAGIC,
/* 0xB */ RR_DMG_LIGHT_ARROW = 11,
/* 0xC */ RR_DMG_SHDW_ARROW,
/* 0xD */ RR_DMG_WIND_ARROW,
/* 0xE */ RR_DMG_SPRT_ARROW,
/* 0xF */ RR_DMG_NORMAL
} EnRrDamageEffect;
typedef enum EnRrDamageReaction {
/* 0x0 */ RR_DMG_REACT_NONE,
/* 0x1 */ RR_DMG_REACT_STUN,
/* 0x2 */ RR_DMG_REACT_FIRE,
/* 0x3 */ RR_DMG_REACT_ICE,
/* 0x4 */ RR_DMG_REACT_LIGHT_MAGIC,
/* 0xB */ RR_DMG_REACT_LIGHT_ARROW = 11,
/* 0xC */ RR_DMG_REACT_SHDW_ARROW,
/* 0xD */ RR_DMG_REACT_WIND_ARROW,
/* 0xE */ RR_DMG_REACT_SPRT_ARROW,
/* 0xF */ RR_DMG_REACT_NORMAL
} EnRrDamageReaction;
typedef enum EnRrDropType {
/* 0 */ RR_DROP_RANDOM_RUPEE,
@ -143,38 +143,38 @@ static ColliderCylinderInitType1 sCylinderInit2 = {
};
static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, RR_DMG_NONE),
/* Deku stick */ DMG_ENTRY(2, RR_DMG_NORMAL),
/* Slingshot */ DMG_ENTRY(1, RR_DMG_NORMAL),
/* Explosive */ DMG_ENTRY(2, RR_DMG_NORMAL),
/* Boomerang */ DMG_ENTRY(0, RR_DMG_STUN),
/* Normal arrow */ DMG_ENTRY(2, RR_DMG_NORMAL),
/* Hammer swing */ DMG_ENTRY(2, RR_DMG_NORMAL),
/* Hookshot */ DMG_ENTRY(0, RR_DMG_STUN),
/* Kokiri sword */ DMG_ENTRY(1, RR_DMG_NORMAL),
/* Master sword */ DMG_ENTRY(2, RR_DMG_NORMAL),
/* Giant's Knife */ DMG_ENTRY(4, RR_DMG_NORMAL),
/* Fire arrow */ DMG_ENTRY(4, RR_DMG_FIRE),
/* Ice arrow */ DMG_ENTRY(4, RR_DMG_ICE),
/* Light arrow */ DMG_ENTRY(15, RR_DMG_LIGHT_ARROW),
/* Unk arrow 1 */ DMG_ENTRY(4, RR_DMG_WIND_ARROW),
/* Unk arrow 2 */ DMG_ENTRY(15, RR_DMG_SHDW_ARROW),
/* Unk arrow 3 */ DMG_ENTRY(15, RR_DMG_SPRT_ARROW),
/* Fire magic */ DMG_ENTRY(4, RR_DMG_FIRE),
/* Ice magic */ DMG_ENTRY(3, RR_DMG_ICE),
/* Light magic */ DMG_ENTRY(10, RR_DMG_LIGHT_MAGIC),
/* Shield */ DMG_ENTRY(0, RR_DMG_NONE),
/* Mirror Ray */ DMG_ENTRY(0, RR_DMG_NONE),
/* Kokiri spin */ DMG_ENTRY(1, RR_DMG_NORMAL),
/* Giant spin */ DMG_ENTRY(4, RR_DMG_NORMAL),
/* Master spin */ DMG_ENTRY(2, RR_DMG_NORMAL),
/* Kokiri jump */ DMG_ENTRY(2, RR_DMG_NORMAL),
/* Giant jump */ DMG_ENTRY(8, RR_DMG_NORMAL),
/* Master jump */ DMG_ENTRY(4, RR_DMG_NORMAL),
/* Unknown 1 */ DMG_ENTRY(10, RR_DMG_SPRT_ARROW),
/* Unblockable */ DMG_ENTRY(0, RR_DMG_NONE),
/* Hammer jump */ DMG_ENTRY(0, RR_DMG_NONE),
/* Unknown 2 */ DMG_ENTRY(0, RR_DMG_NONE),
/* Deku nut */ DMG_ENTRY(0, RR_DMG_REACT_NONE),
/* Deku stick */ DMG_ENTRY(2, RR_DMG_REACT_NORMAL),
/* Slingshot */ DMG_ENTRY(1, RR_DMG_REACT_NORMAL),
/* Explosive */ DMG_ENTRY(2, RR_DMG_REACT_NORMAL),
/* Boomerang */ DMG_ENTRY(0, RR_DMG_REACT_STUN),
/* Normal arrow */ DMG_ENTRY(2, RR_DMG_REACT_NORMAL),
/* Hammer swing */ DMG_ENTRY(2, RR_DMG_REACT_NORMAL),
/* Hookshot */ DMG_ENTRY(0, RR_DMG_REACT_STUN),
/* Kokiri sword */ DMG_ENTRY(1, RR_DMG_REACT_NORMAL),
/* Master sword */ DMG_ENTRY(2, RR_DMG_REACT_NORMAL),
/* Giant's Knife */ DMG_ENTRY(4, RR_DMG_REACT_NORMAL),
/* Fire arrow */ DMG_ENTRY(4, RR_DMG_REACT_FIRE),
/* Ice arrow */ DMG_ENTRY(4, RR_DMG_REACT_ICE),
/* Light arrow */ DMG_ENTRY(15, RR_DMG_REACT_LIGHT_ARROW),
/* Unk arrow 1 */ DMG_ENTRY(4, RR_DMG_REACT_WIND_ARROW),
/* Unk arrow 2 */ DMG_ENTRY(15, RR_DMG_REACT_SHDW_ARROW),
/* Unk arrow 3 */ DMG_ENTRY(15, RR_DMG_REACT_SPRT_ARROW),
/* Fire magic */ DMG_ENTRY(4, RR_DMG_REACT_FIRE),
/* Ice magic */ DMG_ENTRY(3, RR_DMG_REACT_ICE),
/* Light magic */ DMG_ENTRY(10, RR_DMG_REACT_LIGHT_MAGIC),
/* Shield */ DMG_ENTRY(0, RR_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, RR_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, RR_DMG_REACT_NORMAL),
/* Giant spin */ DMG_ENTRY(4, RR_DMG_REACT_NORMAL),
/* Master spin */ DMG_ENTRY(2, RR_DMG_REACT_NORMAL),
/* Kokiri jump */ DMG_ENTRY(2, RR_DMG_REACT_NORMAL),
/* Giant jump */ DMG_ENTRY(8, RR_DMG_REACT_NORMAL),
/* Master jump */ DMG_ENTRY(4, RR_DMG_REACT_NORMAL),
/* Unknown 1 */ DMG_ENTRY(10, RR_DMG_REACT_SPRT_ARROW),
/* Unblockable */ DMG_ENTRY(0, RR_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(0, RR_DMG_REACT_NONE),
/* Unknown 2 */ DMG_ENTRY(0, RR_DMG_REACT_NONE),
};
static InitChainEntry sInitChain[] = {
@ -449,30 +449,30 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
u8 dropType = RR_DROP_RANDOM_RUPEE;
this->collider1.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageEffect != 0) {
if (this->actor.colChkInfo.damageReaction != 0) {
hitPos.x = this->collider1.elem.acDmgInfo.hitPos.x;
hitPos.y = this->collider1.elem.acDmgInfo.hitPos.y;
hitPos.z = this->collider1.elem.acDmgInfo.hitPos.z;
CollisionCheck_BlueBlood(play, NULL, &hitPos);
}
switch (this->actor.colChkInfo.damageEffect) {
case RR_DMG_LIGHT_ARROW:
switch (this->actor.colChkInfo.damageReaction) {
case RR_DMG_REACT_LIGHT_ARROW:
dropType++; // purple rupee
FALLTHROUGH;
case RR_DMG_SHDW_ARROW:
case RR_DMG_REACT_SHDW_ARROW:
dropType++; // flexible
FALLTHROUGH;
case RR_DMG_WIND_ARROW:
case RR_DMG_REACT_WIND_ARROW:
dropType++; // arrow
FALLTHROUGH;
case RR_DMG_SPRT_ARROW:
case RR_DMG_REACT_SPRT_ARROW:
dropType++; // magic jar
FALLTHROUGH;
case RR_DMG_NORMAL:
case RR_DMG_REACT_NORMAL:
PRINTF(VT_FGCOL(RED) T("いてっ( %d : LIFE %d : DAMAGE %d : %x )",
"ouch ( %d : LIFE %d : DAMAGE %d : %x )!!") VT_RST "\n",
this->frameCount, this->actor.colChkInfo.health, this->actor.colChkInfo.damage,
this->actor.colChkInfo.damageEffect);
this->actor.colChkInfo.damageReaction);
this->stopScroll = false;
Actor_ApplyDamage(&this->actor);
this->invincibilityTimer = 40;
@ -487,7 +487,7 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
EnRr_SetupDeath(this);
}
return;
case RR_DMG_FIRE: // Fire Arrow and Din's Fire
case RR_DMG_REACT_FIRE: // Fire Arrow and Din's Fire
Actor_ApplyDamage(&this->actor);
if (this->actor.colChkInfo.health == 0) {
this->dropType = RR_DROP_RANDOM_RUPEE;
@ -496,7 +496,7 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
this->effectTimer = 20;
EnRr_SetupStunned(this);
return;
case RR_DMG_ICE: // Ice Arrow and unused ice magic
case RR_DMG_REACT_ICE: // Ice Arrow and unused ice magic
Actor_ApplyDamage(&this->actor);
if (this->actor.colChkInfo.health == 0) {
this->dropType = RR_DROP_RANDOM_RUPEE;
@ -513,7 +513,7 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
#endif
EnRr_SetupStunned(this);
return;
case RR_DMG_LIGHT_MAGIC: // Unused light magic
case RR_DMG_REACT_LIGHT_MAGIC: // Unused light magic
Actor_ApplyDamage(&this->actor);
if (this->actor.colChkInfo.health == 0) {
this->dropType = RR_DROP_RUPEE_RED;
@ -521,7 +521,7 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_GRAY, 255, COLORFILTER_BUFFLAG_XLU, 80);
EnRr_SetupStunned(this);
return;
case RR_DMG_STUN: // Boomerang and Hookshot
case RR_DMG_REACT_STUN: // Boomerang and Hookshot
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_XLU, 80);
EnRr_SetupStunned(this);

View File

@ -393,7 +393,7 @@ s32 EnSb_UpdateDamage(EnSb* this, PlayState* play) {
tookDamage = false;
this->collider.base.acFlags &= ~AC_HIT;
switch (this->actor.colChkInfo.damageEffect) {
switch (this->actor.colChkInfo.damageReaction) {
case 14: // wind arrow
hitByWindArrow = true;
FALLTHROUGH;

View File

@ -472,11 +472,11 @@ void EnSkb_CheckDamage(EnSkb* this, PlayState* play) {
} else if (this->actionState >= SKB_BEHAVIOR_ATTACKING) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageEffect != 6) {
this->lastDamageEffect = this->actor.colChkInfo.damageEffect;
if (this->actor.colChkInfo.damageReaction != 6) {
this->lastDamageReaction = this->actor.colChkInfo.damageReaction;
Actor_SetDropFlag(&this->actor, &this->collider.elements[1].base, true);
this->setColliderAT = false;
if (this->actor.colChkInfo.damageEffect == 1) {
if (this->actor.colChkInfo.damageReaction == 1) {
if (this->actionState != SKB_BEHAVIOR_STUNNED) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA,
80);
@ -485,7 +485,7 @@ void EnSkb_CheckDamage(EnSkb* this, PlayState* play) {
}
} else {
colorFilterDuration = 8;
if (this->actor.colChkInfo.damageEffect == 7) {
if (this->actor.colChkInfo.damageReaction == 7) {
scale = this->actor.scale.y * 7500.0f;
for (i = 4; i >= 0; i--) {
flamePos = this->actor.world.pos;
@ -504,8 +504,8 @@ void EnSkb_CheckDamage(EnSkb* this, PlayState* play) {
}
player = GET_PLAYER(play);
if (this->breakFlags == 0) {
if ((this->actor.colChkInfo.damageEffect == 0xD) ||
((this->actor.colChkInfo.damageEffect == 0xE) &&
if ((this->actor.colChkInfo.damageReaction == 0xD) ||
((this->actor.colChkInfo.damageReaction == 0xE) &&
((player->meleeWeaponAnimation >= PLAYER_MWA_RIGHT_SLASH_1H &&
player->meleeWeaponAnimation <= PLAYER_MWA_LEFT_COMBO_2H) ||
(player->meleeWeaponAnimation == PLAYER_MWA_BACKSLASH_RIGHT ||

View File

@ -15,7 +15,7 @@ typedef struct EnSkb {
/* 0x0208 */ Vec3s morphTable[20];
/* 0x0280 */ u8 actionState;
/* 0x0281 */ u8 setColliderAT;
/* 0x0282 */ u8 lastDamageEffect;
/* 0x0282 */ u8 lastDamageReaction;
/* 0x0283 */ u8 breakFlags;
/* 0x0284 */ EnSkbActionFunc actionFunc;
/* 0x0288 */ s16 headlessYawOffset;

View File

@ -606,7 +606,7 @@ s32 EnSkj_CollisionCheck(EnSkj* this, PlayState* play) {
if (!((this->unk_2D3 == 0) || (D_80B01EA0 != 0) || !(this->collider.base.acFlags & AC_HIT))) {
this->collider.base.acFlags &= ~AC_HIT;
switch (this->actor.colChkInfo.damageEffect) {
switch (this->actor.colChkInfo.damageReaction) {
case 0xF:
effectPos.x = this->collider.elem.acDmgInfo.hitPos.x;
effectPos.y = this->collider.elem.acDmgInfo.hitPos.y;

View File

@ -461,7 +461,7 @@ s32 EnSt_CheckHitBackside(EnSt* this, PlayState* play) {
}
this->invulnerableTimer = 8;
if (this->actor.colChkInfo.damageEffect == 1) {
if (this->actor.colChkInfo.damageReaction == 1) {
if (this->stunTimer == 0) {
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
this->stunTimer = 120;

View File

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

View File

@ -90,7 +90,7 @@ typedef struct EnTest {
/* 0x7DD */ char unk_7DD[0x1];
/* 0x7DE */ u8 unk_7DE;
/* 0x7E0 */ s16 iceTimer;
/* 0x7E2 */ u8 lastDamageEffect;
/* 0x7E2 */ u8 lastDamageReaction;
/* 0x7E4 */ s32 unk_7E4;
/* 0x7E8 */ s32 timer;
/* 0x7EC */ f32 unk_7EC;

View File

@ -696,7 +696,7 @@ void EnTite_SetupStunned(EnTite* this) {
this->action = TEKTITE_STUNNED;
this->actor.speed = -6.0f;
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
if (this->damageEffect == 0xF) {
if (this->damageReaction == 0xF) {
this->spawnIceTimer = 48;
}
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
@ -867,11 +867,11 @@ void EnTite_CheckDamage(Actor* thisx, PlayState* play) {
if ((this->collider.base.acFlags & AC_HIT) && (this->action >= TEKTITE_IDLE)) {
this->collider.base.acFlags &= ~AC_HIT;
if (thisx->colChkInfo.damageEffect != 0xE) { // Immune to fire magic
this->damageEffect = thisx->colChkInfo.damageEffect;
if (thisx->colChkInfo.damageReaction != 0xE) { // Immune to fire magic
this->damageReaction = thisx->colChkInfo.damageReaction;
Actor_SetDropFlag(thisx, &this->collider.elements[0].base, false);
// Stun if Tektite hit by nut, boomerang, hookshot, ice arrow or ice magic
if ((thisx->colChkInfo.damageEffect == 1) || (thisx->colChkInfo.damageEffect == 0xF)) {
if ((thisx->colChkInfo.damageReaction == 1) || (thisx->colChkInfo.damageReaction == 0xF)) {
if (this->action != TEKTITE_STUNNED) {
Actor_SetColorFilter(thisx, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 80);
Actor_ApplyDamage(thisx);
@ -917,7 +917,7 @@ void EnTite_Update(Actor* thisx, PlayState* play) {
EnTite_CheckDamage(thisx, play);
// Stay still if hit by immunity damage type this frame
if (thisx->colChkInfo.damageEffect != 0xE) {
if (thisx->colChkInfo.damageReaction != 0xE) {
this->actionFunc(this, play);
Actor_MoveXZGravity(thisx);
Actor_UpdateBgCheckInfo(play, thisx, 25.0f, 40.0f, 20.0f, this->unk_2DC);

View File

@ -26,7 +26,7 @@ typedef struct EnTite {
/* 0x02E0 */ s16 actionVar1; // Usage depends on current action function
/* 0x02E2 */ u8 actionVar2; // Usage depends on current action function
/* 0x02E3 */ u8 spawnIceTimer;
/* 0x02E4 */ u8 damageEffect;
/* 0x02E4 */ u8 damageReaction;
/* 0x02E8 */ ColliderJntSph collider;
/* 0x0308 */ ColliderJntSphElement colliderElements[1];
/* 0x0348 */ Vec3f frontLeftFootPos;

View File

@ -612,7 +612,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
this->stateFlags3 &= ~PLAYER_STATE3_2;
} else {
func_800F5ACC(NA_BGM_MINI_BOSS);
if (this->actor.colChkInfo.damageEffect == 1) {
if (this->actor.colChkInfo.damageReaction == 1) {
if (sAlpha == 255) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 80);
} else {

View File

@ -95,46 +95,46 @@ static ColliderJntSphInit sJntSphInit = {
sJntSphElementsInit,
};
typedef enum TailpasaranDamageEffect {
/* 00 */ TAILPASARAN_DMGEFF_NONE,
/* 01 */ TAILPASARAN_DMGEFF_DEKUNUT,
/* 14 */ TAILPASARAN_DMGEFF_SHOCKING = 14, // Kills the Tailpasaran but shocks Player
/* 15 */ TAILPASARAN_DMGEFF_INSULATING // Kills the Tailpasaran and does not shock Player
} TailpasaranDamageEffect;
typedef enum TailpasaranDamageReaction {
/* 00 */ TAILPASARAN_DMG_REACT_NONE,
/* 01 */ TAILPASARAN_DMG_REACT_DEKUNUT,
/* 14 */ TAILPASARAN_DMG_REACT_SHOCKING = 14, // Kills the Tailpasaran but shocks Player
/* 15 */ TAILPASARAN_DMG_REACT_INSULATING // Kills the Tailpasaran and does not shock Player
} TailpasaranDamageReaction;
static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_DEKUNUT),
/* Deku stick */ DMG_ENTRY(2, TAILPASARAN_DMGEFF_INSULATING),
/* Slingshot */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_NONE),
/* Explosive */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_NONE),
/* Boomerang */ DMG_ENTRY(1, TAILPASARAN_DMGEFF_INSULATING),
/* Normal arrow */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_NONE),
/* Hammer swing */ DMG_ENTRY(2, TAILPASARAN_DMGEFF_SHOCKING),
/* Hookshot */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_NONE),
/* Kokiri sword */ DMG_ENTRY(1, TAILPASARAN_DMGEFF_SHOCKING),
/* Master sword */ DMG_ENTRY(2, TAILPASARAN_DMGEFF_SHOCKING),
/* Giant's Knife */ DMG_ENTRY(4, TAILPASARAN_DMGEFF_SHOCKING),
/* Fire arrow */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_NONE),
/* Ice arrow */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_NONE),
/* Light arrow */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_NONE),
/* Unk arrow 1 */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_NONE),
/* Unk arrow 2 */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_NONE),
/* Unk arrow 3 */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_NONE),
/* Fire magic */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_NONE),
/* Ice magic */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_NONE),
/* Light magic */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_NONE),
/* Shield */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_NONE),
/* Mirror Ray */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_NONE),
/* Kokiri spin */ DMG_ENTRY(1, TAILPASARAN_DMGEFF_SHOCKING),
/* Giant spin */ DMG_ENTRY(4, TAILPASARAN_DMGEFF_SHOCKING),
/* Master spin */ DMG_ENTRY(2, TAILPASARAN_DMGEFF_SHOCKING),
/* Kokiri jump */ DMG_ENTRY(2, TAILPASARAN_DMGEFF_SHOCKING),
/* Giant jump */ DMG_ENTRY(8, TAILPASARAN_DMGEFF_SHOCKING),
/* Master jump */ DMG_ENTRY(4, TAILPASARAN_DMGEFF_SHOCKING),
/* Unknown 1 */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_NONE),
/* Unblockable */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_NONE),
/* Hammer jump */ DMG_ENTRY(4, TAILPASARAN_DMGEFF_SHOCKING),
/* Unknown 2 */ DMG_ENTRY(0, TAILPASARAN_DMGEFF_NONE),
/* Deku nut */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_DEKUNUT),
/* Deku stick */ DMG_ENTRY(2, TAILPASARAN_DMG_REACT_INSULATING),
/* Slingshot */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Explosive */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Boomerang */ DMG_ENTRY(1, TAILPASARAN_DMG_REACT_INSULATING),
/* Normal arrow */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Hammer swing */ DMG_ENTRY(2, TAILPASARAN_DMG_REACT_SHOCKING),
/* Hookshot */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Kokiri sword */ DMG_ENTRY(1, TAILPASARAN_DMG_REACT_SHOCKING),
/* Master sword */ DMG_ENTRY(2, TAILPASARAN_DMG_REACT_SHOCKING),
/* Giant's Knife */ DMG_ENTRY(4, TAILPASARAN_DMG_REACT_SHOCKING),
/* Fire arrow */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Ice arrow */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Light arrow */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Unk arrow 1 */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Unk arrow 2 */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Unk arrow 3 */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Fire magic */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Ice magic */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Light magic */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Shield */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, TAILPASARAN_DMG_REACT_SHOCKING),
/* Giant spin */ DMG_ENTRY(4, TAILPASARAN_DMG_REACT_SHOCKING),
/* Master spin */ DMG_ENTRY(2, TAILPASARAN_DMG_REACT_SHOCKING),
/* Kokiri jump */ DMG_ENTRY(2, TAILPASARAN_DMG_REACT_SHOCKING),
/* Giant jump */ DMG_ENTRY(8, TAILPASARAN_DMG_REACT_SHOCKING),
/* Master jump */ DMG_ENTRY(4, TAILPASARAN_DMG_REACT_SHOCKING),
/* Unknown 1 */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Unblockable */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(4, TAILPASARAN_DMG_REACT_SHOCKING),
/* Unknown 2 */ DMG_ENTRY(0, TAILPASARAN_DMG_REACT_NONE),
};
static InitChainEntry sInitChain[] = {
@ -604,10 +604,10 @@ void EnTp_UpdateDamage(EnTp* this, PlayState* play) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlagJntSph(&this->actor, &this->collider, true);
this->damageEffect = this->actor.colChkInfo.damageEffect;
this->damageReaction = this->actor.colChkInfo.damageReaction;
if (this->actor.colChkInfo.damageEffect != TAILPASARAN_DMGEFF_NONE) {
if (this->actor.colChkInfo.damageEffect == TAILPASARAN_DMGEFF_DEKUNUT) {
if (this->actor.colChkInfo.damageReaction != TAILPASARAN_DMG_REACT_NONE) {
if (this->actor.colChkInfo.damageReaction == TAILPASARAN_DMG_REACT_DEKUNUT) {
phi_s4 = 1;
}
@ -622,7 +622,7 @@ void EnTp_UpdateDamage(EnTp* this, PlayState* play) {
if (head->actor.params <= TAILPASARAN_HEAD) {
EnTp_SetupDie(head);
head->damageEffect = this->actor.colChkInfo.damageEffect;
head->damageReaction = this->actor.colChkInfo.damageReaction;
head->actor.params = TAILPASARAN_HEAD_DYING;
}
} else {
@ -686,7 +686,7 @@ void EnTp_Update(Actor* thisx, PlayState* play) {
s16 yawToWall;
if (player->stateFlags1 & PLAYER_STATE1_26) { // Shielding
this->damageEffect = TAILPASARAN_DMGEFF_NONE;
this->damageReaction = TAILPASARAN_DMG_REACT_NONE;
}
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;
if (this->damageEffect == TAILPASARAN_DMGEFF_SHOCKING) {
if (this->damageReaction == TAILPASARAN_DMG_REACT_SHOCKING) {
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
}

View File

@ -13,7 +13,7 @@ typedef struct EnTp {
/* 0x014C */ s32 actionIndex;
/* 0x0150 */ s32 unk_150; // Some kind of state indicator
/* 0x0154 */ EnTpActionFunc actionFunc;
/* 0x0158 */ u8 damageEffect; // Used to propagate the effect to the other segments' actors
/* 0x0158 */ u8 damageReaction; // Used to propagate the reaction to the other segments' actors
/* 0x015A */ s16 timer;
/* 0x015C */ s16 unk_15C; // Multipurpose, used to change the horizontal position of tail segments
/* 0x015E */ s16 alpha; // The dying types fade away

View File

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

View File

@ -26,10 +26,6 @@
#define TIMER_SCALE ((f32)OS_CLOCK_RATE / 10000000000)
#define DAMAGE_EFFECT_BURN 2
#define DAMAGE_EFFECT_STUN_WHITE 4
#define DAMAGE_EFFECT_STUN_BLUE 1
void EnWallmas_Init(Actor* thisx, PlayState* play);
void EnWallmas_Destroy(Actor* thisx, PlayState* play);
void EnWallmas_Update(Actor* thisx, PlayState* play);
@ -86,39 +82,46 @@ static ColliderCylinderInit sCylinderInit = {
static CollisionCheckInfoInit sColChkInfoInit = { 4, 30, 40, 150 };
typedef enum EnWallmasDamageReaction {
/* 0 */ WALLMAS_DMG_REACT_NONE,
/* 1 */ WALLMAS_DMG_REACT_STUN_BLUE,
/* 2 */ WALLMAS_DMG_REACT_BURN,
/* 4 */ WALLMAS_DMG_REACT_STUN_WHITE = 4
} EnWallmasDamageReaction;
static DamageTable sDamageTable = {
/* Deku nut */ DMG_ENTRY(0, 0x1),
/* Deku stick */ DMG_ENTRY(2, 0x0),
/* Slingshot */ DMG_ENTRY(1, 0x0),
/* Explosive */ DMG_ENTRY(2, 0x0),
/* Boomerang */ DMG_ENTRY(0, 0x1),
/* Normal arrow */ DMG_ENTRY(2, 0x0),
/* Hammer swing */ DMG_ENTRY(2, 0x0),
/* Hookshot */ DMG_ENTRY(0, 0x1),
/* Kokiri sword */ DMG_ENTRY(1, 0x0),
/* Master sword */ DMG_ENTRY(2, 0x0),
/* Giant's Knife */ DMG_ENTRY(4, 0x0),
/* Fire arrow */ DMG_ENTRY(4, 0x2),
/* Ice arrow */ DMG_ENTRY(2, 0x0),
/* Light arrow */ DMG_ENTRY(4, 0x4),
/* Unk arrow 1 */ DMG_ENTRY(4, 0x0),
/* Unk arrow 2 */ DMG_ENTRY(2, 0x0),
/* Unk arrow 3 */ DMG_ENTRY(2, 0x0),
/* Fire magic */ DMG_ENTRY(4, 0x2),
/* Ice magic */ DMG_ENTRY(0, 0x0),
/* Light magic */ DMG_ENTRY(4, 0x4),
/* Shield */ DMG_ENTRY(0, 0x0),
/* Mirror Ray */ DMG_ENTRY(0, 0x0),
/* Kokiri spin */ DMG_ENTRY(1, 0x0),
/* Giant spin */ DMG_ENTRY(4, 0x0),
/* Master spin */ DMG_ENTRY(2, 0x0),
/* Kokiri jump */ DMG_ENTRY(2, 0x0),
/* Giant jump */ DMG_ENTRY(8, 0x0),
/* Master jump */ DMG_ENTRY(4, 0x0),
/* Unknown 1 */ DMG_ENTRY(0, 0x0),
/* Unblockable */ DMG_ENTRY(0, 0x0),
/* Hammer jump */ DMG_ENTRY(4, 0x0),
/* Unknown 2 */ DMG_ENTRY(0, 0x0),
/* Deku nut */ DMG_ENTRY(0, WALLMAS_DMG_REACT_STUN_BLUE),
/* Deku stick */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Slingshot */ DMG_ENTRY(1, WALLMAS_DMG_REACT_NONE),
/* Explosive */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Boomerang */ DMG_ENTRY(0, WALLMAS_DMG_REACT_STUN_BLUE),
/* Normal arrow */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Hammer swing */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Hookshot */ DMG_ENTRY(0, WALLMAS_DMG_REACT_STUN_BLUE),
/* Kokiri sword */ DMG_ENTRY(1, WALLMAS_DMG_REACT_NONE),
/* Master sword */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Giant's Knife */ DMG_ENTRY(4, WALLMAS_DMG_REACT_NONE),
/* Fire arrow */ DMG_ENTRY(4, WALLMAS_DMG_REACT_BURN),
/* Ice arrow */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Light arrow */ DMG_ENTRY(4, WALLMAS_DMG_REACT_STUN_WHITE),
/* Unk arrow 1 */ DMG_ENTRY(4, WALLMAS_DMG_REACT_NONE),
/* Unk arrow 2 */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Unk arrow 3 */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Fire magic */ DMG_ENTRY(4, WALLMAS_DMG_REACT_BURN),
/* Ice magic */ DMG_ENTRY(0, WALLMAS_DMG_REACT_NONE),
/* Light magic */ DMG_ENTRY(4, WALLMAS_DMG_REACT_STUN_WHITE),
/* Shield */ DMG_ENTRY(0, WALLMAS_DMG_REACT_NONE),
/* Mirror Ray */ DMG_ENTRY(0, WALLMAS_DMG_REACT_NONE),
/* Kokiri spin */ DMG_ENTRY(1, WALLMAS_DMG_REACT_NONE),
/* Giant spin */ DMG_ENTRY(4, WALLMAS_DMG_REACT_NONE),
/* Master spin */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Kokiri jump */ DMG_ENTRY(2, WALLMAS_DMG_REACT_NONE),
/* Giant jump */ DMG_ENTRY(8, WALLMAS_DMG_REACT_NONE),
/* Master jump */ DMG_ENTRY(4, WALLMAS_DMG_REACT_NONE),
/* Unknown 1 */ DMG_ENTRY(0, WALLMAS_DMG_REACT_NONE),
/* Unblockable */ DMG_ENTRY(0, WALLMAS_DMG_REACT_NONE),
/* Hammer jump */ DMG_ENTRY(4, WALLMAS_DMG_REACT_NONE),
/* Unknown 2 */ DMG_ENTRY(0, WALLMAS_DMG_REACT_NONE),
};
static InitChainEntry sInitChain[] = {
@ -292,7 +295,7 @@ void EnWallmas_SetupStun(EnWallmas* this) {
Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 1.5f, 0, 20.0f, ANIMMODE_ONCE, -3.0f);
this->actor.speed = 0.0f;
if (this->actor.colChkInfo.damageEffect == 4) {
if (this->actor.colChkInfo.damageReaction == 4) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_GRAY, 255, COLORFILTER_BUFFLAG_OPA, 80);
} else {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 80);
@ -522,7 +525,7 @@ void EnWallmas_ColUpdate(EnWallmas* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if ((this->actor.colChkInfo.damageReaction != 0) || (this->actor.colChkInfo.damage != 0)) {
if (Actor_ApplyDamage(&this->actor) == 0) {
Enemy_StartFinishingBlow(play, &this->actor);
Actor_PlaySfx(&this->actor, NA_SE_EN_FALL_DEAD);
@ -533,13 +536,13 @@ void EnWallmas_ColUpdate(EnWallmas* this, PlayState* play) {
}
}
if ((this->actor.colChkInfo.damageEffect == DAMAGE_EFFECT_STUN_WHITE) ||
(this->actor.colChkInfo.damageEffect == DAMAGE_EFFECT_STUN_BLUE)) {
if ((this->actor.colChkInfo.damageReaction == WALLMAS_DMG_REACT_STUN_WHITE) ||
(this->actor.colChkInfo.damageReaction == WALLMAS_DMG_REACT_STUN_BLUE)) {
if (this->actionFunc != EnWallmas_Stun) {
EnWallmas_SetupStun(this);
}
} else {
if (this->actor.colChkInfo.damageEffect == DAMAGE_EFFECT_BURN) {
if (this->actor.colChkInfo.damageReaction == WALLMAS_DMG_REACT_BURN) {
EffectSsFCircle_Spawn(play, &this->actor, &this->actor.world.pos, 40, 40);
}

View File

@ -575,8 +575,8 @@ void func_80B3368C(EnWeiyer* this, PlayState* play) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->actor.colChkInfo.damageEffect == 1) {
if ((this->actor.colChkInfo.damageReaction != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->actor.colChkInfo.damageReaction == 1) {
if (this->actionFunc != func_80B333B8) {
func_80B32660(this);
}

View File

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

View File

@ -63,7 +63,7 @@ typedef struct EnWf {
/* 0x02E0 */ s16 unk_2E0; // Used, but has no effect
/* 0x02E2 */ s16 unk_2E2;
/* 0x02E4 */ s16 fireTimer;
/* 0x02E6 */ u8 damageEffect;
/* 0x02E6 */ u8 damageReaction;
/* 0x02E8 */ s32 actionTimer; // Used to make an action last for a certain amount of time
/* 0x02EC */ f32 runSpeed;
/* 0x02F0 */ char unk_2F0[4];

View File

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

View File

@ -112,7 +112,7 @@ typedef struct EnZf {
/* 0x0404 */ u8 alpha;
/* 0x0408 */ f32 unk_408; // related to XZ speeds
/* 0x040C */ f32 unk_40C; // related to y velocity
/* 0x0410 */ u8 damageEffect;
/* 0x0410 */ u8 damageReaction;
/* 0x0414 */ s32 blureIndex;
/* 0x0418 */ ColliderCylinder bodyCollider;
/* 0x0464 */ ColliderQuad swordCollider;