Skip to content

Commit

Permalink
fix: min level and mana on spells (opentibiabr#2306)
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel authored Feb 23, 2024
1 parent 2d707ee commit e9425a7
Show file tree
Hide file tree
Showing 14 changed files with 83 additions and 83 deletions.
6 changes: 3 additions & 3 deletions data-canary/scripts/runes/convince_creature.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function rune.onCastSpell(creature, variant, isHotkey)

local monsterType = target:getType()
if not creature:hasFlag(PlayerFlag_CanConvinceAll) then
if not monsterType:isConvinceable() or creature:getMaster() then
if not monsterType:isConvinceable() or (target:getMaster() and target:getMaster():getName():lower() ~= "a carved stone tile") then
creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
creature:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
Expand Down Expand Up @@ -40,8 +40,6 @@ end
rune:id(12)
rune:group("support")
rune:name("convince creature rune")
rune:castSound(SOUND_EFFECT_TYPE_SPELL_OR_RUNE)
rune:impactSound(SOUND_EFFECT_TYPE_SPELL_CONVINCE_CREATURE_RUNE)
rune:runeId(3177)
rune:allowFarUse(true)
rune:charges(1)
Expand All @@ -51,4 +49,6 @@ rune:cooldown(2 * 1000)
rune:groupCooldown(2 * 1000)
rune:needTarget(true)
rune:isBlocking(true) -- True = Solid / False = Creature
rune:castSound(SOUND_EFFECT_TYPE_SPELL_OR_RUNE)
rune:impactSound(SOUND_EFFECT_TYPE_SPELL_CONVINCE_CREATURE_RUNE)
rune:register()
32 changes: 16 additions & 16 deletions data-canary/scripts/runes/magic_wall.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ local combat = Combat()
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onCreateMagicWall")

local spell = Spell("rune")
function spell.onCastSpell(creature, variant, isHotkey)
local rune = Spell("rune")
function rune.onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end

spell:id(86)
spell:name("Magic Wall Rune")
spell:group("attack")
spell:castSound(SOUND_EFFECT_TYPE_SPELL_OR_RUNE)
spell:impactSound(SOUND_EFFECT_TYPE_SPELL_MAGIC_WALL_RUNE)
spell:cooldown(2 * 1000)
spell:groupCooldown(2 * 1000)
spell:level(32)
spell:magicLevel(9)
spell:runeId(3180)
spell:charges(3)
spell:isBlocking(true, true)
spell:allowFarUse(true)
spell:register()
rune:id(86)
rune:name("Magic Wall Rune")
rune:group("attack")
rune:castSound(SOUND_EFFECT_TYPE_SPELL_OR_RUNE)
rune:impactSound(SOUND_EFFECT_TYPE_SPELL_MAGIC_WALL_RUNE)
rune:cooldown(2 * 1000)
rune:groupCooldown(2 * 1000)
rune:level(32)
rune:magicLevel(9)
rune:runeId(3180)
rune:charges(3)
rune:isBlocking(true, true)
rune:allowFarUse(true)
rune:register()
34 changes: 17 additions & 17 deletions data-canary/scripts/runes/wild_growth.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ local combat = Combat()
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onCreateWildGrowth")

local spell = Spell("rune")
function spell.onCastSpell(creature, variant, isHotkey)
local rune = Spell("rune")
function rune.onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end

spell:id(94)
spell:name("Wild Growth Rune")
spell:group("attack")
spell:castSound(SOUND_EFFECT_TYPE_SPELL_OR_RUNE)
spell:impactSound(SOUND_EFFECT_TYPE_SPELL_WILD_GROWTH_RUNE)
spell:cooldown(2 * 1000)
spell:groupCooldown(2 * 1000)
spell:level(27)
spell:magicLevel(8)
spell:runeId(3156)
spell:charges(2)
spell:isBlocking(true, true)
spell:allowFarUse(true)
spell:vocation("druid;true", "elder druid;true")
spell:register()
rune:id(94)
rune:name("Wild Growth Rune")
rune:group("attack")
rune:castSound(SOUND_EFFECT_TYPE_SPELL_OR_RUNE)
rune:impactSound(SOUND_EFFECT_TYPE_SPELL_WILD_GROWTH_RUNE)
rune:cooldown(2 * 1000)
rune:groupCooldown(2 * 1000)
rune:level(27)
rune:magicLevel(8)
rune:runeId(3156)
rune:charges(2)
rune:isBlocking(true, true)
rune:allowFarUse(true)
rune:vocation("druid;true", "elder druid;true")
rune:register()
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ 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)
Expand Down
4 changes: 2 additions & 2 deletions data-otservbr-global/scripts/spells/attack/ice_burst.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ 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)
Expand Down
4 changes: 2 additions & 2 deletions data-otservbr-global/scripts/spells/attack/terra_burst.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ spell:group("attack")
spell:id(263)
spell:name("Terra Burst")
spell:words("exevo ulus tera")
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)
Expand Down
32 changes: 16 additions & 16 deletions data-otservbr-global/scripts/spells/runes/magic_wall.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ local combat = Combat()
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onCreateMagicWall")

local spell = Spell("rune")
function spell.onCastSpell(creature, variant, isHotkey)
local rune = Spell("rune")
function rune.onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end

spell:id(86)
spell:name("Magic Wall Rune")
spell:group("attack")
spell:castSound(SOUND_EFFECT_TYPE_SPELL_OR_RUNE)
spell:impactSound(SOUND_EFFECT_TYPE_SPELL_MAGIC_WALL_RUNE)
spell:cooldown(2 * 1000)
spell:groupCooldown(2 * 1000)
spell:level(32)
spell:magicLevel(9)
spell:runeId(3180)
spell:charges(3)
spell:isBlocking(true, true)
spell:allowFarUse(true)
spell:register()
rune:id(86)
rune:name("Magic Wall Rune")
rune:group("attack")
rune:castSound(SOUND_EFFECT_TYPE_SPELL_OR_RUNE)
rune:impactSound(SOUND_EFFECT_TYPE_SPELL_MAGIC_WALL_RUNE)
rune:cooldown(2 * 1000)
rune:groupCooldown(2 * 1000)
rune:level(32)
rune:magicLevel(9)
rune:runeId(3180)
rune:charges(3)
rune:isBlocking(true, true)
rune:allowFarUse(true)
rune:register()
34 changes: 17 additions & 17 deletions data-otservbr-global/scripts/spells/runes/wild_growth.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ local combat = Combat()
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onCreateWildGrowth")

local spell = Spell("rune")
function spell.onCastSpell(creature, variant, isHotkey)
local rune = Spell("rune")
function rune.onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end

spell:id(94)
spell:name("Wild Growth Rune")
spell:group("attack")
spell:castSound(SOUND_EFFECT_TYPE_SPELL_OR_RUNE)
spell:impactSound(SOUND_EFFECT_TYPE_SPELL_WILD_GROWTH_RUNE)
spell:cooldown(2 * 1000)
spell:groupCooldown(2 * 1000)
spell:level(27)
spell:magicLevel(8)
spell:runeId(3156)
spell:charges(2)
spell:isBlocking(true, true)
spell:allowFarUse(true)
spell:vocation("druid;true", "elder druid;true")
spell:register()
rune:id(94)
rune:name("Wild Growth Rune")
rune:group("attack")
rune:castSound(SOUND_EFFECT_TYPE_SPELL_OR_RUNE)
rune:impactSound(SOUND_EFFECT_TYPE_SPELL_WILD_GROWTH_RUNE)
rune:cooldown(2 * 1000)
rune:groupCooldown(2 * 1000)
rune:level(27)
rune:magicLevel(8)
rune:runeId(3156)
rune:charges(2)
rune:isBlocking(true, true)
rune:allowFarUse(true)
rune:vocation("druid;true", "elder druid;true")
rune:register()
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ spell:group("support")
spell:id(265)
spell:name("Avatar of Light")
spell:words("uteta res sac")
spell:level(1)
spell:mana(800)
spell:level(300)
spell:mana(1500)
spell:isPremium(true)
spell:cooldown(1000) -- Cooldown is calculated on the casting
spell:groupCooldown(2 * 1000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ spell:group("support")
spell:id(267)
spell:name("Avatar of Nature")
spell:words("uteta res dru")
spell:level(1)
spell:mana(800)
spell:level(300)
spell:mana(2200)
spell:isPremium(true)
spell:cooldown(1000) -- Cooldown is calculated on the casting
spell:groupCooldown(2 * 1000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spell:group("support")
spell:id(264)
spell:name("Avatar of Steel")
spell:words("uteta res eq")
spell:level(1)
spell:level(300)
spell:mana(800)
spell:isPremium(true)
spell:cooldown(1000) -- Cooldown is calculated on the casting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ spell:group("support")
spell:id(266)
spell:name("Avatar of Storm")
spell:words("uteta res ven")
spell:level(1)
spell:mana(800)
spell:level(300)
spell:mana(2200)
spell:isPremium(true)
spell:cooldown(1000) -- Cooldown is calculated on the casting
spell:groupCooldown(2 * 1000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spell:group("support")
spell:id(268)
spell:name("Divine Empowerment")
spell:words("utevo grav san")
spell:level(1)
spell:level(300)
spell:mana(500)
spell:isPremium(true)
spell:range(7)
Expand Down

0 comments on commit e9425a7

Please sign in to comment.