mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- Added Collective Restraint, Mana Leak, Daze, Force Spike, Convolute, Rune Boggle, Spell Snip.
- Fixed an issue with the Propaganda cards. - Fixed Merrow Harbinger. - Fixed Cloudseeder. - Goblin Chieftain should only pump controlled Goblins.
This commit is contained in:
@@ -1,3 +1,40 @@
|
|||||||
|
Collective Restraint
|
||||||
|
3 U
|
||||||
|
Enchantment
|
||||||
|
Domain - Creatures can't attack you unless their controller pays {X} for each creature he or she controls that's attacking you, where X is the number of basic land types among lands you control.
|
||||||
|
|
||||||
|
Force Spike
|
||||||
|
U
|
||||||
|
Instant
|
||||||
|
Counter target spell unless its controller pays 1.
|
||||||
|
|
||||||
|
Daze
|
||||||
|
1 U
|
||||||
|
Instant
|
||||||
|
no text
|
||||||
|
|
||||||
|
Convolute
|
||||||
|
2 U
|
||||||
|
Instant
|
||||||
|
Counter target spell unless its controller pays 4.
|
||||||
|
|
||||||
|
Rune Boggle
|
||||||
|
2 U
|
||||||
|
Instant
|
||||||
|
Counter target spell unless its controller pays 1.
|
||||||
|
Cantrip
|
||||||
|
|
||||||
|
Spell Snip
|
||||||
|
2 U
|
||||||
|
Instant
|
||||||
|
Counter target spell unless its controller pays 1.
|
||||||
|
Cycling:2
|
||||||
|
|
||||||
|
Mana Leak
|
||||||
|
1 U
|
||||||
|
Instant
|
||||||
|
Counter target spell unless its controller pays 3.
|
||||||
|
|
||||||
Windborn Muse
|
Windborn Muse
|
||||||
3 W
|
3 W
|
||||||
Creature Spirit
|
Creature Spirit
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
program/mail=mtgerror@yahoo.com
|
program/mail=mtgerror@yahoo.com
|
||||||
program/forum=http://www.slightlymagic.net/forum/viewforum.php?f=26
|
program/forum=http://www.slightlymagic.net/forum/viewforum.php?f=26
|
||||||
program/version=Forge -- official beta: 10/01/01, SVN revision: 257
|
program/version=Forge -- official beta: 10/01/01, SVN revision: 258
|
||||||
|
|
||||||
tokens--file=AllTokens.txt
|
tokens--file=AllTokens.txt
|
||||||
|
|
||||||
|
|||||||
@@ -9478,6 +9478,141 @@ public class CardFactory implements NewConstants {
|
|||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
|
//*************** START *********** START **************************
|
||||||
|
else if(cardName.equals("Mana Leak") || cardName.equals("Convolute") || cardName.equals("Daze") || cardName.equals("Force Spike") ||
|
||||||
|
cardName.equals("Rune Boggle") || cardName.equals("Spell Snip"))
|
||||||
|
{
|
||||||
|
SpellAbility spell = new Spell(card)
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 6139754377230333678L;
|
||||||
|
public void resolve()
|
||||||
|
{
|
||||||
|
String manaCost = "1";
|
||||||
|
if (cardName.equals("Mana Leak"))
|
||||||
|
manaCost = "3";
|
||||||
|
else if (cardName.equals("Convolute"))
|
||||||
|
manaCost = "4";
|
||||||
|
Ability ability = new Ability(card, manaCost){
|
||||||
|
public void resolve()
|
||||||
|
{
|
||||||
|
;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
final Command unpaidCommand = new Command()
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 8094833091127334678L;
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
{
|
||||||
|
SpellAbility sa = AllZone.Stack.pop();
|
||||||
|
AllZone.GameAction.moveToGraveyard(sa.getSourceCard());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (card.getController().equals(Constant.Player.Computer))
|
||||||
|
{
|
||||||
|
AllZone.InputControl.setInput(new Input_PayManaCost_Ability(card +"\r\n", ability.getManaCost(), Command.Blank, unpaidCommand));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (ComputerUtil.canPayCost(ability))
|
||||||
|
ComputerUtil.playNoStack(ability);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SpellAbility sa = AllZone.Stack.pop();
|
||||||
|
AllZone.GameAction.moveToGraveyard(sa.getSourceCard());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
public boolean canPlay()
|
||||||
|
{
|
||||||
|
if(AllZone.Stack.size() == 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
//see if spell is on stack and that opponent played it
|
||||||
|
String opponent = AllZone.GameAction.getOpponent(card.getController());
|
||||||
|
SpellAbility sa = AllZone.Stack.peek();
|
||||||
|
|
||||||
|
return sa.isSpell() && opponent.equals(sa.getSourceCard().getController())
|
||||||
|
&& CardFactoryUtil.isCounterable(sa.getSourceCard());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
card.clearSpellAbility();
|
||||||
|
card.addSpellAbility(spell);
|
||||||
|
|
||||||
|
if (cardName.equals("Daze"))
|
||||||
|
{
|
||||||
|
spell.setDescription("Counter target spell unless its controller pays 1.");
|
||||||
|
spell.setStackDescription(card.getName() + " - Counter target spell unless its controller pays 1.");
|
||||||
|
final SpellAbility bounce = new Spell(card)
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = -8310299673731730438L;
|
||||||
|
|
||||||
|
public void resolve()
|
||||||
|
{
|
||||||
|
SpellAbility sa = AllZone.Stack.pop();
|
||||||
|
AllZone.GameAction.moveToGraveyard(sa.getSourceCard());
|
||||||
|
}
|
||||||
|
public boolean canPlay()
|
||||||
|
{
|
||||||
|
if(AllZone.Stack.size() == 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
//see if spell is on stack and that opponent played it
|
||||||
|
String opponent = AllZone.GameAction.getOpponent(card.getController());
|
||||||
|
SpellAbility sa = AllZone.Stack.peek();
|
||||||
|
|
||||||
|
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
|
||||||
|
CardList list = new CardList(play.getCards());
|
||||||
|
list = list.getType("Island");
|
||||||
|
return sa.isSpell() && opponent.equals(sa.getSourceCard().getController())
|
||||||
|
&& CardFactoryUtil.isCounterable(sa.getSourceCard()) && list.size() >= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canPlayAI()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
bounce.setDescription("You may return an Island you control to their owner's hand rather than pay Daze's mana cost.");
|
||||||
|
bounce.setStackDescription(card.getName() + " - Counter target spell unless its controller pays 1.");
|
||||||
|
bounce.setManaCost("0");
|
||||||
|
|
||||||
|
final Input bounceIslands = new Input()
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 7624182730685889456L;
|
||||||
|
int stop = 1;
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
public void showMessage()
|
||||||
|
{
|
||||||
|
AllZone.Display.showMessage("Select an Island");
|
||||||
|
ButtonUtil.disableAll();
|
||||||
|
}
|
||||||
|
public void selectButtonCancel() {stop();}
|
||||||
|
public void selectCard(Card c, PlayerZone zone)
|
||||||
|
{
|
||||||
|
if(c.getType().contains("Island") && zone.is(Constant.Zone.Play))
|
||||||
|
{
|
||||||
|
AllZone.GameAction.moveToHand(c);
|
||||||
|
|
||||||
|
count++;
|
||||||
|
if(count == stop) {
|
||||||
|
AllZone.Stack.add(bounce);
|
||||||
|
stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}//selectCard()
|
||||||
|
};
|
||||||
|
|
||||||
|
bounce.setBeforePayMana(bounceIslands);
|
||||||
|
card.addSpellAbility(bounce);
|
||||||
|
}//if Daze
|
||||||
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Remand"))
|
else if(cardName.equals("Remand"))
|
||||||
|
|||||||
@@ -3032,6 +3032,20 @@ public class CardFactoryUtil
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int countBasicLandTypes(String player)
|
||||||
|
{
|
||||||
|
String basic[] = {"Forest", "Plains", "Mountain", "Island", "Swamp"};
|
||||||
|
PlayerZone play = AllZone.getZone(Constant.Zone.Play, player);
|
||||||
|
CardList list = new CardList(play.getCards());
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
for(int i = 0; i < basic.length; i++)
|
||||||
|
if (! list.getType(basic[i]).isEmpty())
|
||||||
|
count++;
|
||||||
|
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
//total cost to pay for an attacker c, cards like Propaganda, Ghostly Prison, Collective Restraint, ...
|
//total cost to pay for an attacker c, cards like Propaganda, Ghostly Prison, Collective Restraint, ...
|
||||||
public static String getPropagandaCost(Card c)
|
public static String getPropagandaCost(Card c)
|
||||||
{
|
{
|
||||||
@@ -3048,11 +3062,34 @@ public class CardFactoryUtil
|
|||||||
});
|
});
|
||||||
int cost = list.size() * 2;
|
int cost = list.size() * 2;
|
||||||
|
|
||||||
|
list = new CardList(play.getCards());
|
||||||
|
list = list.getName("Collective Restraint");
|
||||||
|
|
||||||
|
int domain = countBasicLandTypes(AllZone.GameAction.getOpponent(c.getController()));
|
||||||
|
|
||||||
|
cost += domain * list.size();
|
||||||
|
|
||||||
s = Integer.toString(cost);
|
s = Integer.toString(cost);
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int getUsableManaSources(String player)
|
||||||
|
{
|
||||||
|
PlayerZone play = AllZone.getZone(Constant.Zone.Play, player);
|
||||||
|
CardList list = new CardList(play.getCards());
|
||||||
|
list = list.filter(new CardListFilter()
|
||||||
|
{
|
||||||
|
public boolean addCard(Card c)
|
||||||
|
{
|
||||||
|
for (Ability_Mana am : c.getBasicMana())
|
||||||
|
if (am.canPlay()) return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return list.size();
|
||||||
|
}
|
||||||
|
|
||||||
//do card1 and card2 share any colors?
|
//do card1 and card2 share any colors?
|
||||||
public static boolean sharesColorWith(Card card1, Card card2)
|
public static boolean sharesColorWith(Card card1, Card card2)
|
||||||
|
|||||||
@@ -10264,7 +10264,7 @@ public class CardFactory_Creatures {
|
|||||||
c.setName("Cloud Sprite");
|
c.setName("Cloud Sprite");
|
||||||
c.setImageName("U 1 1 Cloud Sprite");
|
c.setImageName("U 1 1 Cloud Sprite");
|
||||||
c.addIntrinsicKeyword("Flying");
|
c.addIntrinsicKeyword("Flying");
|
||||||
c.addIntrinsicKeyword("This creature can block only creatures with flying");
|
c.addIntrinsicKeyword("This creature can block only creatures with flying.");
|
||||||
|
|
||||||
play.add(c);
|
play.add(c);
|
||||||
}//makeToken()
|
}//makeToken()
|
||||||
@@ -17188,7 +17188,7 @@ public class CardFactory_Creatures {
|
|||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Merfolk Harbinger"))
|
else if(cardName.equals("Merrow Harbinger"))
|
||||||
{
|
{
|
||||||
final SpellAbility ability = new Ability(card, "0")
|
final SpellAbility ability = new Ability(card, "0")
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -723,7 +723,6 @@ public class CombatUtil
|
|||||||
private static final long serialVersionUID = -6483405139208343935L;
|
private static final long serialVersionUID = -6483405139208343935L;
|
||||||
|
|
||||||
public void execute() {
|
public void execute() {
|
||||||
//AllZone.GameAction.sacrifice(c);
|
|
||||||
canAttack[0] = false;
|
canAttack[0] = false;
|
||||||
AllZone.Combat.removeFromCombat(crd);
|
AllZone.Combat.removeFromCombat(crd);
|
||||||
crd.untap();
|
crd.untap();
|
||||||
@@ -745,8 +744,11 @@ public class CombatUtil
|
|||||||
{
|
{
|
||||||
if (ComputerUtil.canPayCost(ability))
|
if (ComputerUtil.canPayCost(ability))
|
||||||
ComputerUtil.playNoStack(ability);
|
ComputerUtil.playNoStack(ability);
|
||||||
else
|
else {
|
||||||
canAttack[0] = false;
|
canAttack[0] = false;
|
||||||
|
AllZone.Combat.removeFromCombat(crd);
|
||||||
|
crd.untap();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12655,9 +12655,9 @@ public class GameActionUtil
|
|||||||
// for each zone found add +1/+1 to each card
|
// for each zone found add +1/+1 to each card
|
||||||
for (int outer = 0; outer < zone.length; outer++)
|
for (int outer = 0; outer < zone.length; outer++)
|
||||||
{
|
{
|
||||||
CardList creature = new CardList();
|
CardList creature = new CardList(zone[outer].getCards());
|
||||||
creature.addAll(AllZone.Human_Play.getCards());
|
//creature.addAll(AllZone.Human_Play.getCards());
|
||||||
creature.addAll(AllZone.Computer_Play.getCards());
|
//creature.addAll(AllZone.Computer_Play.getCards());
|
||||||
creature = creature.getType("Goblin");
|
creature = creature.getType("Goblin");
|
||||||
|
|
||||||
for (int i = 0; i < creature.size(); i++)
|
for (int i = 0; i < creature.size(); i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user