Skip to content

Commit

Permalink
Merge branch 'feat-mvp' of github.com:Mississippi-Labs/mississippi in…
Browse files Browse the repository at this point in the history
…to feat-mvp
  • Loading branch information
LidamaoHub committed Nov 9, 2023
2 parents 680303b + 626d4ae commit 04e71a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/contracts/src/systems/BattleSystem.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ import { System } from "@latticexyz/world/src/System.sol";
import { BattleState, Buff, PlayerState, BattleEndType } from "@codegen/Types.sol";
import { GameConfig, BoxListData, BattleList, BattleListData, Player, PlayerData, PlayerLocationLock, BoxList } from "@codegen/Tables.sol";
import { BattleUtils } from "./library/BattleUtils.sol";
import { GAME_CONFIG_KEY, BATTLE_CONFIG_KEY } from "../Constants.sol";

import "forge-std/console.sol";

// import "forge-std/console.sol";

contract BattleSystem is System {
event BattleReveal(uint256 battleId, address sender);
Expand Down Expand Up @@ -140,8 +138,7 @@ contract BattleSystem is System {
PlayerLocationLock.set(battle.attacker, block.timestamp);

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

emit BattleEnd(_battleId, BattleEndType.NormalEnd, battle.attacker);
// emit BattleEnd(_battleId, BattleEndType.NormalEnd, battle.attacker);
} else {
// escape fail, cause hurt
uint256 defenderAttackPower = BattleUtils.getAttackPower(defenderBuff, attackerBuff, defenderFirepower);
Expand All @@ -150,7 +147,7 @@ contract BattleSystem is System {
BattleList.setWinner(_battleId, battle.attacker);
BattleList.setIsEnd(_battleId, true);

emit BattleEnd(_battleId, BattleEndType.NormalEnd, battle.attacker);
// emit BattleEnd(_battleId, BattleEndType.NormalEnd, battle.attacker);
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions packages/contracts/worlds.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@
"address": "0x60b886a32B2dC612532a6E0ADF62ACd9093D0EDF"
},
"33784": {
<<<<<<< HEAD
"address": "0x2a810409872AfC346F9B5b26571Fd6eC42EA4849",
"blockNumber": 191547
=======
"address": "0xda2b961c767CC969a647B4017e8BfF3a58F56562",
"blockNumber": 189537
>>>>>>> 0989e5a6c2bd725b63a715371acfe5034cc96ae1
},
"421613": {
"address": "0x2Bc1034975c3df48D6f3026802f372677844b85d",
Expand Down

0 comments on commit 04e71a5

Please sign in to comment.