from core.tuning.skill import SkillTuning
from siege import game


class Haste(object):
    NAME = "Haste"
    ICON = SkillTuning.HASTE.ICON

    def __init__(self, owner, level, duration):
        self.adjustment = 5 + level
        self.adjustment = owner.stats.SPD.adjust(self.adjustment)

    def onRemove(self, owner):
        owner.stats.SPD.adjust(-self.adjustment)

    def isPositive(self):
        return True

    @staticmethod
    def register():
        game.effects.register(Haste.NAME, Haste)
