Mastery bonus - Arcanorum/rogueworld GitHub Wiki

Purpose

When looking at the AP requirements of a spell or item, it is common for a character to have more than that requirement in APs.

Spell A may have a requirement of 2 APs in Summoning, and a character may have 5 APs in Summoning, so the 3 extra points are of no use to this spell. Even if those 3 extra points may make other spells available to be unlocked later, they are still useless to Spell A.

Having more than the required APs for a spell/item should still offer some benefit, as due to the fact that there are generally more spells/items with lower AP requirements, and fewer new options the higher the AP requirements go, so the benefit of having higher APs diminishes.

For example, there may be 10 spells with a requirement of 1 Enchanting, but only 2 spells with a requirement of 6 Enchanting, so having progressively more points in Enchanting offers fewer and fewer new options (even though they may be more powerful).

Activation time reduction

For spells and items, each additional point in an attribute beyond what the requirement in that attribute is for a spell/item are turned into a bonus that is applied to that spell/item, in the form of a reduction in activation time, where a greater difference between the required APs and APs a character has results in a greater reduction.

For example, if the bonus per point difference is 10% (0.1), then for a spell/item with an AP requirement of 2 (in any attribute, or combination of), if the character has 5 points in that attribute, then the difference is 3, so they would gain a 27% reduction (see formula section for why it isn't 30%), or that spell/item activates in 73% of the normal time.

This bonus value (e.g. 10%) can be configured per spell/item, to combat instances where the reduction in activation rate for certain spells/items needs to be able to be adjusted/limited for balance reasons.

A spell or item with no AP requirements is not affected by this system. The lack of AP requirements is not considered as 0/zero, but instead as null.

This creates an interesting dilemma for the player, where they can continue to use a weaker spell/item that they can use more often due to the activation time reduction, or a more powerful spell/item with higher AP requirements that therefore takes longer to use due to it being closer to their character's own APs, reducing the difference between the APs and thus a lower/no reduction.

Consider the following chart, that illustrates a range of spells/items with different requirements in any given attribute, and the bonus for each of those spells/items (note this chart doesn't factor in the compound effect of each decrease) when used by a range of characters with different amounts of points in that given attribute:

Formula

The formula for this bonus works as a compound percentage decrease, not a simple flat value based on the AP requirement difference.

If it worked using a simple total percentage value, then for an AP requirement difference of 5 with a reduction per point difference of 20%, then the reduction would be 100% reduction (5 x 20%), so the item or spell would activate instantly, or even in negative time if over 100% difference which doesn't make sense.

This way, every additional point of difference has a smaller and smaller effect, eventually to the point that more points have no effect (since the multiplier is rounded up to the second decimal place), or a maximum of 99% reduction.

So an example of the correct formula would look like the following. Assume the reduction per point difference is 10% and that the difference is 3.

Find the reduction percentage from one point
    1
- 0.1 (10%)
  ___
  0.9

Find the compound reduction percentage for all points
  0.9
^   3 (AP difference)
  _____
  0.729

Round up to 2 decimal places to find the final multiplier
  0.73 (27% reduction)

This is a subtle hidden mechanic that is not explicitly shown to the user, but provides additional depth that they can explore.

// TODO what about multiple attribute requirements? provide more concrete examples, in particular with items

// TODO what about reductions from other sources? like if I have 30% reduction from this mastery and another 20% reduction from something else (like a feat)? which is applied first?