diff --git a/asm/code_807E5AC.s b/asm/code_807E5AC.s index c76ea9a99..9a7a1cc22 100644 --- a/asm/code_807E5AC.s +++ b/asm/code_807E5AC.s @@ -2101,7 +2101,7 @@ _0807F99C: bx r0 .align 2, 0 _0807F9AC: .4byte 0x00000163 -_0807F9B0: .4byte gUnknown_80F4F92 +_0807F9B0: .4byte gHurlOrbDmgValue _0807F9B4: .4byte 0x0000021a _0807F9B8: .4byte 0x00000219 thumb_func_end sub_807F43C diff --git a/data/data_80F4E2C.s b/data/data_80F4E2C.s index 11d89302f..4ad3c32c8 100644 --- a/data/data_80F4E2C.s +++ b/data/data_80F4E2C.s @@ -2,213 +2,6 @@ - .global gUnknown_80F4F8C -gUnknown_80F4F8C: @ 80F4F8C -@ replacing .incbin "baserom.gba", 0x000f4f8c, 0x2 -.byte 0x23, 0x00 - - .global gUnknown_80F4F8E -gUnknown_80F4F8E: @ 80F4F8E -@ replacing .incbin "baserom.gba", 0x000f4f8e, 0x2 -.byte 0x05, 0x00 - - .global gUnknown_80F4F90 -gUnknown_80F4F90: @ 80F4F90 -@ replacing .incbin "baserom.gba", 0x000f4f90, 0x2 -.byte 0x05, 0x00 - - .global gUnknown_80F4F92 -gUnknown_80F4F92: @ 80F4F92 -@ replacing .incbin "baserom.gba", 0x000f4f92, 0x2 -.byte 0x0a, 0x00 - - .global gUnknown_80F4F94 -gUnknown_80F4F94: @ 80F4F94 -@ replacing .incbin "baserom.gba", 0x000f4f94, 0xe - .byte 0x05, 0x00 - .byte 0x0a, 0x00 - .byte 0x0f, 0x00 - .byte 0x19, 0x00 - .byte 0x1e, 0x00 - .byte 0x23, 0x00 - .byte 0x28, 0x00 - - .global gUnknown_80F4FA2 -gUnknown_80F4FA2: @ 80F4FA2 -@ replacing .incbin "baserom.gba", 0x000f4fa2, 0x2 -.byte 0x5a, 0x00 - - .global gUnknown_80F4FA4 -gUnknown_80F4FA4: @ 80F4FA4 -@ replacing .incbin "baserom.gba", 0x000f4fa4, 0x2 - .byte 0x14, 0x00 - - .global gUnknown_80F4FA6 -gUnknown_80F4FA6: @ 80F4FA6 -@ replacing .incbin "baserom.gba", 0x000f4fa6, 0x2 - .byte 0x2d, 0x00 - - .global gUnknown_80F4FA8 -gUnknown_80F4FA8: @ 80F4FA8 -@ replacing .incbin "baserom.gba", 0x000f4fa8, 0x2 - .byte 0x0f, 0x00 - - .global gUnknown_80F4FAA -gUnknown_80F4FAA: @ 80F4FAA -@ replacing .incbin "baserom.gba", 0x000f4faa, 0x2 - .byte 0x1e, 0x00 - - .global gUnknown_80F4FAC -gUnknown_80F4FAC: @ 80F4FAC -@ replacing .incbin "baserom.gba", 0x000f4fac, 0x2 - .byte 0x01, 0x00 - - .global gUnknown_80F4FAE -gUnknown_80F4FAE: @ 80F4FAE -@ replacing .incbin "baserom.gba", 0x000f4fae, 0x4 - .byte 0x02, 0x00 - .byte 0x19, 0x00 - - .global gUnknown_80F4FB2 -gUnknown_80F4FB2: @ 80F4FB2 -@ replacing .incbin "baserom.gba", 0x000f4fb2, 0x2 - .byte 0x0a, 0x00 - - .global gUnknown_80F4FB4 -gUnknown_80F4FB4: @ 80F4FB4 -@ replacing .incbin "baserom.gba", 0x000f4fb4, 0x2 - .byte 0x0a, 0x00 - - .global gUnknown_80F4FB6 -gUnknown_80F4FB6: @ 80F4FB6 -@ replacing .incbin "baserom.gba", 0x000f4fb6, 0x2 - .byte 0x64, 0x00 - - .global gUnknown_80F4FB8 -gUnknown_80F4FB8: @ 80F4FB8 -@ replacing .incbin "baserom.gba", 0x000f4fb8, 0x2 - .byte 0x00, 0x00 - - .global gUnknown_80F4FBA -gUnknown_80F4FBA: @ 80F4FBA -@ replacing .incbin "baserom.gba", 0x000f4fba, 0x2 - .byte 0x64, 0x00 - - .global gUnknown_80F4FBC -gUnknown_80F4FBC: @ 80F4FBC -@ replacing .incbin "baserom.gba", 0x000f4fbc, 0x2 - .byte 0x02, 0x00 - - .global gUnknown_80F4FBE -gUnknown_80F4FBE: @ 80F4FBE -@ replacing .incbin "baserom.gba", 0x000f4fbe, 0x2 - .byte 0x03, 0x00 - - .global gUnknown_80F4FC0 -gUnknown_80F4FC0: @ 80F4FC0 -@ replacing .incbin "baserom.gba", 0x000f4fc0, 0x2 - .byte 0x24, 0xff - - .global gUnknown_80F4FC2 -gUnknown_80F4FC2: @ 80F4FC2 -@ replacing .incbin "baserom.gba", 0x000f4fc2, 0x2 - .byte 0x6a, 0xff - - .global gUnknown_80F4FC4 -gUnknown_80F4FC4: @ 80F4FC4 -@ replacing .incbin "baserom.gba", 0x000f4fc4, 0x2 - .byte 0x9c, 0xff - - .global gUnknown_80F4FC6 -gUnknown_80F4FC6: @ 80F4FC6 -@ replacing .incbin "baserom.gba", 0x000f4fc6, 0x2 - .byte 0x0a, 0x00 - - .global gUnknown_80F4FC8 -gUnknown_80F4FC8: @ 80F4FC8 - .incbin "baserom.gba", 0xF4FC8, 0x3C - - .global gUnknown_80F5004 -gUnknown_80F5004: @ 80F5004 -@ replacing .incbin "baserom.gba", 0x000f5004, 0x2 -.byte 0x03, 0x00 - - .global gUnknown_80F5006 -gUnknown_80F5006: @ 80F5006 -@ replacing .incbin "baserom.gba", 0x000f5006, 0x2 -.byte 0x02, 0x00 - - .global gUnknown_80F5008 -gUnknown_80F5008: @ 80F5008 -@ replacing .incbin "baserom.gba", 0x000f5008, 0x2 -.byte 0x64, 0x00 - - .global gUnknown_80F500A -gUnknown_80F500A: @ 80F500A -@ replacing .incbin "baserom.gba", 0x000f500a, 0x10 -.byte 0x32, 0x00, 0x50, 0x00, 0x1e, 0x00, 0x28, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x01, 0x00, 0x01, 0x00 - - .global gUnknown_80F501A -gUnknown_80F501A: @ 80F501A -@ replacing .incbin "baserom.gba", 0x000f501a, 0x10 -.byte 0x32, 0x00, 0x50, 0x00, 0x1e, 0x00, 0x28, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x01, 0x00, 0x01, 0x00 - - .global gUnknown_80F502A -gUnknown_80F502A: @ 80F502A -@ replacing .incbin "baserom.gba", 0x000f502a, 0x10 -.byte 0x32, 0x00, 0x50, 0x00, 0x1e, 0x00, 0x28, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x01, 0x00, 0x01, 0x00 - - .global gUnknown_80F503A -gUnknown_80F503A: @ 80F503A -@ replacing .incbin "baserom.gba", 0x000f503a, 0x2 -.byte 0x01, 0x00 - - .global gUnknown_80F503C -gUnknown_80F503C: @ 80F503C -@ replacing .incbin "baserom.gba", 0x000f503c, 0x2 -.byte 0x05, 0x00 - - .global gUnknown_80F503E -gUnknown_80F503E: @ 80F503E -@ replacing .incbin "baserom.gba", 0x000f503e, 0x2 -.byte 0x06, 0x00 - - .global gUnknown_80F5040 -gUnknown_80F5040: @ 80F5040 -@ replacing .incbin "baserom.gba", 0x000f5040, 0x2 -.byte 0x07, 0x00 - - .global gUnknown_80F5042 -gUnknown_80F5042: @ 80F5042 -@ replacing .incbin "baserom.gba", 0x000f5042, 0x2 -.byte 0x08, 0x00 - - .global gUnknown_80F5044 -gUnknown_80F5044: @ 80F5044 -@ replacing .incbin "baserom.gba", 0x000f5044, 0x2 -.byte 0x09, 0x00 - - .global gUnknown_80F5046 -gUnknown_80F5046: @ 80F5046 -@ replacing .incbin "baserom.gba", 0x000f5046, 0x2 -.byte 0x14, 0x00 - - .global gUnknown_80F5048 -gUnknown_80F5048: @ 80F5048 -@ replacing .incbin "baserom.gba", 0x000f5048, 0x4 -.byte 0x0f, 0x00, 0x00, 0x00 - - .global gUnknown_80F504C -gUnknown_80F504C: @ 80F504C - .incbin "baserom.gba", 0xF504C, 0x54 - - .global gUnknown_80F50A0 -gUnknown_80F50A0: @ 80F50A0 - .incbin "baserom.gba", 0xF50A0, 0x54 - - .global gUnknown_80F50F4 -gUnknown_80F50F4: @ 80F50F4 - .incbin "baserom.gba", 0xF50F4, 0xA8 .global gUnknown_80F519C gUnknown_80F519C: @ 80F519C diff --git a/include/dungeon_battle_data.h b/include/dungeon_battle_data.h index e7eae296d..9cc407cc5 100644 --- a/include/dungeon_battle_data.h +++ b/include/dungeon_battle_data.h @@ -2,6 +2,7 @@ #define GUARD_DUNGEON_BATTLE_DATA_H #include "math.h" +#include "constants/weather.h" extern const s16 gFreezeTurnRange[2]; extern const s16 gBurnTurnRange[2]; @@ -101,5 +102,47 @@ extern const s16 gSplashDmgValue; extern const s16 gSpikeTrapDmgValue; extern const s16 gChestnutTrapDmgValue; extern const s16 gPitfallTrapDmgValue; +extern const s16 gSetDamageDmgValue; +extern const s16 gHailSandstormDmgValue; +extern const s16 gBlowAwayDmgValue; +extern const s16 gHurlOrbDmgValue; +extern const s16 gMagnitudeDmgValues[7]; +extern const s16 gUnknownDungeonChance; +extern const s16 gBlastSeedThrownDmgValue; +extern const s16 gBlastSeedEatenDmgValue; +extern const s16 gBlastSeedThrownBossDmgValue; +extern const s16 gBlastSeedEatenBossDmgValue; +extern const s16 gUnknown_80F4FAC; +extern const s16 gUnknown_80F4FAE; +extern const s16 gIngrainHealValue; +extern const s16 gLeechSeedHealValue; +extern const s16 gOranBerryHealValue; +extern const s16 gOranBerryMaxHpRiseValue; +extern const s16 gSitrusBerryHealValue; +extern const s16 gSitrusBerryMaxHpRiseValue; +extern const s16 gLifeSeedMaxHpRiseValue; +extern const s16 gWishRegenValue; +extern const s16 gRainDishRegenValue; +extern const s16 gHealRibbonRegenValue; +extern const s16 gFamishBellyDownValue; +#define BAD_POISON_DMG_TURN_VALUES_COUNT 30 +extern const s16 gBadPoisonDmgValuesByTurn[BAD_POISON_DMG_TURN_VALUES_COUNT]; +extern const s16 gStenchTerrifiedTurnsNo; +extern const s16 gPassScarfBellyDownValue; +extern const s16 gFriendBowRecruitRateUpValue; +extern const s16 gSynthesisHealValueByWeather[WEATHER_COUNT]; +extern const s16 gMoonlightHealValueByWeather[WEATHER_COUNT]; +extern const s16 gMorningSunHealValueByWeather[WEATHER_COUNT]; +extern const s16 gStickPPValue; +extern const s16 gIronThornPPValue; +extern const s16 gSilverSpikePPValue; +extern const s16 gGoldFangPPValue; +extern const s16 gCacneaSpikePPValue; +extern const s16 gCorsolaTwigPPValue; +extern const s16 gGravelerockThrownDmgValue; +extern const s16 gGeoPebbleThrownDmgValue; +extern const s24_8 gAtkStatStageMultipliers[21]; +extern const s24_8 gDefStatStageMultipliers[21]; +extern const s24_8 gAccEvsStatStageMultipliers[2][21]; #endif diff --git a/src/code_8048480.c b/src/code_8048480.c index 02c7469c0..52aef28f6 100644 --- a/src/code_8048480.c +++ b/src/code_8048480.c @@ -32,29 +32,8 @@ extern s16 gTypeGummiIQBoost[NUM_TYPES][NUMBER_OF_GUMMIS]; extern u8 *gUnknown_80F89F4[]; extern u8 *gUnknown_80FB580[]; -extern s16 gUnknown_80F4FB6; -extern s16 gUnknown_80F4FB8; -extern s16 gUnknown_80F4FBA; -extern s16 gUnknown_80F4FBC; -extern s16 gUnknown_80F4FBE; -extern s16 gUnknown_80F4FA2; -extern s16 gUnknown_80F4FA4; // 0x14 -extern s16 gUnknown_80F4FA6; // 0x2D -extern s16 gUnknown_80F4FA8; // 0xF -extern s16 gUnknown_80F4FAA; // 0x1E extern u32 gUnknown_8106A4C; extern u32 gUnknown_8106A50; -extern s16 gUnknown_80F4FAC; -extern s16 gUnknown_80F503A; -extern s16 gUnknown_80F503C; -extern s16 gUnknown_80F503E; -extern s16 gUnknown_80F5040; -extern s16 gUnknown_80F5042; -extern s16 gUnknown_80F5044; -extern s16 gUnknown_80F5046; -extern s16 gUnknown_80F5048; -extern s16 gUnknown_80F4FAE; -extern s16 gUnknown_80F4FAC; extern u8 *gUnknown_80FDBB8[]; extern u8 *gUnknown_80FE458[]; @@ -166,7 +145,7 @@ bool8 sub_8047930(Entity *pokemon, Entity *target) return FALSE; } else { - if(DungeonRandInt(100) < gUnknown_80F4FA2) + if(DungeonRandInt(100) < gUnknownDungeonChance) flag = TRUE; else flag = FALSE; @@ -262,28 +241,28 @@ _jump: } switch(item->id) { case ITEM_STICK: - sub_80482FC(pokemon,target,gUnknown_80F503A,1); + sub_80482FC(pokemon,target,gStickPPValue,ITEM_STICK); break; case ITEM_IRON_THORN: - sub_80482FC(pokemon,target,gUnknown_80F503C,2); + sub_80482FC(pokemon,target,gIronThornPPValue,ITEM_IRON_THORN); break; case ITEM_SILVER_SPIKE: - sub_80482FC(pokemon,target,gUnknown_80F503E,3); + sub_80482FC(pokemon,target,gSilverSpikePPValue,ITEM_SILVER_SPIKE); break; case ITEM_GOLD_FANG: - sub_80482FC(pokemon,target,gUnknown_80F5040,4); + sub_80482FC(pokemon,target,gGoldFangPPValue,ITEM_GOLD_FANG); break; case ITEM_CACNEA_SPIKE: - sub_80482FC(pokemon,target,gUnknown_80F5042,5); + sub_80482FC(pokemon,target,gCacneaSpikePPValue,ITEM_CACNEA_SPIKE); break; case ITEM_CORSOLA_TWIG: - sub_80482FC(pokemon,target,gUnknown_80F5044,6); + sub_80482FC(pokemon,target,gCorsolaTwigPPValue,ITEM_CORSOLA_TWIG); break; case ITEM_GEO_PEBBLE: - sub_8048340(pokemon,target,gUnknown_80F5048); + sub_8048340(pokemon,target,gGeoPebbleThrownDmgValue); break; case ITEM_GRAVELEROCK: - sub_8048340(pokemon,target,gUnknown_80F5046); + sub_8048340(pokemon,target,gGravelerockThrownDmgValue); break; case ITEM_HEAL_SEED: HealSeedItemAction(pokemon,target,param_3); @@ -496,12 +475,12 @@ void HealSeedItemAction(Entity *pokemon, Entity *target, u8 r2) void OranBerryItemAction(Entity *pokemon, Entity *target) { - HealTargetHP(pokemon, target, gUnknown_80F4FB6, gUnknown_80F4FB8, TRUE); + HealTargetHP(pokemon, target, gOranBerryHealValue, gOranBerryMaxHpRiseValue, TRUE); } void SitrusBerryItemAction(Entity *pokemon, Entity *target) { - HealTargetHP(pokemon, target, gUnknown_80F4FBA, gUnknown_80F4FBC, TRUE); + HealTargetHP(pokemon, target, gSitrusBerryHealValue, gSitrusBerryMaxHpRiseValue, TRUE); } void MaxElixirAction(Entity *pokemon, Entity *target) @@ -511,7 +490,7 @@ void MaxElixirAction(Entity *pokemon, Entity *target) void LifeSeedItemAction(Entity *pokemon, Entity *target) { - HealTargetHP(pokemon, target, 0, gUnknown_80F4FBE, TRUE); + HealTargetHP(pokemon, target, 0, gLifeSeedMaxHpRiseValue, TRUE); } void BlinkerSeedItemAction(Entity *pokemon, Entity *target) @@ -671,7 +650,7 @@ void GinsengItemAction(Entity *pokemon, Entity * target) void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3) { - s32 uVar1; + s32 dmg; EntityInfo *entityInfo; EntityInfo *entityInfo_1; Entity *entity; @@ -681,16 +660,16 @@ void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3) entityInfo = GetEntInfo(target); entityInfo_1 = entityInfo; if (gDungeon->unk644.unk31 != 0) { - uVar1 = gUnknown_80F4FA8; - TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FEAE8); + dmg = gBlastSeedThrownBossDmgValue; + TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FEAE8); // It appears to be weak here... } else { - uVar1 = gUnknown_80F4FA4; + dmg = gBlastSeedThrownDmgValue; } if (entityInfo_1->frozenClassStatus.status == STATUS_FROZEN) { EndFrozenClassStatus(pokemon, target); } - sub_806F370(pokemon, target, uVar1, 1, auStack28, 0, 0x216, 0, 0, 0); + sub_806F370(pokemon, target, dmg, 1, auStack28, 0, 0x216, 0, 0, 0); } else { @@ -704,16 +683,16 @@ void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3) { entityInfo = GetEntInfo(entity); if (gDungeon->unk644.unk31 != 0) { - uVar1 = gUnknown_80F4FAA; - TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FEAE8); + dmg = gBlastSeedEatenBossDmgValue; + TryDisplayDungeonLoggableMessage3(pokemon, target, *gUnknown_80FEAE8); // It appears to be weak here... } else { - uVar1 = gUnknown_80F4FA6; + dmg = gBlastSeedEatenDmgValue; } if (entityInfo->frozenClassStatus.status == STATUS_FROZEN) { EndFrozenClassStatus(pokemon, entity); } - sub_806F370(pokemon, entity, uVar1, 1, auStack28, 0, 0x216, 0, 0, 0); + sub_806F370(pokemon, entity, dmg, 1, auStack28, 0, 0x216, 0, 0, 0); } } } diff --git a/src/code_806CD90.c b/src/code_806CD90.c index 45734b96d..30eb3be7e 100644 --- a/src/code_806CD90.c +++ b/src/code_806CD90.c @@ -36,6 +36,7 @@ #include "type_chart.h" #include "dungeon_message.h" #include "dungeon_map_access.h" +#include "dungeon_battle_data.h" extern u8 gUnknown_202F221; @@ -515,7 +516,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc && GetEntInfo(attacker)->sureShotClassStatus.status == STATUS_SET_DAMAGE && dmgStruct->unkE == 0) { - dmgStruct->dmg = gUnknown_80F4F8C; + dmgStruct->dmg = gSetDamageDmgValue; } if (arg4 != 0x20E && AbilityIsActive(target, ABILITY_STURDY) && dmgStruct->dmg == 9999) { diff --git a/src/code_806E8B0.c b/src/code_806E8B0.c index 0b1ad4249..bd440314a 100644 --- a/src/code_806E8B0.c +++ b/src/code_806E8B0.c @@ -22,6 +22,7 @@ #include "dungeon_items.h" #include "structs/str_damage.h" #include "dungeon_util.h" +#include "dungeon_battle_data.h" void sub_8042940(Entity *r0); void sub_80428B0(Entity *r0); @@ -34,8 +35,6 @@ extern void sub_8041B5C(Entity *pokemon); extern void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 arg4, bool32 arg8, s32 argC); extern const s32 gUnknown_80F54B4[NUM_EFFECTIVENESS][NUM_EFFECTIVENESS]; -extern const s24_8 gUnknown_80F504C[]; -extern const s24_8 gUnknown_80F50A0[]; extern const s16 gUnknown_810AC60; extern const s16 gUnknown_810AC68; extern const s16 gUnknown_810AC64; @@ -210,7 +209,7 @@ void CalcDamage(Entity *attacker, Entity *target, u8 moveType, s32 movePower, s3 gDungeon->unk134.unk13E[0] = atkStatStage; gDungeon->unk134.unk140[0] = attackerInfo->atk[splitIndex] + movePower; - statCalc = s24_8_mul(IntToF248(attackerInfo->atk[splitIndex] + movePower), gUnknown_80F504C[atkStatStage]); + statCalc = s24_8_mul(IntToF248(attackerInfo->atk[splitIndex] + movePower), gAtkStatStageMultipliers[atkStatStage]); statCalc = s24_8_mul(statCalc, attackerInfo->offensiveMultipliers[splitIndex]); atkStat = F248ToInt(statCalc); @@ -234,7 +233,7 @@ void CalcDamage(Entity *attacker, Entity *target, u8 moveType, s32 movePower, s3 gDungeon->unk134.unk13E[1] = defStatStage; gDungeon->unk134.unk140[1] = targetInfo->def[splitIndex]; - statCalc = s24_8_mul(IntToF248(targetInfo->def[splitIndex]), gUnknown_80F50A0[defStatStage]); + statCalc = s24_8_mul(IntToF248(targetInfo->def[splitIndex]), gDefStatStageMultipliers[defStatStage]); statCalc = s24_8_mul(statCalc, targetInfo->defensiveMultipliers[splitIndex]); defStat = F248ToInt(statCalc); diff --git a/src/code_806FDF4.c b/src/code_806FDF4.c index fc0fe700c..1bc34c23f 100644 --- a/src/code_806FDF4.c +++ b/src/code_806FDF4.c @@ -24,10 +24,10 @@ #include "dungeon_util_1.h" #include "type_chart.h" #include "math.h" +#include "dungeon_battle_data.h" +#include "string_format.h" -extern u8 gFormatBuffer_FriendArea[]; extern u8 gUnknown_202EE70[MAX_TEAM_BODY_SIZE]; -extern s16 gUnknown_80F5008; extern s16 gUnknown_80F5700[]; extern s32 gUnknown_8106F7C[]; @@ -245,7 +245,7 @@ bool8 sub_806F660(Entity *pokemon, Entity *target) return FALSE; if (HasHeldItem(pokemon, ITEM_FRIEND_BOW)) { - recruitRate += gUnknown_80F5008; + recruitRate += gFriendBowRecruitRateUpValue; } recruitRate += gUnknown_80F5700[pokemonInfo->level]; if (rand >= recruitRate) diff --git a/src/code_8073CF0.c b/src/code_8073CF0.c index cd0556cb2..391b962ce 100644 --- a/src/code_8073CF0.c +++ b/src/code_8073CF0.c @@ -85,14 +85,7 @@ extern const u8 *gPtrStenchWavedOffMessage; extern const u8 *gUnknown_80FA124[]; extern const s16 gWarpScarfActivationChances[]; -extern const s16 gUnknown_80F4FC8[]; -extern const s16 gUnknown_80F4F8E; extern const s16 gUnknown_80F4E0C; -extern const s16 gUnknown_80F4FC4; -extern const s16 gUnknown_80F4FC0; -extern const s16 gUnknown_80F4FB2; -extern const s16 gUnknown_80F4FB4; -extern const s16 gUnknown_80F4FC2; extern s48_16 gUnknown_80F54F4[8]; extern const s32 gUnknown_80F60DC[]; @@ -381,12 +374,12 @@ void sub_8074094(Entity *entity) if (gDungeon->weather.weatherDamageCounter == 0) { if (GetApparentWeather(entity) == WEATHER_HAIL) { if (!MonsterIsType(entity, TYPE_ICE)) { - DealDamageToEntity(entity, gUnknown_80F4F8E, 0x12, 0x220); + DealDamageToEntity(entity, gHailSandstormDmgValue, 0x12, 0x220); } } else if (GetApparentWeather(entity) == WEATHER_SANDSTORM) { if (!MonsterIsType(entity, TYPE_GROUND) && !MonsterIsType(entity, TYPE_ROCK) && !MonsterIsType(entity, TYPE_STEEL)) { - DealDamageToEntity(entity, gUnknown_80F4F8E, 0x12, 0x220); + DealDamageToEntity(entity, gHailSandstormDmgValue, 0x12, 0x220); } } if (!EntityExists(entity) || sub_8044B28()) @@ -445,18 +438,18 @@ void sub_8074094(Entity *entity) else if (entityInfo->burnClassStatus.status == STATUS_BADLY_POISONED) { if (entityInfo->burnClassStatus.damageCountdown == 0 || --entityInfo->burnClassStatus.damageCountdown == 0) { s32 turns = entityInfo->burnClassStatus.unk4; - if (entityInfo->burnClassStatus.unk4 < 29) + if (entityInfo->burnClassStatus.unk4 < BAD_POISON_DMG_TURN_VALUES_COUNT - 1) entityInfo->burnClassStatus.unk4++; entityInfo->burnClassStatus.damageCountdown = gBadPoisonDmgCountdown; - if (turns >= 29) - turns = 29; + if (turns >= BAD_POISON_DMG_TURN_VALUES_COUNT - 1) + turns = BAD_POISON_DMG_TURN_VALUES_COUNT - 1; UseAttack(NULL); if (!EntityExists(entity) || sub_8044B28()) return; TrySendImmobilizeSleepEndMsg(entity, entity); - DealDamageToEntity(entity, gUnknown_80F4FC8[turns], 3, 0x20A); + DealDamageToEntity(entity, gBadPoisonDmgValuesByTurn[turns], 3, 0x20A); } if (!EntityExists(entity) || sub_8044B28()) return; @@ -493,7 +486,7 @@ void sub_8074094(Entity *entity) if (!EntityExists(entity) || sub_8044B28()) return; entityInfo->frozenClassStatus.damageCountdown = gIngrainHealCountdown; - HealTargetHP(entity, entity, gUnknown_80F4FB2, 0, TRUE); + HealTargetHP(entity, entity, gIngrainHealValue, 0, TRUE); } } @@ -516,7 +509,7 @@ void sub_8074094(Entity *entity) if (entityInfo->leechSeedClassStatus.status == STATUS_LEECH_SEED) { if (entityInfo->leechSeedClassStatus.damageCountdown == 0 || --entityInfo->leechSeedClassStatus.damageCountdown == 0) { - s32 hp = gUnknown_80F4FB4; + s32 hp = gLeechSeedHealValue; Entity *target = gDungeon->activePokemon[entityInfo->leechSeedClassStatus.unk8]; entityInfo->leechSeedClassStatus.damageCountdown = gLeechSeedDmgCountdown; @@ -624,28 +617,28 @@ void TickStatusHeal(Entity *entity) // HP heal if (entityInfo->unk146 == 0 && entityInfo->burnClassStatus.status != STATUS_POISONED && entityInfo->burnClassStatus.status != STATUS_BADLY_POISONED) { - s32 r4 = 0; + s32 regenSpeed = 0; if (!entityInfo->isNotTeamMember) - r4 = GetRegenSpeed(entityInfo->id); + regenSpeed = GetRegenSpeed(entityInfo->id); - if (r4 != 0) { + if (regenSpeed != 0) { if (HasHeldItem(entity, ITEM_HEAL_RIBBON)) - r4 += gUnknown_80F4FC4; + regenSpeed += gHealRibbonRegenValue; if (entityInfo->reflectClassStatus.status == STATUS_WISH) - r4 += gUnknown_80F4FC0; + regenSpeed += gWishRegenValue; if (AbilityIsActive(entity, ABILITY_RAIN_DISH) && GetApparentWeather(entity) == WEATHER_RAIN) - r4 += gUnknown_80F4FC2; + regenSpeed += gRainDishRegenValue; - if (r4 > 500) - r4 = 500; - if (r4 < 30) - r4 = 30; + if (regenSpeed > 500) + regenSpeed = 500; + if (regenSpeed < 30) + regenSpeed = 30; entityInfo->unk1F8 += entityInfo->maxHPStat; - while (entityInfo->unk1F8 >= r4) { + while (entityInfo->unk1F8 >= regenSpeed) { entityInfo->HP++; - entityInfo->unk1F8 -= r4; + entityInfo->unk1F8 -= regenSpeed; } if (entityInfo->HP >= entityInfo->maxHPStat) diff --git a/src/code_807CD9C.c b/src/code_807CD9C.c index 88fb0dcd0..15cb96cc7 100644 --- a/src/code_807CD9C.c +++ b/src/code_807CD9C.c @@ -1,5 +1,4 @@ #include "global.h" - #include "constants/ability.h" #include "constants/weather.h" #include "code_803E46C.h" @@ -24,11 +23,11 @@ #include "tile_types.h" #include "code_803E668.h" #include "weather.h" +#include "dungeon_battle_data.h" extern u32 gUnknown_202EDCC; extern u32 gUnknown_203B444[]; -extern s16 gUnknown_80F4F90; extern u8 *gUnknown_80FCA10[]; extern u8 *gUnknown_80F8A0C[]; extern u8 *gUnknown_80FCBCC[]; @@ -151,7 +150,7 @@ void BlowAwayTarget(Entity *pokemon, Entity *target, u32 direction) _0807CF26: sub_807D068(target,&target->pos); - sub_806F370(pokemon,target,gUnknown_80F4F90,0,0,0,0x219,0,0,0); + sub_806F370(pokemon,target,gBlowAwayDmgValue,0,0,0,0x219,0,0,0); } if (sub_8044B28()) { return; @@ -160,7 +159,7 @@ void BlowAwayTarget(Entity *pokemon, Entity *target, u32 direction) InitPokemonMove(&move,0x163); if (!sub_80571F0(entity,&move)) { TrySendImmobilizeSleepEndMsg(pokemon,entity); - sub_806F370(pokemon,entity,gUnknown_80F4F90,0,0,0,0x21a,0,0,0); + sub_806F370(pokemon,entity,gBlowAwayDmgValue,0,0,0,0x21a,0,0,0); } } if (sub_8044B28()) { diff --git a/src/dungeon_battle_data.c b/src/dungeon_battle_data.c index 8c9f41da7..d25bce1b7 100644 --- a/src/dungeon_battle_data.c +++ b/src/dungeon_battle_data.c @@ -1,6 +1,7 @@ #include "global.h" #include "dungeon_battle_data.h" #include "math.h" +#include "constants/weather.h" const s16 gFreezeTurnRange[2] = {3, 5}; const s16 gBurnTurnRange[2] = {0x7F, 0x7F}; @@ -109,3 +110,104 @@ const s16 gSpikeTrapDmgValue = 20; const s16 gChestnutTrapDmgValue = 10; UNUSED static const s16 sMaybeUnusedTrapDmgValue = 15; const s16 gPitfallTrapDmgValue = 5; +const s16 gSetDamageDmgValue = 35; +const s16 gHailSandstormDmgValue = 5; +const s16 gBlowAwayDmgValue = 5; +const s16 gHurlOrbDmgValue = 10; +const s16 gMagnitudeDmgValues[7] = {5, 10, 15, 25, 30, 35, 40}; +const s16 gUnknownDungeonChance = 90; // See sub_8047930 +const s16 gBlastSeedThrownDmgValue = 20; +const s16 gBlastSeedEatenDmgValue = 45; +const s16 gBlastSeedThrownBossDmgValue = 15; +const s16 gBlastSeedEatenBossDmgValue = 30; +const s16 gUnknown_80F4FAC = 1; +const s16 gUnknown_80F4FAE = 2; +UNUSED static const s16 sUnusedConfig2 = 25; +const s16 gIngrainHealValue = 10; +const s16 gLeechSeedHealValue = 10; +const s16 gOranBerryHealValue = 100; +const s16 gOranBerryMaxHpRiseValue = 0; +const s16 gSitrusBerryHealValue = 100; +const s16 gSitrusBerryMaxHpRiseValue = 2; +const s16 gLifeSeedMaxHpRiseValue = 3; +const s16 gWishRegenValue = -220; +const s16 gRainDishRegenValue = -150; +const s16 gHealRibbonRegenValue = -100; +const s16 gFamishBellyDownValue = 10; +const s16 gBadPoisonDmgValuesByTurn[BAD_POISON_DMG_TURN_VALUES_COUNT] = { 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 }; // Always damages the player by 6 hp, but given this exists it's possible they planned the damage to become worse each turn, but later decided to go against it. +const s16 gStenchTerrifiedTurnsNo = 3; +const s16 gPassScarfBellyDownValue = 2; +const s16 gFriendBowRecruitRateUpValue = 100; +const s16 gSynthesisHealValueByWeather[WEATHER_COUNT] = +{ + [WEATHER_CLEAR] = 50, + [WEATHER_SUNNY] = 80, + [WEATHER_SANDSTORM] = 30, + [WEATHER_CLOUDY] = 40, + [WEATHER_RAIN] = 10, + [WEATHER_HAIL] = 10, + [WEATHER_FOG] = 1, + [WEATHER_SNOW] = 1, +}; +const s16 gMoonlightHealValueByWeather[WEATHER_COUNT] = // Identical to Synthesis +{ + [WEATHER_CLEAR] = 50, + [WEATHER_SUNNY] = 80, + [WEATHER_SANDSTORM] = 30, + [WEATHER_CLOUDY] = 40, + [WEATHER_RAIN] = 10, + [WEATHER_HAIL] = 10, + [WEATHER_FOG] = 1, + [WEATHER_SNOW] = 1, +}; +const s16 gMorningSunHealValueByWeather[WEATHER_COUNT] = // Identical to Synthesis +{ + [WEATHER_CLEAR] = 50, + [WEATHER_SUNNY] = 80, + [WEATHER_SANDSTORM] = 30, + [WEATHER_CLOUDY] = 40, + [WEATHER_RAIN] = 10, + [WEATHER_HAIL] = 10, + [WEATHER_FOG] = 1, + [WEATHER_SNOW] = 1, +}; +const s16 gStickPPValue = 1; +const s16 gIronThornPPValue = 5; +const s16 gSilverSpikePPValue = 6; +const s16 gGoldFangPPValue = 7; +const s16 gCacneaSpikePPValue = 8; +const s16 gCorsolaTwigPPValue = 9; +const s16 gGravelerockThrownDmgValue = 20; +const s16 gGeoPebbleThrownDmgValue = 15; +UNUSED static const s16 sUnusedConfig3 = 0; +const s24_8 gAtkStatStageMultipliers[21] = +{ + IntToF248_2(0.2500), IntToF248_2(0.2696), IntToF248_2(0.2892), IntToF248_2(0.3087), IntToF248_2(0.3282), IntToF248_2(0.3478), + IntToF248_2(0.3985), IntToF248_2(0.4493), IntToF248_2(0.5000), IntToF248_2(0.6993), IntToF248_2(1.0000), IntToF248_2(1.2969), + IntToF248_2(1.5000), IntToF248_2(1.5978), IntToF248_2(1.6485), IntToF248_2(1.6993), IntToF248_2(1.7500), IntToF248_2(1.7969), + IntToF248_2(1.8478), IntToF248_2(1.8985), IntToF248_2(2.0000) +}; +const s24_8 gDefStatStageMultipliers[21] = +{ + IntToF248_2(0.2500), IntToF248_2(0.2696), IntToF248_2(0.2892), IntToF248_2(0.3087), IntToF248_2(0.3282), IntToF248_2(0.3478), + IntToF248_2(0.3985), IntToF248_2(0.5469), IntToF248_2(0.6993), IntToF248_2(0.8672), IntToF248_2(1.0000), IntToF248_2(1.2969), + IntToF248_2(1.5000), IntToF248_2(1.5978), IntToF248_2(1.6485), IntToF248_2(1.6993), IntToF248_2(1.7500), IntToF248_2(1.7969), + IntToF248_2(1.8478), IntToF248_2(1.8985), IntToF248_2(2.0000) +}; +const s24_8 gAccEvsStatStageMultipliers[2][21] = +{ + // Accuracy + { + IntToF248_2(0.3282), IntToF248_2(0.3478), IntToF248_2(0.3672), IntToF248_2(0.3985), IntToF248_2(0.4297), IntToF248_2(0.4493), + IntToF248_2(0.5469), IntToF248_2(0.5977), IntToF248_2(0.6993), IntToF248_2(0.7969), IntToF248_2(1.0000), IntToF248_2(1.2500), + IntToF248_2(1.5000), IntToF248_2(1.5978), IntToF248_2(1.6485), IntToF248_2(1.6993), IntToF248_2(1.7500), IntToF248_2(1.7969), + IntToF248_2(1.8478), IntToF248_2(1.8985), IntToF248_2(2.0000) + }, + // Evasion + { + IntToF248_2(2.0000), IntToF248_2(1.8985), IntToF248_2(1.8478), IntToF248_2(1.7969), IntToF248_2(1.7500), IntToF248_2(1.6993), + IntToF248_2(1.6485), IntToF248_2(1.5978), IntToF248_2(1.5000), IntToF248_2(1.3515), IntToF248_2(1.0000), IntToF248_2(0.7969), + IntToF248_2(0.6993), IntToF248_2(0.5977), IntToF248_2(0.5000), IntToF248_2(0.3985), IntToF248_2(0.3477), IntToF248_2(0.2969), + IntToF248_2(0.2500), IntToF248_2(0.1993), IntToF248_2(0.1485) + }, +}; diff --git a/src/dungeon_move.c b/src/dungeon_move.c index a7c69c5df..ea6214e6e 100644 --- a/src/dungeon_move.c +++ b/src/dungeon_move.c @@ -318,11 +318,8 @@ static void SortTargets(Entity **targetsArray, Entity *attacker); extern const s32 gUnknown_8106A50; extern const s32 gUnknown_8106A4C; -extern const s16 gUnknown_80F5006; extern const s32 gUnknown_80F519C; extern const s32 gUnknown_80F51A0; -extern const s32 gUnknown_80F50F4[2][21]; -extern const u16 gUnknown_80F5004; extern const u8 *const gUnknown_80FEEA4; extern const u8 *const gUnknown_80FEEC8; extern const u8 *const gUnknown_80FEEEC; @@ -445,7 +442,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move else if (HasHeldItem(currTarget, ITEM_PASS_SCARF)) { if (!CannotAttack(currTarget, FALSE) && (GetMoveTargetAndRangeForPokemon(attacker, move, FALSE) & 0xF0) == 0 - && FixedPointToInt(targetInfo->belly) >= gUnknown_80F5006 + && FixedPointToInt(targetInfo->belly) >= gPassScarfBellyDownValue && targetInfo->unkFF == 0) { s32 direction1 = targetInfo->action.direction; @@ -479,7 +476,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move sub_806CE68(currTarget, direction1); sub_803E708(2, 0x43); } - targetInfo->belly = FixedPoint_Subtract(targetInfo->belly, IntToFixedPoint(gUnknown_80F5006)); + targetInfo->belly = FixedPoint_Subtract(targetInfo->belly, IntToFixedPoint(gPassScarfBellyDownValue)); if (move->id == MOVE_REGULAR_ATTACK) { TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FDDA8); // Attack was passed off } @@ -2009,7 +2006,7 @@ static void TriggerTargetAbilityEffect(Entity *attacker) SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0); LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEFD0); // A horrid stench billowed out sub_80428A0(attacker); - entInfo->terrifiedTurns = gUnknown_80F5004; + entInfo->terrifiedTurns = gStenchTerrifiedTurnsNo; } entInfo->abilityEffectFlags = 0; @@ -2704,7 +2701,7 @@ void sub_80566F8(Entity *attacker, Move *move, s32 a2, bool8 a3, s32 itemId, s32 static bool8 AccuracyCalc(Entity *attacker, Entity *target, Move *move, s32 accuracyType, bool8 selfAlwaysHits) { s32 statStageAccuracy, statStageEvasion; - s32 statStageMul; + s24_8 statStageMul; s32 accuracy = GetMoveAccuracyOrAIChance(move, accuracyType); s32 rand = DungeonRandInt(100); EntityInfo *attackerInfo = GetEntInfo(attacker); @@ -2745,11 +2742,11 @@ static bool8 AccuracyCalc(Entity *attacker, Entity *target, Move *move, s32 accu if (statStageAccuracy < 0) statStageAccuracy = 0; if (statStageAccuracy > 20) statStageAccuracy = 20; - statStageMul = gUnknown_80F50F4[0][statStageAccuracy]; - if (statStageMul < 0) statStageMul = 0; - if (statStageMul > (256 * 100)) statStageMul = (256 * 100); + statStageMul = gAccEvsStatStageMultipliers[0][statStageAccuracy]; + if (statStageMul.raw < 0) statStageMul.raw = 0; + if (statStageMul.raw > IntToF248_2(100).raw) statStageMul = IntToF248_2(100); - accuracy *= statStageMul; + accuracy *= statStageMul.raw; accuracy /= 256; statStageEvasion = targetInfo->hitChanceStages[1]; @@ -2769,11 +2766,11 @@ static bool8 AccuracyCalc(Entity *attacker, Entity *target, Move *move, s32 accu if (statStageEvasion < 0) statStageEvasion = 0; if (statStageEvasion > 20) statStageEvasion = 20; - statStageMul = gUnknown_80F50F4[1][statStageEvasion]; - if (statStageMul < 0) statStageMul = 0; - if (statStageMul > (256 * 100)) statStageMul = (256 * 100); + statStageMul = gAccEvsStatStageMultipliers[1][statStageEvasion]; + if (statStageMul.raw < 0) statStageMul.raw = 0; + if (statStageMul.raw > IntToF248_2(100).raw) statStageMul = IntToF248_2(100); - accuracy *= statStageMul; + accuracy *= statStageMul.raw; accuracy /= 256; if (rand < accuracy) return TRUE; diff --git a/src/move_actions.c b/src/move_actions.c index 8593dcfb0..42c8075e6 100644 --- a/src/move_actions.c +++ b/src/move_actions.c @@ -55,7 +55,6 @@ extern s16 gUnknown_80F4DBC; extern u8 *gUnknown_80FACC4[]; extern s16 gUnknown_80F4DF4; extern u8 gUnknown_202F21A; -extern s16 gUnknown_80F500A[]; extern s16 gUnknown_80F4DD6; extern u8 gUnknown_202F219; extern s24_8 gUnknown_80F51A4[]; @@ -94,7 +93,6 @@ extern u32 gUnknown_8106A50; extern s16 gUnknown_80F4E08; extern u8 *gUnknown_80FD14C[]; extern u8 *gUnknown_80FAD4C[]; -extern s16 gUnknown_80F502A[]; extern s24_8 gUnknown_8106A54[]; extern s16 gUnknown_80F4DF0; extern s16 gUnknown_80F4DE0; @@ -146,7 +144,6 @@ extern s16 gUnknown_80F4DBE; extern s16 gUnknown_80F4DCA; extern s16 gUnknown_80F4DE2; extern u8 *gUnknown_80FEB90[]; -extern s16 gUnknown_80F501A[]; extern u8 *gUnknown_80FEB60[]; extern u8 *gUnknown_80FE330[]; extern u8 *gUnknown_80FE36C[]; @@ -302,7 +299,7 @@ bool8 NightmareMoveAction(Entity * pokemon, Entity *target, Move *move, s32 para bool8 MorningSunMoveAction(Entity * pokemon,Entity * target, Move *move, s32 param_4) { - HealTargetHP(pokemon, target, gUnknown_80F502A[GetApparentWeather(pokemon)], 0, TRUE); + HealTargetHP(pokemon, target, gMorningSunHealValueByWeather[GetApparentWeather(pokemon)], 0, TRUE); return TRUE; } @@ -1180,7 +1177,7 @@ bool8 AncientPowerMoveAction(Entity *pokemon, Entity *target, Move *move, u32 pa bool8 SynthesisMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { - HealTargetHP(pokemon, target, gUnknown_80F500A[GetApparentWeather(pokemon)], 0, TRUE); + HealTargetHP(pokemon, target, gSynthesisHealValueByWeather[GetApparentWeather(pokemon)], 0, TRUE); return TRUE; } @@ -1948,7 +1945,7 @@ bool8 TauntMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) bool8 MoonlightMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4) { - HealTargetHP(pokemon, target, gUnknown_80F501A[GetApparentWeather(pokemon)], 0, TRUE); + HealTargetHP(pokemon, target, gMoonlightHealValueByWeather[GetApparentWeather(pokemon)], 0, TRUE); return TRUE; } diff --git a/src/status_actions.c b/src/status_actions.c index 92db1d6cb..b3e9cad8a 100644 --- a/src/status_actions.c +++ b/src/status_actions.c @@ -103,7 +103,6 @@ extern u8 *gUnknown_80FF678[]; extern u8 *gUnknown_80FD0B8[]; extern u8 *gUnknown_80FD0B4[]; extern u8 *gUnknown_80FD454[]; -extern s16 gUnknown_80F4FC6; extern u8 *gUnknown_81004F0[]; extern u8 *gUnknown_80FD1CC[]; extern u8 *gUnknown_80FD1B0[]; @@ -126,7 +125,6 @@ extern u8 *gUnknown_80FDC9C[]; extern s16 gUnknown_80F4DD8; extern u32 gUnknown_202F224; extern u32 gUnknown_8106A8C[]; -extern s16 gUnknown_80F4F94[]; extern u8 *gUnknown_80FC5A8[]; extern u8 *gPtrForecastPreventsTypeSwitchMessage[]; extern u8 *gUnknown_80FEB08[]; @@ -300,7 +298,7 @@ bool8 MagnitudeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 par { s32 r3; bool8 r6; - s32 iVar5; + s32 magnitudeDmgVal; EntityInfo *entityInfo; entityInfo = GetEntInfo(target); @@ -309,11 +307,11 @@ bool8 MagnitudeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 par gDungeon->unk181e8.unk18200 = gUnknown_8106A8C[r3]; gDungeon->unk181e8.unk18204 = 0; - iVar5 = gUnknown_80F4F94[r3]; + magnitudeDmgVal = gMagnitudeDmgValues[r3]; if (entityInfo->bideClassStatus.status == STATUS_DIGGING) { - iVar5 *= 2; + magnitudeDmgVal *= 2; } - r6 = sub_8055864(pokemon,target,move,iVar5,param_4) ? TRUE : FALSE; + r6 = sub_8055864(pokemon,target,move,magnitudeDmgVal,param_4) ? TRUE : FALSE; return r6; } @@ -1078,7 +1076,7 @@ bool8 sub_805C208(Entity *pokemon, Entity *target, Move *move, u32 param_4) bool8 sub_805C288(Entity *pokemon, Entity *target, Move *move, s32 param_4) { - sub_8078A58(pokemon, target, gUnknown_80F4FC6, 0); + sub_8078A58(pokemon, target, gFamishBellyDownValue, 0); return TRUE; }