Skip to content

Commit e7c2fe3

Browse files
author
WALL OF JUSTICE
committed
* thank the tank achievement grants shield procs
1 parent 2136855 commit e7c2fe3

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/game.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,6 +1538,9 @@ void gameLogic(void)
15381538
if ( achievementStatusThankTheTank[c] )
15391539
{
15401540
steamAchievementClient(c, "BARONY_ACH_THANK_THE_TANK");
1541+
achievementStatusThankTheTank[c] = false;
1542+
achievementThankTheTankPair[c].first = 0;
1543+
achievementThankTheTankPair[c].second = 0;
15411544
}
15421545

15431546
int bodyguards = 0;

src/scores.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4100,6 +4100,10 @@ void updateAchievementThankTheTank(int player, Entity* target, bool targetKilled
41004100
{
41014101
return;
41024102
}
4103+
if ( !target )
4104+
{
4105+
return;
4106+
}
41034107
if ( achievementStatusThankTheTank[player] || multiplayer == CLIENT )
41044108
{
41054109
return;
@@ -4123,6 +4127,14 @@ void updateAchievementThankTheTank(int player, Entity* target, bool targetKilled
41234127
if ( (ticks - achievementThankTheTankPair[player].first) / 50.f < 3.f )
41244128
{
41254129
achievementStatusThankTheTank[player] = true;
4130+
if ( players[player]->mechanics.allowedRaiseBlockingAgainstEntity(*target) )
4131+
{
4132+
int skillLVL = 3 * (stats[player]->getProficiency(PRO_SHIELD) / 20);
4133+
if ( local_rng.rand() % (5 + skillLVL) == 0 )
4134+
{
4135+
players[player]->entity->increaseSkill(PRO_SHIELD);
4136+
}
4137+
}
41264138
}
41274139
}
41284140
}

0 commit comments

Comments
 (0)