(CNAbilitySelection choice, PlayerCharacter pc, boolean allowStack)
| 363 | } |
| 364 | |
| 365 | @Override |
| 366 | public boolean allow(CNAbilitySelection choice, PlayerCharacter pc, boolean allowStack) |
| 367 | { |
| 368 | CNAbility cna = choice.getCNAbility(); |
| 369 | Ability ability = cna.getAbility(); |
| 370 | if (!ability.getSafe(ObjectKey.VISIBILITY).equals(Visibility.DEFAULT)) |
| 371 | { |
| 372 | return false; |
| 373 | } |
| 374 | boolean isVirtual = Nature.VIRTUAL.equals(cna.getNature()); |
| 375 | if (!isVirtual && !ability.qualifies(pc, ability)) |
| 376 | { |
| 377 | return false; |
| 378 | } |
| 379 | String selection = choice.getSelection(); |
| 380 | // Avoid any already selected |
| 381 | return !AbilityUtilities.alreadySelected(pc, ability, selection, allowStack); |
| 382 | } |
| 383 | |
| 384 | @Override |
| 385 | public CNAbilitySelection decodeChoice(LoadContext context, String s) |
nothing calls this directly
no test coverage detected