Skip to content

Commit

Permalink
initialize reward
Browse files Browse the repository at this point in the history
  • Loading branch information
dubzn committed Nov 2, 2024
1 parent a35a541 commit fbb3a6d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/systems/game_system.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ mod game_system {
use dojo::world::Resource::Contract;
use jokers_of_neon::constants::card::{JOKER_CARD, NEON_JOKER_CARD, INVALID_CARD};
use jokers_of_neon::constants::packs::{SPECIAL_CARDS_PACK_ID, MODIFIER_CARDS_PACK_ID, REWARD_CARDS_PACK_ID};
use jokers_of_neon::constants::reward::{REWARD_HP_POTION, REWARD_BLISTER_PACK, REWARD_SPECIAL_CARDS};
use jokers_of_neon::constants::specials::{
SPECIAL_MULTI_FOR_HEART_ID, SPECIAL_MULTI_FOR_CLUB_ID, SPECIAL_MULTI_FOR_DIAMOND_ID, SPECIAL_MULTI_FOR_SPADE_ID,
SPECIAL_INCREASE_LEVEL_PAIR_ID, SPECIAL_INCREASE_LEVEL_DOUBLE_PAIR_ID, SPECIAL_INCREASE_LEVEL_STRAIGHT_ID,
Expand Down Expand Up @@ -124,6 +125,13 @@ mod game_system {
world
);

RewardStore::set(
@Reward {
game_id, rewards_ids: array![REWARD_HP_POTION, REWARD_BLISTER_PACK, REWARD_SPECIAL_CARDS].span()
},
world
);

let create_game_event = CreateGameEvent { player: get_caller_address(), game_id };
emit!(world, (create_game_event));
game_id
Expand Down

0 comments on commit fbb3a6d

Please sign in to comment.