private static bool CastSpell(MobileInstance ch, CharacterInstance victim, int bitFlag, string spellName, IManager dbManager) { var databaseMgr = (IRepositoryManager)(dbManager ?? RepositoryManager.Instance); var skill = databaseMgr.GetEntity <SkillData>(spellName); switch (bitFlag) { case 0: case 1: case 3: case 5: case 6: Smaug.spell_smaug((int)skill.ID, ch.Level, ch, victim); return(true); case 2: CureBlindness.spell_cure_blindness((int)skill.ID, ch.Level, ch, victim); return(true); case 4: CurePoison.spell_cure_poison((int)skill.ID, ch.Level, ch, victim); return(true); case 7: RemoveCurse.spell_remove_curse((int)skill.ID, ch.Level, ch, victim); return(true); } return(false); }
public static PlayerClass ClericClass() { var cleric = new PlayerClass { Name = "Cleric", IsBaseClass = true, ExperienceModifier = 2000, HelpText = new Help(), Skills = new List <Skill>(), ReclassOptions = new List <PlayerClass>(), MaxHpGain = 15, MinHpGain = 10, MaxManaGain = 15, MinManaGain = 10, MaxEnduranceGain = 15, MinEnduranceGain = 11, StatBonusStr = 1, StatBonusCon = 1 }; #region Lvl 1 skills var blunt = BluntWeapons.BluntWeaponsAb(); blunt.Learned = true; blunt.Proficiency = 25; cleric.Skills.Add(blunt); var causeLight = CauseLight.causeLightAb(); causeLight.Learned = true; causeLight.Proficiency = 50; cleric.Skills.Add(causeLight); #endregion #region Lvl 2 skills var cureLight = CureLight.CureLightAb(); cureLight.Learned = true; cureLight.Proficiency = 50; cleric.Skills.Add(cureLight); #endregion #region Lvl 3 skills var detectInvis = DetectInvis.DetectInvisAb(); detectInvis.Learned = true; detectInvis.Proficiency = 50; cleric.Skills.Add(detectInvis); #endregion #region Lvl 5 skills var armour = Armour.ArmourAb(); armour.Learned = true; armour.LevelObtained = 1; armour.Proficiency = 50; cleric.Skills.Add(armour); var flail = Flail.FlailAb(); flail.Learned = true; flail.LevelObtained = 1; flail.Proficiency = 50; cleric.Skills.Add(flail); var mount = Mount.MountAb(); mount.Learned = true; mount.LevelObtained = 1; mount.Proficiency = 50; cleric.Skills.Add(mount); #endregion #region Lvl 6 skills var cureBlind = CureBlindness.CureBlindnessAb(); cureBlind.Learned = true; cureBlind.LevelObtained = 1; cureBlind.Proficiency = 50; cleric.Skills.Add(cureBlind); #endregion cleric.ReclassOptions.Add(Ranger.RangerClass()); return(cleric); }