Complicated Shop system in Sugarcube.
Okay, so i am working on an school project and i want to impress my friends. The challenge is to, simply, make a game.
Now, i have some experience in sugarcube and know how i am going to do this, i just need help with the code.
What is am planning on is:
An "inventory", which is an array of items to which i add things if you buy them;
A randomizer thing, which takes a percentage and then about takes that amount of items from your item list.
An filter/function thing, which checks the random items taken out of the inventory, then transtales it's name into a value (Ex. Banana -> 3, Apple -> 2,5 etc...)
after that, a thing that takes the items, and adds them to each other, so you get profit
and last but not least, a simple set function: set $Money == $Money + $Profit.
oh and i could do with an shop interface