Merge origin/master

This commit is contained in:
USER 2019-08-31 11:27:51 +08:00
commit 4582cb23a9
3 changed files with 34 additions and 10 deletions

View file

@ -46,6 +46,7 @@ public class AusHighlander extends Constructed {
pointMap.put("Dark Petition", 1); pointMap.put("Dark Petition", 1);
pointMap.put("Enlightened Tutor", 1); pointMap.put("Enlightened Tutor", 1);
pointMap.put("Fastbond", 1); pointMap.put("Fastbond", 1);
pointMap.put("Flash", 1);
pointMap.put("Force of Will", 1); pointMap.put("Force of Will", 1);
pointMap.put("Green Sun's Zenith", 1); pointMap.put("Green Sun's Zenith", 1);
pointMap.put("Hermit Druid", 1); pointMap.put("Hermit Druid", 1);

View file

@ -55,25 +55,28 @@ public class DuelCommander extends Commander {
banned.add("The Tabernacle at Pendrell Vale"); banned.add("The Tabernacle at Pendrell Vale");
banned.add("Time Vault"); banned.add("Time Vault");
banned.add("Time Walk"); banned.add("Time Walk");
banned.add("Timetwister");
banned.add("Tinker"); banned.add("Tinker");
banned.add("Tolarian Academy"); banned.add("Tolarian Academy");
banned.add("Treasure Cruise"); banned.add("Treasure Cruise");
banned.add("Vampiric Tutor"); banned.add("Vampiric Tutor");
bannedCommander.add("Arahbo, Roar of the World");
bannedCommander.add("Breya, Etherium Shaper"); bannedCommander.add("Breya, Etherium Shaper");
bannedCommander.add("Bruse Tarl, Boorish Herder"); bannedCommander.add("Bruse Tarl, Boorish Herder");
bannedCommander.add("Derevi, Empyrial Tactician"); bannedCommander.add("Derevi, Empyrial Tactician");
bannedCommander.add("Edgar Markov"); bannedCommander.add("Edgar Markov");
bannedCommander.add("Edric, Spymaster of Trest");
bannedCommander.add("Erayo, Soratami Ascendant");
bannedCommander.add("Geist of Saint Traft"); bannedCommander.add("Geist of Saint Traft");
bannedCommander.add("Jace, Vryn's Prodigy"); bannedCommander.add("Jace, Vryn's Prodigy");
bannedCommander.add("Marath, Will of the Wild"); bannedCommander.add("Marath, Will of the Wild");
bannedCommander.add("Najeela, the Blade-Blossom");
bannedCommander.add("Oloro, Ageless Ascetic"); bannedCommander.add("Oloro, Ageless Ascetic");
bannedCommander.add("Rofellos, Llanowar Emissary"); bannedCommander.add("Rofellos, Llanowar Emissary");
bannedCommander.add("Tasigur, the Golden Fang"); bannedCommander.add("Tasigur, the Golden Fang");
bannedCommander.add("Teferi, Temporal Archmage");
bannedCommander.add("Urza, Lord High Artificer");
bannedCommander.add("Vial Smasher the Fierce"); bannedCommander.add("Vial Smasher the Fierce");
bannedCommander.add("Zur the Enchanter"); bannedCommander.add("Yuriko, the Tigers Shadow");
bannedCommander.add("Zurgo Bellstriker"); bannedCommander.add("Zurgo Bellstriker");
} }

View file

@ -1,6 +1,7 @@
package mage.cards.k; package mage.cards.k;
import mage.MageInt; import mage.MageInt;
import mage.MageObjectReference;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -75,24 +76,43 @@ class KethisTheHiddenHandEffect extends ContinuousEffectImpl {
super(effect); super(effect);
} }
@Override
public void init(Ability source, Game game) {
super.init(source, game);
if (!this.affectedObjectsSet) {
return;
}
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return;
}
player.getGraveyard()
.stream()
.map(game::getCard)
.filter(Card::isLegendary)
.forEach(card -> affectedObjectList.add(new MageObjectReference(card, game)));
}
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
if (controller == null) { if (controller == null) {
return false; return false;
} }
for (UUID cardId : controller.getGraveyard()) { controller.getGraveyard()
Card card = game.getCard(cardId); .getCards(game)
if (card == null || !card.isLegendary()) { .stream()
continue; .filter(card -> affectedObjectList
} .stream()
.anyMatch(mor -> mor.refersTo(card, game))
).forEach(card -> {
Ability ability = new SimpleStaticAbility( Ability ability = new SimpleStaticAbility(
Zone.GRAVEYARD, new KethisTheHiddenHandGraveyardEffect() Zone.GRAVEYARD, new KethisTheHiddenHandGraveyardEffect()
); );
ability.setSourceId(cardId); ability.setSourceId(card.getId());
ability.setControllerId(card.getOwnerId()); ability.setControllerId(card.getOwnerId());
game.getState().addOtherAbility(card, ability); game.getState().addOtherAbility(card, ability);
} });
return true; return true;
} }