| 4551 | } |
| 4552 | |
| 4553 | public int calcSR(final boolean includeEquipment) |
| 4554 | { |
| 4555 | int SR = srFacet.getSR(id); |
| 4556 | |
| 4557 | if (includeEquipment) |
| 4558 | { |
| 4559 | for (Equipment eq : getEquippedEquipmentSet()) |
| 4560 | { |
| 4561 | SR = Math.max(SR, |
| 4562 | eq.getSafe(ObjectKey.SR).getReduction().resolve(this, eq.getQualifiedKey()).intValue()); |
| 4563 | |
| 4564 | for (EquipmentModifier eqMod : eq.getEqModifierList(true)) |
| 4565 | { |
| 4566 | SR = Math.max(SR, eqMod.getSR(eq, this)); |
| 4567 | } |
| 4568 | |
| 4569 | for (EquipmentModifier eqMod : eq.getEqModifierList(false)) |
| 4570 | { |
| 4571 | SR = Math.max(SR, eqMod.getSR(eq, this)); |
| 4572 | } |
| 4573 | } |
| 4574 | } |
| 4575 | |
| 4576 | SR += (int) getTotalBonusTo("MISC", "SR"); |
| 4577 | // SR += (int) getBonusValue("MISC", "SR"); |
| 4578 | |
| 4579 | // |
| 4580 | // This would make more sense to just not add in the first place... |
| 4581 | // |
| 4582 | if (!includeEquipment) |
| 4583 | { |
| 4584 | SR -= (int) getEquipmentBonusTo("MISC", "SR"); |
| 4585 | } |
| 4586 | |
| 4587 | return SR; |
| 4588 | } |
| 4589 | |
| 4590 | /** |
| 4591 | * Method will go through the list of classes that the PC has and see if |