DICE PACKS BUNDLE
Page 2 of 2 First 12
  1. #11
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Quote Originally Posted by TheoGeek View Post
    Yeah, I'm trying to address the issue of the target having adamantine armor (or any other crit immune effect).
    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:

    Attached Images Attached Images
    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!

  2. #12
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    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");
    Quote Originally Posted by TheoGeek View Post
    This is largely a coding exercise for me ...
    Yeah, you picked probably the most complex process in FG for your exercise!
    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!

  3. #13
    Quote Originally Posted by Trenloe View Post
    Yeah, you picked probably the most complex process in FG for your exercise!
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Character Create Playlist

Log in

Log in