Skip to content

Commit

Permalink
[XE/Magiclysm] Update Giant Growth with new TEMPORARY_SHAPESHIFT fl…
Browse files Browse the repository at this point in the history
…ag (#75066)

* Add shapeshift flags

* Size calculations in EoCs

* Add TEMPORARY_SHAPESHIFT

* Account for size-based calories
  • Loading branch information
Standing-Storm authored Jul 17, 2024
1 parent d37ab3e commit e9e740f
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 8 deletions.
25 changes: 22 additions & 3 deletions data/mods/Magiclysm/Spells/biomancer.json
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,18 @@
"condition": { "and": [ { "not": { "u_has_trait": "HUGE" } }, { "not": { "u_has_trait": "HUGE_OK" } } ] },
"effect": [
{ "u_message": "Your body swells and warps as your size increases!", "type": "good" },
{ "math": [ "u_preshift_size", "=", "u_val('size')" ] },
{
"switch": { "math": [ "u_preshift_size" ] },
"cases": [
{ "case": 1, "effect": [ { "math": [ "u_calories()", "*=", "12" ] } ] },
{ "case": 2, "effect": [ { "math": [ "u_calories()", "*=", "6" ] } ] },
{ "case": 3, "effect": [ { "math": [ "u_calories()", "*=", "2" ] } ] },
{ "case": 4, "effect": [ { "math": [ "u_calories()", "*=", "1.5" ] } ] },
{ "case": 5, "effect": [ ] }
]
},
{ "u_add_trait": "BIO_GIANT_GROWTH" },
{ "math": [ "u_calories()", "+=", "100000" ] },
{
"queue_eocs": "EOC_GIANT_GROWTH_MUTATION_REMOVE",
"time_in_future": { "math": [ "(( u_spell_level('biomancer_giant_growth') * 40 ) + 300 )" ] }
Expand All @@ -501,8 +511,17 @@
"id": "EOC_GIANT_GROWTH_MUTATION_REMOVE",
"effect": [
{ "u_message": "Your body shrinks and warps as your size decreases!", "type": "bad" },
{ "u_lose_trait": "BIO_GIANT_GROWTH" },
{ "math": [ "u_calories()", "-=", "100000" ] }
{
"switch": { "math": [ "u_preshift_size" ] },
"cases": [
{ "case": 1, "effect": [ { "math": [ "u_calories()", "/=", "12" ] } ] },
{ "case": 2, "effect": [ { "math": [ "u_calories()", "/=", "6" ] } ] },
{ "case": 3, "effect": [ { "math": [ "u_calories()", "/=", "2" ] } ] },
{ "case": 4, "effect": [ { "math": [ "u_calories()", "/=", "1.5" ] } ] },
{ "case": 5, "effect": [ ] }
]
},
{ "u_lose_trait": "BIO_GIANT_GROWTH" }
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion data/mods/Magiclysm/mutations/temporary.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"ugliness": 8,
"mixed_effect": true,
"description": "Magic has made you grow to enormous size!",
"flags": [ "HUGE" ],
"flags": [ "TEMPORARY_SHAPESHIFT", "SHAPESHIFT_SIZE_HUGE" ],
"restricts_gear": [ "torso", "leg_l", "leg_r", "arm_l", "arm_r", "hand_l", "hand_r", "head", "foot_l", "foot_r" ],
"social_modifiers": { "intimidate": 15 },
"enchantments": [
Expand Down
25 changes: 22 additions & 3 deletions data/mods/Xedra_Evolved/items/comestibles/goblin_fruits.json
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,18 @@
"condition": { "and": [ { "not": { "u_has_trait": "HUGE" } }, { "not": { "u_has_trait": "HUGE_OK" } } ] },
"effect": [
{ "u_message": "Your body swells and warps as your size increases!", "type": "good" },
{ "math": [ "u_preshift_size", "=", "u_val('size')" ] },
{
"switch": { "math": [ "u_preshift_size" ] },
"cases": [
{ "case": 1, "effect": [ { "math": [ "u_calories()", "*=", "12" ] } ] },
{ "case": 2, "effect": [ { "math": [ "u_calories()", "*=", "6" ] } ] },
{ "case": 3, "effect": [ { "math": [ "u_calories()", "*=", "2" ] } ] },
{ "case": 4, "effect": [ { "math": [ "u_calories()", "*=", "1.5" ] } ] },
{ "case": 5, "effect": [ ] }
]
},
{ "u_add_trait": "GOBLIN_FRUIT_GIANT_GROWTH" },
{ "math": [ "u_calories()", "+=", "100000" ] },
{ "queue_eocs": "EOC_GOBLIN_FRUIT_GIANT_GROWTH_REMOVE", "time_in_future": { "math": [ "3000 + rand(10000)" ] } }
],
"false_effect": [ { "u_message": "You eat the goblin fruit but nothing happens. Oh well." } ]
Expand All @@ -463,8 +473,17 @@
"id": "EOC_GOBLIN_FRUIT_GIANT_GROWTH_REMOVE",
"effect": [
{ "u_message": "Your body shrinks and warps as your size decreases!", "type": "mixed" },
{ "u_lose_trait": "GOBLIN_FRUIT_GIANT_GROWTH" },
{ "math": [ "u_calories()", "-=", "100000" ] }
{
"switch": { "math": [ "u_preshift_size" ] },
"cases": [
{ "case": 1, "effect": [ { "math": [ "u_calories()", "/=", "12" ] } ] },
{ "case": 2, "effect": [ { "math": [ "u_calories()", "/=", "6" ] } ] },
{ "case": 3, "effect": [ { "math": [ "u_calories()", "/=", "2" ] } ] },
{ "case": 4, "effect": [ { "math": [ "u_calories()", "/=", "1.5" ] } ] },
{ "case": 5, "effect": [ ] }
]
},
{ "u_lose_trait": "GOBLIN_FRUIT_GIANT_GROWTH" }
]
}
]
2 changes: 1 addition & 1 deletion data/mods/Xedra_Evolved/mutations/temporary.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"ugliness": 8,
"mixed_effect": true,
"description": "Eating that goblin fruit has made you grow to enormous size!",
"flags": [ "HUGE" ],
"flags": [ "TEMPORARY_SHAPESHIFT", "SHAPESHIFT_SIZE_HUGE" ],
"restricts_gear": [ "torso", "leg_l", "leg_r", "arm_l", "arm_r", "hand_l", "hand_r", "head", "foot_l", "foot_r" ],
"social_modifiers": { "intimidate": 15 },
"enchantments": [
Expand Down

0 comments on commit e9e740f

Please sign in to comment.