mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
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:
@@ -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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user