fix: Fixes poison field duration, cleans up skill calculations and poison calculations (#1582)
### Summary - [X] Fixes poison field duration - [X] Adds SA+ poison spell calculations - [X] Cleans up skill calculations - [X] Adjusts poison level thresholds to properly reflect OSI
This commit is contained in:
parent
54431f05b5
commit
1f04a13f67
16 changed files with 68 additions and 81 deletions
|
|
@ -42,7 +42,7 @@ namespace Server.Spells.Fifth
|
|||
{
|
||||
Expansion.None => TimeSpan.FromSeconds(20),
|
||||
< Expansion.LBR => TimeSpan.FromSeconds(15 + Caster.Skills.Magery.Value * 0.4),
|
||||
_ => TimeSpan.FromSeconds(3 + Caster.Skills.Magery.Fixed * 0.4)
|
||||
_ => TimeSpan.FromSeconds(3 + Caster.Skills.Magery.Value * 0.4)
|
||||
};
|
||||
|
||||
for (var i = -2; i <= 2; ++i)
|
||||
|
|
@ -142,24 +142,24 @@ namespace Server.Spells.Fifth
|
|||
return;
|
||||
}
|
||||
|
||||
Poison p;
|
||||
int level;
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
p = ((m_Caster.Skills.Magery.Fixed + m_Caster.Skills.Poisoning.Fixed) / 2) switch
|
||||
level = (m_Caster.Skills.Magery.Value + m_Caster.Skills.Poisoning.Value) switch
|
||||
{
|
||||
>= 1000 => Poison.Deadly,
|
||||
> 850 => Poison.Greater,
|
||||
> 650 => Poison.Regular,
|
||||
_ => Poison.Lesser
|
||||
> 199.8 => 3,
|
||||
> 170.2 => 2,
|
||||
> 130.2 => 1,
|
||||
_ => 0
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
p = Poison.Regular;
|
||||
level = 1;
|
||||
}
|
||||
|
||||
if (m.ApplyPoison(m_Caster, p) == ApplyPoisonResult.Poisoned)
|
||||
if (m.ApplyPoison(m_Caster, Poison.GetPoison(level)) is ApplyPoisonResult.Poisoned or ApplyPoisonResult.HigherPoisonActive)
|
||||
{
|
||||
if (SpellHelper.CanRevealCaster(m))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ namespace Server.Spells.Fifth
|
|||
var duration = Core.Expansion switch
|
||||
{
|
||||
Expansion.None => TimeSpan.FromSeconds(Caster.Skills.Magery.Value),
|
||||
_ => TimeSpan.FromSeconds(2 * Caster.Skills.Magery.Fixed / 5.0)
|
||||
_ => TimeSpan.FromSeconds((int)Caster.Skills.Magery.Value * 4)
|
||||
};
|
||||
|
||||
SpellHelper.Summon(creature, Caster, 0x215, duration, false, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue