From 3f616215eae4ddd61780269a9397170e29312ec0 Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Sat, 28 Jan 2023 09:03:18 -0500 Subject: [PATCH] add silk trap anim --- data/battle_anim_scripts.s | 16 +++++++++++++++- include/constants/rgb.h | 3 +++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 06a24c5928..8a4a98e436 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -14370,6 +14370,21 @@ Move_SCORCHING_SANDS:: Move_JUNGLE_HEALING:: goto Move_AROMATHERAPY + +Move_SILK_TRAP:: + loadspritegfx ANIM_TAG_PROTECT + loadspritegfx ANIM_TAG_SPIDER_WEB + splitbgprio ANIM_ATTACKER + playsewithpan SE_M_STRING_SHOT2, SOUND_PAN_TARGET + createsprite gSpiderWebSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, FALSE + waitforvisualfinish + createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_PROTECT, 0, 10, 10, RGB_LIME_GREEN + monbg ANIM_ATK_PARTNER + waitplaysewithpan SE_M_REFLECT, SOUND_PAN_ATTACKER, 0x10 + createsprite gProtectSpriteTemplate, ANIM_ATTACKER, 2, 24, 0, 90 + waitforvisualfinish + clearmonbg ANIM_ATK_PARTNER + end Move_WICKED_BLOW:: Move_SURGING_STRIKES:: @@ -14406,7 +14421,6 @@ Move_SANDSEAR_STORM:: Move_LUNAR_BLESSING:: Move_TAKE_HEART:: Move_TERA_BLAST:: -Move_SILK_TRAP:: Move_AXE_KICK:: Move_LAST_RESPECTS:: Move_LUMINA_CRASH:: diff --git a/include/constants/rgb.h b/include/constants/rgb.h index 3e0bf6fe03..f73ab53b4b 100644 --- a/include/constants/rgb.h +++ b/include/constants/rgb.h @@ -8,6 +8,7 @@ #define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10)) #define RGB2(r, g, b) (((b) << 10) | ((g) << 5) | (r)) #define _RGB(r, g, b) ((((b) & 0x1F) << 10) + (((g) & 0x1F) << 5) + ((r) & 0x1F)) +#define RGB2GBA(r, g, b) (((r >> 3) & 31) | (((g >> 3) & 31) << 5) | (((b >> 3) & 31) << 10)) #define RGB_ALPHA (1 << 15) #define IS_ALPHA(color) ((color) & RGB_ALPHA) @@ -23,4 +24,6 @@ #define RGB_CYAN RGB(0, 31, 31) #define RGB_WHITEALPHA (RGB_WHITE | RGB_ALPHA) +#define RGB_LIME_GREEN RGB2GBA(222, 230, 49) + #endif // GUARD_RGB_H