Skip to content

Commit

Permalink
dungeon config done
Browse files Browse the repository at this point in the history
  • Loading branch information
DizzyEggg committed Dec 4, 2024
1 parent 9b490b5 commit c9e26ca
Show file tree
Hide file tree
Showing 13 changed files with 158 additions and 337 deletions.
42 changes: 1 addition & 41 deletions data/data_80F4D44.s
Original file line number Diff line number Diff line change
Expand Up @@ -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
189 changes: 0 additions & 189 deletions data/data_80F4DB4.s

This file was deleted.

49 changes: 48 additions & 1 deletion include/dungeon_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 1 addition & 3 deletions ld_script.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 3 additions & 5 deletions src/code_806E8B0.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
}
Expand Down
6 changes: 1 addition & 5 deletions src/code_80718D8.c
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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[];
Expand Down
4 changes: 1 addition & 3 deletions src/code_8077274_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1638,8 +1638,6 @@ void sub_807AA30(void)

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)
{
Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/dungeon_ai_attack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Loading

0 comments on commit c9e26ca

Please sign in to comment.