mirror of
https://github.com/correl/mage.git
synced 2024-11-29 03:00:12 +00: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;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.SpellAbility;
|
||||
|
@ -26,6 +23,10 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
|
@ -92,11 +93,12 @@ class PolukranosUnchainedEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||
int counters = (spellAbility instanceof EscapeAbility) ? 12 : 6;
|
||||
if (!spellAbility.getSourceId().equals(source.getSourceId())
|
||||
int counters = 12;
|
||||
if (!(spellAbility instanceof EscapeAbility)
|
||||
|| !spellAbility.getSourceId().equals(source.getSourceId())
|
||||
|| permanent.getZoneChangeCounter(game) != spellAbility.getSourceObjectZoneChangeCounter()
|
||||
|| !spellAbility.getSourceId().equals(source.getSourceId())) {
|
||||
return false;
|
||||
counters = 6;
|
||||
}
|
||||
List<UUID> appliedEffects = (ArrayList<UUID>) this.getValue("appliedEffects");
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(counters), source, game, appliedEffects);
|
||||
|
|
Loading…
Reference in a new issue