[WOE] Implement Ashiok, Wicked Manipulator (#10909)

* [WOE] Implement Ashiok, Wicket Manipulator

* Add Ashiok's abilities

* basic pay life replacement tests

* many tests later

* add warning on token expecting watcher

* apply review

* rework text generation
This commit is contained in:
Susucre 2023-08-31 01:15:56 +02:00 committed by GitHub
parent fe165f1fd0
commit 2a5dd4103c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 634 additions and 19 deletions

View file

@ -0,0 +1,52 @@
package mage.abilities.dynamicvalue.common;
import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.cards.Card;
import mage.game.Game;
import java.util.List;
public enum TotalCardsExiledOwnedManaValue implements DynamicValue {
instance;
private static final Hint hint = new ValueHint("Total mana value of cards you own in exile", instance);
private TotalCardsExiledOwnedManaValue() {
}
@Override
public TotalCardsExiledOwnedManaValue copy() {
return this;
}
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
int totalCMC = 0;
List<Card> cards = game.getExile().getAllCards(
game,
sourceAbility.getControllerId()
);
for (Card card : cards) {
totalCMC += card.getManaValue();
}
return totalCMC;
}
@Override
public String getMessage() {
return "the total mana value of cards you own in exile";
}
@Override
public String toString() {
return "X";
}
public static Hint getHint() {
return hint;
}
}