Skip to content
9 changes: 9 additions & 0 deletions data/json/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,15 @@
"rating": "bad",
"permanent": true
},
{
"type": "effect_type",
"id": "wall_clinging",
"name": [ "Clinging" ],
"desc": [ "Clinging to a vertical surface." ],
"rating": "neutral",
"show_in_info": true,
"permanent": true
},
{
"type": "effect_type",
"id": "blind",
Expand Down
1 change: 1 addition & 0 deletions data/json/monstergroups/zombie_upgrades.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
"//": "crawling zombie upgrades",
"monsters": [
{ "monster": "mon_zombie_crawler_pupa", "freq": 500, "cost_multiplier": 2 },
{ "monster": "mon_zombie_crawler_clinger", "freq": 250, "cost_multiplier": 3 },
{ "monster": "mon_zombie_crawler_pupa_decoy", "freq": 500, "cost_multiplier": 2 }
]
},
Expand Down
3 changes: 2 additions & 1 deletion data/json/monsters/defense_bot.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
"special_attacks": [ [ "TAZER", 5 ] ],
"death_drops": { "groups": [ [ "robots", 4 ], [ "skitterbot", 1 ] ] },
"death_function": [ "BROKEN" ],
"flags": [ "SEES", "HEARS", "GOODHEARING", "ELECTRONIC", "COLDPROOF", "NO_BREATHE", "PATH_AVOID_DANGER_1", "BIOPROOF" ]
"flags": [ "SEES", "HEARS", "GOODHEARING", "ELECTRONIC", "COLDPROOF", "CLIMBS", "NO_BREATHE", "PATH_AVOID_DANGER_1", "BIOPROOF" ]
},
{
"id": "mon_science_bot",
Expand Down Expand Up @@ -280,6 +280,7 @@
"ELECTRONIC",
"COLDPROOF",
"ACIDPROOF",
"CLIMBS",
"NO_BREATHE",
"PRIORITIZE_TARGETS",
"PATH_AVOID_DANGER_2",
Expand Down
4 changes: 2 additions & 2 deletions data/json/monsters/fungus.json
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@
"harvest": "arachnid",
"special_attacks": [ [ "FUNGUS", 200 ] ],
"death_function": [ "NORMAL", "FUNGUS" ],
"flags": [ "SEES", "SMELLS", "POISON", "CLIMBS", "PATH_AVOID_FIRE", "PATH_AVOID_FALL" ]
"flags": [ "SEES", "SMELLS", "POISON", "CLIMBS", "CLIMBS_WALLS", "PATH_AVOID_FIRE" ]
},
{
"id": "mon_spider_fungus",
Expand Down Expand Up @@ -553,6 +553,6 @@
"harvest": "arachnid",
"special_attacks": [ [ "FUNGAL_TRAIL", 3 ] ],
"death_function": [ "NORMAL", "FUNGUS" ],
"flags": [ "SEES", "SMELLS", "VENOM", "WEBWALK", "CLIMBS", "PATH_AVOID_FIRE" ]
"flags": [ "SEES", "SMELLS", "VENOM", "WEBWALK", "CLIMBS", "CLIMBS_WALLS", "PATH_AVOID_FIRE" ]
}
]
45 changes: 28 additions & 17 deletions data/json/monsters/insect_spider.json
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,18 @@
"anger_triggers": [ "STALK", "PLAYER_WEAK", "PLAYER_CLOSE" ],
"death_function": [ "NORMAL" ],
"fungalize_into": "mon_spider_fungus",
"flags": [ "SEES", "SMELLS", "HEARS", "VENOM", "WEBWALK", "CLIMBS", "HARDTOSHOOT", "PUSH_MON", "PATH_AVOID_FIRE" ],
"flags": [
"SEES",
"SMELLS",
"HEARS",
"VENOM",
"WEBWALK",
"CLIMBS",
"CLIMBS_WALLS",
"HARDTOSHOOT",
"PUSH_MON",
"PATH_AVOID_FIRE"
],
"//": "No, they are not in fact the most venomous spider in the world."
},
{
Expand Down Expand Up @@ -803,7 +814,7 @@
"harvest": "arachnid",
"anger_triggers": [ "STALK", "PLAYER_WEAK", "PLAYER_CLOSE" ],
"death_function": [ "NORMAL" ],
"flags": [ "SEES", "SMELLS", "HEARS", "WEBWALK", "CLIMBS", "HARDTOSHOOT", "PATH_AVOID_FIRE" ]
"flags": [ "SEES", "SMELLS", "HEARS", "WEBWALK", "CLIMBS", "CLIMBS_WALLS", "HARDTOSHOOT", "PATH_AVOID_FIRE" ]
},
{
"id": "mon_spider_jumping_giant",
Expand Down Expand Up @@ -838,7 +849,7 @@
"anger_triggers": [ "PLAYER_CLOSE" ],
"death_function": [ "NORMAL" ],
"fungalize_into": "mon_spider_fungus",
"flags": [ "SEES", "SMELLS", "HEARS", "VENOM", "HIT_AND_RUN", "CLIMBS", "PATH_AVOID_DANGER_1" ]
"flags": [ "SEES", "SMELLS", "HEARS", "VENOM", "HIT_AND_RUN", "CLIMBS", "CLIMBS_WALLS", "PATH_AVOID_DANGER_1" ]
},
{
"id": "mon_spider_trapdoor_giant",
Expand Down Expand Up @@ -871,7 +882,7 @@
"harvest": "arachnid",
"death_function": [ "NORMAL" ],
"fungalize_into": "mon_spider_fungus",
"flags": [ "SEES", "SMELLS", "HEARS", "VENOM", "GRABS", "CAN_DIG", "WEBWALK", "CLIMBS", "PATH_AVOID_FIRE" ]
"flags": [ "SEES", "SMELLS", "HEARS", "VENOM", "GRABS", "CAN_DIG", "WEBWALK", "CLIMBS", "CLIMBS_WALLS", "PATH_AVOID_FIRE" ]
},
{
"id": "mon_spider_web",
Expand Down Expand Up @@ -905,7 +916,7 @@
"harvest": "arachnid",
"death_function": [ "NORMAL" ],
"fungalize_into": "mon_spider_fungus",
"flags": [ "SEES", "SMELLS", "HEARS", "VENOM", "WEBWALK", "CLIMBS", "PATH_AVOID_FIRE", "PATH_AVOID_FALL" ]
"flags": [ "SEES", "SMELLS", "HEARS", "VENOM", "WEBWALK", "CLIMBS", "CLIMBS_WALLS", "PATH_AVOID_FIRE" ]
},
{
"id": "mon_spider_web_s",
Expand Down Expand Up @@ -937,7 +948,7 @@
"vision_night": 5,
"harvest": "arachnid",
"death_function": [ "NORMAL" ],
"flags": [ "SEES", "SMELLS", "HEARS", "WEBWALK", "STUMBLES", "CLIMBS", "PATH_AVOID_FIRE" ]
"flags": [ "SEES", "SMELLS", "HEARS", "WEBWALK", "STUMBLES", "CLIMBS", "CLIMBS_WALLS", "PATH_AVOID_FIRE" ]
},
{
"id": "mon_spider_widow_giant",
Expand Down Expand Up @@ -972,7 +983,7 @@
"anger_triggers": [ "PLAYER_WEAK", "PLAYER_CLOSE" ],
"death_function": [ "NORMAL" ],
"fungalize_into": "mon_spider_fungus",
"flags": [ "SEES", "SMELLS", "HEARS", "BADVENOM", "WEBWALK", "CLIMBS", "PATH_AVOID_FIRE" ]
"flags": [ "SEES", "SMELLS", "HEARS", "BADVENOM", "WEBWALK", "CLIMBS", "CLIMBS_WALLS", "PATH_AVOID_FIRE" ]
},
{
"id": "mon_spider_widow_giant_s",
Expand Down Expand Up @@ -1006,7 +1017,7 @@
"harvest": "arachnid",
"anger_triggers": [ "PLAYER_WEAK", "PLAYER_CLOSE" ],
"death_function": [ "NORMAL" ],
"flags": [ "SEES", "SMELLS", "HEARS", "VENOM", "WEBWALK", "CLIMBS", "PATH_AVOID_FIRE" ]
"flags": [ "SEES", "SMELLS", "HEARS", "VENOM", "WEBWALK", "CLIMBS", "CLIMBS_WALLS", "PATH_AVOID_FIRE" ]
},
{
"id": "mon_spider_wolf_giant",
Expand Down Expand Up @@ -1041,7 +1052,7 @@
"anger_triggers": [ "STALK", "PLAYER_WEAK", "HURT", "PLAYER_CLOSE" ],
"death_function": [ "NORMAL" ],
"fungalize_into": "mon_spider_fungus",
"flags": [ "SEES", "SMELLS", "HEARS", "VENOM", "CLIMBS", "PATH_AVOID_FIRE", "PATH_AVOID_FALL" ]
"flags": [ "SEES", "SMELLS", "HEARS", "VENOM", "CLIMBS", "CLIMBS_WALLS", "PATH_AVOID_FIRE" ]
},
{
"id": "mon_wasp_larva",
Expand Down Expand Up @@ -1453,7 +1464,7 @@
"death_function": [ "NORMAL" ],
"fungalize_into": "mon_ant_fungus",
"special_attacks": [ [ "EAT_FOOD", 3600 ] ],
"flags": [ "SEES", "HEARS", "SMELLS", "CLIMBS", "PATH_AVOID_FIRE", "PATH_AVOID_FALL" ]
"flags": [ "SEES", "HEARS", "SMELLS", "CLIMBS", "CLIMBS_WALLS", "PATH_AVOID_FIRE" ]
},
{
"id": "mon_ant_acid",
Expand Down Expand Up @@ -1488,7 +1499,7 @@
"anger_triggers": [ "FRIEND_ATTACKED", "FRIEND_DIED", "HURT", "PLAYER_CLOSE" ],
"death_function": [ "ACID", "NORMAL" ],
"harvest": "arachnid_acid",
"flags": [ "ACIDPROOF", "CLIMBS", "HEARS", "POISON", "SEES", "SMELLS", "PATH_AVOID_FIRE", "PATH_AVOID_FALL" ]
"flags": [ "ACIDPROOF", "CLIMBS", "CLIMBS_WALLS", "HEARS", "POISON", "SEES", "SMELLS", "PATH_AVOID_FIRE" ]
},
{
"id": "mon_ant_acid_larva",
Expand All @@ -1514,7 +1525,7 @@
"upgrades": { "age_grow": 3, "into": "mon_ant_acid" },
"death_function": [ "ACID", "NORMAL" ],
"harvest": "arachnid_acid",
"flags": [ "ACIDPROOF", "LARVA", "POISON", "SMELLS" ]
"flags": [ "ACIDPROOF", "CLIMBS", "CLIMBS_WALLS", "LARVA", "POISON", "SMELLS" ]
},
{
"id": "mon_ant_acid_queen",
Expand Down Expand Up @@ -1546,7 +1557,7 @@
"anger_triggers": [ "FRIEND_ATTACKED", "FRIEND_DIED", "HURT", "PLAYER_CLOSE" ],
"death_function": [ "NORMAL" ],
"harvest": "acidant_queen",
"flags": [ "ACIDPROOF", "CLIMBS", "HEARS", "QUEEN", "SEES", "SMELLS", "PATH_AVOID_FIRE", "PATH_AVOID_FALL" ]
"flags": [ "ACIDPROOF", "CLIMBS", "CLIMBS_WALLS", "HEARS", "QUEEN", "SEES", "SMELLS", "PATH_AVOID_FIRE" ]
},
{
"id": "mon_ant_acid_soldier",
Expand Down Expand Up @@ -1581,7 +1592,7 @@
"anger_triggers": [ "FRIEND_ATTACKED", "FRIEND_DIED", "HURT", "PLAYER_CLOSE" ],
"death_function": [ "ACID", "NORMAL" ],
"harvest": "arachnid_acid",
"flags": [ "ACIDPROOF", "SHORTACIDTRAIL", "CLIMBS", "HEARS", "POISON", "SEES", "SMELLS", "PATH_AVOID_FIRE", "PATH_AVOID_FALL" ]
"flags": [ "ACIDPROOF", "SHORTACIDTRAIL", "CLIMBS", "CLIMBS_WALLS", "HEARS", "POISON", "SEES", "SMELLS", "PATH_AVOID_FIRE" ]
},
{
"id": "mon_ant_larva",
Expand All @@ -1607,7 +1618,7 @@
"harvest": "arachnid",
"upgrades": { "age_grow": 3, "into": "mon_ant" },
"death_function": [ "NORMAL" ],
"flags": [ "SMELLS", "LARVA" ]
"flags": [ "CLIMBS", "CLIMBS_WALLS", "SMELLS", "LARVA" ]
},
{
"id": "mon_ant_queen",
Expand Down Expand Up @@ -1638,7 +1649,7 @@
"anger_triggers": [ "FRIEND_ATTACKED", "FRIEND_DIED", "HURT" ],
"death_function": [ "NORMAL" ],
"fungalize_into": "mon_ant_fungus",
"flags": [ "SMELLS", "QUEEN", "CLIMBS", "PATH_AVOID_FIRE", "PATH_AVOID_FALL" ]
"flags": [ "SMELLS", "QUEEN", "CLIMBS", "CLIMBS_WALLS", "PATH_AVOID_FIRE" ]
},
{
"id": "mon_ant_soldier",
Expand Down Expand Up @@ -1672,7 +1683,7 @@
"anger_triggers": [ "FRIEND_ATTACKED", "FRIEND_DIED", "HURT", "PLAYER_CLOSE" ],
"death_function": [ "NORMAL" ],
"fungalize_into": "mon_ant_fungus",
"flags": [ "SEES", "HEARS", "SMELLS", "CLIMBS", "PATH_AVOID_FIRE", "PATH_AVOID_FALL" ]
"flags": [ "SEES", "HEARS", "SMELLS", "CLIMBS", "CLIMBS_WALLS", "PATH_AVOID_FIRE" ]
},
{
"id": "mon_locust",
Expand Down
9 changes: 7 additions & 2 deletions data/json/monsters/mutant_animal.json
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,12 @@
"//": " 201 days gestation period. The fawn will stay with its mother for approximately one year, suckling for three to four months.",
"baby_flags": [ "SPRING", "SUMMER" ],
"special_attacks": [ [ "EAT_CROP", 7200 ] ],
"flags": [ "SEES", "HEARS", "SMELLS", "ANIMAL", "PATH_AVOID_DANGER_1", "WARM" ]
"petfood": {
"food": [ "CATTLEFOOD" ],
"feed": "The %s seems to like you!",
"pet": "The %s makes a happy arachnid-like chitter at you as you pat its head."
},
"flags": [ "SEES", "HEARS", "SMELLS", "ANIMAL", "CLIMBS", "CLIMBS_WALLS", "PET_MOUNTABLE", "PATH_AVOID_DANGER_1", "WARM" ]
},
{
"id": "mon_deer_mutant_spider_fawn",
Expand Down Expand Up @@ -391,7 +396,7 @@
"fear_triggers": [ "SOUND", "PLAYER_CLOSE" ],
"death_function": [ "NORMAL" ],
"upgrades": { "age_grow": 330, "into": "mon_deer_mutant_spider" },
"flags": [ "SEES", "HEARS", "SMELLS", "ANIMAL", "PATH_AVOID_DANGER_1", "WARM", "STUMBLES" ]
"flags": [ "SEES", "HEARS", "SMELLS", "ANIMAL", "CLIMBS", "CLIMBS_WALLS", "PATH_AVOID_DANGER_1", "WARM", "STUMBLES" ]
},
{
"id": "mon_dog_mutant_mongrel",
Expand Down
17 changes: 15 additions & 2 deletions data/json/monsters/zed_misc.json
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@
"id": "mon_zombie_predator",
"type": "MONSTER",
"name": { "str": "zombie predator" },
"description": "With its joints in odd places and angles, this humanoid creature prowls across the landscape with surprising speed. Its teeth and arms are sharpened into fine points, and black ooze seeps out from cuts between its muscles.",
"description": "With its joints in odd places and angles, this humanoid creature prowls across the landscape with surprising speed, clawing up walls as easily as it bounds across open ground. Its teeth and arms are sharpened into fine points, and black ooze seeps out from cuts between its muscles.",
"default_faction": "zombie",
"bodytype": "human",
"species": [ "ZOMBIE", "HUMAN" ],
Expand Down Expand Up @@ -736,7 +736,20 @@
"death_drops": "default_zombie_death_drops",
"death_function": [ "NORMAL" ],
"burn_into": "mon_zombie_scorched",
"flags": [ "SEES", "HEARS", "SMELLS", "WARM", "BASHES", "POISON", "NO_BREATHE", "REVIVES", "PUSH_MON" ]
"flags": [ "SEES", "HEARS", "SMELLS", "WARM", "BASHES", "POISON", "NO_BREATHE", "REVIVES", "CLIMBS", "CLIMBS_WALLS", "PUSH_MON" ]
},
{
"id": "mon_zombie_crawler_clinger",
"type": "MONSTER",
"copy-from": "mon_zombie_crawler",
"name": { "str": "clinger crawler" },
"description": "Only the upper half remains of this corpse, making it eerily lightweight. It drags itself with raw arms, wedging shattered bone into cracks to slowly clamber up walls and ceilings.",
"color": "light_gray",
"volume": "40000 ml",
"weight": "45000 g",
"hp": 50,
"speed": 30,
"extend": { "flags": [ "CLIMBS", "CLIMBS_WALLS" ] }
},
{
"id": "mon_zombie_screecher",
Expand Down
1 change: 1 addition & 0 deletions docs/en/mod/json/reference/json_flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,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.
- `CLIMBS_WALLS` Can climb walls and other sheer surfaces.
- `CURRENT` this water is flowing.
- `DESTROYS` Bashes down walls and more. (2.5x bash multiplier, where base is the critter's max
melee bashing)
Expand Down
8 changes: 6 additions & 2 deletions src/handle_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@

inline static void pldrive( point d )
{
return pldrive( tripoint( d, 0 ) );

Check warning on line 520 in src/handle_action.cpp

View workflow job for this annotation

GitHub Actions / build

return statement within a void function should not have a specified return value [readability-avoid-return-with-void-value]
}

static void open()
Expand Down Expand Up @@ -1322,7 +1322,7 @@
const optional_vpart_position vp = here.veh_at( u.pos() );

turret_data turret;
if( vp && ( turret = vp->vehicle().turret_query( u.pos() ) ) ) {

Check warning on line 1325 in src/handle_action.cpp

View workflow job for this annotation

GitHub Actions / build

an assignment within an 'if' condition is bug-prone [bugprone-assignment-in-if-condition]
avatar_action::fire_turret_manual( u, here, turret );
return;
}
Expand Down Expand Up @@ -1845,7 +1845,9 @@
const bool can_use_stairs =
mon->has_flag( MF_RIDEABLE_MECH ) ||
mon->has_flag( MF_MOUNTABLE_STAIRS ) ||
mon->has_flag( MF_FLIES );
mon->has_flag( MF_FLIES ) ||
mon->has_flag( MF_CLIMBS ) ||
mon->has_flag( MF_CLIMBS_WALLS );

if( !can_use_stairs ) {
add_msg( m_info, _( "Your mount can't go downstairs while riding." ) );
Expand Down Expand Up @@ -1889,7 +1891,9 @@
const bool can_use_stairs =
mon->has_flag( MF_RIDEABLE_MECH ) ||
mon->has_flag( MF_MOUNTABLE_STAIRS ) ||
mon->has_flag( MF_FLIES );
mon->has_flag( MF_FLIES ) ||
mon->has_flag( MF_CLIMBS ) ||
mon->has_flag( MF_CLIMBS_WALLS );

if( !can_use_stairs ) {
add_msg( m_info, _( "Your mount can't go upstairs or climb while riding." ) );
Expand Down
15 changes: 12 additions & 3 deletions src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2640,8 +2640,8 @@ int map::climb_difficulty( const tripoint &p ) const
return INT_MAX;
}

int best_difficulty = INT_MAX;
int blocks_movement = 0;
auto best_difficulty = INT_MAX;
auto blocks_movement = 0;
if( has_flag( "LADDER", p ) ) {
// Really easy, but you have to stand on the tile
return 1;
Expand All @@ -2651,7 +2651,16 @@ int map::climb_difficulty( const tripoint &p ) const
best_difficulty = 7;
}

for( const auto &pt : points_in_radius( p, 1 ) ) {
const auto neighbor_range = points_in_radius( p, 1 );
auto climb_points = std::vector<tripoint>( neighbor_range.begin(), neighbor_range.end() );

if( has_flag( TFLAG_NO_FLOOR, p ) ) {
const auto below = p + tripoint_below;
const auto below_range = points_in_radius( below, 1 );
climb_points.insert( climb_points.end(), below_range.begin(), below_range.end() );
}

for( const tripoint &pt : climb_points ) {
if( impassable_ter_furn( pt ) ) {
// TODO: Non-hardcoded climbability
best_difficulty = std::min( best_difficulty, 10 );
Expand Down
Loading
Loading