@Override public LockedInDynamicValue copy() { return new LockedInDynamicValue(this, true); }
public GideonChampionOfJustice(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{2}{W}{W}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.GIDEON); this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4)); // +1: Put a loyalty counter on Gideon, Champion of Justice for each creature target opponent controls. LoyaltyAbility ability1 = new LoyaltyAbility( new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(0), new PermanentsTargetOpponentControlsCount(new FilterCreaturePermanent()), true), 1); ability1.addTarget(new TargetOpponent()); this.addAbility(ability1); // 0: Until end of turn, Gideon becomes an indestructible Human Soldier creature with power and toughness each equal to the number of loyalty counters on him. He's still a planeswalker. Prevent all damage that would be dealt to him this turn. LockedInDynamicValue loyaltyCount = new LockedInDynamicValue(new CountersSourceCount(CounterType.LOYALTY)); LoyaltyAbility ability2 = new LoyaltyAbility(new BecomesCreatureSourceEffect( new GideonChampionOfJusticeToken(), "planeswalker", Duration.EndOfTurn, false, false, loyaltyCount, loyaltyCount), 0); ability2.addEffect(new PreventAllDamageToSourceEffect(Duration.EndOfTurn)); this.addAbility(ability2); // -15: Exile all other permanents. this.addAbility(new LoyaltyAbility(new GideonExileAllOtherPermanentsEffect(), -15)); }