Jump to content

Perfect Experiments


Czar

Recommended Posts

Well not all potions give the same amount of boost. Maybe it should be a more conditional number. Such as, amount of boost the potion gives divided by 2, then take the ceiling of that. Then you could have it randomly + or - 1 from that number as an anti-ban feature.

 

Pseudocode:

int drinkPotion
int boostOfPotion

drinkPotion = ceiling(boostOfPotion/2)


int antiBanPotionDrink = genRandNum1-3()

if genRandNum1-3() == 1 then
  
  drinkPotion += drinkPotion + 0

else if genRandNum1-3() == 2 then

  drinkPotion += drinkPotion + 1

else if genRandNum1-3() == 3 then

  drinkPotion += drinkPotion - 1

end

Hope this makes sense. Just wanted to be extra clear.

Edited by borat23
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...