WARNING: I haven't tested these changes yet, since I'm still at work :p I'll be testing them and making updates as needed tonight.

- updated breaklight effect to use the radius and duration values from Explosives.xml
- updated tracer bullet lighting effect (will probably require more tweaking)
- updated AI - when trapped in gas in Insane the AI goes nuts instead of getting scared.  AI in all levels is more likely to use autofire over burst/single fire when in gas (panicking).


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@190 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
MaddMugsy
2006-06-08 00:14:23 +00:00
parent ea7e68297c
commit 21bc685f8d
7 changed files with 69 additions and 80 deletions
+2 -2
View File
@@ -43,13 +43,13 @@ UINT16 MovementMode[LAST_MOVEMENT_ACTION + 1][NUM_URGENCY_STATES] =
{WALKING, WALKING, WALKING }, // AI_ACTION_RANDOM_PATROL
{WALKING, RUNNING, RUNNING }, // AI_ACTION_SEEK_FRIEND
{WALKING, RUNNING, RUNNING }, // AI_ACTION_SEEK_OPPONENT
{WALKING, WALKING, SWATTING }, // AI_ACTION_SEEK_OPPONENT
{RUNNING, RUNNING, RUNNING }, // AI_ACTION_TAKE_COVER
{WALKING, RUNNING, RUNNING }, // AI_ACTION_GET_CLOSER
{WALKING, WALKING, WALKING }, // AI_ACTION_POINT_PATROL,
{WALKING, RUNNING, RUNNING }, // AI_ACTION_LEAVE_WATER_GAS,
{WALKING, RUNNING, RUNNING }, // AI_ACTION_SEEK_NOISE,
{WALKING, WALKING, SWATTING }, // AI_ACTION_SEEK_NOISE,
{RUNNING, RUNNING, RUNNING }, // AI_ACTION_ESCORTED_MOVE,
{WALKING, RUNNING, RUNNING }, // AI_ACTION_RUN_AWAY,
+19 -5
View File
@@ -1867,7 +1867,7 @@ INT8 DecideActionYellow(SOLDIERTYPE *pSoldier)
////////////////////////////////////////////////////////////////////////////
// SWITCH TO GREEN: determine if soldier acts as if nothing at all was wrong
////////////////////////////////////////////////////////////////////////////
if ((INT16)PreRandom(100) < 1)
if ((INT16)PreRandom(100) < 30 )
{
#ifdef RECORDNET
fprintf(NetDebugFile,"\tDecideActionYellow: guynum %d ignores noise, switching to GREEN AI...\n",pSoldier->ubID);
@@ -3625,7 +3625,13 @@ INT8 DecideActionBlack(SOLDIERTYPE *pSoldier)
}
// REALLY tired, can't get away, force soldier's morale to hopeless state
pSoldier->bAIMorale = MORALE_HOPELESS;
if ( gGameOptions.ubDifficultyLevel == DIF_LEVEL_INSANE )
{
pSoldier->bBreath = pSoldier->bBreathMax; //Madd: backed into a corner, so go crazy like a wild animal...
pSoldier->bAIMorale = MORALE_FEARLESS;
}
else
pSoldier->bAIMorale = MORALE_HOPELESS;
}
}
@@ -3668,7 +3674,13 @@ INT8 DecideActionBlack(SOLDIERTYPE *pSoldier)
// GIVE UP ON LIFE! MERCS MUST HAVE JUST CORNERED A HELPLESS ENEMY IN A
// GAS FILLED ROOM (OR IN WATER MORE THAN 25 TILES FROM NEAREST LAND...)
pSoldier->bAIMorale = MORALE_HOPELESS;
if ( bInGas && gGameOptions.ubDifficultyLevel == DIF_LEVEL_INSANE )
{
pSoldier->bBreath = pSoldier->bBreathMax;
pSoldier->bAIMorale = MORALE_FEARLESS; // Can't move, can't get away, go nuts instead...
}
else
pSoldier->bAIMorale = MORALE_HOPELESS;
}
// offer surrender?
@@ -4550,7 +4562,7 @@ bCanAttack = FALSE;
}
}
if (IsGunAutofireCapable( pSoldier, BestAttack.bWeaponIn /*, FALSE*/ ) &&
if (IsGunAutofireCapable( pSoldier, BestAttack.bWeaponIn ) &&
!(Menptr[BestShot.ubOpponent].bLife < OKLIFE) && // don't burst at downed targets
(( pSoldier->inv[BestAttack.bWeaponIn].ubGunShotsLeft > 1 &&
BestAttack.ubAimTime != BURSTING ) || Weapon[pSoldier->inv[BestAttack.bWeaponIn].usItem].NoSemiAuto) )
@@ -4591,10 +4603,12 @@ bCanAttack = FALSE;
case ATTACKSLAYONLY:iChance += 30; break;
}
if ( pSoldier->inv[BestAttack.bWeaponIn].ubGunShotsLeft > 50 )
iChance += 30;
if ( bInGas )
iChance += 50; //Madd: extra chance of going nuts and autofiring if stuck in gas
// increase chance based on proximity and difficulty of enemy
if ( PythSpacesAway( pSoldier->sGridNo, BestAttack.sTarget ) < 15 )
{