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