| 1 |
if (live_call()) |
| 2 |
return global.live_result; |
| 3 |
var battle_box = 3154; |
| 4 |
switch (round(attack_tick)) |
| 5 |
{ |
| 6 |
case 30: |
| 7 |
instance_create_depth(battle_box.bbox_left + 5, battle_box.bbox_top - 24, -100, obj_martlet_attack_block_hurt); |
| 8 |
instance_create_depth(battle_box.bbox_left + 29, battle_box.bbox_top - 24, -100, obj_martlet_attack_block_hurt); |
| 9 |
instance_create_depth(battle_box.bbox_left + 53, battle_box.bbox_top - 24, -100, obj_martlet_attack_glass); |
| 10 |
break; |
| 11 |
case 50: |
| 12 |
instance_create_depth(battle_box.bbox_left + 5, battle_box.bbox_top - 24, -100, obj_martlet_attack_glass); |
| 13 |
instance_create_depth(battle_box.bbox_left + 29, battle_box.bbox_top - 24, -100, obj_martlet_attack_block_hurt); |
| 14 |
instance_create_depth(battle_box.bbox_left + 53, battle_box.bbox_top - 24, -100, obj_martlet_attack_block_hurt); |
| 15 |
break; |
| 16 |
case 70: |
| 17 |
instance_create_depth(battle_box.bbox_left + 5, battle_box.bbox_top - 24, -100, obj_martlet_attack_glass); |
| 18 |
instance_create_depth(battle_box.bbox_left + 29, battle_box.bbox_top - 24, -100, obj_martlet_attack_glass); |
| 19 |
instance_create_depth(battle_box.bbox_left + 53, battle_box.bbox_top - 24, -100, obj_martlet_attack_glass); |
| 20 |
break; |
| 21 |
case 75: |
| 22 |
instance_create_depth(battle_box.bbox_left + 5, battle_box.bbox_top - 24, -100, obj_martlet_attack_glass); |
| 23 |
instance_create_depth(battle_box.bbox_left + 29, battle_box.bbox_top - 24, -100, obj_martlet_attack_glass); |
| 24 |
instance_create_depth(battle_box.bbox_left + 53, battle_box.bbox_top - 24, -100, obj_martlet_attack_glass); |
| 25 |
break; |
| 26 |
case 85: |
| 27 |
instance_create_depth(battle_box.bbox_left + 5, battle_box.bbox_top - 24, -100, obj_martlet_attack_block_hurt); |
| 28 |
instance_create_depth(battle_box.bbox_left + 29, battle_box.bbox_top - 24, -100, obj_martlet_attack_block); |
| 29 |
instance_create_depth(battle_box.bbox_left + 53, battle_box.bbox_top - 24, -100, obj_martlet_attack_block_hurt); |
| 30 |
break; |
| 31 |
case 110: |
| 32 |
instance_create_depth(battle_box.bbox_left + 5, battle_box.bbox_top - 24, -100, obj_martlet_attack_block); |
| 33 |
instance_create_depth(battle_box.bbox_left + 29, battle_box.bbox_top - 24, -100, obj_martlet_attack_block_hurt); |
| 34 |
instance_create_depth(battle_box.bbox_left + 53, battle_box.bbox_top - 24, -100, obj_martlet_attack_glass); |
| 35 |
break; |
| 36 |
case 120: |
| 37 |
instance_create_depth(battle_box.bbox_left + 5, battle_box.bbox_top - 24, -100, obj_martlet_attack_glass); |
| 38 |
instance_create_depth(battle_box.bbox_left + 29, battle_box.bbox_top - 24, -100, obj_martlet_attack_block_hurt); |
| 39 |
instance_create_depth(battle_box.bbox_left + 53, battle_box.bbox_top - 24, -100, obj_martlet_attack_block); |
| 40 |
break; |
| 41 |
case 135: |
| 42 |
instance_create_depth(battle_box.bbox_left + 5, battle_box.bbox_top - 24, -100, obj_martlet_attack_block); |
| 43 |
instance_create_depth(battle_box.bbox_left + 29, battle_box.bbox_top - 24, -100, obj_martlet_attack_block_hurt); |
| 44 |
instance_create_depth(battle_box.bbox_left + 53, battle_box.bbox_top - 24, -100, obj_martlet_attack_glass); |
| 45 |
break; |
| 46 |
case 147: |
| 47 |
instance_create_depth(battle_box.bbox_left + 5, battle_box.bbox_top - 24, -100, obj_martlet_attack_block_hurt); |
| 48 |
instance_create_depth(battle_box.bbox_left + 29, battle_box.bbox_top - 24, -100, obj_martlet_attack_glass); |
| 49 |
instance_create_depth(battle_box.bbox_left + 53, battle_box.bbox_top - 24, -100, obj_martlet_attack_block_hurt); |
| 50 |
break; |
| 51 |
case 160: |
| 52 |
instance_create_depth(battle_box.bbox_left + 5, battle_box.bbox_top - 24, -100, obj_martlet_attack_block_arrow); |
| 53 |
instance_create_depth(battle_box.bbox_left + 29, battle_box.bbox_top - 24, -100, obj_martlet_attack_block_arrow); |
| 54 |
instance_create_depth(battle_box.bbox_left + 53, battle_box.bbox_top - 24, -100, obj_martlet_attack_block_arrow); |
| 55 |
break; |
| 56 |
case 200: |
| 57 |
scr_battle_box_resize_midfightscr_battle_box_resize_midfightfunction scr_battle_box_resize_midfight()
{
if (instance_exists(obj_dialogue_box_battle_transformation_any))
{
with (obj_dialogue_box_battle_transformation_any)
{
battle_box_resize_midfight = true;
battle_box_target_xscale = argument[0] / sprite_get_width(sprite_index);
battle_box_target_yscale = argument[1] / sprite_get_height(sprite_index);
if (argument_count > 2)
{
battle_box_target_x = argument[2];
battle_box_target_y = argument[3];
}
if (abs(image_xscale - battle_box_target_xscale) < 0.01 && abs(image_yscale - battle_box_target_yscale) < 0.01 && abs(x - battle_box_target_x) < 0.1 && abs(y - battle_box_target_y) < 0.1)
{
var box = 3154;
global.attack_surface_width = box.sprite_width - 8;
global.attack_surface_height = box.sprite_height - 8;
global.attack_surface_x = box.x - (global.attack_surface_width * 0.5);
global.attack_surface_y = box.y - (global.attack_surface_height * 0.5);
if (surface_exists(global.attack_surface))
global.attack_surface = surface_create(global.attack_surface_width, global.attack_surface_height);
return true;
}
}
}
else
{
return false;
}
} (160, 82); |
| 58 |
target_direction = 180; |
| 59 |
break; |
| 60 |
case 210: |
| 61 |
var block = instance_create_depth(battle_box.bbox_right + 24, battle_box.y - 36, -100, obj_martlet_attack_block_hurt); |
| 62 |
block.direction = 180; |
| 63 |
block = instance_create_depth(battle_box.bbox_right + 24, battle_box.y - 12, -100, obj_martlet_attack_block_hurt); |
| 64 |
block.direction = 180; |
| 65 |
block = instance_create_depth(battle_box.bbox_right + 24, battle_box.y + 12, -100, obj_martlet_attack_block); |
| 66 |
block.direction = 180; |
| 67 |
break; |
| 68 |
case 225: |
| 69 |
var block = instance_create_depth(battle_box.bbox_right + 24, battle_box.y - 36, -100, obj_martlet_attack_block_hurt); |
| 70 |
block.direction = 180; |
| 71 |
block = instance_create_depth(battle_box.bbox_right + 24, battle_box.y - 12, -100, obj_martlet_attack_glass); |
| 72 |
block.direction = 180; |
| 73 |
block = instance_create_depth(battle_box.bbox_right + 24, battle_box.y + 12, -100, obj_martlet_attack_block_hurt); |
| 74 |
block.direction = 180; |
| 75 |
break; |
| 76 |
case 240: |
| 77 |
var block = instance_create_depth(battle_box.bbox_right + 24, battle_box.y - 36, -100, obj_martlet_attack_block); |
| 78 |
block.direction = 180; |
| 79 |
block = instance_create_depth(battle_box.bbox_right + 24, battle_box.y - 12, -100, obj_martlet_attack_block_hurt); |
| 80 |
block.direction = 180; |
| 81 |
block = instance_create_depth(battle_box.bbox_right + 24, battle_box.y + 12, -100, obj_martlet_attack_glass); |
| 82 |
block.direction = 180; |
| 83 |
break; |
| 84 |
case 260: |
| 85 |
var block = instance_create_depth(battle_box.bbox_right + 24, battle_box.y - 36, -100, obj_martlet_attack_block_hurt); |
| 86 |
block.direction = 180; |
| 87 |
block = instance_create_depth(battle_box.bbox_right + 24, battle_box.y - 12, -100, obj_martlet_attack_block); |
| 88 |
block.direction = 180; |
| 89 |
block = instance_create_depth(battle_box.bbox_right + 24, battle_box.y + 12, -100, obj_martlet_attack_glass); |
| 90 |
block.direction = 180; |
| 91 |
break; |
| 92 |
case 265: |
| 93 |
var block = instance_create_depth(battle_box.bbox_right + 24, battle_box.y - 36, -100, obj_martlet_attack_block); |
| 94 |
block.direction = 180; |
| 95 |
block = instance_create_depth(battle_box.bbox_right + 24, battle_box.y - 12, -100, obj_martlet_attack_glass); |
| 96 |
block.direction = 180; |
| 97 |
block = instance_create_depth(battle_box.bbox_right + 24, battle_box.y + 12, -100, obj_martlet_attack_block_hurt); |
| 98 |
block.direction = 180; |
| 99 |
break; |
| 100 |
case 280: |
| 101 |
var block = instance_create_depth(battle_box.bbox_right + 24, battle_box.y - 36, -100, obj_martlet_attack_block_arrow); |
| 102 |
block.direction = 180; |
| 103 |
block = instance_create_depth(battle_box.bbox_right + 24, battle_box.y - 12, -100, obj_martlet_attack_block_arrow); |
| 104 |
block.direction = 180; |
| 105 |
block = instance_create_depth(battle_box.bbox_right + 24, battle_box.y + 12, -100, obj_martlet_attack_block_arrow); |
| 106 |
block.direction = 180; |
| 107 |
with (obj_martlet_attack_block_arrow) |
| 108 |
arrow_dir = 180; |
| 109 |
break; |
| 110 |
case 310: |
| 111 |
var block = instance_create_depth(battle_box.bbox_left - 24, battle_box.y - 36, -100, obj_martlet_attack_block); |
| 112 |
block.direction = 0; |
| 113 |
block.speed = 7; |
| 114 |
block = instance_create_depth(battle_box.bbox_left - 24, battle_box.y - 12, -100, obj_martlet_attack_block); |
| 115 |
block.direction = 0; |
| 116 |
block.speed = 7; |
| 117 |
block = instance_create_depth(battle_box.bbox_left - 24, battle_box.y + 12, -100, obj_martlet_attack_block); |
| 118 |
block.direction = 0; |
| 119 |
block.speed = 7; |
| 120 |
break; |
| 121 |
case 325: |
| 122 |
var block = instance_create_depth(battle_box.bbox_left - 24, battle_box.y - 36, -100, obj_martlet_attack_glass); |
| 123 |
block.direction = 0; |
| 124 |
block.speed = 7; |
| 125 |
block = instance_create_depth(battle_box.bbox_left - 24, battle_box.y - 12, -100, obj_martlet_attack_block_hurt); |
| 126 |
block.direction = 0; |
| 127 |
block.speed = 7; |
| 128 |
block = instance_create_depth(battle_box.bbox_left - 24, battle_box.y + 12, -100, obj_martlet_attack_glass); |
| 129 |
block.direction = 0; |
| 130 |
block.speed = 7; |
| 131 |
break; |
| 132 |
case 380: |
| 133 |
instance_destroy(); |
| 134 |
break; |
| 135 |
} |
| 136 |
if (attack_tick != 480) |
| 137 |
attack_tick += 1; |
| 138 |
if (global.image_alpha_enemy_attacking >= 0) |
| 139 |
{ |
| 140 |
if (bbox_overlay_alpha > 0) |
| 141 |
bbox_overlay_alpha -= 0.1; |
| 142 |
} |
| 143 |
if (hint_draw == true) |
| 144 |
{ |
| 145 |
if (hint_alpha < 1) |
| 146 |
hint_alpha += 0.1; |
| 147 |
} |
| 148 |
else |
| 149 |
{ |
| 150 |
hint_alpha = 0; |
| 151 |
} |