Skip to content

Commit

Permalink
The souleater tech requires an edged non-missile weapon to work.
Browse files Browse the repository at this point in the history
  • Loading branch information
elunna committed Oct 16, 2023
1 parent fcfb348 commit edc1a6a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/tech.c
Original file line number Diff line number Diff line change
Expand Up @@ -3627,7 +3627,8 @@ tech_souleater()
struct monst *mtmp;
int tech_no = get_tech_no(T_SOULEATER);
int weapon_modifier, num = Upolyd ? (u.mhmax / 2) : (u.uhpmax / 2);

boolean isweapon, isedged;

if ((!Upolyd && u.uhp <= num) || (Upolyd && u.mh <= num)) {
You("don't have the strength to invoke Souleater! Requires at least %i HP!",
num + 1);
Expand All @@ -3637,6 +3638,13 @@ tech_souleater()
You("need a weapon to channel your dark energy into!");
return 0;
}
isweapon = (uwep->oclass == WEAPON_CLASS || is_weptool(uwep));
isedged = (is_pick(uwep) || (objects[uwep->otyp].oc_dir & (PIERCE | SLASH)));

if (is_missile(uwep) || (!isweapon && !isedged)) {
You("need a proper weapon to channel your dark energy into!");
return 0;
}
You("unleash a burst of dark energy!");

/* Works against anything in line of sight...except flan */
Expand Down

0 comments on commit edc1a6a

Please sign in to comment.