From 5dc8c92d83a2025831e94815d4298212aa5502ac Mon Sep 17 00:00:00 2001 From: Neil Basu Date: Mon, 14 Dec 2020 20:17:21 -0800 Subject: [PATCH 1/3] Document fix for StatUpHit effects when opponent is KO'd --- docs/bugs_and_glitches.md | 77 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index b7873bc05..7bd54da3a 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -37,6 +37,7 @@ Fixes in the [multi-player battle engine](#multi-player-battle-engine) category - [Dragon Scale, not Dragon Fang, boosts Dragon-type moves](#dragon-scale-not-dragon-fang-boosts-dragon-type-moves) - [HP bar animation is slow for high HP](#hp-bar-animation-is-slow-for-high-hp) - [HP bar animation off-by-one error for low HP](#hp-bar-animation-off-by-one-error-for-low-hp) + - [Moves that do damage and increase your stats do not increase stats after a KO](#moves-that-do-damage-and-increase-your-stats-do-not-increase-stats-after-a-ko) - [Single-player battle engine](#single-player-battle-engine) - [A Transformed Pokémon can use Sketch and learn otherwise unobtainable moves](#a-transformed-pokémon-can-use-sketch-and-learn-otherwise-unobtainable-moves) - [Catching a Transformed Pokémon always catches a Ditto](#catching-a-transformed-pokémon-always-catches-a-ditto) @@ -764,6 +765,82 @@ This bug existed for all battles in Gold and Silver, and was only fixed for sing jr .loop ``` +### Moves that do damage and increase your stats do not increase stats after a KO + +The `checkfaint` routine skips the stats increasing effects if the opponent is KO'd, unlike in modern pokemon games. Note that this can lead to stats being increased at the end of battle, but will not have any negative effects. + +**Fix:** Make the following changes in [data/moves/effects.asm](https://github.com/pret/pokecrystal/blob/master/data/moves/effects.asm) + +```diff + DefenseUpHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext ++ defenseup + checkfaint + buildopponentrage +- defenseup + statupmessage + endmove + + + AttackUpHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext ++ attackup + checkfaint + buildopponentrage +- attackup + statupmessage + endmove + + AllUpHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext ++ allstatsup + checkfaint + buildopponentrage +- allstatsup + endmove +``` ## Single-player battle engine From cfc9bf5a33ea961cff9044c430acf6d03f33f83e Mon Sep 17 00:00:00 2001 From: Neil Basu Date: Mon, 14 Dec 2020 22:34:10 -0800 Subject: [PATCH 2/3] shorten documents on stat up hit effects --- docs/bugs_and_glitches.md | 33 +++------------------------------ 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index 7bd54da3a..496239873 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -776,16 +776,7 @@ The `checkfaint` routine skips the stats increasing effects if the opponent is K checkobedience usedmovetext doturn - critical - damagestats - damagecalc - stab - damagevariation - checkhit - effectchance - moveanim - failuretext - applydamage + ... criticaltext supereffectivetext + defenseup @@ -800,16 +791,7 @@ The `checkfaint` routine skips the stats increasing effects if the opponent is K checkobedience usedmovetext doturn - critical - damagestats - damagecalc - stab - damagevariation - checkhit - effectchance - moveanim - failuretext - applydamage + ... criticaltext supereffectivetext + attackup @@ -823,16 +805,7 @@ The `checkfaint` routine skips the stats increasing effects if the opponent is K checkobedience usedmovetext doturn - critical - damagestats - damagecalc - stab - damagevariation - checkhit - effectchance - moveanim - failuretext - applydamage + ... criticaltext supereffectivetext + allstatsup From 49458edf94af31a3bf87c227c7f20870c6c38206 Mon Sep 17 00:00:00 2001 From: Rangi <35663410+Rangi42@users.noreply.github.com> Date: Fri, 18 Dec 2020 09:25:49 -0500 Subject: [PATCH 3/3] Edit wording and diff format --- docs/bugs_and_glitches.md | 67 +++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 38 deletions(-) diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index 496239873..a3cc96930 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -767,54 +767,45 @@ This bug existed for all battles in Gold and Silver, and was only fixed for sing ### Moves that do damage and increase your stats do not increase stats after a KO -The `checkfaint` routine skips the stats increasing effects if the opponent is KO'd, unlike in modern pokemon games. Note that this can lead to stats being increased at the end of battle, but will not have any negative effects. +`BattleCommand_CheckFaint` "ends the move effect if the opponent faints", and these moves attempt to raise the user's stats *after* `checkfaint`. Note that fixing this can lead to stats being increased at the end of battle, but will not have any negative effects. -**Fix:** Make the following changes in [data/moves/effects.asm](https://github.com/pret/pokecrystal/blob/master/data/moves/effects.asm) +**Fix:** Edit [data/moves/effects.asm](https://github.com/pret/pokecrystal/blob/master/data/moves/effects.asm): ```diff DefenseUpHit: - checkobedience - usedmovetext - doturn - ... - criticaltext - supereffectivetext -+ defenseup - checkfaint - buildopponentrage -- defenseup - statupmessage - endmove - + ... + criticaltext + supereffectivetext ++ defenseup + checkfaint + buildopponentrage +- defenseup + statupmessage + endmove AttackUpHit: - checkobedience - usedmovetext - doturn - ... - criticaltext - supereffectivetext -+ attackup - checkfaint - buildopponentrage -- attackup - statupmessage - endmove + ... + criticaltext + supereffectivetext ++ attackup + checkfaint + buildopponentrage +- attackup + statupmessage + endmove AllUpHit: - checkobedience - usedmovetext - doturn - ... - criticaltext - supereffectivetext -+ allstatsup - checkfaint - buildopponentrage -- allstatsup - endmove + ... + criticaltext + supereffectivetext ++ allstatsup + checkfaint + buildopponentrage +- allstatsup + endmove ``` + ## Single-player battle engine