| 1 |
draw_sprite_ext(sprite_index, image_index, x, y, 1, 1, 0, c_white, image_alpha); |
| 2 |
if (fade == 1) |
| 3 |
{ |
| 4 |
image_alpha -= 0.08; |
| 5 |
image_xscale -= 0.06; |
| 6 |
} |
| 7 |
if (image_xscale < 0.08) |
| 8 |
instance_destroy(); |
| 9 |
if (instance_number(obj_targetparent) == 0 && hit == 0) |
| 10 |
{ |
| 11 |
hit = 1; |
| 12 |
if (myscore == 0) |
| 13 |
{ |
| 14 |
global.damage = 0; |
| 15 |
global.hurtanim[global.mytarget] = 5; |
| 16 |
fade = 1; |
| 17 |
exit; |
| 18 |
} |
| 19 |
if (myscore > 0) |
| 20 |
{ |
| 21 |
mons = global.monsterinstance[global.mytarget]; |
| 22 |
script_execute(scr_attackcalc); |
| 23 |
damage *= ((myscore / 160) * (4 / num)); |
| 24 |
damage = round(damage); |
| 25 |
global.damage = damage; |
| 26 |
global.damage += round(random(2)); |
| 27 |
mons.takedamage = global.damage; |
| 28 |
global.stretch = 2; |
| 29 |
ht = 100; |
| 30 |
wd = 100; |
| 31 |
mons.trgtest = id; |
| 32 |
critter = 0; |
| 33 |
if (myscore > (400 * (num / 4))) |
| 34 |
critter = 1; |
| 35 |
with (mons) |
| 36 |
{ |
| 37 |
trgtest.ht = ht; |
| 38 |
trgtest.wd = wd; |
| 39 |
} |
| 40 |
if (global.weapon == 25) |
| 41 |
{ |
| 42 |
instance_create(mons.x + (wd / 2), mons.y + (ht / 2), obj_strongpunch); |
| 43 |
if (critter == 1) |
| 44 |
{ |
| 45 |
with (obj_strongpunch) |
| 46 |
event_user(5); |
| 47 |
} |
| 48 |
global.damagetimer = 10; |
| 49 |
} |
| 50 |
if (global.weapon == 49) |
| 51 |
{ |
| 52 |
instance_create(mons.x + (wd / 2), mons.y + (ht / 2), obj_gunshot_stab); |
| 53 |
if (critter == 1) |
| 54 |
{ |
| 55 |
with (obj_gunshot_stab) |
| 56 |
event_user(5); |
| 57 |
} |
| 58 |
global.damagetimer = 20; |
| 59 |
} |
| 60 |
if (global.weapon == 47) |
| 61 |
{ |
| 62 |
instance_create(mons.x + (wd / 2), mons.y + (ht / 2), obj_frypan_impact); |
| 63 |
if (critter == 1) |
| 64 |
{ |
| 65 |
with (obj_frypan_impact) |
| 66 |
event_user(5); |
| 67 |
} |
| 68 |
global.damagetimer = 20; |
| 69 |
} |
| 70 |
if (global.weapon == 45) |
| 71 |
{ |
| 72 |
instance_create(mons.x + (wd / 2), mons.y + (ht / 2), obj_notebook_attackanim); |
| 73 |
if (critter == 1) |
| 74 |
{ |
| 75 |
with (obj_notebook_attackanim) |
| 76 |
event_user(5); |
| 77 |
} |
| 78 |
global.damagetimer = 24; |
| 79 |
} |
| 80 |
global.hurtanim[global.mytarget] = 1; |
| 81 |
fade = 1; |
| 82 |
} |
| 83 |
} |