mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Kiki-Jiki, Mirror Breaker should work correctly now with Doubling Season.
This commit is contained in:
@@ -672,6 +672,15 @@ public class CardFactory_Creatures {
|
|||||||
&& getTargetCard().getController().equals(card.getController())
|
&& getTargetCard().getController().equals(card.getController())
|
||||||
&& CardFactoryUtil.canTarget(card, getTargetCard())) {
|
&& CardFactoryUtil.canTarget(card, getTargetCard())) {
|
||||||
|
|
||||||
|
int multiplier = 1;
|
||||||
|
int doublingSeasons = CardFactoryUtil.getCards("Doubling Season", card.getController()).size();
|
||||||
|
if(doublingSeasons > 0) multiplier = (int) Math.pow(2, doublingSeasons);
|
||||||
|
Card[] crds = new Card[multiplier];
|
||||||
|
|
||||||
|
for (int i=0;i<multiplier;i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
Card copy;
|
Card copy;
|
||||||
if(!getTargetCard().isToken()) {
|
if(!getTargetCard().isToken()) {
|
||||||
//CardFactory cf = new CardFactory("cards.txt");
|
//CardFactory cf = new CardFactory("cards.txt");
|
||||||
@@ -720,24 +729,31 @@ public class CardFactory_Creatures {
|
|||||||
copy.addIntrinsicKeyword("Haste");
|
copy.addIntrinsicKeyword("Haste");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
|
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
|
||||||
play.add(copy);
|
play.add(copy);
|
||||||
|
crds[i] = copy;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//have to do this since getTargetCard() might change
|
//have to do this since getTargetCard() might change
|
||||||
//if Kiki-Jiki somehow gets untapped again
|
//if Kiki-Jiki somehow gets untapped again
|
||||||
final Card[] target = new Card[1];
|
final Card[] target = new Card[multiplier];
|
||||||
target[0] = copy;
|
for (int i=0;i<multiplier;i++) {
|
||||||
|
final int index = i;
|
||||||
|
target[i] = crds[i];
|
||||||
Command atEOT = new Command() {
|
Command atEOT = new Command() {
|
||||||
private static final long serialVersionUID = 7803915905490565557L;
|
private static final long serialVersionUID = 7803915905490565557L;
|
||||||
|
|
||||||
public void execute() {
|
public void execute() {
|
||||||
//technically your opponent could steal the token
|
//technically your opponent could steal the token
|
||||||
//and the token shouldn't be sacrificed
|
//and the token shouldn't be sacrificed
|
||||||
if(AllZone.GameAction.isCardInPlay(target[0])) AllZone.GameAction.sacrifice(target[0]); //maybe do a setSacrificeAtEOT, but probably not.
|
if(AllZone.GameAction.isCardInPlay(target[index])) AllZone.GameAction.sacrifice(target[index]); //maybe do a setSacrificeAtEOT, but probably not.
|
||||||
}
|
}
|
||||||
};//Command
|
};//Command
|
||||||
AllZone.EndOfTurn.addAt(atEOT);
|
AllZone.EndOfTurn.addAt(atEOT);
|
||||||
|
}
|
||||||
}//is card in play?
|
}//is card in play?
|
||||||
}//resolve()
|
}//resolve()
|
||||||
};//SpellAbility
|
};//SpellAbility
|
||||||
|
|||||||
Reference in New Issue
Block a user