Skip to content

Commit

Permalink
Merge pull request #6 from rh-hideout/upcoming
Browse files Browse the repository at this point in the history
Upcoming Merge 3rd
  • Loading branch information
Liamjd14 authored Oct 3, 2024
2 parents a135876 + 80af2af commit 226983b
Show file tree
Hide file tree
Showing 75 changed files with 1,353 additions and 1,228 deletions.
8 changes: 8 additions & 0 deletions asm/macros/battle_script.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1731,6 +1731,14 @@
.4byte \jumpInstr
.endm

.macro checkpokeflute
callnative BS_CheckPokeFlute
.endm

.macro waitfanfare
callnative BS_WaitFanfare
.endm

@ various command changed to more readable macros
.macro cancelmultiturnmoves battler:req
various \battler, VARIOUS_CANCEL_MULTI_TURN_MOVES
Expand Down
20 changes: 20 additions & 0 deletions data/battle_scripts_2.s
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ gBattlescriptsForUsingItem::
.4byte BattleScript_ItemRestoreHP @ EFFECT_ITEM_REVIVE
.4byte BattleScript_ItemRestorePP @ EFFECT_ITEM_RESTORE_PP
.4byte BattleScript_ItemIncreaseAllStats @ EFFECT_ITEM_INCREASE_ALL_STATS
.4byte BattleScript_UsePokeFlute @ EFFECT_ITEM_USE_POKE_FLUTE

.align 2
gBattlescriptsForSafariActions::
Expand Down Expand Up @@ -110,6 +111,25 @@ BattleScript_ItemIncreaseStat::
waitmessage B_WAIT_TIME_LONG
end

BattleScript_UsePokeFlute::
checkpokeflute
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 1, BattleScript_PokeFluteWakeUp
printstring STRINGID_POKEFLUTECATCHY
waitmessage B_WAIT_TIME_LONG
goto BattleScript_PokeFluteEnd

BattleScript_PokeFluteWakeUp::
printstring STRINGID_POKEFLUTE
waitmessage B_WAIT_TIME_LONG
fanfare MUS_RG_POKE_FLUTE
waitfanfare
printstring STRINGID_MONHEARINGFLUTEAWOKE
waitmessage B_WAIT_TIME_LONG
updatestatusicon BS_PLAYER2
waitstate
BattleScript_PokeFluteEnd::
finishaction

BattleScript_ItemSetMist::
call BattleScript_UseItemMessage
setmist
Expand Down
84 changes: 44 additions & 40 deletions include/constants/battle_script_commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,46 +265,50 @@
#define PARTY_SCREEN_OPTIONAL (1 << 7) // Flag for first argument to openpartyscreen

// cases for Cmd_moveend
#define MOVEEND_SUM_DAMAGE 0
#define MOVEEND_PROTECT_LIKE_EFFECT 1
#define MOVEEND_RAGE 2
#define MOVEEND_SYNCHRONIZE_TARGET 3
#define MOVEEND_ABILITIES 4
#define MOVEEND_ABILITIES_ATTACKER 5
#define MOVEEND_STATUS_IMMUNITY_ABILITIES 6
#define MOVEEND_SYNCHRONIZE_ATTACKER 7
#define MOVEEND_CHOICE_MOVE 8
#define MOVEEND_ATTACKER_INVISIBLE 9
#define MOVEEND_ATTACKER_VISIBLE 10
#define MOVEEND_TARGET_VISIBLE 11
#define MOVEEND_ITEM_EFFECTS_TARGET 12
#define MOVEEND_MOVE_EFFECTS2 13
#define MOVEEND_ITEM_EFFECTS_ALL 14
#define MOVEEND_KINGSROCK 15 // These item effects will occur each strike of a multi-hit move
#define MOVEEND_NUM_HITS 16
#define MOVEEND_SUBSTITUTE 17
#define MOVEEND_SKY_DROP_CONFUSE 18
#define MOVEEND_UPDATE_LAST_MOVES 19
#define MOVEEND_MIRROR_MOVE 20
#define MOVEEND_NEXT_TARGET 21 // Everything up until here is handled for each strike of a multi-hit move
#define MOVEEND_MULTIHIT_MOVE 22
#define MOVEEND_DEFROST 23
#define MOVEEND_RECOIL 24
#define MOVEEND_MAGICIAN 25 // Occurs after final multi-hit strike, and after other items/abilities would activate
#define MOVEEND_EJECT_ITEMS 26
#define MOVEEND_WHITE_HERB 27
#define MOVEEND_RED_CARD 28
#define MOVEEND_LIFEORB_SHELLBELL 29 // Includes shell bell, throat spray, etc
#define MOVEEND_CHANGED_ITEMS 30
#define MOVEEND_PICKPOCKET 31
#define MOVEEND_DANCER 32
#define MOVEEND_EMERGENCY_EXIT 33
#define MOVEEND_SYMBIOSIS 34
#define MOVEEND_OPPORTUNIST 35 // Occurs after other stat change items/abilities to try and copy the boosts
#define MOVEEND_SAME_MOVE_TURNS 36
#define MOVEEND_SET_EVOLUTION_TRACKER 37
#define MOVEEND_CLEAR_BITS 38
#define MOVEEND_COUNT 39
enum MoveEndEffects
{
MOVEEND_SUM_DAMAGE,
MOVEEND_PROTECT_LIKE_EFFECT,
MOVEEND_RAGE,
MOVEEND_SYNCHRONIZE_TARGET,
MOVEEND_ABILITIES,
MOVEEND_ABILITIES_ATTACKER,
MOVEEND_STATUS_IMMUNITY_ABILITIES,
MOVEEND_SYNCHRONIZE_ATTACKER,
MOVEEND_CHOICE_MOVE,
MOVEEND_ATTACKER_INVISIBLE,
MOVEEND_ATTACKER_VISIBLE,
MOVEEND_TARGET_VISIBLE,
MOVEEND_ITEM_EFFECTS_TARGET,
MOVEEND_MOVE_EFFECTS2,
MOVEEND_ITEM_EFFECTS_ALL,
MOVEEND_KINGSROCK, // These item effects will occur each strike of a multi-hit move
MOVEEND_NUM_HITS,
MOVEEND_SUBSTITUTE,
MOVEEND_SKY_DROP_CONFUSE,
MOVEEND_UPDATE_LAST_MOVES,
MOVEEND_MIRROR_MOVE,
MOVEEND_NEXT_TARGET, // Everything up until here is handled for each strike of a multi-hit move
MOVEEND_MULTIHIT_MOVE,
MOVEEND_DEFROST,
MOVEEND_RECOIL,
MOVEEND_ITEM_EFFECTS_ATTACKER,
MOVEEND_MAGICIAN, // Occurs after final multi-hit strike, and after other items/abilities would activate
MOVEEND_EJECT_ITEMS,
MOVEEND_WHITE_HERB,
MOVEEND_RED_CARD,
MOVEEND_LIFEORB_SHELLBELL, // Includes shell bell, throat spray, etc
MOVEEND_CHANGED_ITEMS,
MOVEEND_PICKPOCKET,
MOVEEND_DANCER,
MOVEEND_EMERGENCY_EXIT,
MOVEEND_SYMBIOSIS,
MOVEEND_OPPORTUNIST, // Occurs after other stat change items/abilities to try and copy the boosts
MOVEEND_SAME_MOVE_TURNS,
MOVEEND_SET_EVOLUTION_TRACKER,
MOVEEND_CLEAR_BITS,
MOVEEND_COUNT,
};

// switch cases
#define B_SWITCH_NORMAL 0
Expand Down
5 changes: 4 additions & 1 deletion include/constants/battle_string_ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -713,8 +713,11 @@
#define STRINGID_PKMNMADESHELLGLEAM 711
#define STRINGID_FICKLEBEAMDOUBLED 712
#define STRINGID_COMMANDERACTIVATES 713
#define STRINGID_POKEFLUTECATCHY 714
#define STRINGID_POKEFLUTE 715
#define STRINGID_MONHEARINGFLUTEAWOKE 716

#define BATTLESTRINGS_COUNT 714
#define BATTLESTRINGS_COUNT 717

// This is the string id that gBattleStringsTable starts with.
// String ids before this (e.g. STRINGID_INTROMSG) are not in the table,
Expand Down
16 changes: 8 additions & 8 deletions include/constants/cries.h
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,7 @@ enum {
#if P_FAMILY_FLABEBE
CRY_FLABEBE,
CRY_FLOETTE,
CRY_FLOETTE_ETERNAL_FLOWER,
CRY_FLOETTE_ETERNAL,
CRY_FLORGES,
#endif //P_FAMILY_FLABEBE
#if P_FAMILY_SKIDDO
Expand Down Expand Up @@ -2084,12 +2084,12 @@ enum {
CRY_STONJOURNER,
#endif //P_FAMILY_STONJOURNER
#if P_FAMILY_EISCUE
CRY_EISCUE_ICE_FACE,
CRY_EISCUE_ICE,
CRY_EISCUE_NOICE_FACE,
#endif //P_FAMILY_EISCUE
#if P_FAMILY_INDEEDEE
CRY_INDEEDEE_MALE,
CRY_INDEEDEE_FEMALE,
CRY_INDEEDEE_M,
CRY_INDEEDEE_F,
#endif //P_FAMILY_INDEEDEE
#if P_FAMILY_MORPEKO
CRY_MORPEKO_FULL_BELLY,
Expand Down Expand Up @@ -2123,11 +2123,11 @@ enum {
CRY_DRAGAPULT,
#endif //P_FAMILY_DREEPY
#if P_FAMILY_ZACIAN
CRY_ZACIAN_HERO_OF_MANY_BATTLES,
CRY_ZACIAN_HERO,
CRY_ZACIAN_CROWNED_SWORD,
#endif //P_FAMILY_ZACIAN
#if P_FAMILY_ZAMAZENTA
CRY_ZAMAZENTA_HERO_OF_MANY_BATTLES,
CRY_ZAMAZENTA_HERO,
CRY_ZAMAZENTA_CROWNED_SHIELD,
#endif //P_FAMILY_ZAMAZENTA
#if P_FAMILY_ETERNATUS
Expand Down Expand Up @@ -2182,8 +2182,8 @@ enum {
#endif //P_FAMILY_QUAXLY
#if P_FAMILY_LECHONK
CRY_LECHONK,
CRY_OINKOLOGNE_MALE,
CRY_OINKOLOGNE_FEMALE,
CRY_OINKOLOGNE_M,
CRY_OINKOLOGNE_F,
#endif //P_FAMILY_LECHONK
#if P_FAMILY_TAROUNTULA
CRY_TAROUNTULA,
Expand Down
1 change: 1 addition & 0 deletions include/constants/items.h
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,7 @@
#define EFFECT_ITEM_REVIVE 9
#define EFFECT_ITEM_RESTORE_PP 10
#define EFFECT_ITEM_INCREASE_ALL_STATS 11
#define EFFECT_ITEM_USE_POKE_FLUTE 12

// Enigma Berry dummy constant
#define EFFECT_ITEM_ENIGMA_BERRY_EREADER 1
Expand Down
Loading

0 comments on commit 226983b

Please sign in to comment.