public static MorphResult Morph(Mobile m, int entryID) { if (entryID < 0 || entryID >= m_Entries.Length) { return(MorphResult.Fail); } AnimalFormEntry entry = m_Entries[entryID]; m_LastAnimalForms[m] = entryID; //On OSI, it's the last /attempted/ one not the last succeeded one if (m.Skills.Ninjitsu.Value < entry.ReqSkill) { string args = String.Format("{0}\t{1}\t ", entry.ReqSkill.ToString("F1"), SkillName.Ninjitsu); m.SendLocalizedMessage(1063013, args); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability. return(MorphResult.NoSkill); } /* * if( !m.CheckSkill( SkillName.Ninjitsu, entry.ReqSkill, entry.ReqSkill + 37.5 ) ) * return MorphResult.Fail; * * On OSI,it seems you can only gain starting at '0' using Animal form. */ double ninjitsu = m.Skills.Ninjitsu.Value; if (ninjitsu < entry.ReqSkill + 37.5) { double chance = (ninjitsu - entry.ReqSkill) / 37.5; if (chance < Utility.RandomDouble()) { return(MorphResult.Fail); } } m.CheckSkill(SkillName.Ninjitsu, 0.0, 37.5); if (!BaseFormTalisman.EntryEnabled(m, entry.Type)) { return(MorphResult.Success); // Still consumes mana, just no effect } BaseMount.Dismount(m); int bodyMod = entry.BodyMod; int hueMod = entry.HueMod; m.BodyMod = bodyMod; m.HueMod = hueMod; if (entry.SpeedBoost) { m.Send(SpeedControl.MountSpeed); } SkillMod mod = null; if (entry.StealthBonus) { mod = new DefaultSkillMod(SkillName.Stealth, true, 20.0); mod.ObeyCap = true; m.AddSkillMod(mod); } SkillMod stealingMod = null; if (entry.StealingBonus) { stealingMod = new DefaultSkillMod(SkillName.Stealing, true, 10.0); stealingMod.ObeyCap = true; m.AddSkillMod(stealingMod); } Timer timer = new AnimalFormTimer(m, bodyMod, hueMod); timer.Start(); AddContext(m, new AnimalFormContext(timer, mod, entry.SpeedBoost, entry.Type, stealingMod)); return(MorphResult.Success); }
public static MorphResult Morph(Mobile m, int entryID) { if (entryID < 0 || entryID >= m_Entries.Length) return MorphResult.Fail; AnimalFormEntry entry = m_Entries[entryID]; m_LastAnimalForms[m] = entryID; //On OSI, it's the last /attempted/ one not the last succeeded one if (m.Skills.Ninjitsu.Value < entry.ReqSkill) { string args = String.Format("{0}\t{1}\t ", entry.ReqSkill.ToString("F1"), SkillName.Ninjitsu); m.SendLocalizedMessage(1063013, args); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability. return MorphResult.NoSkill; } /* if( !m.CheckSkill( SkillName.Ninjitsu, entry.ReqSkill, entry.ReqSkill + 37.5 ) ) return MorphResult.Fail; * * On OSI,it seems you can only gain starting at '0' using Animal form. */ double ninjitsu = m.Skills.Ninjitsu.Value; if (ninjitsu < entry.ReqSkill + 37.5) { double chance = (ninjitsu - entry.ReqSkill) / 37.5; if (chance < Utility.RandomDouble()) return MorphResult.Fail; } m.CheckSkill(SkillName.Ninjitsu, 0.0, 37.5); if (!BaseFormTalisman.EntryEnabled(m, entry.Type)) return MorphResult.Success; // Still consumes mana, just no effect BaseMount.Dismount(m); int bodyMod = entry.BodyMod; int hueMod = entry.HueMod; string namemod = entry.NameMod; m.BodyMod = bodyMod; m.HueMod = hueMod; m.NameMod = namemod; //Vinds : animal form anonymise, après tout, c'est pour les métiers de l'ombre if (entry.SpeedBoost) m.Send(SpeedControl.MountSpeed); SkillMod mod = null; if (entry.StealthBonus) { mod = new DefaultSkillMod(SkillName.Stealth, true, 20.0); mod.ObeyCap = true; m.AddSkillMod(mod); } SkillMod stealingMod = null; if (entry.StealingBonus) { stealingMod = new DefaultSkillMod(SkillName.Stealing, true, 10.0); stealingMod.ObeyCap = true; m.AddSkillMod(stealingMod); } Timer timer = new AnimalFormTimer(m, bodyMod, hueMod); timer.Start(); AddContext(m, new AnimalFormContext(timer, mod, entry.SpeedBoost, entry.Type, stealingMod)); m.CheckStatTimers(); return MorphResult.Success; }
public static MorphResult Morph(Mobile m, int entryID) { if (entryID < 0 || entryID >= m_Entries.Length) { return(MorphResult.Fail); } AnimalFormEntry entry = m_Entries[entryID]; m_LastAnimalForms[m] = entryID; // On OSI, it's the last /attempted/ one not the last succeeded one if (m.Skills.Ninjitsu.Value < entry.ReqSkill) { string args = String.Format("{0}\t{1}\t ", entry.ReqSkill.ToString("F1"), SkillName.Ninjitsu); m.SendLocalizedMessage(1063013, args); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability. return(MorphResult.NoSkill); } double minSkill = entry.ReqSkill - 12.5; double maxSkill = entry.ReqSkill + 37.5; if (!m.CheckSkill(SkillName.Ninjitsu, minSkill, maxSkill)) { return(MorphResult.Fail); } BaseMount.Dismount(m); m.BodyMod = entry.BodyMod; if (entry.HueMod >= 0) { m.HueMod = entry.HueMod; } if (entry.SpeedBoost) { m.ForcedRun = true; } SkillMod mod = null; if (entry.StealthBonus) { mod = new DefaultSkillMod(SkillName.Stealth, true, 20.0); mod.ObeyCap = true; m.AddSkillMod(mod); } #region Heritage Items /* * else if ( entry.StealingBonus ) * { * mod = new DefaultSkillMod( SkillName.Stealing, true, 10.0 ); * mod.ObeyCap = true; * m.AddSkillMod( mod ); * } */ #endregion Timer timer = new AnimalFormTimer(m, entry.BodyMod, m.HueMod); timer.Start(); AddContext(m, new AnimalFormContext(timer, mod, entry.SpeedBoost, entry.Type)); Effects.SendLocationParticles(EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x3728, 1, 13, 0x7F3); BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.AnimalForm, 1075822, 1075823, String.Format("{0}\t{1}", entry.ArticleCliloc, entry.FormCliloc))); m.Target = null; return(MorphResult.Success); }
public static MorphResult Morph( Mobile m, int entryID ) { if ( entryID < 0 || entryID >= m_Entries.Length ) return MorphResult.Fail; AnimalFormEntry entry = m_Entries[entryID]; m_LastAnimalForms[m] = entryID; //On OSI, it's the last /attempted/ one not the last succeeded one if ( m.Skills.Magery.Value < entry.ReqSkill ) { string args = String.Format( "{0}\t{1}\t ", entry.ReqSkill.ToString( "F1" ), SkillName.Magery ); m.SendLocalizedMessage( 1063013, args ); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability. return MorphResult.NoSkill; } /* if( !m.CheckSkill( SkillName.Magery, entry.ReqSkill, entry.ReqSkill + 37.5 ) ) return MorphResult.Fail; * * On OSI,it seems you can only gain starting at '0' using Animal form. */ double ninjitsu = m.Skills.Magery.Value; if ( ninjitsu < entry.ReqSkill + 37.5 ) { double chance = (ninjitsu - entry.ReqSkill) / 37.5; if ( chance < Utility.RandomDouble() ) return MorphResult.Fail; } m.CheckSkill( SkillName.Magery, 0.0, 37.5 ); BaseMount.Dismount( m ); m.BodyMod = entry.BodyMod; if ( entry.HueMod > 0 ) m.HueMod = entry.HueMod; if ( entry.SpeedBoost ) m.Send( SpeedControl.MountSpeed ); SkillMod mod = null; if ( entry.StealthBonus ) { mod = new DefaultSkillMod( SkillName.Stealth, true, 20.0 ); mod.ObeyCap = true; m.AddSkillMod( mod ); } Timer timer = new AnimalFormTimer( m, entry.BodyMod, entry.HueMod ); timer.Start(); AddContext( m, new AnimalFormContext( timer, mod, entry.SpeedBoost, entry.Type ) ); return MorphResult.Success; }
public static MorphResult Morph(Mobile m, int entryID) { if (entryID < 0 || entryID >= m_Entries.Length) { return(MorphResult.Fail); } AnimalFormEntry entry = m_Entries[entryID]; m_LastAnimalForms[m] = entryID; //On OSI, it's the last /attempted/ one not the last succeeded one if (m.Skills.Ninjitsu.Value < entry.ReqSkill) { string args = String.Format("{0}\t{1}\t ", entry.ReqSkill.ToString("F1"), SkillName.Ninjitsu); m.SendLocalizedMessage(1063013, args); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability. return(MorphResult.NoSkill); } double ninjitsu = m.Skills.Ninjitsu.Value; if (ninjitsu < entry.ReqSkill + 37.5) { double chance = (ninjitsu - entry.ReqSkill) / 37.5; if (chance < Utility.RandomDouble()) { return(MorphResult.Fail); } } m.CheckSkill(SkillName.Ninjitsu, 0.0, 37.5); BaseMount.Dismount(m); m.BodyMod = entry.BodyMod; if (entry.HueMod > 0) { m.HueMod = entry.HueMod; } if (entry.SpeedBoost) { m.Send(SpeedBoost.Instantiate(true)); } SkillMod mod = null; if (entry.StealthBonus) { mod = new DefaultSkillMod(SkillName.Stealth, true, 20.0); mod.ObeyCap = true; m.AddSkillMod(mod); } Timer timer = new AnimalFormTimer(m, entry.BodyMod, entry.HueMod); timer.Start(); AddContext(m, new AnimalFormContext(timer, mod, entry.SpeedBoost, entry.Type)); return(MorphResult.Success); }
public static MorphResult Morph( Mobile m, int entryID ) { if ( entryID < 0 || entryID >= m_Entries.Length ) return MorphResult.Fail; AnimalFormEntry entry = m_Entries[entryID]; m_LastAnimalForms[m] = entryID; // On OSI, it's the last /attempted/ one not the last succeeded one if ( m.Skills.Ninjitsu.Value < entry.ReqSkill ) { string args = String.Format( "{0}\t{1}\t ", entry.ReqSkill.ToString( "F1" ), SkillName.Ninjitsu ); m.SendLocalizedMessage( 1063013, args ); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability. return MorphResult.NoSkill; } double minSkill = entry.ReqSkill - 12.5; double maxSkill = entry.ReqSkill + 37.5; if ( !m.CheckSkill( SkillName.Ninjitsu, minSkill, maxSkill ) ) return MorphResult.Fail; BaseMount.Dismount( m ); m.BodyMod = entry.BodyMod; if ( entry.HueMod >= 0 ) m.HueMod = entry.HueMod; if ( entry.SpeedBoost ) m.ForcedRun = true; SkillMod mod = null; if ( entry.StealthBonus ) { mod = new DefaultSkillMod( SkillName.Stealth, true, 20.0 ); mod.ObeyCap = true; m.AddSkillMod( mod ); } #region Heritage Items /* else if ( entry.StealingBonus ) { mod = new DefaultSkillMod( SkillName.Stealing, true, 10.0 ); mod.ObeyCap = true; m.AddSkillMod( mod ); } */ #endregion Timer timer = new AnimalFormTimer( m, entry.BodyMod, m.HueMod ); timer.Start(); AddContext( m, new AnimalFormContext( timer, mod, entry.SpeedBoost, entry.Type ) ); Effects.SendLocationParticles( EffectItem.Create( m.Location, m.Map, EffectItem.DefaultDuration ), 0x3728, 1, 13, 0x7F3 ); BuffInfo.AddBuff( m, new BuffInfo( BuffIcon.AnimalForm, 1075822, 1075823, String.Format( "{0}\t{1}", entry.ArticleCliloc, entry.FormCliloc ) ) ); m.Target = null; return MorphResult.Success; }