mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Added slapshot5's code for Crumble, The Rack, Flashfires and Karma.
This commit is contained in:
@@ -38,6 +38,10 @@ 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
|
||||||
|
the_rack.jpg http://www.wizards.com/global/images/magic/general/the_rack.jpg
|
||||||
|
crumble.jpg http://www.wizards.com/global/images/magic/general/crumble.jpg
|
||||||
|
flashfires.jpg http://www.wizards.com/global/images/magic/general/flashfires.jpg
|
||||||
|
karma.jpg http://www.wizards.com/global/images/magic/general/karma.jpg
|
||||||
clinging_darkness.jpg http://www.wizards.com/global/images/magic/general/clinging_darkness.jpg
|
clinging_darkness.jpg http://www.wizards.com/global/images/magic/general/clinging_darkness.jpg
|
||||||
enfeeblement.jpg http://www.wizards.com/global/images/magic/general/enfeeblement.jpg
|
enfeeblement.jpg http://www.wizards.com/global/images/magic/general/enfeeblement.jpg
|
||||||
feebleness.jpg http://www.wizards.com/global/images/magic/general/feebleness.jpg
|
feebleness.jpg http://www.wizards.com/global/images/magic/general/feebleness.jpg
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
The Rack
|
||||||
|
1
|
||||||
|
Artifact
|
||||||
|
At the beginning of opponent's upkeep, The Rack deals X damage to that player, where X is 3 minus the number of cards in his or her hand.
|
||||||
|
|
||||||
|
Crumble
|
||||||
|
G
|
||||||
|
Instant
|
||||||
|
Destroy target artifact. It can't be regenerated. That artifact's controller gains life equal to its converted mana cost.
|
||||||
|
|
||||||
|
Flashfires
|
||||||
|
3 R
|
||||||
|
Sorcery
|
||||||
|
Destroy all Plains.
|
||||||
|
|
||||||
|
Karma
|
||||||
|
2 W W
|
||||||
|
Enchantment
|
||||||
|
At the beginning of each player's upkeep, Karma deals damage to that player equal to the number of Swamps he or she controls.
|
||||||
|
|
||||||
Clinging Darkness
|
Clinging Darkness
|
||||||
1 B
|
1 B
|
||||||
Enchantment Aura
|
Enchantment Aura
|
||||||
@@ -88,7 +108,6 @@ Paralyzing Grasp
|
|||||||
Enchantment Aura
|
Enchantment Aura
|
||||||
Enchanted creature doesn't untap during its controller's untap step.
|
Enchanted creature doesn't untap during its controller's untap step.
|
||||||
Enchant creature
|
Enchant creature
|
||||||
enPumpCurse:This card doesn't untap during your untap step.
|
|
||||||
|
|
||||||
Artifact Ward
|
Artifact Ward
|
||||||
W
|
W
|
||||||
@@ -4720,9 +4739,8 @@ Eternity Snare
|
|||||||
5 U
|
5 U
|
||||||
Enchantment Aura
|
Enchantment Aura
|
||||||
Enchanted creature doesn't untap during its controller's untap step.
|
Enchanted creature doesn't untap during its controller's untap step.
|
||||||
Enchant creature
|
|
||||||
enPumpCurse:This card doesn't untap during your untap step.
|
|
||||||
When this card comes into play, draw a card.
|
When this card comes into play, draw a card.
|
||||||
|
Enchant creature
|
||||||
|
|
||||||
Elvish Hunter
|
Elvish Hunter
|
||||||
1 G
|
1 G
|
||||||
@@ -4966,10 +4984,9 @@ enPump:+3/+0/First Strike
|
|||||||
Despondency
|
Despondency
|
||||||
1 B
|
1 B
|
||||||
Enchantment Aura
|
Enchantment Aura
|
||||||
Enchanted creature gets -2/-0.
|
Enchanted creature gets -2/+0.
|
||||||
Enchant creature
|
|
||||||
enPumpCurse:-2/-0
|
|
||||||
When this card is put into a graveyard from the battlefield, return this card to its owner's hand
|
When this card is put into a graveyard from the battlefield, return this card to its owner's hand
|
||||||
|
Enchant creature
|
||||||
|
|
||||||
Snow-Covered Forest
|
Snow-Covered Forest
|
||||||
no cost
|
no cost
|
||||||
@@ -5567,23 +5584,20 @@ Cessation
|
|||||||
2 W
|
2 W
|
||||||
Enchantment Aura
|
Enchantment Aura
|
||||||
Enchanted creature can't attack.
|
Enchanted creature can't attack.
|
||||||
Enchant creature
|
|
||||||
enPumpCurse:This creature can't attack
|
|
||||||
When this card is put into a graveyard from the battlefield, return this card to its owner's hand
|
When this card is put into a graveyard from the battlefield, return this card to its owner's hand
|
||||||
|
Enchant creature
|
||||||
|
|
||||||
Pacifism
|
Pacifism
|
||||||
1 W
|
1 W
|
||||||
Enchantment Aura
|
Enchantment Aura
|
||||||
Enchanted creature can't attack or block.
|
Enchanted creature can't attack or block.
|
||||||
Enchant creature
|
Enchant creature
|
||||||
enPumpCurse:This creature can't attack or block
|
|
||||||
|
|
||||||
Bound in Silence
|
Bound in Silence
|
||||||
2 W
|
2 W
|
||||||
Tribal Enchantment Rebel Aura
|
Tribal Enchantment Rebel Aura
|
||||||
Enchanted creature can't attack or block.
|
Enchanted creature can't attack or block.
|
||||||
Enchant creature
|
Enchant creature
|
||||||
enPumpCurse:This creature can't attack or block
|
|
||||||
|
|
||||||
Barrenton Cragtreads
|
Barrenton Cragtreads
|
||||||
2 WU WU
|
2 WU WU
|
||||||
@@ -6577,9 +6591,8 @@ Sluggishness
|
|||||||
1 R
|
1 R
|
||||||
Enchantment Aura
|
Enchantment Aura
|
||||||
Enchanted creature can't block.
|
Enchanted creature can't block.
|
||||||
Enchant creature
|
|
||||||
enPumpCurse:This creature cannot block
|
|
||||||
When this card is put into a graveyard from the battlefield, return this card to its owner's hand
|
When this card is put into a graveyard from the battlefield, return this card to its owner's hand
|
||||||
|
Enchant creature
|
||||||
|
|
||||||
Aspect of Mongoose
|
Aspect of Mongoose
|
||||||
1 G
|
1 G
|
||||||
@@ -8025,7 +8038,6 @@ B
|
|||||||
Enchantment Aura
|
Enchantment Aura
|
||||||
Enchanted creature gets -2/-1.
|
Enchanted creature gets -2/-1.
|
||||||
Enchant creature
|
Enchant creature
|
||||||
enPumpCurse:-2/-1
|
|
||||||
|
|
||||||
Unholy Strength
|
Unholy Strength
|
||||||
B
|
B
|
||||||
|
|||||||
@@ -17255,6 +17255,81 @@ public class CardFactory implements NewConstants {
|
|||||||
}
|
}
|
||||||
//*************** END ************ END **************************
|
//*************** END ************ END **************************
|
||||||
|
|
||||||
|
//*************** START *********** START **************************
|
||||||
|
else if(cardName.equals("Flashfires")) {
|
||||||
|
final SpellAbility spell = new Spell(card) {
|
||||||
|
private static final long serialVersionUID = -5951776277564352958L;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void resolve() {
|
||||||
|
CardList all = new CardList();
|
||||||
|
all.addAll(AllZone.Human_Play.getCards());
|
||||||
|
all.addAll(AllZone.Computer_Play.getCards());
|
||||||
|
|
||||||
|
for(int i = 0; i < all.size(); i++) {
|
||||||
|
Card c = all.get(i);
|
||||||
|
if(c.getType().contains("Plains")) AllZone.GameAction.destroy(c);
|
||||||
|
}
|
||||||
|
}//resolve()
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canPlayAI() {
|
||||||
|
CardList list = new CardList(AllZone.Human_Play.getCards());
|
||||||
|
list = list.getType("Plains");
|
||||||
|
|
||||||
|
return 3 < list.size();
|
||||||
|
}
|
||||||
|
};//SpellAbility
|
||||||
|
spell.setStackDescription(card.getName() + " - destroy all Plains.");
|
||||||
|
card.clearSpellAbility();
|
||||||
|
card.addSpellAbility(spell);
|
||||||
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
//*************** START *********** START **************************
|
||||||
|
else if(cardName.equals("Crumble")) {
|
||||||
|
SpellAbility spell = new Spell(card) {
|
||||||
|
private static final long serialVersionUID = 4752943254606319269L;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void resolve() {
|
||||||
|
if(AllZone.GameAction.isCardInPlay(getTargetCard())
|
||||||
|
&& CardFactoryUtil.canTarget(card, getTargetCard())) {
|
||||||
|
//add life
|
||||||
|
String player = getTargetCard().getController();
|
||||||
|
PlayerLife life = AllZone.GameAction.getPlayerLife(player);
|
||||||
|
life.addLife(CardUtil.getConvertedManaCost(getTargetCard()));
|
||||||
|
|
||||||
|
//remove card from play
|
||||||
|
AllZone.GameAction.removeFromGame(getTargetCard());
|
||||||
|
}
|
||||||
|
}//resolve()
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canPlayAI() {
|
||||||
|
CardList artifacts = new CardList(AllZone.Human_Play.getCards());
|
||||||
|
artifacts = artifacts.getType("Artifact");
|
||||||
|
artifacts = artifacts.filter(new CardListFilter() {
|
||||||
|
public boolean addCard(Card c) {
|
||||||
|
return CardFactoryUtil.canTarget(card, c);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return artifacts.size() != 0 && (AllZone.Phase.getTurn() > 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void chooseTargetAI() {
|
||||||
|
CardList play = new CardList(AllZone.Human_Play.getCards());
|
||||||
|
Card target = CardFactoryUtil.AI_getBestArtifact(play);
|
||||||
|
if(target != null) setTargetCard(target);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
spell.setBeforePayMana(CardFactoryUtil.input_targetType(spell, "Artifact"));
|
||||||
|
|
||||||
|
card.clearSpellAbility();
|
||||||
|
card.addSpellAbility(spell);
|
||||||
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
// Cards with Cycling abilities
|
// Cards with Cycling abilities
|
||||||
// -1 means keyword "Cycling" not found
|
// -1 means keyword "Cycling" not found
|
||||||
if(hasKeyword(card, "Cycling") != -1) {
|
if(hasKeyword(card, "Cycling") != -1) {
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ public class GameActionUtil {
|
|||||||
upkeep_Klass();
|
upkeep_Klass();
|
||||||
upkeep_Convalescence();
|
upkeep_Convalescence();
|
||||||
upkeep_Convalescent_Care();
|
upkeep_Convalescent_Care();
|
||||||
|
upkeep_Karma();
|
||||||
upkeep_Defense_of_the_Heart();
|
upkeep_Defense_of_the_Heart();
|
||||||
upkeep_Mycoloth();
|
upkeep_Mycoloth();
|
||||||
upkeep_Spore_Counters();
|
upkeep_Spore_Counters();
|
||||||
@@ -86,6 +87,7 @@ public class GameActionUtil {
|
|||||||
upkeep_Dark_Confidant(); // keep this one semi-last
|
upkeep_Dark_Confidant(); // keep this one semi-last
|
||||||
|
|
||||||
upkeep_Copper_Tablet();
|
upkeep_Copper_Tablet();
|
||||||
|
upkeep_The_Rack();
|
||||||
upkeep_BlackVise();
|
upkeep_BlackVise();
|
||||||
upkeep_Ivory_Tower();
|
upkeep_Ivory_Tower();
|
||||||
|
|
||||||
@@ -5701,6 +5703,43 @@ public class GameActionUtil {
|
|||||||
}// if
|
}// if
|
||||||
}// upkeep_Defense of the Heart
|
}// upkeep_Defense of the Heart
|
||||||
|
|
||||||
|
private static void upkeep_Karma() {
|
||||||
|
final String player = AllZone.Phase.getActivePlayer();
|
||||||
|
String opponent = AllZone.GameAction.getOpponent(player);
|
||||||
|
|
||||||
|
PlayerZone opponentPlayZone = AllZone.getZone(Constant.Zone.Play, opponent);
|
||||||
|
|
||||||
|
CardList karma = new CardList(opponentPlayZone.getCards());
|
||||||
|
karma = karma.getName("Karma");
|
||||||
|
|
||||||
|
PlayerZone activePlayZone = AllZone.getZone(Constant.Zone.Play, player);
|
||||||
|
CardList swamps = new CardList(activePlayZone.getCards());
|
||||||
|
swamps = swamps.getType("Swamp");
|
||||||
|
|
||||||
|
// determine how much damage to deal the current player
|
||||||
|
final int damage = swamps.size();
|
||||||
|
|
||||||
|
// if there are 1 or more Karmas owned by the opponent of the
|
||||||
|
// current player have each of them deal damage.
|
||||||
|
if(0 < karma.size()) {
|
||||||
|
for(int i = 0; i < karma.size(); i++) {
|
||||||
|
Ability ability = new Ability(karma.get(0), "0") {
|
||||||
|
@Override
|
||||||
|
public void resolve() {
|
||||||
|
if(damage>0){
|
||||||
|
PlayerLife life = AllZone.GameAction.getPlayerLife(player);
|
||||||
|
life.setLife(life.getLife() - damage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};// Ability
|
||||||
|
if(damage>0){
|
||||||
|
ability.setStackDescription("Karma deals " + damage + " damage to " + player);
|
||||||
|
AllZone.Stack.add(ability);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}// if
|
||||||
|
}// upkeep_Karma()
|
||||||
|
|
||||||
private static void upkeep_Convalescence() {
|
private static void upkeep_Convalescence() {
|
||||||
final String player = AllZone.Phase.getActivePlayer();
|
final String player = AllZone.Phase.getActivePlayer();
|
||||||
PlayerZone playZone = AllZone.getZone(Constant.Zone.Play, player);
|
PlayerZone playZone = AllZone.getZone(Constant.Zone.Play, player);
|
||||||
@@ -5785,7 +5824,46 @@ public class GameActionUtil {
|
|||||||
}//for
|
}//for
|
||||||
}//upkeep_Ivory Tower()
|
}//upkeep_Ivory Tower()
|
||||||
|
|
||||||
|
//Forge doesn't distinguish between beginning and end of upkeep
|
||||||
|
//so, we'll put The Rack next to Black Vise
|
||||||
|
private static void upkeep_The_Rack() {
|
||||||
|
// sanity check. If a player has >= 3 cards The Rack does nothing.
|
||||||
|
final String player = AllZone.Phase.getActivePlayer();
|
||||||
|
final int playerHandSize = AllZone.getZone(Constant.Zone.Hand, player).size();
|
||||||
|
|
||||||
|
if(playerHandSize >= 3) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// if a player has 2 or fewer cards The Rack does damage
|
||||||
|
// so, check if opponent of the current player has The Rack
|
||||||
|
String opponent = AllZone.GameAction.getOpponent(player);
|
||||||
|
|
||||||
|
PlayerZone opponentPlayZone = AllZone.getZone(Constant.Zone.Play, opponent);
|
||||||
|
|
||||||
|
CardList theRack = new CardList(opponentPlayZone.getCards());
|
||||||
|
theRack = theRack.getName("The Rack");
|
||||||
|
|
||||||
|
// determine how much damage to deal the current player
|
||||||
|
final int damage = 3 - playerHandSize;
|
||||||
|
|
||||||
|
// if there are 1 or more The Racks owned by the opponent of the
|
||||||
|
// current player have each of them deal damage.
|
||||||
|
if(0 < theRack.size()) {
|
||||||
|
for(int i = 0; i < theRack.size(); i++) {
|
||||||
|
Ability ability = new Ability(theRack.get(0), "0") {
|
||||||
|
@Override
|
||||||
|
public void resolve() {
|
||||||
|
PlayerLife life = AllZone.GameAction.getPlayerLife(player);
|
||||||
|
life.setLife(life.getLife() - damage);
|
||||||
|
}
|
||||||
|
};// Ability
|
||||||
|
|
||||||
|
ability.setStackDescription("The Rack - deals " + damage + " damage to " + player);
|
||||||
|
AllZone.Stack.add(ability);
|
||||||
|
}
|
||||||
|
}// if
|
||||||
|
}// upkeep_The_Rack
|
||||||
|
|
||||||
// Currently we don't determine the difference between beginning and end of
|
// Currently we don't determine the difference between beginning and end of
|
||||||
// upkeep in MTG forge.
|
// upkeep in MTG forge.
|
||||||
|
|||||||
Reference in New Issue
Block a user