| 1 |
col -= 1; |
| 2 |
pop = scr_monstersumscr_monstersumreturn global.monster[0] + global.monster[1] + global.monster[2]; (); |
| 3 |
first -= 1; |
| 4 |
if (first < 0) |
| 5 |
{ |
| 6 |
turnamt = 0.3; |
| 7 |
if (zap == 1) |
| 8 |
turnamt = 0.6; |
| 9 |
if (zap == 1 && pop > 1) |
| 10 |
turnamt = 0.5; |
| 11 |
} |
| 12 |
else |
| 13 |
{ |
| 14 |
turnamt = 0.2; |
| 15 |
} |
| 16 |
newdir = point_direction(x, y, obj_heart.x, obj_heart.y); |
| 17 |
hspeed += lengthdir_x(turnamt, newdir); |
| 18 |
vspeed += lengthdir_y(turnamt, newdir); |
| 19 |
if (zap == 0) |
| 20 |
{ |
| 21 |
if (speed > 6) |
| 22 |
speed = 6; |
| 23 |
} |
| 24 |
if (zap == 1) |
| 25 |
{ |
| 26 |
if (speed > 7) |
| 27 |
speed = 7; |
| 28 |
if (pop > 1) |
| 29 |
{ |
| 30 |
if (speed > 6) |
| 31 |
speed = 6; |
| 32 |
} |
| 33 |
} |
| 34 |
if (zap == 2) |
| 35 |
{ |
| 36 |
if (speed > 7) |
| 37 |
speed = 7; |
| 38 |
} |
| 39 |
if (x > (global.idealborder[1] + 6)) |
| 40 |
x = global.idealborder[0] - 15; |
| 41 |
if (x < (global.idealborder[0] - 20)) |
| 42 |
x = global.idealborder[1] + 2; |
| 43 |
if (y > (global.idealborder[3] + 6)) |
| 44 |
y = global.idealborder[2] - 15; |
| 45 |
if (y < (global.idealborder[2] - 20)) |
| 46 |
y = global.idealborder[3] + 2; |
| 47 |
if (king == obj_musicobjectparent && zap == 0) |
| 48 |
{ |
| 49 |
if (obj_heart.x == obj_heart.xprevious && obj_heart.y == obj_heart.yprevious) |
| 50 |
{ |
| 51 |
global.turntimer += 1; |
| 52 |
time += 1; |
| 53 |
if (time > 450 && heal == 0) |
| 54 |
{ |
| 55 |
obj_monsterparent.mercymod = 400; |
| 56 |
snd_play(snd_select); |
| 57 |
object_index.sprite_index = spr_wizard_orb3; |
| 58 |
object_index.heal = 1; |
| 59 |
caster_pause(-3); |
| 60 |
} |
| 61 |
} |
| 62 |
else if (heal == 1) |
| 63 |
{ |
| 64 |
snd_play(snd_power); |
| 65 |
if (global.hp < global.maxhp) |
| 66 |
{ |
| 67 |
global.hp += 1; |
| 68 |
if (global.hp > global.maxhp) |
| 69 |
global.hp = global.maxhp; |
| 70 |
} |
| 71 |
if (global.flag[393 wizard_orb_special] != 0) |
| 72 |
caster_free(global.flag[393 wizard_orb_special]); |
| 73 |
caster_resume(all); |
| 74 |
global.turntimer = -1; |
| 75 |
global.mnfight = 3; |
| 76 |
global.myfight = -1; |
| 77 |
with (object_index) |
| 78 |
instance_destroy(); |
| 79 |
} |
| 80 |
} |