Skip to content

Commit

Permalink
Lightsabers cutting webs
Browse files Browse the repository at this point in the history
Activated lightsabers always succeed in cutting webs. Deactivated ones give
feedback that they can't cut webs specifically while deactivated. Also
fixed grammar when fighting a web wielding a stack of non-blade items.
  • Loading branch information
Ardub23 authored Aug 2, 2023
1 parent ca37229 commit c9ff0f9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/hack.c
Original file line number Diff line number Diff line change
Expand Up @@ -1775,12 +1775,17 @@ domove_core()
trap = t_at(x, y);
if (context.forcefight && trap && trap->ttyp == WEB
&& trap->tseen && uwep) {
if (uwep->oartifact == ART_STING) {
if (uwep->oartifact == ART_STING
|| (is_lightsaber(uwep) && uwep->lamplit)) {
/* guaranteed success */
pline("Sting cuts through the web!");
pline("%s cuts through the web!", Yname2(uwep));
}
else if (is_lightsaber(uwep)) { /* deactivated */
You_cant("cut a web with a deactivated %s!", simpleonames(uwep));
return;
}
else if (!is_blade(uwep)) {
You_cant("cut a web with a %s!", xname(uwep));
You_cant("cut a web with %s!", ansimpleoname(uwep));
return;
}
/* TODO: if failing to cut the web is going to be a thing, it should
Expand Down

0 comments on commit c9ff0f9

Please sign in to comment.