Skip to content

Commit

Permalink
chore: change escape lock logic
Browse files Browse the repository at this point in the history
  • Loading branch information
lewis committed Nov 4, 2023
1 parent d2402dd commit 9c0b0a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/contracts/src/systems/BattleSystem.sol
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ contract BattleSystem is System {
BattleList.setWinner(_battleId, battle.defender);
BattleList.setIsEnd(_battleId, true);
// escaper will lock a while
PlayerLocationLock.set(battle.attacker, block.timestamp);
PlayerLocationLock.set(battle.defender, block.timestamp);
// console.log(" escape --- 2");

// emit BattleEnd(_battleId, BattleEndType.NormalEnd, battle.defender);
Expand All @@ -140,7 +140,7 @@ contract BattleSystem is System {
BattleList.setWinner(_battleId, battle.attacker);
BattleList.setIsEnd(_battleId, true);
// escaper will lock a while
PlayerLocationLock.set(battle.defender, block.timestamp);
PlayerLocationLock.set(battle.attacker, block.timestamp);

// console.log(" attacker escape success");

Expand Down

0 comments on commit 9c0b0a7

Please sign in to comment.