public static void IncreaseExperience(BaseReptile m, int val) { try { m.Experience += val; QueryEvolutionStatus(m); } catch (Exception e) { eqUtility.HandleMobileException(e, m); } }
public static int[] GetBodyValues(BaseReptile m) { if (m.m_DomRecessive) { return(m_BodyValueSet0); } else { return(m_BodyValueSet1); } }
private static void QueryEvolutionStatus(BaseReptile m) { try { int _temp = (int)(Modus * (m.Level + 1)) / 2; if (m.Experience >= _temp) { m.Evolve(); } } catch (Exception e) { eqUtility.HandleMobileException(e, m); } }
internal static void GenerateEffects(BaseReptile from) { try { Effects.SendLocationParticles(EffectItem.Create(from.Location, from.Map, EffectItem.DefaultDuration), 0, 0, 0, 0, 0, 5060, 0); Effects.PlaySound(from.Location, from.Map, 0x243); Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 6, from.Y - 6, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100); Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 4, from.Y - 6, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100); Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 6, from.Y - 4, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100); Effects.SendTargetParticles(from, 0x375A, 35, 90, 0x00, 0x00, 9502, (EffectLayer)255, 0x100); } catch (Exception e) { eqUtility.HandleMobileException(e, from); } }
private void UpgradeStat(BaseReptile from) { try { from.RawStr += (int)(from.RawStr * 0.1618); from.RawDex += (int)(from.RawStr * 0.1618); from.RawInt += (int)(from.RawStr * 0.1618); from.HitsMaxSeed += (int)(from.HitsMaxSeed * 0.1618); from.ManaMaxSeed += (int)(from.ManaMaxSeed * 0.1618); int newMax = DamageMax + Utility.RandomMinMax(3, 9); int newMin = DamageMin + Utility.RandomMinMax(2, 8); SetDamage(newMin, newMax); for (int i = 0; i < from.Skills.Length; ++i) { Skill s = from.Skills[i]; if (s.Base > 0.0 && s.Base < 120.0) { s.Base += (int) (s.Base * 0.01618 + Utility.RandomMinMax(1, 2)); if (s.Base > 120.0) { s.Base = 120.0; } } } for (int i = 0; i < from.Resistances.Length; i++) { from.Resistances[i] += Utility.RandomMinMax(4, 6); } from.VirtualArmor += Utility.RandomMinMax(5, 12); } catch (Exception e) { eqUtility.HandleMobileException(e, this); } }
public override void OnDoubleClick(Mobile from) { if (DateTime.Now > m_Creation || from.AccessLevel == AccessLevel.Administrator) { if (from.Followers + 3 > from.FollowersMax) { from.SendMessage("You have too many followers to hatch this."); return; } EvolutionCreature ec = new EvolutionCreature(); ec.ControlMaster = from; ec.Controlled = true; ec.IsBonded = true; ec.ControlOrder = OrderType.Follow; ec.MoveToWorld(from.Location, from.Map); BaseReptile.GenerateEffects(ec); this.Delete(); } else { switch (Utility.RandomMinMax(0, 3)) { case 0: { from.SendMessage("The warmth of your touch seems to spur activity!"); break; } case 1: { from.SendMessage("You touch the egg and it begins to move.."); break; } case 2: { from.SendMessage("You place your hand on the egg and it begins to glow!"); break; } case 3: { from.SendMessage("Something inside the egg seems to be stirring.."); break; } default: break; } } }
internal static void GenerateEffects(BaseReptile from) { ReptileUtility.GenerateEffects(from); }