orendain / DemeoMods

Mods for the game of Demeo, as well as the Demeo modding framework, HouseRules.
MIT License
42 stars 11 forks source link

AbilityDamageAdjusted doesn't reset #315

Closed TheGrayAlien closed 2 years ago

TheGrayAlien commented 2 years ago

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.

orendain commented 2 years ago

Great catch, @TheGrayAlien! 🙏🏾

Looks like the issue is here: https://github.com/orendain/DemeoMods/blob/e2fabbd1f819e250884ba94b772da0ef550b6a12/HouseRules_Essentials/Rules/AbilityDamageAdjustedRule.cs#L51

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

jimconner commented 2 years ago

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 ],
    }
  },
TheGrayAlien commented 2 years ago

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.

orendain commented 2 years ago

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

jimconner commented 2 years ago

Pull request for AbilityDamageOverridden rule #318 raised for review.

orendain commented 2 years ago

Fixed by https://github.com/orendain/DemeoMods/pull/318.