Okay, after a fairly productive evening, I believe I have gotten basic environmental objects online. Without an end-phase-engine, the explosion will stick around for a while; I'll probably just edit it out in a turn or so. The good news is that the explosion WAS self-generating!
I've introduced a broadsword as a replacement. I realized, in doing so, that I hadn't done anything about turrets yet. I'll address that either tonight or tomorrow morning, but at the moment, I think it is going to treat the turrets as forward-facing neutron guns...
I also put in fixes for all the other reported combat-related bugs, EXCEPT the 'could not fire DF' bug, as I haven't tried to reproduce it.
Also, for those out there that have code access, I decided that since these 'alpha demo' files are fairly required to do testing, I've added the combat_alpha_demo.php to the repository. You should now be able to run tests of the code, although you'll need to edit the ship_popup.js to have the following change to the orders click-function:
$('.order').click(function() {
var ship_id = $(this).attr('id').split('_');
var preengine;
//Temporarily blocked out to allow the alpha demo to function
/*switch ($('#phase').val()) {
case '1': preengine = 'movement_preengine.php';
break;
case '2': preengine = 'combat_preengine.php';
break;
case '3': preengine = 'endphase_preengine.php';
break;
}*/
//preengine = 'movement_preengine.php';
if ($('#phase').val() % 2 == 0) {
preengine = 'combat_preengine.php';
} else {
preengine = 'movement_preengine.php';
}
$.post(preengine, {
id: ship_id[1],
game: $('#game').val(),
turn: $('#game_turn').val(),
phase: $('#phase').val(),
}, function(html) {
$('#orders_window').html(html);
});
});
I won't bother releasing the movement_alpha_demo, since it is done its usefulness, and there won't be a end_phase_alpha demo, since the phase4.php file would take over at that point.
For those out there reading, I still need a fair amount of testing on this. I know each time we hit a bug, I have to then fix it and you all have to wait, but after multiple hours of toying with the code, it is nice to have you guys help out (and hopefully have fun?) with the ships.
Of primary interested (aka not yet tested):
Can HS missiles lock properly? (i.e. lock at all? From non-rear angles (aka wrong)?, etc.)
Do multi-turn lock missiles (aka IR/Torp) work properly?