Skip to content

Commit

Permalink
Merge branch 'main' into spells
Browse files Browse the repository at this point in the history
  • Loading branch information
kaleohanopahala authored Feb 7, 2025
2 parents 648f754 + 11f9b0a commit 99f4b52
Show file tree
Hide file tree
Showing 63 changed files with 5,265 additions and 27 deletions.
27 changes: 16 additions & 11 deletions data-otservbr-global/lib/others/soulpit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -153,20 +153,25 @@ SoulPit = {
return name:match("^(.-) soul core")
end,
onFuseSoulCores = function(player, item, target)
local itemName = item:getName()
local targetItemName = target:getName()
local itemCount = item:getCount(item:getId())
if item:getId() == target:getId() and itemCount <= 1 then
return false
end

if SoulPit.getSoulCoreMonster(itemName) and SoulPit.getSoulCoreMonster(targetItemName) then
local randomSoulCore = SoulPit.soulCores[math.random(#SoulPit.soulCores)]
player:addItem(randomSoulCore:getId(), 1)
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("You have received a %s soul core.", randomSoulCore:getName()))
item:remove(1)
target:remove(1)
return true
local itemSoulCore = SoulPit.getSoulCoreMonster(item:getName())
local targetSoulCore = SoulPit.getSoulCoreMonster(target:getName())
if not itemSoulCore or not targetSoulCore then
return false
end

return false
local randomSoulCore = SoulPit.soulCores[math.random(#SoulPit.soulCores)]
player:addItem(randomSoulCore:getId(), 1)
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("You have received a %s soul core.", randomSoulCore:getName()))

item:remove(1)
target:remove(1)
return true
end,
}

Expand Down
129 changes: 129 additions & 0 deletions data-otservbr-global/monster/aquatics/quara_looter.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
local mType = Game.createMonsterType("Quara Looter")
local monster = {}

monster.description = "a quara looter"
monster.experience = 8650
monster.outfit = {
lookType = 1741,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
lookMount = 0,
}

monster.raceId = 2543
monster.Bestiary = {
class = "Aquatic",
race = BESTY_RACE_AQUATIC,
toKill = 2500,
FirstUnlock = 100,
SecondUnlock = 1000,
CharmsPoints = 50,
Stars = 4,
Occurrence = 1,
Locations = "Podzilla Bottom, Podzilla Underwater ",
}

monster.health = 11500
monster.maxHealth = 11500
monster.race = "undead"
monster.corpse = 48276
monster.speed = 210
monster.manaCost = 0

monster.changeTarget = {
interval = 2000,
chance = 11,
}

monster.strategiesTarget = {
nearest = 100,
}

monster.flags = {
summonable = false,
attackable = true,
hostile = true,
convinceable = false,
pushable = false,
rewardBoss = false,
illusionable = false,
canPushItems = true,
canPushCreatures = true,
staticAttackChance = 90,
targetDistance = 3,
runHealth = 0,
healthHidden = false,
isBlockable = false,
canWalkOnEnergy = true,
canWalkOnFire = true,
canWalkOnPoison = true,
}

monster.light = {
level = 0,
color = 0,
}

monster.voices = {
interval = 5000,
chance = 10,
{ text = "Krrrck!", yell = false },
{ text = "Tchky!", yell = false },
{ text = "<splatter>", yell = false },
}

monster.loot = {
{ name = "Amber Souvenir", chance = 7040 },
{ name = "Resinous Fish Fin", chance = 6460 },
{ id = 3039, chance = 4340 }, -- red gem
{ id = 3041, chance = 2700 }, -- blue gem
{ name = "Glacier Kilt", chance = 940 },
{ name = "Necklace of the Deep", chance = 820 },
{ name = "Crystal Crossbow", chance = 470 },
{ name = "Rift Lance", chance = 350 },
{ name = "Mantassin Tail", chance = 230 },
{ name = "platinum coin", chance = 10000, maxCount = 25 },
{ name = "Glacier Robe", chance = 1000 },
{ name = "Preserved Light Blue Seed", chance = 110 },
{ name = "Preserved Purple Seed", chance = 110 },
{ name = "Preserved Violet Seed", chance = 110 },
}

monster.attacks = {
{ name = "melee", interval = 2000, chance = 100, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -450 },
{ name = "combat", interval = 2000, chance = 35, type = COMBAT_ICEDAMAGE, minDamage = -400, maxDamage = -750, range = 7, shootEffect = CONST_ANI_SHIVERARROW, effect = CONST_ME_ICEATTACK, target = true },
{ name = "quarasmallicering", interval = 2000, chance = 16 },
{ name = "podzillaphyschain", interval = 2000, chance = 15 },
}

monster.defenses = {
defense = 95,
armor = 95,
mitigation = 2.75,
{ name = "combat", interval = 2000, chance = 7, type = COMBAT_HEALING, minDamage = 600, maxDamage = 800, effect = CONST_ME_MAGIC_BLUE, target = false },
}

monster.elements = {
{ type = COMBAT_PHYSICALDAMAGE, percent = 5 },
{ type = COMBAT_ENERGYDAMAGE, percent = -15 },
{ type = COMBAT_EARTHDAMAGE, percent = -10 },
{ type = COMBAT_FIREDAMAGE, percent = 20 },
{ type = COMBAT_LIFEDRAIN, percent = 0 },
{ type = COMBAT_MANADRAIN, percent = 0 },
{ type = COMBAT_DROWNDAMAGE, percent = 0 },
{ type = COMBAT_ICEDAMAGE, percent = 0 },
{ type = COMBAT_HOLYDAMAGE, percent = 10 },
{ type = COMBAT_DEATHDAMAGE, percent = 5 },
}

monster.immunities = {
{ type = "paralyze", condition = true },
{ type = "outfit", condition = false },
{ type = "invisible", condition = true },
{ type = "bleed", condition = false },
}

mType:register(monster)
120 changes: 120 additions & 0 deletions data-otservbr-global/monster/aquatics/quara_plunderer.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
local mType = Game.createMonsterType("Quara Plunderer")
local monster = {}

monster.description = "a quara plunderer"
monster.experience = 10800
monster.outfit = {
lookType = 1758,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0,
lookMount = 0,
}

monster.raceId = 2542
monster.Bestiary = {
class = "Aquatic",
race = BESTY_RACE_AQUATIC,
toKill = 2500,
FirstUnlock = 100,
SecondUnlock = 1000,
CharmsPoints = 50,
Stars = 4,
Occurrence = 1,
Locations = "Podzilla Bottom, Podzilla Underwater ",
}

monster.health = 13500
monster.maxHealth = 13500
monster.race = "undead"
monster.corpse = 48388
monster.speed = 205
monster.manaCost = 0

monster.changeTarget = {
interval = 2000,
chance = 10,
}

monster.strategiesTarget = {
nearest = 100,
}

monster.flags = {
summonable = false,
attackable = true,
hostile = true,
convinceable = false,
pushable = false,
rewardBoss = false,
illusionable = false,
canPushItems = true,
canPushCreatures = true,
staticAttackChance = 90,
targetDistance = 1,
runHealth = 0,
healthHidden = false,
isBlockable = false,
canWalkOnEnergy = true,
canWalkOnFire = true,
canWalkOnPoison = true,
}

monster.light = {
level = 0,
color = 0,
}

monster.voices = {
interval = 5000,
chance = 10,
{ text = "Tssssh!!!", yell = false },
{ text = "BLUP! BLUP!", yell = false },
{ text = "Burp!", yell = false },
}

monster.loot = {
{ name = "Amber Souvenir", chance = 7040 },
{ name = "Resinous Fish Fin", chance = 6460 },
{ id = 3039, chance = 4940 }, -- red gem
{ id = 3041, chance = 4900 }, -- blue gem
{ name = "Haunted Blade", chance = 350 },
{ name = "platinum coin", chance = 10000, maxCount = 25 },
}

monster.attacks = {
{ name = "melee", interval = 2000, chance = 100, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -500 },
{ name = "combat", interval = 2000, chance = 25, type = COMBAT_ICEDAMAGE, minDamage = -800, maxDamage = -1100, range = 7, radius = 4, shootEffect = CONST_ANI_ICE, effect = CONST_ME_ICEAREA, target = false },
{ name = "quaracrossdeath", interval = 2000, chance = 20, minDamage = -1100, maxDamage = -1700, target = false },
{ name = "quarasmokedeath", interval = 2000, chance = 20, minDamage = -850, maxDamage = -1150, target = false },
}

monster.defenses = {
defense = 95,
armor = 90,
mitigation = 2.75,
}

monster.elements = {
{ type = COMBAT_PHYSICALDAMAGE, percent = 0 },
{ type = COMBAT_ENERGYDAMAGE, percent = -10 },
{ type = COMBAT_EARTHDAMAGE, percent = -10 },
{ type = COMBAT_FIREDAMAGE, percent = 20 },
{ type = COMBAT_LIFEDRAIN, percent = 0 },
{ type = COMBAT_MANADRAIN, percent = 0 },
{ type = COMBAT_DROWNDAMAGE, percent = 0 },
{ type = COMBAT_ICEDAMAGE, percent = 0 },
{ type = COMBAT_HOLYDAMAGE, percent = 15 },
{ type = COMBAT_DEATHDAMAGE, percent = 10 },
}

monster.immunities = {
{ type = "paralyze", condition = true },
{ type = "outfit", condition = false },
{ type = "invisible", condition = true },
{ type = "bleed", condition = false },
}

mType:register(monster)
Loading

0 comments on commit 99f4b52

Please sign in to comment.