-
November 15th, 2019, 00:10 #11
You can do this without do any coding.
Use the effect IMMUNE: critical on the creature wearing adamantine armour and they won't take any critical damage. See the following example, the critical damage (green dice) is ignored because the target had the IMMUNE: critical effect:
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
November 15th, 2019, 00:16 #12
The immune code is ran in getDamageAdjust which, as I previously mentioned, is ran in the applyDamage function - which is basically the last process to run in the application of damage - running via OOB messaging on the GM instance for each target of the damage action.
Here you see the IMMUNE effect being checked:
Code:function getDamageAdjust(rSource, rTarget, nDamage, rDamageOutput) local nDamageAdjust = 0; local bVulnerable = false; local bResist = false; -- Get damage adjustment effects local aImmune = getReductionType(rSource, rTarget, "IMMUNE"); local aVuln = getReductionType(rSource, rTarget, "VULN"); local aResist = getReductionType(rSource, rTarget, "RESIST");
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
November 15th, 2019, 03:11 #13
HA! Figures.
So, the issue with how my extension currently works is that when a target has the "IMMUNE:critical" effect, and my extension is set to max damage dice and roll critical dice, the critical dice are ignored as expected, but the damage dice is stilll maxxed. I don't have a problem with this result, but some might want to ignore everything about the critical hit and roll damage normally, essentially ignoring the effects of my extension.
I may look into that method - if a critical hit is rolled, and the target is immune to critical hits, then use the normal damage handler, else use mine.
Thanks for all the help with this!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks