forked from External/mage
Refactor implementation of spell copies for cards like Twinning Staff as well as refactor handling of target changing (WIP) (#7662)
* refactored createCopyOnStack to be void * added new interface for modifying copied spellsspells * update implementation of Fork to use new applier * reworked epic effect * add applier to spell copy code * updated implementation of Beamsplitter Mage * updated cards which copy for each possible target * added support for additional copies having targets changed * fixed/ignored failing tests * updated target changing to prevent unnecessary choosing * added test for Twinning Staff * updated implementation of spell copy applier * added new method for choosing order of copies on stack * fixed test failures * [TSR] various text fixes * fixed a test failure * [SLD] fixed Rick, Steadfast Leader only counting Human creatures * updated test framework to handle skips without affecting starting player choice * fixed another test failure * updated copy messaging for consistency * added copy messaging to stack abilities
This commit is contained in:
parent
b51915f6e8
commit
9c56a98dc9
47 changed files with 972 additions and 1092 deletions
|
|
@ -96,10 +96,10 @@ public class ReplicateAbility extends StaticAbility implements OptionalAdditiona
|
|||
// canPay checks only single mana available, not total mana usage
|
||||
if (additionalCost.canPay(ability, this, ability.getControllerId(), game)
|
||||
&& player.chooseUse(/*Outcome.Benefit*/Outcome.AIDontUseIt,
|
||||
new StringBuilder("Pay ").append(times).append(
|
||||
additionalCost.getText(false)).append(" ?").toString(), ability, game)) {
|
||||
new StringBuilder("Pay ").append(times).append(
|
||||
additionalCost.getText(false)).append(" ?").toString(), ability, game)) {
|
||||
additionalCost.activate();
|
||||
for (Iterator it = ((Costs) additionalCost).iterator(); it.hasNext();) {
|
||||
for (Iterator it = ((Costs) additionalCost).iterator(); it.hasNext(); ) {
|
||||
Cost cost = (Cost) it.next();
|
||||
if (cost instanceof ManaCostsImpl) {
|
||||
ability.getManaCostsToPay().add((ManaCostsImpl) cost.copy());
|
||||
|
|
@ -225,8 +225,7 @@ class ReplicateCopyEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
// create the copies
|
||||
StackObject newStackObject = spell.createCopyOnStack(game, source,
|
||||
source.getControllerId(), true, replicateCount);
|
||||
spell.createCopyOnStack(game, source, source.getControllerId(), true, replicateCount);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue