mirror of
https://codeberg.org/noisytoot/notnotdnethack.git
synced 2025-07-31 09:52:25 +01:00
- Remove atgeirs from is_tipped_spear macro
- Check for a free hand when changing spear tips - Don't dump the contents of a tipped spear when an inc drains it
This commit is contained in:
parent
96ff1e4cab
commit
058827206e
3 changed files with 19 additions and 13 deletions
|
@ -616,7 +616,7 @@ struct obj {
|
|||
objects[otmp->otyp].oc_skill == P_SPEAR)
|
||||
#define is_tipped_spear(otmp) (otmp->oclass == WEAPON_CLASS && \
|
||||
objects[otmp->otyp].oc_skill == P_SPEAR && \
|
||||
otmp->otyp != JAVELIN && otmp->otyp != ATLATL)
|
||||
otmp->otyp != JAVELIN && otmp->otyp != ATLATL && otmp->otyp != ATGEIR)
|
||||
#define has_any_spear_point(otmp) ((otmp) && is_tipped_spear(otmp) && (otmp)->cobj)
|
||||
#define has_spear_point(otmp,typ) (has_any_spear_point(otmp) && (otmp)->cobj->otyp == typ)
|
||||
#define is_farm(otmp) (otmp->oclass == WEAPON_CLASS && \
|
||||
|
|
26
src/eat.c
26
src/eat.c
|
@ -2867,18 +2867,20 @@ doeat() /* generic "eat" command funtion (see cmd.c) */
|
|||
}
|
||||
}
|
||||
}
|
||||
/*These cases destroy the object, rescue its contents*/
|
||||
while((obj2 = otmp->cobj)){
|
||||
obj_extract_self(obj2);
|
||||
/* Compartmentalize tip() */
|
||||
if(carried(otmp)){
|
||||
sellobj_state(SELL_DONTSELL);
|
||||
dropy(obj2);
|
||||
sellobj_state(SELL_NORMAL);
|
||||
}
|
||||
else {
|
||||
place_object(obj2, u.ux, u.uy);
|
||||
stackobj(obj2);
|
||||
if(!is_tipped_spear(otmp)){
|
||||
/*These cases destroy the object, rescue its contents*/
|
||||
while((obj2 = otmp->cobj)){
|
||||
obj_extract_self(obj2);
|
||||
/* Compartmentalize tip() */
|
||||
if(carried(otmp)){
|
||||
sellobj_state(SELL_DONTSELL);
|
||||
dropy(obj2);
|
||||
sellobj_state(SELL_NORMAL);
|
||||
}
|
||||
else {
|
||||
place_object(obj2, u.ux, u.uy);
|
||||
stackobj(obj2);
|
||||
}
|
||||
}
|
||||
}
|
||||
switch(otmp->oclass){
|
||||
|
|
|
@ -3143,6 +3143,10 @@ struct obj *obj;
|
|||
pline("The obsidian point is irremovable from your spear.");
|
||||
return MOVE_CANCELLED;
|
||||
}
|
||||
if (!freehand()) {
|
||||
You("have no free %s.", body_part(HAND));
|
||||
return MOVE_CANCELLED;
|
||||
}
|
||||
char spearlet;
|
||||
struct obj *otmp;
|
||||
boolean should_rewield = FALSE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue