Enhancing Sword Latent Effects and Enspell day/weather bonus
Posted: Sat Dec 07, 2013 1:08 pm
ok I've added the ensword latents, the sql records are in a separate file because my tortoisesvn was shitting the bed trying to make a patch of the item_latents.sql
I've also removed the +5 damage ensword bonus from the magic.lua and moved it into the CalculateEnspellDamage function inside battleutils
this way it will effect both tier 1 and 2 enspells like its meant to (+5 dmg bonus added after normal damage calc)
ALSO added day(10%) and weather (10%/25%) bonuses to the same function
bonus info sourced: http://wiki.ffxiclopedia.org/wiki/Red_M ... lculations
someone please test my battleutils ! I don't have a compiler installed lol
ETA a couple of changes - after some extensive testing I determined that the current calculations for enhancing skill were doubling up on enhancing gear bonuses (i.e. it was calling GetSkill() from the battleentity class which already takes into account the gear bonuses AND adding the enhancing modifier to it again. this resulted in every piece of gear that adds +15 enhancing skill actually adding +30 for purposes of damage calculation. both the calcs for the enspell2 in the battleutils and the enspell1 in the magic.lua were making this error)
also, in the battleutils the calcs for enspell2 are using integer division, which always results in the remainder being discarded, whereas in the magic.lua, the remainders were being rounded up or down accordingly. I'm not 100% sure what retail behavior is for rounding, but I'm assuming it always discards the remainder, as other calcs in DS seem to indicate this. so, in any case, I've changed the magic.lua to add math.floor() to the calcs to make them consistent with the battleutils.
If retail does in fact use rounding, I will change the lua back and adjust the cpp, but I think it's better that they are consistent.
I've also removed the +5 damage ensword bonus from the magic.lua and moved it into the CalculateEnspellDamage function inside battleutils
this way it will effect both tier 1 and 2 enspells like its meant to (+5 dmg bonus added after normal damage calc)
ALSO added day(10%) and weather (10%/25%) bonuses to the same function
bonus info sourced: http://wiki.ffxiclopedia.org/wiki/Red_M ... lculations
someone please test my battleutils ! I don't have a compiler installed lol
ETA a couple of changes - after some extensive testing I determined that the current calculations for enhancing skill were doubling up on enhancing gear bonuses (i.e. it was calling GetSkill() from the battleentity class which already takes into account the gear bonuses AND adding the enhancing modifier to it again. this resulted in every piece of gear that adds +15 enhancing skill actually adding +30 for purposes of damage calculation. both the calcs for the enspell2 in the battleutils and the enspell1 in the magic.lua were making this error)
also, in the battleutils the calcs for enspell2 are using integer division, which always results in the remainder being discarded, whereas in the magic.lua, the remainders were being rounded up or down accordingly. I'm not 100% sure what retail behavior is for rounding, but I'm assuming it always discards the remainder, as other calcs in DS seem to indicate this. so, in any case, I've changed the magic.lua to add math.floor() to the calcs to make them consistent with the battleutils.
If retail does in fact use rounding, I will change the lua back and adjust the cpp, but I think it's better that they are consistent.