package MoveSpeed import SetupObject public constant INC_SPEED_ID = 'A01E' public constant DEC_SPEED_ID = 'A01H' function onChangeSpeed() let id = GetSpellAbilityId() let caster = GetSpellAbilityUnit() let data = caster.getEntity() if (id == INC_SPEED_ID or id == DEC_SPEED_ID) and data instanceof SetupObject let ddata = data castTo SetupObject let speed = (ddata.setup.getMoveSpeed() / 25.).round() * 25. if id == INC_SPEED_ID if speed <= 500. ddata.setup.setMoveSpeed(speed + 25.) ddata.actor.setMoveSpeed(speed + 25.) createFText(data.getPos(), vec2(0, 0.05), (speed + 25.).toString(), 10, 2., colorA(255,255,255,0), ddata.owner) else if id == DEC_SPEED_ID if speed > 50.5 ddata.setup.setMoveSpeed(speed - 25.) ddata.actor.setMoveSpeed(speed - 25.) createFText(data.getPos(), vec2(0, 0.05), (speed-25.).toString(), 10, 2., colorA(255,255,255,0), ddata.owner) init EventListener.add(EVENT_PLAYER_UNIT_SPELL_CAST, () -> onChangeSpeed()) @compiletime function genAbils()