diff --git a/packages/contracts/src/systems/BattleSystem.sol b/packages/contracts/src/systems/BattleSystem.sol index 16158104..f26b2a5d 100644 --- a/packages/contracts/src/systems/BattleSystem.sol +++ b/packages/contracts/src/systems/BattleSystem.sol @@ -203,15 +203,16 @@ contract BattleSystem is System { } function initPlayerHp(address _player) public view returns (uint256) { - uint256 time = Player.getLastBattleTime(_player); - uint256 hp = Player.getHp(_player); + // uint256 time = Player.getLastBattleTime(_player); + // uint256 hp = Player.getHp(_player); - uint256 elapsedTime = block.timestamp - time; - uint256 maxHp = 10000; // Todo: max hp slot - uint256 increase = (elapsedTime / 10) / 100 * maxHp ; - hp = hp + increase; + // uint256 elapsedTime = block.timestamp - time; + // uint256 maxHp = 10000; // Todo: max hp slot + // uint256 increase = (elapsedTime / 10) / 100 * maxHp ; + // hp = hp + increase; - return (hp > maxHp) ? maxHp : hp; + // return (hp > maxHp) ? maxHp : hp; + return 0; } function raisePlayerHp(uint256 _targetHP, uint256 _percent, address _player) public { diff --git a/packages/contracts/src/systems/MoveSystem.sol b/packages/contracts/src/systems/MoveSystem.sol index 275c0496..9591330c 100644 --- a/packages/contracts/src/systems/MoveSystem.sol +++ b/packages/contracts/src/systems/MoveSystem.sol @@ -27,14 +27,6 @@ contract MoveSystem is System { PlayerLocationLock.set(_msgSender(), 0); } - - function transfer(uint16 x, uint16 y) external { - //传送门,将用户在战区和非战区移动 - // 将用户坐标随机转移到指定位置 - Player.setX(_msgSender(), x); - Player.setY(_msgSender(), y); - } - modifier CheckContinuity(Move[] memory moveList) { // 验证行走轨迹合法且连续 uint8 prefer = 1; @@ -134,4 +126,6 @@ contract MoveSystem is System { // GameConfig.pushBattlefieldPlayers(GAME_CONFIG_KEY, _user); Player.setState(_user, PlayerState.Exploring); } + + } \ No newline at end of file diff --git a/packages/contracts/worlds.json b/packages/contracts/worlds.json index 60f1d1b3..24416537 100644 --- a/packages/contracts/worlds.json +++ b/packages/contracts/worlds.json @@ -1,7 +1,7 @@ { "4242": { - "address": "0x2782b8cDD01d01871bcF4197955a0C1cFa296223", - "blockNumber": 27816101 + "address": "0x2A53D186317194340Aa32a6128A0C88e1a37F138", + "blockNumber": 27830588 }, "31337": { "address": "0x7969c5eD335650692Bc04293B07F5BF2e7A673C0"