User:Krschkr/Seemingly infinite enchantment bug

Investigations on how the seemingly infinite enchantment bug happens. While there were some interesting details uncovered, I never found the ultimate solution to this riddle.

"Seemingly"
I'll operate with two cumbersome wordings:

Seemingly infinite enchantment duration
 * It is most likely that the created long enchantment durations are limited. I assume that, just like conditions (see here), the cap is at 12 hours and 5 seconds. A duration of 10 minutes and 55 seconds which has been proposed based on "None Shall Pass!" is insufficient to explain the observations. When trying to use this bug the concrete resulting enchantment duration is not relevant anyway: It will be a few hours: More than needed, less than conceivable.

Seemingly not applied
 * Based on the strength of the applied enchantment duration reduction skills an increasing range of enchantments gets reduced to a duration of 0. Such an enchantment gets seemingly not applied. However, this is not entirely true. Just like a 0 seconds duration condition will trigger [[Fragility] once, a 0 seconds duration enchantment will trigger [[Soul Barbs] once.

The bug
By decreasing the enchantment duration enchantments with a low base duration can receive a largely increased duration instead.

I. With three skills (works up to 4 seconds enchantments)
1) A combination of all enchantment duration decreasing skills is required: 2) Skill order is integral for the bug to occur. Tranquility has to be applied before air of disenchantment. Mark of insecurity can be used at any point in the effect chain. The working skill orders therefore are: 3) The strength of tranquility determines the duration of enchantments which can be affected by the bug.
 * Tranquility → mark of insecurity → air of disenchantment
 * Tranquility → air of disenchantment → mark of insecurity
 * Mark of insecurity → tranquility → air of disenchantment
 * (0) suffices for 2 seconds enchantments.
 * (7) is required for 3 seconds.
 * (16) is required for 4 seconds.
 * (20) is the strongest possible tranquility due to attribute levels being capped at 20. It does not suffice for 5 seconds enchantments.

4) An attribute level of at least 5 illusion magic is required for the bug to occur. Higher attribute levels don't have an effect on the bug.

5) An attribute level of 0 deadly arts is sufficient for the bug to occur.

6) The bug does not occur if an enchantment hits a duration of 0. That is easily achieved with two skills and already happens with just mark of insecurity at 0 deadly arts. Instead the enchantment will be seemingly not applied.

II. With two skills (works with 1 second enchantments)
1) Mark of insecurity and air of disenchantment are required. 2) Skill order is integral for the bug to occur. Mark of insecurity has to be applied first.

3) Only one second enchantments can be affected.

4) An attribute level of at least 5 illusion magic is required for the bug to occur. Higher attribute levels don't have an effect on the bug.

5) An attribute level of 0 deadly arts is sufficient for the bug to occur.

6) The bug does not occur if an enchantment hits a duration of 0. That is easily achieved with two skills and already happens with just mark of insecurity at 0 deadly arts. Instead the enchantment will be seemingly not applied.

Frequency

 * The only area where this bug could possibly occur without deliberately forcing it is fort aspenwood. People regularly run the required [[tranquility], [[mark of insecurity] or [[air of disenchantment] there to crush the kurzicks' defense line. It's still highly unlikely that all of them happen to log into the same match. I haven't heard any mention of this bug happening in fort aspenwood. To work without tranquility one second enchantments are required, and assuming normal player builds these would first require a monk to be hexed with [[Wail of Doom] while casting an enchantment with a 1 second duration at attribute level 0 on a target hexed with mark of insecurity followed by air of disenchantment. That's probably not going to ever happen.

Exploit threat
The exploit threat for this bug is very low.

PvP
 * A three player sync on luxon side could exploit this bug for helping the kurzick team by prolonging a short duration [[Shield of Absorption] to sabotage the luxon side. However, if these 3 players simply wouldn't play at all they'd harm their team more. Likewise, if the intention was to grief the kurzick side, a nature ritual ranger can easily sabotage his own team with [[Quickening Zephyr], [[Tranquility], [[Nature's Renewal] and other spirits. If players want to sabotage either team they can do it much easier and much more effectively without exploiting this bug.
 * In other PvP modes you can only make the opponent benefit from the bug, not your own team.

PvE
 * The bug can be exploited to apply seemingly infinite enchantments on charmable pets prior to taming them or on masterless minions which you turn with a skill such as [[Verata's Gaze].
 * Such a pet or such minions could be used mainly for tanking purposes, but only in areas without enchantment removal, large health drain or degeneration.
 * It'd be easier to use any standard tank alongside a [[Spell Breaker] monk to create invincible tanks. You'd have to sacrifice less players which could deal damage instead, you'd not have such a long setup, you wouldn't have to rely on mostly AI controlled tanks. The exploit potential is low and overshadowed by any consumable item or good build.

Individual skill mechanics
Enchantment durations only appear as integers, but these skills produce fractions. This section shows examples which show by which method these skills return integers (aka round).

(A) Mark of insecurity
Additional observations (Rule 2)
 * [[Mark of Insecurity@16] (16) affecting a 6 seconds enchantment causes a duration of 1.02 which is rounded to 2.
 * [[Mark of Insecurity@16] (16) affecting a 13 seconds enchantment causes a duration of 2.21 which is rounded to 3.

To explain the observed behaviour I propose that the skill works by performing these steps in the noted order:
 * 1) (New enchantment duration) = (Original enchantment duration) * (1 − MoI%)
 * 2) Round up.
 * 3) Reduce the enchantment duration by at least 1 second.

Notes
 * Weapons of enchanting always add at least one second to the enchantment duration, similar to rule 3.

(B) Tranquility
Additional observations:
 * [[Tranquility@5] (5) affecting a 5 seconds enchantment causes a duration of 3.5 which is rounded to 3. [[Tranquility@15] (15) affecting a 25 seconds enchantment causes a duration of 12.5 which is rounded to 12. (Rule 2)
 * [[Tranquility@16] (16) affecting a 1 second enchantment causes a duration of 0.48 which is rounded to 1. (Rule 4)

To explain the observed behaviour I propose that the skill works by performing these steps in the noted order:
 * 1) (New enchantment duration) = (Original enchantment duration) * (1 − Trnq%)
 * 2) Round to nearest and half down.
 * 3) Reduce the enchantment duration by at least 1 second.
 * 4) If the resulting enchantment duration is 0, restore it to 1 second. (Overpowers rule #3)

(C) Air of disenchantment
Additional observations:
 * [[Air of Disenchantment@5] (5) affecting a 25 seconds enchantment causes a 12.5 seconds duration which is rounded to 12. (Rule 2)

To explain the observed behaviour I propose that the skill works by performing these steps in the noted order:
 * 1) (New enchantment duration) = (Original enchantment duration) * (AoD%)−1
 * 2) Round to nearest and half to even.

Tranquility and air of disenchantment

 * [[Tranquility@15] (15) and [[air of disenchantment@5] (5) each cause a remaining enchantment duration of 50%. The order in which these effects are applied determines the resulting enchantment duration. The calculated duration will for now assume a cumulative calculation without rounding intermediate results.

The observations can be explained by these assumptions:
 * 1) Intermediate results are rounded.
 * 2) The intermediate result is rounded by the skill which comes first in the effect chain.
 * 3) The end result is rounded by the skill which comes last in the effect chain.
 * If tranquility comes last, rule 4 is applied and returns a duration of 0 as 1.

Tranquility and mark of insecurity

 * [[Tranquility@15] (15) and [[mark of insecurity@6] (6) each cause a remaining enchantment duration of 50%. The order in which these effects are applied seems to have no effect on the resulting enchantment durations. The calculated duration will for now assume a cumulative calculation without rounding intermediate results.

The observations can't be explained by any of the calculated hypotheses. Some assumptions about the functionality of tranquility or mark of insecurity seem to be wrong.

Air of disenchantment and mark of insecurity

 * [[Air of disenchantment@5] (5) and [[Mark of Insecurity@6] (6) each cause a remaining enchantment duration of 50%. The order in which these effects are applied determines the resulting enchantment duration. The calculated duration will for now assume a cumulative calculation without rounding intermediate results.

The observations can be explained by these assumptions:
 * 1) (New enchantment duration) = (Original enchantment duration) * ([1 − MoI%]*(AoD%)−1)
 * 2) Round the result with air of disenchantment's rule set.
 * 3) If mark of insecurity was applied first its rule 3 acts after all other calculations while respecting the original base duration.

<!--== WIP Notes ==

Trnq@16 + AoD@5 + MoI@0 = 4sec infinite Trnq@16 + AoD@4 + MoI@0 = none infinite Trnq@15 + AoD@5 + MoI@0 = 3 sec infinite, but not 4 Trnq@7 + AoD@5 + MoI@0 = 3 sec infinite Trnq@6 + AoD@5 + MoI@0 = 2 sec infinite, but not 3 Trnq@0 + AoD@5 + MoI@0 = 2 sec infinite Trnq@6 + AoD@16 + MoI@16 = 2sec infinite, but not 3 Trnq@15 + AoD@16 + MoI@16 = 3 sec infinite, but not 4

(Tranquility→air of disenchantment) + mark of insecurity

 * [[Tranquility@15] (15) and [[air of disenchantment@5] (5) and [[Mark of Insecurity@6] (6) each cause a remaining enchantment duration of 50%. The order in which these effects are applied determines the resulting enchantment duration. The calculated duration will for now assume a cumulative calculation without rounding intermediate results, so 12,5% of the original duration.

-->