Skip to content

Commit

Permalink
Update items.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ikonomov authored Nov 30, 2023
1 parent 1dabafc commit df1c37b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Source/items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2701,7 +2701,7 @@ void CalcPlrItemVals(Player &player, bool loadgfx)
|| (player.InvBody[INVLOC_HAND_RIGHT]._itype == ItemType::Mace && player.InvBody[INVLOC_HAND_RIGHT]._iLoc == ILOC_TWOHAND)
|| (player.InvBody[INVLOC_HAND_LEFT]._itype == ItemType::Sword && player.InvBody[INVLOC_HAND_LEFT]._iLoc == ILOC_TWOHAND)
|| (player.InvBody[INVLOC_HAND_RIGHT]._itype == ItemType::Sword && player.InvBody[INVLOC_HAND_RIGHT]._iLoc == ILOC_TWOHAND)) {
player._pDamageMod = player._pLevel * (player._pStrength * 3 / 2 + player._pDexterity) / 200;
player._pDamageMod = player._pLevel * (player._pStrength + player._pDexterity) * 3 / 400;
} else {
player._pDamageMod = player._pLevel * (player._pStrength + player._pDexterity) / 200;
}
Expand Down Expand Up @@ -2753,6 +2753,14 @@ void CalcPlrItemVals(Player &player, bool loadgfx)
}
}

if (player.InvBody[INVLOC_HAND_LEFT]._itype != ItemType::Shield && player.InvBody[INVLOC_HAND_RIGHT]._itype != ItemType::Shield
&& (player.InvBody[INVLOC_HAND_LEFT]._itype == ItemType::Axe || player.InvBody[INVLOC_HAND_RIGHT]._itype == ItemType::Axe
|| player.InvBody[INVLOC_HAND_LEFT]._itype == ItemType::Staff || player.InvBody[INVLOC_HAND_RIGHT]._itype == ItemType::Staff
|| player.InvBody[INVLOC_HAND_LEFT]._itype == ItemType::Mace || player.InvBody[INVLOC_HAND_RIGHT]._itype == ItemType::Mace
|| player.InvBody[INVLOC_HAND_LEFT]._itype == ItemType::Sword || player.InvBody[INVLOC_HAND_RIGHT]._itype == ItemType::Sword)) {
player._pIAC += player._pDexterity / 10;
}

player._pISpells = spl;

EnsureValidReadiedSpell(player);
Expand Down

0 comments on commit df1c37b

Please sign in to comment.