Merge branch '_RHH/master' into _RHH/upcoming
This commit is contained in:
commit
e005ffb576
14 changed files with 210 additions and 173 deletions
2
Makefile
2
Makefile
|
@ -320,6 +320,8 @@ include audio_rules.mk
|
|||
# NOTE: Tools must have been built prior (FIXME)
|
||||
# so you can't really call this rule directly
|
||||
generated: $(AUTO_GEN_TARGETS)
|
||||
@: # Silence the "Nothing to be done for `generated'" message, which some people were confusing for an error.
|
||||
|
||||
|
||||
%.s: ;
|
||||
%.png: ;
|
||||
|
|
|
@ -1731,6 +1731,10 @@
|
|||
.4byte \failInstr
|
||||
.endm
|
||||
|
||||
.macro setmagiccoattarget
|
||||
callnative BS_SetMagicCoatTarget
|
||||
.endm
|
||||
|
||||
.macro jumpifcommanderactive jumpInstr:req
|
||||
callnative BS_JumpIfCommanderActive
|
||||
.4byte \jumpInstr
|
||||
|
@ -1762,10 +1766,6 @@
|
|||
various \battler, VARIOUS_CANCEL_MULTI_TURN_MOVES
|
||||
.endm
|
||||
|
||||
.macro setmagiccoattarget battler:req
|
||||
various \battler, VARIOUS_SET_MAGIC_COAT_TARGET
|
||||
.endm
|
||||
|
||||
.macro getifcantrunfrombattle battler:req
|
||||
various \battler, VARIOUS_IS_RUNNING_IMPOSSIBLE
|
||||
.endm
|
||||
|
|
|
@ -6891,25 +6891,34 @@ BattleScript_GrudgeTakesPp::
|
|||
waitmessage B_WAIT_TIME_LONG
|
||||
return
|
||||
|
||||
BattleScript_MagicCoatBounce::
|
||||
BattleScript_MagicBounce::
|
||||
attackstring
|
||||
ppreduce
|
||||
pause B_WAIT_TIME_SHORT
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0, BattleScript_MagicCoatBounce_Print
|
||||
call BattleScript_AbilityPopUp
|
||||
BattleScript_MagicCoatBounce_Print:
|
||||
printfromtable gMagicCoatBounceStringIds
|
||||
printstring STRINGID_PKMNMOVEBOUNCEDABILITY
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
setmagiccoattarget
|
||||
orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_ALLOW_NO_PP
|
||||
bicword gHitMarker, HITMARKER_NO_ATTACKSTRING
|
||||
return
|
||||
|
||||
BattleScript_MagicCoat::
|
||||
attackstring
|
||||
ppreduce
|
||||
pause B_WAIT_TIME_SHORT
|
||||
setmagiccoattarget
|
||||
printstring STRINGID_PKMNMOVEBOUNCED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_ALLOW_NO_PP
|
||||
bicword gHitMarker, HITMARKER_NO_ATTACKSTRING
|
||||
setmagiccoattarget BS_ATTACKER
|
||||
return
|
||||
|
||||
BattleScript_MagicCoatBouncePrankster::
|
||||
BattleScript_MagicCoatPrankster::
|
||||
attackstring
|
||||
ppreduce
|
||||
pause B_WAIT_TIME_SHORT
|
||||
printfromtable gMagicCoatBounceStringIds
|
||||
printstring STRINGID_PKMNMOVEBOUNCED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
printstring STRINGID_ITDOESNTAFFECT
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -21,6 +21,7 @@ POKEDEXGFXDIR := graphics/pokedex
|
|||
STARTERGFXDIR := graphics/starter_choose
|
||||
NAMINGGFXDIR := graphics/naming_screen
|
||||
SPINDAGFXDIR := graphics/pokemon/spinda/spots
|
||||
TITLESCREENGFXDIR := graphics/title_screen
|
||||
|
||||
types := none normal fight flying poison ground rock bug ghost steel mystery fire water grass electric psychic ice dragon dark fairy stellar
|
||||
contest_types := cool beauty cute smart tough
|
||||
|
@ -270,9 +271,13 @@ $(FONTGFXDIR)/frlg_female.fwjpnfont: $(FONTGFXDIR)/japanese_frlg_female.png
|
|||
|
||||
|
||||
### Miscellaneous ###
|
||||
graphics/title_screen/pokemon_logo.gbapal: %.gbapal: %.pal
|
||||
|
||||
$(TITLESCREENGFXDIR)/pokemon_logo.gbapal: %.gbapal: %.pal
|
||||
$(GFX) $< $@ -num_colors 224
|
||||
|
||||
$(TITLESCREENGFXDIR)/emerald_version.8bpp: %.8bpp: %.png
|
||||
$(GFX) $< $@ -mwidth 8 -mheight 4
|
||||
|
||||
graphics/pokemon_jump/bg.4bpp: %.4bpp: %.png
|
||||
$(GFX) $< $@ -num_tiles 63 -Wnum_tiles
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef GUARD_BARD_MUSIC_H
|
||||
#define GUARD_BARD_MUSIC_H
|
||||
|
||||
#define BARD_SOUND_MAX_LENGTH 6
|
||||
|
||||
struct BardSound
|
||||
{
|
||||
/*0x00*/ u8 songLengthId;
|
||||
|
@ -26,8 +28,8 @@ struct BardSong
|
|||
/*0x06*/ u16 volume;
|
||||
/*0x08*/ s16 pitch;
|
||||
/*0x0A*/ s16 voiceInflection;
|
||||
/*0x0C*/ u16 lyrics[6];
|
||||
/*0x18*/ struct BardPhoneme phonemes[6];
|
||||
/*0x0C*/ u16 lyrics[BARD_SOUND_MAX_LENGTH];
|
||||
/*0x18*/ struct BardPhoneme phonemes[BARD_SOUND_MAX_LENGTH];
|
||||
/*0x30*/ const struct BardSound *sound;
|
||||
};
|
||||
|
||||
|
|
|
@ -111,8 +111,9 @@ extern const u8 BattleScript_MoveUsedIsImprisoned[];
|
|||
extern const u8 BattleScript_SelectingImprisonedMove[];
|
||||
extern const u8 BattleScript_SelectingImprisonedMoveInPalace[];
|
||||
extern const u8 BattleScript_GrudgeTakesPp[];
|
||||
extern const u8 BattleScript_MagicCoatBounce[];
|
||||
extern const u8 BattleScript_MagicCoatBouncePrankster[];
|
||||
extern const u8 BattleScript_MagicBounce[];
|
||||
extern const u8 BattleScript_MagicCoat[];
|
||||
extern const u8 BattleScript_MagicCoatPrankster[];
|
||||
extern const u8 BattleScript_SnatchedMove[];
|
||||
extern const u8 BattleScript_EnduredMsg[];
|
||||
extern const u8 BattleScript_OneHitKOMsg[];
|
||||
|
|
|
@ -90,137 +90,136 @@
|
|||
|
||||
// Cmd_various
|
||||
#define VARIOUS_CANCEL_MULTI_TURN_MOVES 0
|
||||
#define VARIOUS_SET_MAGIC_COAT_TARGET 1
|
||||
#define VARIOUS_IS_RUNNING_IMPOSSIBLE 2
|
||||
#define VARIOUS_GET_MOVE_TARGET 3
|
||||
#define VARIOUS_GET_BATTLER_FAINTED 4
|
||||
#define VARIOUS_RESET_SWITCH_IN_ABILITY_BITS 5
|
||||
#define VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP 6
|
||||
#define VARIOUS_RESET_PLAYER_FAINTED 7
|
||||
#define VARIOUS_PALACE_FLAVOR_TEXT 8
|
||||
#define VARIOUS_ARENA_JUDGMENT_WINDOW 9
|
||||
#define VARIOUS_ARENA_OPPONENT_MON_LOST 10
|
||||
#define VARIOUS_ARENA_PLAYER_MON_LOST 11
|
||||
#define VARIOUS_ARENA_BOTH_MONS_LOST 12
|
||||
#define VARIOUS_EMIT_YESNOBOX 13
|
||||
#define VARIOUS_DRAW_ARENA_REF_TEXT_BOX 14
|
||||
#define VARIOUS_ERASE_ARENA_REF_TEXT_BOX 15
|
||||
#define VARIOUS_ARENA_JUDGMENT_STRING 16
|
||||
#define VARIOUS_ARENA_WAIT_STRING 17
|
||||
#define VARIOUS_WAIT_CRY 18
|
||||
#define VARIOUS_RETURN_OPPONENT_MON1 19
|
||||
#define VARIOUS_RETURN_OPPONENT_MON2 20
|
||||
#define VARIOUS_VOLUME_DOWN 21
|
||||
#define VARIOUS_VOLUME_UP 22
|
||||
#define VARIOUS_SET_ALREADY_STATUS_MOVE_ATTEMPT 23
|
||||
#define VARIOUS_PALACE_TRY_ESCAPE_STATUS 24
|
||||
#define VARIOUS_SET_TELEPORT_OUTCOME 25
|
||||
#define VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC 26
|
||||
#define VARIOUS_STAT_TEXT_BUFFER 27
|
||||
#define VARIOUS_SWITCHIN_ABILITIES 28
|
||||
#define VARIOUS_INSTANT_HP_DROP 29
|
||||
#define VARIOUS_CLEAR_STATUS 30
|
||||
#define VARIOUS_RESTORE_PP 31
|
||||
#define VARIOUS_TRY_ACTIVATE_MOXIE 32
|
||||
#define VARIOUS_TRY_ACTIVATE_FELL_STINGER 33
|
||||
#define VARIOUS_PLAY_MOVE_ANIMATION 34
|
||||
#define VARIOUS_SET_LUCKY_CHANT 35
|
||||
#define VARIOUS_SUCKER_PUNCH_CHECK 36
|
||||
#define VARIOUS_SET_SIMPLE_BEAM 37
|
||||
#define VARIOUS_TRY_ENTRAINMENT 38
|
||||
#define VARIOUS_SET_LAST_USED_ABILITY 39
|
||||
#define VARIOUS_INVERT_STAT_STAGES 40
|
||||
#define VARIOUS_TRY_ME_FIRST 41
|
||||
#define VARIOUS_JUMP_IF_BATTLE_END 42
|
||||
#define VARIOUS_TRY_ELECTRIFY 43
|
||||
#define VARIOUS_TRY_REFLECT_TYPE 44
|
||||
#define VARIOUS_TRY_SOAK 45
|
||||
#define VARIOUS_HANDLE_MEGA_EVO 46
|
||||
#define VARIOUS_TRY_LAST_RESORT 47
|
||||
#define VARIOUS_SET_ARG_TO_BATTLE_DAMAGE 48
|
||||
#define VARIOUS_TRY_AUTOTOMIZE 49
|
||||
#define VARIOUS_ABILITY_POPUP 50
|
||||
#define VARIOUS_JUMP_IF_TARGET_ALLY 51
|
||||
#define VARIOUS_TRY_SYNCHRONOISE 52
|
||||
#define VARIOUS_PSYCHO_SHIFT 53
|
||||
#define VARIOUS_CURE_STATUS 54
|
||||
#define VARIOUS_POWER_TRICK 55
|
||||
#define VARIOUS_AFTER_YOU 56
|
||||
#define VARIOUS_BESTOW 57
|
||||
#define VARIOUS_JUMP_IF_NOT_GROUNDED 58
|
||||
#define VARIOUS_HANDLE_TRAINER_SLIDE_MSG 59
|
||||
#define VARIOUS_TRY_TRAINER_SLIDE_MSG_FIRST_OFF 60
|
||||
#define VARIOUS_TRY_TRAINER_SLIDE_MSG_LAST_ON 61
|
||||
#define VARIOUS_SET_AURORA_VEIL 62
|
||||
#define VARIOUS_TRY_THIRD_TYPE 63
|
||||
#define VARIOUS_ACUPRESSURE 64
|
||||
#define VARIOUS_SET_POWDER 65
|
||||
#define VARIOUS_SPECTRAL_THIEF 66
|
||||
#define VARIOUS_GRAVITY_ON_AIRBORNE_MONS 67
|
||||
#define VARIOUS_CHECK_IF_GRASSY_TERRAIN_HEALS 68
|
||||
#define VARIOUS_JUMP_IF_ROAR_FAILS 69
|
||||
#define VARIOUS_TRY_INSTRUCT 70
|
||||
#define VARIOUS_JUMP_IF_NOT_BERRY 71
|
||||
#define VARIOUS_TRACE_ABILITY 72
|
||||
#define VARIOUS_UPDATE_NICK 73
|
||||
#define VARIOUS_TRY_ILLUSION_OFF 74
|
||||
#define VARIOUS_SET_SPRITEIGNORE0HP 75
|
||||
#define VARIOUS_HANDLE_FORM_CHANGE 76
|
||||
#define VARIOUS_GET_STAT_VALUE 77
|
||||
#define VARIOUS_JUMP_IF_FULL_HP 78
|
||||
#define VARIOUS_LOSE_TYPE 79
|
||||
#define VARIOUS_TRY_ACTIVATE_SOULHEART 80
|
||||
#define VARIOUS_TRY_ACTIVATE_RECEIVER 81
|
||||
#define VARIOUS_TRY_ACTIVATE_BEAST_BOOST 82
|
||||
#define VARIOUS_TRY_FRISK 83
|
||||
#define VARIOUS_JUMP_IF_SHIELDS_DOWN_PROTECTED 84
|
||||
#define VARIOUS_TRY_FAIRY_LOCK 85
|
||||
#define VARIOUS_JUMP_IF_NO_ALLY 86
|
||||
#define VARIOUS_POISON_TYPE_IMMUNITY 87
|
||||
#define VARIOUS_JUMP_IF_HOLD_EFFECT 88
|
||||
#define VARIOUS_INFATUATE_WITH_BATTLER 89
|
||||
#define VARIOUS_SET_LAST_USED_ITEM 90
|
||||
#define VARIOUS_PARALYZE_TYPE_IMMUNITY 91
|
||||
#define VARIOUS_JUMP_IF_ABSENT 92
|
||||
#define VARIOUS_DESTROY_ABILITY_POPUP 93
|
||||
#define VARIOUS_TOTEM_BOOST 94
|
||||
#define VARIOUS_TRY_ACTIVATE_GRIM_NEIGH 95
|
||||
#define VARIOUS_MOVEEND_ITEM_EFFECTS 96
|
||||
#define VARIOUS_TERRAIN_SEED 97
|
||||
#define VARIOUS_MAKE_INVISIBLE 98
|
||||
#define VARIOUS_ROOM_SERVICE 99
|
||||
#define VARIOUS_EERIE_SPELL_PP_REDUCE 100
|
||||
#define VARIOUS_JUMP_IF_TEAM_HEALTHY 101
|
||||
#define VARIOUS_TRY_HEAL_QUARTER_HP 102
|
||||
#define VARIOUS_JUMP_IF_PRANKSTER_BLOCKED 103
|
||||
#define VARIOUS_TRY_TO_CLEAR_PRIMAL_WEATHER 104
|
||||
#define VARIOUS_GET_ROTOTILLER_TARGETS 105
|
||||
#define VARIOUS_JUMP_IF_NOT_ROTOTILLER_AFFECTED 106
|
||||
#define VARIOUS_TRY_ACTIVATE_BATTLE_BOND 107
|
||||
#define VARIOUS_CONSUME_BERRY 108
|
||||
#define VARIOUS_JUMP_IF_CANT_REVERT_TO_PRIMAL 109
|
||||
#define VARIOUS_JUMP_IF_SPECIES 110
|
||||
#define VARIOUS_UPDATE_ABILITY_POPUP 111
|
||||
#define VARIOUS_JUMP_IF_WEATHER_AFFECTED 112
|
||||
#define VARIOUS_JUMP_IF_LEAF_GUARD_PROTECTED 113
|
||||
#define VARIOUS_SET_ATTACKER_STICKY_WEB_USER 114
|
||||
#define VARIOUS_TRY_NO_RETREAT 115
|
||||
#define VARIOUS_CHECK_POLTERGEIST 116
|
||||
#define VARIOUS_CUT_1_3_HP_RAISE_STATS 117
|
||||
#define VARIOUS_TRY_END_NEUTRALIZING_GAS 118
|
||||
#define VARIOUS_JUMP_IF_UNDER_200 119
|
||||
#define VARIOUS_SET_SKY_DROP 120
|
||||
#define VARIOUS_CLEAR_SKY_DROP 121
|
||||
#define VARIOUS_SKY_DROP_YAWN 122
|
||||
#define VARIOUS_CURE_CERTAIN_STATUSES 123
|
||||
#define VARIOUS_TRY_RESET_NEGATIVE_STAT_STAGES 124
|
||||
#define VARIOUS_JUMP_IF_LAST_USED_ITEM_BERRY 125
|
||||
#define VARIOUS_JUMP_IF_LAST_USED_ITEM_HOLD_EFFECT 126
|
||||
#define VARIOUS_SAVE_BATTLER_ITEM 127
|
||||
#define VARIOUS_RESTORE_BATTLER_ITEM 128
|
||||
#define VARIOUS_BATTLER_ITEM_TO_LAST_USED_ITEM 129
|
||||
#define VARIOUS_SWAP_SIDE_STATUSES 130
|
||||
#define VARIOUS_SWAP_STATS 131
|
||||
#define VARIOUS_IS_RUNNING_IMPOSSIBLE 1
|
||||
#define VARIOUS_GET_MOVE_TARGET 2
|
||||
#define VARIOUS_GET_BATTLER_FAINTED 3
|
||||
#define VARIOUS_RESET_SWITCH_IN_ABILITY_BITS 4
|
||||
#define VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP 5
|
||||
#define VARIOUS_RESET_PLAYER_FAINTED 6
|
||||
#define VARIOUS_PALACE_FLAVOR_TEXT 7
|
||||
#define VARIOUS_ARENA_JUDGMENT_WINDOW 8
|
||||
#define VARIOUS_ARENA_OPPONENT_MON_LOST 9
|
||||
#define VARIOUS_ARENA_PLAYER_MON_LOST 10
|
||||
#define VARIOUS_ARENA_BOTH_MONS_LOST 11
|
||||
#define VARIOUS_EMIT_YESNOBOX 12
|
||||
#define VARIOUS_DRAW_ARENA_REF_TEXT_BOX 13
|
||||
#define VARIOUS_ERASE_ARENA_REF_TEXT_BOX 14
|
||||
#define VARIOUS_ARENA_JUDGMENT_STRING 15
|
||||
#define VARIOUS_ARENA_WAIT_STRING 16
|
||||
#define VARIOUS_WAIT_CRY 17
|
||||
#define VARIOUS_RETURN_OPPONENT_MON1 18
|
||||
#define VARIOUS_RETURN_OPPONENT_MON2 19
|
||||
#define VARIOUS_VOLUME_DOWN 20
|
||||
#define VARIOUS_VOLUME_UP 21
|
||||
#define VARIOUS_SET_ALREADY_STATUS_MOVE_ATTEMPT 22
|
||||
#define VARIOUS_PALACE_TRY_ESCAPE_STATUS 23
|
||||
#define VARIOUS_SET_TELEPORT_OUTCOME 24
|
||||
#define VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC 25
|
||||
#define VARIOUS_STAT_TEXT_BUFFER 26
|
||||
#define VARIOUS_SWITCHIN_ABILITIES 27
|
||||
#define VARIOUS_INSTANT_HP_DROP 28
|
||||
#define VARIOUS_CLEAR_STATUS 29
|
||||
#define VARIOUS_RESTORE_PP 30
|
||||
#define VARIOUS_TRY_ACTIVATE_MOXIE 31
|
||||
#define VARIOUS_TRY_ACTIVATE_FELL_STINGER 32
|
||||
#define VARIOUS_PLAY_MOVE_ANIMATION 33
|
||||
#define VARIOUS_SET_LUCKY_CHANT 34
|
||||
#define VARIOUS_SUCKER_PUNCH_CHECK 35
|
||||
#define VARIOUS_SET_SIMPLE_BEAM 36
|
||||
#define VARIOUS_TRY_ENTRAINMENT 37
|
||||
#define VARIOUS_SET_LAST_USED_ABILITY 38
|
||||
#define VARIOUS_INVERT_STAT_STAGES 39
|
||||
#define VARIOUS_TRY_ME_FIRST 40
|
||||
#define VARIOUS_JUMP_IF_BATTLE_END 41
|
||||
#define VARIOUS_TRY_ELECTRIFY 42
|
||||
#define VARIOUS_TRY_REFLECT_TYPE 43
|
||||
#define VARIOUS_TRY_SOAK 44
|
||||
#define VARIOUS_HANDLE_MEGA_EVO 45
|
||||
#define VARIOUS_TRY_LAST_RESORT 46
|
||||
#define VARIOUS_SET_ARG_TO_BATTLE_DAMAGE 47
|
||||
#define VARIOUS_TRY_AUTOTOMIZE 48
|
||||
#define VARIOUS_ABILITY_POPUP 49
|
||||
#define VARIOUS_JUMP_IF_TARGET_ALLY 50
|
||||
#define VARIOUS_TRY_SYNCHRONOISE 51
|
||||
#define VARIOUS_PSYCHO_SHIFT 52
|
||||
#define VARIOUS_CURE_STATUS 53
|
||||
#define VARIOUS_POWER_TRICK 54
|
||||
#define VARIOUS_AFTER_YOU 55
|
||||
#define VARIOUS_BESTOW 56
|
||||
#define VARIOUS_JUMP_IF_NOT_GROUNDED 57
|
||||
#define VARIOUS_HANDLE_TRAINER_SLIDE_MSG 58
|
||||
#define VARIOUS_TRY_TRAINER_SLIDE_MSG_FIRST_OFF 59
|
||||
#define VARIOUS_TRY_TRAINER_SLIDE_MSG_LAST_ON 60
|
||||
#define VARIOUS_SET_AURORA_VEIL 61
|
||||
#define VARIOUS_TRY_THIRD_TYPE 62
|
||||
#define VARIOUS_ACUPRESSURE 63
|
||||
#define VARIOUS_SET_POWDER 64
|
||||
#define VARIOUS_SPECTRAL_THIEF 65
|
||||
#define VARIOUS_GRAVITY_ON_AIRBORNE_MONS 66
|
||||
#define VARIOUS_CHECK_IF_GRASSY_TERRAIN_HEALS 67
|
||||
#define VARIOUS_JUMP_IF_ROAR_FAILS 68
|
||||
#define VARIOUS_TRY_INSTRUCT 69
|
||||
#define VARIOUS_JUMP_IF_NOT_BERRY 70
|
||||
#define VARIOUS_TRACE_ABILITY 71
|
||||
#define VARIOUS_UPDATE_NICK 72
|
||||
#define VARIOUS_TRY_ILLUSION_OFF 73
|
||||
#define VARIOUS_SET_SPRITEIGNORE0HP 74
|
||||
#define VARIOUS_HANDLE_FORM_CHANGE 75
|
||||
#define VARIOUS_GET_STAT_VALUE 76
|
||||
#define VARIOUS_JUMP_IF_FULL_HP 77
|
||||
#define VARIOUS_LOSE_TYPE 78
|
||||
#define VARIOUS_TRY_ACTIVATE_SOULHEART 79
|
||||
#define VARIOUS_TRY_ACTIVATE_RECEIVER 80
|
||||
#define VARIOUS_TRY_ACTIVATE_BEAST_BOOST 81
|
||||
#define VARIOUS_TRY_FRISK 82
|
||||
#define VARIOUS_JUMP_IF_SHIELDS_DOWN_PROTECTED 83
|
||||
#define VARIOUS_TRY_FAIRY_LOCK 84
|
||||
#define VARIOUS_JUMP_IF_NO_ALLY 85
|
||||
#define VARIOUS_POISON_TYPE_IMMUNITY 86
|
||||
#define VARIOUS_JUMP_IF_HOLD_EFFECT 87
|
||||
#define VARIOUS_INFATUATE_WITH_BATTLER 88
|
||||
#define VARIOUS_SET_LAST_USED_ITEM 89
|
||||
#define VARIOUS_PARALYZE_TYPE_IMMUNITY 90
|
||||
#define VARIOUS_JUMP_IF_ABSENT 91
|
||||
#define VARIOUS_DESTROY_ABILITY_POPUP 92
|
||||
#define VARIOUS_TOTEM_BOOST 93
|
||||
#define VARIOUS_TRY_ACTIVATE_GRIM_NEIGH 94
|
||||
#define VARIOUS_MOVEEND_ITEM_EFFECTS 95
|
||||
#define VARIOUS_TERRAIN_SEED 96
|
||||
#define VARIOUS_MAKE_INVISIBLE 97
|
||||
#define VARIOUS_ROOM_SERVICE 98
|
||||
#define VARIOUS_EERIE_SPELL_PP_REDUCE 99
|
||||
#define VARIOUS_JUMP_IF_TEAM_HEALTHY 100
|
||||
#define VARIOUS_TRY_HEAL_QUARTER_HP 101
|
||||
#define VARIOUS_JUMP_IF_PRANKSTER_BLOCKED 102
|
||||
#define VARIOUS_TRY_TO_CLEAR_PRIMAL_WEATHER 103
|
||||
#define VARIOUS_GET_ROTOTILLER_TARGETS 104
|
||||
#define VARIOUS_JUMP_IF_NOT_ROTOTILLER_AFFECTED 105
|
||||
#define VARIOUS_TRY_ACTIVATE_BATTLE_BOND 106
|
||||
#define VARIOUS_CONSUME_BERRY 107
|
||||
#define VARIOUS_JUMP_IF_CANT_REVERT_TO_PRIMAL 108
|
||||
#define VARIOUS_JUMP_IF_SPECIES 109
|
||||
#define VARIOUS_UPDATE_ABILITY_POPUP 110
|
||||
#define VARIOUS_JUMP_IF_WEATHER_AFFECTED 111
|
||||
#define VARIOUS_JUMP_IF_LEAF_GUARD_PROTECTED 112
|
||||
#define VARIOUS_SET_ATTACKER_STICKY_WEB_USER 113
|
||||
#define VARIOUS_TRY_NO_RETREAT 114
|
||||
#define VARIOUS_CHECK_POLTERGEIST 115
|
||||
#define VARIOUS_CUT_1_3_HP_RAISE_STATS 116
|
||||
#define VARIOUS_TRY_END_NEUTRALIZING_GAS 117
|
||||
#define VARIOUS_JUMP_IF_UNDER_200 118
|
||||
#define VARIOUS_SET_SKY_DROP 119
|
||||
#define VARIOUS_CLEAR_SKY_DROP 120
|
||||
#define VARIOUS_SKY_DROP_YAWN 121
|
||||
#define VARIOUS_CURE_CERTAIN_STATUSES 122
|
||||
#define VARIOUS_TRY_RESET_NEGATIVE_STAT_STAGES 123
|
||||
#define VARIOUS_JUMP_IF_LAST_USED_ITEM_BERRY 124
|
||||
#define VARIOUS_JUMP_IF_LAST_USED_ITEM_HOLD_EFFECT 125
|
||||
#define VARIOUS_SAVE_BATTLER_ITEM 126
|
||||
#define VARIOUS_RESTORE_BATTLER_ITEM 127
|
||||
#define VARIOUS_BATTLER_ITEM_TO_LAST_USED_ITEM 128
|
||||
#define VARIOUS_SWAP_SIDE_STATUSES 129
|
||||
#define VARIOUS_SWAP_STATS 130
|
||||
|
||||
// Cmd_manipulatedamage
|
||||
#define DMG_CHANGE_SIGN 0
|
||||
|
|
|
@ -48,7 +48,7 @@ void GetWordPhonemes(struct BardSong *song, u16 word)
|
|||
const struct BardSound *sound;
|
||||
|
||||
song->length = 0;
|
||||
for (i = 0; i < 6; i ++)
|
||||
for (i = 0; i < BARD_SOUND_MAX_LENGTH; i ++)
|
||||
{
|
||||
sound = &song->sound[i];
|
||||
if (sound->songLengthId != 0xFF)
|
||||
|
|
|
@ -1645,11 +1645,6 @@ const u16 gTerrainPreventsStringIds[] =
|
|||
[B_MSG_TERRAINPREVENTS_PSYCHIC] = STRINGID_PSYCHICTERRAINPREVENTS
|
||||
};
|
||||
|
||||
const u16 gMagicCoatBounceStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNMOVEBOUNCED, STRINGID_PKMNMOVEBOUNCEDABILITY
|
||||
};
|
||||
|
||||
const u16 gHealingWishStringIds[] =
|
||||
{
|
||||
STRINGID_HEALINGWISHCAMETRUE, STRINGID_LUNARDANCECAMETRUE
|
||||
|
|
|
@ -1355,19 +1355,18 @@ static void Cmd_attackcanceler(void)
|
|||
&& !gBattleStruct->bouncedMoveIsUsed)
|
||||
{
|
||||
gBattleStruct->bouncedMoveIsUsed = TRUE;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
// Edge case for bouncing a powder move against a grass type pokemon.
|
||||
SetAtkCancellerForCalledMove();
|
||||
if (BlocksPrankster(gCurrentMove, gBattlerTarget, gBattlerAttacker, TRUE))
|
||||
{
|
||||
// Opponent used a prankster'd magic coat -> reflected status move should fail against a dark-type attacker
|
||||
gBattlerTarget = gBattlerAttacker;
|
||||
gBattlescriptCurrInstr = BattleScript_MagicCoatBouncePrankster;
|
||||
gBattlescriptCurrInstr = BattleScript_MagicCoatPrankster;
|
||||
}
|
||||
else
|
||||
{
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_MagicCoatBounce;
|
||||
gBattlescriptCurrInstr = BattleScript_MagicCoat;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -1390,11 +1389,10 @@ static void Cmd_attackcanceler(void)
|
|||
|
||||
if (gBattleStruct->bouncedMoveIsUsed)
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
// Edge case for bouncing a powder move against a grass type pokemon.
|
||||
SetAtkCancellerForCalledMove();
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_MagicCoatBounce;
|
||||
gBattlescriptCurrInstr = BattleScript_MagicBounce;
|
||||
gBattlerAbility = battler;
|
||||
return;
|
||||
}
|
||||
|
@ -9117,7 +9115,7 @@ static void Cmd_various(void)
|
|||
struct Pokemon *mon;
|
||||
s32 i;
|
||||
u8 data[10];
|
||||
u32 side, battler, bits;
|
||||
u32 battler, bits;
|
||||
|
||||
if (gBattleControllerExecFlags)
|
||||
return;
|
||||
|
@ -9431,18 +9429,6 @@ static void Cmd_various(void)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case VARIOUS_SET_MAGIC_COAT_TARGET:
|
||||
{
|
||||
VARIOUS_ARGS();
|
||||
gBattleStruct->attackerBeforeBounce = battler;
|
||||
gBattlerAttacker = gBattlerTarget;
|
||||
side = BATTLE_OPPOSITE(GetBattlerSide(gBattlerAttacker));
|
||||
if (IsAffectedByFollowMe(gBattlerAttacker, side, gCurrentMove))
|
||||
gBattlerTarget = gSideTimers[side].followmeTarget;
|
||||
else
|
||||
gBattlerTarget = battler;
|
||||
break;
|
||||
}
|
||||
case VARIOUS_IS_RUNNING_IMPOSSIBLE:
|
||||
{
|
||||
VARIOUS_ARGS();
|
||||
|
@ -17336,6 +17322,21 @@ void BS_TryHitSwitchTarget(void)
|
|||
}
|
||||
}
|
||||
|
||||
void BS_SetMagicCoatTarget(void)
|
||||
{
|
||||
NATIVE_ARGS();
|
||||
u32 side;
|
||||
gBattleStruct->attackerBeforeBounce = gBattleScripting.battler = gBattlerAttacker;
|
||||
gBattlerAttacker = gBattlerTarget;
|
||||
side = BATTLE_OPPOSITE(GetBattlerSide(gBattlerAttacker));
|
||||
if (IsAffectedByFollowMe(gBattlerAttacker, side, gCurrentMove))
|
||||
gBattlerTarget = gSideTimers[side].followmeTarget;
|
||||
else
|
||||
gBattlerTarget = gBattleStruct->attackerBeforeBounce;
|
||||
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
}
|
||||
|
||||
void BS_TeatimeInvul(void)
|
||||
{
|
||||
NATIVE_ARGS(u8 battler, const u8 *jumpInstr);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
const u16 gNumBardWords_Moves = MOVES_COUNT;
|
||||
|
||||
const struct BardSound gBardSounds_Moves[MOVES_COUNT][6] = {
|
||||
const struct BardSound gBardSounds_Moves[MOVES_COUNT][BARD_SOUND_MAX_LENGTH] = {
|
||||
[MOVE_NONE] = {
|
||||
NULL_BARD_SOUND,
|
||||
NULL_BARD_SOUND,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
const u16 gNumBardWords_Species = NUM_SPECIES;
|
||||
|
||||
const struct BardSound gBardSounds_Pokemon[NUM_SPECIES][6] = {
|
||||
const struct BardSound gBardSounds_Pokemon[NUM_SPECIES][BARD_SOUND_MAX_LENGTH] = {
|
||||
[SPECIES_NONE] = {
|
||||
NULL_BARD_SOUND,
|
||||
NULL_BARD_SOUND,
|
||||
|
|
23
test/battle/move_effect/magic_coat.c
Normal file
23
test/battle/move_effect/magic_coat.c
Normal file
|
@ -0,0 +1,23 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_MAGIC_COAT].effect == EFFECT_MAGIC_COAT);
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Magic Coat prints the correct message when bouncing back a move")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_SPORE].effect == EFFECT_SLEEP);
|
||||
PLAYER(SPECIES_ZIGZAGOON);
|
||||
OPPONENT(SPECIES_WYNAUT);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_MAGIC_COAT); MOVE(opponent, MOVE_SPORE); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_MAGIC_COAT, player);
|
||||
MESSAGE("Zigzagoon bounced the Spore back!");;
|
||||
MESSAGE("The opposing Wynaut fell asleep!");
|
||||
STATUS_ICON(opponent, sleep: TRUE);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue