Skip to content

Commit

Permalink
fix reset piece coord
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaudeZsb committed Jul 5, 2023
1 parent 82ac709 commit 1bbb6cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/contracts/src/systems/AutoBattleSystem.sol
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ contract AutoBattleSystem is System {
PieceData memory piece = Piece.get(pieceId);
uint256 health = piece.tier > 0 ? Creatures.getHealth(piece.creature)*CreatureConfig.getItemHealthAmplifier(piece.tier-1)/100 : Creatures.getHealth(piece.creature);
PieceInBattle.setCurHealth(id, uint32(health));
PieceInBattle.setX(id, i > num1 ? uint32(mapLength) - 1 - piece.x : piece.x);
PieceInBattle.setX(id, i < num1 ? piece.x : uint32(mapLength) - 1 - piece.x);
PieceInBattle.setY(id, piece.y);
}
}
Expand Down

0 comments on commit 1bbb6cc

Please sign in to comment.