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