Skip to content

Commit

Permalink
fix: % (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
notV4l authored Sep 22, 2023
1 parent 2d2ccfa commit 41fd454
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/constants.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ const PRICE_VAR_MIN: u8 = 1; // 1%
const PRICE_VAR_MAX: u8 = 5; // 5%

// market price events
const MARKET_EVENT_CHANCE: u32 = 5; // on 1000 : 1% = 0.5% up / 0.5% down
const MARKET_EVENT_MIN: u8 = 50; // 50%
const MARKET_EVENT_MAX: u8 = 100; // 100%
const MARKET_EVENT_CHANCE: u32 = 7; // on 1000 : 1.4% = 0.7% up / 0.7% down
const MARKET_EVENT_MIN: u8 = 50; // up 50% | down 25%
const MARKET_EVENT_MAX: u8 = 100; // up 100% | down 50%
2 changes: 1 addition & 1 deletion src/systems/travel.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ fn price_variation_with_drug(
let target_price = if increase {
market_price * (100 + percent) / 100
} else {
market_price * (100 - percent) / 100
market_price * (100 - (percent/2)) / 100
};

let target_qty = market.cash / target_price;
Expand Down

1 comment on commit 41fd454

@vercel
Copy link

@vercel vercel bot commented on 41fd454 Sep 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

rollyourown – ./

rollyourown-git-main.preview.cartridge.gg
rollyourown.preview.cartridge.gg

Please sign in to comment.