# Random Bear Traps

**URL:** <https://discourse.cataclysmdda.org/t/random-bear-traps/2614>\
**Category:** The Garage\
**Created:** [August 8, 2013, 10:13am UTC](https://discourse.cataclysmdda.org/t/random-bear-traps/2614 "2013-08-08T10:13:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![SuicideRey](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/suiciderey/32/913_2.png) [@SuicideRey](https://discourse.cataclysmdda.org/u/SuicideRey)\
**Post date:** [August 8, 2013, 10:13am UTC](https://discourse.cataclysmdda.org/t/random-bear-traps/2614/1 "2013-08-08T10:13:37Z")

</div>

It was a usual day in cataclysm until I killed this one zdog…

The game froze so I decided to give it some time and this is what I come back to.

 ![](http://s020.radikal.ru/i716/1308/25/4f6f4684bded.png)  
  
Edited:  
Should I upload a save game?

---

<div class="post-metadata">

**Author:** ![Mrnocamera](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mrnocamera/32/61_2.png) [@Mrnocamera](https://discourse.cataclysmdda.org/u/Mrnocamera)\
**Post date:** [August 8, 2013, 10:16am UTC](https://discourse.cataclysmdda.org/t/random-bear-traps/2614/2 "2013-08-08T10:16:09Z")

</div>

Yes. If not for the people trying to help, for the people fucking around with traps.

---

<div class="post-metadata">

**Author:** ![SuicideRey](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/suiciderey/32/913_2.png) [@SuicideRey](https://discourse.cataclysmdda.org/u/SuicideRey)\
**Post date:** [August 8, 2013, 10:23am UTC](https://discourse.cataclysmdda.org/t/random-bear-traps/2614/3 "2013-08-08T10:23:07Z")

</div>

Ok I uploaded it here you go guys, hope it helps.

[http://snk.to/f-c7u86ffn](http://snk.to/f-c7u86ffn)

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [August 8, 2013, 4:13pm UTC](https://discourse.cataclysmdda.org/t/random-bear-traps/2614/4 "2013-08-08T16:13:45Z")

</div>

Wow that’s a fun one, spawned an unlimited number of bear traps…  
Had the dog run over a bear trap previously?

I’m asking because this could either be a random monster drop, or the mechanism where a bear trap attaches to a monster and then drops afterwards…

I’m guessing the second, because if it was a normal drop I’d expect to see tons of reports.

EDIT: There’s definitely an oddity with beartrap handling:

```auto
void trapfuncm::beartrap(game *g, monster *z, int x, int y)
{
...

 g->sound(x, y, 8, "SNAP!");
 if (z->hurt(35)) {
  g->kill_mon(g->mon_at(x, y));
  g->m.spawn_item(x, y, "beartrap", 0);
 } else {
  z->moves = 0;
  z->add_effect(ME_BEARTRAP, rng(8, 15));
 }
 g->m.tr_at(x, y) = tr_null;
 item beartrap(g->itypes["beartrap"], 0);
 z->add_item(beartrap);
}
```

At the very least, if the beartrap kills the monster it spawns one on the map, and sticks another one in the monster inventory, at the worst it does something really weird because after g-\>kill\_monster() z is undefined 0\_0

Ok, so it’s weird but harmless, the monster inventory gets dumped in kill\_mon(), and kill\_mon() doesn’t invalidate z…

Have to look into it later when I can get a debugger on it.

---

<div class="post-metadata">

**Author:** ![Tal](https://avatars.discourse-cdn.com/v4/letter/t/54ee81/32.png) [@Tal](https://discourse.cataclysmdda.org/u/Tal)\
**Post date:** [August 8, 2013, 5:24pm UTC](https://discourse.cataclysmdda.org/t/random-bear-traps/2614/5 "2013-08-08T17:24:02Z")

</div>

This makes me think of an infected dog with bear traps all over it, and when it runs up to you, the bear traps go off and attaches the dog to you. Doesn’t make a lot of sense how the traps actually got on the dogs without going off, but there you go… Maybe bear trap dogs will leap out of zombie scientists coats. Or perhaps when NPCs are more of a thing, you can “craft” a bear trap zombie dog to unleash on unsuspecting NPCs around your fort. lol

---

<div class="post-metadata">

**Author:** ![SuicideRey](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/suiciderey/32/913_2.png) [@SuicideRey](https://discourse.cataclysmdda.org/u/SuicideRey)\
**Post date:** [August 9, 2013, 4:32pm UTC](https://discourse.cataclysmdda.org/t/random-bear-traps/2614/6 "2013-08-09T16:32:06Z")

</div>

[quote=“Kevin Granade, post:4, topic:2614”]Wow that’s a fun one, spawned an unlimited number of bear traps…  
Had the dog run over a bear trap previously?

I’m asking because this could either be a random monster drop, or the mechanism where a bear trap attaches to a monster and then drops afterwards…

I’m guessing the second, because if it was a normal drop I’d expect to see tons of reports.

EDIT: There’s definitely an oddity with beartrap handling:

```auto
void trapfuncm::beartrap(game *g, monster *z, int x, int y)
{
...

 g->sound(x, y, 8, "SNAP!");
 if (z->hurt(35)) {
  g->kill_mon(g->mon_at(x, y));
  g->m.spawn_item(x, y, "beartrap", 0);
 } else {
  z->moves = 0;
  z->add_effect(ME_BEARTRAP, rng(8, 15));
 }
 g->m.tr_at(x, y) = tr_null;
 item beartrap(g->itypes["beartrap"], 0);
 z->add_item(beartrap);
}
```

At the very least, if the beartrap kills the monster it spawns one on the map, and sticks another one in the monster inventory, at the worst it does something really weird because after g-\>kill\_monster() z is undefined 0\_0

Ok, so it’s weird but harmless, the monster inventory gets dumped in kill\_mon(), and kill\_mon() doesn’t invalidate z…

Have to look into it later when I can get a debugger on it.[/quote]  
Yeah I thought it might have omething to do with what you described, mostly.

As I left the shelter I found some traps close by, got a bear trap and yeah I mostly use them to run away from dogs the dog died and then dropped one bear trap, the other couple of dogs in the save, just came out of town and haven’t been caught in bear traps I put, I think?X3
