mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
- Added a NPE check to sharesCreatureTypeWith.
This commit is contained in:
@@ -7337,6 +7337,10 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
*/
|
*/
|
||||||
public final boolean sharesCreatureTypeWith(final Card c1) {
|
public final boolean sharesCreatureTypeWith(final Card c1) {
|
||||||
|
|
||||||
|
if (c1 == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
for (final String type : this.getType()) {
|
for (final String type : this.getType()) {
|
||||||
if (type.equals("AllCreatureTypes") && c1.hasACreatureType()) {
|
if (type.equals("AllCreatureTypes") && c1.hasACreatureType()) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user