From 5c3669e0cd49ccc210d7c57228820685fef11230 Mon Sep 17 00:00:00 2001 From: kiliwily <69381603+kiliwily@users.noreply.github.com> Date: Sat, 12 Sep 2020 18:43:20 +0200 Subject: Bug documenting --- src/battle_util.c | 2 ++ src/metatile_behavior.c | 4 ++++ src/pokemon.c | 2 ++ 3 files changed, 8 insertions(+) (limited to 'src') diff --git a/src/battle_util.c b/src/battle_util.c index eb3907157..0c2e31e07 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -527,6 +527,8 @@ void HandleAction_ThrowPokeblock(void) gBattleStruct->safariPkblThrowCounter++; if (gBattleStruct->safariEscapeFactor > 1) { + //BUG: The safariEscapeFactor is unintetionally able to become 0 (but it can not become negative!). This causes the pokeblock throw glitch. + //To fix that change the < in the if statement below to <=. if (gBattleStruct->safariEscapeFactor < sPkblToEscapeFactor[gBattleStruct->safariPkblThrowCounter][gBattleCommunication[MULTISTRING_CHOOSER]]) gBattleStruct->safariEscapeFactor = 1; else diff --git a/src/metatile_behavior.c b/src/metatile_behavior.c index dde4de329..516a44a07 100644 --- a/src/metatile_behavior.c +++ b/src/metatile_behavior.c @@ -968,6 +968,10 @@ bool8 MetatileBehavior_IsDiveable(u8 metatileBehavior) bool8 MetatileBehavior_IsUnableToEmerge(u8 metatileBehavior) { + //BUG: The player is unintentionally able to emerge on water doors. + //Also the narrower underwater door in the underwater tileset has the wrong metatile behavior. This causes the dive glitch. + //To fix that add ||metatileBehavior == MB_WATER_DOOR to the if statement below and + //change the metatile behavior of the narrower water door with porymaps tilset editor. if (metatileBehavior == MB_NO_SURFACING || metatileBehavior == MB_SEAWEED_NO_SURFACING) return TRUE; diff --git a/src/pokemon.c b/src/pokemon.c index a0e655d1e..f706e8ef8 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -2861,6 +2861,8 @@ void CalculateMonStats(struct Pokemon *mon) if (currentHP == 0 && oldMaxHP == 0) currentHP = newMaxHP; else if (currentHP != 0) + //BUG: currentHP is unintentionally able to become <= 0 after the instruction below. This causes the pomeg berry glitch. + //To fix this add another if statement after the instruction that desides what happens if currentHP <= 0. currentHP += newMaxHP - oldMaxHP; else return; -- cgit v1.2.3 From 9b4ded46c6b736a39bc15cf2e6325176ad50c8de Mon Sep 17 00:00:00 2001 From: kiliwily <69381603+kiliwily@users.noreply.github.com> Date: Sat, 12 Sep 2020 19:20:42 +0200 Subject: Update pokemon.c --- src/pokemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/pokemon.c b/src/pokemon.c index f706e8ef8..b6bec0329 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -2862,7 +2862,7 @@ void CalculateMonStats(struct Pokemon *mon) currentHP = newMaxHP; else if (currentHP != 0) //BUG: currentHP is unintentionally able to become <= 0 after the instruction below. This causes the pomeg berry glitch. - //To fix this add another if statement after the instruction that desides what happens if currentHP <= 0. + //To fix this add another if statement after the instruction that sets currentHP = 1 if currentHP <= 0. currentHP += newMaxHP - oldMaxHP; else return; -- cgit v1.2.3 From 56848fb891f55acdc98ee1b5956ffd2b1c8174eb Mon Sep 17 00:00:00 2001 From: kiliwily <69381603+kiliwily@users.noreply.github.com> Date: Sat, 19 Sep 2020 20:44:16 +0200 Subject: Update battle_util.c --- src/battle_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/battle_util.c b/src/battle_util.c index 0c2e31e07..31ed0b3fe 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -527,8 +527,8 @@ void HandleAction_ThrowPokeblock(void) gBattleStruct->safariPkblThrowCounter++; if (gBattleStruct->safariEscapeFactor > 1) { - //BUG: The safariEscapeFactor is unintetionally able to become 0 (but it can not become negative!). This causes the pokeblock throw glitch. - //To fix that change the < in the if statement below to <=. + // BUG: The safariEscapeFactor is unintetionally able to become 0 (but it can not become negative!). This causes the pokeblock throw glitch. + // To fix that change the < in the if statement below to <=. if (gBattleStruct->safariEscapeFactor < sPkblToEscapeFactor[gBattleStruct->safariPkblThrowCounter][gBattleCommunication[MULTISTRING_CHOOSER]]) gBattleStruct->safariEscapeFactor = 1; else -- cgit v1.2.3 From f1366dfc694c78ac934e58a917a173f95c55df28 Mon Sep 17 00:00:00 2001 From: kiliwily <69381603+kiliwily@users.noreply.github.com> Date: Sat, 19 Sep 2020 20:46:26 +0200 Subject: Fix typos --- src/metatile_behavior.c | 8 ++++---- src/pokemon.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/metatile_behavior.c b/src/metatile_behavior.c index 516a44a07..51cc65c22 100644 --- a/src/metatile_behavior.c +++ b/src/metatile_behavior.c @@ -968,10 +968,10 @@ bool8 MetatileBehavior_IsDiveable(u8 metatileBehavior) bool8 MetatileBehavior_IsUnableToEmerge(u8 metatileBehavior) { - //BUG: The player is unintentionally able to emerge on water doors. - //Also the narrower underwater door in the underwater tileset has the wrong metatile behavior. This causes the dive glitch. - //To fix that add ||metatileBehavior == MB_WATER_DOOR to the if statement below and - //change the metatile behavior of the narrower water door with porymaps tilset editor. + // BUG: The player is unintentionally able to emerge on water doors. + // Also the narrower underwater door in the underwater tileset has the wrong metatile behavior. This causes the dive glitch. + // To fix that add || metatileBehavior == MB_WATER_DOOR to the if statement below and + // change the metatile behavior of the narrower water door with porymaps tileset editor. if (metatileBehavior == MB_NO_SURFACING || metatileBehavior == MB_SEAWEED_NO_SURFACING) return TRUE; diff --git a/src/pokemon.c b/src/pokemon.c index b6bec0329..30f0b0e73 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -2861,8 +2861,8 @@ void CalculateMonStats(struct Pokemon *mon) if (currentHP == 0 && oldMaxHP == 0) currentHP = newMaxHP; else if (currentHP != 0) - //BUG: currentHP is unintentionally able to become <= 0 after the instruction below. This causes the pomeg berry glitch. - //To fix this add another if statement after the instruction that sets currentHP = 1 if currentHP <= 0. + // BUG: currentHP is unintentionally able to become <= 0 after the instruction below. This causes the pomeg berry glitch. + // To fix that set currentHP = 1 if currentHP <= 0. currentHP += newMaxHP - oldMaxHP; else return; -- cgit v1.2.3