Files
NGECore2/scripts/buffs/buildabuff_inspiration.py
T
Treeku d1fff9e069 Fixed buff duration check, fixed group buffs
- The duration needed to be set on the buff object "before "the buff is
actually added.  Because of this, I made the distinction between setup(0
(setting up the buff object) and add() (adding the buff stats to the
player).

- Group buffs would add the buff based on each individual player's
skillmods instead of the buffer's.  Due to this, I made a "buffer"
parameter for doAddBuff().  If there is a buffer, regardless of it's a
buffer within our group, we can specify them, otherwise provide null.
2014-03-22 02:07:53 +00:00

26 lines
681 B
Python

from resources.common import BuffBuilder
import sys
def setup(core, actor, buff):
return
def add(core, actor, buff):
buffWorkshop = actor.getAttachment('buffWorkshop')
if buffWorkshop is None:
return
buff.setDuration(3600) #1 hour
for BuffItem in buffWorkshop:
core.skillModService.addSkillMod(actor, BuffItem.getSkillName(), BuffItem.getAffectAmount())
return
def remove(core, actor, buff):
for BuffItem in actor.getAttachment('buffWorkshop'):
core.skillModService.deductSkillMod(actor, BuffItem.getSkillName(), BuffItem.getAffectAmount())
actor.setAttachment('buffWorkshop', 'none')
return