added a new Keyword: You may choose not to untap CARDNAME during your untap step.

Human is asked, computer will not untap when it has the choice.  (The assumption being cards with this kind of ability don't want to untap.)

using this, added Rubinia Soulsinger (from Legends)
This commit is contained in:
jendave
2011-08-06 04:27:26 +00:00
parent ff90cd495c
commit e9e56da036
5 changed files with 139 additions and 14 deletions

View File

@@ -38,6 +38,7 @@ snow_covered_mountain.jpg http://www.wizards.com/global/images/magic/gene
snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg
snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
rubinia_soulsinger.jpg http://www.wizards.com/global/images/magic/general/rubinia_soulsinger.jpg
festering_wound.jpg http://www.wizards.com/global/images/magic/general/festering_wound.jpg festering_wound.jpg http://www.wizards.com/global/images/magic/general/festering_wound.jpg
spirit_shackle.jpg http://www.wizards.com/global/images/magic/general/spirit_shackle.jpg spirit_shackle.jpg http://www.wizards.com/global/images/magic/general/spirit_shackle.jpg
curse_of_chains.jpg http://www.wizards.com/global/images/magic/general/curse_of_chains.jpg curse_of_chains.jpg http://www.wizards.com/global/images/magic/general/curse_of_chains.jpg

View File

@@ -1,3 +1,10 @@
Rubinia Soulsinger
2 G W U
Legendary Creature Faerie
tap: Gain control of target creature for as long as you control Rubinia and Rubinia remains tapped.
2/3
You may choose not to untap CARDNAME during your untap step.
Cemetery Reaper Cemetery Reaper
1 B B 1 B B
Creature Zombie Creature Zombie
@@ -63,18 +70,6 @@ Protection from colored spells
Annihilator 6 Annihilator 6
When this card is put into a graveyard from anywhere, reveal this card and shuffle it into its owner's library instead. When this card is put into a graveyard from anywhere, reveal this card and shuffle it into its owner's library instead.
Warp Artifact
B B
Enchantment Aura
At the beginning of the upkeep of enchanted artifact's controller, Warp Artifact deals 1 damage to that player.
Enchant Artifact Curse
Feedback
2 U
Enchantment Aura
At the beginning of the upkeep of enchanted enchantment's controller, Feedback deals 1 damage to that player.
Enchant Enchantment Curse
Blight Blight
B B B B
Enchantment Aura Enchantment Aura

View File

@@ -117,6 +117,8 @@ public class Card extends MyObservable {
private ArrayList<Command> unEquipCommandList = new ArrayList<Command>(); private ArrayList<Command> unEquipCommandList = new ArrayList<Command>();
private ArrayList<Command> enchantCommandList = new ArrayList<Command>(); private ArrayList<Command> enchantCommandList = new ArrayList<Command>();
private ArrayList<Command> unEnchantCommandList = new ArrayList<Command>(); private ArrayList<Command> unEnchantCommandList = new ArrayList<Command>();
private ArrayList<Command> untapCommandList = new ArrayList<Command>();
private ArrayList<Command> changeControllerCommandList = new ArrayList<Command>();
private ArrayList<Command> replaceMoveToGraveyardCommandList = new ArrayList<Command>(); private ArrayList<Command> replaceMoveToGraveyardCommandList = new ArrayList<Command>();
private ArrayList<Command> cycleCommandList = new ArrayList<Command>(); private ArrayList<Command> cycleCommandList = new ArrayList<Command>();
@@ -817,6 +819,14 @@ public class Card extends MyObservable {
var.execute(); var.execute();
} }
public void addUntapCommand(Command c) {
untapCommandList.add(c);
}
public void addChangeControllerCommand(Command c) {
changeControllerCommandList.add(c);
}
public ArrayList<Command> getReplaceMoveToGraveyard() { public ArrayList<Command> getReplaceMoveToGraveyard() {
return replaceMoveToGraveyardCommandList; return replaceMoveToGraveyardCommandList;
} }
@@ -966,6 +976,10 @@ public class Card extends MyObservable {
} }
public void setController(String player) { public void setController(String player) {
if( "" != controller && !controller.equals(player)) {
for(Command var:changeControllerCommandList)
var.execute();
}
controller = player; controller = player;
this.updateObservers(); this.updateObservers();
} }
@@ -1349,6 +1363,9 @@ public class Card extends MyObservable {
Ability_Reflected_Mana am = (Ability_Reflected_Mana) getManaAbility().get(0); Ability_Reflected_Mana am = (Ability_Reflected_Mana) getManaAbility().get(0);
am.reset(); am.reset();
} }
for(Command var:untapCommandList) {
var.execute();
}
setTapped(false); setTapped(false);
} }

View File

@@ -18071,6 +18071,101 @@ public class CardFactory_Creatures {
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Rubinia Soulsinger")) {
/*
* Tap: Gain control of target creature for as long as you
* control Rubinia and Rubinia remains tapped.
*/
final Card movedCreature[] = new Card[1];
final Ability_Tap ability = new Ability_Tap(card, "0") {
private static final long serialVersionUID = 7018915669688488647L;
@Override
public boolean canPlay() {
//need to check if there are other creatures in play
return true;
}
@Override
public boolean canPlayAI() {
CardList human = AllZoneUtil.getCreaturesInPlay(Constant.Player.Human);
human = human.filter(new CardListFilter() {
public boolean addCard(Card c) {
return CardFactoryUtil.canTarget(card, getTargetCard());
}
});
return human.size() > 0;
}
@Override
public void resolve() {
Card c = getTargetCard();
movedCreature[0] = c;
if(AllZone.GameAction.isCardInPlay(c) && CardFactoryUtil.canTarget(card, c)) {
//set summoning sickness
if(c.getKeyword().contains("Haste")) {
c.setSickness(false);
} else {
c.setSickness(true);
}
((PlayerZone_ComesIntoPlay) AllZone.Human_Play).setTriggers(false);
((PlayerZone_ComesIntoPlay) AllZone.Computer_Play).setTriggers(false);
c.setSickness(true);
c.setController(card.getController());
PlayerZone from = AllZone.getZone(c);
from.remove(c);
PlayerZone to = AllZone.getZone(Constant.Zone.Play, card.getController());
to.add(c);
((PlayerZone_ComesIntoPlay) AllZone.Human_Play).setTriggers(true);
((PlayerZone_ComesIntoPlay) AllZone.Computer_Play).setTriggers(true);
}
}//resolve()
};//SpellAbility
final Command untapLeavesPlay = new Command() {
private static final long serialVersionUID = 2783051953965817611L;
public void execute() {
Card c = movedCreature[0];
if(AllZone.GameAction.isCardInPlay(c)) {
((PlayerZone_ComesIntoPlay) AllZone.Human_Play).setTriggers(false);
((PlayerZone_ComesIntoPlay) AllZone.Computer_Play).setTriggers(false);
c.setSickness(true);
c.setController(AllZone.GameAction.getOpponent(c.getController()));
PlayerZone from = AllZone.getZone(c);
from.remove(c);
//make sure the creature is removed from combat:
CardList list = new CardList(AllZone.Combat.getAttackers());
if(list.contains(c)) AllZone.Combat.removeFromCombat(c);
CardList pwlist = new CardList(AllZone.pwCombat.getAttackers());
if(pwlist.contains(c)) AllZone.pwCombat.removeFromCombat(c);
PlayerZone to = AllZone.getZone(Constant.Zone.Play, c.getOwner());
to.add(c);
((PlayerZone_ComesIntoPlay) AllZone.Human_Play).setTriggers(true);
((PlayerZone_ComesIntoPlay) AllZone.Computer_Play).setTriggers(true);
}//if
}//execute()
};//Command
card.addUntapCommand(untapLeavesPlay);
card.addLeavesPlayCommand(untapLeavesPlay);
card.addChangeControllerCommand(untapLeavesPlay);
card.addSpellAbility(ability);
ability.setBeforePayMana(CardFactoryUtil.input_targetCreature(ability));
}//*************** END ************ END **************************
// Cards with Cycling abilities // Cards with Cycling abilities
// -1 means keyword "Cycling" not found // -1 means keyword "Cycling" not found
if(shouldCycle(card) != -1) { if(shouldCycle(card) != -1) {

View File

@@ -92,8 +92,25 @@ public class Input_Untap extends Input {
}); });
for(Card c : list) { for(Card c : list) {
if(!c.getKeyword().contains("CARDNAME doesn't untap during your untap step.") if(c.getKeyword().contains("You may choose not to untap CARDNAME during your untap step.")) {
&& !c.getKeyword().contains("This card doesn't untap during your next untap step.")) c.untap(); if(c.isUntapped()) {
if(c.getController().equals(Constant.Player.Human)) {
String[] choices = {"Yes", "No"};
Object o = AllZone.Display.getChoice("Untap "+c.getName()+"?", choices);
String answer = (String) o;
if(null != answer && answer.equals("Yes")) {
c.untap();
}
}
else { //computer
//computer probably doesn't want to untap based on this ability...
}
}
}
else if(!c.getKeyword().contains("CARDNAME doesn't untap during your untap step.")
&& !c.getKeyword().contains("This card doesn't untap during your next untap step.")) {
c.untap();
}
else c.removeExtrinsicKeyword("This card doesn't untap during your next untap step."); else c.removeExtrinsicKeyword("This card doesn't untap during your next untap step.");
} }