Automatic cohesion test before the impact
Posted: Thu May 07, 2020 12:20 pm
Trying to mod non-light cavalry fights, I try to implement automatic cohesion test at the impact for both enemy units whatever the casualties are, without extra modifiers, the rest of the Vanilla rules of non-light cav impact/melee remaining the same.
So I simply inserted...
... into FUNCTION MoraleUpdate(me, enemy, reason, loser, combatLog, shot, notional_turn, fullReason) in MoraleTools.BSF there :
Is it the correct way to do it ?
It seems to work according to the combat log (and seemed to provide interesting results during my first two testing).
But does it risk to interfere in the Vanilla process of cohesion test at the impact ?
No risk of double drop the first time from my automatic cohesion test during Impact and the second time because of a significant total close combat at the same impact ? Maybe my automatic cohesion test during my turn, the Vanilla cohesion test during the enemy turn ?
Do the Vanilla modifiers apply correctly ?
link to my MoraleTools.BSF : http://www.mediafire.com/file/2udfrxo46 ... s.BSF/file
So I simply inserted...
Code: Select all
// My mod
if ((IsMounted(me)) && (IsMounted(enemy)) && (IsLightTroops(me) == 0) && (isLightTroops(enemy) == 0) && (reason == 1))
{
test = 1;
}
//end o my mod
Code: Select all
if ((reason == 1) || (reason == 2)) // Close combat
{
if (loser != me)
{
test = 0; // No test
}
// My mod
if ((IsMounted(me)) && (IsMounted(enemy)) && (IsLightTroops(me) == 0) && (isLightTroops(enemy) == 0) && (reason == 1))
{
test = 1;
}
//end o my mod
}
if (reason == 5) // Autodrop
It seems to work according to the combat log (and seemed to provide interesting results during my first two testing).
But does it risk to interfere in the Vanilla process of cohesion test at the impact ?
No risk of double drop the first time from my automatic cohesion test during Impact and the second time because of a significant total close combat at the same impact ? Maybe my automatic cohesion test during my turn, the Vanilla cohesion test during the enemy turn ?
Do the Vanilla modifiers apply correctly ?
link to my MoraleTools.BSF : http://www.mediafire.com/file/2udfrxo46 ... s.BSF/file



