Skip to content

Commit

Permalink
remove padded feet speed bonus, port SLOWS_MOVEMENT flag effect to js…
Browse files Browse the repository at this point in the history
…on (#73320)

* remove padded feet speed bonus

* remove SLOWS_MOVEMENT flag
  • Loading branch information
GuardianDll authored Apr 30, 2024
1 parent db4aa91 commit 6839cac
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 39 deletions.
5 changes: 0 additions & 5 deletions data/json/flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -910,11 +910,6 @@
"id": "REVIVE_SPECIAL",
"type": "json_flag"
},
{
"id": "SLOWS_MOVEMENT",
"type": "json_flag",
"info": "This clothing is restrictive and <bad>slows your movement speed</bad>."
},
{
"id": "STURDY",
"type": "json_flag",
Expand Down
9 changes: 7 additions & 2 deletions data/json/items/armor/suits_protection.json
Original file line number Diff line number Diff line change
Expand Up @@ -3090,8 +3090,13 @@
"color": "dark_gray",
"warmth": 15,
"material_thickness": 1,
"flags": [ "VARSIZE", "SKINTIGHT", "HOOD", "WATERPROOF", "SLOWS_MOVEMENT", "MUNDANE" ],
"relic_data": { "passive_effects": [ { "has": "WORN", "values": [ { "value": "THIRST", "multiply": -0.3 } ] } ] },
"flags": [ "VARSIZE", "SKINTIGHT", "HOOD", "WATERPROOF", "MUNDANE" ],
"relic_data": {
"passive_effects": [
{ "has": "WORN", "values": [ { "value": "THIRST", "multiply": -0.3 } ] },
{ "condition": "ALWAYS", "values": [ { "value": "MOVE_COST", "multiply": -0.1 } ] }
]
},
"armor": [ { "encumbrance": 18, "coverage": 95, "covers": [ "foot_l", "foot_r", "leg_l", "leg_r", "torso", "arm_l", "arm_r" ] } ]
},
{
Expand Down
16 changes: 12 additions & 4 deletions data/json/items/tool_armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -3868,9 +3868,13 @@
"ammo": "battery",
"charges_per_use": 1,
"use_action": { "type": "transform", "msg": "The %s engages.", "target": "utility_exoskeleton_on", "active": true },
"flags": [ "STURDY", "OVERSIZE", "BELTED", "WATER_FRIENDLY", "SLOWS_MOVEMENT", "ELECTRONIC" ],
"flags": [ "STURDY", "OVERSIZE", "BELTED", "WATER_FRIENDLY", "ELECTRONIC" ],
"relic_data": {
"passive_effects": [ { "id": "ench_exo_strength" }, { "condition": "ACTIVE", "values": [ { "value": "CARRY_WEIGHT", "add": 215000 } ] } ]
"passive_effects": [
{ "id": "ench_exo_strength" },
{ "condition": "ACTIVE", "values": [ { "value": "CARRY_WEIGHT", "add": 215000 } ] },
{ "condition": "ALWAYS", "values": [ { "value": "MOVE_COST", "multiply": -0.1 } ] }
]
},
"armor": [
{
Expand Down Expand Up @@ -3917,9 +3921,13 @@
"ammo": "gasoline",
"charges_per_use": 1,
"use_action": { "type": "transform", "msg": "The %s engages.", "target": "ice_utility_exoskeleton_on", "active": true },
"flags": [ "STURDY", "OVERSIZE", "BELTED", "WATER_FRIENDLY", "SLOWS_MOVEMENT", "ELECTRONIC" ],
"flags": [ "STURDY", "OVERSIZE", "BELTED", "WATER_FRIENDLY", "ELECTRONIC" ],
"relic_data": {
"passive_effects": [ { "id": "ench_exo_strength" }, { "condition": "ACTIVE", "values": [ { "value": "CARRY_WEIGHT", "add": 190000 } ] } ]
"passive_effects": [
{ "id": "ench_exo_strength" },
{ "condition": "ACTIVE", "values": [ { "value": "CARRY_WEIGHT", "add": 190000 } ] },
{ "condition": "ALWAYS", "values": [ { "value": "MOVE_COST", "multiply": -0.1 } ] }
]
},
"armor": [
{
Expand Down
2 changes: 1 addition & 1 deletion data/json/mutations/mutations.json
Original file line number Diff line number Diff line change
Expand Up @@ -4088,7 +4088,7 @@
"name": { "str": "Padded Feet" },
"points": 1,
"visibility": 1,
"description": "The bottoms of your feet are strongly padded. You receive no movement penalty for not wearing shoes, and even receive a 10% bonus when moving barefoot. Also, your steps are significantly quieter, as added tissue dampens the noise.",
"description": "The bottoms of your feet are strongly padded. You receive no movement penalty for not wearing shoes, and your steps are significantly quieter, as added tissue dampens the noise.",
"types": [ "SOLES" ],
"category": [ "BATRACHIAN", "RABBIT", "URSINE", "FELINE", "LUPINE", "SPIDER", "BEAST" ],
"flags": [ "TOUGH_FEET" ],
Expand Down
1 change: 0 additions & 1 deletion doc/ARMOR_BALANCE_AND_DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,6 @@ FANCY | Clothing is impractically fancy, (like a top hat)
SUPER_FANCY | Even more fancy than fancy
FILTHY | Disgusting dirty clothes
FRAGILE | Breaks fast
SLOWS_MOVEMENT | Slows you down to wear

#### Immunities/Defenses
**only some of these that are used**
Expand Down
1 change: 0 additions & 1 deletion doc/JSON_FLAGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ Some armor flags, such as `WATCH` and `ALARMCLOCK` are compatible with other ite
- ```ROLLER_QUAD```The medium choice between `ROLLER_INLINE` and `ROLLER_ONE`, while it is more stable, and moves faster, it also has a harsher non-flat terrain penalty than `ROLLER_ONE`.
- ```SEMITANGIBLE``` Prevents the item from participating in the encumbrance system when worn.
- ```SKINTIGHT``` Undergarment layer.
- ```SLOWS_MOVEMENT``` This piece of clothing multiplies move cost by 1.1.
- ```STAR_PLATE``` Item can be worn with ryūsei battle kit armor; specifically can be put in pocket for armor with this flag restriction.
- ```STAR_SHOULDER``` Item can be worn with ryūsei battle kit armor ; specifically can be put in pocket for armor with this flag restriction.
- ```STAR_SKIRT``` Item can be worn with ryūsei battle kit armor; specifically can be put in pocket for armor with this flag restriction.
Expand Down
9 changes: 0 additions & 9 deletions src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,6 @@ static const trait_id trait_NOMAD( "NOMAD" );
static const trait_id trait_NOMAD2( "NOMAD2" );
static const trait_id trait_NOMAD3( "NOMAD3" );
static const trait_id trait_PACIFIST( "PACIFIST" );
static const trait_id trait_PADDED_FEET( "PADDED_FEET" );
static const trait_id trait_PARAIMMUNE( "PARAIMMUNE" );
static const trait_id trait_PAWS( "PAWS" );
static const trait_id trait_PAWS_LARGE( "PAWS_LARGE" );
Expand Down Expand Up @@ -10320,14 +10319,6 @@ std::vector<run_cost_effect> Character::run_cost_effects( float &movecost ) cons
run_cost_effect_mul( flatground_mult, _( "Flat Ground Mut." ) );
}

if( has_trait( trait_PADDED_FEET ) && is_barefoot() ) {
run_cost_effect_mul( 0.9f, _( "Bare Padded Feet" ) );
}

if( worn_with_flag( flag_SLOWS_MOVEMENT ) ) {
run_cost_effect_mul( 1.1f, _( "Tight Clothing" ) );
}

if( worn_with_flag( flag_FIN ) ) {
run_cost_effect_mul( 1.5f, _( "Swim Fins" ) );
}
Expand Down
1 change: 0 additions & 1 deletion src/flag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ const flag_id flag_SKINTIGHT( "SKINTIGHT" );
const flag_id flag_SLEEP_AID( "SLEEP_AID" );
const flag_id flag_SLEEP_AID_CONTAINER( "SLEEP_AID_CONTAINER" );
const flag_id flag_SLEEP_IGNORE( "SLEEP_IGNORE" );
const flag_id flag_SLOWS_MOVEMENT( "SLOWS_MOVEMENT" );
const flag_id flag_SLOW_WIELD( "SLOW_WIELD" );
const flag_id flag_SMOKABLE( "SMOKABLE" );
const flag_id flag_SMOKED( "SMOKED" );
Expand Down
1 change: 0 additions & 1 deletion src/flag.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ extern const flag_id flag_SKINTIGHT;
extern const flag_id flag_SLEEP_AID;
extern const flag_id flag_SLEEP_AID_CONTAINER;
extern const flag_id flag_SLEEP_IGNORE;
extern const flag_id flag_SLOWS_MOVEMENT;
extern const flag_id flag_SLOW_WIELD;
extern const flag_id flag_SMOKABLE;
extern const flag_id flag_SMOKED;
Expand Down
14 changes: 0 additions & 14 deletions tests/move_cost_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ static const ter_str_id ter_t_pavement( "t_pavement" );

static const trait_id trait_HOOVES( "HOOVES" );
static const trait_id trait_LEG_TENTACLES( "LEG_TENTACLES" );
static const trait_id trait_PADDED_FEET( "PADDED_FEET" );
static const trait_id trait_TOUGH_FEET( "TOUGH_FEET" );

TEST_CASE( "being_knocked_down_triples_movement_cost", "[move_cost][downed]" )
Expand Down Expand Up @@ -200,19 +199,6 @@ TEST_CASE( "mutations_may_affect_movement_cost", "[move_cost][mutation]" )
CHECK( ava.run_cost( 100 ) == Approx( base_cost ) );
}
}

GIVEN( "PADDED_FEET" ) {
ava.toggle_trait( trait_PADDED_FEET );
THEN( "wearing sneakers gives baseline 100 movement speed" ) {
ava.clear_worn();
ava.wear_item( item( "sneakers" ) );
CHECK( ava.run_cost( 100 ) == Approx( base_cost ) );
}
THEN( "being barefoot is faster than wearing sneakers" ) {
ava.clear_worn();
CHECK( ava.run_cost( 100 ) == Approx( 0.9 * base_cost ) );
}
}
}

TEST_CASE( "Crawl_score_effects_on_movement_cost", "[move_cost]" )
Expand Down

0 comments on commit 6839cac

Please sign in to comment.