Skip to content

Commit

Permalink
Lua code format - (Stylua)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 22, 2024
1 parent 64ff93e commit 2ba9642
Showing 1 changed file with 40 additions and 13 deletions.
53 changes: 40 additions & 13 deletions data/events/scripts/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ function Player:onGainExperience(target, exp, rawExp)
end
end

-- Soul War XP Boost Taints
-- Soul War XP Boost Taints
local taints = {
"taints-teleport", -- Taint 1
"taints-spawn", -- Taint 2
Expand All @@ -587,17 +587,44 @@ function Player:onGainExperience(target, exp, rawExp)
[2] = 10,
[3] = 15,
[4] = 20,
[5] = 25
[5] = 25,
},
monsters = {
"Aspect of Power", "Dreadful Harvester", "Goshnar's Cruelty", "Goshnar's Greed","Goshnar's Hatred",
"Goshnar's Malice","Goshnar's Megalomania Blue", "Goshnar's Megalomania Green","Goshnar's Megalomania Purple",
"Goshnar's Spite","Malicious Soul","Mean Maw","Mirror Image","Soul Cage","Spiteful Spitter",
"Bony Sea Devil", "Brachiodemon", "Branchy Crawler","Capricious Phantom","Distorted Phantom",
"Druid's Apparition", "Hateful Soul", "Infernal Demon", "Infernal Phantom", "Knight's Apparition",
"Many Faces", "Mould Phantom", "Paladin's Apparition", "Rotten Golem", "Sorcerer's Apparition",
"Turbulent Elemental", "Cloak of Terror", "Courage Leech", "Vibrant Phantom",
}
"Aspect of Power",
"Dreadful Harvester",
"Goshnar's Cruelty",
"Goshnar's Greed",
"Goshnar's Hatred",
"Goshnar's Malice",
"Goshnar's Megalomania Blue",
"Goshnar's Megalomania Green",
"Goshnar's Megalomania Purple",
"Goshnar's Spite",
"Malicious Soul",
"Mean Maw",
"Mirror Image",
"Soul Cage",
"Spiteful Spitter",
"Bony Sea Devil",
"Brachiodemon",
"Branchy Crawler",
"Capricious Phantom",
"Distorted Phantom",
"Druid's Apparition",
"Hateful Soul",
"Infernal Demon",
"Infernal Phantom",
"Knight's Apparition",
"Many Faces",
"Mould Phantom",
"Paladin's Apparition",
"Rotten Golem",
"Sorcerer's Apparition",
"Turbulent Elemental",
"Cloak of Terror",
"Courage Leech",
"Vibrant Phantom",
},
}
local function contains(table, element)
for _, value in ipairs(table) do
Expand All @@ -607,11 +634,11 @@ function Player:onGainExperience(target, exp, rawExp)
end
return false
end

local monsterName = target:getName()
local taintLevel = self:getTaintLevel()
local taints_xpboost = 0

if contains(taints.monsters, monsterName) and taintLevel and taintLevel > 0 then
local count = 0
for index = 1, taintLevel do
Expand All @@ -620,7 +647,7 @@ function Player:onGainExperience(target, exp, rawExp)
count = count + 1
end
end

if count > 0 then
taints_xpboost = taints.xpboost[count]
end
Expand Down

0 comments on commit 2ba9642

Please sign in to comment.