public override object Clone() { ComponentWeapon retval = base.Clone() as ComponentWeapon; retval.Heat = Heat; retval.AeroHeat = AeroHeat; retval.HeatIsPerShot = HeatIsPerShot; retval.Damage = Damage; retval.AeroDamage = AeroDamage; retval.MinimumRange = MinimumRange; retval.ShortRange = ShortRange; retval.MediumRange = MediumRange; retval.LongRange = LongRange; retval.AeroRange = AeroRange; retval.AmmoPerTon = AmmoPerTon; retval.ToHitModifier = ToHitModifier; retval.LauncherType = LauncherType; retval.ContributesToTargetingComputerMass = ContributesToTargetingComputerMass; retval.AlphaStrikeAbility = AlphaStrikeAbility; retval.IndirectFire = IndirectFire; retval.ShortRangeDamage = ShortRangeDamage; retval.MediumRangeDamage = MediumRangeDamage; retval.LongRangeDamage = LongRangeDamage; retval.BV = BV; return(retval); }
public void CopyComponents(ComponentWeapon weapon) { Name = weapon.Name; Tonnage = weapon.Tonnage; BaseCost = weapon.BaseCost; TechnologyBase = weapon.TechnologyBase; Heat = weapon.Heat; AeroHeat = weapon.AeroHeat; HeatIsPerShot = weapon.HeatIsPerShot; Damage = weapon.Damage; AeroDamage = weapon.AeroDamage; MinimumRange = weapon.MinimumRange; ShortRange = weapon.ShortRange; MediumRange = weapon.MediumRange; LongRange = weapon.LongRange; AeroRange = weapon.AeroRange; AmmoPerTon = weapon.AmmoPerTon; CriticalSpaceMech = weapon.CriticalSpaceMech; CriticalSpaceProtomech = weapon.CriticalSpaceProtomech; CriticalSpaceCombatVehicle = weapon.CriticalSpaceCombatVehicle; CriticalSpaceDropShips = weapon.CriticalSpaceDropShips; CriticalSpaceFighters = weapon.CriticalSpaceFighters; CriticalSpaceSmallCraft = weapon.CriticalSpaceSmallCraft; CriticalSpaceSupportVehicle = weapon.CriticalSpaceSupportVehicle; ToHitModifier = weapon.ToHitModifier; TechRating = weapon.TechRating; LauncherType = weapon.LauncherType; ContributesToTargetingComputerMass = weapon.ContributesToTargetingComputerMass; AlphaStrikeAbility = weapon.AlphaStrikeAbility; ShortRangeDamage = weapon.ShortRangeDamage; MediumRangeDamage = weapon.MediumRangeDamage; LongRangeDamage = weapon.LongRangeDamage; IndirectFire = weapon.IndirectFire; }
public void Configure(Design design) { //TM238: The weight of a targeting computer is based on the weight //of all direct-fire, non-missile heavy weaspons, not counting //machine guns, flamers, or TAG systems. double dWeaponsMass = 0; foreach (UnitComponent component in design.Components) { ComponentWeapon weapon = component.Component as ComponentWeapon; if (weapon != null) { if (weapon.ContributesToTargetingComputerMass) { dWeaponsMass += weapon.Tonnage; } } } if (TechnologyBase == TECHNOLOGY_BASE.CLAN) { Tonnage = Math.Ceiling(dWeaponsMass / 5); } else { Tonnage = Math.Ceiling(dWeaponsMass / 4); } }
public override object Clone() { ComponentWeapon retval = base.Clone() as ComponentWeapon; return(retval); }