public static SkillEffect CrossSlashEffect() { var skillEffect = new SkillEffect(); skillEffect.EffectTarget = Targeting.CrossOpponentTarget(); var affinities = new SkillEffectAffinities(); affinities.SetAffinity(Const.Affinities.Physical, 1d); skillEffect.Affinities = affinities; skillEffect.BaseEnmity = 15; skillEffect.EnmityType = Const.EnmityTargetType.Target; skillEffect.EffectType = Const.SkillEffectType.Attack; skillEffect.AddStatModifier(Const.Stats.Attack, 2d, Const.ModifierType.Multiply); return skillEffect; }
public static SkillEffect MeleeAttackEffect() { var skillEffect = new SkillEffect(); skillEffect.EffectTarget = Targeting.SingleOpponentTarget(); var affinities = new SkillEffectAffinities(); affinities.SetAffinity(Const.Affinities.Physical, 1d); skillEffect.Affinities = affinities; skillEffect.BaseEnmity = 10; skillEffect.EnmityType = Const.EnmityTargetType.Target; skillEffect.EffectType = Const.SkillEffectType.Attack; skillEffect.AddStatModifier(Const.Stats.Attack, 1d, Const.ModifierType.Multiply); skillEffect.AddStatusEffect(StatusEffect.Blind()); return skillEffect; }
public static SkillEffect SquashEffect() { var skillEffect = new SkillEffect(); skillEffect.EffectTarget = Targeting.SquashTarget(); var affinities = new SkillEffectAffinities(); affinities.SetAffinity(Const.Affinities.Physical, 1d); skillEffect.Affinities = affinities; skillEffect.BaseEnmity = 30; skillEffect.EnmityType = Const.EnmityTargetType.Target; skillEffect.EffectType = Const.SkillEffectType.Attack; skillEffect.AddStatModifier(Const.Stats.Attack, 0.5d, Const.ModifierType.Multiply); skillEffect.AddStatusEffect(StatusEffect.Poison()); return skillEffect; }
public static SkillEffect MinorHealEffect() { var skillEffect = new SkillEffect(); skillEffect.EffectTarget = Targeting.SingleTarget(); var affinities = new SkillEffectAffinities(); affinities.SetAffinity(Const.Affinities.Healing, 1d); skillEffect.Affinities = affinities; skillEffect.BaseEnmity = 40; skillEffect.EnmityType = Const.EnmityTargetType.All; skillEffect.EffectType = Const.SkillEffectType.Heal; skillEffect.AddStatModifier(Const.Stats.Accuracy, 1d, Const.ModifierType.Absolute); skillEffect.AddStatModifier(Const.Stats.Mind, 3d, Const.ModifierType.Multiply); skillEffect.AddStatusEffect(StatusEffect.PoisonResistanceUp()); return skillEffect; }
public static SkillEffect ChainLightningSecondary() { var skillEffect = new SkillEffect(); skillEffect.EffectTarget = Targeting.ChainLightningSecondary(); var affinities = new SkillEffectAffinities(); affinities.SetAffinity(Const.Affinities.Lightning, 1d); skillEffect.Affinities = affinities; skillEffect.BaseEnmity = 20; skillEffect.EnmityType = Const.EnmityTargetType.Target; skillEffect.EffectType = Const.SkillEffectType.Attack; skillEffect.AddStatModifier(Const.Stats.Accuracy, 1d, Const.ModifierType.Absolute); skillEffect.AddStatModifier(Const.Stats.Wisdom, 1d, Const.ModifierType.Multiply); return skillEffect; }
private double ApplyAffinityBonuses(double baseDamage, BattleCharacter defender, SkillEffectAffinities effectAffinities) { var nonZeroAffinities = effectAffinities.GetNonZeroAffinities(); if (nonZeroAffinities.Count == 0) { return baseDamage; } var modifiedDamage = 0d; foreach (var kv in nonZeroAffinities) { var resistanceEffect = 1d - defender.GetAffinityResistance(kv.Key); modifiedDamage += baseDamage * resistanceEffect * kv.Value; } return modifiedDamage; }