Skip to content

Commit

Permalink
create default cooldown values.
Browse files Browse the repository at this point in the history
other small fixes in spells (min level and mana).
  • Loading branch information
elsongabriel committed Jan 24, 2024
1 parent 28dbaef commit 70e5107
Show file tree
Hide file tree
Showing 165 changed files with 334 additions and 326 deletions.
8 changes: 8 additions & 0 deletions data-otservbr-global/scripts/lib/register_spells.lua
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,14 @@ RANGE = {
[19] = { 1, 2 },
}

DEFAULT_COOLDOWN = {
RUNE = 3 * 1000, -- 3 secs
RUNE_GROUP = 2 * 1000, -- 2 secs

SPELL = 3 * 1000, -- 3 secs
SPELL_GROUP = 2 * 1000, -- 2 secs
}

function Creature:addDamageCondition(target, conditionType, listType, damage, time, rounds)
if target:isImmune(conditionType) then
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ spell:isPremium(false)
spell:range(3)
spell:needCasterTargetOrDirection(true)
spell:blockWalls(true)
spell:cooldown(2 * 1000)
spell:groupCooldown(2 * 1000)
spell:cooldown(DEFAULT_COOLDOWN.SPELL)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true")
spell:register()
2 changes: 1 addition & 1 deletion data-otservbr-global/scripts/spells/attack/berserk.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spell:mana(115)
spell:isPremium(true)
spell:needWeapon(true)
spell:cooldown(4 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("knight;true", "elite knight;true")
spell:register()
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spell:needTarget(true)
spell:blockWalls(true)
spell:needWeapon(true)
spell:cooldown(6 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("knight;true", "elite knight;true")
spell:register()
4 changes: 2 additions & 2 deletions data-otservbr-global/scripts/spells/attack/buzz.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ spell:isPremium(false)
spell:range(3)
spell:needCasterTargetOrDirection(true)
spell:blockWalls(true)
spell:cooldown(2 * 1000)
spell:groupCooldown(2 * 1000)
spell:cooldown(DEFAULT_COOLDOWN.SPELL)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("sorcerer;true", "master sorcerer;true")
spell:register()
2 changes: 1 addition & 1 deletion data-otservbr-global/scripts/spells/attack/chill_out.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spell:isPremium(false)
spell:range(1)
spell:needDirection(true)
spell:cooldown(4 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("druid;true", "elder druid;true")
spell:register()
2 changes: 1 addition & 1 deletion data-otservbr-global/scripts/spells/attack/curse.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spell:range(3)
spell:needTarget(true)
spell:blockWalls(true)
spell:cooldown(40 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("sorcerer;true", "master sorcerer;true")
spell:register()
4 changes: 2 additions & 2 deletions data-otservbr-global/scripts/spells/attack/death_strike.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ spell:isPremium(true)
spell:range(3)
spell:needCasterTargetOrDirection(true)
spell:blockWalls(true)
spell:cooldown(2 * 1000)
spell:groupCooldown(2 * 1000)
spell:cooldown(DEFAULT_COOLDOWN.SPELL)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("sorcerer;true", "master sorcerer;true")
spell:register()
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spell:mana(160)
spell:isPremium(true)
spell:isSelfTarget(true)
spell:cooldown(4 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("paladin;true", "royal paladin;true")
spell:register()
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ spell:range(7)
spell:needTarget(true)
spell:blockWalls(true)
spell:cooldown(1000) -- Cooldown is calculated on the casting
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(true)
spell:vocation("paladin;true", "royal paladin;true")
spell:register()
4 changes: 2 additions & 2 deletions data-otservbr-global/scripts/spells/attack/divine_missile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ spell:isPremium(true)
spell:range(4)
spell:needCasterTargetOrDirection(true)
spell:blockWalls(true)
spell:cooldown(2 * 1000)
spell:groupCooldown(2 * 1000)
spell:cooldown(DEFAULT_COOLDOWN.SPELL)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("paladin;true", "royal paladin;true")
spell:register()
2 changes: 1 addition & 1 deletion data-otservbr-global/scripts/spells/attack/electrify.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spell:range(3)
spell:needTarget(true)
spell:blockWalls(true)
spell:cooldown(30 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("sorcerer;true", "master sorcerer;true")
spell:register()
2 changes: 1 addition & 1 deletion data-otservbr-global/scripts/spells/attack/energy_beam.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spell:isPremium(false)
spell:needDirection(true)
spell:blockWalls(true)
spell:cooldown(4 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("sorcerer;true", "master sorcerer;true")
spell:register()
4 changes: 2 additions & 2 deletions data-otservbr-global/scripts/spells/attack/energy_strike.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ spell:range(3)
spell:isPremium(true)
spell:needCasterTargetOrDirection(true)
spell:blockWalls(true)
spell:cooldown(2 * 1000)
spell:groupCooldown(2 * 1000)
spell:cooldown(DEFAULT_COOLDOWN.SPELL)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true")
spell:register()
2 changes: 1 addition & 1 deletion data-otservbr-global/scripts/spells/attack/energy_wave.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spell:level(38)
spell:mana(170)
spell:needDirection(true)
spell:cooldown(8 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("sorcerer;true", "master sorcerer;true")
spell:register()
2 changes: 1 addition & 1 deletion data-otservbr-global/scripts/spells/attack/envenom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spell:isAggressive(true)
spell:needTarget(true)
spell:blockWalls(true)
spell:cooldown(40 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("druid;true", "elder druid;true")
spell:register()
4 changes: 2 additions & 2 deletions data-otservbr-global/scripts/spells/attack/ethereal_spear.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ spell:isPremium(true)
spell:range(7)
spell:needTarget(true)
spell:blockWalls(true)
spell:cooldown(2 * 1000)
spell:groupCooldown(2 * 1000)
spell:cooldown(DEFAULT_COOLDOWN.SPELL)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("paladin;true", "royal paladin;true")
spell:register()
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ spell:group("attack")
spell:id(261)
spell:name("Executioner's Throw")
spell:words("exori amp kor")
spell:level(1)
spell:level(300)
spell:mana(225)
spell:isPremium(true)
spell:range(5)
spell:needTarget(true)
spell:blockWalls(true)
spell:needWeapon(true)
spell:cooldown(1000) -- Cooldown is calculated on the casting
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(true)
spell:vocation("knight;true", "elite knight;true")
spell:register()
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spell:mana(340)
spell:isPremium(true)
spell:needWeapon(true)
spell:cooldown(6 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("knight;true", "elite knight;true")
spell:register()
2 changes: 1 addition & 1 deletion data-otservbr-global/scripts/spells/attack/fire_wave.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spell:mana(25)
spell:isPremium(true)
spell:needDirection(true)
spell:cooldown(4 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("sorcerer;true", "master sorcerer;true")
spell:register()
4 changes: 2 additions & 2 deletions data-otservbr-global/scripts/spells/attack/flame_strike.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ spell:isPremium(true)
spell:range(3)
spell:needCasterTargetOrDirection(true)
spell:blockWalls(true)
spell:cooldown(2 * 1000)
spell:groupCooldown(2 * 1000)
spell:cooldown(DEFAULT_COOLDOWN.SPELL)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("sorcerer;true", "druid;true", "master sorcerer;true", "elder druid;true")
spell:register()
2 changes: 1 addition & 1 deletion data-otservbr-global/scripts/spells/attack/front_sweep.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spell:isPremium(true)
spell:needDirection(true)
spell:needWeapon(true)
spell:cooldown(6 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("knight;true", "elite knight;true")
spell:register()
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ spell:group("attack")
spell:id(260)
spell:name("Great Death Beam")
spell:words("exevo max mort")
spell:level(1)
spell:level(300)
spell:mana(140)
spell:isPremium(false)
spell:needDirection(true)
spell:blockWalls(true)
spell:cooldown(1000) -- Cooldown is calculated on the casting
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(true)
spell:vocation("sorcerer;true", "master sorcerer;true")
spell:register()
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spell:isPremium(false)
spell:needDirection(true)
spell:blockWalls(true)
spell:cooldown(6 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("sorcerer;true", "master sorcerer;true")
spell:register()
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spell:mana(120)
spell:isPremium(true)
spell:needDirection(true)
spell:cooldown(4 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("sorcerer;true", "master sorcerer;true")
spell:register()
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spell:mana(160)
spell:isPremium(true)
spell:needWeapon(true)
spell:cooldown(8 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("knight;true", "elite knight;true")
spell:register()
2 changes: 1 addition & 1 deletion data-otservbr-global/scripts/spells/attack/holy_flash.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spell:range(3)
spell:needTarget(true)
spell:blockWalls(true)
spell:cooldown(40 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("paladin;true", "royal paladin;true")
spell:register()
6 changes: 3 additions & 3 deletions data-otservbr-global/scripts/spells/attack/ice_burst.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ spell:group("attack")
spell:id(262)
spell:name("Ice Burst")
spell:words("exevo ulus frigo")
spell:level(1)
spell:mana(170)
spell:level(300)
spell:mana(230)
spell:isPremium(true)
spell:cooldown(1000) -- Cooldown is calculated on the casting
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(true)
spell:vocation("druid;true", "elder druid;true")
spell:register()
4 changes: 2 additions & 2 deletions data-otservbr-global/scripts/spells/attack/ice_strike.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ spell:isPremium(true)
spell:range(3)
spell:needCasterTargetOrDirection(true)
spell:blockWalls(true)
spell:cooldown(2 * 1000)
spell:groupCooldown(2 * 1000)
spell:cooldown(DEFAULT_COOLDOWN.SPELL)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("druid;true", "sorcerer;true", "elder druid;true", "master sorcerer;true")
spell:register()
2 changes: 1 addition & 1 deletion data-otservbr-global/scripts/spells/attack/ice_wave.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spell:level(18)
spell:mana(25)
spell:needDirection(true)
spell:cooldown(4 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("druid;true", "elder druid;true")
spell:register()
2 changes: 1 addition & 1 deletion data-otservbr-global/scripts/spells/attack/ignite.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spell:range(3)
spell:needTarget(true)
spell:blockWalls(true)
spell:cooldown(30 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("sorcerer;true", "master sorcerer;true")
spell:register()
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spell:range(1)
spell:needTarget(true)
spell:blockWalls(true)
spell:cooldown(30 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("knight;true", "elite knight;true")
spell:register()
4 changes: 2 additions & 2 deletions data-otservbr-global/scripts/spells/attack/mud_attack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ spell:isPremium(false)
spell:range(3)
spell:needCasterTargetOrDirection(true)
spell:blockWalls(true)
spell:cooldown(2 * 1000)
spell:groupCooldown(2 * 1000)
spell:cooldown(DEFAULT_COOLDOWN.SPELL)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("druid;true", "elder druid;true")
spell:register()
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ spell:isPremium(true)
spell:range(3)
spell:needCasterTargetOrDirection(true)
spell:blockWalls(true)
spell:cooldown(2 * 1000)
spell:groupCooldown(2 * 1000)
spell:cooldown(DEFAULT_COOLDOWN.SPELL)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("druid;true", "elder druid;true")
spell:register()
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ spell:level(1)
spell:mana(5)
spell:needDirection(true)
spell:cooldown(4 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:vocation("none")
spell:register()
2 changes: 1 addition & 1 deletion data-otservbr-global/scripts/spells/attack/scorch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spell:isAggressive(true)
spell:isPremium(false)
spell:needDirection(true)
spell:cooldown(4 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("sorcerer;true", "master sorcerer;true")
spell:register()
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spell:range(7)
spell:needTarget(true)
spell:blockWalls(true)
spell:cooldown(8 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("paladin;true", "royal paladin;true")
spell:register()
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spell:level(40)
spell:mana(170)
spell:needDirection(true)
spell:cooldown(8 * 1000)
spell:groupCooldown(2 * 1000)
spell:groupCooldown(DEFAULT_COOLDOWN.SPELL_GROUP)
spell:needLearn(false)
spell:vocation("druid;true", "elder druid;true")
spell:register()
Loading

0 comments on commit 70e5107

Please sign in to comment.