1
1
2
2
use super :: * ;
3
3
4
- # [ acmd_script ( agent = "luigi" , script = "sound_damageflyhi" , category = ACMD_SOUND , low_priority ) ]
5
- unsafe fn damageflyhi_sound ( fighter : & mut L2CAgentBase ) {
4
+
5
+ unsafe extern "C" fn damageflyhi_sound ( fighter : & mut L2CAgentBase ) {
6
6
let lua_state = fighter. lua_state_agent ;
7
7
let boma = fighter. boma ( ) ;
8
8
frame ( lua_state, 1.0 ) ;
@@ -27,8 +27,8 @@ unsafe fn damageflyhi_sound(fighter: &mut L2CAgentBase) {
27
27
}
28
28
}
29
29
30
- # [ acmd_script ( agent = "luigi" , script = "sound_damageflylw" , category = ACMD_SOUND , low_priority ) ]
31
- unsafe fn damageflylw_sound ( fighter : & mut L2CAgentBase ) {
30
+
31
+ unsafe extern "C" fn damageflylw_sound ( fighter : & mut L2CAgentBase ) {
32
32
let lua_state = fighter. lua_state_agent ;
33
33
let boma = fighter. boma ( ) ;
34
34
frame ( lua_state, 1.0 ) ;
@@ -53,8 +53,8 @@ unsafe fn damageflylw_sound(fighter: &mut L2CAgentBase) {
53
53
}
54
54
}
55
55
56
- # [ acmd_script ( agent = "luigi" , script = "sound_damageflyn" , category = ACMD_SOUND , low_priority ) ]
57
- unsafe fn damageflyn_sound ( fighter : & mut L2CAgentBase ) {
56
+
57
+ unsafe extern "C" fn damageflyn_sound ( fighter : & mut L2CAgentBase ) {
58
58
let lua_state = fighter. lua_state_agent ;
59
59
let boma = fighter. boma ( ) ;
60
60
frame ( lua_state, 1.0 ) ;
@@ -79,8 +79,8 @@ unsafe fn damageflyn_sound(fighter: &mut L2CAgentBase) {
79
79
}
80
80
}
81
81
82
- # [ acmd_script ( agent = "luigi" , script = "sound_damageflyroll" , category = ACMD_SOUND , low_priority ) ]
83
- unsafe fn damageflyroll_sound ( fighter : & mut L2CAgentBase ) {
82
+
83
+ unsafe extern "C" fn damageflyroll_sound ( fighter : & mut L2CAgentBase ) {
84
84
let lua_state = fighter. lua_state_agent ;
85
85
let boma = fighter. boma ( ) ;
86
86
frame ( lua_state, 1.0 ) ;
@@ -95,8 +95,8 @@ unsafe fn damageflyroll_sound(fighter: &mut L2CAgentBase) {
95
95
}
96
96
}
97
97
98
- # [ acmd_script ( agent = "luigi" , script = "sound_damageflytop" , category = ACMD_SOUND , low_priority ) ]
99
- unsafe fn damageflytop_sound ( fighter : & mut L2CAgentBase ) {
98
+
99
+ unsafe extern "C" fn damageflytop_sound ( fighter : & mut L2CAgentBase ) {
100
100
let lua_state = fighter. lua_state_agent ;
101
101
let boma = fighter. boma ( ) ;
102
102
frame ( lua_state, 1.0 ) ;
@@ -121,8 +121,8 @@ unsafe fn damageflytop_sound(fighter: &mut L2CAgentBase) {
121
121
}
122
122
}
123
123
124
- # [ acmd_script ( agent = "luigi" , script = "sound_dash" , category = ACMD_SOUND , low_priority ) ]
125
- unsafe fn dash_sound ( fighter : & mut L2CAgentBase ) {
124
+
125
+ unsafe extern "C" fn dash_sound ( fighter : & mut L2CAgentBase ) {
126
126
let lua_state = fighter. lua_state_agent ;
127
127
let boma = fighter. boma ( ) ;
128
128
frame ( lua_state, 4.0 ) ;
@@ -132,8 +132,8 @@ unsafe fn dash_sound(fighter: &mut L2CAgentBase) {
132
132
}
133
133
}
134
134
135
- # [ acmd_script ( agent = "luigi" , script = "game_turndash" , category = ACMD_GAME , low_priority ) ]
136
- unsafe fn luigi_turn_dash_game ( fighter : & mut L2CAgentBase ) {
135
+
136
+ unsafe extern "C" fn luigi_turn_dash_game ( fighter : & mut L2CAgentBase ) {
137
137
let lua_state = fighter. lua_state_agent ;
138
138
let boma = fighter. boma ( ) ;
139
139
frame ( lua_state, 3.0 ) ;
@@ -147,8 +147,8 @@ unsafe fn luigi_turn_dash_game(fighter: &mut L2CAgentBase) {
147
147
148
148
}
149
149
150
- # [ acmd_script ( agent = "luigi" , script = "game_escapeair" , category = ACMD_GAME , low_priority ) ]
151
- unsafe fn escape_air_game ( fighter : & mut L2CAgentBase ) {
150
+
151
+ unsafe extern "C" fn escape_air_game ( fighter : & mut L2CAgentBase ) {
152
152
let lua_state = fighter. lua_state_agent ;
153
153
let boma = fighter. boma ( ) ;
154
154
let escape_air_cancel_frame = WorkModule :: get_param_float ( boma, hash40 ( "param_motion" ) , hash40 ( "escape_air_cancel_frame" ) ) ;
@@ -163,8 +163,8 @@ unsafe fn escape_air_game(fighter: &mut L2CAgentBase) {
163
163
}
164
164
}
165
165
166
- # [ acmd_script ( agent = "luigi" , script = "game_escapeairslide" , category = ACMD_GAME , low_priority ) ]
167
- unsafe fn escape_air_slide_game ( fighter : & mut L2CAgentBase ) {
166
+
167
+ unsafe extern "C" fn escape_air_slide_game ( fighter : & mut L2CAgentBase ) {
168
168
let lua_state = fighter. lua_state_agent ;
169
169
let boma = fighter. boma ( ) ;
170
170
@@ -178,8 +178,8 @@ unsafe fn escape_air_slide_game(fighter: &mut L2CAgentBase) {
178
178
}
179
179
}
180
180
181
- # [ acmd_script ( agent = "luigi" , script = "game_catch" , category = ACMD_GAME , low_priority ) ]
182
- unsafe fn luigi_catch_game ( fighter : & mut L2CAgentBase ) {
181
+
182
+ unsafe extern "C" fn luigi_catch_game ( fighter : & mut L2CAgentBase ) {
183
183
let lua_state = fighter. lua_state_agent ;
184
184
let boma = fighter. boma ( ) ;
185
185
if is_excute ( fighter) {
@@ -226,8 +226,8 @@ unsafe fn luigi_catch_game(fighter: &mut L2CAgentBase) {
226
226
227
227
}
228
228
229
- # [ acmd_script ( agent = "luigi" , script = "sound_catch" , category = ACMD_SOUND , low_priority ) ]
230
- unsafe fn luigi_catch_sound ( fighter : & mut L2CAgentBase ) {
229
+
230
+ unsafe extern "C" fn luigi_catch_sound ( fighter : & mut L2CAgentBase ) {
231
231
let lua_state = fighter. lua_state_agent ;
232
232
let boma = fighter. boma ( ) ;
233
233
frame ( lua_state, 7.0 ) ;
@@ -236,8 +236,8 @@ unsafe fn luigi_catch_sound(fighter: &mut L2CAgentBase) {
236
236
}
237
237
}
238
238
239
- # [ acmd_script ( agent = "luigi_obakyumu" , script = "effect_catch" , category = ACMD_EFFECT , low_priority ) ]
240
- unsafe fn luigi_obakyumu_catch_effect ( fighter : & mut L2CAgentBase ) {
239
+
240
+ unsafe extern "C" fn luigi_obakyumu_catch_effect ( fighter : & mut L2CAgentBase ) {
241
241
let lua_state = fighter. lua_state_agent ;
242
242
let boma = fighter. boma ( ) ;
243
243
frame ( lua_state, 14.0 ) ;
@@ -247,20 +247,23 @@ unsafe fn luigi_obakyumu_catch_effect(fighter: &mut L2CAgentBase) {
247
247
}
248
248
}
249
249
250
+
251
+
250
252
pub fn install ( ) {
251
- install_acmd_scripts ! (
252
- escape_air_game,
253
- escape_air_slide_game,
254
- dash_sound,
255
- luigi_catch_game,
256
- luigi_catch_sound,
257
- luigi_obakyumu_catch_effect,
258
- luigi_turn_dash_game,
259
- damageflyhi_sound,
260
- damageflylw_sound,
261
- damageflyn_sound,
262
- damageflyroll_sound,
263
- damageflytop_sound
264
- ) ;
253
+ smashline:: Agent :: new ( "luigi" )
254
+ . acmd ( "sound_damageflyhi" , damageflyhi_sound)
255
+ . acmd ( "sound_damageflylw" , damageflylw_sound)
256
+ . acmd ( "sound_damageflyn" , damageflyn_sound)
257
+ . acmd ( "sound_damageflyroll" , damageflyroll_sound)
258
+ . acmd ( "sound_damageflytop" , damageflytop_sound)
259
+ . acmd ( "sound_dash" , dash_sound)
260
+ . acmd ( "game_turndash" , luigi_turn_dash_game)
261
+ . acmd ( "game_escapeair" , escape_air_game)
262
+ . acmd ( "game_escapeairslide" , escape_air_slide_game)
263
+ . acmd ( "game_catch" , luigi_catch_game)
264
+ . acmd ( "sound_catch" , luigi_catch_sound)
265
+ . install ( ) ;
266
+ smashline:: Agent :: new ( "luigi_obakyumu" )
267
+ . acmd ( "effect_catch" , luigi_obakyumu_catch_effect)
268
+ . install ( ) ;
265
269
}
266
-
0 commit comments