public static int directBlowInfantryDamage(double damage,int mos,int damageType,boolean isNonInfantryAgainstMechanized,boolean isAttackThruBuilding,int attackerId,Vector<Report> vReport){
  int origDamageType=damageType;
  damageType+=mos;
  double origDamage=damage;
switch (damageType) {
case WeaponType.WEAPON_DIRECT_FIRE:
    damage/=10;
  break;
case WeaponType.WEAPON_CLUSTER_BALLISTIC:
damage/=10;
damage++;
break;
case WeaponType.WEAPON_PULSE:
damage/=10;
damage+=2;
break;
case WeaponType.WEAPON_CLUSTER_MISSILE:
damage/=5;
break;
case WeaponType.WEAPON_CLUSTER_MISSILE_1D6:
damage/=5;
damage+=Compute.d6();
break;
case WeaponType.WEAPON_CLUSTER_MISSILE_2D6:
damage/=5;
damage+=Compute.d6(2);
break;
case WeaponType.WEAPON_CLUSTER_MISSILE_3D6:
damage/=5;
damage+=Compute.d6(3);
break;
case WeaponType.WEAPON_BURST_HALFD6:
damage=Compute.d6() / 2.0;
if (isAttackThruBuilding) {
damage*=0.5;
}
break;
case WeaponType.WEAPON_BURST_1D6:
damage=Compute.d6();
if (isAttackThruBuilding) {
damage*=0.5;
}
break;
case WeaponType.WEAPON_BURST_2D6:
damage=Compute.d6(2);
if (isAttackThruBuilding) {
damage*=0.5;
}
break;
case WeaponType.WEAPON_BURST_3D6:
damage=Compute.d6(3);
if (isAttackThruBuilding) {
damage*=0.5;
}
break;
case WeaponType.WEAPON_BURST_4D6:
damage=Compute.d6(4);
if (isAttackThruBuilding) {
damage*=0.5;
}
break;
case WeaponType.WEAPON_BURST_5D6:
damage=Compute.d6(5);
if (isAttackThruBuilding) {
damage*=0.5;
}
break;
case WeaponType.WEAPON_BURST_6D6:
damage=Compute.d6(6);
if (isAttackThruBuilding) {
damage*=0.5;
}
break;
case WeaponType.WEAPON_BURST_7D6:
damage=Compute.d6(7);
if (isAttackThruBuilding) {
damage*=0.5;
}
break;
}
damage=Math.ceil(damage);
if (isNonInfantryAgainstMechanized) {
if (damageType < WeaponType.WEAPON_BURST_HALFD6) {
damage*=2;
}
 else {
damage/=2;
}
}
if (vReport != null) {
Report r=new Report();
r.subject=attackerId;
r.indent(2);
r.add(getDamageTypeString(origDamageType));
if (origDamageType != damageType) {
if (isAttackThruBuilding) {
r.messageId=9973;
}
 else {
r.messageId=9972;
}
r.add(getDamageTypeString(damageType));
}
 else if (isAttackThruBuilding) {
r.messageId=9971;
}
 else {
r.messageId=9970;
}
r.add((int)origDamage);
r.add((int)damage);
vReport.addElement(r);
}
return (int)damage;
}

public static int directBlowInfantryDamage ( double damage , int mos , int damageType , boolean isNonInfantryAgainstMechanized , boolean isAttackThruBuilding , int attackerId , Vector < Report > vReport ) { int origDamageType = damageType ; damageType += mos ; double origDamage = damage ; switch ( damageType ) { case WeaponType . WEAPON_DIRECT_FIRE : damage /= 10 ; break ; case WeaponType . WEAPON_CLUSTER_BALLISTIC : damage /= 10 ; damage ++ ; break ; case WeaponType . WEAPON_PULSE : damage /= 10 ; damage += 2 ; break ; case WeaponType . WEAPON_CLUSTER_MISSILE : damage /= 5 ; break ; case WeaponType . WEAPON_CLUSTER_MISSILE_1D6 : damage /= 5 ; damage += Compute . d6 ( ) ; break ; case WeaponType . WEAPON_CLUSTER_MISSILE_2D6 : damage /= 5 ; damage += Compute . d6 ( 2 ) ; break ; case WeaponType . WEAPON_CLUSTER_MISSILE_3D6 : damage /= 5 ; damage += Compute . d6 ( 3 ) ; break ; case WeaponType . WEAPON_BURST_HALFD6 : damage = Compute . d6 ( ) / 2.0 ; if ( isAttackThruBuilding ) { damage *= 0.5 ; } break ; case WeaponType . WEAPON_BURST_1D6 : damage = Compute . d6 ( ) ; if ( isAttackThruBuilding ) { damage *= 0.5 ; } break ; case WeaponType . WEAPON_BURST_2D6 : damage = Compute . d6 ( 2 ) ; if ( isAttackThruBuilding ) { damage *= 0.5 ; } break ; case WeaponType . WEAPON_BURST_3D6 : damage = Compute . d6 ( 3 ) ; if ( isAttackThruBuilding ) { damage *= 0.5 ; } break ; case WeaponType . WEAPON_BURST_4D6 : damage = Compute . d6 ( 4 ) ; if ( isAttackThruBuilding ) { damage *= 0.5 ; } break ; case WeaponType . WEAPON_BURST_5D6 : damage = Compute . d6 ( 5 ) ; if ( isAttackThruBuilding ) { damage *= 0.5 ; } break ; case WeaponType . WEAPON_BURST_6D6 : damage = Compute . d6 ( 6 ) ; if ( isAttackThruBuilding ) { damage *= 0.5 ; } break ; case WeaponType . WEAPON_BURST_7D6 : damage = Compute . d6 ( 7 ) ; if ( isAttackThruBuilding ) { damage *= 0.5 ; } break ; } damage = Math . ceil ( damage ) ; if ( isNonInfantryAgainstMechanized ) { if ( damageType < WeaponType . WEAPON_BURST_HALFD6 ) { damage *= 2 ; } else { damage /= 2 ; } } if ( vReport != null ) { Report r = new Report ( ) ; r . subject = attackerId ; r . indent ( 2 ) ; r . add ( getDamageTypeString ( origDamageType ) ) ; if ( origDamageType != damageType ) { if ( isAttackThruBuilding ) { r . messageId = 9973 ; } else { r . messageId = 9972 ; } r . add ( getDamageTypeString ( damageType ) ) ; } else if ( isAttackThruBuilding ) { r . messageId = 9971 ; } else { r . messageId = 9970 ; } r . add ( ( int ) origDamage ) ; r . add ( ( int ) damage ) ; vReport . addElement ( r ) ; } return ( int ) damage ; }
method replicates the non - conventional damage against infantry damage table as well as shifting for direct blows . also adjust for non - infantry damaging mechanized infantry
