Splice: do a total rewrite to make it better for the player and more rules conform

This commit is contained in:
Hanmac
2016-12-21 18:32:50 +00:00
parent 77437bdb50
commit 94681b6675
10 changed files with 118 additions and 74 deletions

View File

@@ -87,6 +87,10 @@ public class HumanPlay {
CharmEffect.makeChoices(sa);
}
if (source.getType().hasStringType("Arcane")) {
sa = AbilityUtils.addSpliceEffects(sa);
}
if (sa.hasParam("Bestow")) {
source.animateBestow();
}
@@ -173,7 +177,7 @@ public class HumanPlay {
* @param sa
* a {@link forge.game.spellability.SpellAbility} object.
*/
public static final void playSaWithoutPayingManaCost(final PlayerControllerHuman controller, final Game game, final SpellAbility sa, boolean mayChooseNewTargets) {
public static final void playSaWithoutPayingManaCost(final PlayerControllerHuman controller, final Game game, SpellAbility sa, boolean mayChooseNewTargets) {
FThreads.assertExecutedByEdt(false);
final Card source = sa.getHostCard();
@@ -183,6 +187,9 @@ public class HumanPlay {
if (sa.getApi() == ApiType.Charm && !sa.isWrapper() && !sa.isCopied()) {
CharmEffect.makeChoices(sa);
}
if (source.getType().hasStringType("Arcane") && !sa.isCopied()) {
sa = AbilityUtils.addSpliceEffects(sa);
}
final CostPayment payment = new CostPayment(sa.getPayCosts(), sa);
final HumanPlaySpellAbility req = new HumanPlaySpellAbility(controller, sa, payment);

View File

@@ -1938,4 +1938,10 @@ public class PlayerControllerHuman
ICardFace face = getGui().one(message, faces);
return face == null ? "" : face.getName();
}
@Override
public List<Card> chooseCardsForSplice(SpellAbility sa, List<Card> cards) {
return getGui().many("Choose cards to Splice onto", "Chosen Cards", 0, cards.size(), cards, sa.getHostCard().getView());
}
}