/*
  * Bonus que a habilidade da no tipo de resistência.
  */
 public override int resistenciaBonus(HabilidadeNode node, ResistanceType type)
 {
     if (ResistanceType.Fire.Equals(type) || ResistanceType.Cold.Equals(type) || ResistanceType.Energy.Equals(type))
     {
         return node.Nivel * 3;
     }
     return 0;
 }
示例#2
0
 /*
  * Bonus que a habilidade da no tipo de resistência.
  */
 public override int resistenciaBonus(HabilidadeNode node, ResistanceType type)
 {
     if (ResistanceType.Poison.Equals(type))
     {
         return node.Nivel * 3;
     }
     return 0;
 }
 public float this[ResistanceType type]
 {
     get
     {
         return resistanceMods[(int)type];
     }
     set
     {
         resistanceMods[(int)type] = value;
     }
 }
示例#4
0
 public override void Deserialize(GenericReader reader)
 {
     base.Deserialize(reader);
     var version = reader.ReadInt();
     MinAuraDelay = reader.ReadInt();
     MaxAuraDelay = reader.ReadInt();
     MinAuraDamage = reader.ReadInt();
     MaxAuraDamage = reader.ReadInt();
     AuraRange = reader.ReadInt();
     m_AuraType = (ResistanceType) reader.ReadInt();
     AuraPoison = Poison.Deserialize(reader);
     m_AuraMessage = reader.ReadString();
     m_AuraDelay = DateTime.UtcNow;
 }
示例#5
0
        /**
         * Retorna o bônus que o jogador tem para o tipo de resistencia.
         */
        public int bonusResistencia(Jogador jogador, ResistanceType type)
        {
            int bonus = 0;

            //habilidade racial
            Dictionary<IdHabilidadeRacial, HabilidadeNode> racial = jogador.getSistemaRaca().getHabilidades();
            List<HabilidadeNode> habilidadesNode = new List<HabilidadeNode>(racial.Values);
            bonus += getBonus(habilidadesNode, HabilidadeTipo.racial, type);

            //habilidade talento
            Dictionary<IdHabilidadeTalento, HabilidadeNode> talento = jogador.getSistemaTalento().getHabilidades();
            habilidadesNode = new List<HabilidadeNode>(talento.Values);
            bonus += getBonus(habilidadesNode, HabilidadeTipo.talento, type);

            return bonus;
        }
		public RaelisDragonStageOne()
		{
			EvolutionMessage = "has evolved";
			NextEpThreshold = 75000; EpMinDivisor = 10; EpMaxDivisor = 5; DustMultiplier = 20;
			BaseSoundID = 0xDB;
			BodyValue = 52; ControlSlots = 2; MinTameSkill = 99.9; VirtualArmor = 25;

			DamagesTypes = new ResistanceType[1] { ResistanceType.Physical };
			MinDamages = new int[1] { 100 };
			MaxDamages = new int[1] { 100 };

			ResistanceTypes = new ResistanceType[1] { ResistanceType.Physical };
			MinResistances = new int[1] { 15 };
			MaxResistances = new int[1] { 15 };

			DamageMin = 11; DamageMax = 17; HitsMin = 250; HitsMax = 350;
			StrMin = 50; StrMax = 60; DexMin = 56; DexMax = 75; IntMin = 26; IntMax = 36;
		}
示例#7
0
        /**
         * Realiza o teste se o alvo conseguiu resistir ao tipo de ataque.
         * O teste é baseado na resistencia menos a dificultade.
         * A dificuldade deve ser um valor entre 0 a 100. Que será como %.
         *
         * Ex.: (Resistencia - dificuldade) %
         */
        public bool resistiu(Mobile alvo, int dificultade, ResistanceType tipo)
        {
            bool resistiu = false;

            int valorResistencia = alvo.GetResistance(tipo);
            valorResistencia -= dificultade;

            //ajusta para ter mínimo de 5% e máximo de 95%
            valorResistencia = valorResistencia < 5 ? 5 : valorResistencia;
            valorResistencia = valorResistencia > 100 ? 95 : valorResistencia;
            valorResistencia /= 100;

            if (valorResistencia > Utility.RandomDouble())
            {
                resistiu = true;
            }

            return resistiu;
        }
		public HiryuStageOne()
		{
			EvolutionMessage = "has evolved";
			NextEpThreshold = 50000; EpMinDivisor = 10; EpMaxDivisor = 5; DustMultiplier = 20;
			BaseSoundID = 0x4FD;
			Hue = 2406;
			BodyValue = 201; ControlSlots = 3; MinTameSkill = 99.9; VirtualArmor = 30;

			DamagesTypes = new ResistanceType[1] { ResistanceType.Physical };
			MinDamages = new int[1] { 100 };
			MaxDamages = new int[1] { 100 };

			ResistanceTypes = new ResistanceType[1] { ResistanceType.Physical };
			MinResistances = new int[1] { 15 };
			MaxResistances = new int[1] { 15 };

			DamageMin = 11; DamageMax = 15; HitsMin = 1; HitsMax = 1;
			StrMin = 75; StrMax = 85; DexMin = 95; DexMax = 105; IntMin = 80; IntMax = 100;
		}
		public RaelisDragonStageTwo()
		{
			EvolutionMessage = "has evolved";
			NextEpThreshold = 175000; EpMinDivisor = 20; EpMaxDivisor = 40; DustMultiplier = 20;
			BaseSoundID = 219;
			BodyValue = 89; VirtualArmor = 30;

			DamagesTypes = new ResistanceType[5] { ResistanceType.Physical, ResistanceType.Fire, ResistanceType.Cold,
													ResistanceType.Poison, ResistanceType.Energy };
			MinDamages = new int[5] { 100, 25, 25, 25, 25 };
			MaxDamages = new int[5] { 100, 25, 25, 25, 25 };

			ResistanceTypes = new ResistanceType[5] { ResistanceType.Physical, ResistanceType.Fire, ResistanceType.Cold,
														ResistanceType.Poison, ResistanceType.Energy };
			MinResistances = new int[5] { 20, 20, 20, 20, 20 };
			MaxResistances = new int[5] { 20, 20, 20, 20, 20 };

			DamageMin = 1; DamageMax = 1; HitsMin= 500; HitsMax = 550;
			StrMin = 60; StrMax = 70; DexMin = 20; DexMax = 30; IntMin = 10; IntMax = 15;
		}
		public HiryuStageTwo()
		{
			EvolutionMessage = "has evolved";
			NextEpThreshold = 150000; EpMinDivisor = 20; EpMaxDivisor = 10; DustMultiplier = 20;
			BaseSoundID = 0x4FD;
			BodyValue = 217; VirtualArmor = 40;
			Hue = 2406;

			DamagesTypes = new ResistanceType[5] { ResistanceType.Physical, ResistanceType.Fire, ResistanceType.Cold,
													ResistanceType.Poison, ResistanceType.Energy };
			MinDamages = new int[5] { 20, 20, 20, 20, 20 };
			MaxDamages = new int[5] { 20, 20, 20, 20, 20 };

			ResistanceTypes = new ResistanceType[5] { ResistanceType.Physical, ResistanceType.Fire, ResistanceType.Cold,
														ResistanceType.Poison, ResistanceType.Energy };
			MinResistances = new int[5] { 25, 25, 25, 25, 25 };
			MaxResistances = new int[5] { 25, 25, 25, 25, 25 };

			DamageMin = 2; DamageMax = 2; HitsMin= 1; HitsMax = 1;
			StrMin = 65; StrMax = 75; DexMin = 40; DexMax = 45; IntMin = 40; IntMax = 50;
		}
		public RaelisDragonStageOne()
		{
			EvolutionMessage = "has evolved.";//stage 1 - green
			NextEpThreshold = 25000; EpMinDivisor = 10; EpMaxDivisor = 5; DustMultiplier = 20;
			BaseSoundID = 0xDB;
			BodyValue = 733;
			ControlSlots = 2;
			MinTameSkill = 99.9;
			VirtualArmor = 30;
//			Hue = Evo.Flags.kRandomHueFlag;
//			Hue = 0;

			DamagesTypes = new ResistanceType[1] { ResistanceType.Physical };
			MinDamages = new int[1] { 100 };
			MaxDamages = new int[1] { 100 };

			ResistanceTypes = new ResistanceType[1] { ResistanceType.Physical };
			MinResistances = new int[1] { 15 };
			MaxResistances = new int[1] { 15 };

			DamageMin = 11; DamageMax = 17; HitsMin = 200; HitsMax = 250;
			StrMin = 296; StrMax = 325; DexMin = 56; DexMax = 75; IntMin = 76; IntMax = 96;
		}
示例#12
0
 // No Effects
 public static void Aura(Point3D location, Map map, Mobile from, int min, int max, ResistanceType type, int range,
     Poison poison, string text, bool scales, bool allownull)
 {
     Aura(location, map, from, min, max, type, range, poison, text, scales, allownull, false, 0, 0);
 }
示例#13
0
 // Null based Aura
 public static void Aura(Point3D location, Map map, Mobile from, int min, int max, ResistanceType type, int range,
     Poison poison, string text)
 {
     Aura(location, map, from, min, max, type, range, poison, text, true, false, false, 0, 0);
 }
示例#14
0
        public int SetResistBonus(ResistanceType resist)
        {
            switch (resist)
            {
                case ResistanceType.Physical: return PhysicalResistance;
                case ResistanceType.Fire: return FireResistance;
                case ResistanceType.Cold: return ColdResistance;
                case ResistanceType.Poison: return PoisonResistance;
                case ResistanceType.Energy: return EnergyResistance;
            }

            return 0;
        }
		public override int GetMaxResistance(ResistanceType type)
		{
			if (IsStaff())
			{
				return int.MaxValue;
			}

			int max = base.GetMaxResistance(type);

			if (type != ResistanceType.Physical && 60 < max && CurseSpell.UnderEffect(this))
			{
				max = 60;
			}

			if (Core.ML && Race == Race.Elf && type == ResistanceType.Energy)
			{
				max += 5; //Intended to go after the 60 max from curse
			}

			return max;
		}
示例#16
0
 public SwitchDamageEntry( PlayerMobile owner, BardSpellbook book, ResistanceType element )
     : base(GetElementalDamageCliloc( element ))
 {
     m_Owner = owner;
     m_Book = book;
     m_Element = element;
 }
示例#17
0
 private static int GetElementalDamageCliloc( ResistanceType element )
 {
     return 1151800 + (int) element;
 }
示例#18
0
        public override int GetMaxResistance( ResistanceType type )
        {
            int max = base.GetMaxResistance( type );

            if ( 60 < max && Spells.Fourth.CurseSpell.IsUnderEffect( this ) )
                max = 60;

            return max;
        }
示例#19
0
		private static void ApplyResistance( BaseArmor ar, int min, int max, ResistanceType res, int low, int high )
		{
			switch ( res )
			{
				case ResistanceType.Physical: ar.PhysicalBonus += Scale( min, max, low, high ); break;
				case ResistanceType.Fire: ar.FireBonus += Scale( min, max, low, high ); break;
				case ResistanceType.Cold: ar.ColdBonus += Scale( min, max, low, high ); break;
				case ResistanceType.Poison: ar.PoisonBonus += Scale( min, max, low, high ); break;
				case ResistanceType.Energy: ar.EnergyBonus += Scale( min, max, low, high ); break;
			}
		}
示例#20
0
        public override int GetMaxResistance(ResistanceType type)
        {
            if (AccessLevel > AccessLevel.Player)
                return int.MaxValue;

            int max = base.GetMaxResistance(type);

            if (type != ResistanceType.Physical && 60 < max && Spells.Fourth.CurseSpell.UnderEffect(this))
                max = 60;

            if (Core.ML && this.Race == Race.Elf && type == ResistanceType.Energy)
                max += 5; //Intended to go after the 60 max from curse

            return max;
        }
示例#21
0
		public void SetResistance( ResistanceType type, int min, int max )
		{
			SetResistance( type, Utility.RandomMinMax( min, max ) );
		}
示例#22
0
        // Main Aura Method
        public static void Aura(Point3D location, Map map, Mobile from, int min, int max, ResistanceType type, int range,
            Poison poison, string text, bool scales, bool allownull, bool effects, int itemid, int hue)
        {
            if (from == null && !allownull)
                return;

            var targets = new List<Mobile>();

            foreach (var m in Map.AllMaps[map.MapID].GetMobilesInRange(location, range))
            {
                if (CanTarget(from, m, true, false, allownull))
                    targets.Add(m);
            }

            if (effects && from != null)
                from.Animate(12, 5, 1, true, false, 0);

            for (var i = 0; i < targets.Count; i++)
            {
                var m = targets[i];
                m.RevealingAction();

                if (text != "")
                    m.SendMessage(text);

                var auradamage = Utility.RandomMinMax(min, max);

                if (scales)
                    auradamage = (int) ((auradamage/GetDist(location, m.Location))*range);

                if (poison != null)
                    m.ApplyPoison((from == null) ? m : from, poison);

                if (effects)
                    m.FixedParticles(itemid, 10, 15, 5030 /*what the hell does this number do?*/, hue, 0,
                        EffectLayer.Waist);

                switch (type)
                {
                    case ResistanceType.Physical:
                        AOS.Damage(m, (from == null) ? m : from, auradamage, 100, 0, 0, 0, 0);
                        break;
                    case ResistanceType.Fire:
                        AOS.Damage(m, (from == null) ? m : from, auradamage, 0, 100, 0, 0, 0);
                        break;
                    case ResistanceType.Cold:
                        AOS.Damage(m, (from == null) ? m : from, auradamage, 0, 0, 100, 0, 0);
                        break;
                    case ResistanceType.Poison:
                        AOS.Damage(m, (from == null) ? m : from, auradamage, 0, 0, 0, 100, 0);
                        break;
                    case ResistanceType.Energy:
                        AOS.Damage(m, (from == null) ? m : from, auradamage, 0, 0, 0, 0, 100);
                        break;
                }
            }

            targets.Clear();
        }
示例#23
0
        public virtual int GetResistance( ResistanceType type )
        {
            if ( m_Resistances == null )
                m_Resistances = new int[5]{ int.MinValue, int.MinValue, int.MinValue, int.MinValue, int.MinValue };

            int v = (int)type;

            if ( v < 0 || v >= m_Resistances.Length )
                return 0;

            int res = m_Resistances[v];

            if ( res == int.MinValue )
            {
                ComputeResistances();
                res = m_Resistances[v];
            }

            return res;
        }
示例#24
0
 public virtual int GetMinResistance( ResistanceType type )
 {
     return int.MinValue;
 }
示例#25
0
		public void SetDamageType( ResistanceType type, int val )
		{
			switch ( type )
			{
				case ResistanceType.Physical: m_PhysicalDamage = val; break;
				case ResistanceType.Fire: m_FireDamage = val; break;
				case ResistanceType.Cold: m_ColdDamage = val; break;
				case ResistanceType.Poison: m_PoisonDamage = val; break;
				case ResistanceType.Energy: m_EnergyDamage = val; break;
			}
		}
示例#26
0
 /*
  * Bonus que a habilidade da no tipo de resistência.
  */
 public virtual int resistenciaBonus(HabilidadeNode node, ResistanceType type)
 {
     return 0;
 }
示例#27
0
		public void SetResistance( ResistanceType type, int val )
		{
			switch ( type )
			{
				case ResistanceType.Physical: m_PhysicalResistance = val; break;
				case ResistanceType.Fire: m_FireResistance = val; break;
				case ResistanceType.Cold: m_ColdResistance = val; break;
				case ResistanceType.Poison: m_PoisonResistance = val; break;
				case ResistanceType.Energy: m_EnergyResistance = val; break;
			}

			UpdateResistances();
		}
示例#28
0
        /*public override void OnSkillInvalidated( Skill skill )
        {
            if( Core.AOS && skill.SkillName == SkillName.MagicResist )
                UpdateResistances();
        }*/
        public override int GetMaxResistance( ResistanceType type )
        {
            if (AccessLevel > AccessLevel.Player)
                return 75;

            int max = base.GetMaxResistance(type);

            if( type != ResistanceType.Physical && 40 < max && Spells.Fourth.CurseSpell.UnderEffect(this) )
                max = 50;

            return max;
        }
示例#29
0
        public override int GetMinResistance(ResistanceType type)
        {
            int magicResist = (int)(Skills[SkillName.MagicResist].Value * 10);
            int min = int.MinValue;

            if (magicResist >= 1000)
                min = 40 + ((magicResist - 1000) / 50);
            else if (magicResist >= 400)
                min = (magicResist - 400) / 15;

            if (min > MaxPlayerResistance)
                min = MaxPlayerResistance;

            int baseMin = base.GetMinResistance(type);

            if (min < baseMin)
                min = baseMin;

            return min;
        }
示例#30
0
		public override int GetMaxResistance( ResistanceType type )
		{
			if ( this is IEvoGuardian )
				return base.GetMaxResistance( type );

			int resistance = base.GetMaxResistance( type );

			BaseEvoSpec spec = GetEvoSpec();

			return ( spec == null ? resistance : resistance > spec.MaxEvoResistance ? spec.MaxEvoResistance : resistance );
		}