public override void Attack(Range unitToAttack) { //determine health(NEED TO BE OVERHAULED) int r = this.strength / unitToAttack.strength; unitToAttack.health -= ((20 * (3 * (r) + 1)) / (3 + r)); this.health -= ((20 * (3 + r)) / ((3 * r) + 1)); print(this.health); }
//method to be overode by child class public virtual void Attack(Range unitToAttack) { //see indivdiual scripts for attack behavior(Melee, Range, etc) print("ahhh The Unit version of attack was called: OH NO! Something went hugely wrong"); }