Merge branch 'RHH/master' into RHH/upcoming

# Conflicts:
#	data/battle_scripts_1.s
#	include/battle_scripts.h
This commit is contained in:
Eduardo Quezada 2023-08-31 20:46:53 -04:00
commit 35d7201935
6 changed files with 20 additions and 10 deletions

View File

@ -5300,15 +5300,15 @@ BattleScript_EffectHurricane:
goto BattleScript_EffectHit goto BattleScript_EffectHit
BattleScript_EffectTeleport: BattleScript_EffectTeleport:
attackcanceler
attackstring
.if B_TELEPORT_BEHAVIOR >= GEN_7 .if B_TELEPORT_BEHAVIOR >= GEN_7
jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_EffectBatonPass jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_EffectBatonPass
jumpifside BS_ATTACKER, B_SIDE_PLAYER, BattleScript_EffectBatonPass jumpifside BS_ATTACKER, B_SIDE_PLAYER, BattleScript_EffectBatonPass
.else .else
jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_ButItFailed jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_FailedFromAtkCanceler
.endif .endif
BattleScript_EffectTeleportTryToRunAway: BattleScript_EffectTeleportTryToRunAway:
attackcanceler
attackstring
ppreduce ppreduce
getifcantrunfrombattle BS_ATTACKER getifcantrunfrombattle BS_ATTACKER
jumpifbyte CMP_EQUAL, gBattleCommunication, BATTLE_RUN_FORBIDDEN, BattleScript_ButItFailed jumpifbyte CMP_EQUAL, gBattleCommunication, BATTLE_RUN_FORBIDDEN, BattleScript_ButItFailed
@ -5445,6 +5445,8 @@ BattleScript_EffectFakeOut::
setmoveeffect MOVE_EFFECT_FLINCH setmoveeffect MOVE_EFFECT_FLINCH
goto BattleScript_EffectHit goto BattleScript_EffectHit
BattleScript_FailedFromAtkCanceler::
attackcanceler
BattleScript_FailedFromAtkString:: BattleScript_FailedFromAtkString::
attackstring attackstring
BattleScript_FailedFromPpReduce:: BattleScript_FailedFromPpReduce::

View File

@ -18,6 +18,7 @@
#include "recorded_battle.h" #include "recorded_battle.h"
#include "string_util.h" #include "string_util.h"
#include "strings.h" #include "strings.h"
#include "test_runner.h"
#include "text.h" #include "text.h"
#include "trainer_hill.h" #include "trainer_hill.h"
#include "window.h" #include "window.h"
@ -3088,7 +3089,8 @@ static const u8 *BattleStringGetPlayerName(u8 *text, u8 battlerId)
toCpy = gSaveBlock2Ptr->playerName; toCpy = gSaveBlock2Ptr->playerName;
break; break;
case B_POSITION_PLAYER_RIGHT: case B_POSITION_PLAYER_RIGHT:
if ((gBattleTypeFlags & BATTLE_TYPE_RECORDED) && !(gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER))) if (((gBattleTypeFlags & BATTLE_TYPE_RECORDED) && !(gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER)))
|| gTestRunnerEnabled)
{ {
toCpy = gLinkPlayers[0].name; toCpy = gLinkPlayers[0].name;
} }

View File

@ -13868,12 +13868,13 @@ static void Cmd_trysetfutureattack(void)
static void Cmd_trydobeatup(void) static void Cmd_trydobeatup(void)
{ {
CMD_ARGS(const u8 *endInstr, const u8 *failInstr);
#if B_BEAT_UP >= GEN_5 #if B_BEAT_UP >= GEN_5
CMD_ARGS();
gBattleStruct->beatUpSlot++; gBattleStruct->beatUpSlot++;
gBattlescriptCurrInstr = cmd->nextInstr; gBattlescriptCurrInstr = cmd->nextInstr;
#else #else
CMD_ARGS(const u8 *endInstr, const u8 *failInstr);
struct Pokemon *party = GetBattlerParty(gBattlerAttacker); struct Pokemon *party = GetBattlerParty(gBattlerAttacker);
if (gBattleMons[gBattlerTarget].hp == 0) if (gBattleMons[gBattlerTarget].hp == 0)

View File

@ -12729,7 +12729,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
#else #else
.power = 120, .power = 120,
#endif #endif
.effect = EFFECT_RECOIL_50, .effect = EFFECT_STEEL_BEAM,
.type = TYPE_GRASS, .type = TYPE_GRASS,
.accuracy = 95, .accuracy = 95,
.pp = 5, .pp = 5,

View File

@ -27,7 +27,7 @@ DOUBLE_BATTLE_TEST("Mega Evolution's order is determined by Speed - opponent fas
} WHEN { } WHEN {
TURN { MOVE(opponentLeft, MOVE_CELEBRATE, megaEvolve: TRUE); MOVE(playerLeft, MOVE_CELEBRATE, megaEvolve: TRUE); } TURN { MOVE(opponentLeft, MOVE_CELEBRATE, megaEvolve: TRUE); MOVE(playerLeft, MOVE_CELEBRATE, megaEvolve: TRUE); }
} SCENE { } SCENE {
MESSAGE("Foe Gardevoir's Gardevoirite is reacting to 's Mega Ring!"); MESSAGE("Foe Gardevoir's Gardevoirite is reacting to 2's Mega Ring!");
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, opponentLeft); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, opponentLeft);
MESSAGE("Foe Gardevoir has Mega Evolved into Mega Gardevoir!"); MESSAGE("Foe Gardevoir has Mega Evolved into Mega Gardevoir!");
MESSAGE("Venusaur's Venusaurite is reacting to 1's Mega Ring!"); MESSAGE("Venusaur's Venusaurite is reacting to 1's Mega Ring!");
@ -49,7 +49,7 @@ DOUBLE_BATTLE_TEST("Mega Evolution's order is determined by Speed - player faste
MESSAGE("Venusaur's Venusaurite is reacting to 1's Mega Ring!"); MESSAGE("Venusaur's Venusaurite is reacting to 1's Mega Ring!");
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, playerLeft); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, playerLeft);
MESSAGE("Venusaur has Mega Evolved into Mega Venusaur!"); MESSAGE("Venusaur has Mega Evolved into Mega Venusaur!");
MESSAGE("Foe Gardevoir's Gardevoirite is reacting to 's Mega Ring!"); MESSAGE("Foe Gardevoir's Gardevoirite is reacting to 2's Mega Ring!");
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, opponentLeft); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, opponentLeft);
MESSAGE("Foe Gardevoir has Mega Evolved into Mega Gardevoir!"); MESSAGE("Foe Gardevoir has Mega Evolved into Mega Gardevoir!");
} }
@ -145,7 +145,7 @@ SINGLE_BATTLE_TEST("Regular Mega Evolution and Fervent Wish Mega Evolution can h
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, player);
MESSAGE("Rayquaza has Mega Evolved into Mega Rayquaza!"); MESSAGE("Rayquaza has Mega Evolved into Mega Rayquaza!");
MESSAGE("Foe Gardevoir's Gardevoirite is reacting to 's Mega Ring!"); MESSAGE("Foe Gardevoir's Gardevoirite is reacting to 2's Mega Ring!");
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, opponent); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, opponent);
MESSAGE("Foe Gardevoir has Mega Evolved into Mega Gardevoir!"); MESSAGE("Foe Gardevoir has Mega Evolved into Mega Gardevoir!");
} THEN { } THEN {

View File

@ -9,6 +9,7 @@
#include "random.h" #include "random.h"
#include "test/battle.h" #include "test/battle.h"
#include "window.h" #include "window.h"
#include "constants/trainers.h"
#if defined(__INTELLISENSE__) #if defined(__INTELLISENSE__)
#undef TestRunner_Battle_RecordAbilityPopUp #undef TestRunner_Battle_RecordAbilityPopUp
@ -232,11 +233,15 @@ static void BattleTest_Run(void *data)
memset(&DATA, 0, sizeof(DATA)); memset(&DATA, 0, sizeof(DATA));
DATA.recordedBattle.rngSeed = RNG_SEED_DEFAULT; DATA.recordedBattle.rngSeed = RNG_SEED_DEFAULT;
DATA.recordedBattle.opponentA = TRAINER_LINK_OPPONENT;
DATA.recordedBattle.textSpeed = OPTIONS_TEXT_SPEED_FAST; DATA.recordedBattle.textSpeed = OPTIONS_TEXT_SPEED_FAST;
DATA.recordedBattle.battleFlags = BATTLE_TYPE_RECORDED_IS_MASTER | BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_TRAINER | BATTLE_TYPE_IS_MASTER; DATA.recordedBattle.battleFlags = BATTLE_TYPE_RECORDED_IS_MASTER | BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_TRAINER | BATTLE_TYPE_IS_MASTER;
if (test->type == BATTLE_TEST_DOUBLES) if (test->type == BATTLE_TEST_DOUBLES)
{
DATA.recordedBattle.battleFlags |= BATTLE_TYPE_DOUBLE; DATA.recordedBattle.battleFlags |= BATTLE_TYPE_DOUBLE;
DATA.recordedBattle.opponentB = TRAINER_LINK_OPPONENT;
}
for (i = 0; i < STATE->battlersCount; i++) for (i = 0; i < STATE->battlersCount; i++)
{ {
DATA.recordedBattle.playersName[i][0] = CHAR_1 + i; DATA.recordedBattle.playersName[i][0] = CHAR_1 + i;