mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-09-11 21:45:43 -04:00
Better example of adding expertise abilities
This commit is contained in:
@@ -1,48 +1,14 @@
|
||||
import sys
|
||||
|
||||
def addExpertisePoint(core, actor):
|
||||
|
||||
player = actor.getSlottedObject('ghost')
|
||||
|
||||
if not player:
|
||||
return
|
||||
|
||||
if not player.getProfession() == 'medic_1a':
|
||||
return
|
||||
|
||||
actor.addSkill('expertise_me_enhance_agility_1')
|
||||
|
||||
|
||||
addAbilities(core, actor, player)
|
||||
|
||||
return
|
||||
|
||||
def removeExpertisePoint(core, actor):
|
||||
|
||||
player = actor.getSlottedObject('ghost')
|
||||
|
||||
if not player:
|
||||
return
|
||||
|
||||
if not player.getProfession() == 'medic_1a':
|
||||
return
|
||||
|
||||
actor.removeSkill('expertise_me_enhance_agility_1')
|
||||
|
||||
|
||||
removeAbilities(core, actor, player)
|
||||
|
||||
return
|
||||
|
||||
# this checks what abilities the player gets by level, need to also call this on level-up
|
||||
def addAbilities(core, actor, player):
|
||||
|
||||
actor.addAbility('me_enhance_agility_1')
|
||||
|
||||
if actor.getLevel() >= 10:
|
||||
actor.addAbility("me_enhance_agility_1")
|
||||
if actor.getLevel() >= 34:
|
||||
actor.addAbility("me_enhance_agility_2")
|
||||
if actor.getLevel() >= 62:
|
||||
actor.addAbility("me_enhance_agility_3")
|
||||
return
|
||||
|
||||
def removeAbilities(core, actor, player):
|
||||
|
||||
actor.removeAbility('me_enhance_agility_1')
|
||||
|
||||
actor.removeAbility("me_enhance_agility_1")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user