Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -2,56 +2,60 @@ using Server.Items;
|
|||
|
||||
namespace Server.Spells.Necromancy
|
||||
{
|
||||
public abstract class NecromancerSpell : Spell
|
||||
{
|
||||
public abstract double RequiredSkill{ get; }
|
||||
public abstract int RequiredMana{ get; }
|
||||
public abstract class NecromancerSpell : Spell
|
||||
{
|
||||
public NecromancerSpell(Mobile caster, Item scroll, SpellInfo info) : base(caster, scroll, info)
|
||||
{
|
||||
}
|
||||
|
||||
public override SkillName CastSkill => SkillName.Necromancy;
|
||||
public override SkillName DamageSkill => SkillName.SpiritSpeak;
|
||||
public abstract double RequiredSkill{ get; }
|
||||
public abstract int RequiredMana{ get; }
|
||||
|
||||
//public override int CastDelayBase => base.CastDelayBase; // Reference, 3
|
||||
public override SkillName CastSkill => SkillName.Necromancy;
|
||||
public override SkillName DamageSkill => SkillName.SpiritSpeak;
|
||||
|
||||
public override bool ClearHandsOnCast => false;
|
||||
//public override int CastDelayBase => base.CastDelayBase; // Reference, 3
|
||||
|
||||
public override double CastDelayFastScalar => (Core.SE? base.CastDelayFastScalar : 0); // Necromancer spells are not affected by fast cast items, though they are by fast cast recovery
|
||||
public override bool ClearHandsOnCast => false;
|
||||
|
||||
public NecromancerSpell( Mobile caster, Item scroll, SpellInfo info ) : base( caster, scroll, info )
|
||||
{
|
||||
}
|
||||
public override double CastDelayFastScalar =>
|
||||
Core.SE
|
||||
? base.CastDelayFastScalar
|
||||
: 0; // Necromancer spells are not affected by fast cast items, though they are by fast cast recovery
|
||||
|
||||
public override int ComputeKarmaAward()
|
||||
{
|
||||
//TODO: Verify this formula being that Necro spells don't HAVE a circle.
|
||||
//int karma = -(70 + (10 * (int)Circle));
|
||||
int karma = -(40 + (int)(10 * (CastDelayBase.TotalSeconds / CastDelaySecondsPerTick)));
|
||||
public override int ComputeKarmaAward()
|
||||
{
|
||||
//TODO: Verify this formula being that Necro spells don't HAVE a circle.
|
||||
//int karma = -(70 + (10 * (int)Circle));
|
||||
int karma = -(40 + (int)(10 * (CastDelayBase.TotalSeconds / CastDelaySecondsPerTick)));
|
||||
|
||||
if ( Core.ML ) // Pub 36: "Added a new property called Increased Karma Loss which grants higher karma loss for casting necromancy spells."
|
||||
karma += AOS.Scale( karma, AosAttributes.GetValue( Caster, AosAttribute.IncreasedKarmaLoss ) );
|
||||
if (Core.ML
|
||||
) // Pub 36: "Added a new property called Increased Karma Loss which grants higher karma loss for casting necromancy spells."
|
||||
karma += AOS.Scale(karma, AosAttributes.GetValue(Caster, AosAttribute.IncreasedKarmaLoss));
|
||||
|
||||
return karma;
|
||||
}
|
||||
return karma;
|
||||
}
|
||||
|
||||
public override void GetCastSkills( out double min, out double max )
|
||||
{
|
||||
min = RequiredSkill;
|
||||
max = Scroll != null ? min : RequiredSkill + 40.0;
|
||||
}
|
||||
public override void GetCastSkills(out double min, out double max)
|
||||
{
|
||||
min = RequiredSkill;
|
||||
max = Scroll != null ? min : RequiredSkill + 40.0;
|
||||
}
|
||||
|
||||
public override bool ConsumeReagents()
|
||||
{
|
||||
if ( base.ConsumeReagents() )
|
||||
return true;
|
||||
public override bool ConsumeReagents()
|
||||
{
|
||||
if (base.ConsumeReagents())
|
||||
return true;
|
||||
|
||||
if ( ArcaneGem.ConsumeCharges( Caster, 1 ) )
|
||||
return true;
|
||||
if (ArcaneGem.ConsumeCharges(Caster, 1))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int GetMana()
|
||||
{
|
||||
return RequiredMana;
|
||||
}
|
||||
}
|
||||
}
|
||||
public override int GetMana()
|
||||
{
|
||||
return RequiredMana;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue