Master to upcoming, 2025-09-02 (#7684)
This commit is contained in:
commit
ee0953ab29
@ -1,6 +1,6 @@
|
||||
# About `pokeemerald-expansion`
|
||||
|
||||
  
|
||||
  
|
||||
|
||||
<!-- If you want to re-record or change these gifs, here are some notes that I used: https://files.catbox.moe/05001g.md -->
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
# [Features](FEATURES.md)
|
||||
|
||||
**`pokeemerald-expansion`** offers hundreds of features from various [core series Pokémon games](https://bulbapedia.bulbagarden.net/wiki/Core_series), along with popular quality-of-life enhancements designed to streamline development and improve the player experience. A full list of those featues can be found in [`FEATURES.md`](FEATURES.md).
|
||||
**`pokeemerald-expansion`** offers hundreds of features from various [core series Pokémon games](https://bulbapedia.bulbagarden.net/wiki/Core_series), along with popular quality-of-life enhancements designed to streamline development and improve the player experience. A full list of those features can be found in [`FEATURES.md`](FEATURES.md).
|
||||
|
||||
# [Credits](CREDITS.md)
|
||||
|
||||
@ -32,7 +32,7 @@ Please consider [crediting all contributors](CREDITS.md) involved in the project
|
||||
|
||||
❗❗ **Important**: Do not use GitHub's "Download Zip" option as it will not include commit history. This is necessary if you want to update or merge other feature branches.
|
||||
|
||||
If you're new to git and GitHub, [Team Aqua's Asset Repo](https://github.com/Pawkkie/Team-Aquas-Asset-Repo/) has a [guide on forking and cloning the repository](https://github.com/Pawkkie/Team-Aquas-Asset-Repo/wiki/The-Basics-of-GitHub). Then you can follow one of the following guides:
|
||||
If you're new to git and GitHub, [Team Aqua's Asset Repo](https://github.com/Pawkkie/Team-Aquas-Asset-Repo/) has a [guide to forking and cloning the repository](https://github.com/Pawkkie/Team-Aquas-Asset-Repo/wiki/The-Basics-of-GitHub). Then you can follow one of the following guides:
|
||||
|
||||
## 📥 [Installing **`pokeemerald-expansion`**](INSTALL.md)
|
||||
## 🏗️ [Building **`pokeemerald-expansion`**](INSTALL.md#Building-pokeemerald-expansion)
|
||||
@ -50,4 +50,4 @@ If you are looking to [report a bug](CONTRIBUTING.md#Bug-Report), [open a pull r
|
||||
|
||||
[](https://discord.gg/6CzjAG6GZk)
|
||||
|
||||
Our community uses the [Rom Hacking Hideout (RHH) Discord server](https://discord.gg/6CzjAG6GZk) to communicate and organize. Most of our discussions take place there, and we welcome anybody to join us!
|
||||
Our community uses the [ROM Hacking Hideout (RHH) Discord server](https://discord.gg/6CzjAG6GZk) to communicate and organize. Most of our discussions take place there, and we welcome anybody to join us!
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// Note that FOE specifically returns the left-side battler; BATTLE_OPPOSITE is the diagonal.
|
||||
|
||||
#include "global.h"
|
||||
#include "main.h"
|
||||
#include "malloc.h"
|
||||
@ -3110,45 +3112,44 @@ static s32 AI_DoubleBattle(u32 battlerAtk, u32 battlerDef, u32 move, s32 score)
|
||||
}
|
||||
else
|
||||
{
|
||||
u32 ownHitsToKOFoe1 = GetBestNoOfHitsToKO(battlerAtk, FOE(battlerAtk), AI_ATTACKING);
|
||||
u32 partnerHitsToKOFoe1 = GetBestNoOfHitsToKO(battlerAtkPartner, FOE(battlerAtk), AI_ATTACKING);
|
||||
u32 ownHitsToKOFoe2 = GetBestNoOfHitsToKO(battlerAtk, FOE(battlerAtkPartner), AI_ATTACKING);
|
||||
u32 partnerHitsToKOFoe2 = GetBestNoOfHitsToKO(battlerAtkPartner, FOE(battlerAtkPartner), AI_ATTACKING);
|
||||
u32 ownHitsToKOFoe1 = GetBestNoOfHitsToKO(battlerAtk, BATTLE_OPPOSITE(battlerAtk), AI_ATTACKING);
|
||||
u32 partnerHitsToKOFoe1 = GetBestNoOfHitsToKO(battlerAtkPartner, BATTLE_OPPOSITE(battlerAtk), AI_ATTACKING);
|
||||
u32 ownHitsToKOFoe2 = GetBestNoOfHitsToKO(battlerAtk, BATTLE_OPPOSITE(battlerAtkPartner), AI_ATTACKING);
|
||||
u32 partnerHitsToKOFoe2 = GetBestNoOfHitsToKO(battlerAtkPartner, BATTLE_OPPOSITE(battlerAtkPartner), AI_ATTACKING);
|
||||
|
||||
if (hasTwoOpponents)
|
||||
{
|
||||
// Might be about to die
|
||||
if (CanTargetFaintAi(FOE(battlerAtk), battlerAtk) && CanTargetFaintAi(FOE(battlerAtkPartner), battlerAtk)
|
||||
&& AI_IsSlower(battlerAtk, FOE(battlerAtk), move, predictedMove, DONT_CONSIDER_PRIORITY)
|
||||
&& AI_IsSlower(battlerAtk, FOE(battlerAtkPartner), move, predictedMove, DONT_CONSIDER_PRIORITY))
|
||||
if (CanTargetFaintAi(BATTLE_OPPOSITE(battlerAtk), battlerAtk) && CanTargetFaintAi(BATTLE_OPPOSITE(battlerAtkPartner), battlerAtk)
|
||||
&& AI_IsSlower(battlerAtk, BATTLE_OPPOSITE(battlerAtk), move, predictedMove, DONT_CONSIDER_PRIORITY)
|
||||
&& AI_IsSlower(battlerAtk, BATTLE_OPPOSITE(battlerAtkPartner), move, predictedMove, DONT_CONSIDER_PRIORITY))
|
||||
ADJUST_SCORE(GOOD_EFFECT);
|
||||
|
||||
if (ownHitsToKOFoe1 > partnerHitsToKOFoe1 && partnerHitsToKOFoe1 > 1
|
||||
&& ownHitsToKOFoe2 > partnerHitsToKOFoe2 && partnerHitsToKOFoe2 > 1)
|
||||
ADJUST_SCORE(GOOD_EFFECT);
|
||||
}
|
||||
else if (IsBattlerAlive(FOE(battlerAtk)))
|
||||
else if (IsBattlerAlive(BATTLE_OPPOSITE(battlerAtk)))
|
||||
{
|
||||
// Might be about to die
|
||||
if (CanTargetFaintAi(FOE(battlerAtk), battlerAtk)
|
||||
&& AI_IsSlower(battlerAtk, FOE(battlerAtk), move, predictedMove, DONT_CONSIDER_PRIORITY))
|
||||
if (CanTargetFaintAi(BATTLE_OPPOSITE(battlerAtk), battlerAtk)
|
||||
&& AI_IsSlower(battlerAtk, BATTLE_OPPOSITE(battlerAtk), move, predictedMove, DONT_CONSIDER_PRIORITY))
|
||||
ADJUST_SCORE(GOOD_EFFECT);
|
||||
|
||||
if (ownHitsToKOFoe1 > partnerHitsToKOFoe1 && partnerHitsToKOFoe1 > 1)
|
||||
ADJUST_SCORE(GOOD_EFFECT);
|
||||
}
|
||||
else if (IsBattlerAlive(FOE(battlerAtkPartner)))
|
||||
else if (IsBattlerAlive(BATTLE_OPPOSITE(battlerAtkPartner)))
|
||||
{
|
||||
// Might be about to die
|
||||
if (CanTargetFaintAi(FOE(battlerAtkPartner), battlerAtk)
|
||||
&& AI_IsSlower(battlerAtk, FOE(battlerAtkPartner), move, predictedMove, DONT_CONSIDER_PRIORITY))
|
||||
if (CanTargetFaintAi(BATTLE_OPPOSITE(battlerAtkPartner), battlerAtk)
|
||||
&& AI_IsSlower(battlerAtk, BATTLE_OPPOSITE(battlerAtkPartner), move, predictedMove, DONT_CONSIDER_PRIORITY))
|
||||
ADJUST_SCORE(GOOD_EFFECT);
|
||||
|
||||
if (ownHitsToKOFoe2 > partnerHitsToKOFoe2 && partnerHitsToKOFoe2 > 1)
|
||||
ADJUST_SCORE(GOOD_EFFECT);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EFFECT_PERISH_SONG:
|
||||
|
||||
@ -1630,12 +1630,12 @@ s32 CalcCritChanceStage(u32 battlerAtk, u32 battlerDef, u32 move, bool32 recordA
|
||||
}
|
||||
else
|
||||
{
|
||||
critChance = 2 * (gBattleMons[battlerAtk].volatiles.focusEnergy != 0)
|
||||
+ 1 * (gBattleMons[battlerAtk].volatiles.dragonCheer != 0)
|
||||
critChance = (gBattleMons[battlerAtk].volatiles.focusEnergy != 0 ? 2 : 0)
|
||||
+ (gBattleMons[battlerAtk].volatiles.dragonCheer != 0 ? 1 : 0)
|
||||
+ GetMoveCriticalHitStage(move)
|
||||
+ GetHoldEffectCritChanceIncrease(battlerAtk, holdEffectAtk)
|
||||
+ 2 * (B_AFFECTION_MECHANICS == TRUE && GetBattlerAffectionHearts(battlerAtk) == AFFECTION_FIVE_HEARTS)
|
||||
+ (abilityAtk == ABILITY_SUPER_LUCK)
|
||||
+ ((B_AFFECTION_MECHANICS == TRUE && GetBattlerAffectionHearts(battlerAtk) == AFFECTION_FIVE_HEARTS) ? 2 : 0)
|
||||
+ (abilityAtk == ABILITY_SUPER_LUCK ? 1 : 0)
|
||||
+ gBattleStruct->bonusCritStages[gBattlerAttacker];
|
||||
|
||||
if (critChance >= ARRAY_COUNT(sCriticalHitOdds))
|
||||
|
||||
@ -5033,6 +5033,7 @@ const struct Item gItemsInfo[] =
|
||||
"Techno Blast to\n"
|
||||
"Water-type."),
|
||||
.pocket = POCKET_ITEMS,
|
||||
.sortType = ITEM_TYPE_DRIVE,
|
||||
.type = ITEM_USE_BAG_MENU,
|
||||
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
|
||||
.secondaryId = TYPE_WATER,
|
||||
|
||||
@ -621,6 +621,7 @@ AI_DOUBLE_BATTLE_TEST("AI uses Helping Hand if it's about to die")
|
||||
AI_DOUBLE_BATTLE_TEST("AI uses Helping Hand if the ally does notably more damage")
|
||||
{
|
||||
|
||||
KNOWN_FAILING; // Failure was masked by test runner issues
|
||||
GIVEN {
|
||||
ASSUME(GetMoveEffect(MOVE_HELPING_HAND) == EFFECT_HELPING_HAND);
|
||||
AI_FLAGS(AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_TRY_TO_FAINT | AI_FLAG_CHECK_VIABILITY | AI_FLAG_OMNISCIENT);
|
||||
|
||||
@ -235,6 +235,8 @@ top:
|
||||
}
|
||||
else
|
||||
{
|
||||
// Cost must be assigned to the test that crashed, otherwise tests will be desynched
|
||||
AssignCostToRunner();
|
||||
gTestRunnerState.state = STATE_REPORT_RESULT;
|
||||
gTestRunnerState.result = TEST_RESULT_CRASH;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user