Morale changes for AI soldiers:

- GetMoraleModifier: use bMorale for both player and AI.
- CalcSuppressionTolerance: use morale as a base for tolerance for AI soldiers.
- HandleSuppressionFire: morale loss for AI soldiers.
- EVENT_BeginMercTurn: increase morale for AI soldiers.
- TacticalCreateSoldier: Set morale = 60 + 2 * bExpLevel + Random(20) when creating AI soldier.

NEW_SUPPRESSION_CODE: UseGun, UseGunNCTH: reduce shock when firing gun.
AI_NEW_MORALE: limit AI morale depending on morale and shock level.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9181 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2021-10-15 05:52:09 +00:00
parent 7a7f554908
commit 7978ad77f3
6 changed files with 98 additions and 32 deletions
+6
View File
@@ -966,6 +966,12 @@ SOLDIERTYPE* TacticalCreateSoldier( SOLDIERCREATE_STRUCT *pCreateStruct, UINT8 *
Soldier.uiAnimSubFlags |= SUB_ANIM_BIGGUYTHREATENSTANCE;
}
// sevenfm: max morale for AI soldiers
if (Soldier.ubProfile == NO_PROFILE)
{
Soldier.aiData.bMorale = 60 + 2 * Soldier.stats.bExpLevel + Random(20);
}
//For inventory, look for any face class items that may be located in the big pockets and if found, move
//that item to a face slot and clear the pocket!
if( Soldier.bTeam != OUR_TEAM )