-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reimplement Raise Dead (and related) logic (#797)
* Reimplement resurrection logic with aasimar/tiefling cases * Try to address some build errors. * More fixes Lift local variables out of switch Use dispatcher key type instead of query/signal * Add some logging to observe what's going on with Raise Dead * Use info instead of debug * A bit more logging to try to see what's going on. * Logging type errors. * Another try to see any output from replaced Resurrect * Try modifying Resurrect replacement type I was assuming that the rebased version had a correct type, but perhaps it wasn't. * More logging, tweaked Resurrect result. * Try implementing ResurrectApplyPenalties Pulling the one from the DLL didn't seem to be working. * Fix errors * Trying to figure out Resurrect API - Stripped out most logging - Rolled back the replacement function to take the unknown argument and return a result. Logging the unknown argument to see what it is in some cases. - Casting Raise Dead causes a double message, so one theory is that the unknown argument determines whether the resurrection function should float text. * Type error * Unknown argument is caster level * Remove logging * Add native outsiders and use them in resurrection check Removed Darley check in anticipation of just tagging her as native. * Add mc_subtype_native to Darley proto overrides I think this won't parse yet, but we'll see. * Add logging to make sure correct path is being followed. * Use correct hit dice numbers in resurrection * C++ brackets Removed informative logging. * Parse mc_subtype_native in protos * Add mc_subtype_native to Tiefling and Aasimar * There are two protos for each race * Remove Raise Dead script workaround * Eliminate XP setting from Raise Dead script The original temple dll set the XP, but it seems like the value it set was incorrect. I've made the reimplementation set the right XP in the case where it isn't adding a negative level (which already resets the target's XP). This should also have the effect of making the set XP value correct w/r/t level drain, level adjustment, and racial hit dice, which the script wasn't (because I don't think it has any easy way to get that number right now). * Capitalization error * Tweak raise penalty XP Using hit dice is not correct. The penalty XP should be for 1 below the creature's effective level. * Make the object script call in raise dead a bit more obvious * Renamek 'unknown' variable in python resurrect() * Fix perm level drain XP penalty to account for ECL * Add filtering to GetLevel query * Attempt to fix some errors * More error fixes * Fix level drain filtering expressions * Try an alternate namespacing directive * Give up on enum class `using` * Add a function for effective drained level, and uses. * Fix a bad variable reference * Set target level for perm levels based on ECL. This controls when XP gain removes the drained level. Setting it based on just the hit dice num means that level adjusted characters get back their levels too early. * Get rid of float message in resurrection function Messages are already floated in the spell conditions, so only other scripts, like Cuthbert/Iuz resurrection would be needing these, and they could test the result and float their own lines if they wanted. Probably not necessary, though. * Replace Jaroo permanent spell implementation The existing one used his Reincarnate spell to clear the character's status by killing them first. Now that will add a negative level on strict rules. That could be worked around, but instead I just changed the script to fake him casting the spell, and used the Cuthbert resurrection mode which has no negative effects and is completely unrestricted. This makes it insensitive to any changes to Reincarnate, as well. * Give Reincarnate script the same treatment as the others. No XP setting and san_resurrect instead of constant 18 * Do san_resurrect in Jaroo fix, and document a bit more * Move the san_resurrect call directly into the resurrect function Avoids needing to figure out how to get the right constant in the Jaroo file, and I think it might fix some other cases where the resurrect function is called directly without also calling the object script. * Change filtering logic for built-in negative level conditions. The existing logic was forgetting about the various aligned equipment conditions as sources of negative levels. They share the function that applies the negative level, but have various names other than `Temp Negative Level`. * Operator precedence of new logic was wrong * Add some features to forget spell functions - Forgotten spells can be moved to pending instead of deleted from the array - A percentage chance can be provided so not every spell is forgotten * Fix some issues with the spell functions * Add 50% spell forget chance to Raise Dead * Add a function for using up a spontaneous slot * Fix some typos * Add spontaneous multi-deduction function * Fix typo * More typos * Fix another mismatch * Expose spontaneous spell deduction in python * Attempt to fix problem with python wrapper * Set bit in class code when deducting spells For some reason the class code for spells needs to have the 7th bit set, it seems. * Missed a renaming * Deduct spontaneous spells when raising
- Loading branch information
Showing
21 changed files
with
373 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.