Fixes brace style (#248)

This commit is contained in:
Kamron Batman 2020-09-13 21:49:46 -07:00 • committed by GitHub
parent a236617ad9
commit 8149620b0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1503 changed files with 28575 additions and 1717 deletions

View file

@ -26,7 +26,9 @@ namespace Server.Spells
var circle = (int)Circle;
if (Scroll != null)
{
circle -= 2;
}
var avg = ChanceLength * circle;
@ -42,7 +44,9 @@ namespace Server.Spells
maxSkill += (1 + (int)Circle / 6) * 25;
if (m.Skills.MagicResist.Value < maxSkill)
{
m.CheckSkill(SkillName.MagicResist, 0.0, m.Skills.MagicResist.Cap);
}
return m.Skills.MagicResist.Value;
}
@ -54,16 +58,22 @@ namespace Server.Spells
n /= 100.0;
if (n <= 0.0)
{
return false;
}
if (n >= 1.0)
{
return true;
}
var maxSkill = (1 + (int)Circle) * 10;
maxSkill += (1 + (int)Circle / 6) * 25;
if (target.Skills.MagicResist.Value < maxSkill)
{
target.CheckSkill(SkillName.MagicResist, 0.0, target.Skills.MagicResist.Cap);
}
return n >= Utility.RandomDouble();
}

View file

@ -85,7 +85,9 @@ namespace Server.Spells
Amounts = new int[regs.Length];
for (var i = 0; i < regs.Length; ++i)
{
Amounts[i] = 1;
}
}
public int Action { get; set; }

View file

@ -49,8 +49,12 @@ namespace Server.Spells
m_Count = 0;
for (var i = 0; i < m_Types.Length; ++i)
{
if (m_Types[i] != null)
{
++m_Count;
}
}
}
return m_Count;
@ -68,10 +72,14 @@ namespace Server.Spells
public static void Register(int spellID, Type type)
{
if (spellID < 0 || spellID >= m_Types.Length)
{
return;
}
if (m_Types[spellID] == null)
{
++m_Count;
}
m_Types[spellID] = type;
@ -91,19 +99,25 @@ namespace Server.Spells
}
if (spm != null)
{
SpecialMoves.Add(spellID, spm);
}
}
}
public static SpecialMove GetSpecialMove(int spellID)
{
if (spellID < 0 || spellID >= m_Types.Length)
{
return null;
}
var t = m_Types[spellID];
if (t == null || !t.IsSubclassOf(typeof(SpecialMove)))
{
return null;
}
SpecialMoves.TryGetValue(spellID, out var move);
return move;
@ -112,7 +126,9 @@ namespace Server.Spells
public static Spell NewSpell(int spellID, Mobile caster, Item scroll)
{
if (spellID < 0 || spellID >= m_Types.Length)
{
return null;
}
var t = m_Types[spellID];