public override void Apply(Unit caster, List <Unit> receivers, CellGrid cellGrid) { foreach (Unit u in receivers) { Animator anim = caster.GetComponentInChildren <Animator>(); anim.SetBool("Attack", true); int damage = UnityEngine.Random.Range(MinDamage, MaxDamage); caster.DealDamage2(u, damage); VulnerabilityDebuff vulnebuff = new VulnerabilityDebuff(); u.Buffs.Add(vulnebuff); vulnebuff.Apply(u); } caster.ActionPoints--; SetCooldown(); }
public override void Apply(Unit caster, List <Cell> cells, CellGrid cellGrid) { Animator anim = caster.GetComponentInChildren <Animator>(); anim.SetBool("Attack", true); anim.SetBool("Idle", false); foreach (var currentCell in cells) { if (currentCell.Occupent != null) { int damage = UnityEngine.Random.Range(MinDamage, MaxDamage); caster.DealDamage2(currentCell.Occupent, damage); VulnerabilityDebuff vulnebuff = new VulnerabilityDebuff(); currentCell.Occupent.Buffs.Add(vulnebuff); vulnebuff.Apply(currentCell.Occupent); } } caster.ActionPoints--; SetCooldown(); }