void m_damage(struct monster *m, int dmg, int dtype) { m_status_set(m, AWAKE); m_status_set(m, HOSTILE); if(m_immunityp(m, dtype)) { if(los_p(Player.x, Player.y, m->x, m->y)) { if(m->uniqueness != COMMON) { strcpy(Str1, m->monstring); } else { strcpy(Str1, "The "); strcat(Str1, m->monstring); } strcat(Str1, " ignores the attack!"); mprint(Str1); } } else { m->hp -= dmg; if(m->hp < 1) { m_death(m); } } }
void weapon_victrix(int dmgmod, pob o, pmt m) { if (m->meleef == M_MELEE_SPIRIT) { mprint("Your opponent dissipates in a harmless cloud of vapors..."); m_death(m); } else weapon_normal_hit(dmgmod,o,m); }
void weapon_mace_disrupt(int dmgmod, pob o, pmt m) { if (m->meleef == M_MELEE_SPIRIT) { mprint("The monster crumbles away to dust!"); m_death(m); } else p_hit(m,Player.dmg+dmgmod,UNSTOPPABLE); }
void weapon_scythe(int dmgmod, pob o, pmt m) { mprint("Slice!"); m_death(m); if (! Player.rank[ADEPT]) { mprint("Ooops!"); mprint("You accidentally touch yourself on the backswing...."); p_death("the Scythe of Death"); } }
void weapon_vorpal(int dmgmod, pob o, pmt m) { if ((random_range(10) < 3) && (! m_immunityp(m,NORMAL_DAMAGE))) { o->known = 2; if (random_range(2) == 1) mprint("One Two! One Two! And through and through!"); else mprint("Your vorpal blade goes snicker-snack!"); m_death(m); } else weapon_normal_hit(dmgmod,o,m); }
void weapon_demonblade(int dmgmod, pob o, pmt m) { if (o->blessing > -1) { mprint("Demonblade disintegrates with a soft sigh."); mprint("You stop foaming at the mouth."); Player.status[BERSERK] = 0; conform_lost_object(o); } else if (m->specialf == M_SP_DEMON) { mprint("The demon flees in terror before your weapon!"); m_vanish(m); } else if (m->meleef != M_MELEE_SPIRIT) { if (m->level > random_range(10)) { if( Player.hp < Player.maxhp ) Player.hp = min(Player.maxhp,Player.hp+m->hp); Player.str++; if( Player.pow < Player.maxpow ) Player.pow = min(Player.maxpow,Player.pow+m->level); m_death(m); mprint("You feel a surge of raw power from Demonblade!"); } else p_hit(m,Player.dmg+dmgmod,NORMAL_DAMAGE); } else { mprint("Demonblade howls as it strikes the spirit!"); if (random_range(10) == 1) { mprint("... and shatters into a thousand lost fragments!"); morewait(); p_damage(50,UNSTOPPABLE,"Demonblade exploding"); conform_lost_object(o); } else { mprint("You feel your lifeforce draining...."); p_damage(25,UNSTOPPABLE,"a backlash of negative energies"); Player.str -= 3; Player.con -= 3; if (Player.str < 1 || Player.con < 1) p_death("a backlash of negative energies"); } } }
void m_lava(struct monster *m) { char Str1[80]; if(!m_immunityp(m, FLAME) || (!m_statusp(m, SWIMMING) && !m_statusp(m, ONLYSWIM))) { if(los_p(m->x, m->y, Player.x, Player.y)) { if(m->uniqueness != COMMON) { strcpy(Str1, m->monstring); } else { strcpy(Str1, "The "); strcat(Str1, m->monstring); } strcat(Str1, " died in a pool of lava!"); mprint(Str1); } m_death(m); } }
void m_water(struct monster *m) { char Str1[80]; if(!m_statusp(m, INTANGIBLE) && !m_statusp(m, SWIMMING) && !m_statusp(m, ONLYSWIM)) { if(los_p(m->x, m->y, Player.x, Player.y)) { if(m->uniqueness != COMMON) { strcpy(Str1, m->monstring); } else { strcpy(Str1, "The "); strcat(Str1, m->monstring); } strcat(Str1, " drowned!"); mprint(Str1); } m_death(m); } }