(final Card c1)
| 5858 | } |
| 5859 | |
| 5860 | public final boolean sharesNameWith(final Card c1) { |
| 5861 | // in a corner case where c1 is null, there is no name to share with. |
| 5862 | if (c1 == null) { |
| 5863 | return false; |
| 5864 | } |
| 5865 | |
| 5866 | // Special Logic for SpyKit |
| 5867 | if (c1.hasNonLegendaryCreatureNames()) { |
| 5868 | if (hasNonLegendaryCreatureNames()) { |
| 5869 | // with both does have this, then they share any name |
| 5870 | return true; |
| 5871 | } else if (getName().isEmpty()) { |
| 5872 | // if this does not have a name, then there is no name to share |
| 5873 | return false; |
| 5874 | } else if (StaticData.instance().getCommonCards().isNonLegendaryCreatureName(getName())) { |
| 5875 | // check if this card has a name from a face |
| 5876 | // in general token creatures does not have this |
| 5877 | return true; |
| 5878 | } |
| 5879 | } |
| 5880 | return sharesNameWith(c1.getName()); |
| 5881 | } |
| 5882 | |
| 5883 | public final boolean sharesNameWith(final String name) { |
| 5884 | // the name is null or empty |
no test coverage detected