mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Added Sun Titan.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
Sun Titan
|
||||
4 W W
|
||||
Creature Giant
|
||||
Whenever Sun Titan enters the battlefield or attacks, you may return target permanent card with converted mana cost 3 or less from your graveyard to the battlefield.
|
||||
6/6
|
||||
Vigilance
|
||||
|
||||
Roc Egg
|
||||
2 W
|
||||
Creature Bird
|
||||
|
||||
@@ -4113,6 +4113,65 @@ public class CardFactory_Creatures {
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Sun Titan")) {
|
||||
final SpellAbility ability = new Ability(card, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, card.getController());
|
||||
if(AllZone.GameAction.isCardInZone(getTargetCard(), grave)) {
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
|
||||
play.add(getTargetCard());
|
||||
grave.remove(getTargetCard());
|
||||
}
|
||||
}//resolve()
|
||||
};
|
||||
Command intoPlay = new Command() {
|
||||
|
||||
private static final long serialVersionUID = 6483805330273377116L;
|
||||
|
||||
public void execute() {
|
||||
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, card.getController());
|
||||
CardList graveList = new CardList(grave.getCards());
|
||||
graveList = graveList.filter(new CardListFilter()
|
||||
{
|
||||
public boolean addCard(Card crd)
|
||||
{
|
||||
return crd.isPermanent() && CardUtil.getConvertedManaCost(crd.getManaCost()) <=3;
|
||||
}
|
||||
});
|
||||
|
||||
if(graveList.size() == 0) return;
|
||||
|
||||
if(card.getController().equals(Constant.Player.Human)) {
|
||||
Object o = AllZone.Display.getChoiceOptional("Select target card", grave.getCards());
|
||||
if(o != null) {
|
||||
ability.setTargetCard((Card) o);
|
||||
AllZone.Stack.add(ability);
|
||||
}
|
||||
} else//computer
|
||||
{
|
||||
CardList list = new CardList(grave.getCards());
|
||||
list = list.filter(new CardListFilter(){
|
||||
public boolean addCard(Card crd)
|
||||
{
|
||||
return crd.isPermanent() && CardUtil.getConvertedManaCost(crd.getManaCost()) <=3;
|
||||
}
|
||||
});
|
||||
Card best = CardFactoryUtil.AI_getBestCreature(list);
|
||||
|
||||
if(best == null) {
|
||||
list.shuffle();
|
||||
best = list.get(0);
|
||||
}
|
||||
ability.setTargetCard(best);
|
||||
AllZone.Stack.add(ability);
|
||||
}
|
||||
}//execute()
|
||||
};//Command
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Karmic Guide")) {
|
||||
final SpellAbility ability = new Ability(card, "0") {
|
||||
|
||||
@@ -1582,6 +1582,71 @@ public class CombatUtil {
|
||||
|
||||
}//Primeval Titan
|
||||
|
||||
else if(c.getName().equals("Sun Titan") && !c.getCreatureAttackedThisCombat()) {
|
||||
final Card sun = c;
|
||||
final Ability ability2 = new Ability(c, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, sun.getController());
|
||||
if(AllZone.GameAction.isCardInZone(getTargetCard(), grave)) {
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, sun.getController());
|
||||
play.add(getTargetCard());
|
||||
grave.remove(getTargetCard());
|
||||
}
|
||||
}
|
||||
}; //Ability
|
||||
|
||||
|
||||
//ability2.setStackDescription(c.getName() + " - ");
|
||||
|
||||
|
||||
Command command = new Command() {
|
||||
private static final long serialVersionUID = 1658050744890095441L;
|
||||
|
||||
public void execute() {
|
||||
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, sun.getController());
|
||||
CardList graveList = new CardList(grave.getCards());
|
||||
graveList = graveList.filter(new CardListFilter()
|
||||
{
|
||||
public boolean addCard(Card crd)
|
||||
{
|
||||
return crd.isPermanent() && CardUtil.getConvertedManaCost(crd.getManaCost()) <=3;
|
||||
}
|
||||
});
|
||||
|
||||
if(graveList.size() == 0) return;
|
||||
|
||||
if(sun.getController().equals(Constant.Player.Human)) {
|
||||
Object o = AllZone.Display.getChoiceOptional("Select target card", grave.getCards());
|
||||
if(o != null) {
|
||||
ability2.setTargetCard((Card) o);
|
||||
AllZone.Stack.add(ability2);
|
||||
}
|
||||
} else//computer
|
||||
{
|
||||
CardList list = new CardList(grave.getCards());
|
||||
list = list.filter(new CardListFilter(){
|
||||
public boolean addCard(Card crd)
|
||||
{
|
||||
return crd.isPermanent() && CardUtil.getConvertedManaCost(crd.getManaCost()) <=3;
|
||||
}
|
||||
});
|
||||
Card best = CardFactoryUtil.AI_getBestCreature(list);
|
||||
|
||||
if(best == null) {
|
||||
list.shuffle();
|
||||
best = list.get(0);
|
||||
}
|
||||
ability2.setTargetCard(best);
|
||||
AllZone.Stack.add(ability2);
|
||||
}
|
||||
}//execute()
|
||||
};//Command
|
||||
command.execute();
|
||||
|
||||
}//Sun Titan
|
||||
|
||||
|
||||
else if(c.getName().equals("Preeminent Captain") && !c.getCreatureAttackedThisCombat()) {
|
||||
System.out.println("Preeminent Captain Attacks");
|
||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, c.getController());
|
||||
|
||||
Reference in New Issue
Block a user