Skip to content

Commit 354d27e

Browse files
committed
🐛 Fix card issue
1 parent 107fe56 commit 354d27e

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

src/systems/play.cairo

+2-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ mod play {
191191
let defender_player = store.player(game, defender.owner.try_into().unwrap());
192192
let order = get_tx_info().unbox().transaction_hash;
193193
let mut battles: Array<Battle> = array![];
194-
player.conqueror = defender.defend(ref attacker, game.seed, order, ref battles);
194+
let status = defender.defend(ref attacker, game.seed, order, ref battles);
195+
player.conqueror = player.conqueror || status;
195196

196197
// [Effect] Update tiles
197198
store.set_tiles(array![attacker, defender].span());

target/dev/manifest.json

+20-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"world": {
33
"name": "dojo::world::world",
4-
"address": "0x4daffaec6ca974909b68f7868dd33a99151e11217751b27fef94753db48e9ec",
4+
"address": "0x3a0e782a770361f8119970bfc1cdd7cd91a387a918a537d2808329b8e85e929",
55
"class_hash": "0x5ac623f0c96059936bd2d0904bdd31799e430fe08a0caff7a5f497260b16497",
66
"abi": [
77
{
@@ -948,8 +948,8 @@
948948
"contracts": [
949949
{
950950
"name": "zconqueror::systems::host::host",
951-
"address": "0x42ba8cd5a81edc1eabc83a50dd2f0e3671ce431b24aa9affec196ed18cf6b5b",
952-
"class_hash": "0xf00d6815203344af664ee628d19460f0f44b521ad60abbded927615be3ca9",
951+
"address": "0x55bac3cb43efa8a014bed327fdf470f528374f1e2208663bae331dbc2658da3",
952+
"class_hash": "0x5460e2297d93aa007a46315c843aaede5b32f16acea25427af848e920ce7f1d",
953953
"abi": [
954954
{
955955
"type": "impl",
@@ -1151,8 +1151,8 @@
11511151
},
11521152
{
11531153
"name": "zconqueror::systems::play::play",
1154-
"address": "0x257da84810b6e148a0a5a8e0fb0d92a2a76a6d78d6d2d3b2e8e31d084c6b131",
1155-
"class_hash": "0x2954728248842ba40ae8d5b39c7b0b47bb69b610c489793d6ea98dabf6ad687",
1154+
"address": "0x127f3efb89714e50194dab6d7a5875eb63ebee78e04adf36584b8748bf14ac7",
1155+
"class_hash": "0x22b0d82b6cb70bbe61e21a5f560deb92b6cd7a0cdd84d6270ecdd07fda7c1c7",
11561156
"abi": [
11571157
{
11581158
"type": "impl",
@@ -1480,6 +1480,11 @@
14801480
"type": "core::integer::u32",
14811481
"kind": "key"
14821482
},
1483+
{
1484+
"name": "tx_hash",
1485+
"type": "core::felt252",
1486+
"kind": "key"
1487+
},
14831488
{
14841489
"name": "duel_id",
14851490
"type": "core::integer::u32",
@@ -1495,6 +1500,16 @@
14951500
"type": "core::integer::u32",
14961501
"kind": "data"
14971502
},
1503+
{
1504+
"name": "attacker_troops",
1505+
"type": "core::integer::u32",
1506+
"kind": "data"
1507+
},
1508+
{
1509+
"name": "defender_troops",
1510+
"type": "core::integer::u32",
1511+
"kind": "data"
1512+
},
14981513
{
14991514
"name": "attacker_value",
15001515
"type": "core::integer::u8",

target/prod/manifest.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"world": {
33
"name": "dojo::world::world",
4-
"address": "0x58627196c0e5308d885e1cad6764cac2c9c9c4754703b0e453d5c64fdca026c",
4+
"address": "0x30d0d11a343c0f4dcb1e6fab13e120925805aa923c809a3bdedd05c34c89e15",
55
"class_hash": "0x5ac623f0c96059936bd2d0904bdd31799e430fe08a0caff7a5f497260b16497",
66
"abi": [
77
{
@@ -948,7 +948,7 @@
948948
"contracts": [
949949
{
950950
"name": "zconqueror::systems::host::host",
951-
"address": "0x357c8739a9739866ffa07f3248c61e26fe71567ad74771d50a24810db083d88",
951+
"address": "0x443a97040138cff71784bd59f557bf4b935a66a0019aeac48307d0f1e08ccf1",
952952
"class_hash": "0x5460e2297d93aa007a46315c843aaede5b32f16acea25427af848e920ce7f1d",
953953
"abi": [
954954
{
@@ -1151,7 +1151,7 @@
11511151
},
11521152
{
11531153
"name": "zconqueror::systems::play::play",
1154-
"address": "0x37673caa669ad15a305d3ac0733c9ba0b8852c098605e58c1401abe801ca8ea",
1154+
"address": "0x22abfa9b61b66135c94051099ba458d485ea3ebc9a619374e052f4048e17698",
11551155
"class_hash": "0x7d953b4e77534f17f50ace1026b498463bb93b8113ef72a93170b6a54ba06f6",
11561156
"abi": [
11571157
{

0 commit comments

Comments
 (0)