mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Move grenade bonuses from Demolitions to Throwing (#202)
* Copy grenade settings from demolitions to throwing * Fix setting strings * Add throwing bonuses to the same spots as demolitions * Delete grenade bonuses from Demolitions * Update text * Reapply throwing check
This commit is contained in:
+2
-2
@@ -3640,11 +3640,11 @@ INT16 MinAPsToThrow( SOLDIERTYPE *pSoldier, INT32 sGridNo, UINT8 ubAddTurningCos
|
||||
iAPCost += ( ( ( 100 * iTop ) / iBottom) + 1) / 2;
|
||||
|
||||
// SANDRO - STOMP traits - reduce APs needed to throw grenades if having Demolitions skill
|
||||
if( HAS_SKILL_TRAIT( pSoldier, DEMOLITIONS_NT ) && gGameOptions.fNewTraitSystem )
|
||||
if( HAS_SKILL_TRAIT( pSoldier, THROWING_NT ) && gGameOptions.fNewTraitSystem )
|
||||
{
|
||||
if ( grenadAPreductionpossible )
|
||||
{
|
||||
iAPCost = max( 1, (INT32)(iAPCost * (100 - gSkillTraitValues.ubDEAPsNeededToThrowGrenadesReduction) / 100));
|
||||
iAPCost = max( 1, (INT32)(iAPCost * (100 - gSkillTraitValues.ubTHAPsNeededToThrowGrenadesReduction) / 100));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10175,10 +10175,10 @@ INT32 CalcMaxTossRange( SOLDIERTYPE * pSoldier, UINT16 usItem, BOOLEAN fArmed, O
|
||||
iRange += ((iRange * gSkillTraitValues.ubTHBladesMaxRange ) / 100);
|
||||
}
|
||||
// sevenfm: add range only for hand grenades and not launched grenades
|
||||
else if ( (Item[ usItem ].usItemClass == IC_GRENADE) && Item[usItem].ubCursor == TOSSCURS && (HAS_SKILL_TRAIT( pSoldier, DEMOLITIONS_NT )) )
|
||||
else if ( (Item[ usItem ].usItemClass == IC_GRENADE) && Item[usItem].ubCursor == TOSSCURS && HAS_SKILL_TRAIT( pSoldier, THROWING_NT ) )
|
||||
{
|
||||
// better max range due to expertise
|
||||
iRange += ((iRange * gSkillTraitValues.ubDEMaxRangeToThrowGrenades) / 100);
|
||||
iRange += ((iRange * gSkillTraitValues.ubTHMaxRangeToThrowGrenades) / 100);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -10260,9 +10260,8 @@ UINT32 CalcThrownChanceToHit(SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 ubAimTi
|
||||
else
|
||||
{
|
||||
iChance += gSkillTraitValues.bCtHModifierThrowingGrenades; // -10% for untrained mercs
|
||||
|
||||
if ( HAS_SKILL_TRAIT( pSoldier, DEMOLITIONS_NT ) )
|
||||
iChance += gSkillTraitValues.ubDECtHWhenThrowingGrenades; // +30% chance
|
||||
if ( HAS_SKILL_TRAIT( pSoldier, THROWING_NT ) )
|
||||
iChance += gSkillTraitValues.ubTHCtHWhenThrowingGrenades;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -12196,4 +12195,4 @@ BOOLEAN ArtilleryStrike( UINT16 usItem, UINT8 ubOwnerID, UINT32 usStartingGridNo
|
||||
//REAL_OBJECT* pObject = &( ObjectSlots[ iID ] );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user