MCPcopy Create free account
hub / github.com/Card-Forge/forge / hasNoAbilities

Method hasNoAbilities

forge-game/src/main/java/forge/game/card/Card.java:3421–3451  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3419 }
3420
3421 public boolean hasNoAbilities() {
3422 if (!getUnhiddenKeywords().isEmpty()) {
3423 return false;
3424 }
3425 if (!getStaticAbilities().isEmpty()) {
3426 return false;
3427 }
3428 if (!currentState.getReplacementEffects(false).isEmpty()) {
3429 return false;
3430 }
3431 if (!getTriggers().isEmpty()) {
3432 return false;
3433 }
3434 for (SpellAbility sa : getSpellAbilities()) {
3435 // morph up and disguise up are not part of the card
3436 if (sa.isMorphUp() || sa.isDisguiseUp()) {
3437 continue;
3438 }
3439 // while Adventure and Omen are part of Secondary
3440 if ((sa.isAdventure() || sa.isOmen()) && !getCurrentStateName().equals(sa.getCardStateName())) {
3441 continue;
3442 }
3443 if (sa.isLandAbility()) {
3444 continue;
3445 }
3446 if (!(sa instanceof SpellPermanent && sa.isBasicSpell())) {
3447 return false;
3448 }
3449 }
3450 return true;
3451 }
3452
3453 public void updateSpellAbilities(List<SpellAbility> list, CardState state) {
3454 for (final ICardTraitChanges ck : getChangedCardTraitsList(state)) {

Callers 1

cardHasPropertyMethod · 0.80

Calls 15

getUnhiddenKeywordsMethod · 0.95
getStaticAbilitiesMethod · 0.95
getTriggersMethod · 0.95
getSpellAbilitiesMethod · 0.95
getCurrentStateNameMethod · 0.95
isMorphUpMethod · 0.80
isDisguiseUpMethod · 0.80
isAdventureMethod · 0.80
isOmenMethod · 0.80
getCardStateNameMethod · 0.80
isBasicSpellMethod · 0.80
isEmptyMethod · 0.65

Tested by

no test coverage detected