en:rpd:armor_class
Table of Contents
Armor Class
Armor Class (AC) in Remixed Dungeon represents the protective value of armor that reduces incoming physical damage. It is distinct from the defense skill which determines evasion.
Armor Class Formula
The armor class system works by reducing the damage taken from physical attacks. The calculation is implemented in the Char.java file:
public int absorb( int damage, Char attacker ) { // Armor can be bypassed by accuracy, and can overcap float effectiveArmor = armorLevel() * (1 + Hero.getBonus( getHeroClass(), getSubClass(), Buffs.ARMOR )); if (attacker != null) { float armorBreakRatio = (float)attacker.attackSkill(this) / (attacker.attackSkill(this) + effectiveArmor); // Cap the effective armor to the damage being dealt effectiveArmor = Math.min(effectiveArmor, damage*2); // Reduce damage based on armor break ratio damage = (int) Math.ceil(damage * (1f - armorBreakRatio)); } return damage; }
Armor Class Mechanics
Base Armor Level
- Calculation: Derived from the equipped armor item using
getItemFromSlot(Belongings.Slot.ARMOR).DR() - Definition: Each armor type has a base damage reduction value
- Examples:
- Cloth Armor: 2-3 points
- Leather Armor: 3-4 points
- Mail Armor: 5-6 points
- Plate Armor: 7-8 points
Armor Bonus Buffs
- Mechanism: Bonuses from effects like armor potions or enchantments
- Formula:
armorLevel() * (1 + Hero.getBonus( getHeroClass(), getSubClass(), Buffs.ARMOR )) - Effect: Multiplies the base armor level by the bonus factor
Armor Penetration
- Mechanism: Attacker's accuracy can reduce the effectiveness of armor
- Formula:
armorBreakRatio = (float)attacker.attackSkill(this) / (attacker.attackSkill(this) + effectiveArmor) - Effect: Higher attack skill reduces the armor's effectiveness proportionally
Damage Reduction Calculation
- Effective Armor Cap:
Math.min(effectiveArmor, damage*2)- Armor can't reduce damage beyond 50% of the original amount - Damage Reduction:
damage * (1f - armorBreakRatio)- Reduces damage based on the armor break ratio - Final Damage:
(int) Math.ceil(damage * (1f - armorBreakRatio))- Rounded up to ensure at least 1 damage is dealt
Armor vs Defense
- Armor Class: Reduces incoming damage after a hit is successful
- Defense Skill: Determines the chance to avoid being hit entirely
- Relationship: Both systems work together - defense skill prevents hits, armor reduces damage from hits that land
Armor Class in Combat
- Hit Occurs: When an attack successfully connects (attack skill > defense skill)
- Armor Absorption: The armor class applies its damage reduction
- Final Damage: The remaining damage after armor reduction is applied
Factors Affecting Armor Class
- Armor Type: Different armor classes provide different base DR values
- Armor Level: Upgraded armor provides better protection
- Glyphs: Enchantments on armor can affect its effectiveness
- Armor Buffs: Temporary effects that increase armor effectiveness
- Hero Classes: Some classes have bonuses to armor effectiveness
- Hero Subclasses: Some subclasses provide armor bonuses
Related Buffs and Effects
- Armor-boosting buffs will multiply the base armor value
- Potion of Shielding provides temporary armor bonus
- Ring of Shielding provides ongoing armor enhancement
Equipment with Armor Effects
- Armor items - Primary source of armor class
- Ring of Shielding - Provides armor bonus
- Potion of Shielding - Temporary armor boost
Code References
- Java: Char.java
- Java: Hero.java
- Java: Belongings.java
Related
en/rpd/armor_class.txt · Last modified: by 127.0.0.1
