Skip to content

Commit

Permalink
[Limb Mod] Limbify Feathered Arms, rework Bird Wings and gliding chec…
Browse files Browse the repository at this point in the history
…ks (CleverRaven#72867)

* Relimb

No WIP timers, dummy

Ooooh piece of dead code

* Thank you, typobot

Remove space, TODO remove time

No U

* Def didn't fix that on the web interface and overwrote with forcepush, nosir
  • Loading branch information
Venera3 authored Apr 21, 2024
1 parent 874122c commit 9ebd717
Show file tree
Hide file tree
Showing 16 changed files with 1,577 additions and 1,112 deletions.
5 changes: 2 additions & 3 deletions data/json/mutations/mutations.json
Original file line number Diff line number Diff line change
Expand Up @@ -5216,7 +5216,7 @@
"strict_threshreq": true,
"category": [ "BIRD" ],
"restricts_gear": [ "arm_l", "arm_r", "hand_l", "hand_r" ],
"flags": [ "WINGS_2", "WING_GLIDE", "ARM_WINGS" ]
"flags": [ "WINGS_2", "WING_GLIDE" ]
},
{
"type": "mutation",
Expand Down Expand Up @@ -6384,7 +6384,7 @@
"mixed_effect": true,
"description": "Most of your fingers have grown to tremendous length, becoming a broad pair of leathery wings. This allows you to arrest a fall or glide from a ledge if you aren't too weighed down, but naturally impedes your fine motor skills. They even keep you warm when you sleep.",
"types": [ "ARMS", "HANDS" ],
"flags": [ "WING_GLIDE", "WINGS_2", "ARM_WINGS" ],
"flags": [ "WING_GLIDE", "WINGS_2" ],
"encumbrance_always": [ [ "arm_r", 20 ], [ "arm_l", 20 ], [ "hand_r", 40 ], [ "hand_l", 40 ] ],
"prereqs": [ "WEBBED" ],
"strict_threshreq": true,
Expand Down Expand Up @@ -7816,7 +7816,6 @@
"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 },
Expand Down
29 changes: 29 additions & 0 deletions data/mods/Limb_WIP/armor/limb_armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,35 @@
}
]
},
{
"type": "ARMOR",
"id": "integrated_feathers",
"copy-from": "integrated_feathers",
"name": { "str_sp": "feathers" },
"armor": [
{
"material": [ { "type": "mut_feather", "covered_by_mat": 100, "thickness": 4 } ],
"covers": [
"hand_l",
"hand_r",
"foot_l",
"foot_r",
"leg_l",
"leg_r",
"arm_l",
"arm_r",
"torso",
"head",
"arm_feathers_l",
"arm_feathers_r",
"arm_wing_bird_l",
"arm_wing_bird_r"
],
"coverage": 100,
"encumbrance": 0
}
]
},
{
"id": "armor_bio_arms_basic",
"type": "ARMOR",
Expand Down
13 changes: 0 additions & 13 deletions data/mods/Limb_WIP/enchantments.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,6 @@
"values": [ { "value": "MOVECOST_FLATGROUND_MOD", "multiply": 0.25 } ],
"modified_bodyparts": [ { "lose": "leg_l" }, { "lose": "leg_r" }, { "lose": "foot_r" }, { "lose": "foot_l" }, { "gain": "gastropod_foot" } ]
},
{
"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" }
]
},
{
"type": "enchantment",
"id": "ENCH_NO_RIGHT_LEG",
Expand Down
161 changes: 157 additions & 4 deletions data/mods/Limb_WIP/mutation_eocs/limb_changing_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,26 @@
{ "u_add_effect": "stunned", "duration": [ "5 s", "30 s" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_ARM_PAIN",
"effect": [ { "u_message": "<arm_pain>", "snippet": true }, { "math": [ "u_pain()", "+=", "5" ] } ]
},
{
"type": "effect_on_condition",
"id": "EOC_ARM_DROP",
"condition": "u_has_weapon",
"effect": [ { "u_message": "<arm_drop>", "snippet": true }, "player_weapon_drop" ]
},
{
"type": "effect_on_condition",
"id": "EOC_ARM_ITCH",
"effect": [
{ "u_message": "<arm_itch>", "snippet": true },
{ "u_add_effect": "formication", "duration": 3600, "target_part": "arm_l" },
{ "u_add_effect": "formication", "duration": 3600, "target_part": "arm_r" }
]
},
{
"type": "effect_on_condition",
"id": "EOC_PRE_EYES_INSECT",
Expand All @@ -43,7 +63,8 @@
{ "math": [ "u_vitamin('mutagen_insect')", ">=", "300" ] },
{ "math": [ "u_vitamin('mutagen')", ">=", "300" ] },
{ "math": [ "u_progress_pre_eyes_insect", ">=", "3" ] },
{ "u_has_effect": "sleep" }
{ "u_has_effect": "sleep" },
{ "math": [ "time_since(u_limb_progress_timer)", ">=", "time('12 h')" ] }
]
},
"effect": [
Expand All @@ -66,7 +87,7 @@
{
"x_in_y_chance": { "x": { "math": [ "u_vitamin('mutagen_insect') + u_vitamin('mutagen')" ] }, "y": 1000 }
},
{ "math": [ "time_since('limb_progress_timer', 'unit':'days') >= 1" ] }
{ "math": [ "time_since(u_limb_progress_timer)", ">=", "time('12 h')" ] }
]
},
"then": [
Expand Down Expand Up @@ -94,7 +115,8 @@
{ "math": [ "u_vitamin('mutagen_insect')", ">=", "500" ] },
{ "math": [ "u_vitamin('mutagen')", ">=", "500" ] },
{ "math": [ "u_progress_eyes_insect", ">=", "5" ] },
{ "u_has_effect": "sleep" }
{ "u_has_effect": "sleep" },
{ "math": [ "time_since(u_limb_progress_timer)", ">=", "time('12 h')" ] }
]
},
"effect": [
Expand All @@ -118,7 +140,7 @@
{
"x_in_y_chance": { "x": { "math": [ "u_vitamin('mutagen_insect') + u_vitamin('mutagen')" ] }, "y": 1200 }
},
{ "math": [ "time_since('limb_progress_timer', 'unit':'days') >= 1" ] }
{ "math": [ "time_since(u_limb_progress_timer)", ">=", "time('12 h')" ] }
]
},
"then": [
Expand All @@ -136,5 +158,136 @@
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_PRE_ARM_FEATHERS",
"//": "First-stage limb, single progress dream. Dynamically decide on failure snips/mutation category",
"condition": {
"and": [
{
"or": [ { "math": [ "u_vitamin('mutagen_bird')", ">=", "200" ] }, { "math": [ "u_vitamin('mutagen_raptor')", ">=", "200" ] } ]
},
{ "math": [ "u_vitamin('mutagen')", ">=", "300" ] },
{ "math": [ "u_progress_pre_arm_feathers", ">=", "1" ] },
{ "u_has_effect": "sleep" },
{ "math": [ "time_since(u_limb_progress_timer)", ">=", "time('12 h')" ] }
]
},
"effect": [
{
"if": { "math": [ "u_vitamin('mutagen_bird')", ">=", "u_vitamin('mutagen_raptor')" ] },
"then": { "u_mutate_towards": "ARM_FEATHERS", "category": "BIRD", "use_vitamins": true },
"else": { "u_mutate_towards": "ARM_FEATHERS", "category": "RAPTOR", "use_vitamins": true }
},
{
"if": { "u_has_trait": "ARM_FEATHERS" },
"then": [
{ "u_message": "<arm_feathers_success>", "popup": true },
{ "math": [ "u_progress_pre_arm_feathers", "=", "0" ] },
{ "u_lose_effect": "sleep" }
],
"else": {
"if": { "math": [ "u_vitamin('mutagen_bird')", ">=", "u_vitamin('mutagen_raptor')" ] },
"then": { "u_message": "<bird_failure>", "type": "bad", "snippet": true },
"else": { "u_message": "<raptor_failure>", "type": "bad", "snippet": true }
}
}
],
"false_effect": [
{
"if": {
"and": [
{ "u_has_effect": "sleep" },
{
"x_in_y_chance": { "x": { "math": [ "u_vitamin('mutagen_bird') + u_vitamin('mutagen_raptor') + u_vitamin('mutagen')" ] }, "y": 1500 }
},
{ "math": [ "time_since(u_limb_progress_timer)", ">=", "time('12 h')" ] }
]
},
"then": [
{ "u_message": "<arm_feathers_dream>", "snippet": true, "popup": true },
{ "u_lose_effect": "sleep" },
{ "math": [ "u_progress_pre_arm_feathers", "++" ] },
{ "math": [ "u_limb_progress_timer", "=", "time('now')" ] }
],
"else": [
{
"if": { "one_in_chance": 5 },
"then": {
"if": { "math": [ "u_vitamin('mutagen_bird')", ">=", "u_vitamin('mutagen_raptor')" ] },
"then": { "u_message": "<bird_failure>", "type": "bad", "snippet": true },
"else": { "u_message": "<raptor_failure>", "type": "bad", "snippet": true }
}
},
{
"if": { "one_in_chance": 10 },
"then": { "weighted_list_eocs": [ [ "EOC_ARM_PAIN", 2 ], [ "EOC_ARM_ITCH", 5 ] ] }
}
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_ARM_FEATHERS",
"//": "If you're on the way towards birdyness try growing wings. No failure message unless you're birdier than raptorier; check if you either have the bird thresh or are still pre-thresh",
"condition": {
"and": [
{ "math": [ "u_vitamin('mutagen_bird')", ">=", "300" ] },
{ "math": [ "u_vitamin('mutagen')", ">=", "300" ] },
{ "math": [ "u_progress_wings_bird", ">=", "3" ] },
{ "u_has_effect": "sleep" },
{ "math": [ "time_since(u_limb_progress_timer)", ">=", "time('12 h')" ] }
]
},
"effect": [
{ "u_mutate_towards": "WINGS_BIRD", "category": "BIRD", "use_vitamins": true },
{
"if": { "u_has_trait": "WINGS_BIRD" },
"then": [
{ "u_message": "<wings_bird_success>", "popup": true },
{ "math": [ "u_progress_wings_bird", "=", "0" ] },
{ "u_lose_effect": "sleep" }
],
"else": { "u_message": "<bird_failure>", "type": "bad", "snippet": true }
}
],
"false_effect": [
{
"if": {
"and": [
{ "u_has_effect": "sleep" },
{ "x_in_y_chance": { "x": { "math": [ "u_vitamin('mutagen_bird')" ] }, "y": 400 } },
{ "math": [ "u_vitamin('mutagen')", ">=", "300" ] },
{ "u_has_trait": "THRESH_BIRD" },
{ "math": [ "time_since(u_limb_progress_timer)", ">=", "time('12 h')" ] }
]
},
"then": [
{ "u_message": "<wings_bird_dream>", "snippet": true },
{ "u_lose_effect": "sleep" },
{ "math": [ "u_progress_wings_bird", "++" ] },
{ "math": [ "u_limb_progress_timer", "=", "time('now')" ] }
],
"else": [
{
"if": {
"and": [
{ "math": [ "u_vitamin('mutagen_bird')", ">", "200" ] },
{ "or": [ { "u_has_trait": "THRESH_BIRD" }, { "not": { "u_has_flag": "MUTATION_THRESHOLD" } } ] }
]
},
"then": [
{ "if": { "one_in_chance": 5 }, "then": { "u_message": "<bird_failure>", "type": "bad", "snippet": true } },
{
"if": { "one_in_chance": 10 },
"then": { "weighted_list_eocs": [ [ "EOC_ARM_DROP", 1 ], [ "EOC_ARM_PAIN", 2 ], [ "EOC_ARM_ITCH", 5 ] ] }
}
]
}
]
}
]
}
]
93 changes: 93 additions & 0 deletions data/mods/Limb_WIP/mutation_snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,99 @@
"category": "<eyes_stun>",
"text": [ "The world starts turning wildly, and you stumble." ]
},
{
"type": "snippet",
"category": "<arm_itch>",
"text": [
"Your arms start itching.",
"Something is crawling under your skin.",
"You pause for a moment. The movement under your skin doesn't."
]
},
{
"type": "snippet",
"category": "<arm_pain>",
"text": [ "Your arms hurt!", "Your arms cramp!", "Something shifts in your arm, painfully." ]
},
{
"type": "snippet",
"category": "<arm_drop>",
"text": [
"Your hands seize up for a moment, and you drop your weapon!",
"Your arms fall down paralyzed, and your weapon tumbles to the ground!"
]
},
{
"type": "snippet",
"category": "<bird_dream>",
"text": [
"You are but a child again, fighting over the dinner's remains with your brothers and sisters. There were times for mirth and playfulness, but this is not one of those - the time nears when the smallest will be cast aside, and you're all terrified of being chosen.",
"You soar above the plains, but the pickings are slim today. The shadows lengthen already, and you turn homewards with a flick of your wings, steeling yourself to the disappointed cries of your chicks and another hungry night. You must do better tomorrow, lest this year's brood will be lost too."
]
},
{
"type": "snippet",
"category": "<bird_failure>",
"text": [
"You long for the skies, to watch the tiny problems of the ground disappear below you.",
"You remember feeling less attached to the ground. What are you missing?",
"You need more if you are to fly South before the cold comes. Much more.",
"Is your beak strong enough? Your feathers long? No, you need more.",
"You need enough bird primer and catalyst in your system while you are sleeping to complete your change.",
"You won't be able to change without enough catalyst, the right primer and being asleep."
]
},
{
"type": "snippet",
"category": "<raptor_dream>",
"text": [
"You prowl the forest with your nestmates in search of prey - you're a strong brood with bright feathers and sharp talons, but fortune seems to elude you lately. You take them towards the edge of the forest, where the air always smells of smoke, and sneak up on a pack of monkeys with too-colorful fur sitting on a fallen tree and chattering amongst themselves. The smallest notices you and waves excitedly, just before you pounce.",
"You dream of blood on your talons, and the air catching your feathers as you try to balance on your struggling prey. It feels almost like a game, something you'd have played in a previous life. Lost in thought you almost miss the moment when the threshing grows still, until your brothers' screech brings you back to the present - time to eat."
]
},
{
"type": "snippet",
"category": "<raptor_failure>",
"text": [
"Slow. Too slow. Slower than prey.",
"You'll never wet your talons at this rate. You need to become better.",
"Scenes of a chase, claws, blood on the leaves flash before your eyes. You need more to truly understand it.",
"Not a care in the world, only the hunt. How you wish you were that far gone already.",
"You need enough raptor primer and catalyst in your system while you are sleeping to complete your change.",
"You won't be able to change without enough catalyst, the right primer and being asleep."
]
},
{
"type": "snippet",
"category": "<arm_feathers_dream>",
"text": [
"<bird_dream>",
"<raptor_dream>",
"You are desperate to stop your disgusting ape hands from pulling out handfuls of your beautiful feathers, but they move on their own accord. You manage to hold one of the useless things between your talons, and bring your beak down on it…Just a dream. Still, food for thought."
]
},
{
"type": "snippet",
"category": "<arm_feathers_success>",
"text": [
"You wake to a sudden itch in your arms, and you shake them vigorously. To your painful surprise a new cover of long, strong feathers broke the surface, bloody dead skin and plumage falling on the ground."
]
},
{
"type": "snippet",
"category": "<wings_bird_dream>",
"text": [
"<bird_dream>",
"Clouds surround you as you soar through the sky. You look down and see the wilderness stretching out as far as the eye can see, but you can't stay here. You need to go somewhere else, to the land of warmth and plenty. Your eyes wander over your beautiful wings propelling you along, and you're mesmerized by their rhythmic beating. Much better than your…hands. You have hands, not wings. Not yet."
]
},
{
"type": "snippet",
"category": "<wings_bird_success>",
"text": [
"You dream of jumping from a cliff for your first flight, but the feathers on your clumsy arms can't hold you. You hit the ground, and your hands are mangled beyond recognition. After waking, the pain persists, and you're startled to see your useless fingers snap and disappear in your rich plumage. Good riddance, you think, before falling unconscious."
]
},
{
"type": "snippet",
"category": "<insect_failure>",
Expand Down
Loading

0 comments on commit 9ebd717

Please sign in to comment.