mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
support for "CanEnchantEquippedBy" restriction
This commit is contained in:
@@ -453,6 +453,9 @@ public class CardProperty {
|
||||
}
|
||||
} else if (property.startsWith("CanEnchant")) {
|
||||
final String restriction = property.substring(10);
|
||||
if (restriction.equals("EquippedBy")) {
|
||||
if (!source.getEquipping().canBeAttached(card)) return false;
|
||||
}
|
||||
if (restriction.equals("Remembered")) {
|
||||
for (final Object rem : source.getRemembered()) {
|
||||
if (!(rem instanceof Card) || !((Card) rem).canBeAttached(card))
|
||||
|
||||
Reference in New Issue
Block a user