From c9e26cabeccb536bc5bd75dec7c750253688ad4c Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 4 Dec 2024 18:18:55 +0100 Subject: [PATCH] dungeon config done --- data/data_80F4D44.s | 42 +-------- data/data_80F4DB4.s | 189 --------------------------------------- include/dungeon_config.h | 49 +++++++++- ld_script.txt | 4 +- src/code_806E8B0.c | 8 +- src/code_80718D8.c | 6 +- src/code_8077274_1.c | 4 +- src/dungeon_ai_attack.c | 2 +- src/dungeon_config.c | 57 +++++++++++- src/dungeon_generation.c | 16 ++-- src/move_actions.c | 104 ++++++++------------- src/status_actions.c | 12 +-- src/status_checks.c | 2 - 13 files changed, 158 insertions(+), 337 deletions(-) delete mode 100644 data/data_80F4DB4.s diff --git a/data/data_80F4D44.s b/data/data_80F4D44.s index 2e39e2110..be09bee4f 100644 --- a/data/data_80F4D44.s +++ b/data/data_80F4D44.s @@ -16,44 +16,4 @@ gUnknown_80F4D64: @ 80F4D64 gUnknown_80F4D8C: @ 80F4D8C @ replacing .incbin "baserom.gba", 0x000f4d8c, 0x14 .string "mapparam\0" - .align 2,0 - .string "pksdir0\0" - .align 2,0 - - .global gUnknown_80F4DA0 -gUnknown_80F4DA0: @ 80F4DA0 - @ replacing .incbin "baserom.gba", 0x000f4da0, 0x2 - .byte 0x07, 0x00 - - .global gUnknown_80F4DA2 -gUnknown_80F4DA2: @ 80F4DA2 - .byte 0x08, 0x00 - - .global gUnknown_80F4DA4 -gUnknown_80F4DA4: @ 80F4DA4 - .byte 0x0C, 0x00 - - .global gUnknown_80F4DA6 -gUnknown_80F4DA6: @ 80F4DA6 - .byte 0x0A, 0x00 - - .global gUnknown_80F4DA8 -gUnknown_80F4DA8: @ 80F4DA8 - .byte 0x04, 0x00 - - .global gUnknown_80F4DAA -gUnknown_80F4DAA: @ 80F4DAA - .byte 0x24, 0x00 - - .global gUnknown_80F4DAC -gUnknown_80F4DAC: @ 80F4DAC - .byte 0x05, 0x00 - - .global gUnknown_80F4DAE -gUnknown_80F4DAE: @ 80F4DAE - .byte 0x28, 0x00 - - .global gUnknown_80F4DB0 -gUnknown_80F4DB0: @ 80F4DB0 -@ replacing .incbin "baserom.gba", 0x000f4db0, 0x2 - .byte 0x28, 0x00 + .align 2,0 \ No newline at end of file diff --git a/data/data_80F4DB4.s b/data/data_80F4DB4.s deleted file mode 100644 index f4f126afe..000000000 --- a/data/data_80F4DB4.s +++ /dev/null @@ -1,189 +0,0 @@ - .section .rodata - - .global gUnknown_80F4DB4 -gUnknown_80F4DB4: @ 80F4DB4 -@ replacing .incbin "baserom.gba", 0x000f4db4, 0x2 - .byte 0x1e, 0x00 - - .global gUnknown_80F4DB6 -gUnknown_80F4DB6: @ 80F4DB6 -@ replacing .incbin "baserom.gba", 0x000f4db6, 0x2 - .byte 0x0a, 0x00 - - .global gUnknown_80F4DB8 -gUnknown_80F4DB8: @ 80F4DB8 -@ replacing .incbin "baserom.gba", 0x000f4db8, 0x2 - .byte 0x0a, 0x00 - - .global gUnknown_80F4DBA -gUnknown_80F4DBA: @ 80F4DBA -@ replacing .incbin "baserom.gba", 0x000f4dba, 0x2 - .byte 0x0a, 0x00 - - .global gUnknown_80F4DBC -gUnknown_80F4DBC: @ 80F4DBC -@ replacing .incbin "baserom.gba", 0x000f4dbc, 0x2 - .byte 0x0a, 0x00 - - .global gUnknown_80F4DBE -gUnknown_80F4DBE: @ 80F4DBE -@ replacing .incbin "baserom.gba", 0x000f4dbe, 0x2 - .byte 0x12, 0x00 - - .global gUnknown_80F4DC0 -gUnknown_80F4DC0: @ 80F4DC0 -@ replacing .incbin "baserom.gba", 0x000f4dc0, 0x2 - .byte 0x0a, 0x00 - - .global gUnknown_80F4DC2 -gUnknown_80F4DC2: @ 80F4DC2 -@ replacing .incbin "baserom.gba", 0x000f4dc2, 0x2 - .byte 0x14, 0x00 - - .global gUnknown_80F4DC4 -gUnknown_80F4DC4: @ 80F4DC4 -@ replacing .incbin "baserom.gba", 0x000f4dc4, 0x2 - .byte 0x28, 0x00 - - .global gUnknown_80F4DC6 -gUnknown_80F4DC6: @ 80F4DC6 -@ replacing .incbin "baserom.gba", 0x000f4dc6, 0x2 - .byte 0x0a, 0x00 - - .global gUnknown_80F4DC8 -gUnknown_80F4DC8: @ 80F4DC8 -@ replacing .incbin "baserom.gba", 0x000f4dc8, 0x2 - .byte 0x14, 0x00 - - .global gUnknown_80F4DCA -gUnknown_80F4DCA: @ 80F4DCA -@ replacing .incbin "baserom.gba", 0x000f4dca, 0x2 - .byte 0x1e, 0x00 - - .global gUnknown_80F4DCC -gUnknown_80F4DCC: @ 80F4DCC -@ replacing .incbin "baserom.gba", 0x000f4dcc, 0x2 - .byte 0x1e, 0x00 - - .global gUnknown_80F4DCE -gUnknown_80F4DCE: @ 80F4DCE -@ replacing .incbin "baserom.gba", 0x000f4dce, 0x2 - .byte 0x0a, 0x00 - - .global gUnknown_80F4DD0 -gUnknown_80F4DD0: @ 80F4DD0 -@ replacing .incbin "baserom.gba", 0x000f4dd0, 0x2 - .byte 0x14, 0x00 - - .global gUnknown_80F4DD2 -gUnknown_80F4DD2: @ 80F4DD2 -@ replacing .incbin "baserom.gba", 0x000f4dd2, 0x2 - .byte 0x0a, 0x00 - - .global gUnknown_80F4DD4 -gUnknown_80F4DD4: @ 80F4DD4 -@ replacing .incbin "baserom.gba", 0x000f4dd4, 0x2 - .byte 0x0a, 0x00 - - .global gUnknown_80F4DD6 -gUnknown_80F4DD6: @ 80F4DD6 -@ replacing .incbin "baserom.gba", 0x000f4dd6, 0x2 - .byte 0x0a, 0x00 - - .global gUnknown_80F4DD8 -gUnknown_80F4DD8: @ 80F4DD8 -@ replacing .incbin "baserom.gba", 0x000f4dd8, 0x2 - .byte 0x32, 0x00 - - .global gUnknown_80F4DDA -gUnknown_80F4DDA: @ 80F4DDA -@ replacing .incbin "baserom.gba", 0x000f4dda, 0x2 - .byte 0x32, 0x00 - - .global gUnknown_80F4DDC -gUnknown_80F4DDC: @ 80F4DDC -@ replacing .incbin "baserom.gba", 0x000f4ddc, 0x4 - .byte 0x32, 0x00 - .byte 0x32, 0x00 - - .global gUnknown_80F4DE0 -gUnknown_80F4DE0: @ 80F4DE0 -@ replacing .incbin "baserom.gba", 0x000f4de0, 0x2 - .byte 0x32, 0x00 - - .global gUnknown_80F4DE2 -gUnknown_80F4DE2: @ 80F4DE2 -@ replacing .incbin "baserom.gba", 0x000f4de2, 0x2 - .byte 0x0a, 0x00 - - .global gUnknown_80F4DE4 -gUnknown_80F4DE4: @ 80F4DE4 -@ replacing .incbin "baserom.gba", 0x000f4de4, 0x2 - .byte 0x0f, 0x00 - - .global gUnknown_80F4DE6 -gUnknown_80F4DE6: @ 80F4DE6 -@ replacing .incbin "baserom.gba", 0x000f4de6, 0x2 - .byte 0x14, 0x00 - - .global gUnknown_80F4DE8 -gUnknown_80F4DE8: @ 80F4DE8 -@ replacing .incbin "baserom.gba", 0x000f4de8, 0x2 - .byte 0x0a, 0x00 - - .global gUnknown_80F4DEA -gUnknown_80F4DEA: @ 80F4DEA -@ replacing .incbin "baserom.gba", 0x000f4dea, 0x2 - .byte 0x0a, 0x00 - - .global gUnknown_80F4DEC -gUnknown_80F4DEC: @ 80F4DEC -@ replacing .incbin "baserom.gba", 0x000f4dec, 0x2 - .byte 0x0f, 0x00 - - .global gUnknown_80F4DEE -gUnknown_80F4DEE: @ 80F4DEE -@ replacing .incbin "baserom.gba", 0x000f4dee, 0x2 - .byte 0x14, 0x00 - - .global gUnknown_80F4DF0 -gUnknown_80F4DF0: @ 80F4DF0 -@ replacing .incbin "baserom.gba", 0x000f4df0, 0x2 - .byte 0x19, 0x00 - - .global gUnknown_80F4DF2 -gUnknown_80F4DF2: @ 80F4DF2 -@ replacing .incbin "baserom.gba", 0x000f4df2, 0x2 - .byte 0x23, 0x00 - - .global gUnknown_80F4DF4 -gUnknown_80F4DF4: @ 80F4DF4 -@ replacing .incbin "baserom.gba", 0x000f4df4, 0x2 - .byte 0x19, 0x00 - - .global gUnknown_80F4DF6 -gUnknown_80F4DF6: @ 80F4DF6 -@ replacing .incbin "baserom.gba", 0x000f4df6, 0x2 - .byte 0x1e, 0x00 - - .global gUnknown_80F4DF8 -gUnknown_80F4DF8: @ 80F4DF8 -@ replacing .incbin "baserom.gba", 0x000f4df8, 0x2 - .byte 0x0a, 0x00 - - .global gUnknown_80F4DFA -gUnknown_80F4DFA: @ 80F4DFA -@ replacing .incbin "baserom.gba", 0x000f4dfa, 0x2 - .byte 0x1e, 0x00 - - .global gUnknown_80F4DFC -gUnknown_80F4DFC: @ 80F4DFC -@ replacing .incbin "baserom.gba", 0x000f4dfc, 0x2 - .byte 0x14, 0x00 - - .global gUnknown_80F4DFE -gUnknown_80F4DFE: @ 80F4DFE -@ replacing .incbin "baserom.gba", 0x000f4dfe, 0x2 - .byte 0x0a, 0x00 - - diff --git a/include/dungeon_config.h b/include/dungeon_config.h index cde47e80e..461c49caf 100644 --- a/include/dungeon_config.h +++ b/include/dungeon_config.h @@ -8,12 +8,59 @@ #include "structs/dungeon_entity.h" #include "structs/str_moves.h" +extern const s16 gMonsterHouseMaxItemsTraps; +extern const s16 gMonsterHouseMinMons; +extern const s16 gMonsterHouseMaxMons; +extern const s16 gUnknown_80F4DA6; +extern const s16 gUnknown_80F4DA8; +extern const s16 gUnknown_80F4DAA; +extern const s16 gUnknown_80F4DAC; +extern const s16 gCritOddsScopeLensPatsyBand; +extern const s16 gCritOddsIqAdvantageMaster; +extern const s16 gAIConfusedAttackChance; +extern const s16 gIronTailSecondaryChance; +extern const s16 gBubbleSecondaryChance; +extern const s16 gFlameWheelSecondaryChance; +extern const s16 gFireMoveBurnSecondaryChance; +extern const s16 gIceMoveFreezeSecondaryChance; +extern const s16 gPoisonStingSecondaryChance; +extern const s16 gPsychicSecondaryChance; +extern const s16 gShadowBallSecondaryChance; +extern const s16 gSmogSecondaryChance; +extern const s16 gPoisonTailSecondaryChance; +extern const s16 gTwineedleSecondaryChance; +extern const s16 gPoisonFangSecondaryChance; +extern const s16 gBounceSecondaryChance; +extern const s16 gMetalClawSecondaryChance; +extern const s16 gMeteorMashSecondaryChance; +extern const s16 gSteelWingSecondaryChance; +extern const s16 gConstrictBubblebeamSecondaryChance; +extern const s16 gAncientPowerSecondaryChance; +extern const s16 gMistBallSecondaryChance; +extern const s16 gCrushClawSecondaryChance; +extern const s16 gLusterPurgeSecondaryChance; +extern const s16 gSacredFireSecondaryChance; +extern const s16 gThundershockSecondaryChance; +extern const s16 gLickSecondaryChance; +extern const s16 gThunderSecondaryChance; +extern const s16 gThunderboltSecondaryChance; +extern const s16 gExtrasensorySecondaryChance; +extern const s16 gTwisterSecondaryChance; +extern const s16 gBiteSecondaryChance; +extern const s16 gHeadbuttSecondaryChance; +extern const s16 gFakeOutSecondaryChance; +extern const s16 gSkyAttackSecondaryChance; +extern const s16 gRockSlideSecondaryChance; +extern const s16 gMovesConfusionSecondaryChance; +extern const s16 gDizzyPunchSecondaryChance; +extern const s16 gTriAttackSecondaryChance; +extern const s16 gBlazeKickSecondaryChance; extern const s16 gMuddyWaterAccLowerChance; extern const s16 gOctazookaAccLowerChance; extern const s16 gAuroraBeamAtkLowerChance; extern const s16 gSecretPowerSecondaryEffectChance; extern const s16 gMovesConstrictionChance; -extern const s16 gSnoreFlinchChance; +extern const s16 gSnoreSecondaryChance; extern const s16 gShedSkinActivateChance; extern const s16 gGrimyTrapActivateChance; diff --git a/ld_script.txt b/ld_script.txt index 16329d847..4dc26c21e 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -538,9 +538,7 @@ SECTIONS { data/data_80F4468.o(.rodata); src/dungeon_ai_movement.o(.rodata); data/data_80F4D44.o(.rodata); - src/status_checks.o(.rodata); - data/data_80F4DB4.o(.rodata); - src/dungeon_config.o(.rodata); + src/dungeon_config.o(.rodata); data/data_80F59C8.o(.rodata); src/dungeon_message.o(.rodata); src/dungeon_move.o(.rodata); diff --git a/src/code_806E8B0.c b/src/code_806E8B0.c index f1e2b16c6..6a309738e 100644 --- a/src/code_806E8B0.c +++ b/src/code_806E8B0.c @@ -39,8 +39,6 @@ extern const s16 gUnknown_810AC64; extern const s16 gUnknown_810AC66; extern const s16 gUnknown_810AC68; extern const s16 gUnknown_810AC62; -extern const s16 gUnknown_80F4DAE; -extern const s16 gUnknown_80F4DB0; extern s48_16 gUnknown_8106F24; extern s48_16 gUnknown_8106F04; extern s48_16 gUnknown_8106F1C; @@ -359,15 +357,15 @@ void CalcDamage(Entity *attacker, Entity *target, u8 moveType, s32 movePower, s3 } else { if (HasHeldItem(attacker, ITEM_SCOPE_LENS)) { - critOdds += gUnknown_80F4DAE; + critOdds += gCritOddsScopeLensPatsyBand; gDungeon->unk134.unk164 = 1; } if (HasHeldItem(target, ITEM_PATSY_BAND)) { - critOdds += gUnknown_80F4DAE; + critOdds += gCritOddsScopeLensPatsyBand; gDungeon->unk134.unk165 = 1; } if (r5 && IQSkillIsEnabled(attacker, IQ_TYPE_ADVANTAGE_MASTER)) { - critOdds = gUnknown_80F4DB0; + critOdds = gCritOddsIqAdvantageMaster; gDungeon->unk134.unk169 = 1; } } diff --git a/src/code_80718D8.c b/src/code_80718D8.c index a63165289..76fb35877 100644 --- a/src/code_80718D8.c +++ b/src/code_80718D8.c @@ -1,6 +1,7 @@ #include "global.h" #include "constants/tactic.h" #include "dungeon_capabilities.h" +#include "dungeon_config.h" #include "dungeon_pokemon_attributes.h" #include "dungeon_leader.h" #include "dungeon_message.h" @@ -21,11 +22,6 @@ EWRAM_DATA s32 gUnknown_202F31C[2] = {0, 0}; EWRAM_DATA s32 gUnknown_202F324[2] = {0, 0}; -extern s16 gUnknown_80F4DA6; -extern s16 gUnknown_80F4DA8; -extern s16 gUnknown_80F4DAA; -extern s16 gUnknown_80F4DAC; - extern u8 *gUnknown_80F9ACC[]; extern u8 *gUnknown_80F9AEC[]; extern u8 *gUnknown_80F9B10[]; diff --git a/src/code_8077274_1.c b/src/code_8077274_1.c index 9fcaedca0..e57804143 100644 --- a/src/code_8077274_1.c +++ b/src/code_8077274_1.c @@ -1638,8 +1638,6 @@ _WakeUp: extern s16 sub_803D970(u32); extern void sub_804178C(u32); -extern const s16 gUnknown_80F4DA2; -extern const s16 gUnknown_80F4DA4; void sub_807AB38(Entity *entity, bool8 forcedMonsterHouse) { @@ -1697,7 +1695,7 @@ void sub_807AB38(Entity *entity, bool8 forcedMonsterHouse) } } - randMonstersCount = DungeonRandRange(gUnknown_80F4DA2, gUnknown_80F4DA4); + randMonstersCount = DungeonRandRange(gMonsterHouseMinMons, gMonsterHouseMaxMons); if (randMonstersCount >= count) randMonstersCount = count; diff --git a/src/dungeon_ai_attack.c b/src/dungeon_ai_attack.c index 1eb68997f..38b58a35e 100644 --- a/src/dungeon_ai_attack.c +++ b/src/dungeon_ai_attack.c @@ -82,7 +82,7 @@ void ChooseAIMove(Entity *pokemon) if (CannotAttack(pokemon, FALSE) || ShouldMonsterRunAwayAndShowEffect(pokemon, TRUE) || IsTacticSet(pokemon, TACTIC_KEEP_YOUR_DISTANCE) || - (pokemonInfo->cringeClassStatus.status == STATUS_CONFUSED && DungeonRandOutcome(gConfusedAttackChance))) + (pokemonInfo->cringeClassStatus.status == STATUS_CONFUSED && DungeonRandOutcome(gAIConfusedAttackChance))) { return; } diff --git a/src/dungeon_config.c b/src/dungeon_config.c index c4067f431..d6408c0d6 100644 --- a/src/dungeon_config.c +++ b/src/dungeon_config.c @@ -1,4 +1,5 @@ #include "global.h" +#include "globaldata.h" #include "dungeon_config.h" #include "math.h" #include "constants/weather.h" @@ -116,14 +117,66 @@ extern bool8 FakeOutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 extern bool8 HandleRegularDamagingMove(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern bool8 StunSporeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -// Huge list of various config variables for dungeon moves/music/abilities/items/etc. All in one file, because these are scattered all around the codebase. +// Huge list of various config variables for dungeon moves/music/abilities/items/etc. All in one file, because these are scattered all around the codebase with only one pksdir present. +// Monster House config +const s16 gMonsterHouseMaxItemsTraps = 7; // Items and traps are included together +const s16 gMonsterHouseMinMons = 8; +const s16 gMonsterHouseMaxMons = 12; +// ? See sub_8071B48 +const s16 gUnknown_80F4DA6 = 10; +const s16 gUnknown_80F4DA8 = 4; +const s16 gUnknown_80F4DAA = 36; +const s16 gUnknown_80F4DAC = 5; +const s16 gCritOddsScopeLensPatsyBand = 40; +const s16 gCritOddsIqAdvantageMaster = 40; + +const s16 gAIConfusedAttackChance = 70; +// Various moves' secondary effect percent chance +const s16 gIronTailSecondaryChance = 30; +const s16 gBubbleSecondaryChance = 10; +const s16 gFlameWheelSecondaryChance = 10; +const s16 gFireMoveBurnSecondaryChance = 10; +const s16 gIceMoveFreezeSecondaryChance = 10; +const s16 gPoisonStingSecondaryChance = 18; +const s16 gPsychicSecondaryChance = 10; +const s16 gShadowBallSecondaryChance = 20; +const s16 gSmogSecondaryChance = 40; +const s16 gPoisonTailSecondaryChance = 10; +const s16 gTwineedleSecondaryChance = 20; +const s16 gPoisonFangSecondaryChance = 30; +const s16 gBounceSecondaryChance = 30; +const s16 gMetalClawSecondaryChance = 10; +const s16 gMeteorMashSecondaryChance = 20; +const s16 gSteelWingSecondaryChance = 10; +const s16 gConstrictBubblebeamSecondaryChance = 10; +const s16 gAncientPowerSecondaryChance = 10; +const s16 gMistBallSecondaryChance = 50; +const s16 gCrushClawSecondaryChance = 50; +const s16 gLusterPurgeSecondaryChance = 50; +UNUSED static const s16 sUnusedConfig5 = 50; +const s16 gSacredFireSecondaryChance = 50; +const s16 gThundershockSecondaryChance = 10; +const s16 gLickSecondaryChance = 15; +const s16 gThunderSecondaryChance = 20; +const s16 gThunderboltSecondaryChance = 10; +const s16 gExtrasensorySecondaryChance = 10; +const s16 gTwisterSecondaryChance = 15; +const s16 gBiteSecondaryChance = 20; +const s16 gHeadbuttSecondaryChance = 25; +const s16 gFakeOutSecondaryChance = 35; +const s16 gSkyAttackSecondaryChance = 25; +const s16 gRockSlideSecondaryChance = 30; +const s16 gMovesConfusionSecondaryChance = 10; +const s16 gDizzyPunchSecondaryChance = 30; +const s16 gTriAttackSecondaryChance = 20; +const s16 gBlazeKickSecondaryChance = 10; const s16 gMuddyWaterAccLowerChance = 40; const s16 gOctazookaAccLowerChance = 60; const s16 gAuroraBeamAtkLowerChance = 60; const s16 gSecretPowerSecondaryEffectChance = 30; const s16 gMovesConstrictionChance = 10; // Fire Spin, Whirlpool, Clamp, Bind, Sand Tomb -const s16 gSnoreFlinchChance = 30; +const s16 gSnoreSecondaryChance = 30; // Activation chance of abilities/traps const s16 gShedSkinActivateChance = 50; const s16 gGrimyTrapActivateChance = 30; diff --git a/src/dungeon_generation.c b/src/dungeon_generation.c index edd68b72f..3e704cbf8 100644 --- a/src/dungeon_generation.c +++ b/src/dungeon_generation.c @@ -4033,8 +4033,6 @@ static void ShuffleSpawnPositions(struct PositionU8 *spawns, s32 count) * * See below for specific conditions on each type of spawn. */ -extern const s16 gUnknown_80F4DA0; -extern const s16 gUnknown_80F4DA4; static void SpawnNonEnemies(FloorProperties *floorProps, bool8 isEmptyMonsterHouse) { struct PositionU8 validSpawns[DUNGEON_MAX_SIZE_X * DUNGEON_MAX_SIZE_Y]; @@ -4231,20 +4229,20 @@ static void SpawnNonEnemies(FloorProperties *floorProps, bool8 isEmptyMonsterHou if (count != 0) { // Choose a subset of the available tiles to spawn stuff on - s32 numItems = DungeonRandRange((count / 2), (count * 8) / 10); + s32 numItemsTraps = DungeonRandRange((count / 2), (count * 8) / 10); - if (numItems < 6) { - numItems = 6; + if (numItemsTraps < 6) { + numItemsTraps = 6; } // Cap item spawns at 7 (normally) - if (numItems >= gUnknown_80F4DA0) { - numItems = gUnknown_80F4DA0; + if (numItemsTraps >= gMonsterHouseMaxItemsTraps) { + numItemsTraps = gMonsterHouseMaxItemsTraps; } // Randomly select among the valid item spawn spots ShuffleSpawnPositions(validSpawns, count); randIndex = DungeonRandInt(count); - for (i = 0; i < numItems; i++) { + for (i = 0; i < numItemsTraps; i++) { Tile *tile = GetTileMut(validSpawns[randIndex].x, validSpawns[randIndex].y); // 50/50 chance of spawning an item or a trap @@ -4460,7 +4458,7 @@ static void SpawnEnemies(FloorProperties *floorProps, bool8 isEmptyMonsterHouse) // This floor was marked to force a monster house // Place extra enemy spawns in the Monster House room - numMonsterHouseEnemies = gUnknown_80F4DA4; + numMonsterHouseEnemies = gMonsterHouseMaxMons; count = 0; if (isEmptyMonsterHouse) { // An "empty" monster house only spawns 3 enemies diff --git a/src/move_actions.c b/src/move_actions.c index 98f888023..942b536f2 100644 --- a/src/move_actions.c +++ b/src/move_actions.c @@ -40,42 +40,26 @@ extern u8 *gUnknown_80FE3BC[]; extern u8 *gUnknown_80FE38C[]; extern u8 *gUnknown_80FC888[]; extern u8 *gUnknown_80FC8C0[]; -extern s16 gUnknown_80F4DEA; extern u8 *gUnknown_80FEB88[]; -extern s16 gUnknown_80F4DE8; extern u8 *gUnknown_80FAD6C[]; -extern s16 gUnknown_80F4DE4; extern u8 *gUnknown_80FBD58[]; -extern s16 gUnknown_80F4DC0; -extern s16 gUnknown_80F4DF8; -extern s16 gUnknown_80F4DD0; -extern s16 gUnknown_80F4DBC; extern u8 *gUnknown_80FACC4[]; -extern s16 gUnknown_80F4DF4; extern u8 gUnknown_202F21A; -extern s16 gUnknown_80F4DD6; extern u8 gUnknown_202F219; extern u8 *gUnknown_80FACA4[]; extern u8 *gUnknown_80FD104[]; -extern s16 gUnknown_80F4DD4; -extern u32 gUnknown_80F4DE6; -extern u32 gUnknown_80F4DEE; -extern u32 gUnknown_80F4DC2; extern u8 *gUnknown_80FD294[]; extern u8 *gUnknown_80FD2B4[]; extern u8 *gUnknown_80FAC74[]; extern u8 *gUnknown_80FAC54[]; -extern s16 gUnknown_80F4DB8; -extern s16 gUnknown_80F4DBA; extern u8 *gUnknown_80FAE00[]; extern u8 *gUnknown_80FADD8[]; -extern s16 gUnknown_80F4DB6; extern u8 *gUnknown_80FAC88; extern u8 *gUnknown_80FD018[]; extern u8 *gUnknown_80FCFBC[]; extern u8 *gUnknown_80FCFE4[]; extern u32 gUnknown_8106A4C; -extern s16 gUnknown_80F4DF6; +extern s16 gRockSlideSecondaryChance; extern u8 *gUnknown_80FC734[]; extern u8 *gUnknown_80FC7EC[]; extern u8 *gUnknown_80FCF74[]; @@ -84,18 +68,13 @@ extern u32 gUnknown_8106A50; extern u8 *gUnknown_80FD14C[]; extern u8 *gUnknown_80FAD4C[]; extern s24_8 gUnknown_8106A54[]; -extern s16 gUnknown_80F4DF0; -extern s16 gUnknown_80F4DE0; -extern s16 gUnknown_80F4DC4; extern u8 *gUnknown_80FCF78[]; -extern s16 gUnknown_80F4DF0; extern u8 *gUnknown_80FACFC[]; extern u8 *gUnknown_80FACE4[]; extern u8 *gUnknown_80FEB8C[]; extern u32 gUnknown_8106A4C; extern u32 gUnknown_8106A50; -extern s16 gUnknown_80F4DC8; -extern s16 gUnknown_80F4DEC; + extern s16 gUnknown_80F4E00; extern u8 *gUnknown_80FD128[]; extern u8 *gUnknown_80FAD2C[]; @@ -108,9 +87,7 @@ extern u8 *gUnknown_80FC81C[]; extern u8 *gUnknown_80FC854[]; extern u8 *gUnknown_80FCF7C[]; extern u8 *gUnknown_80FC730[]; -extern s16 gUnknown_80F4DF2; extern u8 *gUnknown_80FC770[]; -extern s16 gUnknown_80F4DD2; extern u8 *gUnknown_80FCA3C[]; extern u8 *gUnknown_80FD170[]; extern u8 *gUnknown_80FCCE8[]; @@ -118,18 +95,10 @@ extern u8 *gUnknown_80FD18C[]; extern u8 *gUnknown_80FD57C[]; extern u8 *gUnknown_80FEBDC[]; extern u8 *gUnknown_80FC5CC[]; -extern s16 gUnknown_80F4DFA; extern u8 *gUnknown_81004EC[]; -extern s16 gUnknown_80F4DDA; -extern s16 gUnknown_80F4DFE; extern u8 *gUnknown_81004EC[]; -extern s16 gUnknown_80F4DFC; extern u8 *gUnknown_80FC7C8[]; extern u8 *gUnknown_80FAD10[]; -extern s16 gUnknown_80F4DCC; -extern s16 gUnknown_80F4DBE; -extern s16 gUnknown_80F4DCA; -extern s16 gUnknown_80F4DE2; extern u8 *gUnknown_80FEB90[]; extern u8 *gUnknown_80FEB60[]; extern u8 *gUnknown_80FE330[]; @@ -175,7 +144,6 @@ u8 ToItemID(u32 param_1); extern s16 sub_8094828(u16, u8); extern void DealDamageToEntity(Entity *, s32, u32, u32); -extern s16 gUnknown_80F4DB4; extern u32 gUnknown_8106A4C; bool8 MoveRequiresCharging(Entity* pokemon, u16 moveID) @@ -244,7 +212,7 @@ bool8 IronTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_ flag = FALSE; if (HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) { flag = TRUE; - if (sub_805727C(pokemon, target, gUnknown_80F4DB4)) { + if (sub_805727C(pokemon, target, gIronTailSecondaryChance)) { LowerDefenseStageTarget(pokemon, target, gUnknown_8106A4C, 1, 1, FALSE); } } @@ -364,7 +332,7 @@ bool32 BubbleMoveAction(Entity *pokemon, Entity *target, Move * move, u32 param_ flag = FALSE; if (HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) { flag = TRUE; - if (sub_805727C(pokemon,target, gUnknown_80F4DB6)) { + if (sub_805727C(pokemon,target, gBubbleSecondaryChance)) { LowerMovementSpeedTarget(pokemon, target, 1, FALSE); } } @@ -504,7 +472,7 @@ bool8 SnoreMoveAction(Entity *pokemon, Entity *target, Move * move, u32 param_4) if (IsSleeping(pokemon)) { if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if (sub_805727C(pokemon,target,gSnoreFlinchChance)) { + if (sub_805727C(pokemon,target,gSnoreSecondaryChance)) { CringeStatusTarget(pokemon,target,FALSE); } } @@ -528,7 +496,7 @@ bool8 RockSlideMoveAction(Entity *pokemon, Entity *target, Move * move, u32 para flag = FALSE; if (HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) { flag = TRUE; - if (sub_805727C(pokemon,target,gUnknown_80F4DF6)) { + if (sub_805727C(pokemon,target,gRockSlideSecondaryChance)) { CringeStatusTarget(pokemon,target,FALSE); } } @@ -761,7 +729,7 @@ bool8 FlameWheelMoveAction(Entity *pokemon, Entity *target, Move *move, u32 para SendThawedMessage(pokemon, target); if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DB8)) + if(sub_805727C(pokemon, target, gFlameWheelSecondaryChance)) { BurnedStatusTarget(pokemon, target, 0, FALSE); } @@ -778,7 +746,7 @@ bool8 BasicFireMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param SendThawedMessage(pokemon, target); if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DBA)) + if(sub_805727C(pokemon, target, gFireMoveBurnSecondaryChance)) { BurnedStatusTarget(pokemon, target, 0, FALSE); } @@ -878,7 +846,7 @@ bool8 ShadowBallMoveAction(Entity *pokemon, Entity *target, Move *move, u32 para flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DC2)) + if(sub_805727C(pokemon, target, gShadowBallSecondaryChance)) { LowerDefenseStageTarget(pokemon, target, gUnknown_8106A50, 1, 1, FALSE); } @@ -893,7 +861,7 @@ bool8 BiteMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DEE)) + if(sub_805727C(pokemon, target, gBiteSecondaryChance)) { CringeStatusTarget(pokemon, target, FALSE); } @@ -908,7 +876,7 @@ bool8 ThunderMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4 flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DE6)) + if(sub_805727C(pokemon, target, gThunderSecondaryChance)) { ParalyzeStatusTarget(pokemon, target, FALSE); } @@ -956,7 +924,7 @@ bool8 sub_8058580(Entity *pokemon, Entity *target, Move *move, u32 param_4) flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DD4)) + if(sub_805727C(pokemon, target, gConstrictBubblebeamSecondaryChance)) { LowerMovementSpeedTarget(pokemon, target, 1, FALSE); } @@ -1135,7 +1103,7 @@ bool8 AncientPowerMoveAction(Entity *pokemon, Entity *target, Move *move, u32 pa if(HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) { flag = TRUE; - if(RollSecondaryEffect(pokemon, gUnknown_80F4DD6)) + if(RollSecondaryEffect(pokemon, gAncientPowerSecondaryChance)) { entityInfo = GetEntInfo(pokemon); RaiseMovementSpeedTarget(pokemon, pokemon, 0, TRUE); @@ -1198,7 +1166,7 @@ bool8 SkyAttackMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param { if (HandleDamagingMove(pokemon, target, move, gSkyAttackModifier, param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DF4)) + if(sub_805727C(pokemon, target, gSkyAttackSecondaryChance)) CringeStatusTarget(pokemon, target, FALSE); } sub_8079764(pokemon); @@ -1218,7 +1186,7 @@ bool8 BasicIceMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_ flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DBC)) + if(sub_805727C(pokemon, target, gIceMoveFreezeSecondaryChance)) { FrozenStatusTarget(pokemon, target, FALSE); } @@ -1234,7 +1202,7 @@ bool8 MeteorMashMoveAction(Entity *pokemon, Entity *target, Move *move, u32 para flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, pokemon, gUnknown_80F4DD0)) + if(sub_805727C(pokemon, pokemon, gMeteorMashSecondaryChance)) { entityInfo = GetEntInfo(pokemon); RaiseAttackStageTarget(pokemon, pokemon, gUnknown_8106A4C, 1); @@ -1263,7 +1231,7 @@ bool8 sub_8058C00(Entity *pokemon, Entity *target, Move *move, u32 param_4) flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DF8)) + if(sub_805727C(pokemon, target, gMovesConfusionSecondaryChance)) { ConfuseStatusTarget(pokemon, target, FALSE); } @@ -1295,7 +1263,7 @@ bool8 sub_8058C98(Entity *pokemon, Entity *target, Move *move, u32 param_4, u32 flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_5) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DC0)) + if(sub_805727C(pokemon, target, gPsychicSecondaryChance)) { LowerDefenseStageTarget(pokemon, target, param_4, 1, 1, FALSE); } @@ -1446,7 +1414,7 @@ bool8 LickMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DE4)) + if(sub_805727C(pokemon, target, gLickSecondaryChance)) { ParalyzeStatusTarget(pokemon, target, FALSE); } @@ -1479,7 +1447,7 @@ bool8 ThunderboltMoveAction(Entity *pokemon, Entity *target, Move *move, u32 par flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DE8)) + if(sub_805727C(pokemon, target, gThunderboltSecondaryChance)) { ParalyzeStatusTarget(pokemon, target, FALSE); } @@ -1524,7 +1492,7 @@ bool8 ExtrasensoryMoveAction(Entity *pokemon, Entity *target, Move *move, u32 pa flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DEA)) + if(sub_805727C(pokemon, target, gExtrasensorySecondaryChance)) { CringeStatusTarget(pokemon, target, FALSE); } @@ -1647,7 +1615,7 @@ bool8 HeadbuttMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_ flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DF0)) + if(sub_805727C(pokemon, target, gHeadbuttSecondaryChance)) { CringeStatusTarget(pokemon, target, FALSE); } @@ -1702,7 +1670,7 @@ bool8 SmogMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DC4)) + if(sub_805727C(pokemon, target, gSmogSecondaryChance)) { PoisonedStatusTarget(pokemon, target, FALSE); } @@ -1723,7 +1691,7 @@ bool8 SacredFireMoveAction(Entity *pokemon, Entity *target, Move *move, u32 para flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DE0)) + if(sub_805727C(pokemon, target, gSacredFireSecondaryChance)) { BurnedStatusTarget(pokemon, target, 0, FALSE); } @@ -1855,7 +1823,7 @@ bool8 TwisterMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4 if (HandleDamagingMove(pokemon,target,move,IntToF248_2(modifierInt),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon,target,gUnknown_80F4DEC) != 0) { + if(sub_805727C(pokemon,target,gTwisterSecondaryChance) != 0) { CringeStatusTarget(pokemon,target,FALSE); } } @@ -1872,7 +1840,7 @@ bool8 TwineedleMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param gUnknown_202F218 = 1; } if (((gUnknown_202F218 != 0) && (gUnknown_202F214 == 2)) && - (sub_805727C(pokemon,target,gUnknown_80F4DC8) != 0)) { + (sub_805727C(pokemon,target,gTwineedleSecondaryChance) != 0)) { PoisonedStatusTarget(pokemon,target,FALSE); } return flag; @@ -2032,7 +2000,7 @@ bool8 ThundershockMoveAction(Entity *pokemon, Entity *target, Move *move, u32 pa flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DE2)) + if(sub_805727C(pokemon, target, gThundershockSecondaryChance)) { ParalyzeStatusTarget(pokemon, target, FALSE); } @@ -2086,7 +2054,7 @@ bool8 PoisonFangMoveAction(Entity *pokemon, Entity *target, Move *move, u32 para flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DCA)) + if(sub_805727C(pokemon, target, gPoisonFangSecondaryChance)) { BadlyPoisonedStatusTarget(pokemon, target, FALSE); } @@ -2101,7 +2069,7 @@ bool8 PoisonStingMoveAction(Entity *pokemon, Entity *target, Move *move, u32 par flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DBE)) + if(sub_805727C(pokemon, target, gPoisonStingSecondaryChance)) { PoisonedStatusTarget(pokemon, target, FALSE); } @@ -2146,7 +2114,7 @@ bool8 BounceMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4) if (MoveMatchesBideClassStatus(pokemon, move)) { if (HandleDamagingMove(pokemon, target, move, gBounceModifier, param_4) != 0) { flag = TRUE; - if (sub_805727C(pokemon, target, gUnknown_80F4DCC) != 0) { + if (sub_805727C(pokemon, target, gBounceSecondaryChance) != 0) { ParalyzeStatusTarget(pokemon, target, FALSE); } } @@ -2196,7 +2164,7 @@ bool8 TriAttackMoveAction(Entity * pokemon, Entity * target, Move *move, u32 par if(HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4)) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DFC)) + if(sub_805727C(pokemon, target, gTriAttackSecondaryChance)) { switch(DungeonRandInt(3)) { @@ -2397,7 +2365,7 @@ bool8 FakeOutMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4 flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DF2)) + if(sub_805727C(pokemon, target, gFakeOutSecondaryChance)) { CringeStatusTarget(pokemon, target, FALSE); } @@ -2504,7 +2472,7 @@ bool8 SteelWingMoveAction(Entity *pokemon, Entity *target, Move *move, u32 stat, flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_5) != 0) { flag = TRUE; - if (sub_805727C(pokemon,pokemon,gUnknown_80F4DD2) != 0) { + if (sub_805727C(pokemon,pokemon,gSteelWingSecondaryChance) != 0) { entityInfo = GetEntInfo(pokemon); RaiseDefenseStageTarget(pokemon,pokemon,stat,1); SetExpMultplier(entityInfo); @@ -2793,7 +2761,7 @@ bool8 sub_805AC90(Entity * pokemon, Entity * target, Move *move, u32 param_4) flag = FALSE; if ( HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) { flag = TRUE; - if (sub_805727C(pokemon,target,gUnknown_80F4DFA) != 0) { + if (sub_805727C(pokemon,target,gDizzyPunchSecondaryChance) != 0) { ConfuseStatusTarget(pokemon, target, FALSE); } } @@ -2874,7 +2842,7 @@ bool8 CrushClawMoveAction(Entity * pokemon, Entity * target, Move *move, u32 par flag = FALSE; if ( HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) { flag = TRUE; - if (sub_805727C(pokemon,target,gUnknown_80F4DDA) != 0) { + if (sub_805727C(pokemon,target,gCrushClawSecondaryChance) != 0) { LowerDefenseStageTarget(pokemon, target, gUnknown_8106A4C, 1, 1, FALSE); } } @@ -2889,7 +2857,7 @@ bool8 BlazeKickMoveAction(Entity * pokemon, Entity * target, Move *move, u32 par SendThawedMessage(pokemon, target); if ( HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) { flag = TRUE; - if (sub_805727C(pokemon,target,gUnknown_80F4DFE) != 0) { + if (sub_805727C(pokemon,target,gBlazeKickSecondaryChance) != 0) { BurnedStatusTarget(pokemon, target, 0, FALSE); } } diff --git a/src/status_actions.c b/src/status_actions.c index f26b31c6b..39f43b6e7 100644 --- a/src/status_actions.c +++ b/src/status_actions.c @@ -84,7 +84,6 @@ extern void sub_80783C4(Entity *, Entity *, bool8); // TODO The parameters don't match the function definition in pokemon_mid.h (u8*, s16). extern void CopyCyanMonsterNametoBuffer(u8 *buffer, s32 index); -extern s16 gUnknown_80F4DCE; extern u8 *gUnknown_80FDD00[]; extern u8 *gUnknown_80FDCE4[]; extern u32 gUnknown_8106A50; @@ -113,10 +112,8 @@ extern u8 *gUnknown_80FD430[]; extern u8 *gUnknown_80FD40C[]; extern u8 *gUnknown_80FD3F0[]; extern u32 gUnknown_8106A50; -extern s16 gUnknown_80F4DDC; extern u8 *gUnknown_80FDCA0[]; extern u8 *gUnknown_80FDC9C[]; -extern s16 gUnknown_80F4DD8; extern u32 gUnknown_202F224; extern u32 gUnknown_8106A8C[]; extern u8 *gUnknown_80FC5A8[]; @@ -124,7 +121,6 @@ extern u8 *gPtrForecastPreventsTypeSwitchMessage[]; extern u8 *gUnknown_80FEB08[]; extern u32 gMetronomeCalledArrayId; -extern s16 gUnknown_80F4DC6; extern u8 *gUnknown_80FEFF4[]; bool8 EruptionMoveAction(Entity * pokemon, Entity * target, Move *move, u32 param_4) @@ -180,7 +176,7 @@ bool8 PoisonTailMoveAction(Entity * pokemon, Entity * target, Move *move, s32 pa flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if (sub_805727C(pokemon,target,gUnknown_80F4DC6) != 0) { + if (sub_805727C(pokemon,target,gPoisonTailSecondaryChance) != 0) { PoisonedStatusTarget(pokemon,target,FALSE); } } @@ -336,7 +332,7 @@ bool8 MistBallMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_ flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if (sub_805727C(pokemon,target,gUnknown_80F4DD8) != 0) { + if (sub_805727C(pokemon,target,gMistBallSecondaryChance) != 0) { LowerAttackStageTarget(pokemon,target,gUnknown_8106A50,1,1,0); } } @@ -382,7 +378,7 @@ bool8 MetalClawMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_5) != 0) { flag = TRUE; - if (sub_805727C(pokemon,pokemon,gUnknown_80F4DCE) != 0) { + if (sub_805727C(pokemon,pokemon,gMetalClawSecondaryChance) != 0) { entityInfo = GetEntInfo(pokemon); RaiseAttackStageTarget(pokemon,pokemon,param_4,1); SetExpMultplier(entityInfo); @@ -593,7 +589,7 @@ bool8 LusterPurgeMoveAction(Entity * pokemon, Entity * target, Move * move, s32 flag = FALSE; if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) { flag = TRUE; - if(sub_805727C(pokemon, target, gUnknown_80F4DDC)) + if(sub_805727C(pokemon, target, gLusterPurgeSecondaryChance)) { LowerDefenseStageTarget(pokemon, target, gUnknown_8106A50, 1, 1, 0); } diff --git a/src/status_checks.c b/src/status_checks.c index ba7692c38..8ee12c013 100644 --- a/src/status_checks.c +++ b/src/status_checks.c @@ -13,8 +13,6 @@ #include "dungeon_capabilities.h" #include "dungeon_random.h" -const s16 gConfusedAttackChance = 70; - extern const char *gPtrFrozenMessage[]; extern const char *gPtrWrappedAroundMessage[]; extern const char *gPtrWrappedByMessage[];