1 /* omega copyright (c) 1987,1988,1989 by Laurence Raphael Brothers */
2 /* mstrike.c */
3 /* monster strike functions */
4
5 #include "glob.h"
6
7
8
9
m_firebolt(m)10 void m_firebolt(m)
11 struct monster *m;
12 {
13 fbolt(m->x,m->y,Player.x,Player.y,m->hit,m->dmg);
14 }
15
m_nbolt(m)16 void m_nbolt(m)
17 struct monster *m;
18 {
19 nbolt(m->x,m->y,Player.x,Player.y,m->hit,m->dmg);
20 }
21
22
m_lball(m)23 void m_lball(m)
24 struct monster *m;
25 {
26 lball(m->x,m->y,Player.x,Player.y,m->dmg);
27 }
28
m_fireball(m)29 void m_fireball(m)
30 struct monster *m;
31 {
32 fball(m->x,m->y,Player.x,Player.y,m->dmg);
33 }
34
35
m_snowball(m)36 void m_snowball(m)
37 struct monster *m;
38 {
39 snowball(m->x,m->y,Player.x,Player.y,m->dmg);
40 }
41
m_blind_strike(m)42 void m_blind_strike(m)
43 struct monster *m;
44 {
45
46 pml ml;
47 if ((Player.status[BLINDED] == 0) &&
48 los_p(m->x,m->y,Player.x,Player.y) &&
49 (distance(m->x,m->y,Player.x,Player.y) < 5)) {
50 if (m->uniqueness == COMMON) {
51 strcpy(Str2,"The ");
52 strcat(Str2,m->monstring);
53 }
54 else strcpy(Str2,m->monstring);
55 strcat(Str2," gazes at you menacingly");
56 mprint(Str2);
57 if (! p_immune(GAZE)) {
58 mprint("You've been blinded!");
59 Player.status[BLINDED] = random_range(4)+1;
60 for(ml=Level->mlist;ml!=NULL;ml=ml->next)
61 plotspot(ml->m->x,ml->m->y,FALSE);
62 }
63 else mprint("You gaze steadily back....");
64 }
65 }
66
67
68
69
m_strike_sonic(m)70 void m_strike_sonic(m)
71 struct monster *m;
72 {
73 if (m->uniqueness == COMMON) {
74 strcpy(Str2,"The ");
75 strcat(Str2,m->monstring);
76 }
77 else strcpy(Str2,m->monstring);
78 strcat(Str2," screams at you!");
79 mprint(Str2);
80 p_damage(m->dmg,OTHER_MAGIC,"a sonic blast");
81 }
82
83