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.
In the game's code, accuracy is calculated in the Char.java file as part of the attackSkill method:
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, bonus); if (target == null) { // Mainly to mask bug in Remixed RPG target = CharsList.DUMMY; } if (rangedWeapon.valid() && level().distance(getPos(), target.getPos()) == 1) { accuracy *= 0.5f; } float mainAccuracyFactor = getActiveWeapon().accuracyFactor(this); float secondaryAccuracyFactor = getSecondaryWeapon().accuracyFactor(this); float skillFactor = Utils.min(20f, mainAccuracyFactor, secondaryAccuracyFactor); int aSkill = (int) ((baseAttackSkill + lvl()) * accuracy * skillFactor); GLog.debug("%s attacking %s with factor %2.2f, resulting skill %d", getEntityKind(), target.getEntityKind(), skillFactor, aSkill); return aSkill; }
Math.pow(1.4, bonus) (from RingOfAccuracy or similar items)accuracyFactor values (e.g., RingOfAccuracy provides a bonus)RingOfAccuracy_Name: “Ring of Accuracy”RingOfAccuracy_Info: “This ring increases your chance to hit the enemy.”Weightstone_WndAccuracy: “For accuracy”CompoundBow_Info: “Arrows launched from this compound bow deal a great amount of damage and have improved accuracy over a wooden bow at the cost of some speed.”HeroClass_PlagueDoctorPerks_4)