I added a debug statement to the RC6 code, then played Delenda Est on Very Easy until the Katana was destroyed (just after the Imperieuse arrived but before it opened fire, so mission failed). For a quick explanation I'm logging:
1) the ship taking damage
2) how much damage was applied to the ship (after all other calculations are complete, e.g. armour mods / subsystem damage / etc)
3) what weapon did the damage
Index: code/ship/shiphit.cpp
===================================================================
--- code/ship/shiphit.cpp (revision 8748)
+++ code/ship/shiphit.cpp (working copy)
@@ -2141,6 +2141,8 @@ static void ship_do_damage(object *ship_obj, object *other_obj, vec3d *hitpos, f
}
}
ship_obj->hull_strength -= damage;
+ // check who is causing what damage & to whom
+ mprintf(("Damage: A took B from C:i%s,%f,%s\n",shipp->ship_name,damage,Weapon_info[weapon_info_index].name));
}
// let damage gauge know that player ship just took damage
This needs some refinement as the 3rd field doesn't capture stuff like the beam names, collision "names", etc, despite that this has showed some interesting data.
$ grep Damage fs2_open.log | grep Katana | cut -d',' -f 2 | awk '{ sum+=$1} END {print sum}'
85266.8
grep Damage fs2_open.log | grep Katana | grep Apocalypse | cut -d',' -f 2 | awk '{ sum+=$1} END {print sum}'
42302.1
The Katana takes approximately half its damage (42k out of 85k) from Apocalypse torpedoes.
That doesn't seem right, maybe its own torps are hitting itself, or perhaps someone else is firing into the Katana? I'm going to see if I can find how to reference who launched these torpedoes but it'll be probably 4-5 hours before I can look at this again, so I'm just throwing this out there in case someone else wants to dig further in the meantime.