You are a resident of a medieval kingdom. Your parents moved here from a more advanced place with a lot of money, but the new king has banned the usage of money. After your parents passed away, you are left with the challenge of accumulating wealth to become the next king within 15 days. You can use money for trade, but this brings more attention to yourself from the authorities, and may affect your reputation with others. Alternatively, you can use items for trade, but this may not always be the best option. The game ends when your total wealth exceeds that of the king.
[[Embark on the Wealth Accumulation Challange, and Bring Back Prosperity|Town Square]]
<<set $itemToBuy = "">>
<<set $npc = "">>You are currently at the town square. From here, you can travel to different locations to trade items and accumulate wealth.
[["Travel to the Herbalist"|Herbalist]]
[["Travel to the Blacksmith"|Blacksmith]]
[["Travel to the Royal Guard"|Royal Guard]]<<if setup.procJailRng() is true>>
<<goto "Jail">>
<</if>>\
<<include "State">>
You arrive at the <span class="it">Herbalist</span>'s shop. The herbalist is interested in medicinal herbs and potions. They can offer unique items that are not available elsewhere, but are also very picky about their customers and reputation.
Your reputation with the <span class="it">herbalist</span> is currently: <span class="gr"><<=setup.npcs.herbalist.rep>></span>.
<<nobr>>
<<set _initiatedTrade to false>>
<<set _i to 0>>
<<endnobr>>
The <span class="it">Herbalist</span> sells the following items:
<<=setup.printNpcInv("herbalist")>>
<<linkreplace "Trade with Herbalist">>\
<<set _initiatedTrade to true>>\
You decided to trade with the <span class="it">Herbalist</span>
Which item would you like to buy?
@@#isBuyingItem;
<<set $npc = "herbalist">>\
<<include "Trade">>\
@@\
<</linkreplace>>
[["Travel to the Town Square"|Town Square]]
[["Travel to the Alchemist"|Alchemist]]
[["Travel to the Royal Guard"|Royal Guard]]
[["Travel to the Priest"|Priest]]<<set _npcProperName = setup.npcs[$npc].name>>
<<set _npcObj = setup.npcs[$npc]>>\
<<for _i to 0; _i lt _npcObj.inv.length; _i++>>\
<<capture _i>>\
<<link _npcObj.inv[_i]>>\
<<replace "#isBuyingItem">>
You decide to buy <span class="bl"><<=_npcObj.inv[_i]>></span>
You ask the <span class="it">$npc</span> to evaluate your inventory. What do you decide to offer for the trade?
@@#traded;
<<link "Money">>
<<replace "#traded">>
You offer money for the <span class="it">$npc</span>'s <span class="bl">_npcObj.inv[_i]</span>
<<=setup.spendMoney($npc, _npcObj.inv[_i])>>
Feel free to continue traveling, or\
<<link `"revisit the " + _npcProperName`>>
<<goto _npcProperName>>
<</link>>
<</replace>>
<</link>>
<<for _j to 0; _j lt setup.inv.length; _j++>>\
<<capture _j>>\
<<link `setup.inv[_j] + " - " + setup.getNpcEval(true, $npc, setup.inv[_j]) + "g"`>>\
<<replace "#traded">>
You offer to trade your <span class="bl"><<=setup.inv[_j]>></span> for the <span class="it">$npc</span>'s <span class="bl">_npcObj.inv[_i]</span>
<<=setup.trade($npc, setup.inv[_j], _npcObj.inv[_i])>>
Feel free to continue traveling, or \
<<link `"revisit the " + _npcProperName`>>
<<goto _npcProperName>>
<</link>>
<</replace>>
<</link>>
<</capture>>\
<</for>>\
@@\
<</replace>>\
<</link>>
<</capture>>
<</for>>\<<if setup.procJailRng() is true>>
<<goto "Jail">>
<</if>>\
<<include "State">>
You arrive at the <span class="it">Alchemist</span>'s shop. The alchemist is interested in rare and exotic ingredients for their potions and experiments. They can offer high prices for such items, but are also very cautious about dealing with strangers.
Your reputation with the <span class="it">alchemist</span> is currently: <span class="gr"><<=setup.npcs.alchemist.rep>></span>.
<<nobr>>
<<set _initiatedTrade to false>>
<<set _i to 0>>
<<endnobr>>
The <span class="it">Alchemist</span> sells the following items:
<<=setup.printNpcInv("alchemist")>>
<<linkreplace "Trade with Alchemist">>\
<<set _initiatedTrade to true>>\
You decided to trade with the <span class="it">Alchemist</span>
Which item would you like to buy?
@@#isBuyingItem;
<<set $npc = "alchemist">>\
<<include "Trade">>\
@@\
<</linkreplace>>
[["Travel to the Priest"|Priest]]
[["Travel to the Herbalist"|Herbalist]]
[["Travel to the Royal Guard"|Royal Guard]]
[["Travel to the Smuggler"|Smuggler]]<<if setup.procJailRng() is true>>
<<goto "Jail">>
<</if>>\
<<include "State">>
You arrive at the <span class="it">Royal Guard</span>'s shop. The royal guard is responsible for enforcing the king's laws and regulations. They are suspicious of anyone who uses money, and will confiscate all their goods if caught. They also have a keen sense of justice, and can be swayed to help players who are fighting against injustice.
Your reputation with the <span class="it">Royal Guard</span> is currently: <span class="gr"><<=setup.npcs.royalGuard.rep>></span>.
<<nobr>>
<<set _initiatedTrade to false>>
<<set _i to 0>>
<<endnobr>>
The <span class="it">Royal Guard</span> sells the following items:
<<=setup.printNpcInv("royalGuard")>>
<<linkreplace "Trade with Royal Guard">>\
<<set _initiatedTrade to true>>\
You decided to trade with the <span class="it">Royal Guard</span>
Which item would you like to buy?
@@#isBuyingItem;
<<set $npc = "royalGuard">>\
<<include "Trade">>\
@@\
<</linkreplace>>
[["Travel to the Town Square"|Town Square]]
[["Travel to the Alchemist"|Alchemist]]
[["Travel to the Herbalist"|Herbalist]]
[["Travel to the Blacksmith"|Blacksmith]]
[["Travel to the Thief"|Thief]]
[["Travel to the Noblewoman"|Noblewoman]]<<if setup.procJailRng() is true>>
<<goto "Jail">>
<</if>>\
<<include "State">>
You arrive at the <span class="it">Blacksmith</span>'s shop. The blacksmith is interested in raw metals and weapons. They are known for their skill in forging weapons and armor, and can offer discounts to players with good reputations.
Your reputation with the <span class="it">blacksmith</span> is currently: <span class="gr"><<=setup.npcs.blacksmith.rep>></span>.
<<nobr>>
<<set _initiatedTrade to false>>
<<set _i to 0>>
<<endnobr>>
The <span class="it">Blacksmith</span> sells the following items:
<<=setup.printNpcInv("blacksmith")>>
<<linkreplace "Trade with Blacksmith">>\
<<set _initiatedTrade to true>>\
You decided to trade with the <span class="it">Blacksmith</span>
Which item would you like to buy?
@@#isBuyingItem;
<<set $npc = "blacksmith">>\
<<include "Trade">>\
@@\
<</linkreplace>>
[["Travel to the Town Square"|Town Square]]
[["Travel to the Royal Guard"|Royal Guard]]
[["Travel to the Town Square"|Town Square]]It's over.
<span class="it">"As you made your way through the town, your attention became too much for the guards to ignore. They cornered you and, with a rough hand, hauled you off to jail. Despite your attempts to plead your innocence, your high level of attention marked you as a troublemaker, and you were locked away for good. Your quest is over, and your name will be remembered as a cautionary tale for all who dare to draw too much attention to themselves."</span><<set _totalValue to setup.calcWealth()>>\
<<if _totalValue gt setup.kingWealth>>
<<goto "Kingdom Castle">>
<</if>>\
<div id="stateContainer">\
You take a look at your inventory:
<<for _k = 0; _k < setup.inv.length; _k++>>
- <span class="bl"><<=setup.inv[_k]>></span> (usually worth around <span class = "yl"><<=setup.items.get(setup.inv[_k])>>g</span>)
<</for>>
and estimate its total value to be around <span class="yl"><<print _totalValue + "g">></span>.
<<if _totalValue lt setup.kingWealth>>Your wealth needs to increase by around <<=setup.kingWealth - _totalValue>> more gold to surpass the wealth of the king.<<endif>>
You also take note of the attention you have received from the authorities due to your recent activities: <span class="rd"><<=setup.att>></span>
</div>\
A New King
<span class='id'>"Congratulations! With your wealth now surpassing that of the king, you have proven yourself to be the most powerful figure in the kingdom. But your journey has not been easy. You had to navigate a world where money was banned and trade was restricted, yet you found a way to accumulate enough wealth to take the throne. As the new king, you lift the ban on money and usher in a new era of prosperity and opportunity for all. Your name will go down in history as the one who brought back the power of money and changed the course of the kingdom's future."</span>
<<if setup.procJailRng() is true>>
<<goto "Jail">>
<</if>>\
<<include "State">>
You arrive at the <span class="it">Priest</span>'s shop. The priest is a religious figure who is interested in collecting religious artifacts and holy relics. They offer blessings and spiritual guidance to those who seek it, and are known to have connections with powerful people in the kingdom. They are very particular about their reputation and will not associate with those who are seen as immoral or unethical.
Your reputation with the <span class="it">priest</span> is currently: <span class="gr"><<=setup.npcs.priest.rep>></span>.
<<nobr>>
<<set _initiatedTrade to false>>
<<set _i to 0>>
<<endnobr>>
The <span class="it">Priest</span> sells the following items:
<<=setup.printNpcInv("priest")>>
<<linkreplace "Trade with Priest">>\
<<set _initiatedTrade to true>>\
You decided to trade with the <span class="it">Priest</span>
Which item would you like to buy?
@@#isBuyingItem;
<<set $npc = "priest">>\
<<include "Trade">>\
@@\
<</linkreplace>>
[["Travel to the Alchemist"|Alchemist]]
[["Travel to the Herbalist"|Herbalist]]<<if setup.procJailRng() is true>>
<<goto "Jail">>
<</if>>\
<<include "State">>
You arrive at the <span class="it">Thief</span>'s shop.The thief is a notorious criminal who steals from unsuspecting merchants and travelers. They are always looking for ways to increase their wealth, and will accept money in exchange for their stolen goods.
Your reputation with the <span class="it">thief</span> is currently: <span class="gr"><<=setup.npcs.thief.rep>></span>.
<<nobr>>
<<set _initiatedTrade to false>>
<<set _i to 0>>
<<endnobr>>
The <span class="it">Thief</span> sells the following items:
<<=setup.printNpcInv("thief")>>
<<linkreplace "Trade with Thief">>\
<<set _initiatedTrade to true>>\
You decided to trade with the <span class="it">Thief</span>
Which item would you like to buy?
@@#isBuyingItem;
<<set $npc = "thief">>\
<<include "Trade">>\
@@\
<</linkreplace>>
[["Travel to the Smuggler"|Smuggler]]
[["Travel to the Royal Guard"|Royal Guard]]<<if setup.procJailRng() is true>>
<<goto "Jail">>
<</if>>\
<<include "State">>
You arrive at the <span class="it">Smuggler</span>'s shop. The smuggler is a secretive figure who deals in illegal goods such as drugs and weapons. They are willing to accept money from anyone, but are also very dangerous and can turn on their customers if they feel threatened.
Your reputation with the <span class="it">Smuggler</span> is currently: <span class="gr"><<=setup.npcs.smuggler.rep>></span>.
<<nobr>>
<<set _initiatedTrade to false>>
<<set _i to 0>>
<<endnobr>>
The <span class="it">Smuggler</span> sells the following items:
<<=setup.printNpcInv("smuggler")>>
<<linkreplace "Trade with Smuggler">>\
<<set _initiatedTrade to true>>\
You decided to trade with the <span class="it">Smuggler</span>
Which item would you like to buy?
@@#isBuyingItem;
<<set $npc = "smuggler">>\
<<include "Trade">>\
@@\
<</linkreplace>>
[["Travel to the Thief"|Thief]]
[["Travel to the Alchemist"|Alchemist]]<<if setup.procJailRng() is true>>
<<goto "Jail">>
<</if>>\
<<include "State">>
You arrive at the <span class="it">Noblewoman</span>'s shop. The noblewoman is interested in luxury items such as jewelry and fine fabrics. They do not tolerate any form of misconduct or indecency, and will not accept money or goods from players with a bad reputation.
Your reputation with the <span class="it">noblewoman</span> is currently: <span class="gr"><<=setup.npcs.noblewoman.rep>></span>.
<<nobr>>
<<set _initiatedTrade to false>>
<<set _i to 0>>
<<endnobr>>
The <span class="it">Noblewoman</span> sells the following items:
<<=setup.printNpcInv("noblewoman")>>
<<linkreplace "Trade with Noblewoman">>\
<<set _initiatedTrade to true>>\
You decided to trade with the <span class="it">Noblewoman</span>
Which item would you like to buy?
@@#isBuyingItem;
<<set $npc = "noblewoman">>\
<<include "Trade">>\
@@\
<</linkreplace>>
[["Travel to the Royal Guard"|Royal Guard]]