(final Prerequisite prereq, final CharacterDisplay display, CDOMObject source)
| 32 | { |
| 33 | |
| 34 | @Override |
| 35 | public int passes(final Prerequisite prereq, final CharacterDisplay display, CDOMObject source) |
| 36 | throws PrerequisiteException |
| 37 | { |
| 38 | int runningTotal; |
| 39 | try |
| 40 | { |
| 41 | final int targetReach = Integer.parseInt(prereq.getOperand()); |
| 42 | |
| 43 | int pcReach = FacetLibrary.getFacet(ReachFacet.class).getReach(display.getCharID()); |
| 44 | runningTotal = prereq.getOperator().compare(pcReach, targetReach); |
| 45 | } |
| 46 | catch (NumberFormatException nfe) |
| 47 | { |
| 48 | throw new PrerequisiteException( |
| 49 | LanguageBundle.getFormattedString("PreReach.error.badly_formed", prereq.getOperand()), nfe); |
| 50 | } |
| 51 | return countedTotal(prereq, runningTotal); |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Get the type of prerequisite handled by this token. |
nothing calls this directly
no test coverage detected