rpd:accuracy_mechanic
Differences
This shows you the differences between two versions of the page.
| rpd:accuracy_mechanic [2025/12/29 09:28] – Update wiki pages: rename files to follow naming convention, add missing pages, fix formatting issues mike | rpd:accuracy_mechanic [2025/12/29 09:33] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Accuracy Mechanic ====== | ||
| + | Accuracy is a combat mechanic in Remixed Pixel Dungeon that determines the chance to successfully hit a target with attacks. Higher accuracy increases the probability of landing hits on enemies. | ||
| + | |||
| + | ==== Accuracy Formula ==== | ||
| + | In the game's code, accuracy is calculated in the '' | ||
| + | |||
| + | <code java> | ||
| + | public int attackSkill(Char target) { | ||
| + | int[] bf = {0}; | ||
| + | forEachBuff(b -> bf[0] += b.attackSkillBonus(this)); | ||
| + | |||
| + | int bonus = bf[0]; | ||
| + | |||
| + | float accuracy = (float) Math.pow(1.4, | ||
| + | |||
| + | if (target == null) { // Mainly to mask bug in Remixed RPG | ||
| + | target = CharsList.DUMMY; | ||
| + | } | ||
| + | |||
| + | if (rangedWeapon.valid() && level().distance(getPos(), | ||
| + | accuracy *= 0.5f; | ||
| + | } | ||
| + | |||
| + | float mainAccuracyFactor = getActiveWeapon().accuracyFactor(this); | ||
| + | float secondaryAccuracyFactor = getSecondaryWeapon().accuracyFactor(this); | ||
| + | |||
| + | float skillFactor = Utils.min(20f, | ||
| + | |||
| + | int aSkill = (int) ((baseAttackSkill + lvl()) * accuracy * skillFactor); | ||
| + | |||
| + | GLog.debug(" | ||
| + | |||
| + | return aSkill; | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ==== Key Factors Affecting Accuracy ==== | ||
| + | * **Attack Skill**: The primary factor determining hit probability | ||
| + | * **Buff Bonuses**: Each bonus point increases accuracy exponentially using the formula '' | ||
| + | * **Weapon Accuracy Factor**: Different weapons have different '' | ||
| + | * **Ranged Penalty**: When using a ranged weapon at melee distance (distance = 1), accuracy is halved (0.5f multiplier) | ||
| + | * **Weapon Enchantments**: | ||
| + | * **Status Effects**: Negative effects like blindness can reduce accuracy | ||
| + | |||
| + | ==== Equipment with Accuracy Benefits ==== | ||
| + | * **[[rpd: | ||
| + | * **[[rpd: | ||
| + | * **Weapon Imbue ACCURACY**: Using a weightstone with the "For accuracy" | ||
| + | * **[[rpd: | ||
| + | |||
| + | ==== Related Strings ==== | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | ==== Class Considerations ==== | ||
| + | * **Warrior**: | ||
| + | * **Mage**: Important for ensuring wand shots connect | ||
| + | * **Rogue**: High accuracy helps with stealth-based attacks | ||
| + | * **Huntress**: | ||
| + | * **Plague Doctor**: Suffers accuracy penalties without the Bone Saw equipped (string: '' | ||
| + | |||
| + | ==== Code References ==== | ||
| + | * Java: [[https:// | ||
| + | * Java: [[https:// | ||
| + | * Java: [[https:// | ||
| + | |||
| + | ==== Related ==== | ||
| + | * [[rpd: | ||
| + | * [[rpd: | ||
| + | * [[rpd: | ||
| + | * [[rpd: | ||
| + | * [[rpd: | ||
| + | * [[rpd: | ||
| + | * [[rpd: | ||
| + | * [[rpd: | ||
| + | |||
| + | {{tag> rpd mechanics accuracy attack combat}} | ||
