use of pcgen.base.util.IdentityList in project pcgen by PCGen.
the class PlayerCharacter method processOldAcCheck.
/**
* Calculate the ACCHECK bonus from equipped items. Extracted from
* modToFromEquipment.
*
* TODO Penalty for load could/should be GameMode specific?
*
* @return PC's ACCHECK bonus from equipment
* @deprecated due to PCACCHECK code control
*/
@Deprecated
public int processOldAcCheck() {
Load load = getHouseRuledLoadType();
int bonus = 0;
int penaltyForLoad = (load == Load.MEDIUM) ? -3 : (load == Load.HEAVY) ? -6 : 0;
final IdentityList<Equipment> vEqList = new IdentityList<>(tempBonusItemList);
for (Equipment eq : getEquippedEquipmentSet()) {
// Do not count virtual items created by temporary bonuses
if (!vEqList.contains(eq)) {
bonus += EqToken.getAcCheckTokenInt(this, eq);
}
}
bonus = Math.min(bonus, penaltyForLoad);
bonus += (int) getTotalBonusTo("MISC", "ACCHECK");
return bonus;
}
Aggregations