From bdb19859c2791d9ae12b75438d5dce02962271fd Mon Sep 17 00:00:00 2001 From: Llinos Evans <36418502+PlagueVonKarma@users.noreply.github.com> Date: Thu, 7 Sep 2023 16:03:07 +0100 Subject: [PATCH] Move Animation Photosensitivity Enhancements This changes the animations for various vanilla moves with the aim of reducing photosensitive reactions. KEP is going to chiefly be played on emulators, and thus players will experience flashing that is meant to be dimmed by a Game Boy screen. This is dangerous, so here we are. Many moves have been given black screens which 1) Look cool as fuck, Thunderbolt and Blizzard are really nice and 2) bypass flashing. Others have had their flashing reduced or outright removed. Blizzard has been given special treatment, having the second part of its animation given an Ice Rise clip like Ice Beam. This, coupled with the darkness, looks ace. Changed moves include: Body Slam, Glare, Dazzling Gleam (oops), Disable, Blizzard, BubbleBeam, Confusion, Dream Eater, Explosion, Guillotine, Hyper Beam, Mega Kick, Mega Punch, Psychic, Reflect, Rock Slide, Selfdestruct, Spore, and Thunderbolt; --- data/battle_anims/special_effects.asm | 33 ++++++++----- data/moves/animations.asm | 34 ++++++++----- engine/battle/animations.asm | 70 +++++++++------------------ engine/debug/debug_menu.asm | 2 +- 4 files changed, 66 insertions(+), 73 deletions(-) diff --git a/data/battle_anims/special_effects.asm b/data/battle_anims/special_effects.asm index 068e3b19..504af83d 100644 --- a/data/battle_anims/special_effects.asm +++ b/data/battle_anims/special_effects.asm @@ -3,24 +3,31 @@ MACRO anim_special_effect dw \2 ENDM +; RBY has a lot of animations designed for the natural cover of the non-backlit Game Boy. +; When played on an emulator, these animations will trigger potentially dangerous medical reactions from photosensitive individuals (like me!), such as dizziness or even seizures. +; For the purposes of KEP, I've replaced much of these animations with just...better animations, that don't need flashing. +; Specifically, I checked off the 3DS VC's "dimmed out" moves, and replaced them with better animations; +; Blizzard, BubbleBeam, Confusion, Dream Eater, Explosion, Guillotine, Hyper Beam, Mega Kick, Mega Punch, Psychic, Reflect, Rock Slide, Selfdestruct, Spore, and Thunderbolt +; I have also edited Body Slam, Glare, and Disable. + AnimationIdSpecialEffects: ; animation id, effect routine address - anim_special_effect MEGA_PUNCH, AnimationFlashScreen - anim_special_effect GUILLOTINE, AnimationFlashScreen - anim_special_effect MEGA_KICK, AnimationFlashScreen +; anim_special_effect MEGA_PUNCH, AnimationFlashScreen Replaced with a black screen +; anim_special_effect GUILLOTINE, AnimationFlashScreen Replaced with a black screen +; anim_special_effect MEGA_KICK, AnimationFlashScreen Replaced with a black screen anim_special_effect HEADBUTT, AnimationFlashScreen anim_special_effect TAIL_WHIP, TailWhipAnimationUnused anim_special_effect GROWL, DoGrowlSpecialEffects - anim_special_effect DISABLE, AnimationFlashScreen - anim_special_effect BLIZZARD, DoBlizzardSpecialEffects - anim_special_effect BUBBLEBEAM, AnimationFlashScreen - anim_special_effect HYPER_BEAM, FlashScreenEveryFourFrameBlocks - anim_special_effect THUNDERBOLT, FlashScreenEveryEightFrameBlocks - anim_special_effect REFLECT, AnimationFlashScreen - anim_special_effect SELFDESTRUCT, DoExplodeSpecialEffects - anim_special_effect SPORE, AnimationFlashScreen - anim_special_effect EXPLOSION, DoExplodeSpecialEffects - anim_special_effect ROCK_SLIDE, DoRockSlideSpecialEffects +; anim_special_effect DISABLE, AnimationFlashScreen +; anim_special_effect BLIZZARD, DoBlizzardSpecialEffects +; anim_special_effect BUBBLEBEAM, AnimationFlashScreen unnecessary... +; anim_special_effect HYPER_BEAM, FlashScreenEveryFourFrameBlocks +; anim_special_effect THUNDERBOLT, FlashScreenEveryEightFrameBlocks ; Replaced with a black screen animation +; anim_special_effect REFLECT, AnimationFlashScreen worst animation in the game, easily +; anim_special_effect SELFDESTRUCT, DoExplodeSpecialEffects ; Uses a white screen +; anim_special_effect SPORE, AnimationFlashScreen lol why'd they do this + anim_special_effect EXPLOSION, DoExplodeSpecialEffects ; Now uses a black screen + anim_special_effect ROCK_SLIDE, DoRockSlideSpecialEffects ; This one was fixed in-script. anim_special_effect TRADE_BALL_DROP_ANIM, TradeHidePokemon anim_special_effect TRADE_BALL_SHAKE_ANIM, TradeShakePokeball anim_special_effect TRADE_BALL_TILT_ANIM, TradeJumpPokeball diff --git a/data/moves/animations.asm b/data/moves/animations.asm index 70f30c90..c4dfb2bb 100644 --- a/data/moves/animations.asm +++ b/data/moves/animations.asm @@ -273,7 +273,10 @@ CometPunchAnim: db -1 ; end MegaPunchAnim: + battle_anim NO_MOVE, SE_DARK_SCREEN_PALETTE battle_anim MEGA_PUNCH, SUBANIM_1_STAR_BIG_MOVING, 1, 6 + battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH + battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE db -1 ; end PayDayAnim: @@ -307,7 +310,10 @@ VicegripAnim: db -1 ; end GuillotineAnim: + battle_anim NO_MOVE, SE_DARK_SCREEN_PALETTE battle_anim GUILLOTINE, SUBANIM_0_SLICE_BOTH_SIDES, 0, 6 + battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH + battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE db -1 ; end RazorWindAnim: @@ -369,7 +375,10 @@ DoubleKickAnim: db -1 ; end MegaKickAnim: + battle_anim NO_MOVE, SE_DARK_SCREEN_PALETTE battle_anim MEGA_KICK, SUBANIM_1_STAR_BIG_MOVING, 1, 6 + battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH + battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE db -1 ; end JumpKickAnim: @@ -415,7 +424,6 @@ TackleAnim: BodySlamAnim: battle_anim LEECH_SEED, SE_MOVE_MON_HORIZONTALLY battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH - battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH battle_anim NO_MOVE, SE_RESET_MON_POSITION db -1 ; end @@ -508,8 +516,7 @@ SonicBoomAnim: DisableAnim: battle_anim LEECH_SEED, SE_DARK_SCREEN_PALETTE - battle_anim LEER, SE_DARK_SCREEN_FLASH - battle_anim LEER, SE_DARK_SCREEN_FLASH + battle_anim LEER, SE_DARK_SCREEN_FLASH ; One flash is fine, I think? battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE db -1 ; end @@ -554,8 +561,12 @@ IceBeamAnim: db -1 ; end BlizzardAnim: + battle_anim NO_MOVE, SE_DARK_SCREEN_PALETTE battle_anim BLIZZARD, SUBANIM_0_ICE_FALL, 0, 4 - battle_anim HYDRO_PUMP, SUBANIM_0_ICE_FALL, 0, 4 + battle_anim NO_MOVE, SUBANIM_0_ICE_RISE, 0, 16 + battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH + battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE + ;battle_anim HYDRO_PUMP, SUBANIM_0_ICE_FALL, 0, 4 so for some reason, this causes hydro pump's proper sound to play when you use crysaudio. Instead of all this jank, now we're having the ice rise like Ice Beam. If you're using crysaudio and have problems with this, here's your solution. db -1 ; end PsyBeamAnim: @@ -577,9 +588,7 @@ HyperBeamAnim: battle_anim LEECH_SEED, SE_DARK_SCREEN_PALETTE battle_anim NO_MOVE, SE_SPIRAL_BALLS_INWARD battle_anim HYPER_BEAM, SUBANIM_0_BEAM, 0, 2 - battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH - battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH - battle_anim MEGA_PUNCH, SUBANIM_1_STAR_BIG_MOVING, 1, 6 + battle_anim NO_MOVE, SUBANIM_1_STAR_BIG_MOVING, 1, 6 battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE db -1 ; end @@ -709,8 +718,11 @@ ThunderShockAnim: db -1 ; end ThunderBoltAnim: + battle_anim NO_MOVE, SE_DARK_SCREEN_PALETTE battle_anim THUNDERBOLT, SUBANIM_1_LIGHTNING_BALL, 1, 1 battle_anim THUNDERBOLT, SUBANIM_1_LIGHTNING_BALL, 1, 1 + battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH + battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE db -1 ; end ThunderWaveAnim: @@ -1024,8 +1036,7 @@ HiJumpKickAnim: GlareAnim: battle_anim LEECH_SEED, SE_DARK_SCREEN_PALETTE - battle_anim GLARE, SE_DARK_SCREEN_FLASH - battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH + battle_anim GLARE, SE_DARK_SCREEN_FLASH ; One flash is fine, I think? battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE db -1 ; end @@ -1090,9 +1101,7 @@ SporeAnim: DazzleGleamAnim: FlashAnim: - battle_anim LEECH_SEED, SE_LIGHT_SCREEN_PALETTE battle_anim GLARE, SE_DARK_SCREEN_FLASH - battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE db -1 ; end @@ -1115,7 +1124,10 @@ CrabHammerAnim: db -1 ; end ExplosionAnim: + battle_anim NO_MOVE, SE_DARK_SCREEN_PALETTE battle_anim EXPLOSION, SUBANIM_1_SELFDESTRUCT, 1, 3 + battle_anim NO_MOVE, SE_DARK_SCREEN_FLASH + battle_anim NO_MOVE, SE_RESET_SCREEN_PALETTE db -1 ; end FurySwipesAnim: diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index b1ca8aa8..498575ac 100644 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -1,3 +1,5 @@ +; Many VC Hooks relating to photosensitivity have been removed, as many move animations have been changed and improved to not require them. + ; Draws a "frame block". Frame blocks are blocks of tiles that are put ; together to form frames in battle animations. DrawFrameBlock: @@ -176,12 +178,8 @@ PlayAnimation: ld h, [hl] ld l, a .animationLoop - vc_hook Stop_reducing_move_anim_flashing_Thunderbolt ld a, [hli] - vc_hook_red Stop_reducing_move_anim_flashing_Reflect - vc_hook_blue Stop_reducing_move_anim_flashing_Self_Destruct cp -1 - vc_hook_blue Stop_reducing_move_anim_flashing_Reflect jr z, .AnimationOver cp FIRST_SE_ID ; is this subanimation or a special effect? jr c, .playSubanimation @@ -250,57 +248,37 @@ PlayAnimation: ld a, [wAnimPalette] ldh [rOBP0], a call LoadMoveAnimationTiles - vc_hook Reduce_move_anim_flashing_Mega_Punch_Self_Destruct_Explosion call LoadSubanimation call PlaySubanimation - vc_hook_red Stop_reducing_move_anim_flashing_Mega_Punch - vc_hook_blue Stop_reducing_move_anim_flashing_Mega_Punch_Explosion pop af - vc_hook_red Stop_reducing_move_anim_flashing_Blizzard ldh [rOBP0], a .nextAnimationCommand - vc_hook_red Stop_reducing_move_anim_flashing_Hyper_Beam - vc_hook_blue Stop_reducing_move_anim_flashing_Bubblebeam_Hyper_Beam_Blizzard pop hl - vc_hook Stop_reducing_move_anim_flashing_Guillotine jr .animationLoop .AnimationOver ret LoadSubanimation: - vc_hook Reduce_move_anim_flashing_Guillotine ld a, [wSubAnimAddrPtr + 1] - vc_hook Reduce_move_anim_flashing_Mega_Kick ld h, a - vc_hook_red Reduce_move_anim_flashing_Blizzard ld a, [wSubAnimAddrPtr] - vc_hook_red Reduce_move_anim_flashing_Self_Destruct ld l, a ld a, [hli] ld e, a - vc_hook Reduce_move_anim_flashing_Explosion ld a, [hl] - vc_hook Reduce_move_anim_flashing_Thunderbolt ld d, a ; de = address of subanimation ld a, [de] - vc_hook_blue Reduce_move_anim_flashing_Rock_Slide ld b, a - vc_hook Reduce_move_anim_flashing_Spore and %00011111 - vc_hook Reduce_move_anim_flashing_Bubblebeam ld [wSubAnimCounter], a ; number of frame blocks - vc_hook_red Reduce_move_anim_flashing_Rock_Slide - vc_hook_blue Reduce_move_anim_flashing_Self_Destruct ld a, b and %11100000 cp SUBANIMTYPE_ENEMY << 5 - vc_hook_blue Reduce_move_anim_flashing_Blizzard jr nz, .isNotType5 .isType5 call GetSubanimationTransform2 jr .saveTransformation .isNotType5 - vc_hook Reduce_move_anim_flashing_Hyper_Beam call GetSubanimationTransform1 .saveTransformation ; place the upper 3 bits of a into bits 0-2 of a before storing @@ -331,7 +309,6 @@ LoadSubanimation: ; sets the transform to SUBANIMTYPE_NORMAL if it's the player's turn ; sets the transform to the subanimation type if it's the enemy's turn GetSubanimationTransform1: - vc_hook Reduce_move_anim_flashing_Reflect ld b, a ldh a, [hWhoseTurn] and a @@ -420,15 +397,12 @@ MoveAnimation: jr nz, .animationsDisabled call ShareMoveAnimations call PlayAnimation - vc_hook_red Stop_reducing_move_anim_flashing_Bubblebeam_Mega_Kick - vc_hook_blue Stop_reducing_move_anim_flashing_Spore jr .next4 .animationsDisabled ld c, 30 call DelayFrames .next4 vc_hook_red Stop_reducing_move_anim_flashing - vc_hook_blue Stop_reducing_move_anim_flashing_Rock_Slide_Dream_Eater call PlayApplyingAttackAnimation ; shake the screen or flash the pic in and out (to show damage) .animationFinished call WaitForSoundToFinish @@ -566,7 +540,6 @@ SetAnimationPalette: .notSGB ld a, $e4 ld [wAnimPalette], a - vc_hook Reduce_move_anim_flashing_Dream_Eater ldh [rOBP0], a ld a, $6c ldh [rOBP1], a @@ -778,8 +751,8 @@ DoRockSlideSpecialEffects: ret nc cp 8 jr nc, .shakeScreen - cp 1 - jp z, AnimationFlashScreen ; if it's the end of the subanimation, flash the screen + ;cp 1 + ;jp z, AnimationFlashScreen ; if it's the end of the subanimation, flash the screen ret ; if the subanimation counter is between 8 and 11, shake the screen horizontally and vertically .shakeScreen @@ -790,14 +763,14 @@ DoRockSlideSpecialEffects: FlashScreenEveryEightFrameBlocks: ld a, [wSubAnimCounter] - and 7 ; is the subanimation counter exactly 8? + and 14 ; is the subanimation counter exactly 8? call z, AnimationFlashScreen ; if so, flash the screen ret ; flashes the screen if the subanimation counter is divisible by 4 FlashScreenEveryFourFrameBlocks: ld a, [wSubAnimCounter] - and 3 + and 14 call z, AnimationFlashScreen ret @@ -805,23 +778,24 @@ FlashScreenEveryFourFrameBlocks: DoExplodeSpecialEffects: ld a, [wSubAnimCounter] cp 1 ; is it the end of the subanimation? - jr nz, FlashScreenEveryFourFrameBlocks + ;jr nz, FlashScreenEveryFourFrameBlocks ; if it's the end of the subanimation, make the attacking pokemon disappear hlcoord 1, 5 jp AnimationHideMonPic ; make pokemon disappear ; flashes the screen when subanimation counter is 1 modulo 4 -DoBlizzardSpecialEffects: - ld a, [wSubAnimCounter] - cp 13 - jp z, AnimationFlashScreen - cp 9 - jp z, AnimationFlashScreen - cp 5 - jp z, AnimationFlashScreen - cp 1 - jp z, AnimationFlashScreen - ret +;DoBlizzardSpecialEffects: +; ld a, [wSubAnimCounter] +; cp 13 +; jp z, AnimationFlashScreen +; cp 9 +; jp z, AnimationFlashScreen +; cp 5 +; jp z, AnimationFlashScreen +; cp 1 +; jp z, AnimationFlashScreen +; ret +; lol fuck you ; flashes the screen at 3 points in the subanimation ; unused @@ -960,7 +934,7 @@ CallWithTurnFlipped: ; flashes the screen for an extended period (48 frames) AnimationFlashScreenLong: - ld a, 3 ; cycle through the palettes 3 times + ld a, 2 ; cycle through the palettes 3 times ld [wFlashScreenLongCounter], a ld a, [wOnSGB] ; running on SGB? and a @@ -1037,11 +1011,11 @@ AnimationFlashScreen: push af ; save initial palette ld a, %00011011 ; 0, 1, 2, 3 (inverted colors) ldh [rBGP], a - ld c, 2 + ld c, 10 call DelayFrames xor a ; white out background ldh [rBGP], a - ld c, 2 + ld c, 10 call DelayFrames pop af ldh [rBGP], a ; restore initial palette diff --git a/engine/debug/debug_menu.asm b/engine/debug/debug_menu.asm index 79b0e2a6..16875a60 100644 --- a/engine/debug/debug_menu.asm +++ b/engine/debug/debug_menu.asm @@ -145,6 +145,7 @@ TestBattle: jr .loop BattleDebugItemsList: + db X_ACCURACY, 99 ; Test Guillotine animation db FULL_RESTORE, 99 db MAX_ELIXER, 99 db FULL_HEAL, 99 @@ -152,7 +153,6 @@ BattleDebugItemsList: db X_SPECIAL, 99 db X_DEFEND, 99 db X_SPEED, 99 - db X_ACCURACY, 99 db DIRE_HIT, 99 db GUARD_SPEC, 99 db POKE_FLUTE, 1