public Fight(int tNum, int firingSection, Tower targetTower, int targetSection) : base("Fight") { this.towerNumber = tNum; this.playerNumber = TurnOrder.myPlayer.playerNumber; this.firingSection = firingSection; this.targetTower = targetTower.towerNum; this.targetSection = targetSection; this.targetPlayer = targetTower.GetPlayerNum(); }
public void ModifyWeight(Section s, Tower t, int damage, Tower attackingTower) { double weight = s.attributes.material.GetWeight(); if (attackingTower.GetPlayerNum() == t.GetPlayerNum()) //If you're attacking your own tower { s.attributes.material.weight -= weight*weightPercentageModifier/100; CombatLog.addLine("own " + s.attributes.myTower.faction + " section from " + weight + " to " + s.attributes.material.weight); } else { s.attributes.material.weight += weight*weightPercentageModifier/100; s.attributes.material.GetSectionEffect().ApplyDamage(s, damage); CombatLog.addLine("opponent's " + s.attributes.myTower.faction + " section from " + weight + " to " + s.attributes.material.weight); } }