mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-25 21:55:29 +01:00
fix bad bg fade if no permanent terrain
This commit is contained in:
parent
9902f6e603
commit
d26605c9fe
@ -8474,8 +8474,6 @@ Move_GRASSY_TERRAIN::
|
|||||||
delay 4
|
delay 4
|
||||||
createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 3, 4, 0, RGB(31, 24, 31)
|
createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 3, 4, 0, RGB(31, 24, 31)
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
restorebg
|
|
||||||
waitbgfadein
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Move_MISTY_TERRAIN::
|
Move_MISTY_TERRAIN::
|
||||||
@ -8514,8 +8512,6 @@ Move_MISTY_TERRAIN::
|
|||||||
delay 4
|
delay 4
|
||||||
createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 3, 7, 0, RGB(31, 24, 31)
|
createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 3, 7, 0, RGB(31, 24, 31)
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
restorebg
|
|
||||||
waitbgfadein
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Move_ELECTRIFY::
|
Move_ELECTRIFY::
|
||||||
@ -9399,8 +9395,6 @@ Move_ELECTRIC_TERRAIN::
|
|||||||
delay 2
|
delay 2
|
||||||
createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 3, 4, 0, RGB(28, 28, 0)
|
createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 3, 4, 0, RGB(28, 28, 0)
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
restorebg
|
|
||||||
waitbgfadein
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Move_DAZZLING_GLEAM::
|
Move_DAZZLING_GLEAM::
|
||||||
@ -11056,8 +11050,6 @@ Move_PSYCHIC_TERRAIN::
|
|||||||
delay 4
|
delay 4
|
||||||
createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 3, 4, 0, RGB(27, 0, 13)
|
createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_BG, 3, 4, 0, RGB(27, 0, 13)
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
restorebg
|
|
||||||
waitbgfadein
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Move_LUNGE::
|
Move_LUNGE::
|
||||||
|
@ -1520,6 +1520,7 @@ BattleScript_EffectPsychicTerrain:
|
|||||||
waitanimation
|
waitanimation
|
||||||
printfromtable gTerrainStringIds
|
printfromtable gTerrainStringIds
|
||||||
waitmessage 0x40
|
waitmessage 0x40
|
||||||
|
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG, NULL
|
||||||
goto BattleScript_MoveEnd
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
BattleScript_EffectTopsyTurvy:
|
BattleScript_EffectTopsyTurvy:
|
||||||
@ -6893,7 +6894,7 @@ BattleScript_ElectricSurgeActivates::
|
|||||||
pause 0x20
|
pause 0x20
|
||||||
call BattleScript_AbilityPopUp
|
call BattleScript_AbilityPopUp
|
||||||
printstring STRINGID_TERRAINBECOMESELECTRIC
|
printstring STRINGID_TERRAINBECOMESELECTRIC
|
||||||
waitstate
|
waitmessage 0x40
|
||||||
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG, NULL
|
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG, NULL
|
||||||
end3
|
end3
|
||||||
|
|
||||||
@ -6901,7 +6902,7 @@ BattleScript_MistySurgeActivates::
|
|||||||
pause 0x20
|
pause 0x20
|
||||||
call BattleScript_AbilityPopUp
|
call BattleScript_AbilityPopUp
|
||||||
printstring STRINGID_TERRAINBECOMESMISTY
|
printstring STRINGID_TERRAINBECOMESMISTY
|
||||||
waitstate
|
waitmessage 0x40
|
||||||
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG, NULL
|
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG, NULL
|
||||||
end3
|
end3
|
||||||
|
|
||||||
@ -6909,7 +6910,7 @@ BattleScript_GrassySurgeActivates::
|
|||||||
pause 0x20
|
pause 0x20
|
||||||
call BattleScript_AbilityPopUp
|
call BattleScript_AbilityPopUp
|
||||||
printstring STRINGID_TERRAINBECOMESGRASSY
|
printstring STRINGID_TERRAINBECOMESGRASSY
|
||||||
waitstate
|
waitmessage 0x40
|
||||||
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG, NULL
|
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG, NULL
|
||||||
end3
|
end3
|
||||||
|
|
||||||
@ -6917,7 +6918,7 @@ BattleScript_PsychicSurgeActivates::
|
|||||||
pause 0x20
|
pause 0x20
|
||||||
call BattleScript_AbilityPopUp
|
call BattleScript_AbilityPopUp
|
||||||
printstring STRINGID_TERRAINBECOMESPSYCHIC
|
printstring STRINGID_TERRAINBECOMESPSYCHIC
|
||||||
waitstate
|
waitmessage 0x40
|
||||||
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG, NULL
|
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG, NULL
|
||||||
end3
|
end3
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include "constants/apprentice.h"
|
#include "constants/apprentice.h"
|
||||||
#include "constants/battle.h"
|
#include "constants/battle.h"
|
||||||
#include "constants/battle_arena.h"
|
#include "constants/battle_arena.h"
|
||||||
|
#include "constants/battle_config.h"
|
||||||
#include "constants/battle_dome.h"
|
#include "constants/battle_dome.h"
|
||||||
#include "constants/battle_factory.h"
|
#include "constants/battle_factory.h"
|
||||||
#include "constants/battle_frontier.h"
|
#include "constants/battle_frontier.h"
|
||||||
|
@ -518,15 +518,11 @@
|
|||||||
#define B_ANIM_INGRAIN_HEAL 0x15
|
#define B_ANIM_INGRAIN_HEAL 0x15
|
||||||
#define B_ANIM_WISH_HEAL 0x16
|
#define B_ANIM_WISH_HEAL 0x16
|
||||||
#define B_ANIM_MEGA_EVOLUTION 0x17
|
#define B_ANIM_MEGA_EVOLUTION 0x17
|
||||||
#define B_ANIM_TERRAIN_MISTY 0x18
|
#define B_ANIM_ILLUSION_OFF 0x18
|
||||||
#define B_ANIM_TERRAIN_GRASSY 0x19
|
#define B_ANIM_FORM_CHANGE 0x19
|
||||||
#define B_ANIM_TERRAIN_ELECTRIC 0x1A
|
#define B_ANIM_SLIDE_OFFSCREEN 0x1A // for Emergency Exit
|
||||||
#define B_ANIM_TERRAIN_PSYCHIC 0x1B
|
#define B_ANIM_RESTORE_BG 0x1B // for Terrain Endings
|
||||||
#define B_ANIM_ILLUSION_OFF 0x1C
|
#define B_ANIM_TOTEM_FLARE 0x1C // Totem boosts aura flare
|
||||||
#define B_ANIM_FORM_CHANGE 0x1D
|
|
||||||
#define B_ANIM_SLIDE_OFFSCREEN 0x1E // for Emergency Exit
|
|
||||||
#define B_ANIM_RESTORE_BG 0x1F // for Terrain Endings
|
|
||||||
#define B_ANIM_TOTEM_FLARE 0x20 // Totem boosts aura flare
|
|
||||||
|
|
||||||
// special animations table
|
// special animations table
|
||||||
#define B_ANIM_LVL_UP 0x0
|
#define B_ANIM_LVL_UP 0x0
|
||||||
|
@ -135,7 +135,7 @@
|
|||||||
|
|
||||||
// Var Settings
|
// Var Settings
|
||||||
// To use the following features in scripting, replace the 0s with the Var ID you're assigning to it. Eg: replace VAR_UNUSED_0x40F7 with VAR_TERRAIN for that feature
|
// To use the following features in scripting, replace the 0s with the Var ID you're assigning to it. Eg: replace VAR_UNUSED_0x40F7 with VAR_TERRAIN for that feature
|
||||||
#define VAR_TERRAIN 0 // If this var has a value, assigning a STATUS_FIELD_xx_TERRAIN to it before battle causes the battle to start with that terrain active
|
#define VAR_TERRAIN VAR_UNUSED_0x40F7 // If this var has a value, assigning a STATUS_FIELD_xx_TERRAIN to it before battle causes the battle to start with that terrain active
|
||||||
|
|
||||||
// Interface settings
|
// Interface settings
|
||||||
#define B_ABILITY_POP_UP TRUE // In Gen5+, the Pokémon abilities are displayed in a pop-up, when they activate in battle.
|
#define B_ABILITY_POP_UP TRUE // In Gen5+, the Pokémon abilities are displayed in a pop-up, when they activate in battle.
|
||||||
@ -173,7 +173,7 @@
|
|||||||
#define B_NEW_SURF_PARTICLE_PALETTE TRUE // If set to TRUE, it updates Surf's wave palette.
|
#define B_NEW_SURF_PARTICLE_PALETTE TRUE // If set to TRUE, it updates Surf's wave palette.
|
||||||
|
|
||||||
#define HIDE_HEALTHBOXES_DURING_ANIMS TRUE // If set to TRUE, hides healthboxes during move animations
|
#define HIDE_HEALTHBOXES_DURING_ANIMS TRUE // If set to TRUE, hides healthboxes during move animations
|
||||||
#define B_TERRAIN_BG_CHANGE TRUE // If set to TRUE, terrain moves permanently change the default battle background until the effect fades.
|
#define B_TERRAIN_BG_CHANGE FALSE // If set to TRUE, terrain moves permanently change the default battle background until the effect fades.
|
||||||
#define B_ENABLE_DEBUG TRUE // If set to TRUE, enables a debug menu to use in battles by pressing the Select button.
|
#define B_ENABLE_DEBUG TRUE // If set to TRUE, enables a debug menu to use in battles by pressing the Select button.
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_BATTLE_CONFIG_H
|
#endif // GUARD_CONSTANTS_BATTLE_CONFIG_H
|
||||||
|
@ -4403,6 +4403,15 @@ static void Cmd_playanimation(void)
|
|||||||
|
|
||||||
gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
|
gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
|
||||||
argumentPtr = T2_READ_PTR(gBattlescriptCurrInstr + 3);
|
argumentPtr = T2_READ_PTR(gBattlescriptCurrInstr + 3);
|
||||||
|
|
||||||
|
#if B_TERRAIN_BG_CHANGE == FALSE
|
||||||
|
if (gBattlescriptCurrInstr[2] == B_ANIM_RESTORE_BG)
|
||||||
|
{
|
||||||
|
// workaround for .if not working
|
||||||
|
gBattlescriptCurrInstr += 7;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (gBattlescriptCurrInstr[2] == B_ANIM_STATS_CHANGE
|
if (gBattlescriptCurrInstr[2] == B_ANIM_STATS_CHANGE
|
||||||
|| gBattlescriptCurrInstr[2] == B_ANIM_SNATCH_MOVE
|
|| gBattlescriptCurrInstr[2] == B_ANIM_SNATCH_MOVE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user