User:DanR/OnePercentAR

From Guild Wars 2 Wiki
Jump to navigationJump to search


Description[edit]

This page presents a list of agony resistance values that are required to stay at 1% agony damage at each fractal scale. This page presumes the accuracy of the following damage formula: "(((Scale * 2.136) - 33) - (AR * 1.2)) = Percent_Damage". The list of AR values, and the source code that was used to generate them, are posted below.

The Table of AR values, formatted for wiki display.[edit]

Fractal scale Suggested AR
20 8
21 10
22 11
23 13
24 15
25 17
26 18
27 20
28 22
29 24
30 26
31 27
32 29
33 31
34 33
35 34
36 36
37 38
38 40
39 42
Fractal scale Suggested AR
40 43
41 45
42 47
43 49
44 50
45 52
46 54
47 56
48 58
49 59
50 61
51 63
52 65
53 67
54 68
55 70
56 72
57 74
58 75
59 77
Fractal scale Suggested AR
60 79
61 81
62 83
63 84
64 86
65 88
66 90
67 91
68 93
69 95
70 97
71 99
72 100
73 102
74 104
75 106
76 107
77 109
78 111
79 113
Fractal scale Suggested AR
80 115
81 116
82 118
83 120
84 122
85 123
86 125
87 127
88 129
89 131
90 132
91 134
92 136
93 138
94 139
95 141
96 143
97 145
98 147
99 148
100 150


The (Same) Table of AR values, as output by the java program.[edit]

Minimum AR required for 1% damage at each scale:
Scale: 20, Min AR: 8
Scale: 21, Min AR: 10
Scale: 22, Min AR: 11
Scale: 23, Min AR: 13
Scale: 24, Min AR: 15
Scale: 25, Min AR: 17
Scale: 26, Min AR: 18
Scale: 27, Min AR: 20
Scale: 28, Min AR: 22
Scale: 29, Min AR: 24
Scale: 30, Min AR: 26
Scale: 31, Min AR: 27
Scale: 32, Min AR: 29
Scale: 33, Min AR: 31
Scale: 34, Min AR: 33
Scale: 35, Min AR: 34
Scale: 36, Min AR: 36
Scale: 37, Min AR: 38
Scale: 38, Min AR: 40
Scale: 39, Min AR: 42
Scale: 40, Min AR: 43
Scale: 41, Min AR: 45
Scale: 42, Min AR: 47
Scale: 43, Min AR: 49
Scale: 44, Min AR: 50
Scale: 45, Min AR: 52
Scale: 46, Min AR: 54
Scale: 47, Min AR: 56
Scale: 48, Min AR: 58
Scale: 49, Min AR: 59
Scale: 50, Min AR: 61
Scale: 51, Min AR: 63
Scale: 52, Min AR: 65
Scale: 53, Min AR: 67
Scale: 54, Min AR: 68
Scale: 55, Min AR: 70
Scale: 56, Min AR: 72
Scale: 57, Min AR: 74
Scale: 58, Min AR: 75
Scale: 59, Min AR: 77
Scale: 60, Min AR: 79
Scale: 61, Min AR: 81
Scale: 62, Min AR: 83
Scale: 63, Min AR: 84
Scale: 64, Min AR: 86
Scale: 65, Min AR: 88
Scale: 66, Min AR: 90
Scale: 67, Min AR: 91
Scale: 68, Min AR: 93
Scale: 69, Min AR: 95
Scale: 70, Min AR: 97
Scale: 71, Min AR: 99
Scale: 72, Min AR: 100
Scale: 73, Min AR: 102
Scale: 74, Min AR: 104
Scale: 75, Min AR: 106
Scale: 76, Min AR: 107
Scale: 77, Min AR: 109
Scale: 78, Min AR: 111
Scale: 79, Min AR: 113
Scale: 80, Min AR: 115
Scale: 81, Min AR: 116
Scale: 82, Min AR: 118
Scale: 83, Min AR: 120
Scale: 84, Min AR: 122
Scale: 85, Min AR: 123
Scale: 86, Min AR: 125
Scale: 87, Min AR: 127
Scale: 88, Min AR: 129
Scale: 89, Min AR: 131
Scale: 90, Min AR: 132
Scale: 91, Min AR: 134
Scale: 92, Min AR: 136
Scale: 93, Min AR: 138
Scale: 94, Min AR: 139
Scale: 95, Min AR: 141
Scale: 96, Min AR: 143
Scale: 97, Min AR: 145
Scale: 98, Min AR: 147
Scale: 99, Min AR: 148
Scale: 100, Min AR: 150


Java source code that was used to generate the AR table[edit]

package onepercentars;

public class Start {

    public static void main(String[] args) {
        // Create an array for holding the minimum AR that stays below 
        // 1% damage at each scale between 20 and 100.
        // The index is the scale. Ignore indexes 0-19.
        int[] minimumOnePercentAR = new int[101];
        // Initialize each array with edge values.
        for (int scale = 0; scale <= 100; ++scale) {
            minimumOnePercentAR[scale] = 200;
        }
        // Loop through each fractal scale from 20 to 100.
        // (Scales 1-19 don't give any agony damage.)
        for (int scale = 20; scale <= 100; ++scale) {
            // Loop through each player agony resistance value from 0 to 152,
            // in reverse order.
            for (int AR = 152; AR >= 0; --AR) {
                // Calculate the damage for the current AR at the current scale.
                double damage = CalculateDamagePercent(scale, AR);
                // Record the minimum AR for 1% damage at the current scale.
                if (damage <= 1.0) {
                    minimumOnePercentAR[scale] = AR;
                }
            } // End: Scale loop.
        } // End: AR loop.
        // Print out the results.
        System.out.println("Minimum AR required for 1% damage at each scale:");
        for (int scale = 20; scale <= 100; ++scale) {
            System.out.println("Scale: " + scale
                    + ", Min AR: " + minimumOnePercentAR[scale]
            );
        }
        /* Print the values again in wiki table format. */
        for (int scale = 20; scale <= 100; ++scale) {
            System.out.println("|-\n! " + scale
                    + "\n| " + minimumOnePercentAR[scale]
            );
        }
    }

    /**
     * CalculateDamagePercent, Calculates the amount of agony damage given to a
     * player per tick, for a particular fractal scale and particular amount of
     * agony resistance. Agony damage is reported as a percentage of a players
     * maximum health
     */
    public static double CalculateDamagePercent(
            double scale, double agonyResistance) {
        if (scale < 20 || scale > 150) {
            return 0;
        }
        double damage = (((scale * 2.136) - 33.0) - (agonyResistance * 1.2));
        damage = (damage < 1) ? 1 : damage;
        damage = (damage > 100) ? 100 : damage;
        return damage;
    }

}