Skip to content

Commit

Permalink
adjust beast and obstacle health and leveling scheme (#36)
Browse files Browse the repository at this point in the history
- increases max beast and obstacle level from `2*adventurer_level` to `3*adventurer_level`
- increases max beast health from `15*adventurer_level` to `20*adventurer_level`
  • Loading branch information
loothero authored Jun 25, 2024
1 parent d78d5d9 commit c0cfd34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/combat/src/combat.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ impl ImplCombat of ICombat {
/// @return The calculated random level.
fn get_random_level(adventurer_level: u8, entropy: u128) -> u16 {
// Calculate the base random level using entropy and the adventurer's level
let level = 1 + (entropy % (adventurer_level.into() * 2)).try_into().unwrap();
let level = 1 + (entropy % (adventurer_level.into() * 3)).try_into().unwrap();

// Adjust the level upward based on the adventurer's current level
if (adventurer_level >= 50) {
Expand All @@ -377,7 +377,7 @@ impl ImplCombat of ICombat {
/// @return The calculated starting health for the enemy.
fn get_enemy_starting_health(adventurer_level: u8, entropy: u128) -> u16 {
// Calculate the base enemy health using entropy and the adventurer's level
let health = 1 + (entropy % (adventurer_level.into() * 15)).try_into().unwrap();
let health = 1 + (entropy % (adventurer_level.into() * 20)).try_into().unwrap();

// Adjust the enemy's health upward based on the adventurer's current level
if (adventurer_level >= 50) {
Expand Down

0 comments on commit c0cfd34

Please sign in to comment.