DrFetus

EO5 Algorithms (WIP)

Jul 20th, 2017 (edited)
12,329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.89 KB | None | 0 0
  1. Algorithms discovered by Rea (aka HououinMakise), Violentlycar, and Araxxor (aka Dr. Fetus.)
  2.  
  3. Lowercase a in front of a variable means attacker. Lowercase d means defender. Lowercase b means base.
  4.  
  5. Damage
  6. ======
  7. PlayerAttack = (aSTAT + aATK)
  8. PlayerDefense = (dSTAT + dDEF)
  9. MonsterAttack = (aSTAT * 2)
  10. MonsterDefense = (dSTAT * 2)
  11.  
  12. aSTAT = aSTR if a STR attack is being used. aINT if an INT attack is being used.
  13. aATK = aWATK if a STR attack is being used. aMATK if an INT attack is being used.
  14. dSTAT = dVIT if a STR attack is being used. dWIS if an INT attack is being used.
  15. dDEF = dDEF if a STR attack is being used. dMDEF if an INT attack is being used.
  16.  
  17. If a player has a certain part bound, aSTAT is halved.
  18. If a monster has a certain part bound, aSTAT is multiplied by 1.5 instead.
  19.  
  20. Head binds reduce INT while arm binds reduce STR.
  21.  
  22. When a player attacks a monster, compScore = MonsterDefense / PlayerAttack
  23. When a monster attacks a player, compScore = PlayerDefense / MonsterAttack
  24.  
  25. The effects of binds are factored into the above formula.
  26.  
  27. Note: Summons (That aren't the Bunker and Decoy Turrets) use MonsterAttack and MonsterDefense in their damage calculations. The Bunker and Decoy Turret use aSTAT and dSTAT. aATK and dDEF in their case are 0.
  28.  
  29. If compScore > 1 (target's defense outpaces attacker's offense):
  30.  
  31. BaseDamage = (((1.0 - ((sqrt(sqrt(compScore))) * 0.7)) * (Attack * 3)) - (Defense / 5)) * 0.717)
  32.  
  33. Otherwise (attacker's offense outpaces target's defense):
  34.  
  35. BaseDamage = (((0.3 + (((1.0 - (Defense / Attack)) ^ 3) * 1.7)) * (Attack * 3)) - (Defense / 5)) * 0.717
  36.  
  37. Damage = BaseDamage * SkillPower * Modifiers * Difficulty Factor
  38.  
  39. For player units, Difficulty Factor is 1 on Advanced, and 1.2 on Basic.
  40. For monster units, Difficulty Factor is 1 on Advanced, and 0.8 on Basic.
  41.  
  42. Death's Edge Damage
  43. ===================
  44. Damage * (1 + (Total Party Raw HP Missing / 100)) * (((Party Average Missing HP% + (Party Average Missing HP% ^ 2)) + 0.02) / 2)
  45.  
  46. Buff Parameters
  47. ===============
  48. Attack buffs and defense debuffs are additive.
  49.  
  50. Defense buffs and attack debuffs are multiplicative.
  51.  
  52. Damage Randomization
  53. ====================
  54. After all the damage is calculated, the damage is randomized. How this works is that the final result is multiplied by a number ranging from 0.98 to 1.02. After which, a random number ranging from 0 to 4 is added on.
  55.  
  56. Critical Hit Rate
  57. =================
  58. Crit Rate = [(aLUC + 25) * 100] / (dLUC + 25)
  59.  
  60. If the result is less than 30, set it to 30.
  61. If the result is greater than 300, set it to 300.
  62. Then roll a number between 0 and 1000.
  63. If that number is lower than the result of the formula, the attack will be a critical hit.
  64.  
  65. Sword God's value is added after the Crit Rate is calculated, allowing it to bypass the cap.
  66.  
  67. Accuracy
  68. ========
  69. A = [((aAGI * 2) + aLUC) * 10] / [(dAGI * 2) + dLUC]
  70.  
  71. AGI is halved and rounded down if the entities involved have their legs bound.
  72. A is rounded down.
  73.  
  74. If A < 10, B = [1 - ((1 - (A / 10)) ^ 2)] * [(Base Accuracy + Skill Modifier) * 10]
  75. If A >= 10, B = [(87.5 + (((A / 20) * 50) * (A / 20))) * (Base Accuracy + Skill Modifier)] / 10]
  76.  
  77. Base Accuracy Parameters:
  78. If a party member is using a skill that does not require a weapon, Base Accuracy = Skill Accuracy.
  79. If a party member is using a skill that requires a weapon, Base Accuracy = Weapon Accuracy.
  80. If a party member does not have a weapon equipped, Weapon Accuracy = 95.
  81. If an enemy is using a regular attack, Base Accuracy = 99.
  82. If an enemy is using a skill, Base Accuracy = Skill Accuracy.
  83.  
  84. C = B + Modifiers
  85.  
  86. Modifier Parameters:
  87. Accuracy buffs and evasion debuffs are positive numbers.
  88. Accuracy debuffs and evasion buffs are negative numbers.
  89. If playing on Basic, 100 is subtracted from enemy accuracy.
  90.  
  91. If C > 1500, C = 1500
  92.  
  93. If the attacker is blinded, D = C * 0.33
  94.  
  95. If the skill bypasses accuracy checks or the target is petrified, asleep, panicked, blind, paralyzed (Only if the effect activates), or leg bound, D = 1000
  96.  
  97. Else, D = C.
  98.  
  99. Roll a number between 1 and 1000. If that number is lower than or equal to D, the attack lands.
  100.  
  101. Enemy Targeting Routine
  102. =======================
  103.  
  104. Infliction Rate
  105. ===============
  106. aScore = (aStat * 2) + aLUC
  107.  
  108. If the skill being cast is a STR-based attack, aStat = STR.
  109. If the skill being cast is a INT-based attack, aStat = INT.
  110. Else, aStat = LUC.
  111.  
  112. A = [(aScore + 76.5) / ((dLUC * 3) + 76.5)] * 10
  113.  
  114. IR = Skill's infliction rate
  115.  
  116. If A <= 2, B = IR
  117. If A > 2 & A < 50, B = IR * A
  118. If A >= 50, B = IR * 50
  119.  
  120. C = B * Resistance * Difficulty Factor * Modifiers
  121.  
  122. Resistance = Base Resistance + Accumulative Resistance
  123. Difficulty Factor for players is 1 on Advanced, and 1.2 on Basic. For enemies, this is 1 on Advanced and 0.8 on Basic.
  124.  
  125. If C is greater than 1500, then set it to 1500.
  126. Then roll a number between 0 and 1000.
  127. If that number is lower than C, then the ailment lands.
  128.  
  129. Accumulative Resistance
  130. =======================
  131. Each time a disable (that isn't stun) is inflicted, a value of 50 is subtracted from the target's current accumulative resistance value for that particular disable, which always starts at 0, and a resistance cap is placed on the target.
  132.  
  133. Once the disable wears off, the accumulated resistance will gradually wear off. For each turn the target does not have the specified disable, a value of 7 is added to the accumulative resistance value. This continues until that same disable is inflicted again, at which point it would halt until the disable wears off. Or until they run into the resistance cap, at which point it will halt until the disable is inflicted again.
  134.  
  135. The resistance cap is determined by this formula:
  136.  
  137. SA = Total successful applications of the disable.
  138.  
  139. If SA <= 3, then A = (0.85 ^ SA) * Base Resistance
  140. If SA > 3, then A = [0.85 ^ (1 + (SA / 2))] * Base Resistance
  141.  
  142. This part of the formula: (1 + (SA / 2), is rounded up.
  143.  
  144. Resistance Cap = A - Base Resistance
  145.  
  146. The end result is rounded down. Accumulative Resistance cannot be greater than the Resistance Cap at any point.
  147.  
  148. If a player unit dies, then their Accumualative Resistance and Resistance Cap is set back to 0.
  149.  
  150. Ailment Recovery
  151. ================
  152. rLUC = recovering character's LUC
  153. etLUC = average LUC of the opposing team
  154.  
  155. T = Total times ailment recovery has failed.
  156.  
  157. A = sqrt[(rLUC + 51) / (etLUC + 76.5)] * 10
  158.  
  159. If A <= 5, B = (T * 15) - 30
  160. If A > 5 and <= 20, B = ((T * (A + 10)) + (A * 2)) - 40
  161. If A > 20, B = T * 30
  162.  
  163. The value of the current level of Antibodies is then added to B if applicable.
  164.  
  165. If T = 0, then B = 0
  166.  
  167. If B < 0, then B = 0
  168. If B > 100, then B = 100
  169.  
  170. If T >= 5, then B = 100
  171.  
  172. Roll a number between 0 and 99. If that number is less or equal to B, recover from the ailment.
  173.  
  174. Some enemies will instantly recover from certain ailments after a certain number of turns. This is defined per enemy and only applies to the specified ailments if they have this property.
  175.  
  176. (During this calculation, a random number between 0 and 10 is generated. This number is never used, but it advances the RNG.)
  177.  
  178. Poison Damage
  179. =============
  180. RNG1 + [(RNG2 + (Base Poison Damage + (Level * 0.16666667))) * (1 + (Level / 100))] * Difficulty Factor
  181.  
  182. RNG1: A random number from 0 to 5.
  183. RNG2: A random number from 0 to 5.
  184.  
  185. For poisoned monster units, Difficulty Factor is 1 on Advanced, and 1.2 on Basic.
  186. For poisoned player units, Difficulty Factor is 1 on Advanced, and 0.8 on Basic.
  187.  
  188. Healing
  189. =======
  190. [(Healing Power * WIS * 2 * 0.0021786) + (Healing Power * 0.16667) + (WIS * 2 * 0.010599 * sqrt(Healing Power) * 0.1)] Herb Mastery + RNG
  191.  
  192. RNG: A random number from 0 to 9.
  193.  
  194. Speed
  195. =====
  196. [(Equipment Speed Mod + 100) * AGI * Skill Speed Mod * Random number between 90 and 110 / 10000] * Modifiers
  197.  
  198. Equipment Speed Mods from all pieces of equipment on a party member are added together. For enemies, this is obviously 0. The data for Equipment Speed Mods are as follows:
  199.  
  200. Weapons:
  201. Swords: 0
  202. Gauntlets: -5
  203. Staves: -5
  204. Katanas: -5
  205. Bows: 10
  206. Scythes: 5
  207. Artillery: -15
  208. Coffins: 5
  209.  
  210. Equipment:
  211. Heavy Armor: -10
  212. Light Armor: 0
  213. Clothes: 5
  214. Helmets: 0
  215. Gloves: 5
  216. Boots: 10
  217. Shields: -5
  218. Accessories: 0
  219.  
  220. When a rare breed acts, their AGI is multiplied by 10.
  221.  
  222. Union Gain
  223. ==========
  224. Party members start off with 100% Union and will have their Union set back to 100% upon leaving the Labyrinth. They gain 5% to 15% Union per turn. This still occurs even on turns where Union skills are used. Union skills completely deplete the Union gauges of all party members involved. Only the caster needs to have 100% Union.
  225.  
  226. When a party member dies, the amount currently in their Union gauge will be halved. Completing a battle will grant 5% to 15% Union to all living party members.
  227.  
  228. Fencers with the Dodge Boon skill will gain 1% to 6% Union per dodged attack.
  229.  
  230. Warlocks with the Life Siphon skill will gain 1% to 6% Union for each attack they cast that successfully hits at least 1 enemy's weakness. This can stack with Union skills and the usage of Altar, resulting in a maximum possible gain of 33% Union in one turn.
  231.  
  232. Preemptives
  233. ===========
  234. A = (((Party's Average AGI * 2 + Party's Average LUC) + 51) * 10) / ((Enemy's Average AGI + Enemy's Average LUC * 2) + 51).
  235.  
  236. After A is calculated, it is rounded down. Then,
  237.  
  238. If A <= 2, the preemptive chance is 1.2%.
  239. If A >= 50, the preemptive chance is 30%.
  240.  
  241. Otherwise, the preemptive chance is (A * 0.6)%.
  242.  
  243. The Precaution skill adds 3% onto this if it is learned.
  244.  
  245. If the preemptive fails, and Levitation is active, there will be a separate chance to get a preemptive strike. This separate chance is based on the values of Levitation and does not use any stats:
  246.  
  247. Level 1: 4%
  248. Level 2: 7%
  249. Level 3: 10%
  250. Level 4: 13%
  251. Level 5: 13%
  252. Level 6: 16%
  253. Level 7: 19%
  254. Level 8: 22%
  255. Level 9: 25%
  256. Level 10: 25%
  257.  
  258. If Levitation fails to activate, move onto the blindside check.
  259.  
  260. Blindsides
  261. ==========
  262. B = (((Enemy's Average AGI * 2 + Enemy's Average LUC) + 51) * 10) / ((Party's Average AGI + Party's Average LUC * 2) + 51).
  263.  
  264. After B is calculated, it is rounded down. Then,
  265.  
  266. If B <= 2, the blindside chance is 0.8%.
  267. If B >= 50, the blindside chance is 20%.
  268.  
  269. Otherwise, the blindside chance is (B * 0.4)%.
  270.  
  271. If the party is blindsided, and a character is equipped with the Killing Shot bow, there will be a chance to nullify the blindside. This separate chance is based on the values of the skill Wary Eye and does not use any stats:
  272.  
  273. Level 1: 34%
  274. Level 2: 40%
  275. Level 3: 46%
  276. Level 4: 52%
  277. Level 5: 75%
  278.  
  279. Escape Rate
  280. ===========
  281. Escape is impossible if legs are bound or if the enemy is a boss.
  282.  
  283. A: Attempted escapes (not counting this one)
  284. B: sqrt(Turn count)
  285. C: The number of allies
  286. D: The number of allies who are dead
  287. E: The number of allies who are dead, petrified, panicking, or asleep
  288. F: (Escapee's LUC + Escapee's AGI) / (Enemies' average LUC + Enemies' average AGI)
  289. G: F ^ 2 * 10
  290. H: ((D + E) * 15 / C)
  291. I: (75 / C) + (A * 2)
  292.  
  293. If G <= 5, flee chance is calculated by this formula:
  294.  
  295. V = H + (I * B * 0.25) + 2
  296.  
  297. If G > 55, flee chance is calculated by this formula:
  298.  
  299. V = H + (I * B * 8) + 2
  300.  
  301. If G > 5 but <= 10, flee chance is calculated by this formula:
  302.  
  303. V = H + ((G * I * 0.05) * B + 1) + 2
  304.  
  305. Otherwise, flee chance is calculated by this formula:
  306.  
  307. V = H + ((I * ((G + 5) ^ 2) * 0.0022222) * B) + 2
  308.  
  309. V is then rounded down. If V is greater than 90, V = 90.
  310.  
  311. Basic adds 20 to this.
  312.  
  313. Finally, if all enemies are either petrified, asleep, panicking, blinded, leg bound, afraid, or failed to act because of paralysis, fleeing is guaranteed.
  314.  
  315. Otherwise, roll for escape chance, where V is your escape chance.
  316.  
  317. Gathering
  318. =========
  319. Rare items can only be obtained during extra gathering attempts enabled by the gathering skills. During those attempts, the rare item's chance is rolled for first. If the skill is not learned or the chance to obtain the rare item fails, the game rolls for the uncommon item chance. If the uncommon item is not obtained, the common item is obtained instead.
  320.  
  321. The chance to obtain a number of items depends on the gathering skill used. For the Celestian, Therian, and Brouni's gathering skills, the chances are as follows:
  322.  
  323. 3 items: 10%
  324. 2 items: 20%
  325. 1 item: 40%
  326. 0 items: 30%
  327.  
  328. However, if anyone knows the corresponding gathering skill for the item point, at least 1 instance of it is guaranteed to find at least 1 item. Resulting in the following chances:
  329.  
  330. 3 items: 10%
  331. 2 items: 20%
  332. 1 item: 70%
  333.  
  334. The Earthlain's gathering skill is weaker, as it can only gather 2 items at most, in exchange for being able to be used at any item point. The chances for that skill to obtain extra items are:
  335.  
  336. 2 items: 20%
  337. 1 item: 40%
  338. 0 items: 40%
  339.  
  340. While the Earthlain's gathering skill can also be chosen to be guaranteed to find at least 1 item, this can only occur if you have none of the other races with their gathering skills learned at all at the corresponding item point. In the case that happens, the chances for the Earthlain's gathering skill are:
  341.  
  342. 2 items: 20%
  343. 1 item: 80%
Advertisement
Add Comment
Please, Sign In to add comment