mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
fixed Polukranos, Unchained not getting counters when entering from a zone other than the stack
This commit is contained in:
parent
0f6fcaee18
commit
73d87a9432
1 changed files with 8 additions and 6 deletions
|
|
@ -1,8 +1,5 @@
|
||||||
package mage.cards.p;
|
package mage.cards.p;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.SpellAbility;
|
import mage.abilities.SpellAbility;
|
||||||
|
|
@ -26,6 +23,10 @@ import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
|
|
@ -92,11 +93,12 @@ class PolukranosUnchainedEffect extends OneShotEffect {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||||
int counters = (spellAbility instanceof EscapeAbility) ? 12 : 6;
|
int counters = 12;
|
||||||
if (!spellAbility.getSourceId().equals(source.getSourceId())
|
if (!(spellAbility instanceof EscapeAbility)
|
||||||
|
|| !spellAbility.getSourceId().equals(source.getSourceId())
|
||||||
|| permanent.getZoneChangeCounter(game) != spellAbility.getSourceObjectZoneChangeCounter()
|
|| permanent.getZoneChangeCounter(game) != spellAbility.getSourceObjectZoneChangeCounter()
|
||||||
|| !spellAbility.getSourceId().equals(source.getSourceId())) {
|
|| !spellAbility.getSourceId().equals(source.getSourceId())) {
|
||||||
return false;
|
counters = 6;
|
||||||
}
|
}
|
||||||
List<UUID> appliedEffects = (ArrayList<UUID>) this.getValue("appliedEffects");
|
List<UUID> appliedEffects = (ArrayList<UUID>) this.getValue("appliedEffects");
|
||||||
permanent.addCounters(CounterType.P1P1.createInstance(counters), source, game, appliedEffects);
|
permanent.addCounters(CounterType.P1P1.createInstance(counters), source, game, appliedEffects);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue