my first spell to work on
Posted: Wed Mar 06, 2019 7:08 am
Please correct me if i am wrong
i modified the above spell script since it did not have the data for the spell passed to it by adding STA,AGI,BA,MvP,resists
problems i noticed
1. when tracing through the lua addspellbonus, for STA ,0 was passed to value instead of .7 i am guessing cuz this line
only accepts whole numbers and not decimal??
2. same thing for STA passed 0 but when i add manually(ie replace the AGI with 20) my AGI does increase
3. still testing BA and MvP (possible struct issue for displaying
4. resists updated correctly on character sheet
if i am correct about only getting 0 from a .7 value cuz its an int then we should change that because there are many stats that increase by decimal .7, 1.2,78.5 etc
Code: Select all
--[[
Script Name : Spells/Scout/Rogue/Swashbuckler/Bladeweaver.lua
Script Author : Jabantiz
Script Date : 2013.12.16 01:12:03
Script Purpose :
:
--]]
function cast(Caster, Target,STA,AGI,BA,MvP,resists)
-- Increases STA of caster by 0.7
AddSpellBonus(Target, 1, STA)
-- Increases AGI of caster by 15.0
AddSpellBonus(Target, 2, AGI)
-- Adds 14.0% to base avoidance.
AddSpellBonus(Target, 696, BA)
-- Increases Mitigation of caster vs physical damage by 82
AddSpellBonus(Target, 200, MvP)
-- Increases Mitigation of caster vs elemental, noxious and arcane damage by 183
AddSpellBonus(Target, 201, resists)
AddSpellBonus(Target, 202, resists)
AddSpellBonus(Target, 203, resists)
end
function remove(Caster, Target)
RemoveSpellBonus(Target)
endproblems i noticed
1. when tracing through the lua addspellbonus, for STA ,0 was passed to value instead of .7 i am guessing cuz this line
Code: Select all
sint32 value = lua_interface->GetSInt32Value(state, 3);2. same thing for STA passed 0 but when i add manually(ie replace the AGI with 20) my AGI does increase
3. still testing BA and MvP (possible struct issue for displaying
4. resists updated correctly on character sheet
if i am correct about
Code: Select all
sint32 value = lua_interface->GetSInt32Value(state, 3);