/* if wielding a bow, add bow damage to arrow damage */ void weapon_arrow(int dmgmod, pob o, pmt m) { if ((Player.possessions[O_WEAPON_HAND] != NULL) && (Player.possessions[O_WEAPON_HAND]->id == OB_LONGBOW)) /* ie, using a bow */ p_hit(m,Player.dmg+o->plus+o->dmg+dmgmod,NORMAL_DAMAGE); else p_hit(m,o->plus+o->dmg+dmgmod,NORMAL_DAMAGE); }
/* if wielding a crossbow, add bow damage to arrow damage */ void weapon_bolt(int dmgmod, pob o, pmt m) { if ((Player.possessions[O_WEAPON_HAND] != NULL) && (Player.possessions[O_WEAPON_HAND]->id == OB_CROSSBOW) && /*ie using a crossbow */ (Player.possessions[O_WEAPON_HAND]->aux==LOADED)) { p_hit(m,Player.dmg+o->plus+o->dmg+dmgmod,NORMAL_DAMAGE); Player.possessions[O_WEAPON_HAND]->aux = UNLOADED; } else p_hit(m,o->plus+o->dmg,NORMAL_DAMAGE); }
int msg_mines (int n, int msg, int z) { // space mines int sh, x, y; switch (msg) { case msg_update: objs[n].count = (objs[n].count + 1)&3; return (1); case msg_draw: sh = 0xf00 + 18 + objs[n].count/2; drawshape (&gamevp, sh, objs[n].x, objs[n].y); break; case msg_touch: switch (objs[z].kind) { case obj_player: if (class_cnt(class_shield)==0) { p_hit (2); snd_play (1,5); x = objs[n].x - 11; y = objs[n].y - 9; addobj (obj_explode3, x, y, 0, 0); explosion (objs[n].x, objs[n].y, 5); text ("You hit an enemy space mine!",0); killobj (n); }; break; case obj_shield: addobj (obj_explode2, objs[n].x, objs[n].y, 0, 0); explosion (objs[n].x, objs[n].y, 5); text ("Your shield was destroyed by a space mine",0); killobj (n); killobj (z); snd_play (1,5); }; }; return (0); };
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_tangle(int dmgmod, pob o, pmt m) { if ((random_range(2) == 1) && (! m_immunityp(m,NORMAL_DAMAGE))) { mprint("You entangle the monster!"); m_status_reset(m,MOBILE); } p_hit(m,Player.dmg+dmgmod,NORMAL_DAMAGE); }
void weapon_acidwhip(int dmgmod, Object* o, Monster* m) { if ((random_range(2) == 1) && (! m_immunityp(m,NORMAL_DAMAGE))) { mprint("You entangle the monster!"); m_status_reset(m,MOBILE); } p_hit(m,Player.dmg+dmgmod,ACID); }
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 weapon_desecrate(int dmgmod, pob o, pmt m) { o->known = 2; if (Player.alignment < 0) { mprint("Your opponent screams in agony!"); p_hit(m,Player.dmg+dmgmod,UNSTOPPABLE); Player.alignment--; if (Player.hp < Player.maxhp) { mprint("You feel a thrill of power surging up your blade!"); Player.hp = min(Player.maxhp,Player.hp+Player.dmg+dmgmod); } } else { mprint("Your blade turns in your hands and hits you!"); mprint("You hear evil laughter...."); level_drain(Player.dmg,"the sword Desecrator"); Player.alignment-=10; mprint("A strange force spreads from the wound throughout your body..."); mprint("You feel much more chaotic now."); } }
/* will be updated eventually */ void weapon_bare_hands(int dmgmod, pmt m) { p_hit(m,Player.dmg+dmgmod,NORMAL_DAMAGE); }
void weapon_normal_hit(int dmgmod, pob o, pmt m) { p_hit(m,Player.dmg+dmgmod,NORMAL_DAMAGE); }
void weapon_normal_hit(int dmgmod, Object* o, Monster* m) { p_hit(m,Player.dmg+dmgmod,NORMAL_DAMAGE); }