Skip to content

Commit

Permalink
fix(effects): add checks for weakness and disruptingRay
Browse files Browse the repository at this point in the history
  • Loading branch information
rudnovd committed Mar 22, 2022
1 parent ccaaa4e commit bc8e6b0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/modules/effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ export const Effects = {
attack -= 6
}

if (attack < 0) {
attack = 0
}

return {
...target,
attack,
Expand All @@ -336,6 +340,10 @@ export const Effects = {
defense -= 5
}

if (defense < 0) {
defense = 0
}

return {
...target,
defense,
Expand Down

0 comments on commit bc8e6b0

Please sign in to comment.