mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
added Winter Orb. A classic. :)
My testing with Stasis, Winter Orb and Meekstone (or Marble Titan) combos show this is working for the main cases.
This commit is contained in:
@@ -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_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
|
||||
winter_orb.jpg http://www.wizards.com/global/images/magic/general/winter_orb.jpg
|
||||
keldon_warlord.jpg http://www.wizards.com/global/images/magic/general/keldon_warlord.jpg
|
||||
zuran_orb.jpg http://www.wizards.com/global/images/magic/general/zuran_orb.jpg
|
||||
storm_seeker.jpg http://www.wizards.com/global/images/magic/general/storm_seeker.jpg
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
Winter Orb
|
||||
2
|
||||
Artifact
|
||||
As long as Winter Orb is untapped, players can't untap more than one land during their untap steps.
|
||||
|
||||
Keldon Warlord
|
||||
2 R R
|
||||
Creature Human Barbarian
|
||||
|
||||
@@ -62,23 +62,95 @@ public class Input_Untap extends Input {
|
||||
private void doUntap()
|
||||
{
|
||||
PlayerZone p = AllZone.getZone(Constant.Zone.Play, AllZone.Phase.getActivePlayer());
|
||||
CardList list = new CardList(p.getCards());
|
||||
list = list.filter(new CardListFilter()
|
||||
{
|
||||
public boolean addCard(Card c)
|
||||
{
|
||||
if (isMarbleTitanInPlay())
|
||||
return c.getNetAttack() < 3;
|
||||
CardList list = new CardList(p.getCards());
|
||||
list = list.filter(new CardListFilter()
|
||||
{
|
||||
public boolean addCard(Card c)
|
||||
{
|
||||
if( isMarbleTitanInPlay() && isWinterOrbInEffect() ) {
|
||||
return !c.isLand() && c.getNetAttack() < 3;
|
||||
}
|
||||
else if( isWinterOrbInEffect() ) {
|
||||
return !c.isLand();
|
||||
}
|
||||
else if (isMarbleTitanInPlay()) {
|
||||
return c.getNetAttack() < 3;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
for(Card c : list) {
|
||||
if(!c.getKeyword().contains("This card 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.");
|
||||
for(Card c : list) {
|
||||
if(!c.getKeyword().contains("This card 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.");
|
||||
|
||||
}
|
||||
}
|
||||
if( isWinterOrbInEffect() ) {
|
||||
if( AllZone.Phase.getActivePlayer().equals(Constant.Player.Computer) ) {
|
||||
//search for lands the computer has and only untap 1
|
||||
CardList landList = new CardList(p.getCards());
|
||||
landList = landList.filter(new CardListFilter()
|
||||
{
|
||||
public boolean addCard(Card c)
|
||||
{
|
||||
return c.isLand() && c.isTapped();
|
||||
}
|
||||
});
|
||||
if( landList.size() > 0 ) {
|
||||
landList.get(0).untap();
|
||||
}
|
||||
}
|
||||
else {
|
||||
Input target = new Input() {
|
||||
private static final long serialVersionUID = 6653677835629939465L;
|
||||
public void showMessage() {
|
||||
AllZone.Display.showMessage("Winter Orb - Select one tapped land to untap");
|
||||
ButtonUtil.enableOnlyCancel();
|
||||
}
|
||||
public void selectButtonCancel() {stop();}
|
||||
public void selectCard(Card c, PlayerZone zone) {
|
||||
if(c.isLand() && zone.is(Constant.Zone.Play) && c.isTapped()) {
|
||||
c.untap();
|
||||
stop();
|
||||
}
|
||||
}//selectCard()
|
||||
};//Input
|
||||
CardList landList = new CardList(p.getCards());
|
||||
landList = landList.filter(new CardListFilter()
|
||||
{
|
||||
public boolean addCard(Card c)
|
||||
{
|
||||
return c.isLand() && c.isTapped();
|
||||
}
|
||||
});
|
||||
if( landList.size() > 0 ) {
|
||||
AllZone.InputControl.setInput(target);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}//end doUntap
|
||||
|
||||
|
||||
private boolean isWinterOrbInEffect() {
|
||||
CardList all = new CardList();
|
||||
all.addAll(AllZone.Human_Play.getCards());
|
||||
all.addAll(AllZone.Computer_Play.getCards());
|
||||
all = all.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.getName().equals("Winter Orb");
|
||||
}
|
||||
});
|
||||
|
||||
//if multiple Winter Orbs, check that at least 1 of them is untapped
|
||||
for( int i = 0; i < all.size(); i++ ) {
|
||||
if( all.get(i).isUntapped() ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user