Skip to content

Commit

Permalink
feat(Battle): merge modified creature props in active creature
Browse files Browse the repository at this point in the history
  • Loading branch information
rudnovd committed Mar 29, 2022
1 parent 87d4660 commit 5fbbed7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/models/Battle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class Battle {

this.attacker.activeCreature = {
...this.attacker.activeCreature,
hits: modifiedAttackerCreature.hits,
...modifiedAttackerCreature,
calculation: {
...this.attacker.activeCreature.calculation,
...attackerCalculation,
Expand All @@ -103,7 +103,7 @@ export class Battle {

this.defender.activeCreature = {
...this.defender.activeCreature,
hits: modifiedDefenderCreature.hits,
...modifiedDefenderCreature,
calculation: {
...this.defender.activeCreature.calculation,
...defenderCalculation,
Expand Down

0 comments on commit 5fbbed7

Please sign in to comment.