Merge branch '_RHH/master' into _RHH/upcoming

# Conflicts:
#	src/battle_controller_player_partner.c
This commit is contained in:
Eduardo Quezada 2024-01-28 18:11:44 -03:00
commit afb1efe0d3
12 changed files with 40 additions and 1 deletions

View file

@ -5966,6 +5966,7 @@ BattleScript_PrintFullBox::
BattleScript_ActionSwitch::
hpthresholds2 BS_ATTACKER
copybyte sSAVED_BATTLER, gBattlerAttacker
printstring STRINGID_RETURNMON
jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_PursuitSwitchDmgSetMultihit
setmultihit 1
@ -5983,6 +5984,7 @@ BattleScript_DoSwitchOut::
switchoutabilities BS_ATTACKER
updatedynamax
waitstate
copybyte gBattlerAttacker, sSAVED_BATTLER
returnatktoball
waitstate
drawpartystatussummary BS_ATTACKER

View file

@ -93,6 +93,7 @@ DewfordTown_EventScript_OldRodFisherman::
DewfordTown_EventScript_GiveOldRod::
msgbox DewfordTown_Text_GiveYouOneOfMyRods, MSGBOX_DEFAULT
giveitem ITEM_OLD_ROD
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_OLD_ROD
msgbox DewfordTown_Text_ThrowInFishingAdvice, MSGBOX_DEFAULT
release

View file

@ -423,6 +423,7 @@ MauvilleCity_EventScript_Wattson::
goto_if_set FLAG_GOT_BASEMENT_KEY_FROM_WATTSON, MauvilleCity_EventScript_BegunNewMauville
msgbox MauvilleCity_Text_WattsonNeedFavorTakeKey, MSGBOX_DEFAULT
giveitem ITEM_BASEMENT_KEY
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_GOT_BASEMENT_KEY_FROM_WATTSON
msgbox MauvilleCity_Text_WattsonWontBeChallenge, MSGBOX_DEFAULT
release

View file

@ -41,12 +41,14 @@ MauvilleCity_BikeShop_EventScript_YesFar::
MauvilleCity_BikeShop_EventScript_GetMachBike::
msgbox MauvilleCity_BikeShop_Text_ChoseMachBike, MSGBOX_DEFAULT
giveitem ITEM_MACH_BIKE
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
goto MauvilleCity_BikeShop_EventScript_ComeBackToSwitchBikes
end
MauvilleCity_BikeShop_EventScript_GetAcroBike::
msgbox MauvilleCity_BikeShop_Text_ChoseAcroBike, MSGBOX_DEFAULT
giveitem ITEM_ACRO_BIKE
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
goto MauvilleCity_BikeShop_EventScript_ComeBackToSwitchBikes
end

View file

@ -24,8 +24,9 @@ MauvilleCity_House2_EventScript_AskToTradeForHarborMail::
MauvilleCity_House2_EventScript_AcceptTrade::
msgbox MauvilleCity_House2_Text_IllTradeYouCoinCase, MSGBOX_DEFAULT
removeitem ITEM_HARBOR_MAIL
giveitem ITEM_COIN_CASE
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
removeitem ITEM_HARBOR_MAIL
setflag FLAG_RECEIVED_COIN_CASE
goto MauvilleCity_House2_EventScript_ReceivedCoinCase
end

View file

@ -9,6 +9,7 @@ MossdeepCity_House3_EventScript_SuperRodFisherman::
goto_if_eq VAR_RESULT, NO, MossdeepCity_House3_EventScript_DeclineSuperRod
msgbox MossdeepCity_House3_Text_SuperRodIsSuper, MSGBOX_DEFAULT
giveitem ITEM_SUPER_ROD
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_SUPER_ROD
msgbox MossdeepCity_House3_Text_TryDroppingRodInWater, MSGBOX_DEFAULT
release

View file

@ -448,6 +448,7 @@ MtChimney_EventScript_MeteoriteMachine::
goto_if_eq VAR_RESULT, NO, MtChimney_EventScript_LeaveMeteoriteAlone
msgbox MtChimney_Text_PlayerRemovedMeteorite, MSGBOX_DEFAULT
giveitem ITEM_METEORITE
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_METEORITE
releaseall
end

View file

@ -74,6 +74,7 @@ Route104_PrettyPetalFlowerShop_EventScript_WailmerPailGirl::
Route104_PrettyPetalFlowerShop_EventScript_GiveWailmerPail::
msgbox Route104_PrettyPetalFlowerShop_Text_YouCanHaveThis, MSGBOX_DEFAULT
giveitem ITEM_WAILMER_PAIL
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
msgbox Route104_PrettyPetalFlowerShop_Text_WailmerPailExplanation, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_WAILMER_PAIL
release

View file

@ -28,6 +28,7 @@ Route113_GlassWorkshop_EventScript_GlassWorker::
goto_if_eq VAR_GLASS_WORKSHOP_STATE, 1, Route113_GlassWorkshop_EventScript_ExplainSootSack
msgbox Route113_GlassWorkshop_Text_GoCollectAshWithThis, MSGBOX_DEFAULT
giveitem ITEM_SOOT_SACK
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setvar VAR_GLASS_WORKSHOP_STATE, 1
msgbox Route113_GlassWorkshop_Text_ExplainSootSack, MSGBOX_DEFAULT
release

View file

@ -34,6 +34,7 @@ Route118_EventScript_GoodRodFisherman::
Route118_EventScript_ReceiveGoodRod::
msgbox Route118_Text_IdenticalMindsTakeThis, MSGBOX_DEFAULT
giveitem ITEM_GOOD_ROD
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_GOOD_ROD
msgbox Route118_Text_TryYourLuckFishing, MSGBOX_DEFAULT
release

View file

@ -31,6 +31,7 @@ LilycoveCity_ContestLobby_EventScript_ReceptionWelcome::
LilycoveCity_ContestLobby_EventScript_GivePokeblockCase::
msgbox LilycoveCity_ContestLobby_Text_ReceptionDontHavePokeblockCase, MSGBOX_DEFAULT
giveitem ITEM_POKEBLOCK_CASE
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_POKEBLOCK_CASE
msgbox LilycoveCity_ContestLobby_Text_NowThatWeveClearedThatUp, MSGBOX_DEFAULT
return

View file

@ -0,0 +1,26 @@
#include "global.h"
#include "test/battle.h"
ASSUMPTIONS
{
ASSUME(gBattleMoves[MOVE_PURSUIT].effect == EFFECT_PURSUIT);
}
SINGLE_BATTLE_TEST("Pursuited mon correctly switches out after it got hit and activated ability Tangling Hair")
{
GIVEN {
PLAYER(SPECIES_DUGTRIO) { Ability(ABILITY_TANGLING_HAIR); }
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WYNAUT);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { SWITCH(player, 1); MOVE(opponent, MOVE_PURSUIT); }
} SCENE {
MESSAGE("Dugtrio, that's enough! Come back!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_PURSUIT, opponent);
ABILITY_POPUP(player, ABILITY_TANGLING_HAIR);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
MESSAGE("Foe Wynaut's Speed fell!");
MESSAGE("Go! Wobbuffet!");
}
}