polyself weapon drop feedback
Don't say "you must drop your weapon" when it doesn't actually get dropped. And make "weapon" be more specific, comparable to the handing for slippery fingers.
This commit is contained in:
+19
-4
@@ -722,6 +722,8 @@ drop_weapon(alone)
|
|||||||
int alone;
|
int alone;
|
||||||
{
|
{
|
||||||
struct obj *otmp;
|
struct obj *otmp;
|
||||||
|
const char *what, *which, *whichtoo;
|
||||||
|
boolean candropwep, candropswapwep;
|
||||||
|
|
||||||
if (uwep) {
|
if (uwep) {
|
||||||
/* !alone check below is currently superfluous but in the
|
/* !alone check below is currently superfluous but in the
|
||||||
@@ -729,16 +731,29 @@ int alone;
|
|||||||
* wear gloves but can wield weapons
|
* wear gloves but can wield weapons
|
||||||
*/
|
*/
|
||||||
if (!alone || cantwield(youmonst.data)) {
|
if (!alone || cantwield(youmonst.data)) {
|
||||||
if (alone) You("find you must drop your weapon%s!",
|
candropwep = canletgo(uwep, "");
|
||||||
u.twoweap ? "s" : "");
|
candropswapwep = !u.twoweap || canletgo(uswapwep, "");
|
||||||
|
if (alone) {
|
||||||
|
what = (candropwep && candropswapwep) ? "drop" : "release";
|
||||||
|
which = is_sword(uwep) ? "sword" : weapon_descr(uwep);
|
||||||
|
if (u.twoweap) {
|
||||||
|
whichtoo = is_sword(uswapwep) ? "sword" :
|
||||||
|
weapon_descr(uswapwep);
|
||||||
|
if (strcmp(which, whichtoo)) which = "weapon";
|
||||||
|
}
|
||||||
|
if (uwep->quan != 1L || u.twoweap) which = makeplural(which);
|
||||||
|
|
||||||
|
You("find you must %s %s %s!", what,
|
||||||
|
the_your[!!strncmp(which, "corpse", 6)], which);
|
||||||
|
}
|
||||||
if (u.twoweap) {
|
if (u.twoweap) {
|
||||||
otmp = uswapwep;
|
otmp = uswapwep;
|
||||||
uswapwepgone();
|
uswapwepgone();
|
||||||
if (canletgo(otmp, "")) dropx(otmp);
|
if (candropswapwep) dropx(otmp);
|
||||||
}
|
}
|
||||||
otmp = uwep;
|
otmp = uwep;
|
||||||
uwepgone();
|
uwepgone();
|
||||||
if (canletgo(otmp, "")) dropx(otmp);
|
if (candropwep) dropx(otmp);
|
||||||
update_inventory();
|
update_inventory();
|
||||||
} else if (!could_twoweap(youmonst.data)) {
|
} else if (!could_twoweap(youmonst.data)) {
|
||||||
untwoweapon();
|
untwoweapon();
|
||||||
|
|||||||
+4
-2
@@ -102,7 +102,8 @@ static NEARDATA const char kebabable[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* weapon's skill category name for use as generalized description of weapon */
|
/* weapon's skill category name for use as generalized description of weapon */
|
||||||
const char *weapon_descr(obj)
|
const char *
|
||||||
|
weapon_descr(obj)
|
||||||
struct obj *obj;
|
struct obj *obj;
|
||||||
{
|
{
|
||||||
int skill = weapon_type(obj);
|
int skill = weapon_type(obj);
|
||||||
@@ -112,7 +113,8 @@ struct obj *obj;
|
|||||||
switch (skill) {
|
switch (skill) {
|
||||||
case P_NONE:
|
case P_NONE:
|
||||||
/* not a weapon: use item class name; override "food" for corpses */
|
/* not a weapon: use item class name; override "food" for corpses */
|
||||||
descr = (obj->otyp == CORPSE) ? "corpse" :
|
descr = (obj->otyp == CORPSE || obj->otyp == TIN || obj->otyp == EGG) ?
|
||||||
|
OBJ_NAME(objects[obj->otyp]) :
|
||||||
def_oc_syms[(int)obj->oclass].name;
|
def_oc_syms[(int)obj->oclass].name;
|
||||||
break;
|
break;
|
||||||
case P_SLING:
|
case P_SLING:
|
||||||
|
|||||||
Reference in New Issue
Block a user