|
1
|
timer++;
|
|
2
|
if (timer == 1)
|
|
3
|
snd_play(snd_icespell);
|
|
4
|
if (timer == 1)
|
|
5
|
hex[0] = instance_create(x - 25, y - 20, obj_icespell_hexagon);
|
|
6
|
if (timer == 4)
|
|
7
|
hex[1] = instance_create(x + 25, y - 20, obj_icespell_hexagon);
|
|
8
|
if (timer == 7)
|
|
9
|
hex[2] = instance_create(x, y + 20, obj_icespell_hexagon);
|
|
10
|
if (timer == 10)
|
|
11
|
{
|
|
12
|
for (i = 0; i < 3; i++)
|
|
13
|
{
|
|
14
|
with (hex[i])
|
|
15
|
{
|
|
16
|
for (j = 0; j < 6; j++)
|
|
17
|
{
|
|
18
|
hexhex[j] = instance_create(x, y, obj_icespell_hexagon);
|
|
19
|
hexhex[j].image_xscale = 0.75;
|
|
20
|
hexhex[j].image_yscale = 0.75;
|
|
21
|
hexhex[j].con = 1;
|
|
22
|
hexhex[j].direction = 60 * j;
|
|
23
|
hexhex[j].speed = 8;
|
|
24
|
hexhex[j].friction = 0.2;
|
|
25
|
}
|
|
26
|
}
|
|
27
|
}
|
|
28
|
}
|
|
29
|
if (timer == 11)
|
|
30
|
{
|
|
31
|
with (hex[0])
|
|
32
|
instance_destroy();
|
|
33
|
with (hex[1])
|
|
34
|
instance_destroy();
|
|
35
|
with (hex[2])
|
|
36
|
instance_destroy();
|
|
37
|
}
|
|
38
|
if (timer == 15)
|
|
39
|
{
|
|
40
|
if (global.fighting == 1)
|
|
41
|
{
|
|
42
|
global.hittarget[star] = 0;
|
|
43
|
if (damage >= global.monsterhp[star])
|
|
44
|
{
|
|
45
|
if (i_ex(global.monsterinstance[star]))
|
|
46
|
{
|
|
47
|
if (global.monsterinstance[star].freezable == 1)
|
|
48
|
global.flag[51 + star] = 6;
|
|
49
|
}
|
|
50
|
}
|
|
51
|
scr_damage_enemyscr_damage_enemy
function scr_damage_enemy(arg0, arg1)
{
dm = instance_create(global.monsterx[arg0], (global.monstery[arg0] + 20) - (global.hittarget[arg0] * 20), obj_dmgwriter);
if (caster < 4)
{
dm.type = global.char[caster] - 1;
if (global.char[caster] == 4)
dm.type = 6;
}
if (caster == 5)
dm.type = 5;
dm.damage = arg1;
global.monsterhp[arg0] -= arg1;
if (arg1 > 0)
{
with (global.monsterinstance[arg0])
{
shakex = 9;
state = 3;
hurttimer = 30;
}
if (i_ex(global.monsterinstance[arg0]))
global.monsterinstance[arg0].hurtamt = arg1;
}
global.hittarget[arg0] += 1;
if (arg1 == 0)
{
with (global.monsterinstance[arg0])
{
hurtamt = 0;
if (hurttimer <= 15 && candodge == 1)
{
dodgetimer = 0;
state = 4;
}
}
}
if (global.chapter == 2 && i_ex(obj_sweet_enemy) && global.monsterhp[arg0] <= 0)
global.monsterhp[arg0] = 1;
var a = 0;
if (global.chapter == 2 && i_ex(obj_queen_enemy))
a = 1;
if (global.chapter == 2 && i_ex(obj_spamton_neo_enemy))
a = 2;
if (global.chapter == 2 && i_ex(obj_berdlyb_enemy))
a = 3;
if (global.monsterhp[arg0] <= 0 && a == 0)
{
with (global.monsterinstance[arg0])
scr_monsterdefeat();
}
if (global.chapter == 2 && global.monsterhp[arg0] <= 0 && a == 3)
{
with (global.monsterinstance[arg0])
endcon = 1;
}
} (star, damage);
|
|
52
|
if (global.monster[star] == 1)
|
|
53
|
{
|
|
54
|
with (target)
|
|
55
|
__of = scr_oflashscr_oflash
function scr_oflash()
{
_oflash = instance_create(x, y, obj_oflash);
_oflash.image_xscale = image_xscale;
_oflash.image_speed = 0;
_oflash.image_index = image_index;
_oflash.image_yscale = image_yscale;
if (global.chapter == 2 && object_index == obj_mauswheel_enemy)
_oflash.sprite_index = spr_mauswheel_idle;
else
_oflash.sprite_index = sprite_index;
_oflash.depth = depth - 1;
_oflash.target = id;
return _oflash;
} ();
|
|
56
|
}
|
|
57
|
}
|
|
58
|
}
|
|
59
|
if (timer >= 10 && timer <= 30)
|
|
60
|
{
|
|
61
|
draw_set_alpha(2.2 - (timer / 10));
|
|
62
|
draw_set_color(c_white);
|
|
63
|
draw_circle(x, y, 60 - (timer * 6), true);
|
|
64
|
draw_circle(x, y, 61 - (timer * 6), true);
|
|
65
|
draw_circle(x, y, 62 - (timer * 6), true);
|
|
66
|
draw_set_alpha(1);
|
|
67
|
}
|
|
68
|
if (timer == 60)
|
|
69
|
instance_destroy();
|