mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-14 00:02:07 -04:00
- 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.
27 lines
1.2 KiB
Python
27 lines
1.2 KiB
Python
import sys
|
|
|
|
def setup(core, actor, buff):
|
|
buff.setDuration(buff.getDuration()+(actor.getSkillModBase('expertise_buff_duration_line_fs_force_run')))
|
|
return
|
|
|
|
def add(core, actor, buff):
|
|
actor.playEffectObject('clienteffect/pl_force_run.cef', 'fs_force_run')
|
|
actor.playEffectObject('appearance/pt_force_speed.prt', 'fs_force_run')
|
|
actor.setSpeedMultiplierBase(actor.getSpeedMultiplierBase() + 2.5 + (2.5 * (actor.getSkillModBase('expertise_movement_buff_fs_force_run')) / 100))
|
|
core.skillModService.addSkillMod(actor, 'slope_move', 5)
|
|
core.skillModService.addSkillMod(actor, 'movement_resist_snare', 100)
|
|
core.skillModService.addSkillMod(actor, 'movement_resist_root', 100)
|
|
|
|
##For Testing Purposes
|
|
##actor.sendSystemMessage('You are running at ' + str(actor.getSpeedMultiplierBase()) + ' times the running speed.', 0)
|
|
|
|
return
|
|
|
|
def remove(core, actor, buff):
|
|
actor.stopEffectObject('fs_force_run')
|
|
actor.setSpeedMultiplierBase(actor.getSpeedMultiplierBase() - 2.5 - (2.5 * (actor.getSkillModBase('expertise_movement_buff_fs_force_run')) / 100))
|
|
core.skillModService.deductSkillMod(actor, 'slope_move', 5)
|
|
core.skillModService.deductSkillMod(actor, 'movement_resist_snare', 100)
|
|
core.skillModService.deductSkillMod(actor, 'movement_resist_root', 100)
|
|
return
|