/// <summary> /// Calcul de l'armure /// </summary> /// <param name="DamageEffect"></param> public int CalculArmor(EffectEnum DamageEffect) { switch (DamageEffect) { case EffectEnum.DamageTerre: case EffectEnum.VolTerre: case EffectEnum.DamageNeutre: case EffectEnum.DamageLifeNeutre: case EffectEnum.VolNeutre: return((this.Stats.GetTotal(EffectEnum.AddArmorTerre) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddForce) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddForce) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200)) + (this.Stats.GetTotal(EffectEnum.AddArmor) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddForce) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddForce) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200))); case EffectEnum.DamageFeu: case EffectEnum.DamageLifeFeu: case EffectEnum.VolFeu: return((this.Stats.GetTotal(EffectEnum.AddArmorFeu) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200)) + (this.Stats.GetTotal(EffectEnum.AddArmor) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200))); case EffectEnum.DamageAir: case EffectEnum.DamageLifeAir: case EffectEnum.VolAir: return((this.Stats.GetTotal(EffectEnum.AddArmorAir) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddAgilite) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddAgilite) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200)) + (this.Stats.GetTotal(EffectEnum.AddArmor) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddAgilite) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddAgilite) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200))); case EffectEnum.DamageEau: case EffectEnum.DamageLifeEau: case EffectEnum.VolEau: return((this.Stats.GetTotal(EffectEnum.AddArmorEau) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddChance) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddChance) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200)) + (this.Stats.GetTotal(EffectEnum.AddArmor) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddChance) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddChance) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200))); } return(0); }
public void CalculReduceDamages(EffectEnum Effect, ref int Damages) { switch (Effect) { case EffectEnum.DamageNeutre: case EffectEnum.VolNeutre: Damages = Damages * (100 - this.Stats.GetTotal(EffectEnum.AddReduceDamagePourcentNeutre) - this.Stats.GetTotal(EffectEnum.AddReduceDamagePourcentPvPNeutre)) / 100 - this.Stats.GetTotal(EffectEnum.AddReduceDamageNeutre) - this.Stats.GetTotal(EffectEnum.AddReduceDamagePvPNeutre) - this.Stats.GetTotal(EffectEnum.AddReduceDamagePhysic); break; case EffectEnum.DamageTerre: case EffectEnum.VolTerre: Damages = Damages * (100 - this.Stats.GetTotal(EffectEnum.AddReduceDamagePourcentTerre) - this.Stats.GetTotal(EffectEnum.AddReduceDamagePourcentPvPTerre)) / 100 - this.Stats.GetTotal(EffectEnum.AddReduceDamageTerre) - this.Stats.GetTotal(EffectEnum.AddReduceDamagePvPTerre) - this.Stats.GetTotal(EffectEnum.AddReduceDamagePhysic); break; case EffectEnum.DamageFeu: case EffectEnum.VolFeu: Damages = Damages * (100 - this.Stats.GetTotal(EffectEnum.AddReduceDamagePourcentFeu) - this.Stats.GetTotal(EffectEnum.AddReduceDamagePourcentPvPFeu)) / 100 - this.Stats.GetTotal(EffectEnum.AddReduceDamageFeu) - this.Stats.GetTotal(EffectEnum.AddReduceDamagePvPFeu) - this.Stats.GetTotal(EffectEnum.AddReduceDamageMagic); break; case EffectEnum.DamageAir: case EffectEnum.VolAir: Damages = Damages * (100 - this.Stats.GetTotal(EffectEnum.AddReduceDamagePourcentAir) - this.Stats.GetTotal(EffectEnum.AddReduceDamagePourcentPvPAir)) / 100 - this.Stats.GetTotal(EffectEnum.AddReduceDamageAir) - this.Stats.GetTotal(EffectEnum.AddReduceDamagePvPAir) - this.Stats.GetTotal(EffectEnum.AddReduceDamageMagic); break; case EffectEnum.DamageEau: case EffectEnum.VolEau: Damages = Damages * (100 - this.Stats.GetTotal(EffectEnum.AddReduceDamagePourcentEau) - this.Stats.GetTotal(EffectEnum.AddReduceDamagePourcentPvPEau)) / 100 - this.Stats.GetTotal(EffectEnum.AddReduceDamageEau) - this.Stats.GetTotal(EffectEnum.AddReduceDamagePvPEau) - this.Stats.GetTotal(EffectEnum.AddReduceDamageMagic); break; } }
/// <summary> /// /// </summary> /// <param name="damageEffect"></param> public int CalculArmor(EffectEnum damageEffect) { switch (damageEffect) { case EffectEnum.DamageEarth: case EffectEnum.StealEarth: case EffectEnum.DamageNeutral: case EffectEnum.StealNeutral: return((Statistics.GetTotal(EffectEnum.AddArmorEarth) * Math.Max(1 + Statistics.GetTotal(EffectEnum.AddStrength) / 100, 1 + Statistics.GetTotal(EffectEnum.AddStrength) / 200 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200)) + (Statistics.GetTotal(EffectEnum.AddArmor) * Math.Max(1 + Statistics.GetTotal(EffectEnum.AddStrength) / 100, 1 + Statistics.GetTotal(EffectEnum.AddStrength) / 200 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200))); case EffectEnum.DamageFire: case EffectEnum.StealFire: return((Statistics.GetTotal(EffectEnum.AddArmorFire) * Math.Max(1 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 100, 1 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200)) + (Statistics.GetTotal(EffectEnum.AddArmor) * Math.Max(1 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 100, 1 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200))); case EffectEnum.DamageAir: case EffectEnum.StealAir: return((Statistics.GetTotal(EffectEnum.AddArmorAir) * Math.Max(1 + Statistics.GetTotal(EffectEnum.AddAgility) / 100, 1 + Statistics.GetTotal(EffectEnum.AddAgility) / 200 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200)) + (Statistics.GetTotal(EffectEnum.AddArmor) * Math.Max(1 + Statistics.GetTotal(EffectEnum.AddAgility) / 100, 1 + Statistics.GetTotal(EffectEnum.AddAgility) / 200 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200))); case EffectEnum.DamageWater: case EffectEnum.StealWater: return((Statistics.GetTotal(EffectEnum.AddArmorWater) * Math.Max(1 + Statistics.GetTotal(EffectEnum.AddChance) / 100, 1 + Statistics.GetTotal(EffectEnum.AddChance) / 200 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200)) + (Statistics.GetTotal(EffectEnum.AddArmor) * Math.Max(1 + Statistics.GetTotal(EffectEnum.AddChance) / 100, 1 + Statistics.GetTotal(EffectEnum.AddChance) / 200 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200))); } return(0); }
/// <summary> /// /// </summary> /// <param name="effect"></param> /// <param name="jet"></param> public void CalculDamages(EffectEnum effect, ref int jet) { switch (effect) { case EffectEnum.DamageEarth: case EffectEnum.StealEarth: case EffectEnum.DamageNeutral: case EffectEnum.StealNeutral: jet = (int)Math.Floor((double)jet * (100 + Statistics.GetTotal(EffectEnum.AddStrength) + Statistics.GetTotal(EffectEnum.AddDamagePercent)) / 100 + Statistics.GetTotal(EffectEnum.AddDamagePhysic) + Statistics.GetTotal(EffectEnum.AddDamage)); break; case EffectEnum.DamageFire: case EffectEnum.StealFire: jet = (int)Math.Floor((double)jet * (100 + Statistics.GetTotal(EffectEnum.AddIntelligence) + Statistics.GetTotal(EffectEnum.AddDamagePercent)) / 100 + Statistics.GetTotal(EffectEnum.AddDamageMagic) + Statistics.GetTotal(EffectEnum.AddDamage)); break; case EffectEnum.DamageAir: case EffectEnum.StealAir: jet = (int)Math.Floor((double)jet * (100 + Statistics.GetTotal(EffectEnum.AddAgility) + Statistics.GetTotal(EffectEnum.AddDamagePercent)) / 100 + Statistics.GetTotal(EffectEnum.AddDamageMagic) + Statistics.GetTotal(EffectEnum.AddDamage)); break; case EffectEnum.DamageWater: case EffectEnum.StealWater: jet = (int)Math.Floor((double)jet * (100 + Statistics.GetTotal(EffectEnum.AddChance) + Statistics.GetTotal(EffectEnum.AddDamagePercent)) / 100 + Statistics.GetTotal(EffectEnum.AddDamageMagic) + Statistics.GetTotal(EffectEnum.AddDamage)); break; } }
public int CalculReduceDamages(EffectEnum effect, int damages) { switch (effect) { case EffectEnum.DamageNeutre: case EffectEnum.VolNeutre: return(damages * (100 - Stats.GetStat(StatEnum.ReduceDamagePercentNeutre).Total - Stats.GetStat(StatEnum.ReduceDamagePercentPvPNeutre).Total) / 100 - Stats.GetStat(StatEnum.ReduceDamageNeutre).Total - Stats.GetStat(StatEnum.ReduceDamagePvPNeutre).Total - Stats.GetStat(StatEnum.ReduceDamagePhysic).Total); case EffectEnum.DamageTerre: case EffectEnum.VolTerre: return(damages * (100 - Stats.GetStat(StatEnum.ReduceDamagePercentTerre).Total - Stats.GetStat(StatEnum.ReduceDamagePercentPvPTerre).Total) / 100 - Stats.GetStat(StatEnum.ReduceDamageTerre).Total - Stats.GetStat(StatEnum.ReduceDamagePvPTerre).Total - Stats.GetStat(StatEnum.ReduceDamagePhysic).Total); case EffectEnum.DamageFeu: case EffectEnum.VolFeu: return(damages * (100 - Stats.GetStat(StatEnum.ReduceDamagePercentFeu).Total - Stats.GetStat(StatEnum.ReduceDamagePercentPvPFeu).Total) / 100 - Stats.GetStat(StatEnum.ReduceDamageFeu).Total - Stats.GetStat(StatEnum.ReduceDamagePvPFeu).Total - Stats.GetStat(StatEnum.ReduceDamageMagic).Total); case EffectEnum.DamageAir: case EffectEnum.VolAir: return(damages * (100 - Stats.GetStat(StatEnum.ReduceDamagePercentAir).Total - Stats.GetStat(StatEnum.ReduceDamagePercentPvPAir).Total) / 100 - Stats.GetStat(StatEnum.ReduceDamageAir).Total - Stats.GetStat(StatEnum.ReduceDamagePvPAir).Total - Stats.GetStat(StatEnum.ReduceDamageMagic).Total); case EffectEnum.DamageEau: case EffectEnum.VolEau: return(damages * (100 - Stats.GetStat(StatEnum.ReduceDamagePercentEau).Total - Stats.GetStat(StatEnum.ReduceDamagePercentPvPEau).Total) / 100 - Stats.GetStat(StatEnum.ReduceDamageEau).Total - Stats.GetStat(StatEnum.ReduceDamagePvPEau).Total - Stats.GetStat(StatEnum.ReduceDamageMagic).Total); } return(0); }
public static void Play(EffectEnum effect) { if (Properties.Settings.Default.PlaySounds == false) { return; } SoundPlayer soundPlayer = new SoundPlayer(); switch (effect) { case EffectEnum.Archive: soundPlayer.Stream = Properties.Resources.SoundArchive; break; case EffectEnum.Click: soundPlayer.Stream = Properties.Resources.SoundClick; break; case EffectEnum.Open: soundPlayer.Stream = Properties.Resources.SoundOpen; break; case EffectEnum.Open2: soundPlayer.Stream = Properties.Resources.SoundOpen2; break; case EffectEnum.Thump: soundPlayer.Stream = Properties.Resources.SoundThump; break; default: break; } soundPlayer.Play(); }
public int CalculDamages(EffectEnum effect, int jet) { switch (effect) { case EffectEnum.DamageTerre: case EffectEnum.VolTerre: case EffectEnum.DamageNeutre: case EffectEnum.VolNeutre: return((int)Math.Floor((double)jet * (100 + Stats.GetStat(StatEnum.Force).Total + Stats.GetStat(StatEnum.DamagePercent).Total) / 100 + Stats.GetStat(StatEnum.DamagePhysic).Total + Stats.GetStat(StatEnum.Damage).Total)); case EffectEnum.DamageFeu: case EffectEnum.VolFeu: return((int)Math.Floor((double)jet * (100 + Stats.GetStat(StatEnum.Intelligence).Total + Stats.GetStat(StatEnum.DamagePercent).Total) / 100 + Stats.GetStat(StatEnum.DamageMagic).Total + Stats.GetStat(StatEnum.Damage).Total)); case EffectEnum.DamageAir: case EffectEnum.VolAir: return((int)Math.Floor((double)jet * (100 + Stats.GetStat(StatEnum.Agilite).Total + Stats.GetStat(StatEnum.DamagePercent).Total) / 100 + Stats.GetStat(StatEnum.DamageMagic).Total + Stats.GetStat(StatEnum.Damage).Total)); case EffectEnum.DamageEau: case EffectEnum.VolEau: return((int)Math.Floor((double)jet * (100 + Stats.GetStat(StatEnum.Chance).Total + Stats.GetStat(StatEnum.DamagePercent).Total) / 100 + Stats.GetStat(StatEnum.DamageMagic).Total + Stats.GetStat(StatEnum.Damage).Total)); } return(0); }
/// <summary> /// /// </summary> /// <param name="id"></param> /// <param name="value1"></param> /// <param name="value2"></param> /// <param name="args"></param> /// <returns></returns> public void AddEffect(EffectEnum id, int value1, int value2 = 0, int value3 = 0, string args = "0") { if (!m_effects.ContainsKey(id)) { m_effects.Add((EffectEnum)id, new GenericEffect(id, value1, value2, value3, args)); } }
public int CalculArmor(EffectEnum effect) { switch (effect) { case EffectEnum.DamageTerre: case EffectEnum.VolTerre: case EffectEnum.DamageNeutre: case EffectEnum.VolNeutre: return((Stats.GetStat(StatEnum.ArmorTerre).Total *Math.Max(1 + Stats.GetStat(StatEnum.Force).Total / 100, 1 + Stats.GetStat(StatEnum.Force).Total / 200 + Stats.GetStat(StatEnum.Intelligence).Total / 200)) + (Stats.GetStat(StatEnum.Armor).Total *Math.Max(1 + Stats.GetStat(StatEnum.Force).Total / 100, 1 + Stats.GetStat(StatEnum.Force).Total / 200 + Stats.GetStat(StatEnum.Intelligence).Total / 200))); case EffectEnum.DamageFeu: case EffectEnum.VolFeu: return((Stats.GetStat(StatEnum.ArmorFeu).Total *Math.Max(1 + Stats.GetStat(StatEnum.Intelligence).Total / 100, 1 + Stats.GetStat(StatEnum.Intelligence).Total / 200 + Stats.GetStat(StatEnum.Intelligence).Total / 200)) + (Stats.GetStat(StatEnum.Armor).Total *Math.Max(1 + Stats.GetStat(StatEnum.Intelligence).Total / 100, 1 + Stats.GetStat(StatEnum.Intelligence).Total / 200 + Stats.GetStat(StatEnum.Intelligence).Total / 200))); case EffectEnum.DamageAir: case EffectEnum.VolAir: return((Stats.GetStat(StatEnum.ArmorAir).Total *Math.Max(1 + Stats.GetStat(StatEnum.Agilite).Total / 100, 1 + Stats.GetStat(StatEnum.Agilite).Total / 200 + Stats.GetStat(StatEnum.Intelligence).Total / 200)) + (Stats.GetStat(StatEnum.Armor).Total *Math.Max(1 + Stats.GetStat(StatEnum.Agilite).Total / 100, 1 + Stats.GetStat(StatEnum.Agilite).Total / 200 + Stats.GetStat(StatEnum.Intelligence).Total / 200))); case EffectEnum.DamageEau: case EffectEnum.VolEau: return((Stats.GetStat(StatEnum.ArmorEau).Total *Math.Max(1 + Stats.GetStat(StatEnum.Chance).Total / 100, 1 + Stats.GetStat(StatEnum.Chance).Total / 200 + Stats.GetStat(StatEnum.Intelligence).Total / 200)) + (Stats.GetStat(StatEnum.Armor).Total *Math.Max(1 + Stats.GetStat(StatEnum.Chance).Total / 100, 1 + Stats.GetStat(StatEnum.Chance).Total / 200 + Stats.GetStat(StatEnum.Intelligence).Total / 200))); } return(0); }
/// <summary> /// /// </summary> /// <param name="character"></param> /// <param name="effect"></param> /// <param name="parameters"></param> public void ApplyEffect(CharacterEntity character, EffectEnum effect, Dictionary <string, string> parameters) { if (m_effectById.ContainsKey(effect)) { m_effectById[effect].Process(character, parameters); } }
public void CalculDamages(EffectEnum Effect, ref int Jet) { switch (Effect) { case EffectEnum.DamageTerre: case EffectEnum.VolTerre: case EffectEnum.DamageNeutre: case EffectEnum.VolNeutre: Jet = (int)Math.Floor((double)Jet * (100 + this.Stats.GetTotal(EffectEnum.AddForce) + this.Stats.GetTotal(EffectEnum.AddDamagePercent)) / 100 + this.Stats.GetTotal(EffectEnum.AddDamagePhysic) + this.Stats.GetTotal(EffectEnum.AddDamage)); break; case EffectEnum.DamageFeu: case EffectEnum.VolFeu: Jet = (int)Math.Floor((double)Jet * (100 + this.Stats.GetTotal(EffectEnum.AddIntelligence) + this.Stats.GetTotal(EffectEnum.AddDamagePercent)) / 100 + this.Stats.GetTotal(EffectEnum.AddDamageMagic) + this.Stats.GetTotal(EffectEnum.AddDamage)); break; case EffectEnum.DamageAir: case EffectEnum.VolAir: Jet = (int)Math.Floor((double)Jet * (100 + this.Stats.GetTotal(EffectEnum.AddAgilite) + this.Stats.GetTotal(EffectEnum.AddDamagePercent)) / 100 + this.Stats.GetTotal(EffectEnum.AddDamageMagic) + this.Stats.GetTotal(EffectEnum.AddDamage)); break; case EffectEnum.DamageEau: case EffectEnum.VolEau: Jet = (int)Math.Floor((double)Jet * (100 + this.Stats.GetTotal(EffectEnum.AddChance) + this.Stats.GetTotal(EffectEnum.AddDamagePercent)) / 100 + this.Stats.GetTotal(EffectEnum.AddDamageMagic) + this.Stats.GetTotal(EffectEnum.AddDamage)); break; } }
/// <summary> /// /// </summary> /// <param name="effectType"></param> /// <returns></returns> public static bool IsDamageEffect(EffectEnum effectType) { switch (effectType) { case EffectEnum.StealEarth: case EffectEnum.StealFire: case EffectEnum.StealWater: case EffectEnum.StealAir: case EffectEnum.StealNeutral: case EffectEnum.DamageEarth: case EffectEnum.DamageNeutral: case EffectEnum.DamageFire: case EffectEnum.DamageWater: case EffectEnum.DamageAir: case EffectEnum.DamageBrut: case EffectEnum.DamageLifeAir: case EffectEnum.DamageLifeEarth: case EffectEnum.DamageLifeFire: case EffectEnum.DamageLifeNeutral: case EffectEnum.DamageLifeWater: case EffectEnum.DamagePerAP: case EffectEnum.LifeSteal: return(true); } return(false); }
public GenericEffect(EffectEnum EffectId, int Base = 0, int Items = 0, int Dons = 0, int Boosts = 0) { this.EffectType = EffectId; this.Base = Base; this.Items = Items; this.Dons = Dons; this.Boosts = Boosts; }
public int GetItem(EffectEnum EffectType) { if (!this.myStats.ContainsKey(EffectType)) { this.myStats.Add(EffectType, new GenericEffect(EffectType, Items: 0)); } return(this.myStats[EffectType].Items); }
public int GetBase(EffectEnum EffectType) { if (!this.myStats.ContainsKey(EffectType)) { this.myStats.Add(EffectType, new GenericEffect(EffectType, 0)); } return(this.myStats[EffectType].Base); }
public bool Equals(EffectEnum obj) { if ((object)obj == null) { return(false); } return(StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value)); }
public Effect(EffectEnum id, string stats) { Id = id; if (int.TryParse(stats, out int data)) { Stats = data; } }
/// <summary> /// /// </summary> /// <param name="id"></param> /// <param name="value1"></param> /// <param name="value2"></param> /// <param name="args"></param> public GenericEffect(EffectEnum id, int value1, int value2, int value3, string args) { Id = (int)id; Value1 = value1; Value2 = value2; Value3 = value3; Args = args; }
/// <summary> /// /// </summary> /// <param name="id"></param> /// <param name="baseValue"></param> /// <param name="items"></param> /// <param name="dons"></param> /// <param name="boosts"></param> public GenericEffect(EffectEnum id, int baseValue = 0, int items = 0, int dons = 0, int boosts = 0) { Id = (int)id; Base = baseValue; Items = items; Dons = dons; Boosts = boosts; }
/// <summary> /// /// </summary> /// <param name="id"></param> /// <returns></returns> public GenericEffect GetEffect(EffectEnum id) { if (!m_effects.ContainsKey(id)) { m_effects.Add(id, new GenericEffect(id)); } return(m_effects[id]); }
/// <summary> /// /// </summary> /// <param name="EffectType"></param> /// <param name="value"></param> public void AddBase(EffectEnum id, int value) { if (!m_effects.ContainsKey(id)) { m_effects.Add(id, new GenericEffect(id)); } m_effects[id].Base += value; }
/// <summary> /// /// </summary> /// <param name="EffectType"></param> /// <param name="value"></param> public void AddDon(EffectEnum effectType, int value) { if (!m_effects.ContainsKey(effectType)) { m_effects.Add(effectType, new GenericEffect(effectType)); } m_effects[effectType].Dons += value; }
public GenericEffect GetEffect(EffectEnum EffectType) { if (!this.myStats.ContainsKey(EffectType)) { this.myStats.Add(EffectType, new GenericEffect(EffectType)); } return(this.myStats[EffectType]); }
public WeaponEffect GetWeaponEffet(EffectEnum EffectType) { if (myWeaponStats.ContainsKey(EffectType)) { return(myWeaponStats[EffectType]); } return(null); }
public String GetSpecialEffect(EffectEnum EffectType) { if (mySpecialEffects.ContainsKey(EffectType)) { return(mySpecialEffects[EffectType]); } return(null); }
public IEffect MakeSprite(EffectEnum spriteType, Vector2 location) { return(spriteType switch { EffectEnum.HitSprite => new HitSprite(texture2, location), EffectEnum.SwordBeamExplode => new SwordBeamExplode(texture2, location), EffectEnum.Death => new DeathCloud(texture2, location, game), EffectEnum.GanonAshes => new GanonAshes(texture1, location), _ => throw new ArgumentException("Invalid sprite! " + spriteType.ToString() + " Sprite factory failed."), });
/// <summary> /// Called when the given effect expires /// </summary> public void RemoveEffect(EffectEnum targetEffect) { var index = this.Icons.FindIndex(icon => icon.TargetEffect == targetEffect); if (index >= 0) { this.Icons.RemoveAt(index); this.RearrangeAllIcons(); } }
public EffectInfos(SpellLevel Spell, EffectEnum Type, int v1, int v2, int v3, int Duration, int Chance, string RangeType) { this.Spell = Spell; this.EffectType = Type; this.Value1 = v1; this.Value2 = v2; this.Value3 = v3; this.Duration = Duration; this.Chance = Chance; this.RangeType = RangeType; }
/// <summary> /// Gets the prefab for the target effect /// </summary> /// <param name="targetEffect">The target effect</param> /// <returns>Prefab for the target effect. Null if unapplicable</returns> public EnemyStatusIcon GetEnemyStatusIcon(EffectEnum targetEffect) { EnemyStatusIcon result = null; if (!this._statusIconHash.TryGetValue(targetEffect, out result)) { return(null); } return(result); }
private void ParseStats() { this.myStats = new GenericStats(this); string[] StatsArray = this.Effects.Split(','); foreach (string StatsRow in StatsArray) { try { string[] Stats = StatsRow.Split('#'); EffectEnum StatsId = (EffectEnum)HexToInt(Stats[0]); if ((int)StatsId == 997 || (int)StatsId == 996) { this.myStats.AddSpecialEffect(StatsId, Stats[4]); continue; } //Si stats avec Texte (Signature, apartenance, etc) if (StatsId == EffectEnum.LivingType || (!Stats[3].Equals("") && !Stats[3].Equals("0"))) { this.myStats.AddSpecialEffect(StatsId, Stats[3]); continue; } string Jet = Stats[4]; if (ItemTemplateModel.IsWeaponEffect(StatsId)) { int Min = int.Parse(Stats[1], System.Globalization.NumberStyles.HexNumber); int Max = int.Parse(Stats[2], System.Globalization.NumberStyles.HexNumber); string Args = Min + ";" + Max + ";-1;-1;0;" + Jet; int Value = 0; if (Stats.Length > 4) { Value = int.Parse(Stats[4].Split('+')[1]); } this.myStats.AddWeaponEffect(StatsId, Min, Max, Args, Value); } else { int value = HexToInt(Stats[1]); this.myStats.AddItem(StatsId, value); } } catch (Exception e) { } } }
public void AddEffect(EffectEnum targetEffect) { var index = this.Icons.FindIndex(icon => icon.TargetEffect == targetEffect); if (index < 0) { var newIcon = Instantiate(PrefabManager.CurrentInstance.GetEnemyStatusIcon(targetEffect), this.transform); newIcon.transform.localPosition = new Vector3(this.Icons.Count * GeneralSettings.IconSize, 0); this.Icons.Add(newIcon); } }
public GenericStat(StatEnum type, EffectEnum[] addEffects, EffectEnum[] subEffects, int baseValue = 0, StatTotalFormule formule = null) { Type = type; AddEffects = addEffects; SubEffects = subEffects; Formule = (formule == null ? GenericStats.FormuleTotal : formule); Base = baseValue; Equipped = 0; Given = 0; Bonus = 0; }
public EffectCast(EffectEnum type, int spellID, int cellID, int value1, int value2, int value3, int chance, int duration, bool atCAC, Fighter caster, List<Fighter> targets, Fighter target = null) { Type = type; SpellID = spellID; CellID = cellID; Value1 = value1; Value2 = value2; Value3 = value3; Chance = chance; Duration = duration; AtCac = atCAC; Caster = caster; Targets = targets; Target = target; }
/// <summary> /// /// </summary> /// <param name="effectType"></param> /// <param name="spellId"></param> /// <param name="cellId"></param> /// <param name="value1"></param> /// <param name="value2"></param> /// <param name="value3"></param> /// <param name="chance"></param> /// <param name="duration"></param> /// <param name="caster"></param> /// <param name="target"></param> /// <param name="rangeType"></param> /// <param name="targetKnownCellId"></param> /// <param name="spellLevel"></param> /// <param name="isMelee"></param> /// <param name="isTrap"></param> /// <param name="subEffect"></param> /// <param name="damageValue"></param> /// <param name="fakeValue"></param> public CastInfos(EffectEnum effectType, int spellId, int cellId, int value1, int value2, int value3, int chance, int duration, AbstractFighter caster, AbstractFighter target, string rangeType = "", int targetKnownCellId = 0, int spellLevel = -1, bool isMelee = false, bool isTrap = false, EffectEnum subEffect = EffectEnum.None, int damageValue = 0, int fakeValue = 0) { Fight = caster.Fight; Map = caster.Fight.Map; SpellLevel = spellLevel; TargetKnownCellId = targetKnownCellId; FakeValue = fakeValue; RangeType = rangeType; EffectType = effectType; SpellId = spellId; CellId = cellId; Value1 = value1; Value2 = value2; Value3 = value3; Chance = chance; IsTrap = isTrap; Duration = duration; Caster = caster; Target = target; if (subEffect == EffectEnum.None) { SubEffect = effectType; } else { SubEffect = subEffect; } DamageValue = damageValue; IsMelee = isMelee; }
/// <summary> /// /// </summary> /// <param name="EffectType"></param> /// <param name="value"></param> public void AddBase(EffectEnum id, int value) { if (!m_effects.ContainsKey(id)) m_effects.Add(id, new GenericEffect(id)); m_effects[id].Base += value; }
/// <summary> /// /// </summary> /// <param name="effect"></param> /// <returns></returns> public GenericEffect GetTotalEffect(EffectEnum effectType) { var totalBase = 0; var totalItems = 0; var totalDons = 0; var totalBoosts = 0; var effect = GetEffect(effectType); totalBase = effect.Base; totalItems = effect.Items; totalDons = effect.Dons; totalBoosts = effect.Boosts; switch (effectType) { case EffectEnum.AddAPDodge: case EffectEnum.AddMPDodge: totalBase += GetTotal(EffectEnum.AddWisdom) / 4; break; case EffectEnum.AddAP: totalItems += GetTotal(EffectEnum.AddAPBis); break; case EffectEnum.AddMP: totalItems += GetTotal(EffectEnum.MPBonus); break; case EffectEnum.AddReflectDamage: totalItems += GetTotal(EffectEnum.AddReflectDamageItem); break; } if (OppositeStats.ContainsKey(effectType)) { foreach (EffectEnum OppositeEffect in OppositeStats[effectType]) { if (m_effects.ContainsKey(OppositeEffect)) { totalBase -= m_effects[OppositeEffect].Base; totalBoosts -= m_effects[OppositeEffect].Boosts; totalDons -= m_effects[OppositeEffect].Dons; totalItems -= m_effects[OppositeEffect].Items; } } } return new GenericEffect(effectType, totalBase, totalItems, totalDons, totalBoosts); }
/// <summary> /// /// </summary> /// <param name="id"></param> /// <returns></returns> public GenericEffect GetEffect(EffectEnum id) { if (!m_effects.ContainsKey(id)) m_effects.Add(id, new GenericEffect(id)); return m_effects[id]; }
/// <summary> /// /// </summary> /// <param name="effectType"></param> /// <returns></returns> public int GetTotal(EffectEnum effectType) { int total = 0; if (m_effects.ContainsKey(effectType)) total += m_effects[effectType].Total; switch (effectType) { case EffectEnum.AddAPDodge: case EffectEnum.AddMPDodge: total += GetTotal(EffectEnum.AddWisdom) / 4; break; case EffectEnum.AddAP: total += GetTotal(EffectEnum.AddAPBis); break; case EffectEnum.AddMP: total += GetTotal(EffectEnum.MPBonus); break; } if (OppositeStats.ContainsKey(effectType)) foreach (EffectEnum OppositeEffect in OppositeStats[effectType]) if (m_effects.ContainsKey(OppositeEffect)) total -= m_effects[OppositeEffect].Total; return total; }
/// <summary> /// /// </summary> /// <param name="damageEffect"></param> public int CalculArmor(EffectEnum damageEffect) { switch (damageEffect) { case EffectEnum.DamageEarth: case EffectEnum.StealEarth: case EffectEnum.DamageNeutral: case EffectEnum.StealNeutral: return (Statistics.GetTotal(EffectEnum.AddArmorEarth) * Math.Max(1 + Statistics.GetTotal(EffectEnum.AddStrength) / 100, 1 + Statistics.GetTotal(EffectEnum.AddStrength) / 200 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200)) + (Statistics.GetTotal(EffectEnum.AddArmor) * Math.Max(1 + Statistics.GetTotal(EffectEnum.AddStrength) / 100, 1 + Statistics.GetTotal(EffectEnum.AddStrength) / 200 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200)); case EffectEnum.DamageFire: case EffectEnum.StealFire: return (Statistics.GetTotal(EffectEnum.AddArmorFire) * Math.Max(1 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 100, 1 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200)) + (Statistics.GetTotal(EffectEnum.AddArmor) * Math.Max(1 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 100, 1 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200)); case EffectEnum.DamageAir: case EffectEnum.StealAir: return (Statistics.GetTotal(EffectEnum.AddArmorAir) * Math.Max(1 + Statistics.GetTotal(EffectEnum.AddAgility) / 100, 1 + Statistics.GetTotal(EffectEnum.AddAgility) / 200 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200)) + (Statistics.GetTotal(EffectEnum.AddArmor) * Math.Max(1 + Statistics.GetTotal(EffectEnum.AddAgility) / 100, 1 + Statistics.GetTotal(EffectEnum.AddAgility) / 200 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200)); case EffectEnum.DamageWater: case EffectEnum.StealWater: return (Statistics.GetTotal(EffectEnum.AddArmorWater) * Math.Max(1 + Statistics.GetTotal(EffectEnum.AddChance) / 100, 1 + Statistics.GetTotal(EffectEnum.AddChance) / 200 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200)) + (Statistics.GetTotal(EffectEnum.AddArmor) * Math.Max(1 + Statistics.GetTotal(EffectEnum.AddChance) / 100, 1 + Statistics.GetTotal(EffectEnum.AddChance) / 200 + Statistics.GetTotal(EffectEnum.AddIntelligence) / 200)); } return 0; }
public int CalculArmor(EffectEnum effect) { switch (effect) { case EffectEnum.DamageTerre: case EffectEnum.VolTerre: case EffectEnum.DamageNeutre: case EffectEnum.VolNeutre: return (Stats.GetStat(StatEnum.ArmorTerre).Total * Math.Max(1 + Stats.GetStat(StatEnum.Force).Total / 100, 1 + Stats.GetStat(StatEnum.Force).Total / 200 + Stats.GetStat(StatEnum.Intelligence).Total / 200)) + (Stats.GetStat(StatEnum.Armor).Total * Math.Max(1 + Stats.GetStat(StatEnum.Force).Total / 100, 1 + Stats.GetStat(StatEnum.Force).Total / 200 + Stats.GetStat(StatEnum.Intelligence).Total / 200)); case EffectEnum.DamageFeu: case EffectEnum.VolFeu: return (Stats.GetStat(StatEnum.ArmorFeu).Total * Math.Max(1 + Stats.GetStat(StatEnum.Intelligence).Total / 100, 1 + Stats.GetStat(StatEnum.Intelligence).Total / 200 + Stats.GetStat(StatEnum.Intelligence).Total / 200)) + (Stats.GetStat(StatEnum.Armor).Total * Math.Max(1 + Stats.GetStat(StatEnum.Intelligence).Total / 100, 1 + Stats.GetStat(StatEnum.Intelligence).Total / 200 + Stats.GetStat(StatEnum.Intelligence).Total / 200)); case EffectEnum.DamageAir: case EffectEnum.VolAir: return (Stats.GetStat(StatEnum.ArmorAir).Total * Math.Max(1 + Stats.GetStat(StatEnum.Agilite).Total / 100, 1 + Stats.GetStat(StatEnum.Agilite).Total / 200 + Stats.GetStat(StatEnum.Intelligence).Total / 200)) + (Stats.GetStat(StatEnum.Armor).Total * Math.Max(1 + Stats.GetStat(StatEnum.Agilite).Total / 100, 1 + Stats.GetStat(StatEnum.Agilite).Total / 200 + Stats.GetStat(StatEnum.Intelligence).Total / 200)); case EffectEnum.DamageEau: case EffectEnum.VolEau: return (Stats.GetStat(StatEnum.ArmorEau).Total * Math.Max(1 + Stats.GetStat(StatEnum.Chance).Total / 100, 1 + Stats.GetStat(StatEnum.Chance).Total / 200 + Stats.GetStat(StatEnum.Intelligence).Total / 200)) + (Stats.GetStat(StatEnum.Armor).Total * Math.Max(1 + Stats.GetStat(StatEnum.Chance).Total / 100, 1 + Stats.GetStat(StatEnum.Chance).Total / 200 + Stats.GetStat(StatEnum.Intelligence).Total / 200)); } return 0; }
public int CalculDamages(EffectEnum effect, int jet) { switch (effect) { case EffectEnum.DamageTerre: case EffectEnum.VolTerre: case EffectEnum.DamageNeutre: case EffectEnum.VolNeutre: return (int)Math.Floor((double)jet * (100 + Stats.GetStat(StatEnum.Force).Total + Stats.GetStat(StatEnum.DamagePercent).Total) / 100 + Stats.GetStat(StatEnum.DamagePhysic).Total + Stats.GetStat(StatEnum.Damage).Total); case EffectEnum.DamageFeu: case EffectEnum.VolFeu: return (int)Math.Floor((double)jet * (100 + Stats.GetStat(StatEnum.Intelligence).Total + Stats.GetStat(StatEnum.DamagePercent).Total) / 100 + Stats.GetStat(StatEnum.DamageMagic).Total + Stats.GetStat(StatEnum.Damage).Total); case EffectEnum.DamageAir: case EffectEnum.VolAir: return (int)Math.Floor((double)jet * (100 + Stats.GetStat(StatEnum.Agilite).Total + Stats.GetStat(StatEnum.DamagePercent).Total) / 100 + Stats.GetStat(StatEnum.DamageMagic).Total + Stats.GetStat(StatEnum.Damage).Total); case EffectEnum.DamageEau: case EffectEnum.VolEau: return (int)Math.Floor((double)jet * (100 + Stats.GetStat(StatEnum.Chance).Total + Stats.GetStat(StatEnum.DamagePercent).Total) / 100 + Stats.GetStat(StatEnum.DamageMagic).Total + Stats.GetStat(StatEnum.Damage).Total); } return 0; }
/// <summary> /// /// </summary> /// <param name="effectType"></param> /// <returns></returns> public static bool IsDamageEffect(EffectEnum effectType) { switch (effectType) { case EffectEnum.StealEarth: case EffectEnum.StealFire: case EffectEnum.StealWater: case EffectEnum.StealAir: case EffectEnum.StealNeutral: case EffectEnum.DamageEarth: case EffectEnum.DamageNeutral: case EffectEnum.DamageFire: case EffectEnum.DamageWater: case EffectEnum.DamageAir: case EffectEnum.DamageBrut: case EffectEnum.DamageLifeAir: case EffectEnum.DamageLifeEarth: case EffectEnum.DamageLifeFire: case EffectEnum.DamageLifeNeutral: case EffectEnum.DamageLifeWater: case EffectEnum.DamagePerAP: case EffectEnum.LifeSteal: return true; } return false; }
public void ModifyStatBonus(EffectEnum effect, int value, bool opposite = false) { GenericStat stat = null; bool addValue = false; foreach (GenericStat forStat in myStats) { if (forStat.AddEffects.Contains(effect)) { stat = forStat; addValue = true; break; } if (forStat.SubEffects.Contains(effect)) { stat = forStat; addValue = false; break; } } if (stat == null) return; if (opposite) addValue = !addValue; if (addValue) stat.Bonus += value; else stat.Bonus -= value; }
/// <summary> /// /// </summary> /// <param name="id"></param> /// <param name="value1"></param> /// <param name="value2"></param> /// <param name="args"></param> /// <returns></returns> public void AddEffect(EffectEnum id, int value1, int value2 = 0, int value3 = 0, string args = "0") { if (!m_effects.ContainsKey(id)) m_effects.Add((EffectEnum)id, new GenericEffect(id, value1, value2, value3, args)); }
/// <summary> /// /// </summary> /// <param name="effectType"></param> /// <returns></returns> public static bool IsSpecial(EffectEnum effectType) { switch (effectType) { case EffectEnum.UseTrap: case EffectEnum.UseGlyph: case EffectEnum.Invocation: case EffectEnum.InvocDouble: case EffectEnum.Teleport: return true; } return false; }
/// <summary> /// /// </summary> /// <param name="effectType"></param> /// <returns></returns> public static bool IsMalusEffect(EffectEnum effectType) { return !IsDamageEffect(effectType) && !IsBonusEffect(effectType) && !IsFriendlyEffect(effectType) && !IsSpecial(effectType); }
/// <summary> /// /// </summary> /// <param name="effectType"></param> /// <returns></returns> public static bool IsFriendlyEffect(EffectEnum effectType) { switch(effectType) { case EffectEnum.Sacrifice: case EffectEnum.Evasion: case EffectEnum.Transpose: case EffectEnum.PandaCarrier: case EffectEnum.PandaLaunch: case EffectEnum.ReflectSpell: return true; } return false; }
/// <summary> /// /// </summary> /// <param name="EffectType"></param> /// <param name="value"></param> public void AddDon(EffectEnum effectType, int value) { if (!m_effects.ContainsKey(effectType)) m_effects.Add(effectType, new GenericEffect(effectType)); m_effects[effectType].Dons += value; }
public void ModifyStatGiven(EffectEnum effect, int value) { GenericStat stat = null; bool addValue = false; foreach (GenericStat forStat in myStats) { if (forStat.AddEffects.Contains(effect)) { stat = forStat; addValue = true; break; } if (forStat.SubEffects.Contains(effect)) { stat = forStat; addValue = false; break; } } if (stat == null) return; if (addValue) stat.Given += value; else stat.Given -= value; }
/// <summary> /// / /// </summary> /// <param name="damageType"></param> public DamageLifePercentEffect(EffectEnum damageType) { m_damageType = damageType; }
/// <summary> /// /// </summary> /// <param name="effect"></param> /// <param name="damages"></param> public void CalculReduceDamages(EffectEnum effect, ref int damages) { var coef = damages; switch (effect) { case EffectEnum.DamageNeutral: case EffectEnum.StealNeutral: coef = damages * (100 - Statistics.GetTotal(EffectEnum.AddReduceDamagePercentNeutral) - Statistics.GetTotal(EffectEnum.AddReduceDamagePercentPvPNeutral)) / 100 - Statistics.GetTotal(EffectEnum.AddReduceDamageNeutral) - Statistics.GetTotal(EffectEnum.AddReduceDamagePvPNeutral); damages = (int)(coef - Statistics.GetTotal(EffectEnum.AddReduceDamagePhysic)); break; case EffectEnum.DamageEarth: case EffectEnum.StealEarth: coef = damages * (100 - Statistics.GetTotal(EffectEnum.AddReduceDamagePercentEarth) - Statistics.GetTotal(EffectEnum.AddReduceDamagePercentPvPEarth)) / 100 - Statistics.GetTotal(EffectEnum.AddReduceDamageEarth) - Statistics.GetTotal(EffectEnum.AddReduceDamagePvPEarth); damages = (int)(coef - Statistics.GetTotal(EffectEnum.AddReduceDamagePhysic)); break; case EffectEnum.DamageFire: case EffectEnum.StealFire: coef = damages * (100 - Statistics.GetTotal(EffectEnum.AddReduceDamagePercentFire) - Statistics.GetTotal(EffectEnum.AddReduceDamagePercentPvPFire)) / 100 - Statistics.GetTotal(EffectEnum.AddReduceDamageFire) - Statistics.GetTotal(EffectEnum.AddReduceDamagePvPFire); damages = (int)(coef - Statistics.GetTotal(EffectEnum.AddReduceDamageMagic)); break; case EffectEnum.DamageAir: case EffectEnum.StealAir: coef = damages * (100 - Statistics.GetTotal(EffectEnum.AddReduceDamagePercentAir) - Statistics.GetTotal(EffectEnum.AddReduceDamagePercentPvPAir)) / 100 - Statistics.GetTotal(EffectEnum.AddReduceDamageAir) - Statistics.GetTotal(EffectEnum.AddReduceDamagePvPAir); damages = (int)(coef - Statistics.GetTotal(EffectEnum.AddReduceDamageMagic)); break; case EffectEnum.DamageWater: case EffectEnum.StealWater: coef = damages * (100 - Statistics.GetTotal(EffectEnum.AddReduceDamagePercentWater) - Statistics.GetTotal(EffectEnum.AddReduceDamagePercentPvPWater)) / 100 - Statistics.GetTotal(EffectEnum.AddReduceDamageWater) - Statistics.GetTotal(EffectEnum.AddReduceDamagePvPWater); damages = (int)(coef - Statistics.GetTotal(EffectEnum.AddReduceDamageMagic)); break; } }
public int CalculReduceDamages(EffectEnum effect, int damages) { switch (effect) { case EffectEnum.DamageNeutre: case EffectEnum.VolNeutre: return damages * (100 - Stats.GetStat(StatEnum.ReduceDamagePercentNeutre).Total - Stats.GetStat(StatEnum.ReduceDamagePercentPvPNeutre).Total) / 100 - Stats.GetStat(StatEnum.ReduceDamageNeutre).Total - Stats.GetStat(StatEnum.ReduceDamagePvPNeutre).Total - Stats.GetStat(StatEnum.ReduceDamagePhysic).Total; case EffectEnum.DamageTerre: case EffectEnum.VolTerre: return damages * (100 - Stats.GetStat(StatEnum.ReduceDamagePercentTerre).Total - Stats.GetStat(StatEnum.ReduceDamagePercentPvPTerre).Total) / 100 - Stats.GetStat(StatEnum.ReduceDamageTerre).Total - Stats.GetStat(StatEnum.ReduceDamagePvPTerre).Total - Stats.GetStat(StatEnum.ReduceDamagePhysic).Total; case EffectEnum.DamageFeu: case EffectEnum.VolFeu: return damages * (100 - Stats.GetStat(StatEnum.ReduceDamagePercentFeu).Total - Stats.GetStat(StatEnum.ReduceDamagePercentPvPFeu).Total) / 100 - Stats.GetStat(StatEnum.ReduceDamageFeu).Total - Stats.GetStat(StatEnum.ReduceDamagePvPFeu).Total - Stats.GetStat(StatEnum.ReduceDamageMagic).Total; case EffectEnum.DamageAir: case EffectEnum.VolAir: return damages * (100 - Stats.GetStat(StatEnum.ReduceDamagePercentAir).Total - Stats.GetStat(StatEnum.ReduceDamagePercentPvPAir).Total) / 100 - Stats.GetStat(StatEnum.ReduceDamageAir).Total - Stats.GetStat(StatEnum.ReduceDamagePvPAir).Total - Stats.GetStat(StatEnum.ReduceDamageMagic).Total; case EffectEnum.DamageEau: case EffectEnum.VolEau: return damages * (100 - Stats.GetStat(StatEnum.ReduceDamagePercentEau).Total - Stats.GetStat(StatEnum.ReduceDamagePercentPvPEau).Total) / 100 - Stats.GetStat(StatEnum.ReduceDamageEau).Total - Stats.GetStat(StatEnum.ReduceDamagePvPEau).Total - Stats.GetStat(StatEnum.ReduceDamageMagic).Total; } return 0; }
/// <summary> /// /// </summary> /// <param name="effectType"></param> /// <returns></returns> public static bool IsBonusEffect(EffectEnum effectType) { switch (effectType) { case EffectEnum.Heal: case EffectEnum.AddAgility: case EffectEnum.AddAP: case EffectEnum.AddAPBis: case EffectEnum.AddAPDodge: case EffectEnum.AddArmor: case EffectEnum.AddArmorAir: case EffectEnum.AddArmorBis: case EffectEnum.AddArmorEarth: case EffectEnum.AddArmorFire: case EffectEnum.AddArmorNeutral: case EffectEnum.AddArmorWater: case EffectEnum.AddCaractAgility: case EffectEnum.AddCaractIntelligence: case EffectEnum.AddCaractPoint: case EffectEnum.AddCaractStrength: case EffectEnum.AddCaractVitality: case EffectEnum.AddCaractWisdom: case EffectEnum.AddChance: case EffectEnum.AddChatiment: case EffectEnum.AddDamage: case EffectEnum.AddDamageCritic: case EffectEnum.AddDamageMagic: case EffectEnum.AddDamagePercent: case EffectEnum.AddDamagePhysic: case EffectEnum.AddDamagePiege: case EffectEnum.AddHealCare: case EffectEnum.AddInitiative: case EffectEnum.AddIntelligence: case EffectEnum.AddInvocationMax: case EffectEnum.AddLife: case EffectEnum.AddMP: case EffectEnum.AddMPDodge: case EffectEnum.AddPO: case EffectEnum.AddPods: case EffectEnum.AddProspection: case EffectEnum.AddReduceDamageAir: case EffectEnum.AddReduceDamageEarth: case EffectEnum.AddReduceDamageFire: case EffectEnum.AddReduceDamageMagic: case EffectEnum.AddReduceDamageNeutral: case EffectEnum.AddReduceDamagePercentAir: case EffectEnum.AddReduceDamagePercentEarth: case EffectEnum.AddReduceDamagePercentFire: case EffectEnum.AddReduceDamagePercentNeutral: case EffectEnum.AddReduceDamagePercentWater: case EffectEnum.AddReduceDamagePhysic: case EffectEnum.AddReduceDamageWater: case EffectEnum.AddReflectDamage: case EffectEnum.AddState: case EffectEnum.AddStrength: case EffectEnum.AddVitality: case EffectEnum.AddWisdom: return true; } return false; }
/// <summary> /// /// </summary> /// <param name="id"></param> /// <returns></returns> public bool HasEffect(EffectEnum id) { return m_effects.ContainsKey(id); }