Skip to content

Commit

Permalink
Add Support for Shrine buffs from The Gull and staff Rune craft (#8457)
Browse files Browse the repository at this point in the history
* Add support for Shrine Buffs

Adds support for Shrine buffs granted by The Gull and all the regular shrines grated by the Staff rune craft and the upcoming Legacy of Phrecia event

* Formatting

---------

Co-authored-by: LocalIdentity <[email protected]>
  • Loading branch information
LocalIdentity and LocalIdentity authored Feb 12, 2025
1 parent a2a9290 commit eb9683b
Show file tree
Hide file tree
Showing 7 changed files with 181 additions and 16 deletions.
3 changes: 3 additions & 0 deletions src/Data/Skills/other.lua
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,9 @@ skills["TriggeredSummonLesserShrine"] = {
spell = true,
duration = true,
},
baseMods = {
flag("Condition:CanHaveLesserShrines", { type = "GlobalEffect", effectType = "Buff", effectName = "Shrines" }),
},
constantStats = {
{ "chance_to_cast_on_kill_%", 100 },
{ "base_skill_effect_duration", 10000 },
Expand Down
1 change: 1 addition & 0 deletions src/Export/Skills/other.txt
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ local skills, mod, flag, skill = ...
#skill TriggeredSummonLesserShrine
#flags spell duration
fromItem = true,
#baseMod flag("Condition:CanHaveLesserShrines", { type = "GlobalEffect", effectType = "Buff", effectName = "Shrines" })
#mods

#noGem
Expand Down
73 changes: 66 additions & 7 deletions src/Modules/CalcPerform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -291,22 +291,81 @@ local function doActorAttribsConditions(env, actor)
end
-- Shrine Buffs: Must be done before life pool calculated for massive shrine
local shrineEffectMod = 1 + modDB:Sum("INC", nil, "BuffEffectOnSelf", "ShrineBuffEffect") / 100
if modDB:Flag(nil, "LesserMassiveShrine") then
modDB:NewMod("Life", "INC", m_floor(20 * shrineEffectMod), "Lesser Massive Shrine")
modDB:NewMod("AreaOfEffect", "INC", m_floor(20 * shrineEffectMod), "Lesser Massive Shrine")
if modDB:Flag(nil, "AccelerationShrine") then
modDB:NewMod("ActionSpeed", "INC", m_floor(50 * shrineEffectMod), "Acceleration Shrine")
modDB:NewMod("ProjectileSpeed", "INC", m_floor(80 * shrineEffectMod), "Acceleration Shrine")
end
if modDB:Flag(nil, "LesserBrutalShrine") then
modDB:NewMod("Damage", "INC", m_floor(20 * shrineEffectMod), "Lesser Brutal Shrine")
modDB:NewMod("EnemyStunDuration", "INC", m_floor(20 * shrineEffectMod), "Lesser Brutal Shrine")
modDB:NewMod("EnemyKnockbackChance", "INC", 100, "Lesser Brutal Shrine")
if modDB:Flag(nil, "BrutalShrine") then
modDB:NewMod("Damage", "INC", m_floor(50 * shrineEffectMod), "Brutal Shrine")
modDB:NewMod("EnemyStunDuration", "INC", m_floor(30 * shrineEffectMod), "Brutal Shrine")
modDB:NewMod("EnemyKnockbackChance", "INC", 100, "Brutal Shrine")
end
if modDB:Flag(nil, "DiamondShrine") then
modDB:NewMod("CritChance", "OVERRIDE", 100, "Diamond Shrine")
end
if modDB:Flag(nil, "DivineShrine") then
modDB:NewMod("DamageTaken", "MORE", -100, "Divine Shrine")
end
if modDB:Flag(nil, "EchoingShrine") then
modDB:NewMod("Speed", "MORE", m_floor(100 * shrineEffectMod), "Echoing Shrine", ModFlag.Attack)
modDB:NewMod("Speed", "MORE", m_floor(100 * shrineEffectMod), "Echoing Shrine", ModFlag.Cast)
modDB:NewMod("RepeatCount", "BASE", m_floor(1 * shrineEffectMod), "Echoing Shrine")
end
if modDB:Flag(nil, "GloomShrine") then
modDB:NewMod("NonChaosDamageGainAsChaos", "BASE", m_floor(10 * shrineEffectMod), "Gloom Shrine")
end
if modDB:Flag(nil, "ImpenetrableShrine") then
modDB:NewMod("Armour", "INC", m_floor(100 * shrineEffectMod), "Impenetrable Shrine")
modDB:NewMod("Evasion", "INC", m_floor(100 * shrineEffectMod), "Impenetrable Shrine")
modDB:NewMod("EnergyShield", "INC", m_floor(100 * shrineEffectMod), "Impenetrable Shrine")
end
if modDB:Flag(nil, "MassiveShrine") then
modDB:NewMod("Life", "INC", m_floor(40 * shrineEffectMod), "Massive Shrine")
modDB:NewMod("AreaOfEffect", "INC", m_floor(40 * shrineEffectMod), "Massive Shrine")
end
if modDB:Flag(nil, "ReplenishingShrine") then
modDB:NewMod("ManaRegenPercent", "BASE", 10 * shrineEffectMod, "Replenishing Shrine")
modDB:NewMod("LifeRegenPercent", "BASE", 6.7 * shrineEffectMod, "Replenishing Shrine")
end
if modDB:Flag(nil, "ResistanceShrine") then
modDB:NewMod("ElementalResist", "BASE", m_floor(50 * shrineEffectMod), "Resistance Shrine")
modDB:NewMod("ElementalResistMax", "BASE", m_floor(10 * shrineEffectMod), "Resistance Shrine")
end
if modDB:Flag(nil, "ResonatingShrine") then
modDB:NewMod("CritChance", "INC", m_floor(50 * shrineEffectMod), "Resonating Shrine", { type = "Multiplier", var = "PowerCharge" })
modDB:NewMod("Speed", "INC", m_floor(4 * shrineEffectMod), "Resonating Shrine", ModFlag.Attack, { type = "Multiplier", var = "FrenzyCharge" })
modDB:NewMod("Speed", "INC", m_floor(4 * shrineEffectMod), "Resonating Shrine", ModFlag.Cast, { type = "Multiplier", var = "FrenzyCharge" })
modDB:NewMod("Damage", "MORE", m_floor(4 * shrineEffectMod), "Resonating Shrine", { type = "Multiplier", var = "FrenzyCharge" })
modDB:NewMod("PhysicalDamageReduction", "BASE", m_floor(4 * shrineEffectMod), "Resonating Shrine", { type = "Multiplier", var = "EnduranceCharge" })
modDB:NewMod("ElementalDamageReduction", "BASE", m_floor(4 * shrineEffectMod), "Resonating Shrine", { type = "Multiplier", var = "EnduranceCharge" })
modDB:NewMod("Damage", "INC", m_floor(4 * shrineEffectMod), "Resonating Shrine", { type = "Multiplier", var = "PowerCharge" }, { type = "Multiplier", var = "FrenzyCharge" }, { type = "Multiplier", var = "EnduranceCharge" })
end
if modDB:Flag(nil, "LesserAccelerationShrine") and not modDB:Flag(nil, "AccelerationShrine") then
modDB:NewMod("ActionSpeed", "INC", m_floor(10 * shrineEffectMod), "Lesser Acceleration Shrine")
modDB:NewMod("ProjectileSpeed", "INC", m_floor(30 * shrineEffectMod), "Lesser Acceleration Shrine")
end
if modDB:Flag(nil, "LesserBrutalShrine") then
modDB:NewMod("Damage", "INC", m_floor(20 * shrineEffectMod), "Lesser Brutal Shrine")
modDB:NewMod("EnemyStunDuration", "INC", m_floor(20 * shrineEffectMod), "Lesser Brutal Shrine")
modDB:NewMod("EnemyKnockbackChance", "INC", 100, "Lesser Brutal Shrine")
end
if modDB:Flag(nil, "LesserImpenetrableShrine") then
modDB:NewMod("Armour", "INC", m_floor(50 * shrineEffectMod), "Lesser Impenetrable Shrine")
modDB:NewMod("Evasion", "INC", m_floor(50 * shrineEffectMod), "Lesser Impenetrable Shrine")
modDB:NewMod("EnergyShield", "INC", m_floor(50 * shrineEffectMod), "Lesser Impenetrable Shrine")
end
if modDB:Flag(nil, "LesserMassiveShrine") then
modDB:NewMod("Life", "INC", m_floor(20 * shrineEffectMod), "Lesser Massive Shrine")
modDB:NewMod("AreaOfEffect", "INC", m_floor(20 * shrineEffectMod), "Lesser Massive Shrine")
end
if modDB:Flag(nil, "LesserReplenishingShrine") then
modDB:NewMod("ManaRegenPercent", "BASE", 3.3 * shrineEffectMod, "Lesser Replenishing Shrine")
modDB:NewMod("LifeRegenPercent", "BASE", 3.3 * shrineEffectMod, "Lesser Replenishing Shrine")
end
if modDB:Flag(nil, "LesserResistanceShrine") then
modDB:NewMod("ElementalResist", "BASE", m_floor(25 * shrineEffectMod), "Lesser Resistance Shrine")
modDB:NewMod("ElementalResistMax", "BASE", m_floor(2 * shrineEffectMod), "Lesser Resistance Shrine")
end
end
if env.mode_effective then
if env.player.mainSkill.skillModList:Sum("BASE", env.player.mainSkill.skillCfg, "FireExposureChance") > 0 or modDB:Sum("BASE", nil, "FireExposureChance") > 0 then
Expand Down
17 changes: 15 additions & 2 deletions src/Modules/CalcSetup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,23 @@ function calcs.initModDB(env, modDB)
modDB:NewMod("ChaoticMight", "FLAG", true, "Base", { type = "Condition", var = "ChaoticMight" })
modDB:NewMod("Tailwind", "FLAG", true, "Base", { type = "Condition", var = "Tailwind" })
modDB:NewMod("Adrenaline", "FLAG", true, "Base", { type = "Condition", var = "Adrenaline" })
modDB:NewMod("LesserMassiveShrine", "FLAG", true, "Base", { type = "Condition", var = "LesserMassiveShrine" })
modDB:NewMod("LesserBrutalShrine", "FLAG", true, "Base", { type = "Condition", var = "LesserBrutalShrine" })
modDB:NewMod("AccelerationShrine", "FLAG", true, "Base", { type = "Condition", var = "AccelerationShrine" })
modDB:NewMod("BrutalShrine", "FLAG", true, "Base", { type = "Condition", var = "BrutalShrine" })
modDB:NewMod("DiamondShrine", "FLAG", true, "Base", { type = "Condition", var = "DiamondShrine" })
modDB:NewMod("DivineShrine", "FLAG", true, "Base", { type = "Condition", var = "DivineShrine" })
modDB:NewMod("EchoingShrine", "FLAG", true, "Base", { type = "Condition", var = "EchoingShrine" })
modDB:NewMod("GloomShrine", "FLAG", true, "Base", { type = "Condition", var = "GloomShrine" })
modDB:NewMod("ImpenetrableShrine", "FLAG", true, "Base", { type = "Condition", var = "ImpenetrableShrine" })
modDB:NewMod("MassiveShrine", "FLAG", true, "Base", { type = "Condition", var = "MassiveShrine" })
modDB:NewMod("ReplenishingShrine", "FLAG", true, "Base", { type = "Condition", var = "ReplenishingShrine" })
modDB:NewMod("ResistanceShrine", "FLAG", true, "Base", { type = "Condition", var = "ResistanceShrine" })
modDB:NewMod("ResonatingShrine", "FLAG", true, "Base", { type = "Condition", var = "ResonatingShrine" })
modDB:NewMod("LesserAccelerationShrine", "FLAG", true, "Base", { type = "Condition", var = "LesserAccelerationShrine" }, { type = "Condition", var = "AccelerationShrine", neg = true })
modDB:NewMod("LesserBrutalShrine", "FLAG", true, "Base", { type = "Condition", var = "LesserBrutalShrine" }, { type = "Condition", var = "BrutalShrine", neg = true })
modDB:NewMod("LesserImpenetrableShrine", "FLAG", true, "Base", { type = "Condition", var = "LesserImpenetrableShrine" }, { type = "Condition", var = "ImpenetrableShrine", neg = true })
modDB:NewMod("LesserMassiveShrine", "FLAG", true, "Base", { type = "Condition", var = "LesserMassiveShrine" }, { type = "Condition", var = "MassiveShrine", neg = true })
modDB:NewMod("LesserReplenishingShrine", "FLAG", true, "Base", { type = "Condition", var = "LesserReplenishingShrine" }, { type = "Condition", var = "ReplenishingShrine", neg = true })
modDB:NewMod("LesserResistanceShrine", "FLAG", true, "Base", { type = "Condition", var = "LesserResistanceShrine" }, { type = "Condition", var = "ResistanceShrine", neg = true })
modDB:NewMod("AlchemistsGenius", "FLAG", true, "Base", { type = "Condition", var = "AlchemistsGenius" })
modDB:NewMod("LuckyHits", "FLAG", true, "Base", { type = "Condition", var = "LuckyHits" })
modDB:NewMod("Convergence", "FLAG", true, "Base", { type = "Condition", var = "Convergence" })
Expand Down
47 changes: 43 additions & 4 deletions src/Modules/Calcs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -699,18 +699,57 @@ function calcs.buildOutput(build, mode)
if env.modDB:Flag(nil, "HerEmbrace") then
t_insert(combatList, "Her Embrace")
end
if env.modDB:Flag(nil, "LesserMassiveShrine") then
t_insert(combatList, "Lesser Massive Shrine")
if env.modDB:Flag(nil, "AccelerationShrine") then
t_insert(combatList, "Acceleration Shrine")
end
if env.modDB:Flag(nil, "LesserBrutalShrine") then
t_insert(combatList, "Lesser Brutal Shrine")
if env.modDB:Flag(nil, "BrutalShrine") then
t_insert(combatList, "Brutal Shrine")
end
if env.modDB:Flag(nil, "DiamondShrine") then
t_insert(combatList, "Diamond Shrine")
end
if env.modDB:Flag(nil, "DivineShrine") then
t_insert(combatList, "Divine Shrine")
end
if env.modDB:Flag(nil, "EchoingShrine") then
t_insert(combatList, "Echoing Shrine")
end
if env.modDB:Flag(nil, "GloomShrine") then
t_insert(combatList, "Gloom Shrine")
end
if env.modDB:Flag(nil, "ImpenetrableShrine") then
t_insert(combatList, "Impenetrable Shrine")
end
if env.modDB:Flag(nil, "MassiveShrine") then
t_insert(combatList, "Massive Shrine")
end
if env.modDB:Flag(nil, "ReplenishingShrine") then
t_insert(combatList, "Replenishing Shrine")
end
if env.modDB:Flag(nil, "ResistanceShrine") then
t_insert(combatList, "Resistance Shrine")
end
if env.modDB:Flag(nil, "ResonatingShrine") then
t_insert(combatList, "Resonating Shrine")
end
if env.modDB:Flag(nil, "LesserAccelerationShrine") then
t_insert(combatList, "Lesser Acceleration Shrine")
end
if env.modDB:Flag(nil, "LesserBrutalShrine") then
t_insert(combatList, "Lesser Brutal Shrine")
end
if env.modDB:Flag(nil, "LesserImpenetrableShrine") then
t_insert(combatList, "Lesser Impenetrable Shrine")
end
if env.modDB:Flag(nil, "LesserMassiveShrine") then
t_insert(combatList, "Lesser Massive Shrine")
end
if env.modDB:Flag(nil, "LesserReplenishingShrine") then
t_insert(combatList, "Lesser Replenishing Shrine")
end
if env.modDB:Flag(nil, "LesserResistanceShrine") then
t_insert(combatList, "Lesser Resistance Shrine")
end
for name in pairs(env.buffs) do
t_insert(buffList, name)
end
Expand Down
Loading

0 comments on commit eb9683b

Please sign in to comment.