# Attack types and self inflicting attacks

**URL:** <https://discourse.cataclysmdda.org/t/attack-types-and-self-inflicting-attacks/19226>\
**Category:** The Drawing Board\
**Created:** [March 14, 2019, 11:48pm UTC](https://discourse.cataclysmdda.org/t/attack-types-and-self-inflicting-attacks/19226 "2019-03-14T23:48:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moss\_Jones](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/moss_jones/32/4905_2.png) [@Moss\_Jones](https://discourse.cataclysmdda.org/u/Moss_Jones)\
**Post date:** [March 14, 2019, 11:48pm UTC](https://discourse.cataclysmdda.org/t/attack-types-and-self-inflicting-attacks/19226/1 "2019-03-14T23:48:18Z")

</div>

I was curious to see if anyone knew all the “attack\_type” 's for monster\_attacks.

Are they hardcoded and is it possible for monsters to use an attack on themselves, as well as the effects it would cause if used on the player?

I’m trying to test out new things as far as enemy AI and attacks but the information I’ve seen so far is limited, outdated or for the basic attacks(stab, bash & cut).

Can monsters give themselves and allies buff/de-buffs?

---

<div class="post-metadata">

**Author:** ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)\
**Post date:** [March 15, 2019, 12:09am UTC](https://discourse.cataclysmdda.org/t/attack-types-and-self-inflicting-attacks/19226/2 "2019-03-15T00:09:22Z")

</div>

As far as I can tell, attack\_type is obsolete and “special\_attacks” is used instead. “special\_attacks” can be defined in JSON but there are also hard-coded special attacks.

Monsters can give themselves or each other buffs. A notorious example is the zombie master, who can upgrade other zombies.

---

<div class="post-metadata">

**Author:** ![Moss\_Jones](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/moss_jones/32/4905_2.png) [@Moss\_Jones](https://discourse.cataclysmdda.org/u/Moss_Jones)\
**Post date:** [March 15, 2019, 12:25am UTC](https://discourse.cataclysmdda.org/t/attack-types-and-self-inflicting-attacks/19226/3 "2019-03-15T00:25:13Z")

</div>

Awesome! I have high hopes for this now.

I found the zombie master in the monsters.json and i see the “[[ “UPGRADE”, 10] ],” you were referring to, going to try to find the actual Upgrade effect and see if I can take a peek at it.

Also is this line of code for attack\_type the one you were referring to as obsolete?

 ![Screenshot_1](https://us1.discourse-cdn.com/flex016/uploads/cataclysmdda/original/2X/3/3b956ddb075c6ea2aef91cf6fd18ff6abcdca363.png)  
I whipped up a basic attack for a monster to test and assumed this was the way to do it.

Either way hearing monsters can give each others buff/de-buff is very good news. Going to keep digging in the files and see what I can learn.

---

<div class="post-metadata">

**Author:** ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)\
**Post date:** [March 15, 2019, 2:08am UTC](https://discourse.cataclysmdda.org/t/attack-types-and-self-inflicting-attacks/19226/5 "2019-03-15T02:08:05Z")

</div>

Aha! That’s in monster\_attacks.json, which is the JSON implementation of monster special attacks. Okay, now I get it. You’re right, it’s not obsolete, just underused.

attack\_type can be one of leap, melee, bite, gun (as far as I can tell). special attacks can also reference one of the hardcoded attacks listed in src/monstergenerator.cpp starting around line 340.

basic attacks can just a melee skill and damage dice number and size. You only need to implement a `monster_attack` for attacks that do something other than bash or cut damage.

---

<div class="post-metadata">

**Author:** ![Moss\_Jones](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/moss_jones/32/4905_2.png) [@Moss\_Jones](https://discourse.cataclysmdda.org/u/Moss_Jones)\
**Post date:** [March 15, 2019, 2:30am UTC](https://discourse.cataclysmdda.org/t/attack-types-and-self-inflicting-attacks/19226/6 "2019-03-15T02:30:20Z")

</div>

> attack\_type can be one of leap, melee, bite, gun (as far as I can tell).

yep i tested them all and gun works aswell.

> special attacks can also reference one of the hardcoded attacks listed in src/monstergenerator.cpp starting around line 340.

Nice nice! I didn’t even know you could reference hardcoded attacks! I’m actually excited now. 😃

> basic attacks can just a melee skill and damage dice number and size. You only need to implement a `monster_attack` for attacks that do something other than bash or cut damage.

Got it! Back to work I go!
