Skip to content

Commit

Permalink
Attempting to check for ammo types
Browse files Browse the repository at this point in the history
  • Loading branch information
IceRaptor committed Feb 23, 2020
1 parent 6aa90b7 commit 3a74022
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion CleverGirl/CleverGirl/Helper/AIHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,17 @@ private static float CalculateWeaponDamageEV(CondensedWeapon cWeapon, BehaviorTr
float armorReduction = 0f;
foreach(AmmunitionBox aBox in cWeapon.First.ammoBoxes) {
//Mod.Log.Debug($" -- Checking ammo box defId: {aBox.mechComponentRef.ComponentDefID}");
if (aBox.mechComponentRef.Is<CleverGirlComponent>(out CleverGirlComponent cgComp) && cgComp.ArmorDamageReduction != 0) {
if (aBox.ammoDef.Is.mechComponentRef.Def.Is<CleverGirlComponent>(out CleverGirlComponent cgComp) && cgComp.ArmorDamageReduction != 0) {
armorReduction = cgComp.ArmorDamageReduction;
}
}
if (armorReduction != 0f) {
Mod.Log.Debug($" -- APPLY DAMAGE REDUCTION OF: {armorReduction}");
}

// TODO: AMS provides a shield to allies


// Need to precalc some values on every combatant -
// find objective targets
// heat to cripple / damage / etc
Expand Down
4 changes: 2 additions & 2 deletions CleverGirl/CleverGirl/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.3.2.0")]
[assembly: AssemblyFileVersion("0.3.2.0")]
[assembly: AssemblyVersion("0.3.4.0")]
[assembly: AssemblyFileVersion("0.3.4.0")]

0 comments on commit 3a74022

Please sign in to comment.