Skip to content

Commit

Permalink
fix(modificators): fix creature special calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
rudnovd committed Apr 2, 2022
1 parent e396b84 commit f272631
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/modules/modificators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ export const Modificators = {

switch (defender.id) {
case Creatures.Behemoth:
defense *= 0.6
defense = defense * 0.6 - 1
break
case Creatures.AncientBehemoth:
defense *= 0.2
defense = defense * 0.2 - 1
break
case Creatures.Nix:
attack *= 0.7
Expand All @@ -222,6 +222,8 @@ export const Modificators = {
break
}

if (defense <= 0) defense = 1

return {
...attacker,
attack,
Expand Down

0 comments on commit f272631

Please sign in to comment.