review changes

This commit is contained in:
DizzyEggg
2024-09-18 09:28:10 +02:00
parent 3dd20e5803
commit 3ee1739f91
2 changed files with 10 additions and 9 deletions

View File

@@ -4,6 +4,7 @@
#include "code_804267C.h"
#include "code_806CD90.h"
#include "code_8041AD0.h"
#include "type_chart.h"
#include "constants/direction.h"
#include "constants/status.h"
#include "constants/type.h"
@@ -826,16 +827,16 @@ void sub_80420E8(Entity *pokemon, struct DamageStruct *dmgStruct)
switch(typeEffectiveness)
{
default:
case 0:
case EFFECTIVENESS_IMMUNE:
arg = 8;
break;
case 1:
case EFFECTIVENESS_RESIST:
arg = 9;
break;
case 2:
case EFFECTIVENESS_NEUTRAL:
arg = 10;
break;
case 3:
case EFFECTIVENESS_SUPER:
arg = 11;
break;
}

View File

@@ -33,6 +33,7 @@
#include "move_effects_target.h"
#include "dungeon_pokemon_attributes.h"
#include "code_8041AD0.h"
#include "type_chart.h"
extern u8 gUnknown_202F221;
extern u8 gUnknown_202DFE8[];
@@ -578,13 +579,13 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
sub_80522F4(attacker, target, gUnknown_80F9614);
}
switch (dmgStruct->typeEffectiveness) {
case 0:
case EFFECTIVENESS_IMMUNE:
sub_80522F4(attacker, target, gUnknown_80F9630);
break;
case 1:
case EFFECTIVENESS_RESIST:
sub_80522F4(attacker, target, gUnknown_80F9654);
break;
case 3:
case EFFECTIVENESS_SUPER:
sub_80522F4(attacker, target, gUnknown_80F9670);
break;
}
@@ -628,7 +629,6 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
// Needed to match - the line can be safely removed
dmgStruct++;dmgStruct--;
//
targetData->unkA0 += dmgStruct->dmg;
if (targetData->unkA0 > 999)
@@ -667,7 +667,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
unkBool = FALSE;
if (unkBool) {
EntityInfo *info = GetEntInfo(target);
info->action.direction = (GetDirectionTowardsPosition(&target->pos, &attacker->pos) & 7);
info->action.direction = (GetDirectionTowardsPosition(&target->pos, &attacker->pos) & DIRECTION_MASK);
}
TargetTileInFront(target);
}