# Glyph Hack AP Calculations

As I mentioned in the post on ActionPoints … additional AP can be obtained from Glyph Hacking … 100 additional AP is added if the Glyph Hack is performed on an enemy portal.

``````+------------+--------------------+------------+
| Portal lvl | Perfect hack bonus | Time limit |
+------------+--------------------+------------+
|          1 |               +28% |        20s |
|          2 |               +40% |        20s |
|          3 |               +55% |        20s |
|          4 |               +55% |        19s |
|          5 |               +55% |        18s |
|          6 |               +80% |        17s |
|          7 |               +80% |        16s |
|          8 |              +112% |        15s |
+------------+--------------------+------------+
``````

Hack bonus:

Bhack = 10 × Gcorrect + P × BperfectSpeed bonus:

Bspeed = P × ⌊100 × Tleft ÷ TlimitAP:

APbase = 50 × GcorrectAPbonus = 20 × P × 20.5×Gcorrect

AP = APbase + APbonus + Bspeed

where:

• P is 1 if all glyphs were drawn correctly and 0 otherwise (P = ⌊Gcorrect ÷ Gtotal⌋),
• Bhack is the hacking bonus,
• Gcorrect is the number of glyphs you got correct,
• Gtotal is the total number of glyphs in the sequence,
• Bperfect is the perfect hack bonus corresponding to the number of glyphs in the sequence, as shown in the table above,
• Bspeed is the speed bonus,
• Tleft is the time remaining on the clock,
• Tlimit is the total time you were given to draw the sequence, as shown in the table above,
• APbase is the amount of AP earned for correctly-drawn glyphs,
• APbonus is bonus AP earned for drawing all glyphs correctly,
• AP is the total amount of AP earned from the glyph hack. (Note: Does not include AP from hacking enemy portals.)

Example: Suppose you perform a perfect glyph hack on a L7 portal with 5 seconds left. Your hacking bonus would be 10% × 4 + 1 × 80% = 120% (4 correct glyphs and perfect hack bonus). Your speed bonus would be 1 × ⌊100 × 5 ÷ 16⌋ = 31% (5 out of 16 seconds left). Finally, you would earn 8 glyph hacking points and 50 × 4 + 20 × 1 × 20.5×4 + 31 = 311 AP.

-