Skip to content

Commit

Permalink
Added events emits
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandoDrRobot committed Aug 21, 2024
1 parent 7f30201 commit 685b0fe
Show file tree
Hide file tree
Showing 11 changed files with 2,345 additions and 76 deletions.
407 changes: 407 additions & 0 deletions manifests/dev/base/abis/models/bytebeasts-Status-6595af0f.json

Large diffs are not rendered by default.

407 changes: 407 additions & 0 deletions manifests/dev/base/abis/models/bytebeasts-StatusBattle-161fdb64.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
kind = "DojoContract"
class_hash = "0x42e8d9b08e8c71fee2c025922e8bcd10b9277fb688e97701f2169ca03ad91c0"
original_class_hash = "0x42e8d9b08e8c71fee2c025922e8bcd10b9277fb688e97701f2169ca03ad91c0"
class_hash = "0x5efdb80629807631b0bb916ce067881084b4aca4aaf22da3794172290bbd232"
original_class_hash = "0x5efdb80629807631b0bb916ce067881084b4aca4aaf22da3794172290bbd232"
base_class_hash = "0x0"
abi = "manifests/dev/base/abis/contracts/bytebeasts-battle_system-461868ac.json"
reads = []
Expand Down
16 changes: 16 additions & 0 deletions manifests/dev/base/models/bytebeasts-Status-6595af0f.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
kind = "DojoModel"
class_hash = "0xe446a8c3773fbfae6e2e0e87a6d1db12143224cf47e217e12bf9cfc76428ef"
original_class_hash = "0xe446a8c3773fbfae6e2e0e87a6d1db12143224cf47e217e12bf9cfc76428ef"
abi = "manifests/dev/base/abis/models/bytebeasts-Status-6595af0f.json"
tag = "bytebeasts-Status"
manifest_name = "bytebeasts-Status-6595af0f"

[[members]]
name = "player_id"
type = "u32"
key = true

[[members]]
name = "message"
type = "felt252"
key = false
16 changes: 16 additions & 0 deletions manifests/dev/base/models/bytebeasts-StatusBattle-161fdb64.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
kind = "DojoModel"
class_hash = "0x5ba495f80b653be6df964eb97ac2e7b3f7f72508d17b54b1d51595231db8fae"
original_class_hash = "0x5ba495f80b653be6df964eb97ac2e7b3f7f72508d17b54b1d51595231db8fae"
abi = "manifests/dev/base/abis/models/bytebeasts-StatusBattle-161fdb64.json"
tag = "bytebeasts-StatusBattle"
manifest_name = "bytebeasts-StatusBattle-161fdb64"

[[members]]
name = "battle_id"
type = "u32"
key = true

[[members]]
name = "message"
type = "felt252"
key = false
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,192 @@
"name": "BattleActionsImpl",
"interface_name": "bytebeasts::systems::battle::IBattleActions"
},
{
"type": "struct",
"name": "bytebeasts::models::Beast",
"members": [
{
"name": "beast_id",
"type": "core::integer::u32"
},
{
"name": "beast_name",
"type": "core::felt252"
},
{
"name": "beast_type",
"type": "core::integer::u32"
},
{
"name": "beast_description",
"type": "core::felt252"
},
{
"name": "player_id",
"type": "core::integer::u32"
},
{
"name": "hp",
"type": "core::integer::u32"
},
{
"name": "current_hp",
"type": "core::integer::u32"
},
{
"name": "attack",
"type": "core::integer::u32"
},
{
"name": "defense",
"type": "core::integer::u32"
},
{
"name": "mt1",
"type": "core::integer::u32"
},
{
"name": "mt2",
"type": "core::integer::u32"
},
{
"name": "mt3",
"type": "core::integer::u32"
},
{
"name": "mt4",
"type": "core::integer::u32"
},
{
"name": "level",
"type": "core::integer::u32"
},
{
"name": "experience_to_next_level",
"type": "core::integer::u64"
}
]
},
{
"type": "struct",
"name": "bytebeasts::models::Potion",
"members": [
{
"name": "potion_id",
"type": "core::integer::u32"
},
{
"name": "potion_name",
"type": "core::felt252"
},
{
"name": "potion_effect",
"type": "core::integer::u32"
}
]
},
{
"type": "struct",
"name": "bytebeasts::models::Mt",
"members": [
{
"name": "mt_id",
"type": "core::integer::u32"
},
{
"name": "mt_name",
"type": "core::felt252"
},
{
"name": "mt_type",
"type": "core::integer::u32"
},
{
"name": "mt_power",
"type": "core::integer::u32"
},
{
"name": "mt_accuracy",
"type": "core::integer::u32"
}
]
},
{
"type": "interface",
"name": "bytebeasts::systems::battle::IBattleActions",
"items": [
{
"type": "function",
"name": "check_flee_success",
"inputs": [
{
"name": "player_beast",
"type": "bytebeasts::models::Beast"
},
{
"name": "opponent_beast",
"type": "bytebeasts::models::Beast"
}
],
"outputs": [
{
"type": "core::felt252"
}
],
"state_mutability": "view"
},
{
"type": "function",
"name": "apply_item_effect",
"inputs": [
{
"name": "potion",
"type": "bytebeasts::models::Potion"
},
{
"name": "target",
"type": "bytebeasts::models::Beast"
}
],
"outputs": [],
"state_mutability": "view"
},
{
"type": "function",
"name": "calculate_damage",
"inputs": [
{
"name": "mt",
"type": "bytebeasts::models::Mt"
},
{
"name": "attacker",
"type": "bytebeasts::models::Beast"
},
{
"name": "defender",
"type": "bytebeasts::models::Beast"
}
],
"outputs": [
{
"type": "core::integer::u32"
}
],
"state_mutability": "view"
},
{
"type": "function",
"name": "opponent_turn",
"inputs": [
{
"name": "battle_id",
"type": "core::integer::u32"
}
],
"outputs": [],
"state_mutability": "external"
},
{
"type": "function",
"name": "init_battle",
Expand All @@ -150,6 +332,50 @@
],
"outputs": [],
"state_mutability": "external"
},
{
"type": "function",
"name": "attack",
"inputs": [
{
"name": "battle_id",
"type": "core::integer::u32"
},
{
"name": "mt_id",
"type": "core::integer::u32"
}
],
"outputs": [],
"state_mutability": "external"
},
{
"type": "function",
"name": "use_potion",
"inputs": [
{
"name": "battle_id",
"type": "core::integer::u32"
},
{
"name": "potion_id",
"type": "core::integer::u32"
}
],
"outputs": [],
"state_mutability": "external"
},
{
"type": "function",
"name": "flee",
"inputs": [
{
"name": "battle_id",
"type": "core::integer::u32"
}
],
"outputs": [],
"state_mutability": "external"
}
]
},
Expand Down
Loading

0 comments on commit 685b0fe

Please sign in to comment.