Skip to content

Commit

Permalink
Allow bird wings to glide (redux) (CleverRaven#70479)
Browse files Browse the repository at this point in the history
* i hate github i hate github i hate github

i hate github i hate github i hate github i hate github i hate github

* fixes, limb stuff

* better limbs

* improve limb stuff

* limb balance

* fix checks for broken parts

* seat fixes

* fix stuff

* stuff

* Update seats.json

* Update vehicle_parts.json

* fix insect wings

* more stuff

* tailwind and circular distance

* stumble

* mut cleanup

* lint etc

* veh_boost

* astyle

* Update data/json/mutations/mutation_limbs.json

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

* Update data/json/mutations/mutation_limbs.json

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

* Update data/json/mutations/mutation_limbs.json

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

* Update data/json/mutations/mutation_limbs.json

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

* Update mutation_limbs.json

* prosthetic stuff

* Update prosthetics_eocs.json

* make tests happy

* improve combat interactions

* Update src/activity_actor.cpp

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

* Update src/activity_actor.cpp

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

* Update src/activity_actor.cpp

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

* Update src/character.cpp

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

* Update src/activity_actor.cpp

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

* make tests quiet

* Update character.cpp

* finishing touches

* Update data/json/effects_on_condition/mutation_eocs/mutation_effect_eocs.json

Co-authored-by: Anton Simakov <[email protected]>

* Update mutation_effect_eocs.json

* Update mutation_effect_eocs.json

* Update iexamine.cpp

* Update player_activities.json

* Update mutations.json

* Update mutations.json

* Update iexamine.cpp

* Update mutations.json

* Update iexamine.cpp

* Update character.cpp

* grab

* Update character.cpp

* fixes

* test fix

* add conditional flag

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Anton Simakov <[email protected]>
  • Loading branch information
3 people authored and catern committed Oct 15, 2024
1 parent 240a518 commit 558dcef
Show file tree
Hide file tree
Showing 24 changed files with 629 additions and 54 deletions.
17 changes: 17 additions & 0 deletions data/json/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -4615,5 +4615,22 @@
],
"max_intensity": 4,
"rating": "neutral"
},
{
"type": "effect_type",
"id": "gliding",
"name": [ "Gliding" ],
"desc": [ "You are gliding through the air." ],
"flags": [ "GLIDING" ],
"rating": "good"
},
{
"type": "effect_type",
"id": "slow_descent",
"show_in_info": false,
"name": [ "Slow Descent" ],
"desc": [ "You are descending at a safe speed." ],
"flags": [ "FEATHER_FALL" ],
"max_duration": "1 s"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -414,5 +414,17 @@
"//": "will remove ink_gland_ink effect when the mutation is lost",
"condition": { "and": [ { "u_has_effect": "ink_gland_ink" }, { "compare_string": [ "INK_GLANDS", { "context_val": "trait" } ] } ] },
"effect": [ { "u_lose_effect": "ink_gland_ink" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_insect_wings_shutoff",
"recurrence": [ "1 seconds", "1 seconds" ],
"condition": {
"and": [ { "compare_num": [ { "u_val": "stamina" }, "<", { "const": 3000 } ] }, { "u_has_trait": "WINGS_INSECT_active" } ]
},
"effect": [
{ "u_activate_trait": "WINGS_INSECT_active" },
{ "u_message": "You don't have the stamina to keep buzzing.", "type": "bad" }
]
}
]
21 changes: 21 additions & 0 deletions data/json/enchantments.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,26 @@
"has": "WORN",
"condition": "ACTIVE",
"values": [ { "value": "FOOTSTEP_NOISE", "multiply": -0.67 } ]
},
{
"type": "enchantment",
"id": "ench_wings_bird",
"condition": "ALWAYS",
"modified_bodyparts": [
{ "lose": "arm_l" },
{ "lose": "arm_r" },
{ "lose": "hand_r" },
{ "lose": "hand_l" },
{ "gain": "wing_bird_l" },
{ "gain": "wing_bird_r" }
]
},
{
"id": "ench_wings_insect_active",
"type": "enchantment",
"name": { "str": "Insect Wings (Buzzing)" },
"description": "Your rapidly buzzing wings propel you with extra speed.",
"condition": "ALWAYS",
"values": [ { "value": "REGEN_STAMINA", "add": -110 } ]
}
]
48 changes: 31 additions & 17 deletions data/json/mutations/mutations.json
Original file line number Diff line number Diff line change
Expand Up @@ -5114,13 +5114,15 @@
"points": 2,
"visibility": 4,
"ugliness": 2,
"description": "You have a pair of large, feathered wings. Your body is too heavy to be able to fly, but you can use them to slow your descent during a fall, and will not take falling damage under any circumstances.",
"types": [ "WINGS" ],
"prereqs": [ "WINGS_STUB" ],
"description": "Your arms have mostly transformed into a huge pair of feathered wings. Though you retain a few fingers, your fine manipulation is greatly hampered. On the other hand, you can glide from ledges and will take less damage if you fall, provided you're healthy and unburdened.",
"types": [ "ARMS", "HANDS" ],
"enchantments": [ "ench_wings_bird" ],
"prereqs": [ "ARM_FEATHERS" ],
"prereqs2": [ "HOLLOW_BONES" ],
"threshreq": [ "THRESH_BIRD" ],
"category": [ "BIRD" ],
"flags": [ "WINGS_2" ]
"restricts_gear": [ "arm_l", "arm_r", "hand_l", "hand_r", "arm_stub_r", "arm_stub_l" ],
"flags": [ "WINGS_2", "WING_GLIDE" ]
},
{
"type": "mutation",
Expand All @@ -5129,17 +5131,26 @@
"points": 1,
"visibility": 4,
"ugliness": 4,
"description": "You have a pair of large, translucent wings. They are too small to lift you, but are powerful enough to greatly speed your movement, with some effort and noise.",
"description": "A large pair of translucent wings grow from your back. They are too small to lift you, but if you're not weighed down, they can help a bit if you fall. You can flutter them quickly to improve your move speed, but this is noisy and tires you out.",
"types": [ "WINGS" ],
"prereqs": [ "WINGS_STUB" ],
"category": [ "INSECT" ],
"restricts_gear": [ "torso" ],
"flags": [ "WINGS_1" ],
"active": true,
"cost": 3,
"time": "1 s",
"fatigue": true,
"kcal": true,
"thirst": true,
"movecost_modifier": 0.75
"transform": { "target": "WINGS_INSECT_active", "msg_transform": "You begin buzzing your wings.", "active": true, "moves": 20 }
},
{
"type": "mutation",
"id": "WINGS_INSECT_active",
"name": { "str": "Insect Wings (Buzzing)" },
"description": "You're fluttering your wings as fast as you can. This doesn't generate enough lift to move you, but it does increase your movement speed. If you're not burdened, you can fall short distances without harm.",
"copy-from": "WINGS_INSECT",
"valid": false,
"movecost_modifier": 0.75,
"flags": [ "WINGS_1", "MUSCLE_VEH_BOOST" ],
"enchantments": [ "ench_wings_insect_active" ],
"transform": { "target": "WINGS_INSECT", "msg_transform": "Your wings go still.", "active": false, "moves": 0 }
},
{
"type": "mutation",
Expand Down Expand Up @@ -6151,8 +6162,8 @@
"ugliness": 2,
"description": "You have a pair of stubby little wings projecting from your shoulderblades. They can be wiggled at will, but are useless.",
"types": [ "WINGS" ],
"changes_to": [ "WINGS_BIRD", "WINGS_BAT", "WINGS_INSECT", "WINGS_BUTTERFLY" ],
"category": [ "BIRD", "BEAST", "INSECT" ]
"changes_to": [ "WINGS_INSECT", "WINGS_BUTTERFLY", "WINGS_BAT" ],
"category": [ "INSECT", "BEAST" ]
},
{
"type": "mutation",
Expand Down Expand Up @@ -7543,19 +7554,22 @@
"type": "mutation",
"id": "ARM_FEATHERS",
"name": { "str": "Feathered Arms" },
"points": -2,
"points": 2,
"visibility": 8,
"ugliness": 2,
"description": "Your arms have grown vibrantly-colored feathers. They effectively waterproof your arms and take the edge off hits, but really get in the way. They're simply too small to help you in the air.",
"mixed_effect": true,
"description": "Your arms have sprouted feathers, and you find you can no longer fully extend your elbows. This gets in the way a bit, but the feathers offer minor protection from damage and the elements.",
"category": [ "RAPTOR", "BIRD" ],
"flags": [ "WINGS_1", "ARM_WINGS" ],
"changes_to": [ "WINGS_BIRD" ],
"wet_protection": [
{ "part": "arm_l", "neutral": 50 },
{ "part": "arm_r", "neutral": 50 },
{ "part": "hand_l", "neutral": 10 },
{ "part": "hand_r", "neutral": 10 }
],
"encumbrance_always": [ [ "arm_l", 20 ], [ "arm_r", 20 ] ],
"armor": [ { "parts": [ "arm_l", "arm_r" ], "bash": 1 } ]
"encumbrance_always": [ [ "arm_l", 8 ], [ "arm_r", 8 ] ],
"armor": [ { "parts": [ "arm_l", "arm_r" ], "bash": 1, "cut": 1 } ]
},
{
"type": "mutation",
Expand Down
12 changes: 12 additions & 0 deletions data/json/player_activities.json
Original file line number Diff line number Diff line change
Expand Up @@ -1114,5 +1114,17 @@
"interruptable": false,
"can_resume": false,
"interruptable_with_kb": false
},
{
"id": "ACT_GLIDE",
"type": "activity_type",
"activity_level": "NO_EXERCISE",
"verb": "gliding",
"based_on": "neither",
"interruptable": false,
"can_resume": false,
"refuel_fires": false,
"auto_needs": false,
"interruptable_with_kb": false
}
]
1 change: 1 addition & 0 deletions data/mods/Limb_WIP/mutation_eocs/prosthetics_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@
{ "u_has_trait": "ARACHNID_ARMS" },
{ "u_has_trait": "ARACHNID_ARMS_OK" },
{ "u_has_trait": "AMORPHOUS" },
{ "u_has_trait": "WINGS_BIRD" },
{ "u_has_trait": "ARM_TENTACLES" },
{ "u_has_trait": "ARM_TENTACLES_4" },
{ "u_has_trait": "ARM_TENTACLES_8" }
Expand Down
76 changes: 76 additions & 0 deletions data/mods/Limb_WIP/mutations/mutation_limbs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1017,5 +1017,81 @@
"sub_parts": [ "hand_wrist_l", "hand_palm_l", "hand_back_l", "hand_fingers_l" ],
"bmi_encumbrance_threshold": 0,
"bmi_encumbrance_scalar": 0
},
{
"id": "wing_bird_l",
"type": "body_part",
"name": "left wing",
"name_multiple": "left wings",
"accusative": { "ctxt": "bodypart_accusative", "str": "left wing" },
"accusative_multiple": { "ctxt": "bodypart_accusative", "str": "left wings" },
"heading": "l. wing",
"heading_multiple": "wings",
"encumbrance_text": "Melee combat is hampered.",
"hp_bar_ui_text": "L WING",
"main_part": "wing_bird_l",
"connected_to": "torso",
"opposite_part": "wing_bird_r",
"flags": [ "LIMB_UPPER" ],
"conditional_flags": [ "WING_ARM_RIGHT" ],
"drench_capacity": 250,
"encumbrance_threshold": 0,
"hit_size": 0.9,
"hit_difficulty": 1.2,
"is_limb": true,
"limb_types": [ [ "arm", 0.8 ], [ "hand", 0.3 ] ],
"limb_scores": [
[ "grip", 0.3 ],
[ "manip", 0.38 ],
[ "lift", 0.42 ],
[ "balance", 0.2 ],
[ "block", 0.8 ],
[ "swim", 0.25 ],
[ "crawl", 0.3 ]
],
"smash_message": "You buffet the %s with your wing.",
"side": "left",
"base_hp": 45,
"sub_parts": [ "arm_shoulder_l", "arm_upper_l", "arm_elbow_l", "arm_lower_l", "hand_fingers_l", "hand_wrist_l" ],
"armor": { "cut": 3, "bash": 4 },
"unarmed_damage": [ { "damage_type": "bash", "amount": -2 } ]
},
{
"id": "wing_bird_r",
"type": "body_part",
"name": "right wing",
"name_multiple": "right wings",
"accusative": { "ctxt": "bodypart_accusative", "str": "right wing" },
"accusative_multiple": { "ctxt": "bodypart_accusative", "str": "right wings" },
"heading": "r. wing",
"heading_multiple": "wings",
"encumbrance_text": "Melee combat is hampered.",
"hp_bar_ui_text": "R WING",
"main_part": "wing_bird_r",
"connected_to": "torso",
"opposite_part": "wing_bird_l",
"flags": [ "LIMB_UPPER" ],
"conditional_flags": [ "WING_ARM_LEFT" ],
"drench_capacity": 250,
"encumbrance_threshold": 0,
"hit_size": 0.9,
"hit_difficulty": 1.2,
"is_limb": true,
"limb_types": [ [ "arm", 0.8 ], [ "hand", 0.3 ] ],
"limb_scores": [
[ "grip", 0.3 ],
[ "manip", 0.38 ],
[ "lift", 0.42 ],
[ "balance", 0.2 ],
[ "block", 0.8 ],
[ "swim", 0.25 ],
[ "crawl", 0.3 ]
],
"smash_message": "You buffet the %s with your wing.",
"side": "right",
"base_hp": 45,
"sub_parts": [ "arm_shoulder_r", "arm_upper_r", "arm_elbow_r", "arm_lower_r", "hand_fingers_r", "hand_wrist_r" ],
"armor": { "cut": 3, "bash": 4 },
"unarmed_damage": [ { "damage_type": "bash", "amount": -2 } ]
}
]
14 changes: 13 additions & 1 deletion data/mods/Magiclysm/mutations/mutations.json
Original file line number Diff line number Diff line change
Expand Up @@ -439,11 +439,23 @@
"copy-from": "FORKED_TONGUE",
"extend": { "category": [ "DRAGON_BLACK", "SPECIES_LIZARDFOLK" ] }
},
{
"type": "mutation",
"id": "HOLLOW_BONES",
"copy-from": "HOLLOW_BONES",
"extend": { "category": [ "SPECIES_RAVENFOLK" ] }
},
{
"type": "mutation",
"id": "ARM_FEATHERS",
"copy-from": "ARM_FEATHERS",
"extend": { "category": [ "SPECIES_RAVENFOLK" ] }
},
{
"type": "mutation",
"id": "WINGS_STUB",
"copy-from": "WINGS_STUB",
"extend": { "category": [ "DRAGON_BLACK", "SPECIES_RAVENFOLK" ], "changes_to": [ "DRAGON_WINGS_BLACK" ] }
"extend": { "category": [ "DRAGON_BLACK" ], "changes_to": [ "DRAGON_WINGS_BLACK" ] }
},
{
"type": "mutation",
Expand Down
9 changes: 7 additions & 2 deletions doc/JSON_FLAGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ Some armor flags, such as `WATCH` and `ALARMCLOCK` are compatible with other ite
- ```ACID_IMMUNE``` You are immune to acid damage.
- ```ALARMCLOCK``` You always can set alarms.
- ```ALBINO``` Cause you to have painful sunburns
- ```ARM_WINGS``` You have wings instead of regular arms
- ```BASH_IMMUNE``` You are immune to bashing damage.
- ```BG_OTHER_SURVIVORS_STORY``` Given to NPC when it has other survival story
- ```BG_SURVIVAL_STORY``` Given to NPC when it has a survival story
Expand Down Expand Up @@ -389,6 +390,8 @@ Some armor flags, such as `WATCH` and `ALARMCLOCK` are compatible with other ite
- ```FEATHER_FALL``` You are immune to fall damage.
- ```GILLS``` You can breathe underwater.
- ```GLARE_RESIST``` Protect your eyes from glare like sunglasses.
- ```GLIDE``` You can glide from ledges without the use of wings, as if by magic.
- ```GLIDING``` You are in the process of gliding.
- ```HARDTOHIT``` Whenever something attacks you, RNG gets rolled twice, and you get the better result.
- ```HEATSINK``` You are resistant to extreme heat.
- ```HEAT_IMMUNE``` Immune to very hot temperatures.
Expand All @@ -403,6 +406,7 @@ Some armor flags, such as `WATCH` and `ALARMCLOCK` are compatible with other ite
- ```INVISIBLE``` You can't be seen.
- ```LARGE``` Changes your size to `creature_size::large`. Checked third of the size category flags.
- ```MEND_ALL``` You need no splint to heal broken bones.
- ```MUSCLE_VEH_BOOST``` Something, such as buzzing insect wings, is speeding you up when you use a muscle-powered vehicle.
- ```MYCUS_IMMUNE``` Critter is immune to fungal hase field (`fd_fungal_haze`)
- ```MYOPIC_IN_LIGHT``` You are nearsighted in light, but can see normally in low-light conditions.
- ```MYOPIC``` You are nearsighted - vision range is severely reduced without glasses.
Expand Down Expand Up @@ -448,8 +452,9 @@ Some armor flags, such as `WATCH` and `ALARMCLOCK` are compatible with other ite
- ```WEBBED_FEET``` You have webbings on your feet, supporting your swimming speed if not wearing footwear.
- ```WEBBED_HANDS``` You have webbings on your hands, supporting your swimming speed.
- ```WEB_RAPPEL``` You can rappel down staircases and sheer drops of any height.
- ```WINGS_1``` You have 50% chance to ignore falling traps (including ledges).
- ```WINGS_2``` You have 100% chance to ignore falling traps (including ledges). Requires two flag instances.
- ```WINGS_1``` If you're not immobilized and have <50% burden, you reduce fall damage by 1 Z-level.
- ```WINGS_2``` If you're not immobilized and have <50% burden, you reduce fall damage by 2 Z-levels.
- ```WINGGLIDE``` You can glide using some part of your body and strenuous physical effort.
- ```mycus``` TBD


Expand Down
Loading

0 comments on commit 558dcef

Please sign in to comment.