Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Shoes! Heelys! #30956

Merged
merged 18 commits into from
May 31, 2019
6 changes: 6 additions & 0 deletions data/json/item_groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
[ "backpack", 38 ],
[ "slingpack", 19 ],
[ "pockknife", 14 ],
[ "roller_shoes_off", 10 ],
[ "knife_swissarmy", 10 ],
[ "hairpin", 5 ],
[ "fc_hairpin", 1 ],
Expand Down Expand Up @@ -844,6 +845,7 @@
[ "mask_hockey", 5 ],
[ "hockey_stick", 10 ],
[ "roller_blades", 20 ],
[ "roller_shoes_off", 10 ],
[ "jersey", 40 ],
[ "puck", 5 ],
[ "baseball", 5 ],
Expand Down Expand Up @@ -2631,6 +2633,7 @@
[ "leathersandals", 10 ],
[ "rollerskates", 1 ],
[ "roller_blades", 5 ],
[ "roller_shoes_off", 1 ],
[ "mocassins", 20 ]
]
},
Expand Down Expand Up @@ -2842,6 +2845,7 @@
[ "leathersandals", 100 ],
[ "rollerskates", 10 ],
[ "roller_blades", 20 ],
[ "roller_shoes_off", 10 ],
[ "boots_rubber", 20 ],
[ "clownshoes", 10 ],
[ "mocassins", 40 ]
Expand Down Expand Up @@ -3843,6 +3847,7 @@
[ "roller_blades", 20 ],
[ "rollerskates", 10 ],
[ "rollerskates", 10 ],
[ "roller_shoes_off", 10 ],
[ "survnote", 3 ],
[ "radio_car_box", 3 ],
[ "radiocontrol", 10 ],
Expand Down Expand Up @@ -4326,6 +4331,7 @@
[ "boots_hiking", 10 ],
[ "roller_blades", 20 ],
[ "rollerskates", 10 ],
[ "roller_shoes_off", 10 ],
[ "runner_bag", 5 ],
[ "gloves_tactical", 1 ],
[ "glasses_bal", 5 ],
Expand Down
40 changes: 40 additions & 0 deletions data/json/items/armor/boots.json
Original file line number Diff line number Diff line change
Expand Up @@ -1032,5 +1032,45 @@
"material_thickness": 2,
"environmental_protection": 1,
"flags": [ "VARSIZE", "WATER_FRIENDLY", "SKINTIGHT" ]
},
{
"id": "roller_shoes_off",
"type": "ARMOR",
"name": "pair of heelys (off)",
"name_plural": "pairs of heelys (off)",
"description": "A pair of sneakers with wheels, currently the wheels are hidden.",
"weight": 840,
"volume": 6,
"price": 10000,
"material": [ "cotton", "leather" ],
"symbol": "[",
"color": "light_blue",
"covers": [ "FEET" ],
"coverage": 80,
"encumbrance": 4,
"warmth": 20,
"material_thickness": 2,
"use_action": { "type": "transform", "target": "roller_shoes_on", "msg": "You pop the wheels out.", "moves": 500 },
"flags": [ "VARSIZE" ]
},
{
"id": "roller_shoes_on",
"type": "ARMOR",
"name": "pair of heelys (on)",
"name_plural": "pairs of heelys (on)",
"description": "A pair of sneakers with wheels, currently the wheels are out.",
"weight": 840,
"volume": 6,
"price": 10000,
"material": [ "cotton", "leather" ],
"symbol": "[",
"color": "light_blue",
"covers": [ "FEET" ],
"coverage": 80,
"encumbrance": 4,
"warmth": 20,
"material_thickness": 2,
"use_action": { "type": "transform", "target": "roller_shoes_off", "msg": "You pop the wheels back in.", "moves": 500 },
"flags": [ "VARSIZE", "ROLLER_ONE", "REQUIRES_BALANCE" ]
}
]
3 changes: 3 additions & 0 deletions doc/JSON_FLAGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ Some armor flags, such as `WATCH` and `ALARMCLOCK` are compatible with other ite
- ```RAINPROOF``` Prevents the covered body-part(s) from getting wet in the rain.
- ```REQUIRES_BALANCE``` Gear that requires a certain balance to be steady with. If the player is hit while wearing, they have a chance to be downed.
- ```RESTRICT_HANDS``` Prevents the player from wielding a weapon two-handed, forcing one-handed use if the weapon permits it.
- ```ROLLER_ONE``` A less stable and slower version of ROLLER_QUAD, still allows the player to move faster than walking speed.
- ```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 then ROLLER_ONE.
- ```ROLLER_INLINE``` Faster, but less stable overall, the penalty for non-flat terrain is even harsher.
- ```SKINTIGHT``` Undergarment layer.
- ```SLOWS_MOVEMENT``` This piece of clothing multiplies move cost by 1.1.
- ```SLOWS_THIRST``` This piece of clothing multiplies the rate at which the player grows thirsty by 0.70.
Expand Down
13 changes: 13 additions & 0 deletions src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1902,6 +1902,16 @@ int player::run_cost( int base_cost, bool diag ) const
}
}

// Skates with only one wheel (roller shoes) are fairly less stable
// and fairly slower as well
if( worn_with_flag( "ROLLER_ONE" ) ) {
if( on_road ) {
movecost *= 0.85f;
} else {
movecost *= 1.1f;
}
}

movecost +=
( ( encumb( bp_foot_l ) + encumb( bp_foot_r ) ) * 2.5 +
( encumb( bp_leg_l ) + encumb( bp_leg_r ) ) * 1.5 ) / 10;
Expand Down Expand Up @@ -3203,6 +3213,9 @@ void player::on_hit( Creature *source, body_part bp_hit,
}
if( worn_with_flag( "REQUIRES_BALANCE" ) && !has_effect( effect_downed ) ) {
int rolls = 4;
if( worn_with_flag( "ROLLER_ONE" ) ) {
rolls += 2;
}
if( has_trait( trait_PROF_SKATER ) ) {
rolls--;
}
Expand Down