Exemple #1
0
 private void AttackArchitecture(Architecture architecture)
 {
     if (architecture != null)
     {
         ArchitectureDamage damage = architecture.ReceiveAttackDamage(this.SendAttackDamage(architecture));
         this.StartAttackArchitecture(damage);
         if ((this.BaseAroundAttackRadius > 0) || (this.AroundAttackRadius > 0))
         {
             foreach (Troop troop in this.GetAreaAttackTroops(this.Position, this.AroundAttackRadius, true))
             {
                 if ((troop != this) && (!this.TroopNoAccidentalInjury || !this.IsFriendly(troop.BelongedFaction)))
                 {
                     TroopDamage damage2 = troop.ReceiveAttackDamage(this.SendAttackDamage(troop, false));
                     this.StartAttackTroop(troop, damage2, true);
                 }
             }
         }
     }
 }
Exemple #2
0
 private void AttackArchitecture(Architecture architecture)
 {
     if (architecture != null)
     {
         ArchitectureDamage damage = architecture.ReceiveAttackDamage(this.SendAttackDamage(architecture));
         this.StartAttackArchitecture(architecture, damage);
         if ((this.BaseAroundAttackRadius > 0) || (this.AroundAttackRadius > 0))
         {
             int radius = Math.Max(this.BaseAroundAttackRadius, this.AroundAttackRadius);
             foreach (Troop troop in this.GetAreaAttackTroops(this.Position, radius, true))
             {
                 if ((troop != this) && (!this.TroopNoAccidentalInjury || !this.IsFriendly(troop.BelongedFaction)))
                 {
                     TroopDamage damage2 = troop.ReceiveAttackDamage(this.SendAttackDamage(troop, false));
                     this.StartAttackTroop(troop, damage2, true);
                 }
             }
         }
     }
     ExtensionInterface.call("AttackArchitecture", new Object[] { this.Scenario, this, architecture });
 }