Skip to content

Commit

Permalink
change bonuses for saber offense and defense
Browse files Browse the repository at this point in the history
  • Loading branch information
TwelveEyes committed Jul 2, 2024
1 parent 81d3b6f commit 5233629
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 2 additions & 0 deletions code/game/wp_saber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5186,6 +5186,7 @@ void WP_SaberDamageTrace( gentity_t *ent, int saberNum, int bladeNum )
{
entPowerLevel += ent->client->ps.saber[saberNum].breakParryBonus2;
}
entPowerLevel += ent->client->ps.forcePowerLevel[FP_SABER_OFFENSE]+Q_irand(0,g_spskill->integer)+(ent->s.number>=MAX_CLIENTS)?0:Q_irand(0,1);
}
else if ( entDefending )
{//add twoHanded bonus and dualSaber bonus and parryBonus to entPowerLevel here
Expand Down Expand Up @@ -5232,6 +5233,7 @@ void WP_SaberDamageTrace( gentity_t *ent, int saberNum, int bladeNum )
{//FIXME: assumes both sabers are hitting at same time...?
hitOwnerPowerLevel += 1 + hitOwner->client->ps.saber[1].breakParryBonus;
}
hitOwnerPowerLevel += hitOwner->client->ps.forcePowerLevel[FP_SABER_OFFENSE]+Q_irand(0,g_spskill->integer)+(ent->s.number>=MAX_CLIENTS)?0:Q_irand(0,1);
}
else if ( hitOwnerDefending )
{//add twoHanded bonus and dualSaber bonus and parryBonus to entPowerLevel here
Expand Down
10 changes: 2 additions & 8 deletions code/qcommon/q_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -1783,10 +1783,7 @@ class PlayerStateBase
disarmBonus += 1 + saber[1].disarmBonus;
}
}
if ( forcePowerLevel[FP_SABER_OFFENSE] > 1 )
{//bonus for saber offense above 1
disarmBonus += forcePowerLevel[FP_SABER_OFFENSE] - 1;
}
disarmBonus += forcePowerLevel[FP_SABER_DEFENSE]+Q_irand(0,g_spskill->integer)+Q_irand(0,1);
return disarmBonus;
};
int SaberParryBonus( void )
Expand All @@ -1800,10 +1797,7 @@ class PlayerStateBase
{//bonus for having 2 sabers
parryBonus += 1 + saber[1].parryBonus;
}
if ( forcePowerLevel[FP_SABER_DEFENSE] > 1 )
{//bonus for saber defense above 1
parryBonus += forcePowerLevel[FP_SABER_DEFENSE] - 1;
}
parryBonus += forcePowerLevel[FP_SABER_DEFENSE]+Q_irand(0,g_spskill->integer)+Q_irand(0,1);
return parryBonus;
};
#endif // !JK2_MODE
Expand Down

0 comments on commit 5233629

Please sign in to comment.