Cataclysm-dda: Throwing at clothing

Created on 21 May 2013  Â·  16Comments  Â·  Source: CleverRaven/Cataclysm-DDA

Right now if you throw something at a container with clothing stored in it (for example a dresser) then all of the clothing within the container automatically takes 1 level of damage(i.e. normal clothing becomes "ripped", ripped becomes torn, and so on until "tattered" items are destroyed).

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

(S2 - Confirmed) <Bug>

Most helpful comment

Has anyone made progress on this?

If not, I can try to fix it.

All 16 comments

This seems to be because game::throw_item calls map::shoot on the target tile, which damages items. It might make sense to just stop destroying items on shot tiles.

It sounds like the damage scaling is the real problem here, in principle
throwing damaging items at other items will have the observed effect, it's
just that thrown items cause an unexpected amount of damage.
On Jun 5, 2013 6:25 AM, "fergus-dall" [email protected] wrote:

This seems to be because game::throw_item calls map::shoot on the target
tile, which damages items. It might make sense to just stop destroying
items on shot tiles.

—
Reply to this email directly or view it on GitHubhttps://github.com/CleverRaven/Cataclysm-DDA/issues/1120#issuecomment-18969660
.

Is this still an issue? I've throw five two-by-fours, a rock, a butcher knife and a throwing ax at my briefs and they are undamaged.

Pretty sure thrown items still can't damage items on the ground.

Due to changes in code, it may be way easier to rewrite throwing to use the same mechanics as shooting, but this hasn't been done yet.

Steps to recreate:

  • Build a dresser
  • Fill with clothes
  • Throw throwing a throwing ax at the dresser

Confirmed that item damage is still at 1 full level.

Considering that this is not a bug can we apply the "Suggestion (Discuss)" or "Balance" label as appropriate?

I'd say the dresser would take damage, not the clothes, until said dresser reaches a certain HP amount.

DaveK +1

Yeah, the bug here is the fact that I can throw a pebble at a dresser filled with 200 shirts, and suddenly all 200 of the shirts have taken a full level of damage (yet the dresser is unharmed).

I am working on a PR for this that will smash any furniture on the hit tile instead of iterating through the items there and damaging them.

I am having trouble coming up with the amount of damage to apply to the smash. If I use the real throw damage (weight-based) I get unrealistic behavior, like throwing axes never breaking anything. If I use the smash calculation (str * bashdmg) then it's a ranged smash which seems a bit unbalanced.

Thoughts?

try the ranged smash with a decrement from the amount of tiles it is being thrown over.

You could rewrite player::throw to use Creature::projectile_attack - it uses map:shoot at the end.

Throwing stuff at furniture shouldn't be too effective. A thrown axe could go through a closed window, but not through a metal locker.
Melee bashing is bash damage + str and ranged certainly shouldn't get above this.

if a throwing axe were thrown at a standard, fairly durable dresser, it would do pretty minor damage if it didn't hit blade-first. perhaps a chance to apply cutting damage based on throwing skill? (same for enemies, really) I have no Idea about furniture / terrain damage granularity though.

good point, at the very least this calculation should be in throw in general, if not already. you'd have to throw something fairly heavy in order to damage something.

Re-tested in 0.C-19186-g23a9665 (tiles)
The throwables<->furniture interaction is very inconsistent...

  • Throwing weapons at a dresser, display rack, bed, oven, trashcan, bench or open crate (other not tested) that contain items, damages items, but not the furniture itself...
  • Trowing weapons at lockers and bookshelves destroys furniture, but does no damage to the items...
  • Throwing weapons at a table does no damage to either items or furniture...
  • Throwing weapons into piles of items on the ground does no damage to the items...

Only weapons that do cutting damage do any damage to furniture or items as described in this comment... Throwing rocks and baseball bats does nothing...

Has anyone made progress on this?

If not, I can try to fix it.

@NewbProgrammer101, you are welcome to try.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ituluwituluwzev picture ituluwituluwzev  Â·  3Comments

natsirt721 picture natsirt721  Â·  3Comments

jeremyshannon picture jeremyshannon  Â·  3Comments

Tsunder picture Tsunder  Â·  3Comments

Coolthulhu picture Coolthulhu  Â·  3Comments