Skip to content

Commit

Permalink
Clang, Mod mobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Venera3 committed Aug 2, 2022
1 parent 569f3dc commit f3a3228
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 2 additions & 0 deletions data/mods/Aftershock/mobs/PrepPhyle_mobs.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"speed": 100,
"aggression": 0,
"morale": 10,
"aggro_character": false,
"melee_dice": 1,
"melee_dice_sides": 2,
"melee_damage": [ { "damage_type": "cut", "amount": 7 } ],
Expand Down Expand Up @@ -49,6 +50,7 @@
"color": "light_gray",
"aggression": -12,
"morale": 5,
"aggro_character": false,
"melee_skill": 2,
"melee_dice": 1,
"melee_dice_sides": 1,
Expand Down
1 change: 1 addition & 0 deletions data/mods/Aftershock/mobs/robots.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
"color": "white",
"aggression": 0,
"morale": 100,
"aggro_character": false,
"melee_skill": 10,
"melee_dice": 3,
"melee_dice_sides": 12,
Expand Down
13 changes: 9 additions & 4 deletions data/mods/Magiclysm/monsters/forgedwellers.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"color": "dark_gray",
"aggression": 0,
"morale": 100,
"aggro_character": false,
"melee_skill": 6,
"melee_dice": 3,
"melee_dice_sides": 10,
Expand All @@ -30,7 +31,7 @@
"vision_night": 40,
"path_settings": { "avoid_traps": true, "avoid_sharp": true },
"special_attacks": [ { "type": "spell", "spell_data": { "id": "manatouched_seeker_bolts", "min_level": 5 }, "cooldown": 60 } ],
"anger_triggers": [ "FRIEND_ATTACKED", "HURT" ],
"anger_triggers": [ "FRIEND_ATTACKED", "FRIEND_DIED", "HURT" ],
"death_function": { "corpse_type": "BROKEN" },
"flags": [ "SEES", "NO_BREATHE", "PATH_AVOID_DANGER_1", "LOUDMOVES" ]
},
Expand All @@ -41,6 +42,7 @@
"name": { "str": "goblin forgemaster" },
"default_faction": "wonder_forge",
"aggression": 0,
"aggro_character": false,
"armor_fire": 40,
"anger_triggers": [ "FRIEND_ATTACKED", "HURT" ],
"description": "A goblin like none you've ever seen before. He directs workers and automatons with confidence and style.",
Expand All @@ -54,8 +56,9 @@
"copy-from": "mon_lizardfolk_shaman",
"default_faction": "wonder_forge",
"aggression": 0,
"aggro_character": false,
"armor_fire": 40,
"anger_triggers": [ "FRIEND_ATTACKED", "HURT" ],
"anger_triggers": [ "FRIEND_ATTACKED", "FRIEND_DIED", "HURT" ],
"special_attacks": [ { "type": "spell", "spell_data": { "id": "laze" }, "cooldown": 10 }, [ "scratch", 5 ] ],
"death_drops": { "subtype": "collection", "groups": [ [ "forge_life", 40 ], [ "bedroom", 1 ], [ "dresser", 5 ], [ "ammo", 18 ] ] }
},
Expand All @@ -66,9 +69,10 @@
"description": "This is some form of eldritch monstrosity; an uncouth black being with smooth, oily, skin and unpleasant horns that curve inward toward each other. Tall and thin, the shadows cling unnaturally to its vaguely defined humanoid form as it shuffles along, its hands twitching and spasming so rapidly as to appear a little more than a black blur of claws. This one politely asks you to mind your step as this is a working environment.",
"default_faction": "wonder_forge",
"copy-from": "mon_gracke",
"aggro_character": false,
"special_attacks": [ { "type": "spell", "spell_data": { "id": "eshaper_shardspray", "min_level": 5 }, "cooldown": 10 } ],
"armor_fire": 40,
"anger_triggers": [ "FRIEND_ATTACKED", "HURT" ],
"anger_triggers": [ "FRIEND_ATTACKED", "FRIEND_DIED", "HURT" ],
"death_drops": { "subtype": "collection", "groups": [ [ "forge_life", 40 ], [ "bedroom", 1 ], [ "dresser", 5 ], [ "ammo", 18 ] ] }
},
{
Expand Down Expand Up @@ -161,6 +165,7 @@
"color": "light_red",
"aggression": 3,
"morale": 40,
"aggro_character": false,
"melee_skill": 5,
"melee_dice": 2,
"melee_dice_sides": 5,
Expand All @@ -171,7 +176,7 @@
"armor_bullet": 26,
"armor_fire": 35,
"harvest": "demihuman",
"anger_triggers": [ "FRIEND_ATTACKED", "HURT" ],
"anger_triggers": [ "FRIEND_ATTACKED", "FRIEND_DIED", "HURT" ],
"path_settings": { "avoid_traps": true, "avoid_sharp": true },
"death_drops": { "subtype": "collection", "groups": [ [ "forge_life", 40 ], [ "bedroom", 1 ], [ "dresser", 5 ], [ "ammo", 18 ] ] },
"flags": [ "SEES", "HEARS", "WARM", "BASHES", "GROUP_BASH", "HUMAN", "PATH_AVOID_DANGER_1" ]
Expand Down
2 changes: 1 addition & 1 deletion src/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1911,7 +1911,7 @@ void monster::apply_damage( Creature *source, bodypart_id /*bp*/, int dam,
} else if( dam > 0 ) {
process_trigger( mon_trigger::HURT, 1 + static_cast<int>( dam / 3 ) );
// Get angry at characters if hurt by one
if( !aggro_character && !source->is_monster() ) {
if( source != nullptr && !aggro_character && !source->is_monster() ) {
aggro_character = true;
}
}
Expand Down

0 comments on commit f3a3228

Please sign in to comment.