Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/contracts/mud.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ export default defineWorld({
start: "uint256",
// timestamp of when combat ended. 0 if ongoing.
end: "uint256",
rewardsDistributed: "bool",
// the current turn. starts at 0
currentTurn: "uint256",
// the max number of turns. default is 15 for pve
Expand Down Expand Up @@ -294,8 +295,6 @@ export default defineWorld({
expDropped: "uint256",
goldDropped: "uint256",
itemsDropped: "uint256[]",
deadAttackers: "bytes32[]",
deadDefenders: "bytes32[]",
},
key: ["encounterId"],
type: "offchainTable",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"name": "executeCombat",
"inputs": [
{
"name": "randomNumber",
"name": "prevRandao",
"type": "uint256",
"internalType": "uint256"
},
Expand Down Expand Up @@ -195,6 +195,11 @@
"type": "uint256",
"internalType": "uint256"
},
{
"name": "rewardsDistributed",
"type": "bool",
"internalType": "bool"
},
{
"name": "currentTurn",
"type": "uint256",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ declare const abi: [
"name": "executeCombat",
"inputs": [
{
"name": "randomNumber",
"name": "prevRandao",
"type": "uint256",
"internalType": "uint256"
},
Expand Down Expand Up @@ -195,6 +195,11 @@ declare const abi: [
"type": "uint256",
"internalType": "uint256"
},
{
"name": "rewardsDistributed",
"type": "bool",
"internalType": "bool"
},
{
"name": "currentTurn",
"type": "uint256",
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/out/CombatSystem.sol/CombatSystem.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

46 changes: 45 additions & 1 deletion packages/contracts/out/IWorld.sol/IWorld.abi.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@
"type": "uint256",
"internalType": "uint256"
},
{
"name": "rewardsDistributed",
"type": "bool",
"internalType": "bool"
},
{
"name": "currentTurn",
"type": "uint256",
Expand Down Expand Up @@ -437,6 +442,40 @@
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "UD__distributeRewards",
"inputs": [
{
"name": "encounterId",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "randomNumber",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "_expAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_goldAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_itemIdsDropped",
"type": "uint256[]",
"internalType": "uint256[]"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "UD__dropGold",
Expand Down Expand Up @@ -582,7 +621,7 @@
"name": "UD__executeCombat",
"inputs": [
{
"name": "randomNumber",
"name": "prevRandao",
"type": "uint256",
"internalType": "uint256"
},
Expand Down Expand Up @@ -792,6 +831,11 @@
"type": "uint256",
"internalType": "uint256"
},
{
"name": "rewardsDistributed",
"type": "bool",
"internalType": "bool"
},
{
"name": "currentTurn",
"type": "uint256",
Expand Down
46 changes: 45 additions & 1 deletion packages/contracts/out/IWorld.sol/IWorld.abi.json.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ declare const abi: [
"type": "uint256",
"internalType": "uint256"
},
{
"name": "rewardsDistributed",
"type": "bool",
"internalType": "bool"
},
{
"name": "currentTurn",
"type": "uint256",
Expand Down Expand Up @@ -437,6 +442,40 @@ declare const abi: [
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "UD__distributeRewards",
"inputs": [
{
"name": "encounterId",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "randomNumber",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "_expAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_goldAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_itemIdsDropped",
"type": "uint256[]",
"internalType": "uint256[]"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "UD__dropGold",
Expand Down Expand Up @@ -582,7 +621,7 @@ declare const abi: [
"name": "UD__executeCombat",
"inputs": [
{
"name": "randomNumber",
"name": "prevRandao",
"type": "uint256",
"internalType": "uint256"
},
Expand Down Expand Up @@ -792,6 +831,11 @@ declare const abi: [
"type": "uint256",
"internalType": "uint256"
},
{
"name": "rewardsDistributed",
"type": "bool",
"internalType": "bool"
},
{
"name": "currentTurn",
"type": "uint256",
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/out/IWorld.sol/IWorld.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/contracts/out/MapSystem.sol/MapSystem.json

Large diffs are not rendered by default.

Loading