diff --git a/data/json/flags.json b/data/json/flags.json index abf073737d227..ceeaa1d8789f9 100644 --- a/data/json/flags.json +++ b/data/json/flags.json @@ -2463,6 +2463,11 @@ "type": "json_flag", "info": "The character has extensive roots, which helps with the TREE_COMMUNION mutation." }, + { + "id": "VINE_RAPPEL", + "type": "json_flag", + "info": "The character can use vines to safely rappel down sheer drops." + }, { "id": "ANIMALDISCORD", "type": "json_flag", diff --git a/data/json/mutations/mutations.json b/data/json/mutations/mutations.json index 19a3780c3e530..c9d4ef2a4a74c 100644 --- a/data/json/mutations/mutations.json +++ b/data/json/mutations/mutations.json @@ -8000,6 +8000,7 @@ "prereqs": [ "PLANTSKIN", "BARK", "BARK2_a", "BARK2_b", "BARK2_c" ], "prereqs2": [ "VINES1" ], "changes_to": [ "VINES3" ], + "flags": [ "VINE_RAPPEL" ], "category": [ "PLANT" ], "attacks": [ { @@ -8024,6 +8025,7 @@ "prereqs": [ "PLANTSKIN", "BARK", "BARK2_a", "BARK2_b", "BARK2_c" ], "prereqs2": [ "VINES2" ], "threshreq": [ "THRESH_PLANT" ], + "flags": [ "VINE_RAPPEL" ], "category": [ "PLANT" ], "active": true, "cost": 90, diff --git a/doc/JSON_FLAGS.md b/doc/JSON_FLAGS.md index 498151b4f0c15..03f169bf215e9 100644 --- a/doc/JSON_FLAGS.md +++ b/doc/JSON_FLAGS.md @@ -434,6 +434,7 @@ Character flags can be `trait_id`, `json_flag_id` or `flag_id`. Some of these a - ```THERMOMETER``` You always know what temperature it is. - ```TINY``` Changes your size to `creature_size::tiny`. Checked first of the size category flags. - ```TREE_COMMUNION_PLUS``` Gain greatly enhanced effects from the Mycorrhizal Communion mutation. +- ```VINE_RAPPEL``` You can rappel down staircases and sheer drops of any height. - ```WALK_UNDERWATER``` your stamina burn is not increased when you swim, emulating you walking on the water bottom. - ```WALL_CLING``` You can ascend/descend sheer cliffs as long as the tile above borders at least one wall. Chance to slip and fall each step. - ```WATERWALKING``` You can walk across the surface of the water as though it were solid ground. Should usually be combined with `ITEM_WATERPROOFING` to protect items as well. diff --git a/src/game.cpp b/src/game.cpp index ac8511cd87e33..574f0a8a406d7 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -287,6 +287,7 @@ static const flag_id json_flag_SPLINT( "SPLINT" ); static const flag_id json_flag_WATERWALKING( "WATERWALKING" ); static const furn_str_id furn_f_rope_up( "f_rope_up" ); +static const furn_str_id furn_f_vine_up( "f_vine_up" ); static const furn_str_id furn_f_web_up( "f_web_up" ); static const harvest_drop_type_id harvest_drop_blood( "blood" ); @@ -312,6 +313,7 @@ static const json_character_flag json_flag_HYPEROPIC( "HYPEROPIC" ); static const json_character_flag json_flag_INFECTION_IMMUNE( "INFECTION_IMMUNE" ); static const json_character_flag json_flag_ITEM_WATERPROOFING( "ITEM_WATERPROOFING" ); static const json_character_flag json_flag_NYCTOPHOBIA( "NYCTOPHOBIA" ); +static const json_character_flag json_flag_VINE_RAPPEL( "VINE_RAPPEL" ); static const json_character_flag json_flag_WALL_CLING( "WALL_CLING" ); static const json_character_flag json_flag_WEB_RAPPEL( "WEB_RAPPEL" ); @@ -12396,6 +12398,8 @@ void game::vertical_move( int movez, bool force, bool peeking ) if( rope_ladder ) { if( u.has_flag( json_flag_WEB_RAPPEL ) ) { here.furn_set( u.pos_bub(), furn_f_web_up ); + } else if( u.has_flag( json_flag_VINE_RAPPEL ) ) { + here.furn_set( u.pos_bub(), furn_f_vine_up ); } else { here.furn_set( u.pos_bub(), furn_f_rope_up ); }