Trading

From Trap Quest Wiki
Jump to: navigation, search

Trading is the main way for the player to increase an npc's friendliness score without taking a drastic measure like having sex with them. Trading can also be used to appease a npc that's trying to attack the player, provided that what the player is offering is valuable enough to them.

Accepting Trades

While certain npc's will always accept or reject certain items, for the most part they decide to accept items based on the following set of formulas:

barter_value = value of the item for the npc.
charm_power = player charisma divided by 4
convincing_power = barter_value + charm_power

If convincing_power is less than 0, then the npc usually rejects the trade. If convincing_power is above 0 and the npc is friendly, then the npc usually accepts the trade.

low_smarts_roll = 1 if the player's intelligence score is greater than or equal to a random number between 5 and 25, 0 if its lower
high_smarts_roll = 1 if the player's intelligence score is greater than or equal to a random number between 10 and 25, 0 if its lower
low_anger_threshold = 1 if the npc is missing any health, 0 if it isn't
high_anger_threshold = 1 if the npc is missing half of its health, 0 if it isn't
random_threshold = The square root of a random number between 1 and 15. For our purposes, we can think of this as a number that has a 20% chance to be higher than 1 but less than 2, a 33% chance to be higher than 2 but less than 3, and a 47% chance to be higher than 3.
npc_mood = 0 + low_smarts_roll + high_smarts_roll - low_anger_threshold - high_anger_threshold

If the npc is unfriendly, they will only accept the trade if the sum of npc_mood and convincing_power and is higher than or equal to random_threshold.