SkipIntro

SkipIntro

454 Downloads

AbilityDamageAdjusted doesn't reset

TheGrayAlien opened this issue ยท 6 comments

commented

After playtesting a few games in a row using the same mod I realized my Wizard's zap was hitting for 8 instead of 2. It seems AbilityDamageAdjusted isn't resetting after each session ends and is instead becoming additive each new successive game.

commented

Great catch, @TheGrayAlien! ๐Ÿ™๐Ÿพ

Looks like the issue is here:

originals[replacement.Key] = ability.abilityDamage.targetDamage;

Will get a fix out at some point unless someone beats me to it.

commented

We could be super-lazy here and just do...

originals[replacement.Key] = -replacement.Value;

... but I think we have a second issue that we're always forcing critDamage to 2*targetDamage, even when Deactivating. We should probably revisit how we're handling CritDamage here too. Maybe we should change this rule to an Overridden one and have it take a list of the new settings?

Something like this...

  {
    "Rule": "AbilityDamageOverridden",
    "Config": {
      "Zap": [ 2, 5 ],
      "Arrow": [ 3,8 ] ,
      "Blink": [ 5, 20 ],
    }
  },
commented

Pull request for AbilityDamageOverridden rule #318 raised for review.

commented

Yes, that would definitely be better if it can be managed. As it is right now I can allow characters to have specified critical melee damage but can't allow it for abilities.

commented

I completely agree. Definitely better to be explicit about the values to manage.

commented

Fixed by #318.