Overwrite

Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
Unstable Kitsune
2023-11-28 23:20:26 -05:00
parent 3cd54811de
commit b918192e4e
11608 changed files with 2644205 additions and 47 deletions

View File

@@ -0,0 +1,43 @@
using System;
using Server;
using Server.Items;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericBag : ScrollBag
{
[Constructable]
public ClericBag()
{
Hue = 0x1F0;
PlaceItemIn( 30, 35, new ClericAngelicFaithScroll() );
PlaceItemIn( 50, 35, new ClericBanishEvilScroll() );
PlaceItemIn( 70, 35, new ClericDampenSpiritScroll() );
PlaceItemIn( 90, 35, new ClericDivineFocusScroll() );
PlaceItemIn( 30, 55, new ClericHammerOfFaithScroll() );
PlaceItemIn( 50, 55, new ClericPurgeScroll() );
PlaceItemIn( 70, 55, new ClericRestorationScroll() );
PlaceItemIn( 90, 55, new ClericSacredBoonScroll() );
PlaceItemIn( 30, 75, new ClericSacrificeScroll() );
PlaceItemIn( 50, 75, new ClericSmiteScroll() );
PlaceItemIn( 70, 75, new ClericTouchOfLifeScroll() );
PlaceItemIn( 90, 75, new ClericTrialByFireScroll() );
}
public ClericBag( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,24 @@
using System;
using Server;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericInitializer : BaseInitializer
{
public static void Configure()
{
Register( typeof( ClericAngelicFaithSpell ), "Angelic Faith", "The caster calls upon the divine powers of the heavens to transform himself into a holy angel. The caster gains better regeneration rates and increased stats and skills.", null, "Mana: 50; Skill: 80; Tithing: 100", 2295, 3500, School.Cleric );
Register( typeof( ClericBanishEvilSpell ), "Banish Evil", "The caster calls forth a divine fire to banish his undead or demonic foe from the earth.", null, "Mana: 40; Skill: 60; Tithing: 30", 20739, 3500, School.Cleric );
Register( typeof( ClericDampenSpiritSpell ), "Dampen Spirit", "The caster's enemy is slowly drained of his stamina, greatly hindering their ability to fight in combat or flee.", null, "Mana: 11; Skill: 35; Tithing: 15", 2270, 3500, School.Cleric );
Register( typeof( ClericDivineFocusSpell ), "Divine Focus", "The caster's mind focuses on his divine faith increasing the effect of his prayers. However, the caster becomes mentally fatigued much faster.", null, "Mana: 4; Skill: 35; Tithing: 15", 2276, 3500, School.Cleric );
Register( typeof( ClericHammerOfFaithSpell ), "Hammer Of Faith", "Summons forth a divine hammer of pure energy blessed with the ability to vanquish undead foes with greater efficiency.", null, "Mana: 14; Skill: 40; Tithing: 20", 20741, 3500, School.Cleric );
Register( typeof( ClericPurgeSpell ), "Purge", "The target is cured of all poisons and has all negative stat curses removed.", null, "Mana: 6; Skill: 10; Tithing: 5", 20744, 3500, School.Cleric );
Register( typeof( ClericRestorationSpell ), "Restoration", "The caster's target is resurrected and fully healed and refreshed.", null, "Mana: 50; Skill: 50; Tithing: 40", 2298, 3500, School.Cleric );
Register( typeof( ClericSacredBoonSpell ), "Sacred Boon", "The caster's target is surrounded by a divine wind that heals small amounts of lost life over time.", null, "Mana: 11; Skill: 25; Tithing: 15", 20742, 3500, School.Cleric );
Register( typeof( ClericSacrificeSpell ), "Sacrifice", "The caster sacrifices himself for his allies. Whenever damaged, all party members are healed a small percent of the damage dealt. The caster still takes damage.", null, "Mana: 4; Skill: 5; Tithing: 5", 20743, 3500, School.Cleric );
Register( typeof( ClericSmiteSpell ), "Smite", "The caster calls to the heavens to send a deadly bolt of lightning to strike down his opponent.", null, "Mana: 50; Skill: 80; Tithing: 60", 2269, 3500, School.Cleric );
Register( typeof( ClericTouchOfLifeSpell ), "Touch Of Life", "The caster's target is healed by the heavens for a significant amount.", null, "Mana: 9; Skill: 30; Tithing: 10", 2243, 3500, School.Cleric );
Register( typeof( ClericTrialByFireSpell ), "Trial By Fire", "The caster is surrounded by a divine flame that damages the caster's enemy when hit by a weapon.", null, "Mana: 9; Skill: 45; Tithing: 25", 20736, 3500, School.Cleric );
}
}
}

View File

@@ -0,0 +1,123 @@
using System;
using Server;
using Server.Spells;
using Server.Network;
namespace Server.ACC.CSS.Systems.Cleric
{
public abstract class ClericSpell : CSpell
{
public abstract SpellCircle Circle { get; }
public ClericSpell( Mobile caster, Item scroll, SpellInfo info ) : base( caster, scroll, info )
{
}
public override SkillName CastSkill { get { return SkillName.SpiritSpeak; } }
public override TimeSpan CastDelayBase { get { return TimeSpan.FromSeconds(10 * CastDelaySecondsPerTick); } }
public override bool ClearHandsOnCast { get { return false; } }
public override int GetMana()
{
return RequiredMana;
}
public override bool CheckCast()
{
if ( !base.CheckCast() )
return false;
if ( Caster.Skills[CastSkill].Value < RequiredSkill )
{
Caster.SendMessage( "You must have at least " + RequiredSkill + " Spirit Speak to invoke this prayer" );
return false;
}
else if ( Caster.TithingPoints < RequiredTithing )
{
Caster.SendMessage( "You must have at least " + RequiredTithing + " Piety to invoke this prayer." );
return false;
}
else if ( Caster.Mana < ScaleMana( GetMana() ) )
{
Caster.SendMessage( "You must have at least " + GetMana() + " Mana to invoke this praryer." );
return false;
}
return true;
}
public override bool CheckFizzle()
{
if ( !base.CheckFizzle() )
return false;
int tithing = RequiredTithing;
double min, max;
GetCastSkills( out min, out max );
if ( AosAttributes.GetValue( Caster, AosAttribute.LowerRegCost ) > Utility.Random( 100 ) )
tithing = 0;
int mana = ScaleMana( GetMana() );
if ( Caster.Skills[CastSkill].Value < RequiredSkill )
{
Caster.SendMessage( "You must have at least " + RequiredSkill + " Spirit Speak to invoke this prayer." );
return false;
}
else if ( Caster.TithingPoints < tithing )
{
Caster.SendMessage( "You must have at least " + tithing + " Piety to invoke this prayer." );
return false;
}
else if ( Caster.Mana < mana )
{
Caster.SendMessage( "You must have at least " + mana + " Mana to invoke this prayer." );
return false;
}
Caster.TithingPoints -= tithing;
return true;
}
public override void SayMantra()
{
Caster.PublicOverheadMessage( MessageType.Regular, 0x3B2, false, Info.Mantra );
Caster.PlaySound( 0x24A );
}
public override void DoFizzle()
{
Caster.PlaySound( 0x1D6 );
Caster.NextSpellTime = Core.TickCount;
}
public override void DoHurtFizzle()
{
Caster.PlaySound( 0x1D6 );
}
public override void OnDisturb( DisturbType type, bool message )
{
base.OnDisturb( type, message );
if ( message )
Caster.PlaySound( 0x1D6 );
}
public override void OnBeginCast()
{
base.OnBeginCast();
Caster.FixedEffect( 0x37C4, 10, 42, 4, 3 );
}
public override void GetCastSkills( out double min, out double max )
{
min = RequiredSkill;
max = RequiredSkill + 40.0;
}
}
}

View File

@@ -0,0 +1,64 @@
using System;
using Server.Items;
using Server.Spells;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericSpellbook : CSpellbook
{
public override School School{ get{ return School.Cleric; } }
[Constructable]
public ClericSpellbook() : this( (ulong)0, CSSettings.FullSpellbooks )
{
}
[Constructable]
public ClericSpellbook( bool full ) : this( (ulong)0, full )
{
}
[Constructable]
public ClericSpellbook( ulong content, bool full ) : base( content, 0xEFA, full )
{
Hue = 0x1F0;
Name = "Cleric Spellbook";
}
public override void OnDoubleClick( Mobile from )
{
if ( from.AccessLevel == AccessLevel.Player )
{
Container pack = from.Backpack;
if( !(Parent == from || (pack != null && Parent == pack)) )
{
from.SendMessage( "The spellbook must be in your backpack [and not in a container within] to open." );
return;
}
else if( SpellRestrictions.UseRestrictions && !SpellRestrictions.CheckRestrictions( from, this.School ) )
{
return;
}
}
from.CloseGump( typeof( ClericSpellbookGump ) );
from.SendGump( new ClericSpellbookGump( this ) );
}
public ClericSpellbook( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,19 @@
using System;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericSpellbookGump : CSpellbookGump
{
public override string TextHue { get{ return "336666"; } }
public override int BGImage { get{ return 2203; } }
public override int SpellBtn { get{ return 2362; } }
public override int SpellBtnP{ get{ return 2361; } }
public override string Label1 { get{ return "Cleric"; } }
public override string Label2 { get{ return "Prayers"; } }
public override Type GumpType { get{ return typeof( ClericSpellbookGump ); } }
public ClericSpellbookGump( ClericSpellbook book ) : base( book )
{
}
}
}

View File

@@ -0,0 +1,19 @@
using System;
using Server;
using Server.Mobiles;
using Server.Items;
namespace Server.ACC.CSS.Systems.Cleric
{
public class PlayerEvent
{
public delegate void OnWeaponHit( Mobile attacker, Mobile defender, int damage, WeaponAbility a );
public static event OnWeaponHit HitByWeapon;
public static void InvokeHitByWeapon( Mobile attacker, Mobile defender, int damage, WeaponAbility a )
{
if ( HitByWeapon != null )
HitByWeapon( attacker, defender, damage, a );
}
}
}

View File

@@ -0,0 +1,37 @@
using System;
using Server;
using Server.Items;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericAngelicFaithScroll : CSpellScroll
{
[Constructable]
public ClericAngelicFaithScroll() : this( 1 )
{
}
[Constructable]
public ClericAngelicFaithScroll( int amount ) : base( typeof( ClericAngelicFaithSpell ), 0xE39, amount )
{
Name = "Angelic Faith";
Hue = 0x1F0;
}
public ClericAngelicFaithScroll( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,37 @@
using System;
using Server;
using Server.Items;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericBanishEvilScroll : CSpellScroll
{
[Constructable]
public ClericBanishEvilScroll() : this( 1 )
{
}
[Constructable]
public ClericBanishEvilScroll( int amount ) : base( typeof( ClericBanishEvilSpell ), 0xE39, amount )
{
Name = "Banish Evil";
Hue = 0x1F0;
}
public ClericBanishEvilScroll( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,37 @@
using System;
using Server;
using Server.Items;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericDampenSpiritScroll : CSpellScroll
{
[Constructable]
public ClericDampenSpiritScroll() : this( 1 )
{
}
[Constructable]
public ClericDampenSpiritScroll( int amount ) : base( typeof( ClericDampenSpiritSpell ), 0xE39, amount )
{
Name = "Dampen Spirit";
Hue = 0x1F0;
}
public ClericDampenSpiritScroll( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,37 @@
using System;
using Server;
using Server.Items;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericDivineFocusScroll : CSpellScroll
{
[Constructable]
public ClericDivineFocusScroll() : this( 1 )
{
}
[Constructable]
public ClericDivineFocusScroll( int amount ) : base( typeof( ClericDivineFocusSpell ), 0xE39, amount )
{
Name = "Divine Focus";
Hue = 0x1F0;
}
public ClericDivineFocusScroll( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,37 @@
using System;
using Server;
using Server.Items;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericHammerOfFaithScroll : CSpellScroll
{
[Constructable]
public ClericHammerOfFaithScroll() : this( 1 )
{
}
[Constructable]
public ClericHammerOfFaithScroll( int amount ) : base( typeof( ClericHammerOfFaithSpell ), 0xE39, amount )
{
Name = "Hammer Of Faith";
Hue = 0x1F0;
}
public ClericHammerOfFaithScroll( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,37 @@
using System;
using Server;
using Server.Items;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericPurgeScroll : CSpellScroll
{
[Constructable]
public ClericPurgeScroll() : this( 1 )
{
}
[Constructable]
public ClericPurgeScroll( int amount ) : base( typeof( ClericPurgeSpell ), 0xE39, amount )
{
Name = "Purge";
Hue = 0x1F0;
}
public ClericPurgeScroll( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,37 @@
using System;
using Server;
using Server.Items;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericRestorationScroll : CSpellScroll
{
[Constructable]
public ClericRestorationScroll() : this( 1 )
{
}
[Constructable]
public ClericRestorationScroll( int amount ) : base( typeof( ClericRestorationSpell ), 0xE39, amount )
{
Name = "Restoration";
Hue = 0x1F0;
}
public ClericRestorationScroll( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,37 @@
using System;
using Server;
using Server.Items;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericSacredBoonScroll : CSpellScroll
{
[Constructable]
public ClericSacredBoonScroll() : this( 1 )
{
}
[Constructable]
public ClericSacredBoonScroll( int amount ) : base( typeof( ClericSacredBoonSpell ), 0xE39, amount )
{
Name = "Sacred Boon";
Hue = 0x1F0;
}
public ClericSacredBoonScroll( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,37 @@
using System;
using Server;
using Server.Items;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericSacrificeScroll : CSpellScroll
{
[Constructable]
public ClericSacrificeScroll() : this( 1 )
{
}
[Constructable]
public ClericSacrificeScroll( int amount ) : base( typeof( ClericSacrificeSpell ), 0xE39, amount )
{
Name = "Sacrifice";
Hue = 0x1F0;
}
public ClericSacrificeScroll( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,37 @@
using System;
using Server;
using Server.Items;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericSmiteScroll : CSpellScroll
{
[Constructable]
public ClericSmiteScroll() : this( 1 )
{
}
[Constructable]
public ClericSmiteScroll( int amount ) : base( typeof( ClericSmiteSpell ), 0xE39, amount )
{
Name = "Smite";
Hue = 0x1F0;
}
public ClericSmiteScroll( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,37 @@
using System;
using Server;
using Server.Items;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericTouchOfLifeScroll : CSpellScroll
{
[Constructable]
public ClericTouchOfLifeScroll() : this( 1 )
{
}
[Constructable]
public ClericTouchOfLifeScroll( int amount ) : base( typeof( ClericTouchOfLifeSpell ), 0xE39, amount )
{
Name = "Touch Of Life";
Hue = 0x1F0;
}
public ClericTouchOfLifeScroll( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,37 @@
using System;
using Server;
using Server.Items;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericTrialByFireScroll : CSpellScroll
{
[Constructable]
public ClericTrialByFireScroll() : this( 1 )
{
}
[Constructable]
public ClericTrialByFireScroll( int amount ) : base( typeof( ClericTrialByFireSpell ), 0xE39, amount )
{
Name = "Trial By Fire";
Hue = 0x1F0;
}
public ClericTrialByFireScroll( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,303 @@
using System;
using System.Collections;
using Server.Items;
using Server.Mobiles;
using Server.Spells;
using Server.Spells.Seventh;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericAngelicFaithSpell : ClericSpell
{
private static SpellInfo m_Info = new SpellInfo(
"Angelic Faith", "Angelus Terum",
//SpellCircle.Eighth,
212,
9041
);
public override SpellCircle Circle
{
get { return SpellCircle.Eighth; }
}
public override int RequiredTithing { get { return 100; } }
public override double RequiredSkill { get { return 80.0; } }
public override double CastDelayFastScalar { get { return 1.0; } }
public override int CastRecoveryBase { get { return (Core.ML ? 5 : base.CastRecoveryBase); } }
public override TimeSpan CastDelayBase
{
get
{
return TimeSpan.FromSeconds(2.0);
}
}
private static Hashtable m_Table = new Hashtable();
public ClericAngelicFaithSpell(Mobile caster, Item scroll) : base(caster, scroll, m_Info)
{
}
public static bool HasEffect(Mobile m)
{
return (m_Table[m] != null);
}
public static void RemoveEffect(Mobile m)
{
if (TransformationSpellHelper.UnderTransformation(m)) TransformationSpellHelper.RemoveContext(m, true);
m.BodyMod = 0;
object[] mods = (object[])m_Table[m];
if (mods != null)
{
m.RemoveStatMod(((StatMod)mods[0]).Name);
m.RemoveStatMod(((StatMod)mods[1]).Name);
m.RemoveStatMod(((StatMod)mods[2]).Name);
m.RemoveSkillMod((SkillMod)mods[3]);
m.RemoveSkillMod((SkillMod)mods[4]);
m.RemoveSkillMod((SkillMod)mods[5]);
}
m_Table.Remove(m);
m.EndAction(typeof(ClericAngelicFaithSpell));
}
public override bool CheckCast()
{
if (Caster.BodyMod == 123)
{
RemoveEffect(Caster);
if (TransformationSpellHelper.UnderTransformation(Caster)) TransformationSpellHelper.RemoveContext(Caster, true);
if (Caster.BodyMod != 0) Caster.BodyMod = 0;
return false;
}
if (!TransformationSpellHelper.CheckCast(Caster, this))
return false;
return base.CheckCast();
}
public override void OnCast()
{
TransformationSpellHelper.OnCast(Caster, this);
if (CheckSequence())
{
RemoveEffect(Caster);
object[] mods = new object[]
{
new StatMod( StatType.Str, "[Cleric] Str Offset", 20, TimeSpan.Zero ),
new StatMod( StatType.Dex, "[Cleric] Dex Offset", 20, TimeSpan.Zero ),
new StatMod( StatType.Int, "[Cleric] Int Offset", 20, TimeSpan.Zero ),
new DefaultSkillMod( SkillName.Macing, true, 20 ),
new DefaultSkillMod( SkillName.Healing, true, 20 ),
new DefaultSkillMod( SkillName.Anatomy, true, 20 )
};
m_Table[Caster] = mods;
Caster.AddStatMod((StatMod)mods[0]);
Caster.AddStatMod((StatMod)mods[1]);
Caster.AddStatMod((StatMod)mods[2]);
Caster.AddSkillMod((SkillMod)mods[3]);
Caster.AddSkillMod((SkillMod)mods[4]);
Caster.AddSkillMod((SkillMod)mods[5]);
double span = 10.0 * ClericDivineFocusSpell.GetScalar(Caster);
new InternalTimer(Caster, TimeSpan.FromMinutes((int)span)).Start();
IMount mount = Caster.Mount;
if (mount != null)
mount.Rider = null;
Caster.BodyMod = 123;
Caster.BeginAction(typeof(ClericAngelicFaithSpell));
Caster.PlaySound(0x165);
Caster.FixedParticles(0x3728, 1, 13, 0x480, 92, 3, EffectLayer.Head);
}
FinishSequence();
}
private class InternalTimer : Timer
{
private Mobile m_Owner;
private DateTime m_Expire;
public InternalTimer(Mobile owner, TimeSpan duration) : base(TimeSpan.Zero, TimeSpan.FromSeconds(0.1))
{
m_Owner = owner;
m_Expire = DateTime.Now + duration;
}
protected override void OnTick()
{
if (DateTime.Now >= m_Expire)
{
ClericAngelicFaithSpell.RemoveEffect(m_Owner);
Stop();
}
}
}
}
}

View File

@@ -0,0 +1,112 @@
using System;
using System.Collections;
using Server.Targeting;
using Server.Network;
using Server.Mobiles;
using Server.Items;
using Server.Spells;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericBanishEvilSpell : ClericSpell
{
private static SpellInfo m_Info = new SpellInfo(
"Banish Evil", "Abigo Malus",
//SpellCircle.Sixth,
212,
9041
);
public override SpellCircle Circle
{
get { return SpellCircle.Sixth; }
}
public override int RequiredTithing { get { return 30; } }
public override double RequiredSkill { get { return 60.0; } }
public ClericBanishEvilSpell(Mobile caster, Item scroll)
: base(caster, scroll, m_Info)
{
}
public override void OnCast()
{
Caster.Target = new InternalTarget(this);
}
public void Target(Mobile m)
{
SlayerEntry undead = SlayerGroup.GetEntryByName(SlayerName.Silver);
SlayerEntry demon = SlayerGroup.GetEntryByName(SlayerName.DaemonDismissal);
if (!Caster.CanSee(m))
{
Caster.SendLocalizedMessage(500237); // Target can not be seen.
}
else if (m is PlayerMobile)
{
Caster.SendMessage("You cannot banish another player!");
}
else if ((undead != null && !undead.Slays(m)) || (demon != null && !demon.Slays(m)))
{
Caster.SendMessage("This spell cannot be used on this type of creature.");
}
else if (CheckHSequence(m))
{
SpellHelper.Turn(Caster, m);
m.FixedParticles(0x3709, 10, 30, 5052, 0x480, 0, EffectLayer.LeftFoot);
m.PlaySound(0x208);
m.Say("No! I musn't be banished!");
new InternalTimer(m).Start();
}
FinishSequence();
}
private class InternalTimer : Timer
{
Mobile m_Owner;
public InternalTimer(Mobile owner)
: base(TimeSpan.FromSeconds(1.5))
{
m_Owner = owner;
}
protected override void OnTick()
{
if (m_Owner != null && m_Owner.CheckAlive())
{
m_Owner.Delete();
}
}
}
private class InternalTarget : Target
{
private ClericBanishEvilSpell m_Owner;
public InternalTarget(ClericBanishEvilSpell owner)
: base(12, false, TargetFlags.Harmful)
{
m_Owner = owner;
}
protected override void OnTarget(Mobile from, object o)
{
if (o is Mobile)
{
m_Owner.Target((Mobile)o);
}
}
protected override void OnTargetFinish(Mobile from)
{
m_Owner.FinishSequence();
}
}
}
}

View File

@@ -0,0 +1,132 @@
using System;
using System.Collections;
using Server.Targeting;
using Server.Network;
using Server.Mobiles;
using Server.Items;
using Server.Spells;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericDampenSpiritSpell : ClericSpell
{
private static SpellInfo m_Info = new SpellInfo(
"Dampen Spirit", "Abicio Spiritus",
//SpellCircle.Fourth,
212,
9041
);
public override SpellCircle Circle
{
get { return SpellCircle.Fourth; }
}
public override int RequiredTithing{ get{ return 15; } }
public override double RequiredSkill{ get{ return 35.0; } }
private static Hashtable m_Table = new Hashtable();
public ClericDampenSpiritSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}
public override void OnCast()
{
Caster.Target = new InternalTarget( this );
}
public static bool HasEffect( Mobile m )
{
return ( m_Table[m] != null );
}
public static void RemoveEffect( Mobile m )
{
Timer t = (Timer)m_Table[m];
if ( t != null )
{
t.Stop();
m_Table.Remove( m );
}
}
public void Target( Mobile m )
{
if ( !Caster.CanSee( m ) )
{
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
}
else if ( CheckHSequence( m ) )
{
SpellHelper.Turn( Caster, m );
Timer t = new InternalTimer( m );
m_Table[m] = t;
t.Start();
m.FixedParticles( 0x374A, 10, 15, 5032, EffectLayer.Head );
m.PlaySound( 0x1F8 );
m.SendMessage( "You feel your spirit weakening." );
}
FinishSequence();
}
private class InternalTimer : Timer
{
private Mobile m_Owner;
private DateTime m_Expire;
public InternalTimer( Mobile owner ) : base( TimeSpan.Zero, TimeSpan.FromSeconds( 1.5 ) )
{
m_Owner = owner;
m_Expire = DateTime.Now + TimeSpan.FromSeconds( 25.0 );
}
protected override void OnTick()
{
if ( !m_Owner.CheckAlive() || DateTime.Now >= m_Expire )
{
Stop();
m_Table.Remove( m_Owner );
m_Owner.SendMessage( "Your spirit begins to recover." );
}
else if ( m_Owner.Stam < 3 )
{
m_Owner.Stam = 0;
}
else
{
m_Owner.Stam -= 3;
}
}
}
private class InternalTarget : Target
{
private ClericDampenSpiritSpell m_Owner;
public InternalTarget( ClericDampenSpiritSpell owner ) : base( 12, false, TargetFlags.Harmful )
{
m_Owner = owner;
}
protected override void OnTarget( Mobile from, object o )
{
if ( o is Mobile )
{
m_Owner.Target( (Mobile)o );
}
}
protected override void OnTargetFinish( Mobile from )
{
m_Owner.FinishSequence();
}
}
}
}

View File

@@ -0,0 +1,105 @@
using System;
using System.Collections;
using Server.Targeting;
using Server.Network;
using Server.Mobiles;
using Server.Items;
using Server.Spells;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericDivineFocusSpell : ClericSpell
{
private static SpellInfo m_Info = new SpellInfo(
"Divine Focus", "Divinium Cogitatus",
//SpellCircle.First,
212,
9041
);
public override SpellCircle Circle
{
get { return SpellCircle.First; }
}
public override int RequiredTithing{ get{ return 15; } }
public override double RequiredSkill{ get{ return 35.0; } }
private static Hashtable m_Table = new Hashtable();
public ClericDivineFocusSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}
public static double GetScalar( Mobile m )
{
double val = 1.0;
if ( m.CanBeginAction( typeof( ClericDivineFocusSpell ) ) )
val = 1.5;
return val;
}
public override bool CheckCast()
{
if ( !base.CheckCast() )
{
return false;
}
if ( !Caster.CanBeginAction( typeof( ClericDivineFocusSpell ) ) )
{
Caster.SendMessage( "This spell is already in effect" );
return false;
}
return true;
}
public override void OnCast()
{
if ( !Caster.CanBeginAction( typeof( ClericDivineFocusSpell ) ) )
{
Caster.SendMessage( "This spell is already in effect" );
return;
}
if ( CheckSequence() )
{
Caster.BeginAction( typeof( ClericDivineFocusSpell ) );
Timer t = new InternalTimer( Caster );
m_Table[Caster] = t;
t.Start();
Caster.FixedParticles( 0x375A, 1, 15, 0x480, 1, 4, EffectLayer.Waist );
}
}
private class InternalTimer : Timer
{
private Mobile m_Owner;
public InternalTimer( Mobile owner ) : base( TimeSpan.Zero, TimeSpan.FromSeconds( 1.5 ) )
{
m_Owner = owner;
}
protected override void OnTick()
{
if ( !m_Owner.CheckAlive() || m_Owner.Mana < 3 )
{
m_Owner.EndAction( typeof( ClericDivineFocusSpell ) );
m_Table.Remove( m_Owner );
m_Owner.SendMessage( "Your mind weakens and you are unable to maintain your divine focus." );
Stop();
}
else
{
m_Owner.Mana -= 3;
}
}
}
}
}

View File

@@ -0,0 +1,167 @@
using System;
using System.Collections;
using Server.Targeting;
using Server.Network;
using Server.Mobiles;
using Server.Items;
using Server.Spells;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericHammerOfFaithSpell : ClericSpell
{
private static SpellInfo m_Info = new SpellInfo(
"Hammer of Faith", "Malleus Terum",
//SpellCircle.Fifth,
212,
9041
);
public override SpellCircle Circle
{
get { return SpellCircle.Fifth; }
}
public override int RequiredTithing{ get{ return 20; } }
public override double RequiredSkill{ get{ return 40.0; } }
public ClericHammerOfFaithSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}
public override void OnCast()
{
if ( CheckSequence() )
{
Item weap = new HammerOfFaith( Caster );
Caster.AddToBackpack( weap );
Caster.SendMessage( "You create a magical hammer and place it in your backpack." );
Caster.PlaySound( 0x212 );
Caster.PlaySound( 0x206 );
Effects.SendLocationParticles( EffectItem.Create( Caster.Location, Caster.Map, EffectItem.DefaultDuration ), 0x376A, 1, 29, 0x47D, 2, 9962, 0 );
Effects.SendLocationParticles( EffectItem.Create( new Point3D( Caster.X, Caster.Y, Caster.Z - 7 ), Caster.Map, EffectItem.DefaultDuration ), 0x37C4, 1, 29, 0x47D, 2, 9502, 0 );
}
}
[FlipableAttribute( 0x1439, 0x1438 )]
private class HammerOfFaith : BaseBashing
{
private Mobile m_Owner;
private DateTime m_Expire;
private Timer m_Timer;
public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.WhirlwindAttack; } }
public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.CrushingBlow; } }
public override int AosStrengthReq{ get{ return 10; } }
public override int AosMinDamage{ get{ return 17; } }
public override int AosMaxDamage{ get{ return 18; } }
public override int AosSpeed{ get{ return 28; } }
public override int OldStrengthReq{ get{ return 40; } }
public override int OldMinDamage{ get{ return 8; } }
public override int OldMaxDamage{ get{ return 36; } }
public override int OldSpeed{ get{ return 31; } }
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
public override WeaponAnimation DefAnimation{ get{ return WeaponAnimation.Bash2H; } }
[Constructable]
public HammerOfFaith( Mobile owner ) : base( 0x1439 )
{
m_Owner = owner;
Weight = 10.0;
Layer = Layer.TwoHanded;
Hue = 0x481;
BlessedFor = owner;
Slayer = SlayerName.Silver;
Name = "Hammer of Faith";
double time = ( owner.Skills[SkillName.SpiritSpeak].Value / 20.0 ) * ClericDivineFocusSpell.GetScalar( owner );
m_Expire = DateTime.Now + TimeSpan.FromMinutes( (int)time );
m_Timer = new InternalTimer( this, m_Expire );
m_Timer.Start();
}
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct)
{
phys = fire = cold = pois = chaos = direct = 0;
nrgy = 100;
}
public override void OnDelete()
{
if ( m_Timer != null )
m_Timer.Stop();
base.OnDelete();
}
public override bool CanEquip( Mobile m )
{
if ( m != m_Owner )
return false;
return true;
}
public void Remove()
{
m_Owner.SendMessage( "Your hammer slowly dissipates." );
Delete();
}
public HammerOfFaith( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( m_Owner );
writer.Write( m_Expire );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_Owner = reader.ReadMobile();
m_Expire = reader.ReadDeltaTime();
m_Timer = new InternalTimer( this, m_Expire );
m_Timer.Start();
}
}
private class InternalTimer : Timer
{
private HammerOfFaith m_Hammer;
private DateTime m_Expire;
public InternalTimer( HammerOfFaith hammer, DateTime expire ) : base( TimeSpan.Zero, TimeSpan.FromSeconds( 0.1 ) )
{
m_Hammer = hammer;
m_Expire = expire;
}
protected override void OnTick()
{
if ( DateTime.Now >= m_Expire )
{
m_Hammer.Remove();
Stop();
}
}
}
}
}

View File

@@ -0,0 +1,103 @@
using System;
using System.Collections;
using Server.Targeting;
using Server.Network;
using Server.Mobiles;
using Server.Spells.Necromancy;
using Server.Spells;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericPurgeSpell : ClericSpell
{
private static SpellInfo m_Info = new SpellInfo(
"Purge", "Repurgo",
//SpellCircle.Second,
212,
9041
);
public override SpellCircle Circle
{
get { return SpellCircle.Second; }
}
public override int RequiredTithing{ get{ return 5; } }
public override double RequiredSkill{ get{ return 10.0; } }
public ClericPurgeSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}
public override void OnCast()
{
Caster.Target = new InternalTarget( this );
}
public void Target( Mobile m )
{
if ( !Caster.CanSee( m ) )
{
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
}
else if ( CheckBSequence( m, false ) )
{
SpellHelper.Turn( Caster, m );
m.PlaySound( 0xF6 );
m.PlaySound( 0x1F7 );
m.FixedParticles( 0x3709, 1, 30, 9963, 13, 3, EffectLayer.Head );
IEntity from = new Entity( Serial.Zero, new Point3D( m.X, m.Y, m.Z - 10 ), Caster.Map );
IEntity to = new Entity( Serial.Zero, new Point3D( m.X, m.Y, m.Z + 50 ), Caster.Map );
Effects.SendMovingParticles( from, to, 0x2255, 1, 0, false, false, 13, 3, 9501, 1, 0, EffectLayer.Head, 0x100 );
StatMod mod;
mod = m.GetStatMod( "[Magic] Str Offset" );
if ( mod != null && mod.Offset < 0 )
m.RemoveStatMod( "[Magic] Str Offset" );
mod = m.GetStatMod( "[Magic] Dex Offset" );
if ( mod != null && mod.Offset < 0 )
m.RemoveStatMod( "[Magic] Dex Offset" );
mod = m.GetStatMod( "[Magic] Int Offset" );
if ( mod != null && mod.Offset < 0 )
m.RemoveStatMod( "[Magic] Int Offset" );
m.Paralyzed = false;
m.CurePoison( Caster );
//EvilOmenSpell.CheckEffect( m );
StrangleSpell.RemoveCurse( m );
CorpseSkinSpell.RemoveCurse( m );
}
FinishSequence();
}
private class InternalTarget : Target
{
private ClericPurgeSpell m_Owner;
public InternalTarget( ClericPurgeSpell owner ) : base( 12, false, TargetFlags.Beneficial )
{
m_Owner = owner;
}
protected override void OnTarget( Mobile from, object o )
{
if ( o is Mobile )
{
m_Owner.Target( (Mobile)o );
}
}
protected override void OnTargetFinish( Mobile from )
{
m_Owner.FinishSequence();
}
}
}
}

View File

@@ -0,0 +1,158 @@
using System;
using System.Collections;
using Server.Targeting;
using Server.Network;
using Server.Mobiles;
using Server.Gumps;
using Server.Spells;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericRestorationSpell : ClericSpell
{
private static SpellInfo m_Info = new SpellInfo(
"Restoration", "Reductio Aetas",
//SpellCircle.Eighth,
212,
9041
);
public override SpellCircle Circle
{
get { return SpellCircle.Eighth; }
}
public override int RequiredTithing{ get{ return 40; } }
public override double RequiredSkill{ get{ return 50.0; } }
public ClericRestorationSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}
public override void OnCast()
{
Caster.Target = new InternalTarget( this );
}
public void Target( Mobile m )
{
if ( !Caster.CanSee( m ) )
{
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
}
else if ( m == Caster )
{
Caster.SendLocalizedMessage( 501039 ); // Thou can not resurrect thyself.
}
else if ( !Caster.Alive )
{
Caster.SendLocalizedMessage( 501040 ); // The resurrecter must be alive.
}
else if ( m.Alive )
{
Caster.SendLocalizedMessage( 501041 ); // Target is not dead.
}
else if ( !Caster.InRange( m, 1 ) )
{
Caster.SendLocalizedMessage( 501042 ); // Target is not close enough.
}
else if ( !m.Player )
{
Caster.SendLocalizedMessage( 501043 ); // Target is not a being.
}
else if ( m.Map == null || !m.Map.CanFit( m.Location, 16, false, false ) )
{
Caster.SendLocalizedMessage( 501042 ); // Target can not be resurrected at that location.
m.SendLocalizedMessage( 502391 ); // Thou can not be resurrected there!
}
else if ( CheckBSequence( m, true ) )
{
SpellHelper.Turn( Caster, m );
m.PlaySound( 0x214 );
m.FixedParticles( 0x376A, 1, 62, 0x480, 3, 3, EffectLayer.Waist );
m.FixedParticles( 0x3779, 1, 46, 9502, 5, 3, EffectLayer.Waist );
m.CloseGump( typeof( ResurrectGump ) );
m.CloseGump( typeof( RestoreGump ) );
m.SendGump( new RestoreGump( Caster ) );
}
FinishSequence();
}
private class InternalTarget : Target
{
private ClericRestorationSpell m_Owner;
public InternalTarget( ClericRestorationSpell owner ) : base( 12, false, TargetFlags.Beneficial )
{
m_Owner = owner;
}
protected override void OnTarget( Mobile from, object o )
{
if ( o is Mobile )
{
m_Owner.Target( (Mobile)o );
}
}
protected override void OnTargetFinish( Mobile from )
{
m_Owner.FinishSequence();
}
}
private class RestoreGump : Gump
{
private Mobile m_Healer;
public RestoreGump( Mobile healer ) : base( 100, 0 )
{
m_Healer = healer;
AddPage( 0 );
AddBackground( 0, 0, 400, 350, 2600 );
AddHtmlLocalized( 0, 20, 400, 35, 1011022, false, false ); // <center>Resurrection</center>
AddHtmlLocalized( 50, 55, 300, 140, 1011025, true, true );
AddButton( 200, 227, 4005, 4007, 0, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 235, 230, 110, 35, 1011012, false, false ); // CANCEL
AddButton( 65, 227, 4005, 4007, 1, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 100, 230, 110, 35, 1011011, false, false ); // CONTINUE
}
public override void OnResponse( NetState state, RelayInfo info )
{
Mobile from = state.Mobile;
from.CloseGump( typeof( RestoreGump ) );
from.CloseGump( typeof( ResurrectGump ) );
if ( info.ButtonID == 1 )
{
if ( from.Map == null || !from.Map.CanFit( from.Location, 16, false, false ) )
{
from.SendLocalizedMessage( 502391 ); // Thou can not be resurrected there!
return;
}
from.PlaySound( 0x214 );
from.FixedParticles( 0x376A, 1, 62, 0x480, 3, 3, EffectLayer.Waist );
from.FixedParticles( 0x3779, 1, 46, 9502, 5, 3, EffectLayer.Waist );
from.Resurrect();
from.Hits = from.HitsMax;
from.Stam = from.StamMax;
from.Mana = from.ManaMax;
}
}
}
}
}

View File

@@ -0,0 +1,151 @@
using System;
using System.Collections;
using Server.Targeting;
using Server.Network;
using Server.Mobiles;
using Server.Spells;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericSacredBoonSpell : ClericSpell
{
private static SpellInfo m_Info = new SpellInfo(
"Sacred Boon", "Vir Consolatio",
//SpellCircle.Fourth,
212,
9041
);
public override SpellCircle Circle
{
get { return SpellCircle.Fourth; }
}
private static Hashtable m_Table = new Hashtable();
public override int RequiredTithing{ get{ return 15; } }
public override double RequiredSkill{ get{ return 25.0; } }
public ClericSacredBoonSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}
public static bool HasEffect( Mobile m )
{
return ( m_Table[m] != null );
}
public static void RemoveEffect( Mobile m )
{
Timer t = (Timer)m_Table[m];
if ( t != null )
{
t.Stop();
m_Table.Remove( m );
}
}
public override void OnCast()
{
Caster.Target = new InternalTarget( this );
}
public void Target( Mobile m )
{
if ( !Caster.CanSee( m ) )
{
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
}
if ( m_Table.Contains( m ) )
{
Caster.LocalOverheadMessage( MessageType.Regular, 0x481, false, "That target already has this affect." );
}
else if ( CheckBSequence( m, false ) )
{
SpellHelper.Turn( Caster, m );
Timer t = new InternalTimer( m, Caster );
t.Start();
m_Table[m] = t;
m.PlaySound( 0x202 );
m.FixedParticles( 0x376A, 1, 62, 9923, 3, 3, EffectLayer.Waist );
m.FixedParticles( 0x3779, 1, 46, 9502, 5, 3, EffectLayer.Waist );
m.SendMessage( "A magic aura surrounds you causing your wounds to heal faster." );
}
FinishSequence();
}
private class InternalTarget : Target
{
private ClericSacredBoonSpell m_Owner;
public InternalTarget( ClericSacredBoonSpell owner ) : base( 12, false, TargetFlags.Beneficial )
{
m_Owner = owner;
}
protected override void OnTarget( Mobile from, object o )
{
if ( o is Mobile )
{
m_Owner.Target( (Mobile)o );
}
}
protected override void OnTargetFinish( Mobile from )
{
m_Owner.FinishSequence();
}
}
private class InternalTimer : Timer
{
private Mobile dest, source;
private DateTime NextTick;
private DateTime Expire;
public InternalTimer( Mobile m, Mobile from ) : base( TimeSpan.FromSeconds( 0.1 ), TimeSpan.FromSeconds( 0.1 ) )
{
dest = m;
source = from;
Priority = TimerPriority.FiftyMS;
Expire = DateTime.Now + TimeSpan.FromSeconds( 30.0 );
}
protected override void OnTick()
{
if ( !dest.CheckAlive() )
{
Stop();
m_Table.Remove( dest );
}
if ( DateTime.Now < NextTick )
return;
if ( DateTime.Now >= NextTick )
{
double heal = Utility.RandomMinMax( 6, 9 ) + source.Skills[SkillName.Magery].Value / 50.0;
heal *= ClericDivineFocusSpell.GetScalar( source );
dest.Heal( (int)heal );
dest.PlaySound( 0x202 );
dest.FixedParticles( 0x376A, 1, 62, 9923, 3, 3, EffectLayer.Waist );
dest.FixedParticles( 0x3779, 1, 46, 9502, 5, 3, EffectLayer.Waist );
NextTick = DateTime.Now + TimeSpan.FromSeconds( 4 );
}
if ( DateTime.Now >= Expire )
{
Stop();
if ( m_Table.Contains( dest ) )
m_Table.Remove( dest );
}
}
}
}
}

View File

@@ -0,0 +1,86 @@
using System;
using System.Collections;
using Server.Targeting;
using Server.Network;
using Server.Mobiles;
using Server.Items;
using PSys= Server.Engines.PartySystem;
using Server.Spells;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericSacrificeSpell : ClericSpell
{
private static SpellInfo m_Info = new SpellInfo(
"Sacrifice", "Adoleo",
//SpellCircle.First,
212,
9041
);
public override SpellCircle Circle
{
get { return SpellCircle.First; }
}
public override int RequiredTithing{ get{ return 5; } }
public override double RequiredSkill{ get{ return 5.0; } }
public static void Initialize()
{
PlayerEvent.HitByWeapon += new PlayerEvent.OnWeaponHit( InternalCallback );
}
public ClericSacrificeSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}
public override void OnCast()
{
if ( CheckSequence() )
{
if ( !Caster.CanBeginAction( typeof( ClericSacrificeSpell ) ) )
{
Caster.EndAction( typeof( ClericSacrificeSpell ) );
Caster.PlaySound( 0x244 );
Caster.FixedParticles( 0x3709, 1, 30, 9965, 1152, 0, EffectLayer.Waist );
Caster.FixedParticles( 0x376A, 1, 30, 9502, 1152, 0, EffectLayer.Waist );
Caster.SendMessage( "You stop sacrificing your essence for the well being of others." );
}
else
{
Caster.BeginAction( typeof( ClericSacrificeSpell ) );
Caster.FixedParticles( 0x3709, 1, 30, 9965, 1153, 7, EffectLayer.Waist );
Caster.FixedParticles( 0x376A, 1, 30, 9502, 1153, 3, EffectLayer.Waist );
Caster.PlaySound( 0x244 );
Caster.SendMessage( "You begin sacrificing your essence for the well being of others." );
}
}
FinishSequence();
}
private static void InternalCallback( Mobile attacker, Mobile defender, int damage, WeaponAbility a )
{
if ( !defender.CanBeginAction( typeof( ClericSacrificeSpell ) ) )
{
PSys.Party p = PSys.Party.Get( defender );
if ( p != null )
{
foreach( PSys.PartyMemberInfo info in p.Members )
{
Mobile m = info.Mobile;
if ( m != defender && m != attacker && !m.Poisoned )
{
m.Heal( damage / 2 );
m.PlaySound( 0x202 );
m.FixedParticles( 0x376A, 1, 62, 9923, 3, 3, EffectLayer.Waist );
m.FixedParticles( 0x3779, 1, 46, 9502, 5, 3, EffectLayer.Waist );
}
}
}
}
}
}
}

View File

@@ -0,0 +1,88 @@
using System;
using System.Collections;
using Server.Targeting;
using Server.Network;
using Server.Mobiles;
using Server.Items;
using Server.Spells;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericSmiteSpell : ClericSpell
{
private static SpellInfo m_Info = new SpellInfo(
"Smite", "Ferio",
//SpellCircle.Eighth,
212,
9041
);
public override SpellCircle Circle
{
get { return SpellCircle.Eighth; }
}
public override int RequiredTithing{ get{ return 60; } }
public override double RequiredSkill{ get{ return 80.0; } }
public ClericSmiteSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}
public override void OnCast()
{
Caster.Target = new InternalTarget( this );
}
public void Target( Mobile m )
{
if ( !Caster.CanSee( m ) )
{
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
}
else if ( CheckHSequence( m ) )
{
m.BoltEffect( 0x480 );
SpellHelper.Turn( Caster, m );
double damage = Caster.Skills[SkillName.SpiritSpeak].Value * ClericDivineFocusSpell.GetScalar( Caster );
if ( Core.AOS )
{
SpellHelper.Damage( TimeSpan.Zero, m, Caster, damage, 0, 0, 0, 0, 100 );
}
else
{
SpellHelper.Damage( TimeSpan.Zero, m, Caster, damage );
}
}
FinishSequence();
}
private class InternalTarget : Target
{
private ClericSmiteSpell m_Owner;
public InternalTarget( ClericSmiteSpell owner ) : base( 12, false, TargetFlags.Harmful )
{
m_Owner = owner;
}
protected override void OnTarget( Mobile from, object o )
{
if ( o is Mobile )
{
m_Owner.Target( (Mobile)o );
}
}
protected override void OnTargetFinish( Mobile from )
{
m_Owner.FinishSequence();
}
}
}
}

View File

@@ -0,0 +1,83 @@
using System;
using System.Collections;
using Server.Targeting;
using Server.Network;
using Server.Mobiles;
using Server.Spells;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericTouchOfLifeSpell : ClericSpell
{
private static SpellInfo m_Info = new SpellInfo(
"Touch of Life", "Tactus Vitalis",
//SpellCircle.Third,
212,
9041
);
public override SpellCircle Circle
{
get { return SpellCircle.Third; }
}
public override int RequiredTithing{ get{ return 10; } }
public override double RequiredSkill{ get{ return 30.0; } }
public ClericTouchOfLifeSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}
public override void OnCast()
{
Caster.Target = new InternalTarget( this );
}
public void Target( Mobile m )
{
if ( !Caster.CanSee( m ) )
{
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
}
else if ( CheckBSequence( m, false ) )
{
SpellHelper.Turn( Caster, m );
m.PlaySound( 0x202 );
m.FixedParticles( 0x376A, 1, 62, 0x480, 3, 3, EffectLayer.Waist );
m.FixedParticles( 0x3779, 1, 46, 0x481, 5, 3, EffectLayer.Waist );
double toHeal = Caster.Skills[SkillName.SpiritSpeak].Value / 2.0 + Utility.Random( 5 );
toHeal *= ClericDivineFocusSpell.GetScalar( Caster );
m.Heal( (int)toHeal );
}
FinishSequence();
}
private class InternalTarget : Target
{
private ClericTouchOfLifeSpell m_Owner;
public InternalTarget( ClericTouchOfLifeSpell owner ) : base( 12, false, TargetFlags.Beneficial )
{
m_Owner = owner;
}
protected override void OnTarget( Mobile from, object o )
{
if ( o is Mobile )
{
m_Owner.Target( (Mobile)o );
}
}
protected override void OnTargetFinish( Mobile from )
{
m_Owner.FinishSequence();
}
}
}
}

View File

@@ -0,0 +1,119 @@
using System;
using System.Collections;
using Server.Targeting;
using Server.Network;
using Server.Mobiles;
using Server.Items;
using Server.Spells;
namespace Server.ACC.CSS.Systems.Cleric
{
public class ClericTrialByFireSpell : ClericSpell
{
private static SpellInfo m_Info = new SpellInfo(
"Trial by Fire", "Temptatio Exsuscito",
//SpellCircle.Third,
212,
9041
);
public override SpellCircle Circle
{
get { return SpellCircle.Third; }
}
public override int RequiredTithing{ get{ return 25; } }
public override double RequiredSkill{ get{ return 45.0; } }
public static void Initialize()
{
PlayerEvent.HitByWeapon += new PlayerEvent.OnWeaponHit( InternalCallback );
}
public ClericTrialByFireSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}
public override bool CheckCast()
{
if ( !base.CheckCast() )
return false;
if ( !Caster.CanBeginAction( typeof(ClericTrialByFireSpell) ))
{
Caster.SendLocalizedMessage( 501775 ); // This spell is already in effect
return false;
}
return true;
}
public override void OnCast()
{
if ( CheckSequence() )
{
Caster.SendMessage( "Your body is covered by holy flames." );
Caster.BeginAction( typeof( ClericTrialByFireSpell ) );
Caster.FixedParticles( 0x3709, 10, 30, 5052, 0x480, 0, EffectLayer.LeftFoot );
Caster.PlaySound( 0x208 );
DateTime Expire = DateTime.Now + TimeSpan.FromMinutes( Caster.Skills[SkillName.Magery].Value / 10.0 );
new InternalTimer( Caster, Expire ).Start();
}
FinishSequence();
}
private static void InternalCallback( Mobile attacker, Mobile defender, int damage, WeaponAbility a )
{
if ( !defender.CanBeginAction( typeof( ClericTrialByFireSpell ) ) && Utility.RandomBool() )
{
defender.DoHarmful( attacker );
double scale = 1.0;
scale += defender.Skills[SkillName.Inscribe].Value * 0.001;
if ( defender.Player )
{
scale += defender.Int * 0.001;
scale += AosAttributes.GetValue( defender, AosAttribute.SpellDamage ) * 0.01;
}
int baseDamage = 6 + (int)(defender.Skills[SkillName.EvalInt].Value / 5.0);
double firedmg = Utility.RandomMinMax( baseDamage, baseDamage + 3 );
firedmg *= scale;
SpellHelper.Damage( TimeSpan.Zero, attacker, defender, firedmg, 0, 100, 0, 0, 0 );
attacker.FixedParticles( 0x3709, 10, 30, 5052, 0x480, 0, EffectLayer.LeftFoot );
attacker.PlaySound( 0x208 );
}
}
private class InternalTimer : Timer
{
private Mobile Source;
private DateTime Expire;
public InternalTimer( Mobile from, DateTime end ) : base( TimeSpan.Zero, TimeSpan.FromSeconds( 0.1 ) )
{
Source = from;
Expire = end;
}
protected override void OnTick()
{
if ( DateTime.Now >= Expire || !Source.CheckAlive() )
{
Source.EndAction( typeof( ClericTrialByFireSpell ) );
Stop();
Source.SendMessage( "The holy fire around you fades." );
}
}
}
}
}