Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 13.32 protocol and features #2110

Merged
merged 15 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 31 additions & 2 deletions config.lua.dist
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ forgeCostOneSliver = 20
forgeSliverAmount = 3
forgeCoreCost = 50
forgeMaxDust = 225
forgeFusionCost = 100
forgeTransferCost = 100
forgeFusionDustCost = 100
forgeConvergenceFusionDustCost = 130
forgeTransferDustCost = 100
forgeConvergenceTransferCost = 160
forgeBaseSuccessRate = 50
forgeBonusSuccessRate = 15
forgeTierLossReduction = 50
Expand All @@ -131,6 +133,24 @@ forgeFiendishLimit = 3
forgeFiendishIntervalType = "hour"
forgeFiendishIntervalTime = "1"

ruseChanceFormulaA = 0.0307576
ruseChanceFormulaB = 0.440697
ruseChanceFormulaC = 0.026

onslaughtChanceFormulaA = 0.05
onslaughtChanceFormulaB = 0.4
onslaughtChanceFormulaC = 0.05

momentumChanceFormulaA = 0.05
momentumChanceFormulaB = 1.9
momentumChanceFormulaC = 0.05

transcendanceChanceFormulaA = 0.0127
transcendanceChanceFormulaB = 0.1070
transcendanceChanceFormulaC = 0.0073

transcendanceAvatarDuration = 7000

-- Bestiary & Bosstiary system
-- NOTE: bestiaryKillMultiplier, multiplier value of monster killed, default 1
-- NOTE: bosstiaryKillMultiplier, multiplier value of boss killed, default 1
Expand Down Expand Up @@ -177,6 +197,15 @@ pvpMaxLevelDifference = 0
wheelSystemEnabled = true
wheelPointsPerLevel = 1

-- Gem Atelier
wheelAtelierRotateLesserCost = 125000
wheelAtelierRotateRegularCost = 250000
wheelAtelierRotateGreaterCost = 500000

wheelAtelierRevealLesserCost = 125000
wheelAtelierRevealRegularCost = 1000000
wheelAtelierRevealGreaterCost = 6000000

-- Familiar system
-- NOTE: the time will be divided by 2 to get half the value, the familiar lasts 15 minutes by default and the cooldown of the spell is 30 minutes
-- Only change it here if you know what you are doing or to make testing easier with familiars
Expand Down
100 changes: 81 additions & 19 deletions data-canary/scripts/item_classification/item_tiers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,91 @@ local itemTierClassifications = {
-- Upgrade classification 1
[1] = {
-- Update tier 0
[1] = { price = 25000, core = 1 },
[1] = {
regular = 25000,
core = 1,
},
},
-- Upgrade classification 2
[2] = {
-- Update tier 0
[1] = { price = 750000, core = 1 },
[1] = {
regular = 750000,
core = 1,
},
-- Update tier 1
[2] = { price = 5000000, core = 1 },
[2] = {
regular = 5000000,
core = 1,
},
},
-- Upgrade classification 3
[3] = {
[1] = { price = 4000000, core = 1 },
[2] = { price = 10000000, core = 1 },
[3] = { price = 20000000, core = 2 },
[1] = {
regular = 4000000,
core = 1,
},
[2] = {
regular = 10000000,
core = 1,
},
[3] = {
regular = 20000000,
core = 2,
},
},
-- Upgrade classification 4
[4] = {
[1] = { price = 8000000, core = 1 },
[2] = { price = 20000000, core = 1 },
[3] = { price = 40000000, core = 2 },
[4] = { price = 65000000, core = 5 },
[5] = { price = 100000000, core = 10 },
[6] = { price = 250000000, core = 15 },
[7] = { price = 750000000, core = 25 },
[8] = { price = 2500000000, core = 35 },
[9] = { price = 8000000000, core = 50 },
[10] = { price = 15000000000, core = 65 },
[1] = {
regular = 8000000,
core = 1,
convergence = { fusion = { price = 55000000 }, transfer = { price = 65000000 } },
},
[2] = {
regular = 20000000,
core = 2,
convergence = { fusion = { price = 110000000 }, transfer = { price = 165000000 } },
},
[3] = {
regular = 40000000,
core = 5,
convergence = { fusion = { price = 170000000 }, transfer = { price = 375000000 } },
},
[4] = {
regular = 65000000,
core = 10,
convergence = { fusion = { price = 300000000 }, transfer = { price = 800000000 } },
},
[5] = {
regular = 100000000,
core = 15,
convergence = { fusion = { price = 875000000 }, transfer = { price = 2000000000 } },
},
[6] = {
regular = 250000000,
core = 25,
convergence = { fusion = { price = 2350000000 }, transfer = { price = 5250000000 } },
},
[7] = {
regular = 750000000,
core = 35,
convergence = { fusion = { price = 6950000000 }, transfer = { price = 14500000000 } },
},
[8] = {
regular = 2500000000,
core = 50,
convergence = { fusion = { price = 21250000000 }, transfer = { price = 42500000000 } },
},
[9] = {
regular = 8000000000,
core = 60,
convergence = { fusion = { price = 50000000000 }, transfer = { price = 100000000000 } },
},
[10] = {
regular = 15000000000,
core = 85,
convergence = { fusion = { price = 125000000000 }, transfer = { price = 300000000000 } },
},
},
}

Expand All @@ -40,9 +98,13 @@ for classificationId, classificationTable in ipairs(itemTierClassifications) do
-- Registers table for register_item_tier.lua interface
classification.Upgrades = {}
for tierId, tierTable in ipairs(classificationTable) do
if tierId and tierTable.price and tierTable.core ~= nil then
table.insert(classification.Upgrades, { TierId = tierId - 1, Price = tierTable.price, Core = tierTable.core })
end
table.insert(classification.Upgrades, {
TierId = tierId,
Core = tierTable.core,
RegularPrice = tierTable.regular,
ConvergenceFustionPrice = tierTable.convergence and tierTable.convergence.fusion.price or 0,
ConvergenceTransferPrice = tierTable.convergence and tierTable.convergence.transfer.price or 0,
})
end
-- Create item classification and register classification table
itemClassification:register(classification)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ monster.loot = {
{ name = "shiver arrow", chance = 7310 },
{ name = "ice rapier", chance = 4750 },
{ name = "glacier mask", chance = 4570 },
{ name = "snowball", chance = 4000, maxCount = 5 },
{ id = 2992, chance = 4000, maxCount = 5 }, -- snowball
{ name = "hailstorm rod", chance = 3470 },
{ name = "glacier mask", chance = 250 },
{ name = "glacier amulet", chance = 3290 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/monster/demons/brachiodemon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ monster.attacks = {
{ name = "combat", interval = 2000, chance = 22, type = COMBAT_DEATHDAMAGE, minDamage = -900, maxDamage = -1280, radius = 4, effect = CONST_ME_EXPLOSIONHIT, target = false },
{ name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -1150, maxDamage = -1460, range = 7, effect = CONST_ANI_SUDDENDEATH, target = true },
{ name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -950, maxDamage = -1100, range = 7, radius = 4, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true },
{ name = "destroy magic walls", interval = 1000, chance = 30 },
}

monster.defenses = {
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/monster/demons/many_faces.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ monster.attacks = {
{ name = "combat", interval = 5000, chance = 44, type = COMBAT_ICEDAMAGE, minDamage = -1000, maxDamage = -1450, range = 7, radius = 5, shootEffect = CONST_ANI_ICE, effect = CONST_ME_ICEAREA, target = true },
{ name = "combat", interval = 9500, chance = 59, type = COMBAT_HOLYDAMAGE, minDamage = -1050, maxDamage = -1300, radius = 4, effect = CONST_ME_HOLYAREA, target = false },
{ name = "extended holy chain", interval = 10000, chance = 59, minDamage = -1150, maxDamage = -1300, range = 7 },
{ name = "destroy magic walls", interval = 1000, chance = 30 },
}

monster.defenses = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ monster.loot = {
{ id = 2639, chance = 4000 }, -- picture
{ id = 2950, chance = 5000 }, -- lute
{ id = 2983, chance = 500 }, -- flower bowl
{ name = "snowball", chance = 7000, maxCount = 5 },
{ id = 2992, chance = 7000, maxCount = 5 }, -- snowball
{ name = "piggy bank", chance = 1000 },
{ name = "gold coin", chance = 22500, maxCount = 22 },
{ name = "scarab coin", chance = 500, maxCount = 2 },
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/monster/mammals/yeti.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ monster.voices = {
}

monster.loot = {
{ name = "snowball", chance = 10000, maxCount = 22 },
{ id = 2992, chance = 10000, maxCount = 22 }, -- snowball
{ name = "gold coin", chance = 100000, maxCount = 60 },
{ name = "gold coin", chance = 100000, maxCount = 40 },
{ name = "bunnyslippers", chance = 1333 },
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/monster/plants/cloak_of_terror.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ monster.attacks = {
{ name = "combat", interval = 3000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -1150, maxDamage = -1300, range = 7, radius = 4, effect = CONST_ME_ENERGYHIT, target = true },
{ name = "combat", interval = 2000, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -1000, maxDamage = -1300, range = 7, shootEffect = CONST_ANI_SPECTRALBOLT, effect = CONST_ME_HOLYDAMAGE, target = true },
{ name = "combat", interval = 2000, chance = 24, type = COMBAT_HOLYDAMAGE, minDamage = -800, maxDamage = -1200, range = 7, radius = 3, shootEffect = CONST_ANI_SMALLHOLY, effect = CONST_ME_YELLOW_ENERGY_SPARK, target = true },
{ name = "destroy magic walls", interval = 1000, chance = 30 },
}

monster.defenses = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ monster.loot = {
{ name = "slimy leg", chance = 4170 },
{ name = "badger boots", chance = 4170 },
{ name = "spellbook of warding", chance = 2080 },
{ name = "gnome sword", chance = 4170 },
{ name = "gnome armor", chance = 3390 },
}

monster.attacks = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ monster.loot = {
{ name = "gnome sword", chance = 4170 },
{ name = "terra mantle", chance = 2080 },
{ name = "violet gem", chance = 2080 },
{ name = "gnome legs", chance = 3390 },
}

monster.attacks = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ monster.loot = {
{ name = "mysterious voodoo skull", chance = 12500 },
{ name = "skull helmet", chance = 20000 },
{ name = "iron ore", chance = 33333 },
{ name = "spirit container", chance = 4761 },
{ id = 5884, chance = 4761 }, -- spirit container
{ name = "flask of warrior's sweat", chance = 5555 },
{ name = "enchanted chicken wing", chance = 7692 },
{ name = "huge chunk of crude iron", chance = 14285 },
Expand Down
21 changes: 10 additions & 11 deletions data-otservbr-global/monster/reptiles/corrupt_naga.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ monster.description = "a corrupt naga"
monster.experience = 4380
monster.outfit = {
lookType = 1538,
lookHead = 55,
lookBody = 6,
lookLegs = 0,
lookFeet = 78,
lookHead = 86,
lookBody = 57,
lookLegs = 75,
lookFeet = 94,
lookAddons = 3,
lookMount = 0,
}

monster.health = 5990
monster.maxHealth = 5990
monster.race = "blood"
monster.corpse = 0
monster.corpse = 39217
monster.speed = 182
monster.manaCost = 0

Expand Down Expand Up @@ -60,15 +60,14 @@ monster.voices = {
}

monster.loot = {
{ name = "Platinum Coin", chance = 75420, minCount = 1, maxCount = 8 },
{ name = "Violet Crystal Shard", chance = 24580, minCount = 1, maxCount = 2 },
{ name = "Corrupt Naga Scales", chance = 17720 },
{ name = "corrupt naga scales", chance = 17720 },
}

monster.attacks = {
{ name = "combat", interval = 2000, chance = 100, minDamage = -300, maxDamage = -600, shootEffect = CONST_ANI_EXPLOSION, effect = CONST_ME_PURPLEENERGY, target = true },
{ name = "nagadeath", interval = 6000, chance = 39, target = false, minDamage = -1000, maxDamage = -2200 },
{ name = "nagadeathattack", interval = 3000, chance = 68, target = true, minDamage = -400, maxDamage = -600 },
{ name = "combat", interval = 2000, chance = 100, type = COMBAT_PHYSICALDAMAGE, minDamage = -120, maxDamage = -340, target = true }, -- basic_attack
{ name = "combat", interval = 2500, chance = 30, type = COMBAT_PHYSICALDAMAGE, minDamage = -320, maxDamage = -430, effect = CONST_ME_YELLOWSMOKE, range = 3, target = true }, -- eruption_strike
{ name = "nagadeathattack", interval = 3000, chance = 35, minDamage = -360, maxDamage = -415, target = true }, -- death_strike
{ name = "combat", interval = 3500, chance = 35, type = COMBAT_LIFEDRAIN, minDamage = -360, maxDamage = -386, radius = 4, effect = CONST_ME_DRAWBLOOD, target = false }, -- great_blood_ball
}

monster.defenses = {
Expand Down
22 changes: 11 additions & 11 deletions data-otservbr-global/monster/reptiles/rogue_naga.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ monster.description = "a rogue naga"
monster.experience = 4510
monster.outfit = {
lookType = 1543,
lookHead = 55,
lookBody = 6,
lookLegs = 0,
lookFeet = 78,
lookHead = 75,
lookBody = 13,
lookLegs = 95,
lookFeet = 109,
lookAddons = 3,
lookMount = 0,
}

monster.health = 6200
monster.maxHealth = 6200
monster.race = "blood"
monster.corpse = 0
monster.corpse = 39221
monster.speed = 182
monster.manaCost = 0

Expand Down Expand Up @@ -64,15 +64,15 @@ monster.voices = {
}

monster.loot = {
{ name = "Platinum Coin", chance = 85600, minCount = 1, maxCount = 12 },
{ name = "Rogue Naga Scales", chance = 15450 },
{ name = "Green Crystal Shard", chance = 14400, minCount = 1, maxCount = 2 },
{ name = "rogue naga scales", chance = 15450 },
}

monster.attacks = {
{ name = "combat", interval = 2000, chance = 100, minDamage = -300, maxDamage = -600, shootEffect = CONST_ANI_EXPLOSION, effect = CONST_ME_PURPLEENERGY, target = true },
{ name = "combat", interval = 2000, chance = 47, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -400, effect = CONST_ME_BIG_SCRATCH, target = true },
{ name = "combat", interval = 1000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = -380, maxDamage = -470, length = 5, spread = 3, effect = CONST_ME_GROUNDSHAKER, target = false },
{ name = "combat", interval = 2000, chance = 50, type = COMBAT_PHYSICALDAMAGE, minDamage = -95, maxDamage = -390, shootEffect = CONST_ANI_EXPLOSION, effect = CONST_ME_PURPLEENERGY, range = 6, target = true }, -- basic_attack
{ name = "nagadeathattack", interval = 2500, chance = 20, minDamage = -430, maxDamage = -505, range = 6, target = true }, -- death_strike
{ name = "nagadeath", interval = 3000, chance = 20, minDamage = -380, maxDamage = -470, target = false }, -- short_death_wave
{ name = "death chain", interval = 3500, chance = 20, minDamage = -460, maxDamage = -520, range = 6, target = true }, -- death_chain
{ name = "combat", interval = 4000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -85, maxDamage = -190, shootEffect = CONST_ANI_EXPLOSION, effect = CONST_ME_PURPLEENERGY, range = 6, target = true }, -- explosion_strike
}

monster.defenses = {
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/monster/undeads/bony_sea_devil.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ monster.attacks = {
{ name = "combat", interval = 2000, chance = 25, type = COMBAT_ICEDAMAGE, minDamage = -950, maxDamage = -1100, range = 7, radius = 5, shootEffect = CONST_ANI_ICE, effect = CONST_ME_ICEAREA, target = true },
{ name = "ice chain", interval = 2000, chance = 15, minDamage = -1100, maxDamage = -1300, range = 7 },
{ name = "soulwars fear", interval = 2000, chance = 1, target = true },
{ name = "destroy magic walls", interval = 1000, chance = 30 },
}

monster.defenses = {
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/monster/undeads/souleater.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ monster.loot = {
{ name = "platinum coin", chance = 49610, maxCount = 6 },
{ name = "necrotic rod", chance = 980 },
{ name = "wand of cosmic energy", chance = 910 },
{ name = "spirit container", chance = 140 },
{ id = 5884, chance = 140 }, -- spirit container
{ id = 6299, chance = 300 }, -- death ring
{ name = "great mana potion", chance = 8000 },
{ name = "ultimate health potion", chance = 9400 },
Expand Down
Loading
Loading