Skip to content

Commit

Permalink
Updated Petal Dance Animation
Browse files Browse the repository at this point in the history
  • Loading branch information
SoupPotato committed Sep 7, 2024
1 parent 7c8ead9 commit 4640e4f
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 37 deletions.
7 changes: 5 additions & 2 deletions constants/battle_anim_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ DEF BATTLEANIM_BASE_TILE EQU 7 * 7 ; Maximum size of a pokemon picture
const BATTLE_ANIM_OBJ_POWDER_SHOOT ; c9
const BATTLE_ANIM_OBJ_EGG_BOMB ; ca
const BATTLE_ANIM_OBJ_SHOOTING_MIST ; cb
const BATTLE_ANIM_OBJ_PETAL_DANCE_IMPACT ; cc
DEF NUM_BATTLE_ANIM_OBJS EQU const_value

; DoBattleAnimFrame arguments (see engine/battle_anims/functions.asm)
Expand Down Expand Up @@ -854,8 +855,9 @@ DEF NUM_BATTLE_BG_EFFECTS EQU const_value - 1
const BATTLE_ANIM_GFX_TRIANGLE ; 2a
const BATTLE_ANIM_GFX_MUSHROOM ; 2b
const BATTLE_ANIM_GFX_BEAM_AURORA ; 2c
const BATTLE_ANIM_GFX_PLAYERHEAD ; 2d
const BATTLE_ANIM_GFX_ENEMYFEET ; 2e
const BATTLE_ANIM_GFX_PETALS ; 2d
const BATTLE_ANIM_GFX_PLAYERHEAD ; 2e
const BATTLE_ANIM_GFX_ENEMYFEET ; 2f
DEF NUM_BATTLE_ANIM_GFX EQU const_value - 1

; battle_bg_effect struct members (see macros/ram.asm)
Expand Down Expand Up @@ -933,6 +935,7 @@ DEF NUM_BG_EFFECTS EQU 5 ; see wActiveBGEffects
const PAL_BTLCUSTOM_HP_GHOST ; 1c
const PAL_BTLCUSTOM_ACID ; 1d
const PAL_BTLCUSTOM_LIME ; 1e
const PAL_BTLCUSTOM_PINK ; 1f

DEF NUM_CUSTOM_BATTLE_PALETTES EQU const_value

Expand Down
1 change: 1 addition & 0 deletions data/battle_anims/object_gfx.asm
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ AnimObjGFX:
anim_obj_gfx 12, AnimObjTriangleGFX
anim_obj_gfx 18, AnimObjMushroomGFX
anim_obj_gfx 10, AnimObjBeamAuroraGFX
anim_obj_gfx 4, AnimObjPetalsGFX
anim_obj_gfx 1, NULL
anim_obj_gfx 1, NULL
assert_table_length NUM_BATTLE_ANIM_GFX + 1
4 changes: 3 additions & 1 deletion data/battle_anims/objects.asm
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ BattleAnimObjects:
; BATTLE_ANIM_OBJ_NEEDLE
battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $90, BATTLE_ANIM_FRAMESET_NEEDLE, BATTLE_ANIM_FUNC_NEEDLE, PAL_BATTLE_OB_BLUE, BATTLE_ANIM_GFX_HORN
; BATTLE_ANIM_OBJ_PETAL_DANCE
battleanimobj RELATIVE_X, $48, BATTLE_ANIM_FRAMESET_FLOWER, BATTLE_ANIM_FUNC_PETAL_DANCE, PAL_BATTLE_OB_RED, BATTLE_ANIM_GFX_FLOWER
battleanimobj RELATIVE_X, $46, BATTLE_ANIM_FRAMESET_FLOWER, BATTLE_ANIM_FUNC_PETAL_DANCE, PAL_BATTLE_OB_RED, BATTLE_ANIM_GFX_FLOWER
; BATTLE_ANIM_OBJ_SLUDGE_BOMB
battleanimobj RELATIVE_X, $90, BATTLE_ANIM_FRAMESET_BARRAGE_BALL, BATTLE_ANIM_FUNC_THROW_TO_TARGET_DISAPPEAR, PAL_BATTLE_OB_GRAY, BATTLE_ANIM_GFX_EGG
; BATTLE_ANIM_OBJ_PAY_DAY
Expand Down Expand Up @@ -427,4 +427,6 @@ BattleAnimObjects:
battleanimobj RELATIVE_X | X_FLIP, $6c, BATTLE_ANIM_FRAMESET_EGG, BATTLE_ANIM_FUNC_LEECH_SEED, PAL_BATTLE_OB_GRAY, BATTLE_ANIM_GFX_EGG
; BATTLE_ANIM_OBJ_SHOOTING_MIST
battleanimobj RELATIVE_X | X_FLIP, $90, BATTLE_ANIM_FRAMESET_MIST, BATTLE_ANIM_FUNC_USER_TO_TARGET_DISAPPEAR, PAL_BATTLE_OB_GRAY, BATTLE_ANIM_GFX_HAZE
; BATTLE_ANIM_OBJ_PETAL_DANCE_IMPACT
battleanimobj RELATIVE_X, $98, BATTLE_ANIM_FRAMESET_RAZOR_LEAF_1, BATTLE_ANIM_FUNC_RAZOR_LEAF, PAL_BATTLE_OB_RED, BATTLE_ANIM_GFX_PETALS
assert_table_length NUM_BATTLE_ANIM_OBJS
59 changes: 26 additions & 33 deletions data/moves/animations.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1526,6 +1526,7 @@ BattleAnim_Vicegrip:

BattleAnim_Scratch:
anim_1gfx BATTLE_ANIM_GFX_CUT
.hit
anim_sound 0, 1, SFX_SCRATCH
anim_obj BATTLE_ANIM_OBJ_CUT_DOWN_LEFT, 144, 48, $0
anim_obj BATTLE_ANIM_OBJ_CUT_DOWN_LEFT, 140, 44, $0
Expand Down Expand Up @@ -1743,6 +1744,9 @@ BattleAnim_Softboiled:
anim_wait 16
anim_bgeffect BATTLE_BG_EFFECT_FADE_MON_TO_LIGHT_REPEATING, $0, BG_EFFECT_USER, $40
anim_sound 0, 0, SFX_METRONOME
anim_jump BattleAnimSub_SoftboiledHeal

BattleAnimSub_SoftboiledHeal:
.loop
anim_obj BATTLE_ANIM_OBJ_RECOVER, 44, 88, $20
anim_wait 8
Expand Down Expand Up @@ -2382,28 +2386,40 @@ BattleAnim_Transform:
anim_ret

BattleAnim_PetalDance:
anim_2gfx BATTLE_ANIM_GFX_FLOWER, BATTLE_ANIM_GFX_HIT
anim_setobjpal PAL_BATTLE_OB_RED, PAL_BTLCUSTOM_PINK
anim_3gfx BATTLE_ANIM_GFX_PETALS, BATTLE_ANIM_GFX_FLOWER, BATTLE_ANIM_GFX_HIT
anim_sound 0, 1, SFX_GAME_FREAK_LOGO_GS
anim_bgeffect BATTLE_BG_EFFECT_CYCLE_MON_LIGHT_DARK_REPEATING, $0, BG_EFFECT_USER, $20
.loop
anim_obj BATTLE_ANIM_OBJ_PETAL_DANCE, 48, 56, $5
anim_obj BATTLE_ANIM_OBJ_PETAL_DANCE, 48, 56, $1
anim_wait 11
anim_loop 8, .loop
anim_wait 128
anim_wait 48
anim_incbgeffect BATTLE_BG_EFFECT_CYCLE_MON_LIGHT_DARK_REPEATING
anim_wait 24
anim_wait 32
anim_clearobjs
anim_wait 1
anim_call BattleAnim_TargetObj_1Row
anim_bgeffect BATTLE_BG_EFFECT_TACKLE, $0, BG_EFFECT_USER, $0
anim_sound 0, 1, SFX_COMET_PUNCH
anim_obj BATTLE_ANIM_OBJ_HIT_YFIX, 136, 56, $0
anim_wait 16
anim_sound 0, 1, SFX_SWEET_SCENT
anim_bgeffect BATTLE_BG_EFFECT_SHOW_MON, $0, BG_EFFECT_TARGET, $0
anim_wait 4
anim_clearobjs
anim_bgeffect BATTLE_BG_EFFECT_SHOW_MON, $0, BG_EFFECT_USER, $0
anim_wait 1
anim_obj BATTLE_ANIM_OBJ_PETAL_DANCE_IMPACT, 136, 56, $28
anim_obj BATTLE_ANIM_OBJ_PETAL_DANCE_IMPACT, 136, 56, $5c
anim_obj BATTLE_ANIM_OBJ_PETAL_DANCE_IMPACT, 136, 56, $10
anim_obj BATTLE_ANIM_OBJ_PETAL_DANCE_IMPACT, 136, 56, $e8
anim_obj BATTLE_ANIM_OBJ_PETAL_DANCE_IMPACT, 136, 56, $9c
anim_obj BATTLE_ANIM_OBJ_PETAL_DANCE_IMPACT, 136, 56, $d0
anim_wait 6
anim_obj BATTLE_ANIM_OBJ_PETAL_DANCE_IMPACT, 136, 56, $1c
anim_obj BATTLE_ANIM_OBJ_PETAL_DANCE_IMPACT, 136, 56, $50
anim_obj BATTLE_ANIM_OBJ_PETAL_DANCE_IMPACT, 136, 56, $dc
anim_obj BATTLE_ANIM_OBJ_PETAL_DANCE_IMPACT, 136, 56, $90
anim_wait 64
anim_ret

BattleAnim_Barrage:
Expand Down Expand Up @@ -3178,6 +3194,7 @@ BattleAnim_LowKick:

BattleAnim_WingAttack:
anim_1gfx BATTLE_ANIM_GFX_HIT
.hit
anim_sound 0, 1, SFX_WING_ATTACK
anim_obj BATTLE_ANIM_OBJ_HIT_YFIX, 148, 56, $0
anim_obj BATTLE_ANIM_OBJ_HIT_YFIX, 116, 56, $0
Expand Down Expand Up @@ -3948,14 +3965,7 @@ BattleAnim_MilkDrink:
anim_wait 16
anim_bgeffect BATTLE_BG_EFFECT_FADE_MON_TO_LIGHT_REPEATING, $0, BG_EFFECT_USER, $40
anim_sound 0, 0, SFX_MILK_DRINK
.loop
anim_obj BATTLE_ANIM_OBJ_RECOVER, 44, 88, $20
anim_wait 8
anim_loop 8, .loop
anim_wait 128
anim_incbgeffect BATTLE_BG_EFFECT_FADE_MON_TO_LIGHT_REPEATING
anim_call BattleAnim_ShowMon_0
anim_ret
anim_jump BattleAnimSub_SoftboiledHeal

BattleAnim_Spark:
anim_2gfx BATTLE_ANIM_GFX_LIGHTNING, BATTLE_ANIM_GFX_EXPLOSION
Expand Down Expand Up @@ -4006,19 +4016,7 @@ BattleAnim_SteelWing:
anim_call BattleAnim_ShowMon_0
anim_1gfx BATTLE_ANIM_GFX_HIT
anim_resetobp0
anim_sound 0, 1, SFX_WING_ATTACK
anim_obj BATTLE_ANIM_OBJ_HIT_YFIX, 148, 56, $0
anim_obj BATTLE_ANIM_OBJ_HIT_YFIX, 116, 56, $0
anim_wait 6
anim_sound 0, 1, SFX_WING_ATTACK
anim_obj BATTLE_ANIM_OBJ_HIT_YFIX, 144, 56, $0
anim_obj BATTLE_ANIM_OBJ_HIT_YFIX, 120, 56, $0
anim_wait 6
anim_sound 0, 1, SFX_WING_ATTACK
anim_obj BATTLE_ANIM_OBJ_HIT_YFIX, 140, 56, $0
anim_obj BATTLE_ANIM_OBJ_HIT_YFIX, 124, 56, $0
anim_wait 16
anim_ret
anim_jump BattleAnim_WingAttack.hit

BattleAnim_MeanLook:
anim_1gfx BATTLE_ANIM_GFX_PSYCHIC
Expand Down Expand Up @@ -4341,12 +4339,7 @@ BattleAnim_MetalClaw:
anim_call BattleAnim_ShowMon_0
anim_1gfx BATTLE_ANIM_GFX_CUT
anim_resetobp0
anim_sound 0, 1, SFX_SCRATCH
anim_obj BATTLE_ANIM_OBJ_CUT_DOWN_LEFT, 144, 48, $0
anim_obj BATTLE_ANIM_OBJ_CUT_DOWN_LEFT, 140, 44, $0
anim_obj BATTLE_ANIM_OBJ_CUT_DOWN_LEFT, 136, 40, $0
anim_wait 32
anim_ret
anim_jump BattleAnim_Scratch.hit

BattleAnim_VitalThrow:
anim_1gfx BATTLE_ANIM_GFX_HIT
Expand Down
3 changes: 2 additions & 1 deletion engine/battle_anims/functions.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2778,9 +2778,10 @@ BattleAnimFunc_PetalDance:
ld hl, BATTLEANIMSTRUCT_VAR2
add hl, bc
ld a, [hl]
cp $28
cp $30
jr nc, .end
inc [hl]
inc [hl]
ret

.end
Expand Down
1 change: 1 addition & 0 deletions gfx/battle_anims.asm
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ AnimObjSmokePuffGFX: INCBIN "gfx/battle_anims/smokepuff.2bpp.lz"
AnimObjTriangleGFX: INCBIN "gfx/battle_anims/triangle.2bpp.lz"
AnimObjMushroomGFX: INCBIN "gfx/battle_anims/mushroom.2bpp.lz"
AnimObjBeamAuroraGFX: INCBIN "gfx/battle_anims/beamaurora.2bpp.lz"
AnimObjPetalsGFX: INCBIN "gfx/battle_anims/petals.2bpp.lz"
5 changes: 5 additions & 0 deletions gfx/battle_anims/custom.pal
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ INCLUDE "gfx/battle_anims/battle_anims.pal"
RGB 31, 31, 05
RGB 19, 31, 01
RGB 04, 21, 00
; pink
RGB 31, 31, 31
RGB 31, 19, 24
RGB 30, 09, 13
RGB 00, 00, 00

rept NUM_CUSTOM_BATTLE_PALETTES - 6
endr
Binary file added gfx/battle_anims/petals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4640e4f

Please sign in to comment.