mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Fix for attempting to put counters on a token that no longer exists
This commit is contained in:
@@ -590,7 +590,11 @@ public class AbilityFactory_Counters {
|
||||
|
||||
for (Card tgtCard : tgtCards) {
|
||||
if (tgt == null || CardFactoryUtil.canTarget(card, tgtCard)) {
|
||||
if (AllZone.getZoneOf(tgtCard).is(Constant.Zone.Battlefield)) {
|
||||
PlayerZone zone = AllZone.getZoneOf(tgtCard);
|
||||
if (zone == null){
|
||||
// Do nothing, token disappeared
|
||||
}
|
||||
else if (zone.is(Constant.Zone.Battlefield)) {
|
||||
tgtCard.addCounter(Counters.valueOf(type), counterAmount);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user