mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Improved the AI for Reprisal.
- Several minor code cleanups in CardFactory.java.
This commit is contained in:
@@ -20622,7 +20622,7 @@ public class CardFactory implements NewConstants {
|
||||
//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
if (cardName.equals("Reprisal")) {
|
||||
else if (cardName.equals("Reprisal")) {
|
||||
final SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = 8653455310355884536L;
|
||||
|
||||
@@ -20630,9 +20630,13 @@ public class CardFactory implements NewConstants {
|
||||
CardList list = new CardList(AllZone.Human_Play.getCards());
|
||||
list = list.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.isCreature() && c.getNetAttack() > 3 && CardFactoryUtil.canTarget(card, c);
|
||||
return c.isCreature()
|
||||
&& c.getNetAttack() > 3
|
||||
&& CardFactoryUtil.canTarget(card, c)
|
||||
&& !c.getKeyword().contains("Indestructible");
|
||||
}
|
||||
});
|
||||
|
||||
if (list.isEmpty()) return false;
|
||||
|
||||
CardListUtil.sortAttack(list);
|
||||
@@ -20643,7 +20647,6 @@ public class CardFactory implements NewConstants {
|
||||
|
||||
public void resolve() {
|
||||
if (AllZone.GameAction.isCardInPlay(getTargetCard())) {
|
||||
// AllZone.GameAction.destroy(getTargetCard());
|
||||
AllZone.GameAction.destroyNoRegeneration(getTargetCard());
|
||||
}
|
||||
}//resolve
|
||||
@@ -20662,7 +20665,10 @@ public class CardFactory implements NewConstants {
|
||||
stop();
|
||||
}
|
||||
public void selectCard(Card c, PlayerZone zone) {
|
||||
if (zone.is(Constant.Zone.Play) && c.isCreature() && (c.getNetAttack() > 3)) {
|
||||
if (zone.is(Constant.Zone.Play)
|
||||
&& c.isCreature()
|
||||
&& (c.getNetAttack() > 3)
|
||||
&& CardFactoryUtil.canTarget(card, c)) {
|
||||
spell.setTargetCard(c);
|
||||
if (this.isFree())
|
||||
{
|
||||
@@ -20681,9 +20687,8 @@ public class CardFactory implements NewConstants {
|
||||
spell.setBeforePayMana(target);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*****************************START*******************************
|
||||
if(cardName.equals("Icy Manipulator")) {
|
||||
else if(cardName.equals("Icy Manipulator")) {
|
||||
/* The Rules state that this can target a tapped card, but it won't do anything */
|
||||
|
||||
final Ability_Tap ability = new Ability_Tap(card, "1") {
|
||||
@@ -21017,7 +21022,7 @@ public class CardFactory implements NewConstants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*****************************START*******************************
|
||||
if(cardName.equals("Jandor's Saddlebags")) {
|
||||
else if(cardName.equals("Jandor's Saddlebags")) {
|
||||
/* Assuing the Rules state that this can target an untapped card,
|
||||
* but it won't do anything useful
|
||||
*
|
||||
@@ -21520,7 +21525,7 @@ public class CardFactory implements NewConstants {
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
if(cardName.equals("Bottle of Suleiman")) {
|
||||
else if(cardName.equals("Bottle of Suleiman")) {
|
||||
/*
|
||||
* Sacrifice Bottle of Suleiman: Flip a coin. If you lose the flip,
|
||||
* Bottle of Suleiman deals 5 damage to you. If you win the flip,
|
||||
@@ -21701,7 +21706,7 @@ public class CardFactory implements NewConstants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*****************************START*******************************
|
||||
if(cardName.equals("Twiddle")) {
|
||||
else if(cardName.equals("Twiddle")) {
|
||||
/*
|
||||
* You may tap or untap target artifact, creature, or land.
|
||||
*/
|
||||
@@ -21763,7 +21768,7 @@ public class CardFactory implements NewConstants {
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
if(cardName.equals("Zuran Orb")) {
|
||||
else if(cardName.equals("Zuran Orb")) {
|
||||
final SpellAbility ability = new Ability_Activated(card,"0") {
|
||||
private static final long serialVersionUID = 6349074098650435648L;
|
||||
public boolean canPlayAI() {
|
||||
@@ -23779,7 +23784,6 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
if(cardName.equals("Life from the Loam")) {
|
||||
final SpellAbility spell = new Spell(card) {
|
||||
|
||||
Reference in New Issue
Block a user