[Magiclysm] Add Shifter druid profession + wildshifts #74988
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Mods "[Magiclysm] Add Shifter druid profession + wildshifts"
Purpose of change
I had the idea to add a surviving druid you could go to a quest for and, if you're a druid, they would teach you the ancient druidic art of transforming into an animal...but I realized doing the entire thing in one PR would be huge, so here's the actual transformations and a profession that starts with 1.
Describe the solution
Add the Shifter Druid profession, a druid who concentrated more on the ancient art of transformation than druidic magic. They start with the ability to transform into one type of animal: bear (tough, good in combat, strong), deer (fast, very good at running, can fight with antlers if necessary), or raven (can't fight basically at all, very fragile, but can fly). An EoC lets them pick one at the beginning of the game.
Since they spent most of their time studying the art of shifting, they only start with a single spell (Nature's Communion).
It costs 50 mana to transform and you can spend as long as you like in each form, but the form cannot cast spells and you do not regenerate mana while transformed. You cannot talk to anyone in animal form and you cannot craft anything, and hopefully eventually you won't be able to pick anything up or open doors in animal form either, but at the moment there's no easy way to prevent those while still allowing you to do other things.
To help with infrastructure for this (and future similar projects), I edited the NON_MAGICAL spell flag, currently used only three times (and not at all in Magiclysm) so that spells with it are not blocked by the NO_SPELLCASTING character flag.
Describe alternatives you've considered
Testing
Each form works, forms are mutually exclusive, and you cannot transform into a form if you already have a form. NON_MAGICAL allows spell (ravens flying upward implemented as a spell) even through NO_SPELLCASTING.
The disadvantage I'm not sure how to overcome is size flags--bears are HUGE and ravens are TINY, but the flags are checked in order from smallest to largest. That means if you're a goblin, who have the TINY flag, the checking stops there and your size isn't actually increased when you transform into a bear.
Looks like I might need to add special handling to mutation.cpp line 488 to handle shapeshifted size (
SHAPESHIFT_SIZE_TINY
etc and aTEMPORARY_SHAPESHIFT
flag ), so they're checked before regular size. I can do that in a follow-up PR.Additional context