mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Fixed some upkeep cards (didn't turn them into keywords for some reason).
- Added Force of Nature, Cosmic Horror, Child of Gaea, Hungry Mist, Junun Efreet, Kami of the Tended Garden, Krosan Cloudshaper.
This commit is contained in:
@@ -1,3 +1,58 @@
|
||||
Cosmic Horror
|
||||
3 B B B
|
||||
Creature
|
||||
If Cosmic is destroyed this way, it deals 7 damage to you.
|
||||
7/7
|
||||
First Strike
|
||||
At the beginning of your upkeep, destroy Cosmic Horror unless you pay:3 B B B
|
||||
|
||||
Force of Nature
|
||||
2 G G G G
|
||||
Creature
|
||||
no text
|
||||
8/8
|
||||
Trample
|
||||
At the beginning of your upkeep, Force of Nature deals 8 damage to you unless you pay:G G G G
|
||||
|
||||
Krosan Cloudshaper
|
||||
7 G G G
|
||||
Creature Beast Mutant
|
||||
no text
|
||||
13/13
|
||||
At the beginning of your upkeep, sacrifice Krosan Cloudshaper unless you pay:G G
|
||||
Morph:7 G G
|
||||
|
||||
Kami of the Tended Garden
|
||||
3 G
|
||||
Creature Spirit
|
||||
no text
|
||||
4/4
|
||||
At the beginning of your upkeep, sacrifice Kami of the Tended Garden unless you pay:G
|
||||
Soulshift:3
|
||||
|
||||
Junun Efreet
|
||||
1 B B
|
||||
Creature
|
||||
no text
|
||||
3/3
|
||||
Flying
|
||||
At the beginning of your upkeep, sacrifice Junun Efreet unless you pay:B B
|
||||
|
||||
Hungry Mist
|
||||
2 G G
|
||||
Creature Elemental
|
||||
no text
|
||||
6/2
|
||||
At the beginning of your upkeep, sacrifice Hungry Mist unless you pay:G G
|
||||
|
||||
Child of Gaea
|
||||
3 G G G
|
||||
Creature Elemental
|
||||
no text
|
||||
7/7
|
||||
Trample
|
||||
At the beginning of your upkeep, sacrifice Child of Gaea unless you pay:G G
|
||||
|
||||
Burning Fields
|
||||
4 R
|
||||
Sorcery
|
||||
@@ -147,16 +202,18 @@ Cumulative upkeep:2
|
||||
Drifting Djinn
|
||||
4 U U
|
||||
Creature Djinn
|
||||
At the beginning of your upkeep, sacrifice Drifting Djinn unless you pay:1 U
|
||||
no text
|
||||
5/5
|
||||
Flying
|
||||
Cycling:2
|
||||
At the beginning of your upkeep, sacrifice Drifting Djinn unless you pay:1 U
|
||||
|
||||
Drifter il-Dal
|
||||
U
|
||||
Creature Human Wizard
|
||||
At the beginning of your upkeep, sacrifice Drifter il-Dal unless you pay:U
|
||||
no text
|
||||
2/1
|
||||
At the beginning of your upkeep, sacrifice Drifter il-Dal unless you pay:U
|
||||
Shadow
|
||||
|
||||
Karmic Guide
|
||||
|
||||
@@ -71,6 +71,8 @@ public class Card extends MyObservable
|
||||
|
||||
private int randomPicture = 0;
|
||||
|
||||
private int upkeepDamage = 0;
|
||||
|
||||
private int X = 0;
|
||||
|
||||
private String owner = "";
|
||||
@@ -795,6 +797,9 @@ public class Card extends MyObservable
|
||||
public void setRandomPicture(int n) { randomPicture = n; }
|
||||
public int getRandomPicture() { return randomPicture; }
|
||||
|
||||
public void setUpkeepDamage(int n) { upkeepDamage = n;}
|
||||
public int getUpkeepDamage() { return upkeepDamage ;}
|
||||
|
||||
//public int getAttack(){return attack;}
|
||||
|
||||
//for cards like Giant Growth, etc.
|
||||
|
||||
@@ -8,8 +8,10 @@ public class GameActionUtil
|
||||
{
|
||||
|
||||
upkeep_removeDealtDamageToOppThisTurn();
|
||||
upkeep_UpkeepCost();
|
||||
upkeep_CumulativeUpkeepCost();
|
||||
upkeep_UpkeepCost(); //sacrifice unless upkeep cost is paid
|
||||
upkeep_DestroyUpkeepCost(); //destroy unless upkeep cost is paid
|
||||
upkeep_DamageUpkeepCost(); //deal damage unless upkeep cost is paid
|
||||
upkeep_CumulativeUpkeepCost(); //sacrifice unless cumulative upkeep cost is paid
|
||||
upkeep_Echo();
|
||||
upkeep_TabernacleUpkeepCost();
|
||||
upkeep_MagusTabernacleUpkeepCost();
|
||||
@@ -2812,6 +2814,158 @@ public class GameActionUtil
|
||||
}
|
||||
}//upkeepCost
|
||||
|
||||
public static void upkeep_DestroyUpkeepCost()
|
||||
{
|
||||
String player = AllZone.Phase.getActivePlayer();
|
||||
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, player);
|
||||
CardList list = new CardList();
|
||||
list.addAll(play.getCards());
|
||||
//list = list.getType("Creature");
|
||||
list = list.filter(new CardListFilter()
|
||||
{
|
||||
public boolean addCard(Card c)
|
||||
{
|
||||
ArrayList<String> a = c.getKeyword();
|
||||
for (int i = 0; i < a.size(); i++)
|
||||
{
|
||||
if (a.get(i).toString().startsWith("At the beginning of your upkeep, destroy " +c.getName()))
|
||||
{
|
||||
String k[] = a.get(i).toString().split(":");
|
||||
c.setUpkeepCost(k[1]);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
for (int i=0; i<list.size();i++)
|
||||
{
|
||||
final Card c = list.get(i);
|
||||
|
||||
final Ability sacAbility = new Ability(c, c.getUpkeepCost())
|
||||
{
|
||||
public void resolve()
|
||||
{
|
||||
;
|
||||
}
|
||||
};
|
||||
|
||||
final Command unpaidCommand = new Command() {
|
||||
private static final long serialVersionUID = 8942537892273123542L;
|
||||
|
||||
public void execute() {
|
||||
if(c.getName().equals("Cosmic Horror"))
|
||||
{
|
||||
String player = c.getController();
|
||||
PlayerLife life = AllZone.GameAction.getPlayerLife(player);
|
||||
life.subtractLife(7);
|
||||
}
|
||||
AllZone.GameAction.destroy(c);
|
||||
}
|
||||
};
|
||||
|
||||
final Command paidCommand = new Command() {
|
||||
private static final long serialVersionUID = -8462246567257483700L;
|
||||
|
||||
public void execute() {
|
||||
;
|
||||
}
|
||||
};
|
||||
|
||||
//AllZone.Stack.add(sacAbility);
|
||||
if (c.getController().equals(Constant.Player.Human)) {
|
||||
AllZone.InputControl.setInput(new Input_PayManaCost_Ability("Upkeep for "+ c +"\r\n", sacAbility.getManaCost(), paidCommand, unpaidCommand));
|
||||
}
|
||||
else //computer
|
||||
{
|
||||
if (ComputerUtil.canPayCost(sacAbility))
|
||||
ComputerUtil.playNoStack(sacAbility);
|
||||
else
|
||||
AllZone.GameAction.destroy(c);
|
||||
}
|
||||
}
|
||||
}//upkeepCost
|
||||
|
||||
|
||||
public static void upkeep_DamageUpkeepCost()
|
||||
{
|
||||
String player = AllZone.Phase.getActivePlayer();
|
||||
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, player);
|
||||
CardList list = new CardList();
|
||||
list.addAll(play.getCards());
|
||||
//list = list.getType("Creature");
|
||||
list = list.filter(new CardListFilter()
|
||||
{
|
||||
public boolean addCard(Card c)
|
||||
{
|
||||
ArrayList<String> a = c.getKeyword();
|
||||
for (int i = 0; i < a.size(); i++)
|
||||
{
|
||||
if (a.get(i).toString().startsWith("At the beginning of your upkeep, " +c.getName() + " deals "))
|
||||
{
|
||||
String k[] = a.get(i).toString().split("deals ");
|
||||
String s1 = k[1].substring(0, 2);
|
||||
s1 = s1.trim();
|
||||
c.setUpkeepDamage(Integer.parseInt(s1));
|
||||
System.out.println(k[1]);
|
||||
String l[] = k[1].split("pay:");
|
||||
System.out.println(l[1]);
|
||||
c.setUpkeepCost(l[1]);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
for (int i=0; i<list.size();i++)
|
||||
{
|
||||
final Card c = list.get(i);
|
||||
|
||||
final Ability sacAbility = new Ability(c, c.getUpkeepCost())
|
||||
{
|
||||
public void resolve()
|
||||
{
|
||||
;
|
||||
}
|
||||
};
|
||||
|
||||
final Command unpaidCommand = new Command() {
|
||||
private static final long serialVersionUID = 8942537892273123542L;
|
||||
|
||||
public void execute() {
|
||||
//AllZone.GameAction.sacrifice(c);
|
||||
String player = c.getController();
|
||||
PlayerLife life = AllZone.GameAction.getPlayerLife(player);
|
||||
life.subtractLife(c.getUpkeepDamage());
|
||||
}
|
||||
};
|
||||
|
||||
final Command paidCommand = new Command() {
|
||||
private static final long serialVersionUID = -8462246567257483700L;
|
||||
|
||||
public void execute() {
|
||||
;
|
||||
}
|
||||
};
|
||||
|
||||
//AllZone.Stack.add(sacAbility);
|
||||
if (c.getController().equals(Constant.Player.Human)) {
|
||||
AllZone.InputControl.setInput(new Input_PayManaCost_Ability("Upkeep for "+ c +"\r\n", sacAbility.getManaCost(), paidCommand, unpaidCommand));
|
||||
}
|
||||
else //computer
|
||||
{
|
||||
if (ComputerUtil.canPayCost(sacAbility))
|
||||
ComputerUtil.playNoStack(sacAbility);
|
||||
else
|
||||
AllZone.GameAction.sacrifice(c);
|
||||
}
|
||||
}
|
||||
}//damageUpkeepCost
|
||||
|
||||
public static void removeAttackedBlockedThisTurn()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user