From 2ff9d91450d2426e7caf354d751defb2a4cd33e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Pi=C3=B1ones?= Date: Thu, 31 Oct 2024 21:56:18 -0300 Subject: [PATCH] add event create level --- manifests/dev/deployment/manifest.json | 2586 +++++++++++++++++++---- manifests/dev/deployment/manifest.toml | 106 +- scripts/enviroment.sh | 1 + src/models/data/beast.cairo | 1 + src/models/data/challenge.cairo | 1 + src/models/status/round/beast.cairo | 1 + src/models/status/round/challenge.cairo | 1 + src/systems/game_system.cairo | 2 - 8 files changed, 2276 insertions(+), 423 deletions(-) diff --git a/manifests/dev/deployment/manifest.json b/manifests/dev/deployment/manifest.json index 539a9ae..904bed7 100644 --- a/manifests/dev/deployment/manifest.json +++ b/manifests/dev/deployment/manifest.json @@ -1256,8 +1256,8 @@ { "kind": "DojoContract", "address": "0x6a41badee85305fa1aac33488860360c66b60d7f3b204d6e2cd84071dc3c394", - "class_hash": "0x42e0a9b814ff24e92f45d9dd6e764ec9fc948c70b49242249b2cb7d97d62071", - "original_class_hash": "0x42e0a9b814ff24e92f45d9dd6e764ec9fc948c70b49242249b2cb7d97d62071", + "class_hash": "0x3a4aafb2e4f059bf801527b62432f2671368d33ae29c33b737f3c145e832229", + "original_class_hash": "0x3a4aafb2e4f059bf801527b62432f2671368d33ae29c33b737f3c145e832229", "base_class_hash": "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2", "abi": [ { @@ -1412,6 +1412,18 @@ ], "state_mutability": "external" }, + { + "type": "function", + "name": "create_level", + "inputs": [ + { + "name": "game_id", + "type": "core::integer::u32" + } + ], + "outputs": [], + "state_mutability": "external" + }, { "type": "function", "name": "select_deck", @@ -1631,12 +1643,13 @@ "init_calldata": [], "tag": "jokers_of_neon-game_system", "systems": [ - "select_deck", - "select_special_cards", - "select_modifier_cards", + "create_level", "play", "discard", "end_turn", + "select_deck", + "select_special_cards", + "select_modifier_cards", "discard_effect_card", "discard_special_card" ], @@ -6464,18 +6477,18 @@ "kind": "DojoModel", "members": [ { - "name": "player", - "type": "ContractAddress", + "name": "game_id", + "type": "u32", "key": true }, { - "name": "game_id", - "type": "u32", + "name": "active_ids", + "type": "Span", "key": false } ], - "class_hash": "0x101deece771f5cbf115831a78e13c3e68fcf8a6220ea0f86b9177799a610dd1", - "original_class_hash": "0x101deece771f5cbf115831a78e13c3e68fcf8a6220ea0f86b9177799a610dd1", + "class_hash": "0x366273a4ee649b33c07c7584bba0132ac37cc86f52ba525e4ced46a49b960f4", + "original_class_hash": "0x366273a4ee649b33c07c7584bba0132ac37cc86f52ba525e4ced46a49b960f4", "abi": [ { "type": "impl", @@ -6841,26 +6854,36 @@ }, { "type": "impl", - "name": "create_game_eventImpl", - "interface_name": "jokers_of_neon::models::data::events::Icreate_game_event" + "name": "challengeImpl", + "interface_name": "jokers_of_neon::models::data::challenge::Ichallenge" }, { "type": "struct", - "name": "jokers_of_neon::models::data::events::CreateGameEvent", + "name": "core::array::Span::", "members": [ { - "name": "player", - "type": "core::starknet::contract_address::ContractAddress" - }, + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "jokers_of_neon::models::data::challenge::Challenge", + "members": [ { "name": "game_id", "type": "core::integer::u32" + }, + { + "name": "active_ids", + "type": "core::array::Span::" } ] }, { "type": "interface", - "name": "jokers_of_neon::models::data::events::Icreate_game_event", + "name": "jokers_of_neon::models::data::challenge::Ichallenge", "items": [ { "type": "function", @@ -6868,7 +6891,7 @@ "inputs": [ { "name": "model", - "type": "jokers_of_neon::models::data::events::CreateGameEvent" + "type": "jokers_of_neon::models::data::challenge::Challenge" } ], "outputs": [], @@ -6878,36 +6901,36 @@ }, { "type": "event", - "name": "jokers_of_neon::models::data::events::create_game_event::Event", + "name": "jokers_of_neon::models::data::challenge::challenge::Event", "kind": "enum", "variants": [] } ], - "tag": "jokers_of_neon-CreateGameEvent", - "qualified_path": "jokers_of_neon::models::data::events::create_game_event", - "manifest_name": "jokers_of_neon-CreateGameEvent-17f86ee2" + "tag": "jokers_of_neon-Challenge", + "qualified_path": "jokers_of_neon::models::data::challenge::challenge", + "manifest_name": "jokers_of_neon-Challenge-61873cc7" }, { "kind": "DojoModel", "members": [ { - "name": "game_id", - "type": "u32", + "name": "player", + "type": "ContractAddress", "key": true }, { - "name": "idx", - "type": "u32", - "key": true + "name": "player_name", + "type": "felt252", + "key": false }, { - "name": "card_id", + "name": "game_id", "type": "u32", "key": false } ], - "class_hash": "0x6214acf8fa0a427d8d2712413c586866a023b5d256e7c5acd3ccfaade2db633", - "original_class_hash": "0x6214acf8fa0a427d8d2712413c586866a023b5d256e7c5acd3ccfaade2db633", + "class_hash": "0x21c6b6495f7bb89f6e79396f221ce4a47c8eab4f678e55d51248219648a003c", + "original_class_hash": "0x21c6b6495f7bb89f6e79396f221ce4a47c8eab4f678e55d51248219648a003c", "abi": [ { "type": "impl", @@ -7273,30 +7296,30 @@ }, { "type": "impl", - "name": "current_hand_cardImpl", - "interface_name": "jokers_of_neon::models::status::round::current_hand_card::Icurrent_hand_card" + "name": "challenge_completedImpl", + "interface_name": "jokers_of_neon::models::data::events::Ichallenge_completed" }, { "type": "struct", - "name": "jokers_of_neon::models::status::round::current_hand_card::CurrentHandCard", + "name": "jokers_of_neon::models::data::events::ChallengeCompleted", "members": [ { - "name": "game_id", - "type": "core::integer::u32" + "name": "player", + "type": "core::starknet::contract_address::ContractAddress" }, { - "name": "idx", - "type": "core::integer::u32" + "name": "player_name", + "type": "core::felt252" }, { - "name": "card_id", + "name": "game_id", "type": "core::integer::u32" } ] }, { "type": "interface", - "name": "jokers_of_neon::models::status::round::current_hand_card::Icurrent_hand_card", + "name": "jokers_of_neon::models::data::events::Ichallenge_completed", "items": [ { "type": "function", @@ -7304,7 +7327,7 @@ "inputs": [ { "name": "model", - "type": "jokers_of_neon::models::status::round::current_hand_card::CurrentHandCard" + "type": "jokers_of_neon::models::data::events::ChallengeCompleted" } ], "outputs": [], @@ -7314,14 +7337,14 @@ }, { "type": "event", - "name": "jokers_of_neon::models::status::round::current_hand_card::current_hand_card::Event", + "name": "jokers_of_neon::models::data::events::challenge_completed::Event", "kind": "enum", "variants": [] } ], - "tag": "jokers_of_neon-CurrentHandCard", - "qualified_path": "jokers_of_neon::models::status::round::current_hand_card::current_hand_card", - "manifest_name": "jokers_of_neon-CurrentHandCard-29753f22" + "tag": "jokers_of_neon-ChallengeCompleted", + "qualified_path": "jokers_of_neon::models::data::events::challenge_completed", + "manifest_name": "jokers_of_neon-ChallengeCompleted-510bb1ff" }, { "kind": "DojoModel", @@ -7332,28 +7355,18 @@ "key": true }, { - "name": "idx", - "type": "u32", - "key": true - }, - { - "name": "effect_card_id", - "type": "u32", - "key": false - }, - { - "name": "is_temporary", - "type": "bool", + "name": "discards", + "type": "u8", "key": false }, { - "name": "remaining", - "type": "u32", + "name": "plays", + "type": "u8", "key": false } ], - "class_hash": "0x3888b285bfb37fed4b852e2056f5fc8cce5d379014cbcf81ea4496a9269c7fd", - "original_class_hash": "0x3888b285bfb37fed4b852e2056f5fc8cce5d379014cbcf81ea4496a9269c7fd", + "class_hash": "0x60b252cd03fc19cedc1fb08e6295aa77daa96bf9d2ddb405282359f11bee54d", + "original_class_hash": "0x60b252cd03fc19cedc1fb08e6295aa77daa96bf9d2ddb405282359f11bee54d", "abi": [ { "type": "impl", @@ -7719,52 +7732,30 @@ }, { "type": "impl", - "name": "current_special_cardsImpl", - "interface_name": "jokers_of_neon::models::status::game::game::Icurrent_special_cards" - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] + "name": "challenge_playerImpl", + "interface_name": "jokers_of_neon::models::data::challenge::Ichallenge_player" }, { "type": "struct", - "name": "jokers_of_neon::models::status::game::game::CurrentSpecialCards", + "name": "jokers_of_neon::models::data::challenge::ChallengePlayer", "members": [ { "name": "game_id", "type": "core::integer::u32" }, { - "name": "idx", - "type": "core::integer::u32" - }, - { - "name": "effect_card_id", - "type": "core::integer::u32" - }, - { - "name": "is_temporary", - "type": "core::bool" + "name": "discards", + "type": "core::integer::u8" }, { - "name": "remaining", - "type": "core::integer::u32" + "name": "plays", + "type": "core::integer::u8" } ] }, { "type": "interface", - "name": "jokers_of_neon::models::status::game::game::Icurrent_special_cards", + "name": "jokers_of_neon::models::data::challenge::Ichallenge_player", "items": [ { "type": "function", @@ -7772,7 +7763,7 @@ "inputs": [ { "name": "model", - "type": "jokers_of_neon::models::status::game::game::CurrentSpecialCards" + "type": "jokers_of_neon::models::data::challenge::ChallengePlayer" } ], "outputs": [], @@ -7782,36 +7773,31 @@ }, { "type": "event", - "name": "jokers_of_neon::models::status::game::game::current_special_cards::Event", + "name": "jokers_of_neon::models::data::challenge::challenge_player::Event", "kind": "enum", "variants": [] } ], - "tag": "jokers_of_neon-CurrentSpecialCards", - "qualified_path": "jokers_of_neon::models::status::game::game::current_special_cards", - "manifest_name": "jokers_of_neon-CurrentSpecialCards-11ae0174" + "tag": "jokers_of_neon-ChallengePlayer", + "qualified_path": "jokers_of_neon::models::data::challenge::challenge_player", + "manifest_name": "jokers_of_neon-ChallengePlayer-7d4feee6" }, { "kind": "DojoModel", "members": [ { - "name": "game_id", - "type": "u32", - "key": true - }, - { - "name": "index", - "type": "u32", + "name": "player", + "type": "ContractAddress", "key": true }, { - "name": "card_id", + "name": "game_id", "type": "u32", "key": false } ], - "class_hash": "0x5e1f44f133a6951fe33a0c0084ce584ee4fd4e5498a3208e6f561096f751ea8", - "original_class_hash": "0x5e1f44f133a6951fe33a0c0084ce584ee4fd4e5498a3208e6f561096f751ea8", + "class_hash": "0x101deece771f5cbf115831a78e13c3e68fcf8a6220ea0f86b9177799a610dd1", + "original_class_hash": "0x101deece771f5cbf115831a78e13c3e68fcf8a6220ea0f86b9177799a610dd1", "abi": [ { "type": "impl", @@ -8177,30 +8163,26 @@ }, { "type": "impl", - "name": "deck_cardImpl", - "interface_name": "jokers_of_neon::models::data::game_deck::Ideck_card" + "name": "create_game_eventImpl", + "interface_name": "jokers_of_neon::models::data::events::Icreate_game_event" }, { "type": "struct", - "name": "jokers_of_neon::models::data::game_deck::DeckCard", + "name": "jokers_of_neon::models::data::events::CreateGameEvent", "members": [ { - "name": "game_id", - "type": "core::integer::u32" - }, - { - "name": "index", - "type": "core::integer::u32" + "name": "player", + "type": "core::starknet::contract_address::ContractAddress" }, { - "name": "card_id", + "name": "game_id", "type": "core::integer::u32" } ] }, { "type": "interface", - "name": "jokers_of_neon::models::data::game_deck::Ideck_card", + "name": "jokers_of_neon::models::data::events::Icreate_game_event", "items": [ { "type": "function", @@ -8208,7 +8190,7 @@ "inputs": [ { "name": "model", - "type": "jokers_of_neon::models::data::game_deck::DeckCard" + "type": "jokers_of_neon::models::data::events::CreateGameEvent" } ], "outputs": [], @@ -8218,76 +8200,36 @@ }, { "type": "event", - "name": "jokers_of_neon::models::data::game_deck::deck_card::Event", + "name": "jokers_of_neon::models::data::events::create_game_event::Event", "kind": "enum", "variants": [] } ], - "tag": "jokers_of_neon-DeckCard", - "qualified_path": "jokers_of_neon::models::data::game_deck::deck_card", - "manifest_name": "jokers_of_neon-DeckCard-4e65fb96" + "tag": "jokers_of_neon-CreateGameEvent", + "qualified_path": "jokers_of_neon::models::data::events::create_game_event", + "manifest_name": "jokers_of_neon-CreateGameEvent-17f86ee2" }, { "kind": "DojoModel", "members": [ - { - "name": "player", - "type": "ContractAddress", - "key": true - }, { "name": "game_id", "type": "u32", - "key": false - }, - { - "name": "round_defeat", - "type": "u32", - "key": false - }, - { - "name": "level_bonus", - "type": "u32", - "key": false - }, - { - "name": "hands_left", - "type": "u32", - "key": false - }, - { - "name": "hands_left_cash", - "type": "u32", - "key": false - }, - { - "name": "discard_left", - "type": "u32", - "key": false - }, - { - "name": "discard_left_cash", - "type": "u32", - "key": false - }, - { - "name": "rage_card_defeated", - "type": "u32", - "key": false + "key": true }, { - "name": "rage_card_defeated_cash", + "name": "idx", "type": "u32", - "key": false + "key": true }, { - "name": "total", + "name": "card_id", "type": "u32", "key": false } ], - "class_hash": "0x5a8e5e18e43d39e182e079e0bcc67056e5a2a4bae237350d15e51fee36a5355", - "original_class_hash": "0x5a8e5e18e43d39e182e079e0bcc67056e5a2a4bae237350d15e51fee36a5355", + "class_hash": "0x6214acf8fa0a427d8d2712413c586866a023b5d256e7c5acd3ccfaade2db633", + "original_class_hash": "0x6214acf8fa0a427d8d2712413c586866a023b5d256e7c5acd3ccfaade2db633", "abi": [ { "type": "impl", @@ -8653,70 +8595,38 @@ }, { "type": "impl", - "name": "detail_earned_eventImpl", - "interface_name": "jokers_of_neon::models::data::events::Idetail_earned_event" + "name": "current_hand_cardImpl", + "interface_name": "jokers_of_neon::models::status::round::current_hand_card::Icurrent_hand_card" }, { "type": "struct", - "name": "jokers_of_neon::models::data::events::DetailEarnedEvent", + "name": "jokers_of_neon::models::status::round::current_hand_card::CurrentHandCard", "members": [ - { - "name": "player", - "type": "core::starknet::contract_address::ContractAddress" - }, { "name": "game_id", "type": "core::integer::u32" }, { - "name": "round_defeat", + "name": "idx", "type": "core::integer::u32" }, { - "name": "level_bonus", + "name": "card_id", "type": "core::integer::u32" - }, - { - "name": "hands_left", - "type": "core::integer::u32" - }, - { - "name": "hands_left_cash", - "type": "core::integer::u32" - }, - { - "name": "discard_left", - "type": "core::integer::u32" - }, - { - "name": "discard_left_cash", - "type": "core::integer::u32" - }, - { - "name": "rage_card_defeated", - "type": "core::integer::u32" - }, - { - "name": "rage_card_defeated_cash", - "type": "core::integer::u32" - }, - { - "name": "total", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "jokers_of_neon::models::data::events::Idetail_earned_event", - "items": [ + } + ] + }, + { + "type": "interface", + "name": "jokers_of_neon::models::status::round::current_hand_card::Icurrent_hand_card", + "items": [ { "type": "function", "name": "ensure_abi", "inputs": [ { "name": "model", - "type": "jokers_of_neon::models::data::events::DetailEarnedEvent" + "type": "jokers_of_neon::models::status::round::current_hand_card::CurrentHandCard" } ], "outputs": [], @@ -8726,96 +8636,2044 @@ }, { "type": "event", - "name": "jokers_of_neon::models::data::events::detail_earned_event::Event", + "name": "jokers_of_neon::models::status::round::current_hand_card::current_hand_card::Event", "kind": "enum", "variants": [] } ], - "tag": "jokers_of_neon-DetailEarnedEvent", - "qualified_path": "jokers_of_neon::models::data::events::detail_earned_event", - "manifest_name": "jokers_of_neon-DetailEarnedEvent-40f670e5" + "tag": "jokers_of_neon-CurrentHandCard", + "qualified_path": "jokers_of_neon::models::status::round::current_hand_card::current_hand_card", + "manifest_name": "jokers_of_neon-CurrentHandCard-29753f22" }, { "kind": "DojoModel", "members": [ { - "name": "id", + "name": "game_id", "type": "u32", "key": true }, { - "name": "owner", - "type": "ContractAddress", - "key": false + "name": "idx", + "type": "u32", + "key": true }, { - "name": "player_name", - "type": "felt252", + "name": "effect_card_id", + "type": "u32", "key": false }, { - "name": "max_hands", - "type": "u8", + "name": "is_temporary", + "type": "bool", "key": false }, { - "name": "max_discard", - "type": "u8", + "name": "remaining", + "type": "u32", "key": false + } + ], + "class_hash": "0x3888b285bfb37fed4b852e2056f5fc8cce5d379014cbcf81ea4496a9269c7fd", + "original_class_hash": "0x3888b285bfb37fed4b852e2056f5fc8cce5d379014cbcf81ea4496a9269c7fd", + "abi": [ + { + "type": "impl", + "name": "DojoModelImpl", + "interface_name": "dojo::model::model::IModel" }, { - "name": "max_jokers", - "type": "u8", - "key": false + "type": "struct", + "name": "core::byte_array::ByteArray", + "members": [ + { + "name": "data", + "type": "core::array::Array::" + }, + { + "name": "pending_word", + "type": "core::felt252" + }, + { + "name": "pending_word_len", + "type": "core::integer::u32" + } + ] }, { - "name": "player_score", - "type": "u32", - "key": false + "type": "enum", + "name": "core::option::Option::", + "variants": [ + { + "name": "Some", + "type": "core::integer::u32" + }, + { + "name": "None", + "type": "()" + } + ] }, { - "name": "level", - "type": "u32", - "key": false + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] }, { - "name": "len_hand", - "type": "u32", - "key": false + "type": "struct", + "name": "dojo::model::layout::FieldLayout", + "members": [ + { + "name": "selector", + "type": "core::felt252" + }, + { + "name": "layout", + "type": "dojo::model::layout::Layout" + } + ] }, { - "name": "len_max_current_special_cards", - "type": "u32", - "key": false + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "enum", + "name": "dojo::model::layout::Layout", + "variants": [ + { + "name": "Fixed", + "type": "core::array::Span::" + }, + { + "name": "Struct", + "type": "core::array::Span::" + }, + { + "name": "Tuple", + "type": "core::array::Span::" + }, + { + "name": "Array", + "type": "core::array::Span::" + }, + { + "name": "ByteArray", + "type": "()" + }, + { + "name": "Enum", + "type": "core::array::Span::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "dojo::model::introspect::Member", + "members": [ + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "ty", + "type": "dojo::model::introspect::Ty" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "dojo::model::introspect::Struct", + "members": [ + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "children", + "type": "core::array::Span::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" + } + ] + }, + { + "type": "struct", + "name": "dojo::model::introspect::Enum", + "members": [ + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "children", + "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "enum", + "name": "dojo::model::introspect::Ty", + "variants": [ + { + "name": "Primitive", + "type": "core::felt252" + }, + { + "name": "Struct", + "type": "dojo::model::introspect::Struct" + }, + { + "name": "Enum", + "type": "dojo::model::introspect::Enum" + }, + { + "name": "Tuple", + "type": "core::array::Span::" + }, + { + "name": "Array", + "type": "core::array::Span::" + }, + { + "name": "ByteArray", + "type": "()" + } + ] + }, + { + "type": "interface", + "name": "dojo::model::model::IModel", + "items": [ + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u8" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "name_hash", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_hash", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "unpacked_size", + "inputs": [], + "outputs": [ + { + "type": "core::option::Option::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "packed_size", + "inputs": [], + "outputs": [ + { + "type": "core::option::Option::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "layout", + "inputs": [], + "outputs": [ + { + "type": "dojo::model::layout::Layout" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "schema", + "inputs": [], + "outputs": [ + { + "type": "dojo::model::introspect::Ty" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "impl", + "name": "current_special_cardsImpl", + "interface_name": "jokers_of_neon::models::status::game::game::Icurrent_special_cards" + }, + { + "type": "enum", + "name": "core::bool", + "variants": [ + { + "name": "False", + "type": "()" + }, + { + "name": "True", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "jokers_of_neon::models::status::game::game::CurrentSpecialCards", + "members": [ + { + "name": "game_id", + "type": "core::integer::u32" + }, + { + "name": "idx", + "type": "core::integer::u32" + }, + { + "name": "effect_card_id", + "type": "core::integer::u32" + }, + { + "name": "is_temporary", + "type": "core::bool" + }, + { + "name": "remaining", + "type": "core::integer::u32" + } + ] + }, + { + "type": "interface", + "name": "jokers_of_neon::models::status::game::game::Icurrent_special_cards", + "items": [ + { + "type": "function", + "name": "ensure_abi", + "inputs": [ + { + "name": "model", + "type": "jokers_of_neon::models::status::game::game::CurrentSpecialCards" + } + ], + "outputs": [], + "state_mutability": "view" + } + ] + }, + { + "type": "event", + "name": "jokers_of_neon::models::status::game::game::current_special_cards::Event", + "kind": "enum", + "variants": [] + } + ], + "tag": "jokers_of_neon-CurrentSpecialCards", + "qualified_path": "jokers_of_neon::models::status::game::game::current_special_cards", + "manifest_name": "jokers_of_neon-CurrentSpecialCards-11ae0174" + }, + { + "kind": "DojoModel", + "members": [ + { + "name": "game_id", + "type": "u32", + "key": true + }, + { + "name": "index", + "type": "u32", + "key": true + }, + { + "name": "card_id", + "type": "u32", + "key": false + } + ], + "class_hash": "0x5e1f44f133a6951fe33a0c0084ce584ee4fd4e5498a3208e6f561096f751ea8", + "original_class_hash": "0x5e1f44f133a6951fe33a0c0084ce584ee4fd4e5498a3208e6f561096f751ea8", + "abi": [ + { + "type": "impl", + "name": "DojoModelImpl", + "interface_name": "dojo::model::model::IModel" + }, + { + "type": "struct", + "name": "core::byte_array::ByteArray", + "members": [ + { + "name": "data", + "type": "core::array::Array::" + }, + { + "name": "pending_word", + "type": "core::felt252" + }, + { + "name": "pending_word_len", + "type": "core::integer::u32" + } + ] + }, + { + "type": "enum", + "name": "core::option::Option::", + "variants": [ + { + "name": "Some", + "type": "core::integer::u32" + }, + { + "name": "None", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "dojo::model::layout::FieldLayout", + "members": [ + { + "name": "selector", + "type": "core::felt252" + }, + { + "name": "layout", + "type": "dojo::model::layout::Layout" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "enum", + "name": "dojo::model::layout::Layout", + "variants": [ + { + "name": "Fixed", + "type": "core::array::Span::" + }, + { + "name": "Struct", + "type": "core::array::Span::" + }, + { + "name": "Tuple", + "type": "core::array::Span::" + }, + { + "name": "Array", + "type": "core::array::Span::" + }, + { + "name": "ByteArray", + "type": "()" + }, + { + "name": "Enum", + "type": "core::array::Span::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "dojo::model::introspect::Member", + "members": [ + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "ty", + "type": "dojo::model::introspect::Ty" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "dojo::model::introspect::Struct", + "members": [ + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "children", + "type": "core::array::Span::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" + } + ] + }, + { + "type": "struct", + "name": "dojo::model::introspect::Enum", + "members": [ + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "children", + "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "enum", + "name": "dojo::model::introspect::Ty", + "variants": [ + { + "name": "Primitive", + "type": "core::felt252" + }, + { + "name": "Struct", + "type": "dojo::model::introspect::Struct" + }, + { + "name": "Enum", + "type": "dojo::model::introspect::Enum" + }, + { + "name": "Tuple", + "type": "core::array::Span::" + }, + { + "name": "Array", + "type": "core::array::Span::" + }, + { + "name": "ByteArray", + "type": "()" + } + ] + }, + { + "type": "interface", + "name": "dojo::model::model::IModel", + "items": [ + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u8" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "name_hash", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_hash", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "unpacked_size", + "inputs": [], + "outputs": [ + { + "type": "core::option::Option::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "packed_size", + "inputs": [], + "outputs": [ + { + "type": "core::option::Option::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "layout", + "inputs": [], + "outputs": [ + { + "type": "dojo::model::layout::Layout" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "schema", + "inputs": [], + "outputs": [ + { + "type": "dojo::model::introspect::Ty" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "impl", + "name": "deck_cardImpl", + "interface_name": "jokers_of_neon::models::data::game_deck::Ideck_card" + }, + { + "type": "struct", + "name": "jokers_of_neon::models::data::game_deck::DeckCard", + "members": [ + { + "name": "game_id", + "type": "core::integer::u32" + }, + { + "name": "index", + "type": "core::integer::u32" + }, + { + "name": "card_id", + "type": "core::integer::u32" + } + ] + }, + { + "type": "interface", + "name": "jokers_of_neon::models::data::game_deck::Ideck_card", + "items": [ + { + "type": "function", + "name": "ensure_abi", + "inputs": [ + { + "name": "model", + "type": "jokers_of_neon::models::data::game_deck::DeckCard" + } + ], + "outputs": [], + "state_mutability": "view" + } + ] + }, + { + "type": "event", + "name": "jokers_of_neon::models::data::game_deck::deck_card::Event", + "kind": "enum", + "variants": [] + } + ], + "tag": "jokers_of_neon-DeckCard", + "qualified_path": "jokers_of_neon::models::data::game_deck::deck_card", + "manifest_name": "jokers_of_neon-DeckCard-4e65fb96" + }, + { + "kind": "DojoModel", + "members": [ + { + "name": "player", + "type": "ContractAddress", + "key": true + }, + { + "name": "game_id", + "type": "u32", + "key": false + }, + { + "name": "round_defeat", + "type": "u32", + "key": false + }, + { + "name": "level_bonus", + "type": "u32", + "key": false + }, + { + "name": "hands_left", + "type": "u32", + "key": false + }, + { + "name": "hands_left_cash", + "type": "u32", + "key": false + }, + { + "name": "discard_left", + "type": "u32", + "key": false + }, + { + "name": "discard_left_cash", + "type": "u32", + "key": false + }, + { + "name": "rage_card_defeated", + "type": "u32", + "key": false + }, + { + "name": "rage_card_defeated_cash", + "type": "u32", + "key": false + }, + { + "name": "total", + "type": "u32", + "key": false + } + ], + "class_hash": "0x5a8e5e18e43d39e182e079e0bcc67056e5a2a4bae237350d15e51fee36a5355", + "original_class_hash": "0x5a8e5e18e43d39e182e079e0bcc67056e5a2a4bae237350d15e51fee36a5355", + "abi": [ + { + "type": "impl", + "name": "DojoModelImpl", + "interface_name": "dojo::model::model::IModel" + }, + { + "type": "struct", + "name": "core::byte_array::ByteArray", + "members": [ + { + "name": "data", + "type": "core::array::Array::" + }, + { + "name": "pending_word", + "type": "core::felt252" + }, + { + "name": "pending_word_len", + "type": "core::integer::u32" + } + ] + }, + { + "type": "enum", + "name": "core::option::Option::", + "variants": [ + { + "name": "Some", + "type": "core::integer::u32" + }, + { + "name": "None", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "dojo::model::layout::FieldLayout", + "members": [ + { + "name": "selector", + "type": "core::felt252" + }, + { + "name": "layout", + "type": "dojo::model::layout::Layout" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "enum", + "name": "dojo::model::layout::Layout", + "variants": [ + { + "name": "Fixed", + "type": "core::array::Span::" + }, + { + "name": "Struct", + "type": "core::array::Span::" + }, + { + "name": "Tuple", + "type": "core::array::Span::" + }, + { + "name": "Array", + "type": "core::array::Span::" + }, + { + "name": "ByteArray", + "type": "()" + }, + { + "name": "Enum", + "type": "core::array::Span::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "dojo::model::introspect::Member", + "members": [ + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "ty", + "type": "dojo::model::introspect::Ty" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "dojo::model::introspect::Struct", + "members": [ + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "children", + "type": "core::array::Span::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" + } + ] + }, + { + "type": "struct", + "name": "dojo::model::introspect::Enum", + "members": [ + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "children", + "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "enum", + "name": "dojo::model::introspect::Ty", + "variants": [ + { + "name": "Primitive", + "type": "core::felt252" + }, + { + "name": "Struct", + "type": "dojo::model::introspect::Struct" + }, + { + "name": "Enum", + "type": "dojo::model::introspect::Enum" + }, + { + "name": "Tuple", + "type": "core::array::Span::" + }, + { + "name": "Array", + "type": "core::array::Span::" + }, + { + "name": "ByteArray", + "type": "()" + } + ] + }, + { + "type": "interface", + "name": "dojo::model::model::IModel", + "items": [ + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u8" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "name_hash", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_hash", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "unpacked_size", + "inputs": [], + "outputs": [ + { + "type": "core::option::Option::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "packed_size", + "inputs": [], + "outputs": [ + { + "type": "core::option::Option::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "layout", + "inputs": [], + "outputs": [ + { + "type": "dojo::model::layout::Layout" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "schema", + "inputs": [], + "outputs": [ + { + "type": "dojo::model::introspect::Ty" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "impl", + "name": "detail_earned_eventImpl", + "interface_name": "jokers_of_neon::models::data::events::Idetail_earned_event" + }, + { + "type": "struct", + "name": "jokers_of_neon::models::data::events::DetailEarnedEvent", + "members": [ + { + "name": "player", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "game_id", + "type": "core::integer::u32" + }, + { + "name": "round_defeat", + "type": "core::integer::u32" + }, + { + "name": "level_bonus", + "type": "core::integer::u32" + }, + { + "name": "hands_left", + "type": "core::integer::u32" + }, + { + "name": "hands_left_cash", + "type": "core::integer::u32" + }, + { + "name": "discard_left", + "type": "core::integer::u32" + }, + { + "name": "discard_left_cash", + "type": "core::integer::u32" + }, + { + "name": "rage_card_defeated", + "type": "core::integer::u32" + }, + { + "name": "rage_card_defeated_cash", + "type": "core::integer::u32" + }, + { + "name": "total", + "type": "core::integer::u32" + } + ] + }, + { + "type": "interface", + "name": "jokers_of_neon::models::data::events::Idetail_earned_event", + "items": [ + { + "type": "function", + "name": "ensure_abi", + "inputs": [ + { + "name": "model", + "type": "jokers_of_neon::models::data::events::DetailEarnedEvent" + } + ], + "outputs": [], + "state_mutability": "view" + } + ] + }, + { + "type": "event", + "name": "jokers_of_neon::models::data::events::detail_earned_event::Event", + "kind": "enum", + "variants": [] + } + ], + "tag": "jokers_of_neon-DetailEarnedEvent", + "qualified_path": "jokers_of_neon::models::data::events::detail_earned_event", + "manifest_name": "jokers_of_neon-DetailEarnedEvent-40f670e5" + }, + { + "kind": "DojoModel", + "members": [ + { + "name": "id", + "type": "u32", + "key": true + }, + { + "name": "owner", + "type": "ContractAddress", + "key": false + }, + { + "name": "player_name", + "type": "felt252", + "key": false + }, + { + "name": "max_hands", + "type": "u8", + "key": false + }, + { + "name": "max_discard", + "type": "u8", + "key": false + }, + { + "name": "max_jokers", + "type": "u8", + "key": false + }, + { + "name": "player_score", + "type": "u32", + "key": false + }, + { + "name": "level", + "type": "u32", + "key": false + }, + { + "name": "len_hand", + "type": "u32", + "key": false + }, + { + "name": "len_max_current_special_cards", + "type": "u32", + "key": false + }, + { + "name": "len_current_special_cards", + "type": "u32", + "key": false + }, + { + "name": "current_jokers", + "type": "u8", + "key": false + }, + { + "name": "state", + "type": "GameState", + "key": false + }, + { + "name": "substate", + "type": "GameSubState", + "key": false + }, + { + "name": "cash", + "type": "u32", + "key": false + } + ], + "class_hash": "0x2a0bf5c76a2a51057fa8cd30b669b8b2e9ac982f6a7c0d2aac0caf2e8b385a1", + "original_class_hash": "0x2a0bf5c76a2a51057fa8cd30b669b8b2e9ac982f6a7c0d2aac0caf2e8b385a1", + "abi": [ + { + "type": "impl", + "name": "DojoModelImpl", + "interface_name": "dojo::model::model::IModel" + }, + { + "type": "struct", + "name": "core::byte_array::ByteArray", + "members": [ + { + "name": "data", + "type": "core::array::Array::" + }, + { + "name": "pending_word", + "type": "core::felt252" + }, + { + "name": "pending_word_len", + "type": "core::integer::u32" + } + ] + }, + { + "type": "enum", + "name": "core::option::Option::", + "variants": [ + { + "name": "Some", + "type": "core::integer::u32" + }, + { + "name": "None", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "dojo::model::layout::FieldLayout", + "members": [ + { + "name": "selector", + "type": "core::felt252" + }, + { + "name": "layout", + "type": "dojo::model::layout::Layout" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "enum", + "name": "dojo::model::layout::Layout", + "variants": [ + { + "name": "Fixed", + "type": "core::array::Span::" + }, + { + "name": "Struct", + "type": "core::array::Span::" + }, + { + "name": "Tuple", + "type": "core::array::Span::" + }, + { + "name": "Array", + "type": "core::array::Span::" + }, + { + "name": "ByteArray", + "type": "()" + }, + { + "name": "Enum", + "type": "core::array::Span::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "dojo::model::introspect::Member", + "members": [ + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "ty", + "type": "dojo::model::introspect::Ty" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "dojo::model::introspect::Struct", + "members": [ + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "children", + "type": "core::array::Span::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" + } + ] + }, + { + "type": "struct", + "name": "dojo::model::introspect::Enum", + "members": [ + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "children", + "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "enum", + "name": "dojo::model::introspect::Ty", + "variants": [ + { + "name": "Primitive", + "type": "core::felt252" + }, + { + "name": "Struct", + "type": "dojo::model::introspect::Struct" + }, + { + "name": "Enum", + "type": "dojo::model::introspect::Enum" + }, + { + "name": "Tuple", + "type": "core::array::Span::" + }, + { + "name": "Array", + "type": "core::array::Span::" + }, + { + "name": "ByteArray", + "type": "()" + } + ] + }, + { + "type": "interface", + "name": "dojo::model::model::IModel", + "items": [ + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u8" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "name_hash", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_hash", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "unpacked_size", + "inputs": [], + "outputs": [ + { + "type": "core::option::Option::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "packed_size", + "inputs": [], + "outputs": [ + { + "type": "core::option::Option::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "layout", + "inputs": [], + "outputs": [ + { + "type": "dojo::model::layout::Layout" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "schema", + "inputs": [], + "outputs": [ + { + "type": "dojo::model::introspect::Ty" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "impl", + "name": "gameImpl", + "interface_name": "jokers_of_neon::models::status::game::game::Igame" + }, + { + "type": "enum", + "name": "jokers_of_neon::models::status::game::game::GameState", + "variants": [ + { + "name": "SELECT_DECK", + "type": "()" + }, + { + "name": "SELECT_SPECIAL_CARDS", + "type": "()" + }, + { + "name": "SELECT_MODIFIER_CARDS", + "type": "()" + }, + { + "name": "AT_SHOP", + "type": "()" + }, + { + "name": "IN_GAME", + "type": "()" + }, + { + "name": "FINISHED", + "type": "()" + }, + { + "name": "OPEN_BLISTER_PACK", + "type": "()" + } + ] + }, + { + "type": "enum", + "name": "jokers_of_neon::models::status::game::game::GameSubState", + "variants": [ + { + "name": "BEAST", + "type": "()" + }, + { + "name": "CREATE_LEVEL", + "type": "()" + }, + { + "name": "OBSTACLE", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "jokers_of_neon::models::status::game::game::Game", + "members": [ + { + "name": "id", + "type": "core::integer::u32" + }, + { + "name": "owner", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "player_name", + "type": "core::felt252" + }, + { + "name": "max_hands", + "type": "core::integer::u8" + }, + { + "name": "max_discard", + "type": "core::integer::u8" + }, + { + "name": "max_jokers", + "type": "core::integer::u8" + }, + { + "name": "player_score", + "type": "core::integer::u32" + }, + { + "name": "level", + "type": "core::integer::u32" + }, + { + "name": "len_hand", + "type": "core::integer::u32" + }, + { + "name": "len_max_current_special_cards", + "type": "core::integer::u32" + }, + { + "name": "len_current_special_cards", + "type": "core::integer::u32" + }, + { + "name": "current_jokers", + "type": "core::integer::u8" + }, + { + "name": "state", + "type": "jokers_of_neon::models::status::game::game::GameState" + }, + { + "name": "substate", + "type": "jokers_of_neon::models::status::game::game::GameSubState" + }, + { + "name": "cash", + "type": "core::integer::u32" + } + ] }, { - "name": "len_current_special_cards", - "type": "u32", - "key": false + "type": "interface", + "name": "jokers_of_neon::models::status::game::game::Igame", + "items": [ + { + "type": "function", + "name": "ensure_abi", + "inputs": [ + { + "name": "model", + "type": "jokers_of_neon::models::status::game::game::Game" + } + ], + "outputs": [], + "state_mutability": "view" + } + ] }, { - "name": "current_jokers", - "type": "u8", - "key": false - }, + "type": "event", + "name": "jokers_of_neon::models::status::game::game::game::Event", + "kind": "enum", + "variants": [] + } + ], + "tag": "jokers_of_neon-Game", + "qualified_path": "jokers_of_neon::models::status::game::game::game", + "manifest_name": "jokers_of_neon-Game-162de85b" + }, + { + "kind": "DojoModel", + "members": [ { - "name": "state", - "type": "GameState", - "key": false + "name": "game_id", + "type": "u32", + "key": true }, { - "name": "substate", - "type": "GameSubState", + "name": "len", + "type": "u32", "key": false }, { - "name": "cash", + "name": "round_len", "type": "u32", "key": false } ], - "class_hash": "0x55a1aee842d76a253cb36c4989bc5ef74d3cd7d2d8dd4c464c64295986afa10", - "original_class_hash": "0x55a1aee842d76a253cb36c4989bc5ef74d3cd7d2d8dd4c464c64295986afa10", + "class_hash": "0x165c5bd99b1100a2e1a2faaf9a2443d6ca12bc310e2ec39d1ac64eac3555f31", + "original_class_hash": "0x165c5bd99b1100a2e1a2faaf9a2443d6ca12bc310e2ec39d1ac64eac3555f31", "abi": [ { "type": "impl", @@ -9181,130 +11039,30 @@ }, { "type": "impl", - "name": "gameImpl", - "interface_name": "jokers_of_neon::models::status::game::game::Igame" - }, - { - "type": "enum", - "name": "jokers_of_neon::models::status::game::game::GameState", - "variants": [ - { - "name": "SELECT_DECK", - "type": "()" - }, - { - "name": "SELECT_SPECIAL_CARDS", - "type": "()" - }, - { - "name": "SELECT_MODIFIER_CARDS", - "type": "()" - }, - { - "name": "AT_SHOP", - "type": "()" - }, - { - "name": "IN_GAME", - "type": "()" - }, - { - "name": "FINISHED", - "type": "()" - }, - { - "name": "OPEN_BLISTER_PACK", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "jokers_of_neon::models::status::game::game::GameSubState", - "variants": [ - { - "name": "NONE", - "type": "()" - }, - { - "name": "OBSTACLE", - "type": "()" - }, - { - "name": "BEAST", - "type": "()" - } - ] + "name": "game_deckImpl", + "interface_name": "jokers_of_neon::models::data::game_deck::Igame_deck" }, { "type": "struct", - "name": "jokers_of_neon::models::status::game::game::Game", + "name": "jokers_of_neon::models::data::game_deck::GameDeck", "members": [ { - "name": "id", - "type": "core::integer::u32" - }, - { - "name": "owner", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_name", - "type": "core::felt252" - }, - { - "name": "max_hands", - "type": "core::integer::u8" - }, - { - "name": "max_discard", - "type": "core::integer::u8" - }, - { - "name": "max_jokers", - "type": "core::integer::u8" - }, - { - "name": "player_score", - "type": "core::integer::u32" - }, - { - "name": "level", - "type": "core::integer::u32" - }, - { - "name": "len_hand", - "type": "core::integer::u32" - }, - { - "name": "len_max_current_special_cards", + "name": "game_id", "type": "core::integer::u32" }, { - "name": "len_current_special_cards", + "name": "len", "type": "core::integer::u32" }, { - "name": "current_jokers", - "type": "core::integer::u8" - }, - { - "name": "state", - "type": "jokers_of_neon::models::status::game::game::GameState" - }, - { - "name": "substate", - "type": "jokers_of_neon::models::status::game::game::GameSubState" - }, - { - "name": "cash", + "name": "round_len", "type": "core::integer::u32" } ] }, { "type": "interface", - "name": "jokers_of_neon::models::status::game::game::Igame", + "name": "jokers_of_neon::models::data::game_deck::Igame_deck", "items": [ { "type": "function", @@ -9312,7 +11070,7 @@ "inputs": [ { "name": "model", - "type": "jokers_of_neon::models::status::game::game::Game" + "type": "jokers_of_neon::models::data::game_deck::GameDeck" } ], "outputs": [], @@ -9322,14 +11080,14 @@ }, { "type": "event", - "name": "jokers_of_neon::models::status::game::game::game::Event", + "name": "jokers_of_neon::models::data::game_deck::game_deck::Event", "kind": "enum", "variants": [] } ], - "tag": "jokers_of_neon-Game", - "qualified_path": "jokers_of_neon::models::status::game::game::game", - "manifest_name": "jokers_of_neon-Game-162de85b" + "tag": "jokers_of_neon-GameDeck", + "qualified_path": "jokers_of_neon::models::data::game_deck::game_deck", + "manifest_name": "jokers_of_neon-GameDeck-481bbebe" }, { "kind": "DojoModel", @@ -9340,18 +11098,23 @@ "key": true }, { - "name": "len", - "type": "u32", + "name": "cost_discard", + "type": "u8", "key": false }, { - "name": "round_len", - "type": "u32", + "name": "cost_play", + "type": "u8", + "key": false + }, + { + "name": "energy_max_player", + "type": "u8", "key": false } ], - "class_hash": "0x165c5bd99b1100a2e1a2faaf9a2443d6ca12bc310e2ec39d1ac64eac3555f31", - "original_class_hash": "0x165c5bd99b1100a2e1a2faaf9a2443d6ca12bc310e2ec39d1ac64eac3555f31", + "class_hash": "0x4c5166033b50fa2dcbe8dca20d4c219aaf3b4944657affccd16cb08405bf8b5", + "original_class_hash": "0x4c5166033b50fa2dcbe8dca20d4c219aaf3b4944657affccd16cb08405bf8b5", "abi": [ { "type": "impl", @@ -9717,30 +11480,34 @@ }, { "type": "impl", - "name": "game_deckImpl", - "interface_name": "jokers_of_neon::models::data::game_deck::Igame_deck" + "name": "game_mode_beastImpl", + "interface_name": "jokers_of_neon::models::data::beast::Igame_mode_beast" }, { "type": "struct", - "name": "jokers_of_neon::models::data::game_deck::GameDeck", + "name": "jokers_of_neon::models::data::beast::GameModeBeast", "members": [ { "name": "game_id", "type": "core::integer::u32" }, { - "name": "len", - "type": "core::integer::u32" + "name": "cost_discard", + "type": "core::integer::u8" }, { - "name": "round_len", - "type": "core::integer::u32" + "name": "cost_play", + "type": "core::integer::u8" + }, + { + "name": "energy_max_player", + "type": "core::integer::u8" } ] }, { "type": "interface", - "name": "jokers_of_neon::models::data::game_deck::Igame_deck", + "name": "jokers_of_neon::models::data::beast::Igame_mode_beast", "items": [ { "type": "function", @@ -9748,7 +11515,7 @@ "inputs": [ { "name": "model", - "type": "jokers_of_neon::models::data::game_deck::GameDeck" + "type": "jokers_of_neon::models::data::beast::GameModeBeast" } ], "outputs": [], @@ -9758,14 +11525,14 @@ }, { "type": "event", - "name": "jokers_of_neon::models::data::game_deck::game_deck::Event", + "name": "jokers_of_neon::models::data::beast::game_mode_beast::Event", "kind": "enum", "variants": [] } ], - "tag": "jokers_of_neon-GameDeck", - "qualified_path": "jokers_of_neon::models::data::game_deck::game_deck", - "manifest_name": "jokers_of_neon-GameDeck-481bbebe" + "tag": "jokers_of_neon-GameModeBeast", + "qualified_path": "jokers_of_neon::models::data::beast::game_mode_beast", + "manifest_name": "jokers_of_neon-GameModeBeast-2eece866" }, { "kind": "DojoModel", @@ -9776,23 +11543,18 @@ "key": true }, { - "name": "cost_discard", - "type": "u8", - "key": false - }, - { - "name": "cost_play", - "type": "u8", + "name": "current_probability", + "type": "u16", "key": false }, { - "name": "energy_max_player", + "name": "level", "type": "u8", "key": false } ], - "class_hash": "0x4c5166033b50fa2dcbe8dca20d4c219aaf3b4944657affccd16cb08405bf8b5", - "original_class_hash": "0x4c5166033b50fa2dcbe8dca20d4c219aaf3b4944657affccd16cb08405bf8b5", + "class_hash": "0x2cdd0f8efcd582eb49fd33a9bc2c466d96bda4d2b7739b48258842fdb18984d", + "original_class_hash": "0x2cdd0f8efcd582eb49fd33a9bc2c466d96bda4d2b7739b48258842fdb18984d", "abi": [ { "type": "impl", @@ -10158,34 +11920,30 @@ }, { "type": "impl", - "name": "game_mode_beastImpl", - "interface_name": "jokers_of_neon::models::data::beast::Igame_mode_beast" + "name": "last_beast_levelImpl", + "interface_name": "jokers_of_neon::models::data::last_beast_level::Ilast_beast_level" }, { "type": "struct", - "name": "jokers_of_neon::models::data::beast::GameModeBeast", + "name": "jokers_of_neon::models::data::last_beast_level::LastBeastLevel", "members": [ { "name": "game_id", "type": "core::integer::u32" }, { - "name": "cost_discard", - "type": "core::integer::u8" - }, - { - "name": "cost_play", - "type": "core::integer::u8" + "name": "current_probability", + "type": "core::integer::u16" }, { - "name": "energy_max_player", + "name": "level", "type": "core::integer::u8" } ] }, { "type": "interface", - "name": "jokers_of_neon::models::data::beast::Igame_mode_beast", + "name": "jokers_of_neon::models::data::last_beast_level::Ilast_beast_level", "items": [ { "type": "function", @@ -10193,7 +11951,7 @@ "inputs": [ { "name": "model", - "type": "jokers_of_neon::models::data::beast::GameModeBeast" + "type": "jokers_of_neon::models::data::last_beast_level::LastBeastLevel" } ], "outputs": [], @@ -10203,14 +11961,14 @@ }, { "type": "event", - "name": "jokers_of_neon::models::data::beast::game_mode_beast::Event", + "name": "jokers_of_neon::models::data::last_beast_level::last_beast_level::Event", "kind": "enum", "variants": [] } ], - "tag": "jokers_of_neon-GameModeBeast", - "qualified_path": "jokers_of_neon::models::data::beast::game_mode_beast", - "manifest_name": "jokers_of_neon-GameModeBeast-2eece866" + "tag": "jokers_of_neon-LastBeastLevel", + "qualified_path": "jokers_of_neon::models::data::last_beast_level::last_beast_level", + "manifest_name": "jokers_of_neon-LastBeastLevel-ce77bf82" }, { "kind": "DojoModel", diff --git a/manifests/dev/deployment/manifest.toml b/manifests/dev/deployment/manifest.toml index 304cef1..f9042ed 100644 --- a/manifests/dev/deployment/manifest.toml +++ b/manifests/dev/deployment/manifest.toml @@ -24,8 +24,8 @@ manifest_name = "dojo-base" [[contracts]] kind = "DojoContract" address = "0x6a41badee85305fa1aac33488860360c66b60d7f3b204d6e2cd84071dc3c394" -class_hash = "0x42e0a9b814ff24e92f45d9dd6e764ec9fc948c70b49242249b2cb7d97d62071" -original_class_hash = "0x42e0a9b814ff24e92f45d9dd6e764ec9fc948c70b49242249b2cb7d97d62071" +class_hash = "0x3a4aafb2e4f059bf801527b62432f2671368d33ae29c33b737f3c145e832229" +original_class_hash = "0x3a4aafb2e4f059bf801527b62432f2671368d33ae29c33b737f3c145e832229" base_class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" abi = "manifests/dev/deployment/abis/contracts/jokers_of_neon-game_system-7a205bbc.json" reads = [] @@ -33,12 +33,13 @@ writes = ["ns:jokers_of_neon"] init_calldata = [] tag = "jokers_of_neon-game_system" systems = [ - "select_deck", - "select_special_cards", - "select_modifier_cards", + "create_level", "play", "discard", "end_turn", + "select_deck", + "select_special_cards", + "select_modifier_cards", "discard_effect_card", "discard_special_card", ] @@ -368,6 +369,73 @@ name = "points" type = "u32" key = false +[[models]] +kind = "DojoModel" +class_hash = "0x366273a4ee649b33c07c7584bba0132ac37cc86f52ba525e4ced46a49b960f4" +original_class_hash = "0x366273a4ee649b33c07c7584bba0132ac37cc86f52ba525e4ced46a49b960f4" +abi = "manifests/dev/deployment/abis/models/jokers_of_neon-Challenge-61873cc7.json" +tag = "jokers_of_neon-Challenge" +qualified_path = "jokers_of_neon::models::data::challenge::challenge" +manifest_name = "jokers_of_neon-Challenge-61873cc7" + +[[models.members]] +name = "game_id" +type = "u32" +key = true + +[[models.members]] +name = "active_ids" +type = "Span" +key = false + +[[models]] +kind = "DojoModel" +class_hash = "0x21c6b6495f7bb89f6e79396f221ce4a47c8eab4f678e55d51248219648a003c" +original_class_hash = "0x21c6b6495f7bb89f6e79396f221ce4a47c8eab4f678e55d51248219648a003c" +abi = "manifests/dev/deployment/abis/models/jokers_of_neon-ChallengeCompleted-510bb1ff.json" +tag = "jokers_of_neon-ChallengeCompleted" +qualified_path = "jokers_of_neon::models::data::events::challenge_completed" +manifest_name = "jokers_of_neon-ChallengeCompleted-510bb1ff" + +[[models.members]] +name = "player" +type = "ContractAddress" +key = true + +[[models.members]] +name = "player_name" +type = "felt252" +key = false + +[[models.members]] +name = "game_id" +type = "u32" +key = false + +[[models]] +kind = "DojoModel" +class_hash = "0x60b252cd03fc19cedc1fb08e6295aa77daa96bf9d2ddb405282359f11bee54d" +original_class_hash = "0x60b252cd03fc19cedc1fb08e6295aa77daa96bf9d2ddb405282359f11bee54d" +abi = "manifests/dev/deployment/abis/models/jokers_of_neon-ChallengePlayer-7d4feee6.json" +tag = "jokers_of_neon-ChallengePlayer" +qualified_path = "jokers_of_neon::models::data::challenge::challenge_player" +manifest_name = "jokers_of_neon-ChallengePlayer-7d4feee6" + +[[models.members]] +name = "game_id" +type = "u32" +key = true + +[[models.members]] +name = "discards" +type = "u8" +key = false + +[[models.members]] +name = "plays" +type = "u8" +key = false + [[models]] kind = "DojoModel" class_hash = "0x101deece771f5cbf115831a78e13c3e68fcf8a6220ea0f86b9177799a610dd1" @@ -535,8 +603,8 @@ key = false [[models]] kind = "DojoModel" -class_hash = "0x55a1aee842d76a253cb36c4989bc5ef74d3cd7d2d8dd4c464c64295986afa10" -original_class_hash = "0x55a1aee842d76a253cb36c4989bc5ef74d3cd7d2d8dd4c464c64295986afa10" +class_hash = "0x2a0bf5c76a2a51057fa8cd30b669b8b2e9ac982f6a7c0d2aac0caf2e8b385a1" +original_class_hash = "0x2a0bf5c76a2a51057fa8cd30b669b8b2e9ac982f6a7c0d2aac0caf2e8b385a1" abi = "manifests/dev/deployment/abis/models/jokers_of_neon-Game-162de85b.json" tag = "jokers_of_neon-Game" qualified_path = "jokers_of_neon::models::status::game::game::game" @@ -670,6 +738,30 @@ name = "energy_max_player" type = "u8" key = false +[[models]] +kind = "DojoModel" +class_hash = "0x2cdd0f8efcd582eb49fd33a9bc2c466d96bda4d2b7739b48258842fdb18984d" +original_class_hash = "0x2cdd0f8efcd582eb49fd33a9bc2c466d96bda4d2b7739b48258842fdb18984d" +abi = "manifests/dev/deployment/abis/models/jokers_of_neon-LastBeastLevel-ce77bf82.json" +tag = "jokers_of_neon-LastBeastLevel" +qualified_path = "jokers_of_neon::models::data::last_beast_level::last_beast_level" +manifest_name = "jokers_of_neon-LastBeastLevel-ce77bf82" + +[[models.members]] +name = "game_id" +type = "u32" +key = true + +[[models.members]] +name = "current_probability" +type = "u16" +key = false + +[[models.members]] +name = "level" +type = "u8" +key = false + [[models]] kind = "DojoModel" class_hash = "0x42cf1e65c45e0ef0b7c53dce92420243d76e261a51da744de4b1edb51937625" diff --git a/scripts/enviroment.sh b/scripts/enviroment.sh index 433bc4c..b3dd27a 100755 --- a/scripts/enviroment.sh +++ b/scripts/enviroment.sh @@ -21,3 +21,4 @@ echo -e "\n[INFO] Modifier cards selected successfully. Setup complete!" # sozo execute game_system play -c 1,5,0,1,2,3,4,5,100,100,100,100,100 --wait --world 0x37578f01e123327fb366fc6e2224f4be4e44234d682855e1326363b57444b88 # sozo execute game_system end_turn -c 1 --wait --world 0x37578f01e123327fb366fc6e2224f4be4e44234d682855e1326363b57444b88 +# sozo execute game_system create_level -c 1 --wait --world 0x37578f01e123327fb366fc6e2224f4be4e44234d682855e1326363b57444b88 diff --git a/src/models/data/beast.cairo b/src/models/data/beast.cairo index b0e47d7..9c8c6fa 100644 --- a/src/models/data/beast.cairo +++ b/src/models/data/beast.cairo @@ -9,6 +9,7 @@ struct GameModeBeast { } #[derive(Copy, Drop, IntrospectPacked, Serde)] +#[dojo::event] #[dojo::model] struct Beast { #[key] diff --git a/src/models/data/challenge.cairo b/src/models/data/challenge.cairo index fe7648b..3de614d 100644 --- a/src/models/data/challenge.cairo +++ b/src/models/data/challenge.cairo @@ -1,4 +1,5 @@ #[derive(Copy, Drop, Serde)] +#[dojo::event] #[dojo::model] struct Challenge { #[key] diff --git a/src/models/status/round/beast.cairo b/src/models/status/round/beast.cairo index 228fc21..17c06ab 100644 --- a/src/models/status/round/beast.cairo +++ b/src/models/status/round/beast.cairo @@ -51,6 +51,7 @@ impl BeastImpl of BeastTrait { let beast = Beast { game_id, tier: 5, level: 5, health: 300, attack: 15 }; BeastStore::set(@beast, world); + emit!(world, (beast)); let player_beast = PlayerBeast { game_id, health: 100, energy: game_mode_beast.energy_max_player }; PlayerBeastStore::set(@player_beast, world); diff --git a/src/models/status/round/challenge.cairo b/src/models/status/round/challenge.cairo index 8ca086b..83624fd 100644 --- a/src/models/status/round/challenge.cairo +++ b/src/models/status/round/challenge.cairo @@ -42,6 +42,7 @@ impl ChallengeImpl of ChallengeTrait { let mut challenge = ChallengeStore::get(world, game_id); challenge.active_ids = generate_unique_random_values(world, 3, challenges_all(), array![]).span(); ChallengeStore::set(@challenge, world); + emit!(world, (challenge)); } fn play(world: IWorldDispatcher, game_id: u32, cards_index: Array, modifiers_index: Array) { diff --git a/src/systems/game_system.cairo b/src/systems/game_system.cairo index b7b3d18..2cc3416 100644 --- a/src/systems/game_system.cairo +++ b/src/systems/game_system.cairo @@ -239,8 +239,6 @@ mod game_system { game.state = GameState::IN_GAME; store.set_game(game); - - create_level(world, ref store, game); } fn discard_effect_card(ref world: IWorldDispatcher, game_id: u32, card_index: u32) {