I'm currently looking at SupCom FA buff system, and i wanna to make a test.
I define a new BuffBlueprint :
- Code: Select all
BuffBlueprint {
Name = 'TestBoost',
DisplayName = 'TestBoost',
BuffType = 'GlobalBoost',
Stacks = 'REPLACE',
Duration = 60,
Affects = {
MaxHealth = {
Add = 0,
Mult = 1.5,
},
MoveMult = {
Add = 0,
Mult = 1.5,
},
Damage = {
Add = 300,
Mult = 1.5,
},
},
}
It do just for 60s a +50% Health bonus, a +50% speed, acceleration and turn rate bonus, and a +300 and +50% Weapon bonus.
Then i call it in my mod during the unit creation like this :
- Code: Select all
Buff.ApplyBuff( self, 'TestBoost')
Everything works fine, the 60s time, the Health bonus, the speed bonus, all are ok.
But the damage bonus doesn't work.
I checked the code, and it seems that this method in the buff.lua at line 263 simply do nothing :
- Code: Select all
local wep = unit:GetWeapon(i)
wep:ChangeDamage(val)
Do you know if the ChangeDamage method is active ? Any idea why it doesn't work. I've got no warning or error message in the log.