Ejemplo n.º 1
0
        public void LoadSpecValues()
        {
            BaseEvoSpec spec = GetEvoSpec();

            if (null != spec && null != spec.Stages)
            {
                BaseEvoStage stage = spec.Stages[m_Stage];
                if (null != stage)
                {
                    m_FinalStage       = spec.Stages.Length - 1;
                    m_ProducesYoung    = spec.ProducesYoung;
                    m_InitialTerm      = TimeSpan.FromDays(spec.PregnancyTerm);
                    m_EpMinDivisor     = stage.EpMinDivisor;
                    m_EpMaxDivisor     = stage.EpMaxDivisor;
                    m_DustMultiplier   = stage.DustMultiplier;
                    m_NextEpThreshold  = stage.NextEpThreshold;
                    m_AlwaysHappy      = spec.AlwaysHappy;
                    m_NextHappyTime    = DateTime.Now;
                    m_MaxTrainingStage = spec.MaxTrainingStage;
                    m_MountStage       = spec.MountStage;
                    m_CanAttackPlayers = spec.CanAttackPlayers;
                }
            }
        }
Ejemplo n.º 2
0
        protected override void Init()
        {
            base.Init();                                // Create and fully evolve the creature

            // Buff it up
            SetStr(Str * 3);
            SetDex(Dex * 3);
            SetStam(Stam * 3);
            SetInt((int)(Int * 2));
            SetMana((int)(Mana * 2));
            SetHits(Hits * 10);

            BaseEvoSpec spec = GetEvoSpec();

            if (null != spec && null != spec.Skills)
            {
                for (int i = 0; i < spec.Skills.Length; i++)
                {
                    SetSkill(spec.Skills[i], (double)(spec.MaxSkillValues[i]) * 1.10, (double)(spec.MaxSkillValues[i]) * 1.50);
                }
            }
            this.Tamable = false;               // Not appropriate as a pet
            Title        = "";
        }
Ejemplo n.º 3
0
        protected virtual void Evolve(bool hatching)
        {
            BaseEvoSpec spec = GetEvoSpec();

            if (null != spec && null != spec.Stages)
            {
                BaseEvoStage stage = spec.Stages[++m_Stage];

                if (null != stage)
                {
                    int OldControlSlots = ControlSlots;

                    if (null != stage.Title)
                    {
                        Title = stage.Title;
                    }
                    if (0 != stage.BaseSoundID)
                    {
                        BaseSoundID = stage.BaseSoundID;
                    }
                    if (0 != stage.BodyValue)
                    {
                        Body = stage.BodyValue;
                    }
                    if (0 != stage.VirtualArmor)
                    {
                        VirtualArmor = stage.VirtualArmor;
                    }
                    if (0 != stage.ControlSlots)
                    {
                        ControlSlots = stage.ControlSlots;
                    }
                    if (0 != stage.MinTameSkill)
                    {
                        MinTameSkill = stage.MinTameSkill;
                    }
                    if (0 != stage.EpMinDivisor)
                    {
                        m_EpMinDivisor = stage.EpMinDivisor;
                    }
                    if (0 != stage.EpMaxDivisor)
                    {
                        m_EpMaxDivisor = stage.EpMaxDivisor;
                    }
                    if (0 != stage.DustMultiplier)
                    {
                        m_DustMultiplier = stage.DustMultiplier;
                    }
                    m_NextEpThreshold = stage.NextEpThreshold;

                    if (spec.AbsoluteStatValues)
                    {
                        SetStr(stage.StrMin, stage.StrMax);
                        SetDex(stage.DexMin, stage.DexMin);
                        SetInt(stage.IntMin, stage.IntMax);
                        SetHits(stage.HitsMin, stage.HitsMax);
                        SetDamage(stage.DamageMin, stage.DamageMax);
                    }
                    else
                    {
                        SetStr(RawStr + Utility.RandomMinMax(stage.StrMin, stage.StrMax));
                        SetDex(RawDex + Utility.RandomMinMax(stage.DexMin, stage.DexMin));
                        SetInt(RawInt + Utility.RandomMinMax(stage.IntMin, stage.IntMax));
                        SetHits(HitsMax + Utility.RandomMinMax(stage.HitsMin, stage.HitsMax));
                        SetDamage(DamageMin + stage.DamageMin, DamageMax + stage.DamageMax);
                    }

                    if (null != stage.DamagesTypes)
                    {
                        for (int i = 0; i < stage.DamagesTypes.Length; i++)
                        {
                            SetDamageType(stage.DamagesTypes[i], Utility.RandomMinMax(stage.MinDamages[i], stage.MaxDamages[i]));
                        }
                    }
                    if (null != stage.ResistanceTypes)
                    {
                        for (int i = 0; i < stage.ResistanceTypes.Length; i++)
                        {
                            SetResistance(stage.ResistanceTypes[i], Utility.RandomMinMax(stage.MinResistances[i], stage.MaxResistances[i]));
                        }
                    }

                    Hue = GetEvoHue(spec, stage);

                    if (null != ControlMaster && stage.ControlSlots > 0 && ControlSlots > 0)
                    {
                        ControlMaster.Followers += stage.ControlSlots - OldControlSlots;
                    }

                    if (!(hatching || this is IEvoGuardian))
                    {
                        PlaySound(665);
                        Emote("*" + Name + " " + stage.EvolutionMessage + "*");
                    }
                    Warmode = false;
                }
            }
        }
Ejemplo n.º 4
0
		private int GetEvoHue( BaseEvoSpec spec, BaseEvoStage stage )
		{
			if ( stage.Hue == 0 )
				return Hue;

			if ( stage.Hue == Evo.Flags.kRandomHueFlag && spec.RandomHues != null && spec.RandomHues.Length > 0 )
				return Utility.RandomList( spec.RandomHues );

			if ( stage.Hue == Evo.Flags.kUnHueFlag )
				return 0;

			return stage.Hue;
		}