Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //B - Reversals
- if (attack == AT_NSPECIAL || attack == AT_FSPECIAL || attack == AT_DSPECIAL || attack == AT_USPECIAL){
- trigger_b_reverse();
- }
- if (attack == AT_NSPECIAL)
- {
- if (window < 4) {
- can_fast_fall = false;
- }
- if (window > 1)
- { can_jump = true;
- can_wall_jump = true;
- }
- if (window == 1){
- if (window_timer == 1){
- times_through = 0;
- }
- else if (window_timer == get_window_value(attack, 1, AG_WINDOW_LENGTH))
- {
- if (free) {window = 3;}
- else {window = 2;}
- }
- }
- else if (window == 2 || window == 3){
- if (window_timer == 1){
- move_cooldown[AT_NSPECIAL] = 30;
- }
- if (window == 2 && free) {window = 3;}
- else if (window == 3 && !free) {window = 2;}
- if (window == 3){spr_angle = (-45 * spr_dir);}
- else {spr_angle = 0;}
- if (window_timer == get_window_value(attack, 2, AG_WINDOW_LENGTH)){
- times_through++;
- window_timer = 0;
- if (times_through >= 4)
- {
- window = 4;
- }
- }
- }
- else if (window >= 4 && window_timer >= 2)
- {
- {spr_angle = 0;}
- if ((left_down || right_down) && !free) {set_state(PS_DASH);}
- }
- }
- if (attack == AT_FSPECIAL){
- if (window > 10 || has_hit_player) { can_wall_jump = true; }
- if (has_hit_player)
- {
- can_jump = true;
- move_cooldown[AT_FSPECIAL] = 20;
- if (window < 3){
- window = 4;
- window_timer = 0;
- times_through = 0;
- }
- else if (window == 4 && times_through < 1 && window_timer == (get_window_value(attack, 4, AG_WINDOW_LENGTH)-1)){
- window = 5;
- window_timer = 0;
- }
- else if (window == 5 && times_through < 1 && window_timer == (get_window_value(attack, 5, AG_WINDOW_LENGTH)-1)){
- window = 6;
- window_timer = 0;
- }
- else if (window == 6 && times_through < 10 && window_timer == (get_window_value(attack, 6, AG_WINDOW_LENGTH)-1) && free){
- times_through++;
- }
- else if (times_through >= 1 || !free){
- window = 10;
- window_timer = 1;
- }
- }
- else if (window > 1 && window < 7 && !free)
- {
- times_through = 0;
- if (hsp >= 1 || hsp <= -1)
- {
- window = 7;
- window_timer = 0;
- }
- else
- {
- state = PS_PRATLAND;
- state_timer = 0;
- }
- }
- else if (window == 7 && times_through < 1)
- {
- if (window_timer == 3)
- {
- spawn_hit_fx( x-(40*spr_dir), y-24, skid_dust );
- }
- if(window_timer == 6)
- {
- window = 8;
- window_timer = 0;
- }
- }
- else if (window == 8 && times_through < 1 && window_timer == 8){
- window = 9;
- window_timer = 0;
- }
- else if (window == 2 && free && hsp == 0)
- {
- take_damage(player, -1, 6);
- spawn_hit_fx( x+(12*spr_dir), y-38, wave_wall );
- window = 11;
- window_timer = 0;
- times_through = 0;
- move_cooldown[AT_FSPECIAL] = 60;
- destroy_hitboxes();
- }
- else if (window == 11 && window_timer == (get_window_value(attack, 11, AG_WINDOW_LENGTH)-1))
- {
- window = 12;
- window_timer = 0;
- }
- else if (window == 12 && window_timer == (get_window_value(attack, 11, AG_WINDOW_LENGTH)-1))
- {
- window = 13;
- window_timer = 0;
- }
- }
- if (attack == AT_USPECIAL){
- if (window == 1 && window_timer == 1){
- times_through = 0;
- }
- if (window == 2){
- if (window_timer == get_window_value(attack, 2, AG_WINDOW_LENGTH)){
- if (times_through < 10){
- times_through++;
- window_timer = 0;
- }
- }
- if (!joy_pad_idle){
- hsp += lengthdir_x(1, joy_dir);
- vsp += lengthdir_y(1, joy_dir);
- } else {
- hsp *= .6;
- vsp *= .6;
- }
- var fly_dir = point_direction(0,0,hsp,vsp);
- var fly_dist = point_distance(0,0,hsp,vsp);
- var max_speed = 12;
- if (fly_dist > max_speed){
- hsp = lengthdir_x(max_speed, fly_dir);
- vsp = lengthdir_y(max_speed, fly_dir);
- }
- if (special_pressed && times_through > 0){
- window = 4;
- window_timer = 0;
- }
- if (shield_pressed){
- window = 3;
- window_timer = 0;
- }
- }
- if (window > 3 && window < 6 && window_timer == get_window_value(attack, window, AG_WINDOW_LENGTH)){
- window++;
- window_timer = 0;
- }
- }
- if (attack == AT_DSPECIAL)
- {
- can_wall_jump = true;
- move_cooldown[AT_DSPECIAL] = 5;
- if (window > 1 && !free)
- {
- hsp = 0;
- vsp = 0;
- set_state (PS_LANDING_LAG);
- spr_angle = 0;
- }
- if (window == 2)
- {
- can_jump = true;
- if (window_timer > 8 && (special_pressed || attack_pressed))
- {
- if (left_down)
- {
- spr_dir = -1;
- hsp = spr_dir * 15;
- vsp = 1.6;
- spr_angle = (-15 * spr_dir);
- }
- else if (right_down)
- {
- spr_dir = 1
- hsp = spr_dir * 15;
- vsp = 1.6;
- spr_angle = (-15 * spr_dir);
- };
- else
- {hsp *= 0.5;}
- window = 3;
- window_timer = 0;
- }
- }
- if (window >= 3 && has_hit_player)
- {
- can_jump = true;
- }
- if (window == 3 && window_timer == 1)
- {
- sound_play(sound_get("vo_specd"));
- }
- if (window == 3 && window_timer == (get_window_value(attack, 3, AG_WINDOW_LENGTH))){
- window = 4;
- window_timer = 0;
- }
- if (window == 4 && window_timer == (get_window_value(attack, 4, AG_WINDOW_LENGTH))){
- window = 5;
- window_timer = 0;
- }
- if (window == 5 && window_timer == (get_window_value(attack, 5, AG_WINDOW_LENGTH))){
- window = 6;
- window_timer = 0;
- }
- }
- if (attack == AT_JAB)
- {
- if (window == 1 && window_timer == 1){
- last_hit_stun = false;
- }
- if (was_parried && window < 4){
- was_parried = false;
- last_hit_stun = true;
- }
- if (window >= 4 && last_hit_stun){
- was_parried = true;
- }
- }
- if (attack == AT_DATTACK)
- {
- if (window >= 3 && window_timer >= 2)
- {
- if ((left_down || right_down) && move_cooldown[AT_DATTACK] <= 0)
- {
- set_state(PS_DASH);
- for(i = 0; i < 50; i++) { move_cooldown[i] = 8; }
- move_cooldown[AT_DATTACK] = 18;
- }
- }
- }
- if(attack == AT_USTRONG)
- {
- if (can_ustrong_cancel)
- {
- move_cooldown[AT_USTRONG] = 20;
- if (window > 7 && window < 11)
- {
- can_jump = true;
- can_move = true;
- can_shield = true;
- can_special = true;
- }
- if (window == 10)
- {
- window = 11;
- }
- }
- }
- if(attack == AT_DAIR && can_dair_cancel)
- {
- can_jump = true;
- can_move = true;
- can_shield = true;
- can_special = true;
- can_attack = true;
- can_wall_jump = true;
- if (window > 4 && window < 8)
- {
- window = 8;
- window_timer = 0;
- }
- for(i = 8; i < 10; i++)
- {
- if (window == i && window_timer == (get_window_value(attack, i, AG_WINDOW_LENGTH)))
- {
- window = i+1;
- window_timer = 0;
- }
- }
- }
- if (attack == AT_BAIR && can_bair_cancel)
- {
- can_jump = true;
- can_move = true;
- can_shield = true;
- can_special = true;
- can_attack = true;
- can_wall_jump = true;
- if (!hitpause) {spr_dir *= -1;}
- if (window < 6)
- {
- window = 6;
- window_timer = 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement