Belfahar
New Member
- Joined
- Jul 21, 2016
- Messages
- 25
- Reaction score
- 3
Hi everyone, I opened another topic because the last one was about Attributes, and they are different things. Let's get into it; I'm dealing with the item upgrade script. I managed to reach a solution, and the item receives the condition, and when the player equips it, it works.
Now my problem is:
If the Helmet gives +10 critical damage and the Armor gives +10 critical damage
The result should be a 20% buff.
However, in the application, it cancels the first one and applies the conditions of the second one. Below is how I set the conditions:
The conditions are in separate scripts.
Now my problem is:
If the Helmet gives +10 critical damage and the Armor gives +10 critical damage
The result should be a 20% buff.
However, in the application, it cancels the first one and applies the conditions of the second one. Below is how I set the conditions:
Lua:
local helmetcondition = Condition(CONDITION_ATTRIBUTES)
local tier = tonumber(currentDescription:match("%((%d+)%)"))
helmetcondition:setParameter(CONDITION_PARAM_SKILL_CRITICAL_HIT_CHANCE, 1 * tier)
helmetcondition:setParameter(CONDITION_PARAM_STAT_MAXMANAPOINTSPERCENT, 2 * tier)
helmetcondition:setParameter(CONDITION_PARAM_BUFF_DAMAGEDEALT, 1 * tier)
helmetcondition:setParameter(CONDITION_PARAM_SUBID, 7588)
helmetcondition:setTicks(-1)
player:addCondition(helmetcondition)
Lua:
local armorcondition = Condition(CONDITION_ATTRIBUTES)
local tier = tonumber(currentDescription:match("%((%d+)%)"))
armorcondition:setParameter(CONDITION_PARAM_SKILL_CRITICAL_HIT_DAMAGE, 1 * tier)
armorcondition:setParameter(CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT, 1 * tier)
armorcondition:setParameter(CONDITION_PARAM_BUFF_DAMAGEDEALT, 1 * tier)
armorcondition:setParameter(CONDITION_PARAM_SUBID, 7589)
armorcondition:setTicks(-1)
player:addCondition(armorcondition)
The conditions are in separate scripts.