This is a game about being a witch and setting up your own business! { (display: "Start variables") (link: 'Play')[(goto: 'Boutique ๐Ÿ›Ž๏ธ')] }{ |timeofday>[(display: "Time_system")] |intro>[] (if: $gameState is 0)[(replace: ?intro)[๐Ÿง™๐Ÿปโ€โ™€๏ธ You just started renting your own little space. This is your boutique where you will welcome your customers!]] (else: )[Back to the boutique, much to do...]} (display: "Moving System") |placetitle>[The Boutique ๐Ÿ›Ž๏ธ] What can you do? | { |leisurychoices>[(link: "Sleep until morning, " + (str: $businessHours's 1st) + "h")[ <!-- Old --> (set: $fastForwardTomorrow to 60 - $minTime + ((24 - $hoursTime + 7)*60)) (set: $currentTime to it + $fastForwardTomorrow) (rerun: ?timeofday, ?leisurychoices) <!-- New! Reloading Delivery List --> (set: $customerName to $customerNameOrigin) (set: $receiverName to $receiverNameOrigin) (rerun: ?deliverylist) <!-- Old --> (show: ?deliveryservicecontent) (hide: ?closingtime) <!-- New! Applying cost of living per day and refresh building module --> (set: $money to it - $costOfLivingPerDay) (rerun: ?money) <!-- Advancing current building places --> (if: $placesAvailable's 1st's 2nd is "true")[(set: $buildingTimeLibrary to it + $fastForwardTomorrow)] (if: $placesAvailable's 2nd's 2nd is "true")[(set: $buildingTimeLaboratory to it + $fastForwardTomorrow)] (if: $placesAvailable's 3rd's 2nd is "true")[(set: $buildingTimeGarden to it + $fastForwardTomorrow)] (if: $placesAvailable's 4th's 2nd is "true")[(set: $buildingTimeDivinationRoom to it + $fastForwardTomorrow)] (if: $placesAvailable's 5th's 2nd is "true")[(set: $buildingTimeSpellCastingRoom to it + $fastForwardTomorrow)] (if: $placesAvailable's 6th's 2nd is "true")[(set: $buildingTimeObservatory to it + $fastForwardTomorrow)] (rerun: ?buildingmodulecontent) <!-- Updating reading flying books --> (rerun: ?flyingbookscontent) ] ]} <div class="activity">|buildingmodule>[|activitytitle>[๐Ÿšง Expanding your practice] { (set: _isShown to "-") (link-repeat: "โ†“")[ (if: _isShown is "-")[(hide: ?buildingmodulecontent) (set: _isShown to "+")] (else-if: _isShown is "+")[(show: ?buildingmodulecontent) (set: _isShown to "-")(rerun: ?buildingmodulecontent) ] ] } |buildingmodulecontent>[ (display: "Building Module System") ]] </div> <div class="activity">|deliveryservice>[|activitytitle>[๐Ÿงน Delivery service] { (set: _isShown to "-") (link-repeat: "โ†“")[ (if: $hoursTime is < $businessHours's 1st or is > ($businessHours's 2nd - 1))[] (else: )[ (if: _isShown is "-")[(hide: ?deliveryservicecontent) (set: _isShown to "+")] (else-if: _isShown is "+")[(show: ?deliveryservicecontent) (set: _isShown to "-")] ] ] } |deliveryservicecontent>[(display: "Delivery_system")]|closingtime)[Closing time!]]{ <!-- Applying Business hours to delivery --> ($applyingBHToDelivery:)} </div>{(set: $moneyspent to 5) |burn>[You could... burn $moneyspent $currency ? (link: "Burn it!")[ (if: $money > 0)[(rerun: ?burn) (set: $money to $money - $moneyspent)] (else: )[(replace: ?burn)[Oh no! you burnt all your $currency !]] (rerun: ?money) ]]} (print: $currentDayTime + ", " + (str:$currentTime) + " o\'clock"){ <!-- Completion time in minutes --> (set: $TpackageSize to (a: (floor: 5*$flyingSpeed), (floor: 10*$flyingSpeed), (floor: 20*$flyingSpeed)) ) (set: $Tdestination to (a: (floor: 5*$flyingSpeed), (floor: 10*$flyingSpeed), (floor: 30*$flyingSpeed), (floor: 60*$flyingSpeed)) ) <!-- Setting up packages --> (set: $packageSize to (a: (a: "small", 5, $TpackageSize's 1st), (a: "medium-sized", 10, $TpackageSize's 2nd), (a: "big", 20, $TpackageSize's 3rd) )) (set: $destination to (a: (a: "north of the city", 2, $Tdestination's 2nd), (a: "south of the city", 3, $Tdestination's 3rd), (a: "near the port", 1, $Tdestination's 1st), (a: "east of the city", 4, $Tdestination's 4th), (a: "west of the city", 4, $Tdestination's 4th), (a: "near the central trainstation", 2, $Tdestination's 2nd) )) <!-- Setting up an original copy of customers and receivers to reload --> (set: $customerNameOrigin to (a: "Miss Marple", "Mr Baning", "Dr Strange", "Madame de Pompadour", "Her Royal Highness Queen Maryam", "Dr Who", "Miss Adams", "Mr Toodles", "Lord Grey", "Dr Jekyll", "Mr Poirot", "Miss Airheart", "Mrs Cook", "Mr Van Dyke", "Miss Okono", "Mistress Anne")) (set: $receiverNameOrigin to (a: "Ms Dustwood", "Mr Gloomy", "Nurse Ratchet", "Mr Hood", "Lady Arwen", "Mrs Toodles", "Mrs Bloom", "Madame de Maintenon", "Mr Bloom", "Mr Sweet", "Dr Acula", "Mrs Van Horn", "Mr Fuller", "Mrs Karloff", "Mr Hide", "Baron WirmWood")) <!-- Setting up customers and receivers --> (set: $customerName to $customerNameOrigin) (set: $receiverName to $receiverNameOrigin) <!-- Applying Business hours to delivery Macro --> (set: $applyingBHToDelivery to (macro: [(output: )[{ (if: $hoursTime is < $businessHours's 1st or is > ($businessHours's 2nd - 1))[ (set: $customerName to $customerNameOrigin) (set: $receiverName to $receiverNameOrigin) (rerun: ?deliverylist) (hide: ?deliveryservicecontent) (show: ?closingtime, ?leisurychoices) ] }] ])) <!-- Delivery list construct : _itemRange ne doit pas dรฉpasser la moitiรฉ des listes de customers/receivers origin ! --> (set: $deliveryList to (macro: [(output: )[(set: _itemRange to (random: 4,8)) (for: each _i, ...(repeated: _itemRange, 1))[(display: "Delivery_item") (print: " ")]]])) Today's delivery list:} |deliverylist>[($deliveryList:)]{ (set: _tempValue to (random: 1, 100000)) (set: _tempDeliveryName to (str: _tempValue)) (hook: _tempDeliveryName)[ (set: $randomPackageSize to (either: ...$packageSize)) (set: _finalPackageSize to $randomPackageSize's 1st) (set: _finalPackageSizePrice to $randomPackageSize's 2nd) (set: _finalPackageSizeTime to $randomPackageSize's 3rd) (set: $randomDestination to (either: ...$destination)) (set: _finalDestination to $randomDestination's 1st) (set: _finalDestinationPrice to $randomDestination's 2nd) (set: _finalDestinationTime to $randomDestination's 3rd) (set: _finalPackagePrice to _finalPackageSizePrice + _finalDestinationPrice) (set: _Tpackage to _finalPackageSizeTime + _finalDestinationTime) <!-- Formatting the time (in minutes and hours) --> (set: _Tmin to _Tpackage % 60) (set: _Thour to ((_Tpackage - _Tmin)/60)%24) (set: _TpadMin to "0") (set: _Tformatted to "0") <!-- Padding the minutes --> (if: _Tmin is <= 9 and _Thour is < 1)[(set: _TpadMin to (str: _Tmin)) (set: _Tformatted to _TpadMin + "min " + " โณ")] (else-if: _Tmin is <= 9 and _Thour >= 1)[(set: _TpadMin to "0" + (str: _Tmin)) (set: _Tformatted to (str: _Thour) + "h" + _TpadMin + "min " + " โณ")] (else-if: _Tmin is >= 10 and _Thour is < 1)[(set: _TpadMin to (str: _Tmin)) (set: _Tformatted to _TpadMin + "min " + " โณ")] (else-if: _Tmin is >= 10 and _Thour >= 1)[(set: _TpadMin to (str: _Tmin)) (set: _Tformatted to (str: _Thour) + "h" + _TpadMin + "min " + " โณ")] (else-if: _Tmin is >= 60)[(set: _TpadMin to (str: _Tmin)) (set: _Tformatted to (str: _Thour) + "h" + _TpadMin + "min " + " โณ")] <!-- End of Formatting the time (in minutes and hours) --> (set: _randomCustomerName to (either: ...$customerName)) (set: $customerName to it - (a: _randomCustomerName)) (set: _randomReceiverName to (either: ...$receiverName)) (set: $receiverName to it - (a: _randomReceiverName)) - A _finalPackageSize package from _randomCustomerName to _randomReceiverName, _finalDestination | |income>[income: _finalPackagePrice $currency,] |timeneeded>[time needed: _Tformatted] (link: "Accept")[ <!-- Hiding the hook --> (hide:(hooks-named: _tempDeliveryName)) (set: $money to it + _finalPackagePrice) (rerun: ?money) (set: $currentTime to it + _Tpackage) <!-- (rerun: ?settingClock) --> <!-- Advancing current building places --> (if: $placesAvailable's 1st's 2nd is "true")[(set: $buildingTimeLibrary to it + _Tpackage)] (if: $placesAvailable's 2nd's 2nd is "true")[(set: $buildingTimeLaboratory to it + _Tpackage)] (if: $placesAvailable's 3rd's 2nd is "true")[(set: $buildingTimeGarden to it + _Tpackage)] (if: $placesAvailable's 4th's 2nd is "true")[(set: $buildingTimeDivinationRoom to it + _Tpackage)] (if: $placesAvailable's 5th's 2nd is "true")[(set: $buildingTimeSpellCastingRoom to it + _Tpackage)] (if: $placesAvailable's 6th's 2nd is "true")[(set: $buildingTimeObservatory to it + _Tpackage)] (rerun: ?buildingmodulecontent) <!-- END of Advancing current building places --> (rerun: ?timeofday) <!-- Applying Business hours to delivery --> ($applyingBHToDelivery:) ] ] }{ <!-- Main variables --> (set: $minTime to $currentTime % 60) (set: $hoursTime to (($currentTime - $minTime)/60)%24) (set: $daysTime to (floor: (($currentTime - $hoursTime)/(24*60))%30 + 1)) (set: $monthsTime to (floor: (($currentTime - $daysTime)/(30*24*60))%12 + 1)) (set: $yearsTime to (floor: ($currentTime/(12*30*24*60)) + 1)) <!-- Time of the day System --> (set: $timeOfDay to (a: "morning ๐ŸŒ…", "noon โ˜€๏ธ", "afternoon โ˜€๏ธ", "evening ๐ŸŒ›", "night ๐ŸŒ›")) (if: $hoursTime is <= 11)[ (set: $currentDayTime to $timeOfDay's 1st) ] (else-if: $hoursTime is >= 12 and <13)[ (set: $currentDayTime to $timeOfDay's 2nd) ] (else-if: $hoursTime is >= 13 and < 18)[ (set: $currentDayTime to $timeOfDay's 3rd) ] (else-if: $hoursTime is >= 18 and < 21)[ (set: $currentDayTime to $timeOfDay's 4th) ] (else-if: $hoursTime is >= 21 and < 24)[ (set: $currentDayTime to $timeOfDay's 5th) ] (else-if: $hoursTime is 24)[ (set: $currentDayTime to $timeOfDay's 1st) ] <!-- Months System --> (set: $monthName to (a: (a: "Snowary โ„๏ธ", 1), (a: "Rainuary ๐Ÿ’ฆ", 2), (a: "Winduary ๐Ÿ’จ", 3), (a: "Sprouch ๐ŸŒฑ", 4), (a: "Flowary ๐ŸŒท", 5), (a: "Meadowry ๐ŸŒพ", 6), (a: "Fielduary ๐ŸŒฝ", 7), (a: "Heatuary ๐ŸŒž", 8), (a: "Fruitember ๐Ÿ‡", 9), (a: "Harvestober ๐ŸŽƒ", 10), (a: "Mistember ๐Ÿ˜ถโ€๐ŸŒซ๏ธ", 11), (a: "Coldember ๐Ÿฅถ", 12))) <!-- Moon phase System --> (set: $moonPhase to (a: (a: "New moon ๐ŸŒ‘", 1), (a: "Waxing crescent ๐ŸŒ’", 2), (a: "First quarter ๐ŸŒ“", 8), (a: "Waxing gibbous ๐ŸŒ”", 12), (a: "Full moon ๐ŸŒ•", 16), (a: "Waning gibbous ๐ŸŒ–", 17), (a: "Last quarter ๐ŸŒ—", 23), (a: "Waning crescent ๐ŸŒ˜", 27))) (if: $daysTime is $moonPhase's 1st's 2nd)[ (set: $moon to $moonPhase's 1st's 1st)] (else-if: $daysTime is >= $moonPhase's 2nd's 2nd and < $moonPhase's 3rd's 2nd)[(set: $moon to $moonPhase's 2nd's 1st)] (else-if: $daysTime is >= $moonPhase's 3rd's 2nd and < $moonPhase's 4th's 2nd)[(set: $moon to $moonPhase's 3rd's 1st)] (else-if: $daysTime is >= $moonPhase's 4th's 2nd and < $moonPhase's 5th's 2nd)[(set: $moon to $moonPhase's 4th's 1st)] (else-if: $daysTime is $moonPhase's 5th's 2nd)[(set: $moon to $moonPhase's 5th's 1st)] (else-if: $daysTime is >= $moonPhase's 6th's 2nd and < $moonPhase's 7th's 2nd)[(set: $moon to $moonPhase's 6th's 1st)] (else-if: $daysTime is >= $moonPhase's 7th's 2nd and < $moonPhase's 8th's 2nd)[(set: $moon to $moonPhase's 7th's 1st)] (else-if: $daysTime is >= $moonPhase's 8th's 2nd)[(set: $moon to $moonPhase's 8th's 1st)] <!-- End of Moon phase System --> <!-- Months, Days, hours and minutes System --> <!-- Padding minutes --> (if: $minTime is <= 9)[(set: $padMinTime to "0" + (str:$minTime))] (else-if: $minTime is >= 10)[(set: $padMinTime to (str:$minTime))] <!-- Business Hours System --> (set: $businessHours to (a: 8, 18)) <!-- Leisure Hours System --> (set: $leisureHours to (a: 8, 23)) <!-- Display current time --> }(print: "Year " + (str: $yearsTime) + ": " + (str: $monthName's $monthsTime's 1st)){ }<div class="invisible_separator"></div><div class="separator"></div>(print:(str: $moon))|moongraph>[(set:$moonGraph to $daysTime)(b4r-color:#CCBA78)+(b4r-size: 1)+(b4r:'solid')(meter: bind $moonGraph, 30, "X", (gradient: 90, 0, yellow, 1, orange))]{ }<div class="invisible_separator"></div><div class="separator"></div>(print:"Day " + (str:$daysTime) + ": " + $currentDayTime) (text-size:1.05)[(print:"Time: " + (str:$hoursTime) + "h" + $padMinTime + " โณ")] <div class="separator"></div>{ <!-- Display business hours --> (print:"Business hours: " + (str: $businessHours's 1st) + "h - " + (str: $businessHours's 2nd) + "h" + " ๐Ÿ•ฐ๏ธ") }{|businessdaygraph>[(set:$businessDayGraph to $hoursTime)(b4r-color:#CCBA78)+(b4r-size: 1)+(b4r:'solid')(meter: bind $businessDayGraph, $businessHours's 2nd, "X", (gradient: 90, 0, yellow, 1, orange))](if: $hoursTime is <= $businessHours's 1st)[(set: $businessDayGraph to 1)] (if: $hoursTime is >= $businessHours's 2nd)[(set: $businessDayGraph to $businessHours's 2nd)] }<div class="invisible_separator"></div><div class="separator"></div>{ }Money: |money>[$money $currency] |costofliving>[(display: "Cost of living System")](set: $describePotion to (macro: dm-type _potion, [ (size:0.7)+(box:"=XXXXX=")+(border:"solid")+(output:)[\ ##(print:_potion's name) |== ''Hue'': (print:_potion's hue) ''Smell'': (print:_potion's smell) ''Flask'': (print:_potion's flask) ''Effect'': (print: _potion's effect) ==| //(print: _potion's desc)// ] ])) ($describePotion: (dm: "name", "Vasca's Dreambrew", "hue", "Puce", "smell", "Strong acidic honey", "flask", "Conical, green glass, corked", "effect", "The drinker will, upon sleeping, revisit the last dream they had, exactly as it was.", "desc", "Though Vasca was famed in life for her more practical potions, this brew is still sought after" + " by soothsayers and dream-scryers alike.", )) |moongraph>[(set:$moonGraph to 20)(b4r-color:#CCBA78)+(b4r-size: 1)+(b4r:'solid')(meter: bind $moonGraph, 30, "X====", (gradient: 90, 0, yellow, 1, orange))] (set:$threatLevel to 3)(b4r:'solid')(meter: bind $threatLevel, 4, "X==", red) (set:$batteryPower to 800)(meter: bind $batteryPower, 1000, "X", "Battery Power: $batteryPower", (gradient: 90, 0, red, 1, orange)) (dropdown: bind $tattoo, "Star", "Feather")(replace:"Star")[Claw] (cycling-link: bind $head, "Black", "Brown", "Blonde", "Red", "White") (seq-link: bind $candy, "Two candies", "One candy", "Some wrappers"){ |timeofday>[(display: "Time_system")] |intro>[] <!-- Loading Books Generator --> (display: "๐Ÿ“š Books Macros") (if: $gameState is 0)[(replace: ?intro)[๐Ÿง™๐Ÿปโ€โ™€๏ธ You just furnished your own library. This is the place where you will learn new tricks!]] (else: )[Back to the library, much to do...]} (display: "Moving System") |placetitle>[The Library ๐Ÿ“š] What can you do? | { |leisurychoices>[(link: "Sleep until morning, " + (str: $businessHours's 1st) + "h")[ <!-- Old --> (set: $fastForwardTomorrow to 60 - $minTime + ((24 - $hoursTime + 7)*60)) (set: $currentTime to it + $fastForwardTomorrow) (rerun: ?timeofday, ?leisurychoices) <!-- New! Reloading Delivery List --> (set: $customerName to $customerNameOrigin) (set: $receiverName to $receiverNameOrigin) (rerun: ?deliverylist) <!-- Old --> (show: ?deliveryservicecontent) (hide: ?closingtime) <!-- New! Applying cost of living per day and refresh building module --> (set: $money to it - $costOfLivingPerDay) (rerun: ?money) <!-- Advancing current building places --> (if: $placesAvailable's 1st's 2nd is "true")[(set: $buildingTimeLibrary to it + $fastForwardTomorrow)] (if: $placesAvailable's 2nd's 2nd is "true")[(set: $buildingTimeLaboratory to it + $fastForwardTomorrow)] (if: $placesAvailable's 3rd's 2nd is "true")[(set: $buildingTimeGarden to it + $fastForwardTomorrow)] (if: $placesAvailable's 4th's 2nd is "true")[(set: $buildingTimeDivinationRoom to it + $fastForwardTomorrow)] (if: $placesAvailable's 5th's 2nd is "true")[(set: $buildingTimeSpellCastingRoom to it + $fastForwardTomorrow)] (if: $placesAvailable's 6th's 2nd is "true")[(set: $buildingTimeObservatory to it + $fastForwardTomorrow)] (rerun: ?buildingmodulecontent) <!-- Updating reading flying books --> (rerun: ?flyingbookscontent) <!-- Updating reading potions books --> (rerun: ?potionsbookscontent) ]]} <div class="bookshelf">|flyingbooks>[|bookshelftitle>[๐Ÿงน๐Ÿ“š Books about flying] { (set: _isShown to "-") (link-repeat: "โ†“")[ (if: _isShown is "-")[(hide: ?flyingbookscontent) (set: _isShown to "+")] (else-if: _isShown is "+")[(show: ?flyingbookscontent) (set: _isShown to "-")] ] } |flyingbookscontent>[(display: "๐Ÿงน Flying books")]] </div> |unlockpotionbooks)[<div class="bookshelf">|potionsbooks>[|bookshelftitle>[๐Ÿงช๐Ÿ“š Books about potions] { (set: _isShown to "-") (link-repeat: "โ†“")[ (if: _isShown is "-")[(hide: ?potionsbookscontent) (set: _isShown to "+")] (else-if: _isShown is "+")[(show: ?potionsbookscontent) (set: _isShown to "-")] ] } |potionsbookscontent>[(display: "๐Ÿงช Potions books")]] </div>]{ <!-- Unlocking Library contents --> (if: $placesAvailable's 2nd's 2nd is "true")[(show: ?unlockpotionbooks)] }{|movebetweenpassages)[ (link: "Go to")[(goto: $place)] (dropdown: 2bind $place, ...$placesDropdownShown) ] (if: $placesAvailable's 1st's 2nd is "true")[(show: ?movebetweenpassages)] }{ |timeofday>[(display: "Time_system")] |intro>[] (if: $gameState is 0)[(replace: ?intro)[๐Ÿง™๐Ÿปโ€โ™€๏ธ You just built your own laboratory. This is the place where you will create potions!]] (else: )[Back to the library, much to do...]} (display: "Moving System") |placetitle>[The Laboratory ๐Ÿงช] What can you do? | { |leisurychoices>[(link: "Sleep until morning, " + (str: $businessHours's 1st) + "h")[ <!-- Old --> (set: $fastForwardTomorrow to 60 - $minTime + ((24 - $hoursTime + 7)*60)) (set: $currentTime to it + $fastForwardTomorrow) (rerun: ?timeofday, ?leisurychoices) <!-- New! Reloading Delivery List --> (set: $customerName to $customerNameOrigin) (set: $receiverName to $receiverNameOrigin) (rerun: ?deliverylist) <!-- Old --> (show: ?deliveryservicecontent) (hide: ?closingtime) <!-- New! Applying cost of living per day and refresh building module --> (set: $money to it - $costOfLivingPerDay) (rerun: ?money) <!-- Advancing current building places --> (if: $placesAvailable's 1st's 2nd is "true")[(set: $buildingTimeLibrary to it + $fastForwardTomorrow)] (if: $placesAvailable's 2nd's 2nd is "true")[(set: $buildingTimeLaboratory to it + $fastForwardTomorrow)] (if: $placesAvailable's 3rd's 2nd is "true")[(set: $buildingTimeGarden to it + $fastForwardTomorrow)] (if: $placesAvailable's 4th's 2nd is "true")[(set: $buildingTimeDivinationRoom to it + $fastForwardTomorrow)] (if: $placesAvailable's 5th's 2nd is "true")[(set: $buildingTimeSpellCastingRoom to it + $fastForwardTomorrow)] (if: $placesAvailable's 6th's 2nd is "true")[(set: $buildingTimeObservatory to it + $fastForwardTomorrow)] (rerun: ?buildingmodulecontent) ]]} <div class="bookshelf">|ingredientsshelves>[|activitytitle>[Ingredients ๐Ÿซ™] { (set: _isShown to "-") (link-repeat: "โ†“")[ (if: _isShown is "-")[(hide: ?ingredientscontent) (set: _isShown to "+")] (else-if: _isShown is "+")[(show: ?ingredientscontent) (set: _isShown to "-")] ] } |ingredientscontent>[(display: "Ingredients ๐Ÿซ™")]] </div> <div class="bookshelf">|potionsshelves>[|activitytitle>[Potions ๐Ÿงช] { (set: _isShown to "-") (link-repeat: "โ†“")[ (if: _isShown is "-")[(hide: ?potionscontent) (set: _isShown to "+")] (else-if: _isShown is "+")[(show: ?potionscontent) (set: _isShown to "-")] ] } |potionscontent>[(display: "Potions ๐Ÿงช")]] </div>{ |timeofday>[(display: "Time_system")] |intro>[] (if: $gameState is 0)[(replace: ?intro)[๐Ÿง™๐Ÿปโ€โ™€๏ธ You just furnished your own divination room. This is the place where you will have divination seances!]] (else: )[Back to the divination room, much to do...]} (display: "Moving System") |placetitle>[The Divination room ๐Ÿ”ฎ]{ <!-- Macro increase cost of living with building modules --> (set: $CostOfLivingPlacesMacro to (macro: num-type _RentCost, [ (output: )[{ (set: $costRentPerDay to it + _RentCost) (set: $costOfLivingPerDay to $costFoodPerDay + $costRentPerDay) (rerun: ?costofliving) }]])) <!-- Displaying cost of living per day --> (text-size:0.9)[(print: "Costs / day: " + "-" + (str: $costOfLivingPerDay) + " " + (str: $currency))] }{ |timeofday>[(display: "Time_system")] |intro>[] (if: $gameState is 0)[(replace: ?intro)[๐Ÿง™๐Ÿปโ€โ™€๏ธ You just installed your own garden. This is the place where you will grow plants and herbs!]] (else: )[Back to the garden, much to do...]} (display: "Moving System") |placetitle>[The Garden ๐ŸŒฑ]{ <!-- Building progression Macro --> (set: $buildingPlacesMacro to (macro: num-type _BuildingTProg, num-type _BuildProg, num-type _BuildT, array-type _PlaceBuilt, [ (output: )[{ (set: _reloadHookName to "reloadbuilding" + (str: _PlaceBuilt's 7th)) (hook: _reloadHookName)[ <!-- Applying prog building en cours --> (if: _BuildProg is < _BuildT)[ (print: "๐Ÿ—๏ธ Building the " + _PlaceBuilt's 1st + "... ") <!--(print: "BuildProg: " + (str: _BuildProg))--> <!--(print: ", BuildingTProg: " + (str: _BuildingTProg))--> (set: _BuildProg to _BuildingTProg) (set: $placesAvailable's (_PlaceBuilt's 7th)'s 5th to _BuildProg) <!-- (rerun: ?buildingmodulesystem) --> |buildinggraph>[(meter: bind _BuildProg, _BuildT, "X", (gradient: 90, 0, yellow, 1, orange))] (print: " ") ] <!-- Fin du if prog building --> (if: _BuildProg is >= _BuildT)[ (if: _PlaceBuilt's 4th is "notBuilt")[ (set: _PlaceBuilt's 4th to "built") (set: $placesAvailable's (_PlaceBuilt's 7th)'s 4th to _PlaceBuilt's 4th) <!-- Adding living cost of place built --> ($CostOfLivingPlacesMacro: $costOtherPlacesRentPerDay's (_PlaceBuilt's 7th)) <!-- Unlocking the place --> (replace: (hooks-named: "buildingthe" + _PlaceBuilt's 8th))[(print: "- You built the " + (str: _PlaceBuilt's 1st) + "! ")] (set: $placesAvailable's (_PlaceBuilt's 7th)'s 2nd to "true") <!-- Adding the place to the movingbetweenpassages dropdown menu --> (if: $movingPlaces is "false")[ (set: $placesDropdownShown to it - (a: $placesDropdownShown's 2nd) + (a: $placesAvailable's (_PlaceBuilt's 7th)'s 1st)) (rerun: ?movebetweenpassages) (set: $movingPlaces to "true") ](else-if: $movingPlaces is "true")[ (set: $placesDropdownShown to it + (a: $placesAvailable's (_PlaceBuilt's 7th)'s 1st)) (rerun: ?movebetweenpassages) ] (show: ?movebetweenpassages) (rerun: ?buildingmodulesystem) <!-- Unlocking the place --> ] <!-- Fin du if place not built --> (else-if: _PlaceBuilt's 4th is "built")[ (replace: (hooks-named: "buildingthe" + _PlaceBuilt's 8th))[(print: "- You built the " + (str: _PlaceBuilt's 1st) + "! ")] ] <!-- Fin du else-if place built --> ] <!-- Fin du if building terminรฉe --> ] <!-- Fin du hook reloadHookName --> }]])) <!-- FIN Building progression Macro --> }|buildingmodulesystem>[{ |buildingthelibrary>[ (if: $placesAvailable's 1st's 2nd is "false")[ (print: "- Building the " + (str: $placesAvailable's 1st's 1st) + " | ") (if: $money is >= $placesAvailable's 1st's 3rd)[ (link: "- " + (str: $placesAvailable's 1st's 3rd) + " " + (str: $currency))[ (set: $money to it - $placesAvailable's 1st's 3rd) (rerun: ?money) (set: $placesAvailable's 1st's 2nd to "true") (rerun: ?buildingmodulesystem) ] ] (else: )[(text-colour:#f43838)[(print: "- " + (str: $placesAvailable's 1st's 3rd) + " " + (str: $currency)) (text-size:0.65)[(print: " (not enough " + (str: $currency) + ")")]]] ] (else: )[ ($buildingPlacesMacro: $buildingTimeLibrary, $placesAvailable's 1st's 5th, $placesAvailable's 1st's 6th, $placesAvailable's 1st) ] ] }{ |buildingthelaboratory)[ (if: $placesAvailable's 2nd's 2nd is "false")[ (print: "- Building the " + (str: $placesAvailable's 2nd's 1st) + " | ") (if: $money is >= $placesAvailable's 2nd's 3rd)[ (link: "- " + (str: $placesAvailable's 2nd's 3rd) + " " + (str: $currency))[ (set: $money to it - $placesAvailable's 2nd's 3rd) (rerun: ?money) (set: $placesAvailable's 2nd's 2nd to "true") (rerun: ?buildingmodulesystem) ] ] (else: )[(text-colour:#f43838)[(print: "- " + (str: $placesAvailable's 2nd's 3rd) + " " + (str: $currency)) (text-size:0.65)[(print: " (not enough " + (str: $currency) + ")")]]] ] (else: )[($buildingPlacesMacro: $buildingTimeLaboratory, $placesAvailable's 2nd's 5th, $placesAvailable's 2nd's 6th, $placesAvailable's 2nd)] ] (if: $placesAvailable's 1st's 2nd is "true")[(show: ?buildingthelaboratory)] }{ |buildingthegarden)[ (if: $placesAvailable's 3rd's 2nd is "false")[ (print: "- Building the " + (str: $placesAvailable's 3rd's 1st) + " | ") (if: $money is >= $placesAvailable's 3rd's 3rd)[ (link: "- " + (str: $placesAvailable's 3rd's 3rd) + " " + (str: $currency))[ (set: $money to it - $placesAvailable's 3rd's 3rd) (rerun: ?money) (set: $placesAvailable's 3rd's 2nd to "true") (rerun: ?buildingmodulesystem) ] ] (else: )[(text-colour:#f43838)[(print: "- " + (str: $placesAvailable's 3rd's 3rd) + " " + (str: $currency)) (text-size:0.65)[(print: " (not enough " + (str: $currency) + ")")]]] ] (else: )[($buildingPlacesMacro: $buildingTimeGarden, $placesAvailable's 3rd's 5th, $placesAvailable's 3rd's 6th, $placesAvailable's 3rd)] ] (if: $placesAvailable's 2nd's 2nd is "true")[(show: ?buildingthegarden)] }{ |buildingthedivinationroom)[ (if: $placesAvailable's 4th's 2nd is "false")[ (print: "- Building the " + (str: $placesAvailable's 4th's 1st) + " | ") (if: $money is >= $placesAvailable's 4th's 3rd)[ (link: "- " + (str: $placesAvailable's 4th's 3rd) + " " + (str: $currency))[ (set: $money to it - $placesAvailable's 4th's 3rd) (rerun: ?money) (set: $placesAvailable's 4th's 2nd to "true") (rerun: ?buildingmodulesystem) ] ] (else: )[(text-colour:#f43838)[(print: "- " + (str: $placesAvailable's 4th's 3rd) + " " + (str: $currency)) (text-size:0.65)[(print: " (not enough " + (str: $currency) + ")")]]] ] (else: )[($buildingPlacesMacro: $buildingTimeDivinationRoom, $placesAvailable's 4th's 5th, $placesAvailable's 4th's 6th, $placesAvailable's 4th)] ] (if: $placesAvailable's 3rd's 2nd is "true")[(show: ?buildingthedivinationroom)] }{ |buildingthespellcastingroom)[ (if: $placesAvailable's 5th's 2nd is "false")[ (print: "- Building the " + (str: $placesAvailable's 5th's 1st) + " | ") (if: $money is >= $placesAvailable's 5th's 3rd)[ (link: "- " + (str: $placesAvailable's 5th's 3rd) + " " + (str: $currency))[ (set: $money to it - $placesAvailable's 5th's 3rd) (rerun: ?money) (set: $placesAvailable's 5th's 2nd to "true") (rerun: ?buildingmodulesystem) ] ] (else: )[(text-colour:#f43838)[(print: "- " + (str: $placesAvailable's 5th's 3rd) + " " + (str: $currency)) (text-size:0.65)[(print: " (not enough " + (str: $currency) + ")")]]] ] (else: )[($buildingPlacesMacro: $buildingTimeSpellCastingRoom, $placesAvailable's 5th's 5th, $placesAvailable's 5th's 6th, $placesAvailable's 5th)] ] (if: $placesAvailable's 4th's 2nd is "true")[(show: ?buildingthespellcastingroom)] }{ |buildingtheobservatory)[ (if: $placesAvailable's 6th's 2nd is "false")[ (print: "- Building the " + (str: $placesAvailable's 6th's 1st) + " | ") (if: $money is >= $placesAvailable's 6th's 3rd)[ (link: "- " + (str: $placesAvailable's 6th's 3rd) + " " + (str: $currency))[ (set: $money to it - $placesAvailable's 6th's 3rd) (rerun: ?money) (set: $placesAvailable's 6th's 2nd to "true") (rerun: ?buildingmodulesystem) ] ] (else: )[(text-colour:#f43838)[(print: "- " + (str: $placesAvailable's 6th's 3rd) + " " + (str: $currency)) (text-size:0.65)[(print: " (not enough " + (str: $currency) + ")")]]] ] (else: )[($buildingPlacesMacro: $buildingTimeObservatory, $placesAvailable's 6th's 5th, $placesAvailable's 6th's 6th, $placesAvailable's 6th)] ] (if: $placesAvailable's 5th's 2nd is "true")[(show: ?buildingtheobservatory)]}]{ |timeofday>[(display: "Time_system")] |intro>[] (if: $gameState is 0)[(replace: ?intro)[๐Ÿง™๐Ÿปโ€โ™€๏ธ You just built your own observatory. This is the place where you will observe the cosmos and strengthen your powers with the influence of the goddesses!]] (else: )[Back to the divination room, much to do...]} (display: "Moving System") |placetitle>[The Observatory ๐Ÿ”ญ]{ |timeofday>[(display: "Time_system")] |intro>[] (if: $gameState is 0)[(replace: ?intro)[๐Ÿง™๐Ÿปโ€โ™€๏ธ You just furnished your own spell casting room. This is the place where you will experiment casting spells and train new spell casters!]] (else: )[Back to the spell casting room, much to do...]} (display: "Moving System") |placetitle>[The Spell casting room ๐Ÿช„]{ <!-- Loading Skills Passage Here --> (display: "Skills System") }|flyingtopic>[ (hook: "flyingbook" + (str: $flyingBooksPurchased's 1st's 1st))[($bookConstruct:$bookValue's 1st, $bookReadingTime's 1st, $bookCover's 1st's 1st, $bookCover's 1st's 2nd, $flyingBookAuthor's 1st, $flyingBookTitle's 1st, $flyingBooksPurchased's 1st, $BooksTopics's 1st)(print: " ")]{ |newskillacquired>[ (if: $flyingBooksPurchased's 1st's 5th is "read")[ (if: $flyingSkillsAcquired's 1st's 2nd is "acquired")[ (print: "You have a new skill ๐ŸŽฏ: " + $flyingSkill1's 1st) (print: " ") ] <!-- Fin du if skill acquis --> (if: $flyingSkillsAcquired's 1st's 2nd is "notAcquired")[ (print: "You have a new skill ๐ŸŽฏ: ")($flyingSkillsMacro: $flyingSkill1's 1st, $flyingSkill1's 2nd) (set: $flyingSkillsAcquired's 1st's 2nd to "acquired") (print: " ") ] <!-- Fin du if skill non encore acquis --> ] <!-- Fin du if livre lu --> ] <!-- Fin du hook new skill acquired --> }(hook: "flyingbook" + (str: $flyingBooksPurchased's 2nd's 1st))[($bookConstruct:$bookValue's 2nd, $bookReadingTime's 2nd, $bookCover's 2nd's 1st, $bookCover's 2nd's 2nd, $flyingBookAuthor's 2nd, $flyingBookTitle's 2nd, $flyingBooksPurchased's 2nd, $BooksTopics's 1st)(print: " ")]{ |newskillacquired>[ (if: $flyingBooksPurchased's 2nd's 5th is "read")[ (if: $flyingSkillsAcquired's 2nd's 2nd is "acquired")[ (print: "You have a new skill ๐ŸŽฏ: " + $flyingSkill2's 1st) (print: " ") ] <!-- Fin du if skill acquis --> (if: $flyingSkillsAcquired's 2nd's 2nd is "notAcquired")[ (print: "You have a new skill ๐ŸŽฏ: ")($flyingSkillsMacro: $flyingSkill2's 1st, $flyingSkill2's 2nd) (set: $flyingSkillsAcquired's 2nd's 2nd to "acquired") (print: " ") ] <!-- Fin du if skill non encore acquis --> ] <!-- Fin du if livre lu --> ] <!-- Fin du hook new skill acquired --> }(hook: "flyingbook" + (str: $flyingBooksPurchased's 3rd's 1st))[($bookConstruct:$bookValue's 3rd, $bookReadingTime's 3rd, $bookCover's 3rd's 1st, $bookCover's 3rd's 2nd, $flyingBookAuthor's 3rd, $flyingBookTitle's 3rd, $flyingBooksPurchased's 3rd, $BooksTopics's 1st)(print: " ")]{ |newskillacquired>[ (if: $flyingBooksPurchased's 3rd's 5th is "read")[ (if: $flyingSkillsAcquired's 3rd's 2nd is "acquired")[ (print: "You have a new skill ๐ŸŽฏ: " + $flyingSkill3's 1st) (print: " ") ] <!-- Fin du if skill acquis --> (if: $flyingSkillsAcquired's 3rd's 2nd is "notAcquired")[ (print: "You have a new skill ๐ŸŽฏ: ")($flyingSkillsMacro: $flyingSkill3's 1st, $flyingSkill3's 2nd) (set: $flyingSkillsAcquired's 3rd's 2nd to "acquired") (print: " ") ] <!-- Fin du if skill non encore acquis --> ] <!-- Fin du if livre lu --> ] <!-- Fin du hook new skill acquired --> }]{ (for: each _i, ...$flyingBooksPurchased)[ (if: _i's 3rd is "hide")[ (hide: (hooks-named: "flyingbook" + (str: _i's 1st))) ] ] }{ <!-- Book's value in money --> (set: $bookValue to (a: 20, 40, 100, 300, 500, 800, 1400, 2200, 4000, 10000)) <!-- Book's reading time in minutes --> (set: $bookReadingTime to (a: (floor: 8*60*$readingSpeed), (floor: 16*60*$readingSpeed), (floor: 40*60*$readingSpeed), (floor: 4*40*60*$readingSpeed))) <!-- Book's icon and color --> (set: $bookCover to (a: (a: "๐Ÿ“—", #a7ee8e), (a: "๐Ÿ“’", #f3eeb1), (a: "๐Ÿ“”", #f6c896), (a: "๐Ÿ“™", #f6983d), (a: "๐Ÿ“•", #e66ab3), (a: "๐Ÿ“˜", #8ee8ee), (a: "๐Ÿ““", #ababab), (a: "๐Ÿ“ƒ", #d4d4d4), (a: "๐Ÿ“œ", #cfb79f))) <!-- Flying book's authors and titles --> (set: $flyingBookAuthor to (a: "Thalia Windrider", "Astrid Broom", "Orion Cloudington")) (set: $flyingBookTitle to (a: "The Art of flying a broom for new witches", "Fly faster, Fly better", "Living in the clouds: an Extensive Method to Improve Your Flying Skills", "Acrobatic flying: Advanced Techniques")) <!-- Potions book's authors and titles --> (set: $potionsBookAuthor to (a: "Luke Mixmore", "Bellatrix Caldridge", "Belladonna Brewstein")) (set: $potionsBookTitle to (a: "New Witches: Improve your Brewing Skills", "Fast Brew Without Spoil", "A Compeling Method for Advanced Brewers", "The Art of Healing Potions for Beginners", "Heal Better with Potions: A comprehensive Method")) }{ <!-- Flying skills --> (set: $flyingSkill1 to (a: "You fly 10% faster ๐Ÿงน", 0.1)) (set: $flyingSkill2 to (a: "You fly 20% faster ๐Ÿงน", 0.2)) (set: $flyingSkill3 to (a: "You fly 30% faster ๐Ÿงน", 0.3)) <!-- Flying skills Macro --> (set: $flyingSkillsMacro to (macro: string-type _skillText, num-type _skillValue, [ (output: )[{ (set: $flyingSpeed to it - it * _skillValue) (print: _skillText) }] ] )) <!-- Brewing skills --> (set: $brewingSkill1 to (a: "Your potions brew 10% faster ๐Ÿงช", 0.1)) (set: $brewingSkill2 to (a: "Your potions brew 20% faster ๐Ÿงช", 0.2)) (set: $brewingSkill3 to (a: "Your potions brew 30% faster ๐Ÿงช", 0.3)) <!-- Brewing skills Macro --> (set: $brewingSkillsMacro to (macro: string-type _skillText, num-type _skillValue, [ (output: )[{ (set: $brewingSpeed to it - it * _skillValue) (print: _skillText) }] ] )) }{ <!-- Main start variables --> (set: $gameState to 0) (set: $money to 100) (set: $currency to '๐ŸŸก') (set: $currentTime to ((8*60)+5)) (set: $placesDropdownShown to (a: "Boutique ๐Ÿ›Ž๏ธ", "null")) (set: $movingPlaces to "false") <!-- COST OF LIVING PER DAY --> <!-- Setting food per day cost --> (set: $costFoodPerDay to 20) <!-- Setting rent per day cost stable variables --> (set: $costBoutiqueRentPerDay to 30) (set: $costLibraryRentPerDay to 10) (set: $costLaboratoryRentPerDay to 20) (set: $costGardenRentPerDay to 5) (set: $costDivinationRoomRentPerDay to 10) (set: $costSpellCastingRoomRentPerDay to 15) (set: $costObservatoryRentPerDay to 30) (set: $costOtherPlacesRentPerDay to (a: $costLibraryRentPerDay, $costLaboratoryRentPerDay, $costGardenRentPerDay, $costDivinationRoomRentPerDay, $costSpellCastingRoomRentPerDay, $costObservatoryRentPerDay)) <!-- Start with Boutique --> (set: $costRentPerDay to $costBoutiqueRentPerDay) <!-- Setting cost of living per day --> (set: $costOfLivingPerDay to $costFoodPerDay + $costRentPerDay) <!-- BUILDING MODULE --> <!-- Setting places availability, unlocking cost, built bool, builtProg, daysNeededToBuild in minutes AND ID (number) AND ID (name for the hook in the Building Module System to replace when built complete) --> (set: $placesAvailable to (a: (a: "Library ๐Ÿ“š", "false", 200, "notBuilt", 0, 4*24*60, 1, "library"), (a: "Laboratory ๐Ÿงช", "false", 600, "notBuilt", 0, 12*24*60, 2, "laboratory"), (a: "Garden ๐ŸŒฑ", "false", 250, "notBuilt", 0, 3*24*60, 3, "garden"), (a: "Divination room ๐Ÿ”ฎ", "false", 400, "notBuilt", 0, 5*24*60, 4, "divinationroom"), (a: "Spell casting room ๐Ÿช„", "false", 600, "notBuilt", 0, 8*24*60, 5, "spellcastingroom"), (a: "Observatory ๐Ÿ”ญ", "false", 1000, "notBuilt", 0, 14*24*60, 6, "observatory"))) <!-- Setting Building Time variables --> (set: $buildingTimeLaboratory to 0) (set: $buildingTimeGarden to 0) (set: $buildingTimeDivinationRoom to 0) (set: $buildingTimeSpellCastingRoom to 0) (set: $buildingTimeObservatory to 0) <!-- LIBRARY --> <!-- Library start variables --> <!-- Books Topics --> (set: $BooksTopics to (a:"flying", "brewingpotions", "healingpotions")) <!-- Book collection's validation purchased --> <!-- Flying books collection --> (set: $flyingBooksPurchased to (a: (a: 1, "false", "show", 0, "notRead"), (a: 2, "false", "hide", 0, "notRead"), (a: 3, "false", "hide", 0, "notRead"), (a: 9999, "false", "hide", 0, "notRead"))) <!-- Potions books collection --> (set: $brewingPotionsBooksPurchased to (a: (a: 1, "false", "show", 0, "notRead"), (a: 2, "false", "hide", 0, "notRead"), (a: 3, "false", "hide", 0, "notRead"), (a: 9999, "false", "hide", 0, "notRead"))) (set: $healingPotionsBooksPurchased to (a: (a: 1, "false", "show", 0, "notRead"), (a: 2, "false", "hide", 0, "notRead"), (a: 9999, "false", "hide", 0, "notRead"))) <!-- SKILLS --> <!-- DeepMind / Miscellaneous skills --> (set: $readingSpeed to 1) <!-- Flying skills --> (set: $flyingSpeed to 1) (set: $flyingSkillsAcquired to (a: (a: 1, "notAcquired"), (a: 2, "notAcquired"), (a: 3, "notAcquired"))) <!-- Brewing skills --> (set: $brewingSpeed to 1) (set: $brewingSkillsAcquired to (a: (a: 1, "notAcquired"), (a: 2, "notAcquired"), (a: 3, "notAcquired"))) <!-- INGREDIENTS --> <!-- Setting up lists of ingredients by ID Number, Name, Description, Quantity in stock, Market price --> <!-- Player's list - Plants --> (set: $plantBasedIngredients to (a: (a: 1, "๐Ÿชด Mandragora", "Use to cure illnesses, and enter a second state.", 4, 25, "mandragora", "notAcquired", "notLearned"), (a: 2, "๐Ÿชท Passiflora", "Use to calm the mind and the body.", 8, 10, "passiflora", "notAcquired", "notLearned"), (a: 3, "๐ŸŒผ Elder", "Use in many medicinal recipes.", 10, 8, "elder", "notAcquired", "notLearned"), (a: 4, "๐Ÿซ Blackthorn", "Use it to curse people!", 6, 12, "blackthorn", "notAcquired", "notLearned"), (a: 5, "๐Ÿ„ Amanita Cimetierum", "Use it to resurect the dead!", 1, 100, "amanitacimetierum", "notAcquired", "notLearned"))) <!-- Player's list - Animals --> (set: $animalBasedIngredients to (a: (a: 1, "๐Ÿธ๐Ÿ’ฆ Toad slime", "Use in many recipes.", 4, 15, "toadslime", "notAcquired", "notLearned"), (a: 2, "๐Ÿฆ… Raven's feet", "A powerful ingredient used in many recipes.", 8, 25, "ravensfeet", "notAcquired", "notLearned"), (a: 3, "๐ŸฆŽ๐Ÿ‘๏ธ Newt's eye", "A powerful ingredient used in many recipes.", 6, 20, "newtseye", "notAcquired", "notLearned"))) <!-- POTIONS --> <!-- Cauldron Brewing Time Variables --> (set: $BrewingTimeCauldron1 to 0) (set: $BrewingTimeCauldron2 to 0) (set: $BrewingTimeCauldron3 to 0) (set: $BrewingTimeCauldron4 to 0) <!-- Cauldron Booleans isBeingUsed --> (set: $IsBrewingCauldron1 to "notBrewing") (set: $IsBrewingCauldron2 to "notBrewing") (set: $IsBrewingCauldron3 to "notBrewing") (set: $IsBrewingCauldron4 to "notBrewing") <!-- Healing Potions recipes AQUISITION --> (set: $healingPotionsRecipesAcquired to (a: (a: 1, "notAcquired"), (a: 2, "notAcquired"), (a: 3, "notAcquired"), (a: 4, "notAcquired"), (a: 5, "notAcquired"), (a: 6, "notAcquired"))) <!-- Healing Potions: Title, CompletionTime, Quantity in stock, Sale Price, ID Name for Hooks, ID Number within ALL potions, Brew Prog and Brew Bool --> (set: $healingPotion1 to (a: "Magical boo-boo cream ๐Ÿค•", (floor: 1*60*$brewingSpeed), 0, 40, "magicalbooboocream", 1, 0, "notBrewed")) (set: $healingPotion2 to (a: "Potion against the cold ๐Ÿคง", (floor: 4*60*$brewingSpeed), 0, 90, "potionagainstthecold", 2, 0, "notBrewed")) (set: $healingPotion3 to (a: "Potion against stomach ache ๐Ÿคข", (floor: 3*60*$brewingSpeed), 0, 80, "potionagainststomachache", 3, 0, "notBrewed")) (set: $healingPotion4 to (a: "Potion against headache ๐Ÿ˜ตโ€๐Ÿ’ซ", (floor: 3*60*$brewingSpeed), 0, 80, "potionagainstheadache", 4, 0, "notBrewed")) (set: $healingPotion5 to (a: "Potion against minor injury ๐Ÿค•", (floor: 3*60*$brewingSpeed), 0, 120, "potionagainstminorinjury", 5, 0, "notBrewed")) (set: $healingPotion6 to (a: "Potion against minor food poisoning ๐Ÿคข", (floor: 3*60*$brewingSpeed), 0, 120, "potionagainstminorfoodpoisoning", 6, 0, "notBrewed")) <!-- Skin Care Potions : Title, CompletionTime, Quantity in stock, Sale Price, ID Name for Hooks, ID Number within ALL potions, Brew Prog and Brew Bool --> (set: $skinCarePotion1 to (a: "Potion against pimples", (floor: 5*60*$brewingSpeed), 0, 120, "potionagainstpimples", 7, 0, "notBrewed")) <!-- Healing Potions Recipes : Ingredient, Ingredient's quantity needed, rince & repeat --> (set: $healingPotionRecipe1 to (a: (a: $plantBasedIngredients's 2nd, 2, "F"))) (set: $healingPotionRecipe2 to (a: (a: $plantBasedIngredients's 1st, 1, "F"), (a: $plantBasedIngredients's 2nd, 1, "F"))) (set: $healingPotionRecipe3 to (a: (a: $plantBasedIngredients's 3rd, 1, "F"), (a: $animalBasedIngredients's 1st, 1, "F"))) (set: $healingPotionRecipe4 to (a: (a: $plantBasedIngredients's 1st, 1, "F"), (a: $plantBasedIngredients's 2nd, 3, "F"))) (set: $healingPotionRecipe5 to (a: (a: $plantBasedIngredients's 1st, 2, "F"), (a: $plantBasedIngredients's 2nd, 2, "F"))) (set: $healingPotionRecipe6 to (a: (a: $plantBasedIngredients's 3rd, 2, "F"), (a: $plantBasedIngredients's 2nd, 3, "F"), (a: $animalBasedIngredients's 1st, 2, "F"))) <!-- //////////////////////////////////////// --> <!-- ALL POTIONS COUNT --> (set: $AllPotionsCount to (a: (a: $healingPotion1, $healingPotionRecipe1), (a: $healingPotion2, $healingPotionRecipe2), (a: $healingPotion3, $healingPotionRecipe3), (a: $healingPotion4, $healingPotionRecipe4), (a: $healingPotion5, $healingPotionRecipe5), (a: $healingPotion6, $healingPotionRecipe6))) <!-- //////////////////////////////////////// --> }{ <!-- Setting up Building Modules Self-building System --> <!-- Counting the construction time Building Macro --> (set: $selfBuildingPlaces to (macro: num-type _timeFlies, num-type _BuildingTProg, array-type _PlaceBuilt, [ (output: )[{ (if: _PlaceBuilt's 2nd is "true")[ (set: _BuildingTProg to it + _timeFlies) <!-- (print: "timeFlies " + (str: _timeFlies)) --> (rerun: ?buildingmodulecontent) ] <!-- fin du if placesAvailable's x's 2nd is true --> }] ])) }{ <!-- Loading Skills Passage Here --> (display: "Skills System") <!-- Loading ๐Ÿงช Potions Recipes Passage Here --> (display: "๐Ÿงช Potions Recipes") }|brewingpotionstopic>[ |booksubcategorytitle>[โš—๏ธ The Art of Brewing] (hook: "brewingpotionsbook" + (str: $brewingPotionsBooksPurchased's 1st's 1st))[($bookConstruct:$bookValue's 1st, $bookReadingTime's 1st, $bookCover's 1st's 1st, $bookCover's 1st's 2nd, $potionsBookAuthor's 1st, $potionsBookTitle's 1st, $brewingPotionsBooksPurchased's 1st, $BooksTopics's 2nd)(print: " ")]{ |newskillacquired>[ (if: $brewingPotionsBooksPurchased's 1st's 5th is "read")[ (if: $brewingSkillsAcquired's 1st's 2nd is "acquired")[ (print: "You have a new skill ๐ŸŽฏ: " + $brewingSkill1's 1st) (print: " ") ] <!-- Fin du if skill acquis --> (if: $brewingSkillsAcquired's 1st's 2nd is "notAcquired")[ (print: "You have a new skill ๐ŸŽฏ: ")($brewingSkillsMacro: $brewingSkill1's 1st, $brewingSkill1's 2nd) (set: $brewingSkillsAcquired's 1st's 2nd to "acquired") (print: " ") ] <!-- Fin du if skill non encore acquis --> ] <!-- Fin du if livre lu --> ] <!-- Fin du hook new skill acquired --> }(hook: "brewingpotionsbook" + (str: $brewingPotionsBooksPurchased's 2nd's 1st))[($bookConstruct:$bookValue's 2nd, $bookReadingTime's 2nd, $bookCover's 2nd's 1st, $bookCover's 2nd's 2nd, $potionsBookAuthor's 1st, $potionsBookTitle's 2nd, $brewingPotionsBooksPurchased's 2nd, $BooksTopics's 2nd)(print: " ")]{ |newskillacquired>[ (if: $brewingPotionsBooksPurchased's 2nd's 5th is "read")[ (if: $brewingSkillsAcquired's 2nd's 2nd is "acquired")[ (print: "You have a new skill ๐ŸŽฏ: " + $brewingSkill2's 1st) (print: " ") ] <!-- Fin du if skill acquis --> (if: $brewingSkillsAcquired's 2nd's 2nd is "notAcquired")[ (print: "You have a new skill ๐ŸŽฏ: ")($brewingSkillsMacro: $brewingSkill2's 1st, $brewingSkill2's 2nd) (set: $brewingSkillsAcquired's 2nd's 2nd to "acquired") (print: " ") ] <!-- Fin du if skill non encore acquis --> ] <!-- Fin du if livre lu --> ] <!-- Fin du hook new skill acquired --> }(hook: "brewingpotionsbook" + (str: $brewingPotionsBooksPurchased's 3rd's 1st))[($bookConstruct:$bookValue's 3rd, $bookReadingTime's 3rd, $bookCover's 3rd's 1st, $bookCover's 3rd's 2nd, $potionsBookAuthor's 2nd, $potionsBookTitle's 3rd, $brewingPotionsBooksPurchased's 3rd, $BooksTopics's 2nd)(print: " ")]{ |newskillacquired>[ (if: $brewingPotionsBooksPurchased's 3rd's 5th is "read")[ (if: $brewingSkillsAcquired's 3rd's 2nd is "acquired")[ (print: "You have a new skill ๐ŸŽฏ: " + $brewingSkill3's 1st) (print: " ") ] <!-- Fin du if skill acquis --> (if: $brewingSkillsAcquired's 3rd's 2nd is "notAcquired")[ (print: "You have a new skill ๐ŸŽฏ: ")($brewingSkillsMacro: $brewingSkill3's 1st, $brewingSkill3's 2nd) (set: $brewingSkillsAcquired's 3rd's 2nd to "acquired") (print: " ") ] <!-- Fin du if skill non encore acquis --> ] <!-- Fin du if livre lu --> ] <!-- Fin du hook new skill acquired --> } |booksubcategorytitle>[โค๏ธโ€๐Ÿฉน Healing Potions] (hook: "healingpotionsbook" + (str: $healingPotionsBooksPurchased's 1st's 1st))[($bookConstruct:$bookValue's 1st, $bookReadingTime's 1st, $bookCover's 1st's 1st, $bookCover's 1st's 2nd, $potionsBookAuthor's 3rd, $potionsBookTitle's 4th, $healingPotionsBooksPurchased's 1st, $BooksTopics's 3rd)(print: " ")]{ |newskillacquired>[ (if: $healingPotionsBooksPurchased's 1st's 5th is "read")[ (if: $healingPotionsRecipesAcquired's 1st's 2nd is "acquired")[ (print: "You have a new recipe ๐Ÿ“„: " + $healingPotion1's 1st) (print: " ") ] <!-- Fin du if skill acquis --> (if: $healingPotionsRecipesAcquired's 2nd's 2nd is "acquired")[ (print: "You have a new recipe ๐Ÿ“„: " + $healingPotion2's 1st) (print: " ") ] <!-- Fin du if skill acquis --> (if: $healingPotionsRecipesAcquired's 3rd's 2nd is "acquired")[ (print: "You have a new recipe ๐Ÿ“„: " + $healingPotion3's 1st) (print: " ") ] <!-- Fin du if skill acquis --> (if: $healingPotionsRecipesAcquired's 1st's 2nd is "notAcquired")[ (print: "You have a new recipe ๐Ÿ“„: " + $healingPotion1's 1st) (print: " ") <!-- learning the recipe --> (set: $healingPotionsRecipesAcquired's 1st's 2nd to "acquired") <!-- learning ingredients from recipe --> ($learningIngredientByRecipeMacro: $healingPotionRecipe1) ] <!-- Fin du if skill non encore acquis --> (if: $healingPotionsRecipesAcquired's 2nd's 2nd is "notAcquired")[ (print: "You have a new recipe ๐Ÿ“„: " + $healingPotion2's 1st) (print: " ") <!-- learning the recipe --> (set: $healingPotionsRecipesAcquired's 2nd's 2nd to "acquired") <!-- learning ingredients from recipe --> ($learningIngredientByRecipeMacro: $healingPotionRecipe2) ] <!-- Fin du if skill non encore acquis --> (if: $healingPotionsRecipesAcquired's 3rd's 2nd is "notAcquired")[ (print: "You have a new recipe ๐Ÿ“„: " + $healingPotion3's 1st) (print: " ") <!-- learning the recipe --> (set: $healingPotionsRecipesAcquired's 3rd's 2nd to "acquired") <!-- learning ingredients from recipe --> ($learningIngredientByRecipeMacro: $healingPotionRecipe3) ] <!-- Fin du if skill non encore acquis --> ] <!-- Fin du if livre lu --> ] <!-- Fin du hook new skill acquired --> }(hook: "healingpotionsbook" + (str: $healingPotionsBooksPurchased's 2nd's 1st))[($bookConstruct:$bookValue's 2nd, $bookReadingTime's 2nd, $bookCover's 2nd's 1st, $bookCover's 2nd's 2nd, $potionsBookAuthor's 3rd, $potionsBookTitle's 5th, $healingPotionsBooksPurchased's 2nd, $BooksTopics's 3rd)(print: " ")]{ |newskillacquired>[ (if: $healingPotionsBooksPurchased's 2nd's 5th is "read")[ (if: $healingPotionsRecipesAcquired's 4th's 2nd is "acquired")[ (print: "You have a new recipe ๐Ÿ“„: " + $healingPotion4's 1st) (print: " ") ] <!-- Fin du if skill acquis --> (if: $healingPotionsRecipesAcquired's 5th's 2nd is "acquired")[ (print: "You have a new recipe ๐Ÿ“„: " + $healingPotion5's 1st) (print: " ") ] <!-- Fin du if skill acquis --> (if: $healingPotionsRecipesAcquired's 6th's 2nd is "acquired")[ (print: "You have a new recipe ๐Ÿ“„: " + $healingPotion6's 1st) (print: " ") ] <!-- Fin du if skill acquis --> (if: $healingPotionsRecipesAcquired's 4th's 2nd is "notAcquired")[ <!--($brewingSkillsMacro: $brewingSkill1's 1st, $brewingSkill1's 2nd)--> (print: "You have a new recipe ๐Ÿ“„: " + $healingPotion4's 1st) (print: " ") (set: $healingPotionsRecipesAcquired's 4th's 2nd to "acquired") ] <!-- Fin du if skill non encore acquis --> (if: $healingPotionsRecipesAcquired's 5th's 2nd is "notAcquired")[ <!--($brewingSkillsMacro: $brewingSkill1's 1st, $brewingSkill1's 2nd)--> (print: "You have a new recipe ๐Ÿ“„: " + $healingPotion5's 1st) (print: " ") (set: $healingPotionsRecipesAcquired's 5th's 2nd to "acquired") ] <!-- Fin du if skill non encore acquis --> (if: $healingPotionsRecipesAcquired's 6th's 2nd is "notAcquired")[ <!--($brewingSkillsMacro: $brewingSkill1's 1st, $brewingSkill1's 2nd)--> (print: "You have a new recipe ๐Ÿ“„: " + $healingPotion6's 1st) (print: " ") (set: $healingPotionsRecipesAcquired's 6th's 2nd to "acquired") ] <!-- Fin du if skill non encore acquis --> ] <!-- Fin du if livre lu --> ] <!-- Fin du hook new skill acquired --> }]{ (for: each _i, ...$brewingPotionsBooksPurchased)[ (if: _i's 3rd is "hide")[ (hide: (hooks-named: "brewingpotionsbook" + (str: _i's 1st))) ] ] (for: each _i, ...$healingPotionsBooksPurchased)[ (if: _i's 3rd is "hide")[ (hide: (hooks-named: "healingpotionsbook" + (str: _i's 1st))) ] ] }{ <!-- displaying Brewing Potions Macro Passage Here --> (display: "๐Ÿงช Brewing Potions Macro") <!-- //////////////////////////////////////// --> <!-- Ingredient learning through recipe macro --> (set: $learningIngredientByRecipeMacro to (macro: array-type _PotionRecipe, [ (output: )[{ (for: each _ingredient, ..._PotionRecipe)[ (if: _ingredient's 1st's 6th is $plantBasedIngredients's (_ingredient's 1st's 1st)'s 6th)[ (set: $plantBasedIngredients's (_ingredient's 1st's 1st)'s 7th to "acquired") ] (if: _ingredient's 1st's 6th is $animalBasedIngredients's (_ingredient's 1st's 1st)'s 6th)[ (set: $animalBasedIngredients's (_ingredient's 1st's 1st)'s 7th to "acquired") ] ] (rerun: ?tableconstruct) }] ] )) <!-- //////////////////////////////////////// --> <!-- //////////////////////////////////////// --> <!-- Ingredient check stock for making potion macro --> (set: $checkIngredientAvailableForPotionMacro to (macro: array-type _Potion, array-type _PotionRecipe, [ (output: )[{ (hook: "make" + _Potion's 5th)[ (set: _containsPlantBasedIngredients to "false") (set: _containsAnimalBasedIngredients to "false") (set: _PotionIngredientsQuantity to "") (for: each _ingredient, ..._PotionRecipe)[ (if: _ingredient's 1st's 6th is $plantBasedIngredients's (_ingredient's 1st's 1st)'s 6th)[ (set: _containsPlantBasedIngredients to "true") (if: $plantBasedIngredients's (_ingredient's 1st's 1st)'s 4th is >= _ingredient's 2nd)[ (set: _ingredient's 3rd to "enough") ](else-if: $plantBasedIngredients's (_ingredient's 1st's 1st)'s 4th is < _ingredient's 2nd)[(set: _ingredient's 3rd to "F")] <!-- Updating list of ingredients with plants --> (append: (hooks-named:"tablecellquantity" + _Potion's 5th))[(print: _ingredient's 1st's 2nd + " (" + (str: $plantBasedIngredients's (_ingredient's 1st's 1st)'s 4th) + "/" + (str: _ingredient's 2nd) + ") ")] ] (if: _ingredient's 1st's 6th is $animalBasedIngredients's (_ingredient's 1st's 1st)'s 6th)[ (set: _containsAnimalBasedIngredients to "true") (if: $animalBasedIngredients's (_ingredient's 1st's 1st)'s 4th is >= _ingredient's 2nd)[ (set: _ingredient's 3rd to "enough") ](else-if: $animalBasedIngredients's (_ingredient's 1st's 1st)'s 4th is < _ingredient's 2nd)[(set: _ingredient's 3rd to "F")] <!-- Updating list of ingredients with animals --> (append: (hooks-named:"tablecellquantity" + _Potion's 5th))[(print: _ingredient's 1st's 2nd + " (" + (str: $animalBasedIngredients's (_ingredient's 1st's 1st)'s 4th) + "/" + (str: _ingredient's 2nd) + ") ")] ] (set: _PotionIngredientsQuantity to it + _ingredient's 3rd) ] <!-- THE RESULTS --> <!-- IF THE POTION IS NOT BREWING --> (if: $AllPotionsCount's (_Potion's 6th)'s 1st's 8th is not "beingBrewed")[ (if: _PotionIngredientsQuantity contains "F")[(print: "Not enough ingredients")] (if: _PotionIngredientsQuantity does not contain "F")[ (link: "Make")[ <!-- reset ingredients availability count --> (set: _PotionIngredientsQuantity to "") <!-- IF CONTAINS PLANTS AND NO ANIMALS --> (if: _containsPlantBasedIngredients is "true" and _containsAnimalBasedIngredients is "false")[ (print: "Brewing plants... ") (for: each _ingredient, ..._PotionRecipe)[ (set: $plantBasedIngredients's (_ingredient's 1st's 1st)'s 4th to it - _ingredient's 2nd) <!-- Updating list of ingredients with plants : REPLACE INSTEAD --> (append: (hooks-named:"tablecellquantity" + _Potion's 5th))[(print: _ingredient's 1st's 2nd + " (" + (str: $plantBasedIngredients's (_ingredient's 1st's 1st)'s 4th) + "/" + (str: _ingredient's 2nd) + ") ")] ] ]<!-- IF CONTAINS PLANTS AND NO ANIMALS --> <!-- IF CONTAINS ANIMALS AND NO PLANTS --> (if: _containsAnimalBasedIngredients is "true" and _containsPlantBasedIngredients is "false")[ (print: "Brewing animal parts... ") (for: each _ingredient, ..._PotionRecipe)[ (set: $animalBasedIngredients's (_ingredient's 1st's 1st)'s 4th to it - _ingredient's 2nd) <!-- Updating list of ingredients with animals --> (append: (hooks-named:"tablecellquantity" + _Potion's 5th))[(print: _ingredient's 1st's 2nd + " (" + (str: $animalBasedIngredients's (_ingredient's 1st's 1st)'s 4th) + "/" + (str: _ingredient's 2nd) + ") ")] ] ]<!-- IF CONTAINS ANIMALS AND NO PLANTS --> <!-- IF CONTAINS BOTH ANIMALS AND PLANTS --> (if: _containsAnimalBasedIngredients is "true" and _containsPlantBasedIngredients is "true")[ (print: "Brewing both... ") (for: each _ingredient, ..._PotionRecipe)[ (if: _ingredient's 1st's 6th is $plantBasedIngredients's (_ingredient's 1st's 1st)'s 6th)[ (set: $plantBasedIngredients's (_ingredient's 1st's 1st)'s 4th to it - _ingredient's 2nd) <!-- Updating list of ingredients with plants --> (append: (hooks-named:"tablecellquantity" + _Potion's 5th))[(print: _ingredient's 1st's 2nd + " (" + (str: $plantBasedIngredients's (_ingredient's 1st's 1st)'s 4th) + "/" + (str: _ingredient's 2nd) + ") ")] ] (if: _ingredient's 1st's 6th is $animalBasedIngredients's (_ingredient's 1st's 1st)'s 6th)[ (set: $animalBasedIngredients's (_ingredient's 1st's 1st)'s 4th to it - _ingredient's 2nd) <!-- Updating list of ingredients with animals --> (append: (hooks-named:"tablecellquantity" + _Potion's 5th))[(print: _ingredient's 1st's 2nd + " (" + (str: $animalBasedIngredients's (_ingredient's 1st's 1st)'s 4th) + "/" + (str: _ingredient's 2nd) + ") ")] ] ] ]<!-- IF CONTAINS BOTH ANIMALS AND PLANTS --> <!-- Brewing Prog Potion MACRO --> (set: $AllPotionsCount's (_Potion's 6th)'s 1st's 8th to "beingBrewed") <!-- Checking which Cauldron is Available --> <!--(if: $IsBrewingCauldron1 is "notBrewing" and _Potion is not "beingBrewed")[ (set: $IsBrewingCauldron1 to "brewing") (set: _Potion's 8th to "beingBrewed") ($brewingPotionsMacro: $BrewingTimeCauldron1, _Potion's 3rd, _Potion's 2nd, _Potion) ](else-if: $IsBrewingCauldron1 is "brewing" and $IsBrewingCauldron2 is "notBrewing" and _Potion is not "beingBrewed")[ (set: $IsBrewingCauldron2 to "brewing") (set: _Potion's 8th to "beingBrewed") ($brewingPotionsMacro: $BrewingTimeCauldron2, _Potion's 3rd, _Potion's 2nd, _Potion) ](else-if: $IsBrewingCauldron1 is "brewing" and $IsBrewingCauldron2 is "brewing" and $IsBrewingCauldron3 is "notBrewing" and _Potion is not "beingBrewed")[ (set: $IsBrewingCauldron3 to "brewing") (set: _Potion's 8th to "beingBrewed") ($brewingPotionsMacro: $BrewingTimeCauldron3, _Potion's 3rd, _Potion's 2nd, _Potion) ](else-if: $IsBrewingCauldron1 is "brewing" and $IsBrewingCauldron2 is "brewing" and $IsBrewingCauldron3 is "brewing" and $IsBrewingCauldron4 is "notBrewing" and _Potion is not "beingBrewed")[ (set: $IsBrewingCauldron4 to "brewing") (set: _Potion's 8th to "beingBrewed") ($brewingPotionsMacro: $BrewingTimeCauldron4, _Potion's 3rd, _Potion's 2nd, _Potion) ]--> <!-- RELOAD ONLY INGREDIENTS TABLE AND TABLE CELLS QUANTITIES --> (rerun: ?tableconstruct) ] <!-- LINK --> ]<!-- IF ENOUGH --> ] <!-- IF THE POTION IS NOT BREWING --> (else-if: $AllPotionsCount's (_Potion's 6th)'s 1st's 8th is "beingBrewed")[($brewingPotionsMacro: $BrewingTimeCauldron1, _Potion's 3rd, _Potion's 2nd, _Potion) <!-- to modify with the cauldron's availability -->] ]<!-- HOOK --> }] ] )) }{ (display: "Books System") <!-- Book's reading progression Macro --> (set: $bookProgression to (macro: num-type _ReadT, num-type _ReadProg, array-type _Book, string-type _BookTopic, [ (output: )[{ (set: _reloadHookName to "reloadreadingbook" + (str: _BookTopic) + (str: _Book's 1st)) (hook: _reloadHookName)[ <!-- Applying Leisure hours + prog lecture en cours --> (if: $hoursTime is >= $leisureHours's 1st and is < $leisureHours's 2nd)[ (if: _ReadProg is < _ReadT)[ (print: " | ") (link: "Read 1h ๐Ÿ“–")[ (set: _ReadProg to it + 60) <!-- IF YOUR BOOK TOPIC IS... --> (if: _BookTopic is "flying")[ (set: $flyingBooksPurchased's (_Book's 1st)'s 4th to _ReadProg) ] (if: _BookTopic is "brewingpotions")[ (set: $brewingPotionsBooksPurchased's (_Book's 1st)'s 4th to _ReadProg) ] (if: _BookTopic is "healingpotions")[ (set: $healingPotionsBooksPurchased's (_Book's 1st)'s 4th to _ReadProg) ] <!-- END OF IF YOUR BOOK TOPIC IS... --> (set: $currentTime to it + 60) (rerun: ?timeofday) <!-- Advancing current building places --> (if: $placesAvailable's 1st's 2nd is "true")[(set: $buildingTimeLibrary to it + 60)] (if: $placesAvailable's 2nd's 2nd is "true")[(set: $buildingTimeLaboratory to it + 60)] (if: $placesAvailable's 3rd's 2nd is "true")[(set: $buildingTimeGarden to it + 60)] (if: $placesAvailable's 4th's 2nd is "true")[(set: $buildingTimeDivinationRoom to it + 60)] (if: $placesAvailable's 5th's 2nd is "true")[(set: $buildingTimeSpellCastingRoom to it + 60)] (if: $placesAvailable's 6th's 2nd is "true")[(set: $buildingTimeObservatory to it + 60)] (rerun: ?buildingmodulecontent) (rerun: (hooks-named: _reloadHookName)) ] <!-- Fin du lien Read 1h --> |readinggraph>[(meter: bind _ReadProg, _ReadT, "X", (gradient: 90, 0, yellow, 1, orange))] <!-- Suppression des espaces en trop --> <!--(if: _BookTopic is "flying")[ (unless: _Book is $flyingBooksPurchased's 2ndlast)[ (print: " ") ] ] (if: _BookTopic is "brewingpotions")[ (unless: _Book is $brewingPotionsBooksPurchased's 2ndlast)[ (print: " ") ] ] (if: _BookTopic is "healingpotions")[ (unless: _Book is $healingPotionsBooksPurchased's 2ndlast)[ (print: " ") ] ]--> <!-- FIN DE Suppression des espaces en trop --> ] <!-- Fin du if prog lecture --> (if: _ReadProg is _ReadT)[ (if: _Book's 5th is "notRead")[ (set: _Book's 5th to "read") <!-- IF YOUR BOOK TOPIC IS... --> (if: _BookTopic is "flying")[ (set: $flyingBooksPurchased's (_Book's 1st)'s 5th to _Book's 5th) ] (if: _BookTopic is "brewingpotions")[ (set: $brewingPotionsBooksPurchased's (_Book's 1st)'s 5th to _Book's 5th) ] (if: _BookTopic is "healingpotions")[ (set: $healingPotionsBooksPurchased's (_Book's 1st)'s 5th to _Book's 5th) ] <!-- END OF IF YOUR BOOK TOPIC IS... --> (replace: (hooks-named: _reloadHookName))[(print: "Congratulations! You've read this book!")] ] <!-- Fin du if livre marquรฉ pas lu --> (else-if: _Book's 5th is "read")[ (replace: (hooks-named: _reloadHookName))[(print: "Congratulations! You've read this book!")] ] <!-- Fin du else-if livre marquรฉ lu --> ] <!-- Fin du if lecture terminรฉe --> ] <!-- Fin du if leisure hour --> (if: $hoursTime is >= $leisureHours's 2nd or is < $leisureHours's 1st)[ (if: _ReadProg is < _ReadT)[ <!-- ALL BOOKS ARE PUT TO SLEEP... --> (for: each _i, ...$flyingBooksPurchased)[ (if: _i's 3rd is "show")[ (if: _i's 5th is "notRead")[ (replace: (hooks-named: "reloadreadingbookflying" + (str: _i's 1st)))[(print: "| Time to sleep! ๐ŸŒ™")(print: " ")] ] <!-- Fin du if is notRead --> ] <!-- Fin du if is show --> ] <!-- Fin de la boucle for --> (for: each _i, ...$brewingPotionsBooksPurchased)[ (if: _i's 3rd is "show")[ (if: _i's 5th is "notRead")[ (replace: (hooks-named: "reloadreadingbookbrewingpotions" + (str: _i's 1st)))[(print: "| Time to sleep! ๐ŸŒ™")(print: " ")] ] <!-- Fin du if is notRead --> ] <!-- Fin du if is show --> ] <!-- Fin de la boucle for --> (for: each _i, ...$healingPotionsBooksPurchased)[ (if: _i's 3rd is "show")[ (if: _i's 5th is "notRead")[ (replace: (hooks-named: "reloadreadingbookhealingpotions" + (str: _i's 1st)))[(print: "| Time to sleep! ๐ŸŒ™")(print: " ")] ] <!-- Fin du if is notRead --> ] <!-- Fin du if is show --> ] <!-- Fin de la boucle for --> <!-- END OF ALL BOOKS ARE PUT TO SLEEP... --> ] <!-- Fin du if prog lecture en cours --> (if: _ReadProg is _ReadT)[ (if: _Book's 5th is "notRead")[ (set: _Book's 5th to "read") <!-- IF YOUR BOOK TOPIC IS... --> (if: _BookTopic is "flying")[ (set: $flyingBooksPurchased's (_Book's 1st)'s 5th to _Book's 5th) ] (if: _BookTopic is "brewingpotions")[ (set: $brewingPotionsBooksPurchased's (_Book's 1st)'s 5th to _Book's 5th) ] (if: _BookTopic is "healingpotions")[ (set: $healingPotionsBooksPurchased's (_Book's 1st)'s 5th to _Book's 5th) ] <!-- END OF IF YOUR BOOK TOPIC IS... --> (unless: _BookTopic is "healingpotions")[ (replace: (hooks-named: _reloadHookName))[] ](else-if: _BookTopic is "healingpotions")[ (replace: (hooks-named: _reloadHookName))[] ] (rerun: ?newskillacquired) ] <!-- Fin du if livre marquรฉ pas lu --> (else-if: _Book's 5th is "read")[ (unless: _BookTopic is "healingpotions")[ (replace: (hooks-named: _reloadHookName))[] ](else-if: _BookTopic is "healingpotions")[ (replace: (hooks-named: _reloadHookName))[] ] (rerun: ?newskillacquired) ] <!-- Fin du else-if livre marquรฉ lu --> ] <!-- Fin du if lecture terminรฉe --> ] <!-- Fin du if NOT leisure hours --> ] <!-- Fin du hook reloadHookName --> }] ] )) <!-- Book's Construct Macro --> (set: $bookConstruct to (macro: num-type _cost, num-type _readT, string-type _icon, color-type _color, string-type _author, string-type _title, array-type _isPurchased, string-type _bookTopic, [ (output: )[{ (print: "- " + _icon) (text-colour: _color)+(text-style: "italic")[(print: _title + " ")](print: " by " + _author) (if: _isPurchased's 2nd is "false")[ (if: $money is >= _cost)[ (print: " | ") (link: "- " + (str: _cost) + " " + (str: $currency))[ <!-- IF YOUR BOOK TOPIC IS... --> (if: _bookTopic is "flying")[ (unless: _isPurchased is $flyingBooksPurchased's last)[ (show: (hooks-named: "flyingbook" + (str: $flyingBooksPurchased's (_isPurchased's 1st + 1)'s 1st))) (set: $flyingBooksPurchased's (_isPurchased's 1st + 1)'s 3rd to "show") ($bookProgression:_readT, _isPurchased's 4th, _isPurchased, _bookTopic) ] (set: $flyingBooksPurchased's (_isPurchased's 1st)'s 2nd to "true") ] <!-- fin du if booktopic is flying --> (if: _bookTopic is "brewingpotions")[ (unless: _isPurchased is $brewingPotionsBooksPurchased's last)[ (show: (hooks-named: "brewingpotionsbook" + (str: $brewingPotionsBooksPurchased's (_isPurchased's 1st + 1)'s 1st))) (set: $brewingPotionsBooksPurchased's (_isPurchased's 1st + 1)'s 3rd to "show") ($bookProgression:_readT, _isPurchased's 4th, _isPurchased, _bookTopic) ] (set: $brewingPotionsBooksPurchased's (_isPurchased's 1st)'s 2nd to "true") ] <!-- fin du if booktopic is brewing --> (if: _bookTopic is "healingpotions")[ (unless: _isPurchased is $healingPotionsBooksPurchased's last)[ (show: (hooks-named: "healingpotionsbook" + (str: $healingPotionsBooksPurchased's (_isPurchased's 1st + 1)'s 1st))) (set: $healingPotionsBooksPurchased's (_isPurchased's 1st + 1)'s 3rd to "show") ($bookProgression:_readT, _isPurchased's 4th, _isPurchased, _bookTopic) ] (set: $healingPotionsBooksPurchased's (_isPurchased's 1st)'s 2nd to "true") ] <!-- fin du if booktopic is brewing --> <!-- END OF IF YOUR BOOK TOPIC IS... --> (set: $money to it - _cost) (rerun: ?money) <!--(set: $flyingBooksPurchased's (_isPurchased's 1st)'s 2nd to "true")--> (rerun: ?buildingmodulesystem) (rerun: ?flyingbookscontent) (rerun: ?potionsbookscontent) ] ] (else: )[(print: " | ")(text-colour:#f43838)[(print: "- " + (str: _cost) + " " + (str: $currency))] (text-size:0.65)[(print: " (not enough " + (str: $currency) + ")")] ] ] (else: )[($bookProgression:_readT, _isPurchased's 4th, _isPurchased, _bookTopic)] }] ] )) } { |tableofplantbasedingredients>[] |tableconstruct>[ (set: $arrayOfIngredientsPlants to "<table class=\"ingredientstable\">") (set: $arrayOfIngredientsPlants to it + "<tr><th class=\"tabletitle\" colspan=\"3\">(print: \"๐ŸŒฑ Plant-based ๐ŸŒฑ\")</th></tr>") (set: $arrayOfIngredientsPlants to it + "<tr><td class=\"tabledesc\">(print: \"Name\")</td><td class=\"tabledesc\">(print: \"Description\")</td><td class=\"tabledesc\">(print: \"In stock\")</td><td class=\"tabledesc\">(print: \"Buy\")</td></tr>") (for: each _itemPlantBased, ...$plantBasedIngredients)[ (set: $arrayOfIngredientsPlants to it + "<tr><td>") (set: $arrayOfIngredientsPlants to it + "(hook: \"nameof\" + $plantBasedIngredients's (") (set: $arrayOfIngredientsPlants to it + (str: $plantBasedIngredients's (_itemPlantBased's 1st)'s 1st)) (set: $arrayOfIngredientsPlants to it + ")'s 6th)[") (set: $arrayOfIngredientsPlants to it + $plantBasedIngredients's (_itemPlantBased's 1st)'s 2nd) (set: $arrayOfIngredientsPlants to it + "]</td>") (set: $arrayOfIngredientsPlants to it + "<td>") (set: $arrayOfIngredientsPlants to it + "(hook: \"descriptionof\" + $plantBasedIngredients's (") (set: $arrayOfIngredientsPlants to it + (str: $plantBasedIngredients's (_itemPlantBased's 1st)'s 1st)) (set: $arrayOfIngredientsPlants to it + ")'s 6th)[") (set: $arrayOfIngredientsPlants to it + $plantBasedIngredients's (_itemPlantBased's 1st)'s 3rd) (set: $arrayOfIngredientsPlants to it + "]</td>") (set: $arrayOfIngredientsPlants to it + "<th>") (set: $arrayOfIngredientsPlants to it + "(hook: \"stockof\" + $plantBasedIngredients's (") (set: $arrayOfIngredientsPlants to it + (str: $plantBasedIngredients's (_itemPlantBased's 1st)'s 1st)) (set: $arrayOfIngredientsPlants to it + ")'s 6th)[") (set: $arrayOfIngredientsPlants to it + "(str: $plantBasedIngredients's ") (set: $arrayOfIngredientsPlants to it + (str: $plantBasedIngredients's (_itemPlantBased's 1st)'s 1st)) (set: $arrayOfIngredientsPlants to it + "'s 4th)]</th>") (set: $arrayOfIngredientsPlants to it + "<th>") (set: $arrayOfIngredientsPlants to it + "(hook: \"buy\" + $plantBasedIngredients's (") (set: $arrayOfIngredientsPlants to it + (str: $plantBasedIngredients's (_itemPlantBased's 1st)'s 1st)) (set: $arrayOfIngredientsPlants to it + ")'s 6th)[(link-rerun: \"- \" + (str: ") (set: $arrayOfIngredientsPlants to it + (str: $plantBasedIngredients's (_itemPlantBased's 1st)'s 5th)) (set: $arrayOfIngredientsPlants to it + ") + \" \" + (str: $currency))[(set: $plantBasedIngredients's (") (set: $arrayOfIngredientsPlants to it + (str: $plantBasedIngredients's (_itemPlantBased's 1st)'s 1st)) (set: $arrayOfIngredientsPlants to it + ")'s 4th to ") (set: $arrayOfIngredientsPlants to it + (str: $plantBasedIngredients's (_itemPlantBased's 1st)'s 4th)) (set: $arrayOfIngredientsPlants to it + " + 1)(set: $money to it - $plantBasedIngredients's (") (set: $arrayOfIngredientsPlants to it + (str: $plantBasedIngredients's (_itemPlantBased's 1st)'s 1st)) (set: $arrayOfIngredientsPlants to it + ")'s 5th)(rerun: ?money)(rerun: ?tableconstruct)]]</th></tr>") ] (set: $arrayOfIngredientsPlants to it + "</table>") (replace: ?tableofplantbasedingredients)[$arrayOfIngredientsPlants] <!-- deactivate Buy link and hide Stock quantities --> (for: each _itemPlantBased, ...$plantBasedIngredients)[ (unless: $plantBasedIngredients's (_itemPlantBased's 1st)'s 7th is "acquired")[ (replace: (hooks-named: "nameof" + $plantBasedIngredients's (_itemPlantBased's 1st)'s 6th))[(print: "Unknown ingredient")] (replace: (hooks-named: "buy" + $plantBasedIngredients's (_itemPlantBased's 1st)'s 6th))[(print: "โ€”")] (replace: (hooks-named: "stockof" + $plantBasedIngredients's (_itemPlantBased's 1st)'s 6th))[(print: "โ€”")] ] (unless: $plantBasedIngredients's (_itemPlantBased's 1st)'s 8th is "learned")[ (replace: (hooks-named: "descriptionof" + $plantBasedIngredients's (_itemPlantBased's 1st)'s 6th))[(print: "Read books to know more about ingredients")] ] ] ] } { |tableofanimalbasedingredients>[] |tableconstruct>[ (set: $arrayOfIngredientsAnimals to "<table class=\"ingredientstable\">") (set: $arrayOfIngredientsAnimals to it + "<tr><th class=\"tabletitle\" colspan=\"3\">(print: \"๐Ÿพ Animal-based ๐Ÿพ\")</th></tr>") (set: $arrayOfIngredientsAnimals to it + "<tr><td class=\"tabledesc\">(print: \"Name\")</td><td class=\"tabledesc\">(print: \"Description\")</td><td class=\"tabledesc\">(print: \"In stock\")</td><td class=\"tabledesc\">(print: \"Buy\")</td></tr>") (for: each _itemAnimalBased, ...$animalBasedIngredients)[ (set: $arrayOfIngredientsAnimals to it + "<tr><td>") (set: $arrayOfIngredientsAnimals to it + "(hook: \"nameof\" + $animalBasedIngredients's (") (set: $arrayOfIngredientsAnimals to it + (str: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 1st)) (set: $arrayOfIngredientsAnimals to it + ")'s 6th)[") (set: $arrayOfIngredientsAnimals to it + $animalBasedIngredients's (_itemAnimalBased's 1st)'s 2nd) (set: $arrayOfIngredientsAnimals to it + "]</td>") (set: $arrayOfIngredientsAnimals to it + "<td>") (set: $arrayOfIngredientsAnimals to it + "(hook: \"descriptionof\" + $animalBasedIngredients's (") (set: $arrayOfIngredientsAnimals to it + (str: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 1st)) (set: $arrayOfIngredientsAnimals to it + ")'s 6th)[") (set: $arrayOfIngredientsAnimals to it + $animalBasedIngredients's (_itemAnimalBased's 1st)'s 3rd) (set: $arrayOfIngredientsAnimals to it + "]</td>") (set: $arrayOfIngredientsAnimals to it + "<th>") (set: $arrayOfIngredientsAnimals to it + "(hook: \"stockof\" + $animalBasedIngredients's (") (set: $arrayOfIngredientsAnimals to it + (str: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 1st)) (set: $arrayOfIngredientsAnimals to it + ")'s 6th)[") (set: $arrayOfIngredientsAnimals to it + "(str: $animalBasedIngredients's ") (set: $arrayOfIngredientsAnimals to it + (str: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 1st)) (set: $arrayOfIngredientsAnimals to it + "'s 4th)]</th>") (set: $arrayOfIngredientsAnimals to it + "<th>") (set: $arrayOfIngredientsAnimals to it + "(hook: \"buy\" + $animalBasedIngredients's (") (set: $arrayOfIngredientsAnimals to it + (str: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 1st)) (set: $arrayOfIngredientsAnimals to it + ")'s 6th)[(link-rerun: \"- \" + (str: ") (set: $arrayOfIngredientsAnimals to it + (str: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 5th)) (set: $arrayOfIngredientsAnimals to it + ") + \" \" + (str: $currency))[(set: $animalBasedIngredients's (") (set: $arrayOfIngredientsAnimals to it + (str: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 1st)) (set: $arrayOfIngredientsAnimals to it + ")'s 4th to ") (set: $arrayOfIngredientsAnimals to it + (str: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 4th)) (set: $arrayOfIngredientsAnimals to it + " + 1)(set: $money to it - $animalBasedIngredients's (") (set: $arrayOfIngredientsAnimals to it + (str: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 1st)) (set: $arrayOfIngredientsAnimals to it + ")'s 5th)(rerun: ?money)(rerun: ?tableconstruct)]]</th></tr>") ] (set: $arrayOfIngredientsAnimals to it + "</table>") (replace: ?tableofanimalbasedingredients)[$arrayOfIngredientsAnimals] <!-- deactivate Name, Description, Buy link and hide Stock quantities --> (for: each _itemAnimalBased, ...$animalBasedIngredients)[ (unless: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 7th is "acquired")[ (replace: (hooks-named: "nameof" + $animalBasedIngredients's (_itemAnimalBased's 1st)'s 6th))[(print: "Unknown ingredient")] (replace: (hooks-named: "buy" + $animalBasedIngredients's (_itemAnimalBased's 1st)'s 6th))[(print: "โ€”")] (replace: (hooks-named: "stockof" + $animalBasedIngredients's (_itemAnimalBased's 1st)'s 6th))[(print: "โ€”")] ] (unless: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 8th is "learned")[ (replace: (hooks-named: "descriptionof" + $animalBasedIngredients's (_itemAnimalBased's 1st)'s 6th))[(print: "Read books to know more about ingredients")] ] ] ] }{ (set: $money to 4000) (set: $currency to '๐ŸŸก') <!-- Setting up lists of ingredients by ID Number, Name, Description, Quantity in stock, Market price --> (set: $plantBasedIngredientsOrigin to (a: (a: 1, "๐Ÿชด Mandragora", "Use to cure illnesses, and enter a second state.", 4, 25, "mandragora", "notAcquired", "notLearned"), (a: 2, "๐Ÿชท Passiflora", "Use to calm the mind and the body.", 8, 10, "passiflora", "notAcquired", "notLearned"), (a: 3, "๐ŸŒผ Elder", "Use in many medicinal recipes.", 10, 8, "elder", "notAcquired", "notLearned"), (a: 4, "๐Ÿซ Blackthorn", "Use it to curse people!", 6, 12, "blackthorn", "notAcquired", "notLearned"), (a: 5, "๐Ÿ„ Amanita Cimetierum", "Use it to resurect the dead!", 1, 100, "amanitacimetierum", "notAcquired", "notLearned"))) (set: $plantBasedIngredients to (a: (a: 1, "Unknown ingredient", "Read books to know more about ingredients", 4, 25, "mandragora", "notAcquired", "notLearned"), (a: 2, "Unknown ingredient", "Read books to know more about ingredients", 8, 10, "passiflora", "notAcquired", "notLearned"), (a: 3, "Unknown ingredient", "Read books to know more about ingredients", 10, 8, "elder", "notAcquired", "notLearned"), (a: 4, "Unknown ingredient", "Read books to know more about ingredients", 6, 12, "blackthorn", "notAcquired", "notLearned"), (a: 5, "Unknown ingredient", "Read books to know more about ingredients", 1, 100, "amanitacimetierum", "acquired", "notLearned"))) (set: $animalBasedIngredientsOrigin to (a: (a: 1, "๐Ÿธ๐Ÿ’ฆ Toad slime", "Use in many recipes.", 4, 15, "toadslime", "notAcquired", "notLearned"), (a: 2, "๐Ÿฆ… Raven's feet", "A powerful ingredient used in many recipes.", 8, 25, "ravensfeet", "notAcquired", "notLearned"))) (set: $animalBasedIngredients to (a: (a: 1, "Unknown ingredient", "Read books to know more about ingredients", 4, 15, "toadslime", "notAcquired", "notLearned"), (a: 2, "Unknown ingredient", "Read books to know more about ingredients", 8, 25, "ravensfeet", "notAcquired", "notLearned"))) |tableofplantbasedingredients>[] |tableconstruct>[ (print: " " + (str: $money) + $currency + " ") (set: $arrayOfIngredientsPlants to "<table class=\"ingredientstable\">") (set: $arrayOfIngredientsPlants to it + "<tr><th class=\"tabletitle\" colspan=\"3\">(print: \"๐ŸŒฑ Plant-based ๐ŸŒฑ\")</th></tr>") (set: $arrayOfIngredientsPlants to it + "<tr><td class=\"tabledesc\">(print: \"Name\")</td><td class=\"tabledesc\">(print: \"Description\")</td><td class=\"tabledesc\">(print: \"In stock\")</td><td class=\"tabledesc\">(print: \"Buy\")</td></tr>") (for: each _itemPlantBased, ...$plantBasedIngredients)[ (set: $arrayOfIngredientsPlants to it + "<tr><td>") (set: $arrayOfIngredientsPlants to it + $plantBasedIngredients's (_itemPlantBased's 1st)'s 2nd) (set: $arrayOfIngredientsPlants to it + "</td>") (set: $arrayOfIngredientsPlants to it + "<td>") (set: $arrayOfIngredientsPlants to it + $plantBasedIngredients's (_itemPlantBased's 1st)'s 3rd) (set: $arrayOfIngredientsPlants to it + "</td>") (set: $arrayOfIngredientsPlants to it + "<th>") (set: $arrayOfIngredientsPlants to it + "(hook: \"stockof\" + $plantBasedIngredients's (") (set: $arrayOfIngredientsPlants to it + (str: $plantBasedIngredients's (_itemPlantBased's 1st)'s 1st)) (set: $arrayOfIngredientsPlants to it + ")'s 6th)[") (set: $arrayOfIngredientsPlants to it + "(str: $plantBasedIngredients's ") (set: $arrayOfIngredientsPlants to it + (str: $plantBasedIngredients's (_itemPlantBased's 1st)'s 1st)) (set: $arrayOfIngredientsPlants to it + "'s 4th)]</th>") (set: $arrayOfIngredientsPlants to it + "<th>") (set: $arrayOfIngredientsPlants to it + "(hook: \"buy\" + $plantBasedIngredients's (") (set: $arrayOfIngredientsPlants to it + (str: $plantBasedIngredients's (_itemPlantBased's 1st)'s 1st)) (set: $arrayOfIngredientsPlants to it + ")'s 6th)[(link-rerun: \"- \" + (str: ") (set: $arrayOfIngredientsPlants to it + (str: $plantBasedIngredients's (_itemPlantBased's 1st)'s 5th)) (set: $arrayOfIngredientsPlants to it + ") + \" \" + (str: $currency))[(set: $plantBasedIngredients's (") (set: $arrayOfIngredientsPlants to it + (str: $plantBasedIngredients's (_itemPlantBased's 1st)'s 1st)) (set: $arrayOfIngredientsPlants to it + ")'s 4th to ") (set: $arrayOfIngredientsPlants to it + (str: $plantBasedIngredients's (_itemPlantBased's 1st)'s 4th)) (set: $arrayOfIngredientsPlants to it + " + 1)(set: $money to it - $plantBasedIngredients's (") (set: $arrayOfIngredientsPlants to it + (str: $plantBasedIngredients's (_itemPlantBased's 1st)'s 1st)) (set: $arrayOfIngredientsPlants to it + ")'s 5th)(rerun: ?tableconstruct)]]</th></tr>") ] (set: $arrayOfIngredientsPlants to it + "</table>") (replace: ?tableofplantbasedingredients)[$arrayOfIngredientsPlants] <!-- deactivate Buy link and hide Stock quantities --> (for: each _itemPlantBased, ...$plantBasedIngredients)[ (unless: $plantBasedIngredients's (_itemPlantBased's 1st)'s 7th is "acquired")[ (replace: (hooks-named: "buy" + $plantBasedIngredients's (_itemPlantBased's 1st)'s 6th))[(print: "โ€”")] (replace: (hooks-named: "stockof" + $plantBasedIngredients's (_itemPlantBased's 1st)'s 6th))[(print: "โ€”")] ] ] <!-- Reveal all Buy links --> (link: "Read All Books About Plants")[ <!-- Reveal all Information about the ingredients --> (for: each _itemPlantBased, ...$plantBasedIngredients)[ (put: $plantBasedIngredientsOrigin's (_itemPlantBased's 1st)'s 2nd into $plantBasedIngredients's (_itemPlantBased's 1st)'s 2nd) (put: $plantBasedIngredientsOrigin's (_itemPlantBased's 1st)'s 3rd into $plantBasedIngredients's (_itemPlantBased's 1st)'s 3rd) ] (rerun: ?tableconstruct) ] <!-- Fin du lien Read all books about plants --> ] } { |tableofanimalbasedingredients>[] |tableconstruct>[ (set: $arrayOfIngredientsAnimals to "<table class=\"ingredientstable\">") (set: $arrayOfIngredientsAnimals to it + "<tr><th class=\"tabletitle\" colspan=\"3\">(print: \"๐Ÿพ Animal-based ๐Ÿพ\")</th></tr>") (set: $arrayOfIngredientsAnimals to it + "<tr><td class=\"tabledesc\">(print: \"Name\")</td><td class=\"tabledesc\">(print: \"Description\")</td><td class=\"tabledesc\">(print: \"In stock\")</td><td class=\"tabledesc\">(print: \"Buy\")</td></tr>") (for: each _itemAnimalBased, ...$animalBasedIngredients)[ (set: $arrayOfIngredientsAnimals to it + "<tr><td>") (set: $arrayOfIngredientsAnimals to it + $animalBasedIngredients's (_itemAnimalBased's 1st)'s 2nd) (set: $arrayOfIngredientsAnimals to it + "</td>") (set: $arrayOfIngredientsAnimals to it + "<td>") (set: $arrayOfIngredientsAnimals to it + $animalBasedIngredients's (_itemAnimalBased's 1st)'s 3rd) (set: $arrayOfIngredientsAnimals to it + "</td>") (set: $arrayOfIngredientsAnimals to it + "<th>") (set: $arrayOfIngredientsAnimals to it + "(hook: \"stockof\" + $animalBasedIngredients's (") (set: $arrayOfIngredientsAnimals to it + (str: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 1st)) (set: $arrayOfIngredientsAnimals to it + ")'s 6th)[") (set: $arrayOfIngredientsAnimals to it + "(str: $animalBasedIngredients's ") (set: $arrayOfIngredientsAnimals to it + (str: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 1st)) (set: $arrayOfIngredientsAnimals to it + "'s 4th)]</th>") (set: $arrayOfIngredientsAnimals to it + "<th>") (set: $arrayOfIngredientsAnimals to it + "(hook: \"buy\" + $animalBasedIngredients's (") (set: $arrayOfIngredientsAnimals to it + (str: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 1st)) (set: $arrayOfIngredientsAnimals to it + ")'s 6th)[(link-rerun: \"- \" + (str: ") (set: $arrayOfIngredientsAnimals to it + (str: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 5th)) (set: $arrayOfIngredientsAnimals to it + ") + \" \" + (str: $currency))[(set: $animalBasedIngredients's (") (set: $arrayOfIngredientsAnimals to it + (str: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 1st)) (set: $arrayOfIngredientsAnimals to it + ")'s 4th to ") (set: $arrayOfIngredientsAnimals to it + (str: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 4th)) (set: $arrayOfIngredientsAnimals to it + " + 1)(set: $money to it - $animalBasedIngredients's (") (set: $arrayOfIngredientsAnimals to it + (str: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 1st)) (set: $arrayOfIngredientsAnimals to it + ")'s 5th)(rerun: ?tableconstruct)]]</th></tr>") ] (set: $arrayOfIngredientsAnimals to it + "</table>") (replace: ?tableofanimalbasedingredients)[$arrayOfIngredientsAnimals] <!-- deactivate Buy link and hide Stock quantities --> (for: each _itemAnimalBased, ...$animalBasedIngredients)[ (unless: $animalBasedIngredients's (_itemAnimalBased's 1st)'s 7th is "acquired")[ (replace: (hooks-named: "buy" + $animalBasedIngredients's (_itemAnimalBased's 1st)'s 6th))[(print: "โ€”")] (replace: (hooks-named: "stockof" + $animalBasedIngredients's (_itemAnimalBased's 1st)'s 6th))[(print: "โ€”")] ] ] ] }{ <!-- Setting up lists of ingredients by ID Number, Name, Description, Quantity in stock, Market price, ID hookName, Acquired or NotAcquired state --> (set: $plantBasedIngredients to (a: (a: 1, "๐Ÿชด Mandragora", "Use to cure illnesses, and enter a second state.", 4, 25, "mandragora"), (a: 2, "๐Ÿชท Passiflora", "Use to calm the mind and the body.", 8, 10, "passiflora"))) (set: $animalBasedIngredients to (a: (a: 1, "๐Ÿธ๐Ÿ’ฆ Toad slime", "Use in many recipes.", 4, 15, "toadslime"), (a: 2, "๐Ÿฆ… Raven's feet", "A powerful ingredient used in many recipes.", 8, 25, "ravensfeet"))) } |tableofplantbasedingredients>[<table class="ingredientstable"> <tr> <th class="tabletitle" colspan="3">(print: "๐ŸŒฑ Plant-based ๐ŸŒฑ")</th> </tr> <tr> <td class="tabledesc">(print: "Name")</td> <td class="tabledesc">(print: "Description")</td> <td class="tabledesc">(print: "In stock")</td> <td class="tabledesc">(print: "Buy")</td> </tr> <tr> <td>(print: $plantBasedIngredients's 1st's 2nd)</td> <td>(print: $plantBasedIngredients's 1st's 3rd)</td> <th>(hook: "stockof" + $plantBasedIngredients's 1st's 6th)[(print: (str: $plantBasedIngredients's 1st's 4th))]</th> <td>(hook: "buy" + $plantBasedIngredients's 1st's 6th)[(link-rerun: "- " + (str: $plantBasedIngredients's 1st's 5th) + " " + (str: $currency))[(set: $plantBasedIngredients's 1st's 4th to it + 1)(rerun: ?tableofplantbasedingredients)(set: $money to it - $plantBasedIngredients's 1st's 5th)(rerun: ?money)]]</td> </tr> <tr> <td>(print: $plantBasedIngredients's 2nd's 2nd)</td> <td>(print: $plantBasedIngredients's 2nd's 3rd)</td> <th>(print: (str: $plantBasedIngredients's 2nd's 4th))</th> </tr> </table> <table class="ingredientstable"> <tr> <th class="tabletitle" colspan="3">(print: "๐Ÿพ Animal-based ๐Ÿพ")</th> </tr> <tr> <td class="tabledesc">(print: "Name")</td> <td class="tabledesc">(print: "Description")</td> <td class="tabledesc">(print: "In stock")</td> <td class="tabledesc">(print: "Buy")</td> </tr> <tr> <td>(print: $animalBasedIngredients's 1st's 2nd)</td> <td>(print: $animalBasedIngredients's 1st's 3rd)</td> <th>(print: (str: $animalBasedIngredients's 1st's 4th))</th> </tr> <tr> <td>(print: $animalBasedIngredients's 2nd's 2nd)</td> <td>(print: $animalBasedIngredients's 2nd's 3rd)</td> <th>(print: (str: $animalBasedIngredients's 2nd's 4th))</th> </tr> </table>]{ (hide: (hooks-named: "buy" + $plantBasedIngredients's 1st's 6th)) (show: (hooks-named: "buy" + $plantBasedIngredients's 1st's 6th)) (hide: (hooks-named: "stockof" + $plantBasedIngredients's 1st's 6th)) }{ (display: "Start variables") (display: "๐Ÿงช Potions Recipes") |timeofday>[(display: "Time_system")] |tableofhealingpotions>[] |tableconstruct>[ (set: $arrayOfHealingPotions to "<table class=\"ingredientstable\">") (set: $arrayOfHealingPotions to it + "<tr><th class=\"tabletitle\" colspan=\"3\">(print: \"โค๏ธโ€๐Ÿฉน Healing Potions\")</th></tr>") (set: $arrayOfHealingPotions to it + "<tr><td class=\"tabledesc\">(print: \"Name\")</td><td class=\"tabledesc\">(print: \"Ingredients needed\")</td><td class=\"tabledesc\">(print: \"In stock\")</td><td class=\"tabledesc\">(print: \"Make\")</td></tr>") (for: each _healingPotions, ...$healingPotionsRecipesAcquired)[ (set: $arrayOfHealingPotions to it + "<tr><td>") (set: $arrayOfHealingPotions to it + "(print: $healingPotion") (set: $arrayOfHealingPotions to it + (str: _healingPotions's 1st)) (set: $arrayOfHealingPotions to it + "'s 1st)</td>") (set: $arrayOfHealingPotions to it + "<td>(hook: \"tablecellquantity\" + $healingPotion") (set: $arrayOfHealingPotions to it + (str: _healingPotions's 1st)) (set: $arrayOfHealingPotions to it + "'s 5th)[]</td><th>(print: $healingPotion") (set: $arrayOfHealingPotions to it + (str: _healingPotions's 1st)) (set: $arrayOfHealingPotions to it + "'s 3rd)</th>") (set: $arrayOfHealingPotions to it + "<th>") (set: $arrayOfHealingPotions to it + "($checkIngredientAvailableForPotionMacro: $healingPotion") (set: $arrayOfHealingPotions to it + (str: _healingPotions's 1st)) (set: $arrayOfHealingPotions to it + ", $healingPotionRecipe") (set: $arrayOfHealingPotions to it + (str: _healingPotions's 1st)) (set: $arrayOfHealingPotions to it + ")</th></tr>") ] (set: $arrayOfHealingPotions to it + "</table>") (replace: ?tableofhealingpotions)[$arrayOfHealingPotions] |ingredientsquantitycountdown>[] ] } { <!-- Loading ๐Ÿงช Potions Recipes Passage Here --> (display: "๐Ÿงช Potions Recipes") |tableofhealingpotions>[] |tableconstruct>[ (set: $arrayOfHealingPotions to "<table class=\"ingredientstable\">") (set: $arrayOfHealingPotions to it + "<tr><th class=\"tabletitle\" colspan=\"3\">(print: \"โค๏ธโ€๐Ÿฉน Healing Potions โค๏ธโ€๐Ÿฉน\")</th></tr>") (set: $arrayOfHealingPotions to it + "<tr><td class=\"tabledesc\">(print: \"Name\")</td><td class=\"tabledesc\">(print: \"Ingredients needed\")</td><td class=\"tabledesc\">(print: \"In stock\")</td><td class=\"tabledesc\">(print: \"Make\")</td></tr>") (for: each _healingPotions, ...$healingPotionsRecipesAcquired)[ (set: $arrayOfHealingPotions to it + "<tr><td>") (set: $arrayOfHealingPotions to it + "(hook: \"nameofpotion\" + $AllPotionsCount's ") (set: $arrayOfHealingPotions to it + (str: _healingPotions's 1st)) (set: $arrayOfHealingPotions to it + "'s 1st's 5th)[") (set: $arrayOfHealingPotions to it + "(print: $healingPotion") (set: $arrayOfHealingPotions to it + (str: _healingPotions's 1st)) (set: $arrayOfHealingPotions to it + "'s 1st)]</td>") (set: $arrayOfHealingPotions to it + "<td>(hook: \"tablecellquantity\" + $healingPotion") (set: $arrayOfHealingPotions to it + (str: _healingPotions's 1st)) (set: $arrayOfHealingPotions to it + "'s 5th)[]</td><th>") (set: $arrayOfHealingPotions to it + "(hook: \"stockof\" + $AllPotionsCount's ") (set: $arrayOfHealingPotions to it + (str: _healingPotions's 1st)) (set: $arrayOfHealingPotions to it + "'s 1st's 5th)[") (set: $arrayOfHealingPotions to it + "(print: $healingPotion") (set: $arrayOfHealingPotions to it + (str: _healingPotions's 1st)) (set: $arrayOfHealingPotions to it + "'s 3rd)]</th>") (set: $arrayOfHealingPotions to it + "<th>") (set: $arrayOfHealingPotions to it + "($checkIngredientAvailableForPotionMacro: $healingPotion") (set: $arrayOfHealingPotions to it + (str: _healingPotions's 1st)) (set: $arrayOfHealingPotions to it + ", $healingPotionRecipe") (set: $arrayOfHealingPotions to it + (str: _healingPotions's 1st)) (set: $arrayOfHealingPotions to it + ")</th></tr>") (print: $AllPotionsCount's (_healingPotions's 1st)'s 1st's 8th) ] (set: $arrayOfHealingPotions to it + "</table>") (replace: ?tableofhealingpotions)[$arrayOfHealingPotions] <!-- deactivate Make link and hide Stock quantities --> (for: each _healingPotions, ...$healingPotionsRecipesAcquired)[ (unless: $healingPotionsRecipesAcquired's (_healingPotions's 1st)'s 2nd is "acquired")[ (replace: (hooks-named: "nameofpotion" + $AllPotionsCount's (_healingPotions's 1st)'s 1st's 5th))[(print: "Unknown recipe")] (replace: (hooks-named: "make" + $AllPotionsCount's (_healingPotions's 1st)'s 1st's 5th))[(print: "โ€”")] (replace: (hooks-named: "stockof" + $AllPotionsCount's (_healingPotions's 1st)'s 1st's 5th))[(print: "โ€”")] (replace: (hooks-named: "tablecellquantity" + $AllPotionsCount's (_healingPotions's 1st)'s 1st's 5th))[(print: "Read books to learn recipes")] ] ] ] }{ <!-- Brewing progression Macro --> (set: $brewingPotionsMacro to (macro: num-type _BrewingTProg, num-type _BrewProg, num-type _BrewT, array-type _PotionBrewed, [ (output: )[{ (set: _reloadHookName to "reloadbrewing" + (str: _PotionBrewed's 5th)) (hook: _reloadHookName)[ <!-- Applying prog brewing en cours --> (if: _BrewProg is < _BrewT)[ (print: "๐Ÿ”ฅ Brewing " + _PotionBrewed's 1st + "... ") (set: _PotionBrewed's 8th to "beingBrewed") (set: $AllPotionsCount's (_PotionBrewed's 6th)'s 1st's 8th to "beingBrewed") (set: _BrewProg to _BrewingTProg) (set: $AllPotionsCount's (_PotionBrewed's 6th)'s 1st's 7th to _BrewProg) |brewinggraph>[(meter: bind _BrewProg, _BrewT, "X", (gradient: 90, 0, yellow, 1, orange))] (print: " ") ] <!-- Fin du if prog brewing --> (if: _BrewProg is >= _BrewT)[ (if: _PotionBrewed's 8th is "beingBrewed")[ <!-- set local variable inside the macro --> (set: _PotionBrewed's 8th to "brewed") <!-- set global variable outside the macro --> (set: $AllPotionsCount's (_PotionBrewed's 6th)'s 1st's 8th to _PotionBrewed's 8th) ] <!-- Fin du if potion not brewed --> (else-if: _PotionBrewed's 8th is "brewed")[ <!-- Increase stock of Potion --> (set: $AllPotionsCount's (_PotionBrewed's 6th)'s 1st's 3rd to it + 1) ] <!-- Fin du else-if potion brewed --> ] <!-- Fin du if brewing terminรฉ --> ] <!-- Fin du hook reloadHookName --> }]])) <!-- FIN Brewing progression Macro --> }