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:
rftrdev
2023-08-11 11:27:29 -07:00
committed by GitHub
parent aaeea9aac8
commit b91871b518
13 changed files with 57 additions and 58 deletions
+5 -6
View File
@@ -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;
}
}