public static BuffInstance ApplyBuff(AbilityEffect origin, Buff buff, AbilityCaster caster, EventHandler target, AbilityData data) { BuffInstance buffInst = new BuffInstance(origin, buff, caster, target, data); buffInst.Start(); return(buffInst); }
BuffInstance(AbilityEffect originEffect, Buff buff, AbilityCaster caster, EventHandler target, AbilityData data) { OriginEffect = originEffect; Buff = buff; Caster = caster; Target = target; Data = data; }
public static AttackInstance Attack(AbilityEffect origin, AbilityCaster attacker, EventHandler target, float amount, DamageType type, AbilitySFXPool sfx) { AttackInstance atkInst = new AttackInstance(origin, attacker, target, amount, type, sfx); atkInst.Execute(); return(atkInst); }
public static DamageInstance Damage(AbilityEffect origin, AbilityCaster dealer, EventHandler target, float amount, DamageType type, bool isCrit = false, bool isDefended = false) { DamageInstance dmgInst = new DamageInstance(origin, dealer, target, amount, type, isCrit, isDefended); dmgInst.Deal(); return(dmgInst); }
DamageInstance(AbilityEffect origin, AbilityCaster dealer, EventHandler target, float amount, DamageType type, bool isCrit, bool isDefended) { OriginEffect = origin; Dealer = dealer; Target = target; Amount = amount; Type = type; IsCrit = isCrit; IsDefended = isDefended; }
public void Apply(AbilityEffect origin, AbilityCaster caster, EventHandler target, AbilityData data) { if (!_doesStack) { BuffInstance existingBuff = target.Buffs.FirstOrDefault( (buffInst) => buffInst.Caster == caster && buffInst.Buff == this); if (existingBuff != null) { existingBuff.Remove(); } } BuffInstance.ApplyBuff(origin, this, caster, target, data); }
AttackInstance(AbilityEffect origin, AbilityCaster attacker, EventHandler target, float amount, DamageType type, AbilitySFXPool sfx) { OriginEffect = origin; Attacker = attacker; Target = target; Damage = amount; Type = type; SFX = sfx; HitChance = 1f; IsHit = true; CritChance = attacker.CritChance; CritMultiplier = attacker.CritMultiplier; }