Attacks

From iRO Wiki Classic
(Redirected from Attack)
Jump to navigation Jump to search

This page is devoted to describing how Attacks are resolved. As there are basically two kinds of attacks, physical and magical, it is split into two sections.

Explanation of Conventions

Below are a number of conventions in the calculations that may be unfamiliar. Explanations follow:

  • [] - Square brackets hold the same priority as normal brackets, but indicate that the value of the contents should be rounded down to the nearest whole number (integer) once calculated.
  • rnd(x,y) - This is the expression of a random whole number (integer) between x and y. eg. rnd(3,50) would be a whole number (integer) between 3 and 50.
  • min(x,y) - This expression indicates that you should take the lower of x and y.
  • max(x,y) - This expression indicates that you should take the higher of x and y.
  • x^y - This is x to the power of y. That is, x multiplied by itself y times. eg. 5^3 would be 5*5*5.
  • {} - Curly brackets hold the highest priority, even higher than square and normal brackets. They indicate that the contents should be rounded down to the nearest whole number (integer) once calculated. Then, if the result is less than 0, it should be made equal to 0.

Physical Attacks

Physical Attacks encompass all regular attacks (from monster or player) and all physical attack skills. The game goes through the following process to assess the result of an attack.

  1. Is the attack a skill attack? If so, go to step 6.
    1. All active attack skills are automatically considered skill attacks.
    2. Double Attack is checked for on every non-skill attack with a Dagger weapon as the primary weapon (right-hand weapon). If a Double Attack is determined to have occurred (based on the level of the attackers Double Attack skill), then it automatically becomes a Skill Attack.
    3. When wielding dual weapons (only Assassins can do this), the left-hand weapon always counts as a skill attack, although if the right-hand weapon gets a crit then, the crit bubble will show on the left-hand weapon hit as well. You will also never see a "Miss!" from a left-hand weapon.
    4. The Sidewinder Card in a weapon gives the weapon a chance of a Double Attack equal to a Double Attack Level 1 with non-skill attacks. This over-rules the normal restriction of Double Attack only applying to a Dagger weapon.
    5. The monster skill Combo Attack is a skill attack too.
    6. Defensive attack skills like Counter Attack and Poison React cause normal attacks. They are not skill attacks.
  2. Does a Safety Wall effect protect the target and is it a melee attack? If so, reduce the total number of hits left on the safety wall by 1 and then stop.
    1. A melee attack from a monster is any normal physical attack with a range of less than 4 tiles.
    2. A melee attack from a player is any normal physical attack from any weapon other than a Bow.
  3. Does a Pneuma effect protect the target and is it a ranged attack? If so, damage is 0, go to step 26.
    1. A ranged attack from a monster is any normal attack with a range of at least 4 tiles.
    2. A ranged attack from a player is any normal physical attack with a Bow or with a physical attack skill that is also designated as Ranged.
  4. Does a Perfect Dodge occur? If so, indicate with a "Lucky!" animation above the target's head and then stop.
    1. Player characters have a 1 + [LUK/10] + EquipmentBonuses percent chance of perfect dodging an attack directed at them. This is the same as the right-hand part of their flee value.
    2. Monster targets cannot perfect dodge.
  5. Does a critical hit occur? If so, go to step 7.
    1. Player characters have a (1 + LUK*0.3 + EquipmentBonuses) * CritModifier - TargetLuk/5 percent chance of causing a critical hit. This is not the same as the critical value shown in the status window!
    2. Monsters only do a critical hit if they have used the monster skills Critical Slash or Counter Attack to make an attack (and then it is an automatic critical hit).
  6. Does a hit or a miss occur? If a miss, assign an damage value of 0 and go to step 18. If a hit, display an "Impact" animation.
    1. A hit has a 80 + AttackerHit - DefenderFlee percent chance of occurring. An alternative formula for use with the monster hit table is 100 + PlayerHit - HitRequiredfor100%.
    2. For players, DefenderFlee is reduced by 10% of its value for each attacker beyond the second.
    3. Some skills automatically hit. Others increase AttackerHit by a certain amount.
  7. Calculate BaseATK.
    1. BaseATK for melee weapons is STR + [STR/10]^2 + [DEX/5] + [LUK/5] + UpgradeBonus + ImpositioManus + ATKCards.
    2. BaseATK for missile weapons is DEX + [DEX/10]^2 + [STR/5] + [LUK/5] + UpgradeBonus + ImpositioManus + ATKCards.
    3. Monsters have a BaseATK of 0.
  8. Calculate WeaponATK.
    1. WeaponATK for melee weapons is rnd(min(DEX*(0.8+0.2*WeaponLevel),ATK), ATK). In the case of a critical hit, it is ATK.
    2. WeaponATK for bows is rnd(ATK/100*min(ATK, dex*(0.8+0.2*WeaponLevel)), max(ATK, ATK/100*min(ATK, dex*(0.8+0.2*WeaponLevel)))) + rnd(0, ArrowATK - 1). In the case of a critical hit, it is ATK + ArrowATK.
    3. WeaponATK when weaponless (fist) is 0.
    4. WeaponATK for Monsters is simply rnd(minATK, maxATK) using the values shown in my monster list. In the case of a critical hit (due to a skill), use maxATK.
    5. In the case of Dual Wielded weapons, all cards apply to the right-hand weapon only.
  9. Apply size modifier to Weapon ATK.
    1. Size modifiers vary by weapon.
    2. Monsters count as using Fist.
    3. Adult Players are of medium size, adopted child players are of small size.
  10. Apply skill modifiers to the total of Base ATK + WeaponATK.
    1. Skill modifiers add together (eg. 1 + 0.25 + 0.9).
    2. Power-Thrust gives a skill modifier and may apply to any physical attack.
    3. Provoke gives a skill modifier and may apply to any physical attack.
    4. Many physical attack skills provide a third possible skill modifier. Eg. Spear Dynamo
    5. Calculate as (100 + PowerThrust% + Provoke% + AttackSkill%)/100.
  11. Apply Hard DEF modifiers to the current total.
    1. Formula is Total*(1-DEF/100).
    2. Player character Hard DEF is not the same as shown in the status window.
    3. A critical hit counts all Hard DEF as 0.
  12. Subtract Soft DEF from the current total.
    1. Soft DEF for players is equal to [VIT*0.5] + rnd([VIT*0.3], max([VIT*0.3],[VIT^2/150]-1)).
    2. Soft DEF for monsters is equal to VIT + rnd(0,[VIT/20]^2-1).
    3. A Critical Hit reduces Vit DEF to 0.
  13. Subtract applicable Protection skill values from the current total.
    1. Divine Protection reduces damage from Undead element and Demon race monsters.
    2. Dragonology reduces damage from Dragon class monsters.
  14. Add applicable Bane skill values to the current total.
    1. Beast Bane adds damage to Brute and Insect race monsters.
    2. Demon Bane adds damage to Undead element and Demon race monsters.
    3. Dragonology adds damage to Dragon race monsters.
  15. Add Upgrade Damage to the current total.
    1. For player characters, this is the value on the right-hand side of ATK in the status window.
    2. Monsters do not get Upgrade damage.
  16. Round damage down and if the total is less than 1, increase to 1.
  17. Add applicable Mastery skill values to the current total.
    1. There are currently Mastery skills for Spear (all), 1-H Sword (Daggers and 1-H Swords), Two-Hand Sword (2-H Swords only), Mace and Katar.
  18. Add Weaponry Research damage and Envenom bonus damage as applicable.
    1. Weaponry Research damage occurs to every attack by a Blacksmith with the Weaponry Research skill.
    2. Envenom bonus damage applies to Envenom skill attacks only.
  19. Apply the Elemental Modifier to the current total.
    1. The Elemental Modifier depends on the property of the attack and the property of the target.
    2. Normal attacks from monsters are always Neutral property.
    3. Skill attacks from monsters may have other properties.
    4. Normal melee attacks from players have the property of the weapon wielded. The property of the weapon may be over-ridden by various spell effects however (Enchant Poison, Aspersio, etc.).
    5. Normal bow attacks from players have the property of the arrow being used. This may be over-ridden by an elemental bow (Rudra's Bow is the only known elemental bow). The property of the weapon and arrow may be over-ridden by various spell effects however (Enchant Poison, Aspersio, etc.).
    6. Skill attacks from players have a property determined by the skill. In many cases, this is merely the property of the weapon, but it may be forced to be a particular elemental property (eg. Magnum Break forces Fire property).
    7. Cart Revolution is a rare skill that forces the elemental modifier to be applied twice. Once with a Neutral property and once with the property of the weapon wielded.
  20. Add Enhancement damage.
    1. The only source of Enhancement damage is Very's on forged weapons. Each Very is worth 5 damage.
  21. Apply Damage Bonus modifiers.
    1. Damage Bonuses are based on Size, Race, Element and Special. Bonuses of the same type stack, while bonuses of differing types multiply together. The overall calculation can be expressed as (1+SizeBonusesTotal/100) * (1+RaceBonusesTotal/100) * (1+ElementBonusesTotal/100) * (1+SpecialBonusesTotal/100).
    2. Many cards and other equipment can give Size, Race or Element Bonuses.
    3. Currently, there are no known Special Bonuses.
  22. Apply Damage Reduction modifiers.
    1. Damage Reductions are based on Size, Race, Element and Special. Bonuses of the same type stack, while bonuses of differing types multiply together. The overall calculation can be expressed as (1-SizeReductionsTotal/100) * (1-RaceReductionsTotal/100) * (1-ElementReductionsTotal/100) * (1+SpecialReductionsTotal/100).
    2. Many cards and items of equipment can give Size, Race or Element Reductions.
    3. The Energy Coat skill gives a Special Reduction.
    4. Special Reductions and rules apply to wielding two weapons.
  23. Round damage down and if the total is less than 1, increase to 1.
  24. If a "multi-attack" (double attack included), multiply total by number of hits.
  25. If attacking a "herb plant" and the total is greater than 1 then reduce damage to 1.
    1. Herb plants are Blue, Green, Red, Shining, Yellow and White Plants and Red and Black Mushrooms.
    2. The monster Antonio also acts like a "herb plant".
    3. Some monsters can also force this status onto themselves by performing Barrier.
    4. Exception applies to Gloria Domini, which deals full damage to this status.
  26. If Kyrie Eleison is in effect on the target, soak up as much damage as possible. If damage is reduced to 0 and at least 1 point of damage was soaked up, display the Guard effect to the defender, deduct the total damage from the defense pool, deduct 1 hit from the total hit defense and then stop. If damage is not reduced to 0, cancel Kyrie Eleison effect on the target.
  27. If a "multi-attack" (double attack included), divide total by number of hits.
  28. Is the current total less than 1? If so, display the appropriate number of Misses and then stop.
    1. The display for a Miss is the word "Miss!" in red rising up and behind from above the attackers head.
    2. The appropriate number of Misses is 1 for a Double Attack, 2 for a missed attack with Katars, 0 for a missed attack with a left-hand weapon (while dual wielding) and 1 in any other case.
  29. Was it a single non-Katar Hit or Critical Hit? If so, display the Hit, adjust the hps of the target and stop.
    1. The display for a Hit is a number equal to the final total in white rising up and behind from above the targets head. There is a sound associated with each different weapon type.
    2. A Critical Hit adds a spiky red box around the Hit display and has a different sound associated with it.
  30. Display the appropriate number of Hits with the appropriate totals and adjust the hps appropriately.
    1. Certain skills have multiple hits of equal power (eg. Pierce and the monster skill Multi-Attack).
    2. Dual wielding gives 2 attacks, each with a different total.
    3. Double Attack adds 1 extra Hit with the total (rounded down) of the primary weapon.
    4. A Katar adds a second hit with damage equal to a fraction of the total and a second "impact" animation.
    5. A Critical Hit adds a spiky red box around the Hit display and has a different sound associated with it.
    6. When dual wielding or using a katar, a Critical Hit with the primary normal attack causes the secondary skill attack to appear to be a critical as well. It is not.
  31. If a single attack with more than one hit, display the total of all damage in the attack.
    1. The display is a number in yellow above the head of the Target. This number fades after a few seconds and is replaced by any other attack with multiple hits (including magic attacks).

Note: In the case of a Dual Wielding Assassin, steps 1-28 should be completed separately for each weapon.

  • The full damage calculation for each Hit by a Monster (melee or ranged) is:
(([({rnd(MinATK,MaxATK) * SkillModifiers * (1 - DEF/100) - VitDEF - ProtectionSkills} + EnvenomSkill) * ElementalModifier * DamageReductionModifiers] * NumberOfMultiHits) - KyrieEleisonEffect) / NumberOfMultiHits 
  • The full damage calculation for each melee Hit by a Player is:
(([((({(STR + [STR/10]^2 + [DEX/5] + [LUK/5] + UpgradeBonus + ImpositioManus + ATKCards + rnd(min(DEX,ATK), ATK)*SizeModifier) * SkillModifiers * (1 - DEF/100) - VitDEF + BaneSkill + UpgradeDamage} + MasterySkill + WeaponryResearchSkill + EnvenomSkill) * ElementalModifier) + Enhancements) * DamageBonusModifiers * DamageReductionModifiers] * NumberOfMultiHits) - KyrieEleisonEffect) / NumberOfMultiHits 
  • The full damage calculation for each ranged Hit by a Player is:
([({(DEX + [DEX/10]^2 + [STR/5] + [LUK/5] + UpgradeBonus + ImpositioManus + ATKCards + (rnd(ATK/100*min(ATK, dex*(0.8+0.2*WeaponLevel)), max(ATK, ATK/100*min(ATK, dex*(0.8+0.2*WeaponLevel)) + rnd(0, ArrowATK - 1)) * SizeModifier) * SkillModifiers * (1 - DEF/100) - VitDEF + BaneSkill + Upgrades} + EnvenomSkill) * ElementalModifier * DamageBonusModifiers * DamageReductionModifiers] * NumberOfMultiHits) - KyrieEleisonEffect) / NumberOfMultiHits 
  • The full damage calculation for each Hit by a Player (melee or ranged) against a "Herb Plant" is:
1/NumberOfMultiHits 

Note: Yes, these formula are hellishly complex. The game does not have one huge calculation like this. It uses an algorithmic process like the stepwise one I show above.

Magical Attacks

Magical Attacks encompass all attacks using a Magic Attack Skill. Both Player Characters and Monsters can use Magic Attack Skills. As successfully cast Magic Attack Skills cannot be evaded, there is no need to check for a successful hit. However, there are many Magic Attack Skills with casting times and there are rules governing the casting process.

  1. Calculate the casting time.
    1. ActualCastTime = BaseCastTime * EquipmentMods * max(1 - Dex/150,0).
    2. EquipmentMods to casting time come from Phen Card, Tower Keeper Card, etc.
  2. Is the casting time 0? If yes, go to step 5.
  3. Start casting.
    1. Casting circle/pentagram appears around target.
    2. Casting effect (coloured) appears around caster.
    3. Casting sound can be heard.
  4. Does the spell get interrupted before casting time is up? If yes, stop.
    1. If the caster takes at least 1 point of damage from a hit (not poison or bleeding), then the spell is interrupted.
    2. Most status effects will also interrupt a spell.
    3. Phen Card and Bloody Butterfly Card makes any spell cast uninterruptible, except for Spell Breaker
  5. If a single target spell, is the target still in range? If no, stop.
    1. The target cannot be out of sight (including around a corner or cloaked/hidden).
  6. Show appropriate effect animations.
  7. If an area affect spell, are there any valid targets? If no, stop. If yes, show appropriate effect animations.
    1. Only those within the area of effect are considered valid targets.
    2. Hiding avoids some numerous spells, both directly targeted and Area of Effect spells.
  8. Assess the result of a successful attack.

The result of successful attack is assessed according to the following process.

  1. Calculate the basic ATK value. The formula is rnd(minMATK,maxMATK).
  2. Apply Item Modifier.
    1. Most Regular Rod weapons give a 15% bonus to MATK. Therefore *1.15. Exceptions are Hypnotist's Staff, which gives %25 bonus, Bazerald, which gives 10% bonus and The Sign accessory, which gives 5%.
  3. Apply Skill Modifier.
    1. Varies according to the skill.
  4. Apply MDEF modifiers to the current total.
    1. Formula is Total*(1-MDEF/100).
  5. Deduct Vit/2 and Int from the current total.
  6. Round the total down and if the current total is less than 1, then it becomes 1.
  7. Apply Elemental Modifier.
    1. The Elemental Modifier depends on the property of the magic attack skill and the property of the target.
  8. If attacking a "herb plant" and the total is greater than 1 then reduce damage to 1.
    1. Herb plants are Blue, Green, Red, Shining, Yellow and White Plants and Red and Black Mushrooms.
    2. The monster Antonio also acts like a "herb plant".
    3. Some monsters can also force this status onto themselves by performing Barrier.
  9. If the final damage is 0 or less, display a number of Misses equal to the number of "hits" in the attack and stop.
    1. The display for a Miss is the word "Miss" in red rising up and behind from above the attackers head.
  10. Display a number of Hits equal to the number of "hits" in the attack.
    1. The display for a Hit is a number equal to the final total in white rising up and behind from above the targets head. There is a sound associated with each magic attack skill.
  11. If more than one Hit, then display the total of all damage in the attack.
    1. The display is a number in yellow above the head of the Target. This number fades after a few seconds and is replaced by any other attack with multiple hits (including physical attacks).
  • The full damage calculation for each Hit in a magic attack is:
{rnd(minMATK,maxMATK) * ItemModifier * SkillModifier * (1-MDEF/100) - INT - VIT/2} * Elemental Modifier

Unknowns/Errors

Following is a list of things that I'm sure I don't know about perfectly yet. If you have accurate and tested information about this, please let me know.

  • Interaction of Safety Wall with KE (both monster and player versions of SW).
  • Do Safety Wall and Pneuma come before or after the skill check?
  • Interaction of Sidewinder card with all weapons, crap as it is.
  • Timing of Status Effect checks within the combat algorithms for both physical and magical attacks.
  • How SkillModifers stack together.
  • Exact position of Divine Protection in the scheme of things.
  • How to round things up and down in the right spots and get min 1 damage + 0.5 damage per double attack vs "herb plants".
  • How Hard DEF and Soft DEF degrade while being attacked by multiple enemies.