mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
Prowl: use sharesCreatureTypeWith
This commit is contained in:
@@ -2132,12 +2132,8 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
return lost;
|
return lost;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final boolean hasProwl(final Set<String> types) {
|
public final boolean hasProwl(final SpellAbility sa) {
|
||||||
StringBuilder sb = new StringBuilder();
|
return !game.getDamageDoneThisTurn(true, true, "Card.YouCtrl+sharesCreatureTypeWith", "Player", sa.getHostCard(), this, sa).isEmpty();
|
||||||
for (String type : types) {
|
|
||||||
sb.append("Card.YouCtrl+").append(type).append(",");
|
|
||||||
}
|
|
||||||
return !game.getDamageDoneThisTurn(true, true, sb.toString(), "Player", null, this, null).isEmpty();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final boolean hasFreerunning() {
|
public final boolean hasFreerunning() {
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sa.isProwl()) {
|
if (sa.isProwl()) {
|
||||||
if (!activator.hasProwl(c.getType().getCreatureTypes())) {
|
if (!activator.hasProwl(sa)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user