Game mechanics (investigation)

InvestigatingThis section is undergoing investigation. Information may be unclear, confusing, or incorrect.This message will disappear when the investigation has concluded.
Caution!This page should not be linked in other pages, nor should the information be passed onto other pages unless you've verified the code yourself.
This page is used to catalogue information from investigating the game's code.

## Mastering recipes

Recipes are categorised as basic, easy, medium and hard.

Recipes are mastered once recipe EXP becomes 100. Each time you use a recipe you gain Intellect \* 2 recipe EXP. Basic recipes start at 50. Easy recipes start at 35. Medium recipes start at 20. Hard recipes start at 10.

## Shop mechanics

### Shop buy and sell values

Shopkeepers have an internal value that multiplies the cost of items. The witch for example has a buy value of 2 and a sell value of 0.5. This means that all item gold values are multiplied by 2 to sell to the player, while the item gold values will be multipled by 0.5 (essentially halved) when sold to the witch.

shopkeeper.sell\_cost = 0.5
means the shop will BUY from the player 50% of the value of the item back.

shopkeeper.buy\_cost = 1.5
means the shop will SELL to the player 150% of the value of the item.

Bernard adds 30% to his buy value (increased value when selling for the player) and 30% to his sell value (discount for the player).

### Examples

A Silver Bomb has a gold value of 30. The witch will sell it for 60 gold. The sell value is still being investigated.

### Shop buy and sell lists

Each shop has a list of items that it will stock, and a list of items it will buy from the player.

### Prices

Players can affect the price of wares with Charisma. Each point of Charisma offers a discount of 1% when buying up to a maximum of 30%.

## Item mechanics

### Consumables

Crafting skills increases the power values by 5 per tier so tier 1 is 0, tier 2 is 1 and tier 3 is 2 tier 4 is 3. max craftingskill is master which is a value of 3 so 15 total power value is the max from crafting skill as the formula is craftingskill \* 5 = crafting power bonus. This means bombs power value deals more damage, potions heal by crafting power bonus so max crafting being 15, potions heal 15 more. If you have higher than 10 Intelligence, it starts increasing these values by 1 per 2 Intellect. So 9 or less no bonus. 10 intelligence = 5 power value. The game adds a random number from 1 to 5 to the final value to simulate damage/healing ranges.

Combat items have their own power values and never uses the attack damage calculation function. It directly modifies the monsters health based on the power value. The power value is modified by crafting skill, a random power value of 1-5 added, the item's power value, and the trait system. if its immune, power value heals monster. if immune, power value becomes 0. if resistant, power value is halved. if weak, power value is doubled.

Using lust potions on a demon has its effect reduced by 50%. So 10 libido damage becomes 5.

## Combat mechanics

Monsters have traits such as fire, thunder, air, silver. These are used in damage calculation.

## Damage calculation

Battle skill is 0 for novice all the way to master at 3. If weapon is piercing or player has razit's protection, protection is ignored. If weapon applies diminish protection, protection is halved.

Base damage = Strength + damage stat from all gear + Battle skill \* 5.

Total damage = base damage \* (protection value/100)

## Critical hit

Critical hits can never be below 0 or above 100. When a hit becomes a critical, total damage becomes total damage x 2 BEFORE damage reduction.

Perception past 5 will add 2% of Critical hit. Intellect past 5 will add 1% of critical hit.

### Diminish protection

Weapons that apply this effect halves target protection when calculating damage.

### Property Resistance

getDMG() factors in elemental attributes. As of public version 0.62 resistance buffs only add 10 Property Resistance but the wording implies there'll be higher tiers of resistances. Gear can add higher tiers of Property Resistance. Property Resistance is easy to compare. Elemental attacks are reduced by 1 per Property Resistance. So 10 water resistance reduces water damage by -10.

### Item damage

Item calculation is simple. Combat items have power values. Crafting skill adds 5 per tier, max being 15. Random value of 1 to 5 added and that's how much damage the item will do, disregarding all protections, except traits.

## Stat checks

### Calculating stat checks

The game commonly uses a difficulty class, which is a number, similar to tabletop games to determine success or failure. When an action has a chance of failure, the game gets the player's appropriate stat, adds a random modifier to it and compares the player's score and the difficulty class. If the player's score equals or is above the difficulty class, the player succeeds. The range for the random modifier is 1-5 or 1-10 as of public version 0.62.

This means that the highest number on the random modifier plus your stat needs to meet the difficulty class to have a chance for the action to succeed. Here's a table to help you understand, assuming the difficulty class is 15.

As an example stealing from a customer has a difficulty class of 15 Agility. The game checks the player's Agility which is 12. It then rolls a number between 1 to 5 which happens to be 3 so the player's Agility score is now 15. Since the player met the difficulty class, the player succeeded.

## Enemy combat behaviours

Combat decisions are decided on a dice roll between 1 to 100 and behaviours are decided by the range on the dice. For example, doing a basic attack when the dice roll is between 1 to 10.

Enemies will attack less often, and tease more often when you have a positive relation with their types. Having max relation, which is 100, will add 25 to the dice roll when dictating behaviors. This means that some attacks will be removed or have a lowered chance to happen, and the teasing will happen more often.