fear.lua 319 B

1234567891011121314151617
  1. local fear = lib.object.create():include(lib.ability)
  2. fear.cooldown = 12
  3. function fear:canCast()
  4. return not self:isOnCooldown()
  5. end
  6. function fear:cast(owner, x, y)
  7. local target = lib.target.objectAtPosition(x, y)
  8. target.buffs:add('fear', { source = owner })
  9. self.lastCast = lib.tick.index
  10. end
  11. return fear