I'm working on a skill that consumes all current SP, then deals damage equal to that amount.
I figured I'd use a state on the caster so the game knows how much SP was consumed when it reached the damage dealing stage, eg:
As configured above, I get:
Is there a way to increase this cap?
I figured I'd use a state on the caster so the game knows how much SP was consumed when it reached the damage dealing stage, eg:
Code:
function Skill_MD_Begin ( role , sklv )
local sp = Sp(role)
local sp_reduce = sp
--print("Current values are sp "..sp.." and sp_reduce "..sp_reduce)
if sp - sp_reduce < 0 then
--print("Check NOK")
SkillUnable(role)
return
else
--print("Adding STATE MD")
end
Sp_Red (role , sp_reduce )
print("Adding state with level of "..sp_reduce)
AddState( role , role , STATE_MD, sp_reduce , 1000 )
local StateLv = GetChaStateLv ( role , STATE_MD )
print("statelevel of "..StateLv)
end
function Skill_MD_End ( ATKER , DEFER , sklv )
print("Getting State LV")
local StateLv = GetChaStateLv ( ATKER , STATE_MD )
local spr_stat = Sta(ATKER)
local hpdmg = spr_stat * 6 * StateLv
print("Dealing "..hpdmg.." damage")
Hp_Endure_Dmg( DEFER , hpdmg )
RemoveState(ATKER, STATE_MD)
end
function State_MD_Add ( role , statelv )
print("State MD has been added")
end
As configured above, I get:
Only when I use values below 10 do I actually get the state to be parsed:Adding state with level of 138
statelevel of 0
Adding state with level of 7
State MD has been added
statelevel of 7
Is there a way to increase this cap?