public override void Apply(Unit caster, List <Unit> receivers, CellGrid cellGrid) { Animator anim = caster.GetComponentInChildren <Animator>(); anim.SetBool("Attack", true); anim.SetBool("Idle", false); foreach (var receiver in receivers) { int damage = UnityEngine.Random.Range(MinDamage, MaxDamage + 1); caster.DealDamage2(receiver, damage); RootedDebuff debuff = new RootedDebuff(); receiver.Buffs.Add(debuff); debuff.Apply(receiver); } 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 + 1); caster.DealDamage2(currentCell.Occupent, damage); RootedDebuff debuff = new RootedDebuff(); debuff.Apply(currentCell.Occupent); currentCell.Occupent.Buffs.Add(debuff); } } caster.ActionPoints--; SetCooldown(); }