devilutionX icon indicating copy to clipboard operation
devilutionX copied to clipboard

Changing Oil of Death application

Open thebigMuh opened this issue 4 years ago • 3 comments

See companion discussion #2022

This changes Oil of Death as follows:

  • The base functionality remains as previously - if MaxDmg - MinDmg < 30, it will raise MinDmg by 1 and MaxDmg by 2.
  • It allows applying Oil of Death even when MaxDmg - MinDmg >= 30. In that case it will calculate the damage increase as an upgrade, bumping MinDmg and MaxDmg by 1.
  • Regardless of how many Oil of Sharpness or Weird Shrines have been used, the total number of applications remains the same.

thebigMuh avatar May 20 '21 23:05 thebigMuh

Btw - I'm not sure if I actually have to call RecreateItem, or if it would be enough to lookup the item using its ID in the AllItemsList, and fetch the min/max damage from there. The current implementation is the 'better safe than sorry' version.

thebigMuh avatar May 25 '21 18:05 thebigMuh

Btw - I'm not sure if I actually have to call RecreateItem, or if it would be enough to lookup the item using its ID in the AllItemsList, and fetch the min/max damage from there. The current implementation is the 'better safe than sorry' version.

AllItemsList is a lot safer then recreating the item. If the item was migrated from hellfire to diablo i would morph.

AJenbo avatar May 25 '21 19:05 AJenbo

AllItemsList is a lot safer then recreating the item. If the item was migrated from hellfire to diablo i would morph.

Well, the oils are Hellfire only, so that shouldn't be an issue. But I'm changing it nonetheless, it's far simpler code that way.

thebigMuh avatar May 25 '21 19:05 thebigMuh