Skip to content

Commit

Permalink
Robots are immune to cold, not "cold blooded" creatures (#38529)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fris0uman authored Mar 4, 2020
1 parent e74e70c commit e055a46
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 21 deletions.
36 changes: 29 additions & 7 deletions data/json/monsters/defense_bot.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"special_attacks": [ [ "COPBOT", 3 ] ],
"death_drops": { "groups": [ [ "robots", 4 ], [ "copbot", 1 ] ] },
"death_function": [ "BROKEN" ],
"flags": [ "SEES", "HEARS", "BASHES", "ELECTRONIC", "NO_BREATHE", "PRIORITIZE_TARGETS", "PATH_AVOID_DANGER_1" ]
"flags": [ "SEES", "HEARS", "BASHES", "ELECTRONIC", "COLDPROOF", "NO_BREATHE", "PRIORITIZE_TARGETS", "PATH_AVOID_DANGER_1" ]
},
{
"id": "mon_riotbot",
Expand Down Expand Up @@ -59,7 +59,7 @@
"special_when_hit": [ "ZAPBACK", 100 ],
"death_drops": { "groups": [ [ "robots", 4 ], [ "copbot", 1 ] ] },
"death_function": [ "BROKEN" ],
"flags": [ "SEES", "HEARS", "GOODHEARING", "ELECTRONIC", "NO_BREATHE", "PRIORITIZE_TARGETS", "PATH_AVOID_DANGER_1" ]
"flags": [ "SEES", "HEARS", "GOODHEARING", "ELECTRONIC", "COLDPROOF", "NO_BREATHE", "PRIORITIZE_TARGETS", "PATH_AVOID_DANGER_1" ]
},
{
"id": "mon_secubot",
Expand Down Expand Up @@ -105,7 +105,7 @@
],
"death_drops": { },
"death_function": [ "BROKEN" ],
"flags": [ "SEES", "HEARS", "ELECTRONIC", "NO_BREATHE", "PATH_AVOID_DANGER_1", "LOUDMOVES", "DROPS_AMMO" ]
"flags": [ "SEES", "HEARS", "ELECTRONIC", "COLDPROOF", "NO_BREATHE", "PATH_AVOID_DANGER_1", "LOUDMOVES", "DROPS_AMMO" ]
},
{
"id": "mon_talon_m202a1",
Expand Down Expand Up @@ -151,7 +151,7 @@
],
"death_drops": { },
"death_function": [ "BROKEN" ],
"flags": [ "SEES", "HEARS", "ELECTRONIC", "NO_BREATHE", "PATH_AVOID_DANGER_1", "LOUDMOVES", "DROPS_AMMO" ]
"flags": [ "SEES", "HEARS", "ELECTRONIC", "COLDPROOF", "NO_BREATHE", "PATH_AVOID_DANGER_1", "LOUDMOVES", "DROPS_AMMO" ]
},
{
"id": "mon_skitterbot",
Expand Down Expand Up @@ -179,7 +179,7 @@
"special_attacks": [ [ "TAZER", 5 ] ],
"death_drops": { "groups": [ [ "robots", 4 ], [ "skitterbot", 1 ] ] },
"death_function": [ "BROKEN" ],
"flags": [ "SEES", "HEARS", "GOODHEARING", "ELECTRONIC", "NO_BREATHE", "PATH_AVOID_DANGER_1" ]
"flags": [ "SEES", "HEARS", "GOODHEARING", "ELECTRONIC", "COLDPROOF", "NO_BREATHE", "PATH_AVOID_DANGER_1" ]
},
{
"id": "mon_science_bot",
Expand Down Expand Up @@ -219,6 +219,7 @@
"BASHES",
"GOODHEARING",
"ELECTRONIC",
"COLDPROOF",
"NO_BREATHE",
"PRIORITIZE_TARGETS",
"PATH_AVOID_DANGER_2",
Expand Down Expand Up @@ -256,6 +257,7 @@
"SEES",
"HEARS",
"ELECTRONIC",
"COLDPROOF",
"BASHES",
"GOODHEARING",
"NO_BREATHE",
Expand Down Expand Up @@ -295,7 +297,17 @@
"special_attacks": [ [ "GRENADIER", 10 ] ],
"death_drops": { "groups": [ [ "robots", 1 ] ] },
"death_function": [ "BROKEN" ],
"flags": [ "SEES", "HEARS", "ELECTRONIC", "NO_BREATHE", "PRIORITIZE_TARGETS", "PATH_AVOID_DANGER_2", "LOUDMOVES", "DROPS_AMMO" ]
"flags": [
"SEES",
"HEARS",
"ELECTRONIC",
"COLDPROOF",
"NO_BREATHE",
"PRIORITIZE_TARGETS",
"PATH_AVOID_DANGER_2",
"LOUDMOVES",
"DROPS_AMMO"
]
},
{
"id": "mon_dispatch_military",
Expand Down Expand Up @@ -328,6 +340,16 @@
"special_attacks": [ [ "GRENADIER_ELITE", 10 ] ],
"death_drops": { "groups": [ [ "robots", 1 ] ] },
"death_function": [ "BROKEN" ],
"flags": [ "SEES", "HEARS", "ELECTRONIC", "NO_BREATHE", "PRIORITIZE_TARGETS", "PATH_AVOID_DANGER_2", "LOUDMOVES", "DROPS_AMMO" ]
"flags": [
"SEES",
"HEARS",
"ELECTRONIC",
"COLDPROOF",
"NO_BREATHE",
"PRIORITIZE_TARGETS",
"PATH_AVOID_DANGER_2",
"LOUDMOVES",
"DROPS_AMMO"
]
}
]
14 changes: 7 additions & 7 deletions data/json/monsters/turrets.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"special_when_hit": [ "RETURN_FIRE", 100 ],
"death_drops": { },
"death_function": [ "BROKEN" ],
"flags": [ "SEES", "NOHEAD", "ELECTRONIC", "IMMOBILE", "NO_BREATHE", "DROPS_AMMO" ]
"flags": [ "SEES", "NOHEAD", "ELECTRONIC", "COLDPROOF", "IMMOBILE", "NO_BREATHE", "DROPS_AMMO" ]
},
{
"id": "mon_turret_searchlight",
Expand All @@ -71,7 +71,7 @@
"special_attacks": [ [ "SEARCHLIGHT", 1 ] ],
"death_drops": { "groups": [ [ "robots", 1 ], [ "turret_searchlight", 1 ] ] },
"death_function": [ "FOCUSEDBEAM" ],
"flags": [ "SEES", "NOHEAD", "ELECTRONIC", "IMMOBILE", "NO_BREATHE", "PRIORITIZE_TARGETS" ]
"flags": [ "SEES", "NOHEAD", "ELECTRONIC", "COLDPROOF", "IMMOBILE", "NO_BREATHE", "PRIORITIZE_TARGETS" ]
},
{
"id": "mon_laserturret",
Expand Down Expand Up @@ -107,7 +107,7 @@
"special_when_hit": [ "RETURN_FIRE", 100 ],
"death_drops": { },
"death_function": [ "BROKEN" ],
"flags": [ "SEES", "NOHEAD", "ELECTRONIC", "IMMOBILE", "NO_BREATHE" ]
"flags": [ "SEES", "NOHEAD", "ELECTRONIC", "COLDPROOF", "IMMOBILE", "NO_BREATHE" ]
},
{
"id": "mon_turret_bmg",
Expand Down Expand Up @@ -155,7 +155,7 @@
"special_when_hit": [ "RETURN_FIRE", 100 ],
"death_drops": { },
"death_function": [ "BROKEN" ],
"flags": [ "SEES", "NOHEAD", "ELECTRONIC", "IMMOBILE", "NO_BREATHE", "DROPS_AMMO" ]
"flags": [ "SEES", "NOHEAD", "ELECTRONIC", "COLDPROOF", "IMMOBILE", "NO_BREATHE", "DROPS_AMMO" ]
},
{
"id": "mon_turret_rifle",
Expand Down Expand Up @@ -203,7 +203,7 @@
"special_when_hit": [ "RETURN_FIRE", 100 ],
"death_drops": { },
"death_function": [ "BROKEN" ],
"flags": [ "SEES", "NOHEAD", "ELECTRONIC", "IMMOBILE", "NO_BREATHE", "DROPS_AMMO" ]
"flags": [ "SEES", "NOHEAD", "ELECTRONIC", "COLDPROOF", "IMMOBILE", "NO_BREATHE", "DROPS_AMMO" ]
},
{
"id": "mon_crows_m240",
Expand Down Expand Up @@ -251,7 +251,7 @@
"special_when_hit": [ "RETURN_FIRE", 100 ],
"death_drops": { },
"death_function": [ "BROKEN" ],
"flags": [ "SEES", "NOHEAD", "ELECTRONIC", "IMMOBILE", "NO_BREATHE", "DROPS_AMMO" ]
"flags": [ "SEES", "NOHEAD", "ELECTRONIC", "COLDPROOF", "IMMOBILE", "NO_BREATHE", "DROPS_AMMO" ]
},
{
"id": "mon_turret_riot",
Expand Down Expand Up @@ -301,6 +301,6 @@
],
"death_drops": { },
"death_function": [ "BROKEN" ],
"flags": [ "SEES", "NOHEAD", "ELECTRONIC", "IMMOBILE", "NO_BREATHE", "DROPS_AMMO" ]
"flags": [ "SEES", "NOHEAD", "ELECTRONIC", "COLDPROOF", "IMMOBILE", "NO_BREATHE", "DROPS_AMMO" ]
}
]
24 changes: 18 additions & 6 deletions data/json/monsters/utility_bot.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"special_attacks": [ [ "PHOTOGRAPH", 30 ] ],
"death_drops": { "groups": [ [ "robots", 4 ], [ "eyebot", 1 ] ] },
"death_function": [ "BROKEN" ],
"flags": [ "SEES", "FLIES", "ELECTRONIC", "NO_BREATHE", "NOHEAD", "PRIORITIZE_TARGETS" ]
"flags": [ "SEES", "FLIES", "ELECTRONIC", "COLDPROOF", "NO_BREATHE", "NOHEAD", "PRIORITIZE_TARGETS" ]
},
{
"id": "mon_grocerybot",
Expand Down Expand Up @@ -51,6 +51,7 @@
"flags": [
"SEES",
"ELECTRONIC",
"COLDPROOF",
"NO_BREATHE",
"FIREPROOF",
"PUSH_MON",
Expand Down Expand Up @@ -84,7 +85,7 @@
"special_attacks": [ [ "PAID_BOT", 1 ] ],
"death_drops": { "groups": [ [ "robots", 4 ] ] },
"death_function": [ "BROKEN" ],
"flags": [ "SEES", "ELECTRONIC", "NO_BREATHE", "FIREPROOF", "PUSH_MON", "HEARS", "PACIFIST", "PAY_BOT" ]
"flags": [ "SEES", "ELECTRONIC", "COLDPROOF", "NO_BREATHE", "FIREPROOF", "PUSH_MON", "HEARS", "PACIFIST", "PAY_BOT" ]
},
{
"id": "mon_hazmatbot",
Expand All @@ -108,7 +109,7 @@
"vision_day": 50,
"revert_to_itype": "bot_hazmatbot",
"death_function": [ "EXPLODE" ],
"flags": [ "SEES", "HEARS", "BASHES", "ELECTRONIC", "NO_BREATHE", "PRIORITIZE_TARGETS", "PATH_AVOID_DANGER_1" ]
"flags": [ "SEES", "HEARS", "BASHES", "ELECTRONIC", "COLDPROOF", "NO_BREATHE", "PRIORITIZE_TARGETS", "PATH_AVOID_DANGER_1" ]
},
{
"id": "mon_molebot",
Expand All @@ -135,7 +136,7 @@
"revert_to_itype": "bot_molebot",
"death_drops": { "groups": [ [ "robots", 4 ], [ "molebot", 1 ] ] },
"death_function": [ "BROKEN" ],
"flags": [ "HEARS", "GOODHEARING", "DIGS", "NO_BREATHE", "ELECTRONIC", "PATH_AVOID_DANGER_1" ]
"flags": [ "HEARS", "GOODHEARING", "DIGS", "NO_BREATHE", "ELECTRONIC", "COLDPROOF", "PATH_AVOID_DANGER_1" ]
},
{
"//": "nurse_bot and nurse_bot_defective look very similar, part of the trick is figuring out which one is the good one. So the sprites should probably look pretty similar to not give it away immediately",
Expand Down Expand Up @@ -164,7 +165,7 @@
"special_attacks": [ [ "ASSIST", 30 ], [ "CHECK_UP", 120 ] ],
"death_drops": { "groups": [ [ "robots", 4 ] ] },
"death_function": [ "BROKEN" ],
"flags": [ "SEES", "ELECTRONIC", "NO_BREATHE", "FIREPROOF", "PUSH_MON", "HEARS", "PACIFIST" ]
"flags": [ "SEES", "ELECTRONIC", "COLDPROOF", "NO_BREATHE", "FIREPROOF", "PUSH_MON", "HEARS", "PACIFIST" ]
},
{
"//": "nurse_bot and nurse_bot_defective look very similar, part of the trick is figuring out which one is the good one. So the sprites should probably look pretty similar to not give it away immediatly",
Expand Down Expand Up @@ -196,6 +197,17 @@
"special_attacks": [ [ "OPERATE", 30 ], [ "PARROT", 20 ] ],
"death_drops": { "groups": [ [ "robots", 4 ] ] },
"death_function": [ "BROKEN" ],
"flags": [ "SEES", "ELECTRONIC", "NO_BREATHE", "FIREPROOF", "PUSH_MON", "HEARS", "PACIFIST", "GRABS", "INTERIOR_AMMO" ]
"flags": [
"SEES",
"ELECTRONIC",
"COLDPROOF",
"NO_BREATHE",
"FIREPROOF",
"PUSH_MON",
"HEARS",
"PACIFIST",
"GRABS",
"INTERIOR_AMMO"
]
}
]
1 change: 1 addition & 0 deletions doc/JSON_FLAGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,7 @@ Multiple death functions can be used. Not all combinations make sense.
- ```CBM_TECH``` May produce a CBM or two from 'bionics_tech' item group and a power CBM when butchered.
- ```CHITIN``` May produce chitin when butchered.
- ```CLIMBS``` Can climb.
- ```COLDROOF``` Immune to cold damage.
- ```CURRENT``` this water is flowing.
- ```DESTROYS``` Bashes down walls and more. (2.5x bash multiplier, where base is the critter's max melee bashing)
- ```DIGS``` Digs through the ground.
Expand Down
2 changes: 1 addition & 1 deletion src/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@ void monster::deal_damage_handle_type( const damage_unit &du, body_part bp, int
}
break;
case DT_COLD:
if( !has_flag( MF_WARM ) ) {
if( has_flag( MF_COLDPROOF ) ) {
return; // immunity
}
break;
Expand Down
1 change: 1 addition & 0 deletions src/monstergenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ std::string enum_to_string<m_flag>( m_flag data )
case MF_FIREPROOF: return "FIREPROOF";
case MF_SLUDGEPROOF: return "SLUDGEPROOF";
case MF_SLUDGETRAIL: return "SLUDGETRAIL";
case MF_COLDPROOF: return "COLDPROOF";
case MF_FIREY: return "FIREY";
case MF_QUEEN: return "QUEEN";
case MF_ELECTRONIC: return "ELECTRONIC";
Expand Down
1 change: 1 addition & 0 deletions src/mtype.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ enum m_flag : int {
MF_FIREPROOF, // Immune to fire
MF_SLUDGEPROOF, // Ignores the effect of sludge trails
MF_SLUDGETRAIL, // Causes monster to leave a sludge trap trail when moving
MF_COLDPROOF, // Immune to cold damage
MF_FIREY, // Burns stuff and is immune to fire
MF_QUEEN, // When it dies, local populations start to die off too
MF_ELECTRONIC, // e.g. a robot; affected by EMP blasts, and other stuff
Expand Down

0 comments on commit e055a46

Please sign in to comment.