@@ -131,11 +131,106 @@ unsafe fn duckhunt_attack_lw3_game(fighter: &mut L2CAgentBase) {
131
131
132
132
}
133
133
134
+ // Squat Attack
135
+ #[ acmd_script( agent = "duckhunt" , script = "game_attacksquats3" , category = ACMD_GAME , low_priority) ]
136
+ unsafe fn duckhunt_attack_squat_s3_game ( fighter : & mut L2CAgentBase ) {
137
+ let lua_state = fighter. lua_state_agent ;
138
+ let boma = fighter. boma ( ) ;
139
+ frame ( lua_state, 1.0 ) ;
140
+ if is_excute ( fighter) {
141
+ FT_MOTION_RATE_RANGE ( fighter, 1.0 , 6.0 , 7.0 ) ;
142
+ }
143
+ frame ( lua_state, 6.0 ) ;
144
+ if is_excute ( fighter) {
145
+ // Inside Hitbox
146
+ ATTACK ( fighter, 0 , 0 , Hash40 :: new ( "top" ) , 5.0 , 60 , 45 , 0 , 35 , 3.5 , 0.0 , 1.0 , 5.0 , None , None , None , 1.0 , 1.0 , * ATTACK_SETOFF_KIND_ON , * ATTACK_LR_CHECK_POS , false , 1 , 0.0 , 0 , false , false , false , false , true , * COLLISION_SITUATION_MASK_GA , * COLLISION_CATEGORY_MASK_ALL , * COLLISION_PART_MASK_ALL , false , Hash40 :: new ( "collision_attr_normal" ) , * ATTACK_SOUND_LEVEL_S , * COLLISION_SOUND_ATTR_KICK , * ATTACK_REGION_HEAD ) ;
147
+ ATTACK ( fighter, 1 , 0 , Hash40 :: new ( "top" ) , 5.0 , 60 , 45 , 0 , 35 , 3.5 , 0.0 , 1.0 , 10.0 , None , None , None , 1.0 , 1.0 , * ATTACK_SETOFF_KIND_ON , * ATTACK_LR_CHECK_POS , false , 1 , 0.0 , 0 , false , false , false , false , true , * COLLISION_SITUATION_MASK_GA , * COLLISION_CATEGORY_MASK_ALL , * COLLISION_PART_MASK_ALL , false , Hash40 :: new ( "collision_attr_normal" ) , * ATTACK_SOUND_LEVEL_M , * COLLISION_SOUND_ATTR_KICK , * ATTACK_REGION_HEAD ) ;
148
+ // Tipper Hitbox
149
+ ATTACK ( fighter, 2 , 0 , Hash40 :: new ( "top" ) , 8.0 , 70 , 45 , 0 , 45 , 4.5 , 0.0 , 1.0 , 15.5 , None , None , None , 1.2 , 1.0 , * ATTACK_SETOFF_KIND_ON , * ATTACK_LR_CHECK_POS , false , 1 , 0.0 , 0 , false , false , false , false , true , * COLLISION_SITUATION_MASK_GA , * COLLISION_CATEGORY_MASK_ALL , * COLLISION_PART_MASK_ALL , false , Hash40 :: new ( "collision_attr_sting" ) , * ATTACK_SOUND_LEVEL_M , * COLLISION_SOUND_ATTR_CUTUP , * ATTACK_REGION_HEAD ) ;
150
+ AttackModule :: set_attack_height_all ( boma, app:: AttackHeight ( * ATTACK_HEIGHT_LOW ) , false ) ;
151
+ }
152
+ frame ( lua_state, 8.0 ) ;
153
+ if is_excute ( fighter) {
154
+ AttackModule :: clear_all ( boma) ;
155
+ }
156
+ frame ( lua_state, 21.0 ) ;
157
+ if is_excute ( fighter) {
158
+ CancelModule :: enable_cancel ( fighter. boma ( ) ) ;
159
+ }
160
+ }
161
+
162
+ #[ acmd_script( agent = "duckhunt" , script = "effect_attacksquats3" , category = ACMD_EFFECT , low_priority) ]
163
+ unsafe fn duckhunt_attack_squat_s3_effect ( agent : & mut L2CAgentBase ) {
164
+ let lua_state = agent. lua_state_agent ;
165
+ let boma = agent. boma ( ) ;
166
+ frame ( lua_state, 4.0 ) ;
167
+ if is_excute ( agent) {
168
+ FOOT_EFFECT ( agent, Hash40 :: new ( "sys_run_smoke" ) , Hash40 :: new ( "top" ) , -4 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , false ) ;
169
+ }
170
+ frame ( lua_state, 5.0 ) ;
171
+ if is_excute ( agent) {
172
+ EFFECT_FOLLOW_FLIP ( agent, Hash40 :: new ( "duckhunt_attack_line" ) , Hash40 :: new ( "duckhunt_attack_line" ) , Hash40 :: new ( "top" ) , 0 , 0 , 9 , 0 , 0 , 0 , 1 , true , * EF_FLIP_YZ ) ;
173
+ EFFECT_FOLLOW_FLIP ( agent, Hash40 :: new ( "sys_attack_line_b" ) , Hash40 :: new ( "sys_attack_line_b" ) , Hash40 :: new ( "top" ) , 0 , 2 , 3.5 , 0 , 0 , 0 , 0.8 , true , * EF_FLIP_YZ ) ;
174
+ LAST_EFFECT_SET_COLOR ( agent, 1 , 0.941 , 0.392 ) ;
175
+ }
176
+ }
177
+
178
+ #[ acmd_script( agent = "duckhunt" , script = "sound_attacksquats3" , category = ACMD_SOUND , low_priority) ]
179
+ unsafe fn duckhunt_attack_squat_s3_sound ( agent : & mut L2CAgentBase ) {
180
+ let lua_state = agent. lua_state_agent ;
181
+ let boma = agent. boma ( ) ;
182
+ frame ( lua_state, 1.0 ) ;
183
+ if is_excute ( agent) {
184
+ PLAY_SE ( agent, Hash40 :: new ( "se_duckhunt_appeal_s01" ) ) ;
185
+ PLAY_SE ( agent, Hash40 :: new ( "se_duckhunt_appeal_s02" ) ) ;
186
+ }
187
+ frame ( lua_state, 4.0 ) ;
188
+ if is_excute ( agent) {
189
+ PLAY_SE ( agent, Hash40 :: new ( "se_duckhunt_attackhard_l01" ) ) ;
190
+ PLAY_SEQUENCE ( agent, Hash40 :: new ( "seq_duckhunt_rnd_attack_duck" ) ) ;
191
+ }
192
+ frame ( lua_state, 8.0 ) ;
193
+ if is_excute ( agent) {
194
+ PLAY_STATUS ( agent, Hash40 :: new ( "se_duckhunt_appeal_s04" ) ) ;
195
+ }
196
+ }
197
+
198
+ #[ acmd_script( agent = "duckhunt" , script = "expression_attacksquats3" , category = ACMD_EXPRESSION , low_priority) ]
199
+ unsafe fn duckhunt_attack_squat_s3_expression ( agent : & mut L2CAgentBase ) {
200
+ let lua_state = agent. lua_state_agent ;
201
+ let boma = agent. boma ( ) ;
202
+ if is_excute ( agent) {
203
+ AttackModule :: set_attack_reference_joint_id ( boma, Hash40 :: new ( "top" ) , AttackDirectionAxis ( * ATTACK_DIRECTION_Z ) , AttackDirectionAxis ( * ATTACK_DIRECTION_Y ) , AttackDirectionAxis ( * ATTACK_DIRECTION_X ) ) ;
204
+ slope ! ( agent, * MA_MSC_CMD_SLOPE_SLOPE_INTP , * SLOPE_STATUS_TOP , 4 ) ;
205
+ VisibilityModule :: set_int64 ( boma, hash40 ( "body" ) as i64 , hash40 ( "body_normal" ) as i64 ) ;
206
+ }
207
+ frame ( lua_state, 1.0 ) ;
208
+ if is_excute ( agent) {
209
+ VisibilityModule :: set_int64 ( boma, hash40 ( "body" ) as i64 , hash40 ( "body_openwing" ) as i64 ) ;
210
+ }
211
+ frame ( lua_state, 3.0 ) ;
212
+ if is_excute ( agent) {
213
+ ControlModule :: set_rumble ( boma, Hash40 :: new ( "rbkind_nohitm" ) , 0 , false , * BATTLE_OBJECT_ID_INVALID as u32 ) ;
214
+ }
215
+ frame ( lua_state, 5.0 ) ;
216
+ if is_excute ( agent) {
217
+ RUMBLE_HIT ( agent, Hash40 :: new ( "rbkind_attackm" ) , 0 ) ;
218
+ }
219
+ frame ( lua_state, 22.0 ) ;
220
+ if is_excute ( agent) {
221
+ VisibilityModule :: set_int64 ( boma, hash40 ( "body" ) as i64 , hash40 ( "body_normal" ) as i64 ) ;
222
+ }
223
+ }
224
+
134
225
pub fn install ( ) {
135
226
install_acmd_scripts ! (
136
227
duckhunt_attack_s3_hi_game,
137
228
duckhunt_attack_s3_game,
138
229
duckhunt_attack_s3_lw_game,
230
+ duckhunt_attack_squat_s3_game,
231
+ duckhunt_attack_squat_s3_effect,
232
+ duckhunt_attack_squat_s3_sound,
233
+ duckhunt_attack_squat_s3_expression,
139
234
duckhunt_attack_hi3_game,
140
235
duckhunt_attack_hi3_expression,
141
236
duckhunt_attack_lw3_game,
0 commit comments