Skip to content

Commit

Permalink
assert adventurer entropy is set for upgrade and explore
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed May 22, 2024
1 parent dedbc7c commit e1126df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contracts/game/src/lib.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ mod Game {
_assert_not_dead(immutable_adventurer);
_assert_no_stat_upgrades_available(immutable_adventurer);
_assert_not_in_battle(immutable_adventurer);
_assert_entropy_set(@self, adventurer_id);

// go explore
_explore(ref self, ref adventurer, adventurer_id, adventurer_entropy, till_beast);
Expand Down Expand Up @@ -383,6 +384,7 @@ mod Game {
_assert_in_battle(immutable_adventurer);
_assert_not_starter_beast(immutable_adventurer);
_assert_dexterity_not_zero(immutable_adventurer);
_assert_entropy_set(@self, adventurer_id);

// get beast and beast seed
let (beast, beast_seed) = adventurer.get_beast(adventurer_entropy);
Expand Down Expand Up @@ -524,6 +526,7 @@ mod Game {
_assert_not_dead(immutable_adventurer);
_assert_not_in_battle(immutable_adventurer);
_assert_valid_stat_selection(immutable_adventurer, stat_upgrades);
_assert_entropy_set(@self, adventurer_id);

// get number of stat upgrades available before we use them
let pre_upgrade_stat_points = adventurer.stat_points_available;
Expand Down

0 comments on commit e1126df

Please sign in to comment.