Skip to content

Commit

Permalink
using vines to descend no longer produces grappling hooks (CleverRave…
Browse files Browse the repository at this point in the history
…n#77758)

* VINE_RAPPEL

* Apply suggestions from code review

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* sort (mainly for clang, also for documentation)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
Kamejeir and github-actions[bot] authored Nov 11, 2024
1 parent 9ac0424 commit 6e7f4ff
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions data/json/flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions data/json/mutations/mutations.json
Original file line number Diff line number Diff line change
Expand Up @@ -8000,6 +8000,7 @@
"prereqs": [ "PLANTSKIN", "BARK", "BARK2_a", "BARK2_b", "BARK2_c" ],
"prereqs2": [ "VINES1" ],
"changes_to": [ "VINES3" ],
"flags": [ "VINE_RAPPEL" ],
"category": [ "PLANT" ],
"attacks": [
{
Expand All @@ -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,
Expand Down
1 change: 1 addition & 0 deletions doc/JSON_FLAGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" );
Expand All @@ -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" );

Expand Down Expand Up @@ -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 );
}
Expand Down

0 comments on commit 6e7f4ff

Please sign in to comment.