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

soul war - taints exp passive #3145

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
64 changes: 63 additions & 1 deletion data/events/scripts/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -575,12 +575,74 @@ function Player:onGainExperience(target, exp, rawExp)
end
end

-- Soul War XP Boost Taints
local taints = {
"taints-teleport", -- Taint 1
"taints-spawn", -- Taint 2
"taints-damage", -- Taint 3
"taints-heal", -- Taint 4
"taints-loss", -- Taint 5
xpboost = {
[1] = 5,
[2] = 10,
[3] = 15,
[4] = 20,
[5] = 25,
},
monsters = {
["Aspect of Power"] = true,
["Dreadful Harvester"] = true,
["Goshnar's Cruelty"] = true,
["Goshnar's Greed"] = true,
["Goshnar's Hatred"] = true,
["Goshnar's Malice"] = true,
["Goshnar's Megalomania Blue"] = true,
["Goshnar's Megalomania Green"] = true,
["Goshnar's Megalomania Purple"] = true,
["Goshnar's Spite"] = true,
["Malicious Soul"] = true,
["Mean Maw"] = true,
["Mirror Image"] = true,
["Soul Cage"] = true,
["Spiteful Spitter"] = true,
["Bony Sea Devil"] = true,
["Brachiodemon"] = true,
["Branchy Crawler"] = true,
["Capricious Phantom"] = true,
["Distorted Phantom"] = true,
["Druid's Apparition"] = true,
["Hateful Soul"] = true,
["Infernal Demon"] = true,
["Infernal Phantom"] = true,
["Knight's Apparition"] = true,
["Many Faces"] = true,
["Mould Phantom"] = true,
["Paladin's Apparition"] = true,
["Rotten Golem"] = true,
["Sorcerer's Apparition"] = true,
["Turbulent Elemental"] = true,
["Cloak of Terror"] = true,
["Courage Leech"] = true,
["Vibrant Phantom"] = true,
},
}

local monsterName = target:getName()
local taintLevel = self:getTaintLevel()
local taints_xpboost = 0
if taints.monsters[monsterName] and taintLevel and taintLevel > 0 then
local count = math.min(taintLevel, #taints)
if count > 0 then
taints_xpboost = taints.xpboost[count]
end
end

-- Final Adjustments: Low Level Bonus and Base Rate
local lowLevelBonusExp = self:getFinalLowLevelBonus()
local baseRateExp = self:getFinalBaseRateExperience()

-- Return final experience value
return (exp * (1 + xpBoostPercent / 100 + lowLevelBonusExp / 100)) * staminaBonusXp * baseRateExp
return (exp * (1 + xpBoostPercent / 100 + lowLevelBonusExp / 100)) + (exp * (taints_xpboost / 100)) * staminaBonusXp * baseRateExp
end

function Player:onLoseExperience(exp)
Expand Down
Loading