mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Fixed Time counters not showing up.
- Fixed a bug where creatures wouldn't trigger on attacking a planeswalker. - Made Exalted a real triggered ability, checked only once after attackers are declared.
This commit is contained in:
@@ -14080,7 +14080,6 @@ public class CardFactory implements NewConstants {
|
|||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Nameless Inversion"))
|
else if(cardName.equals("Nameless Inversion"))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1983,7 +1983,7 @@ class CardFactory_Planeswalkers {
|
|||||||
card2.addSpellAbility(new Spell_Permanent(card2));
|
card2.addSpellAbility(new Spell_Permanent(card2));
|
||||||
card2.addComesIntoPlayCommand(CardFactoryUtil.entersBattleFieldWithCounters(card2, Counters.LOYALTY, 3));
|
card2.addComesIntoPlayCommand(CardFactoryUtil.entersBattleFieldWithCounters(card2, Counters.LOYALTY, 3));
|
||||||
|
|
||||||
//ability 1: destroy target noncreature permanent
|
|
||||||
final SpellAbility ability1 = new Ability(card2, "0")
|
final SpellAbility ability1 = new Ability(card2, "0")
|
||||||
{
|
{
|
||||||
public void resolve()
|
public void resolve()
|
||||||
|
|||||||
@@ -504,7 +504,7 @@ public class CombatUtil
|
|||||||
//loop through attackers
|
//loop through attackers
|
||||||
for(int i = 0; i < attack.length; i++)
|
for(int i = 0; i < attack.length; i++)
|
||||||
{
|
{
|
||||||
GameActionUtil.executeExaltedEffects2(attack[i], AllZone.Combat);
|
//GameActionUtil.executeExaltedEffects2(attack[i], AllZone.Combat);
|
||||||
//checkDeclareAttackers(attack[i]);
|
//checkDeclareAttackers(attack[i]);
|
||||||
attackerName = attack[i].getName();
|
attackerName = attack[i].getName();
|
||||||
if (attack[i].isFaceDown())
|
if (attack[i].isFaceDown())
|
||||||
@@ -559,7 +559,8 @@ public class CombatUtil
|
|||||||
//loop through attackers
|
//loop through attackers
|
||||||
for(int i = 0; i < attack.length; i++)
|
for(int i = 0; i < attack.length; i++)
|
||||||
{
|
{
|
||||||
GameActionUtil.executeExaltedEffects2(attack[i], AllZone.pwCombat);
|
//GameActionUtil.executeExaltedEffects2(attack[i], AllZone.pwCombat);
|
||||||
|
|
||||||
//checkDeclareAttackers(attack[i]);
|
//checkDeclareAttackers(attack[i]);
|
||||||
attackerName = attack[i].getName();
|
attackerName = attack[i].getName();
|
||||||
if (attack[i].isFaceDown())
|
if (attack[i].isFaceDown())
|
||||||
@@ -2004,4 +2005,99 @@ public class CombatUtil
|
|||||||
|
|
||||||
a.setCreatureGotBlockedThisTurn(true);
|
a.setCreatureGotBlockedThisTurn(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void executeExaltedAbility(Card c, int magnitude)
|
||||||
|
{
|
||||||
|
final Card crd = c;
|
||||||
|
final int n = magnitude;
|
||||||
|
Ability ability = new Ability(c,"0")
|
||||||
|
{
|
||||||
|
public void resolve()
|
||||||
|
{
|
||||||
|
final Command untilEOT = new Command()
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1497565871061029469L;
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
{
|
||||||
|
if(AllZone.GameAction.isCardInPlay(crd))
|
||||||
|
{
|
||||||
|
crd.addTempAttackBoost(-n);
|
||||||
|
crd.addTempDefenseBoost(-n);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};//Command
|
||||||
|
|
||||||
|
if(AllZone.GameAction.isCardInPlay(crd))
|
||||||
|
{
|
||||||
|
crd.addTempAttackBoost(n);
|
||||||
|
crd.addTempDefenseBoost(n);
|
||||||
|
|
||||||
|
AllZone.EndOfTurn.addUntil(untilEOT);
|
||||||
|
}
|
||||||
|
}//resolve
|
||||||
|
|
||||||
|
};//ability
|
||||||
|
ability.setStackDescription(c +" - (Exalted) gets +" +n +"/+" +n +" until EOT.");
|
||||||
|
AllZone.Stack.add(ability);
|
||||||
|
|
||||||
|
if (GameActionUtil.isRafiqInPlay(c.getController()))
|
||||||
|
{
|
||||||
|
Ability ability2 = new Ability(c,"0")
|
||||||
|
{
|
||||||
|
public void resolve()
|
||||||
|
{
|
||||||
|
final Command untilEOT = new Command()
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = -8943526706248389725L;
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
{
|
||||||
|
if(AllZone.GameAction.isCardInPlay(crd))
|
||||||
|
crd.removeExtrinsicKeyword("Double Strike");
|
||||||
|
}
|
||||||
|
};//Command
|
||||||
|
|
||||||
|
if(AllZone.GameAction.isCardInPlay(crd))
|
||||||
|
{
|
||||||
|
crd.addExtrinsicKeyword("Double Strike");
|
||||||
|
AllZone.EndOfTurn.addUntil(untilEOT);
|
||||||
|
}
|
||||||
|
}//resolve
|
||||||
|
|
||||||
|
};//ability2
|
||||||
|
ability2.setStackDescription(c +" - (Exalted) gets Double Strike until EOT.");
|
||||||
|
AllZone.Stack.add(ability2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GameActionUtil.getBattleGraceAngels(c.getController()) > 0)
|
||||||
|
{
|
||||||
|
Ability ability3 = new Ability(c,"0")
|
||||||
|
{
|
||||||
|
public void resolve()
|
||||||
|
{
|
||||||
|
final Command untilEOT = new Command()
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = -8154692281049657338L;
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
{
|
||||||
|
if(AllZone.GameAction.isCardInPlay(crd))
|
||||||
|
crd.removeExtrinsicKeyword("Lifelink");
|
||||||
|
}
|
||||||
|
};//Command
|
||||||
|
|
||||||
|
if(AllZone.GameAction.isCardInPlay(crd))
|
||||||
|
{
|
||||||
|
crd.addExtrinsicKeyword("Lifelink");
|
||||||
|
AllZone.EndOfTurn.addUntil(untilEOT);
|
||||||
|
}
|
||||||
|
}//resolve
|
||||||
|
|
||||||
|
};//ability2
|
||||||
|
ability3.setStackDescription(c +" - (Exalted) gets Lifelink until EOT.");
|
||||||
|
AllZone.Stack.add(ability3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}//Class CombatUtil
|
}//Class CombatUtil
|
||||||
@@ -33,7 +33,7 @@ public class EndOfTurn implements java.io.Serializable
|
|||||||
AllZone.GameAction.sacrifice(sacrifice.get(i));
|
AllZone.GameAction.sacrifice(sacrifice.get(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
GameActionUtil.removeExaltedEffects();
|
//GameActionUtil.removeExaltedEffects();
|
||||||
GameActionUtil.removeAttackedBlockedThisTurn();
|
GameActionUtil.removeAttackedBlockedThisTurn();
|
||||||
|
|
||||||
AllZone.StaticEffects.rePopulateStateBasedList();
|
AllZone.StaticEffects.rePopulateStateBasedList();
|
||||||
|
|||||||
@@ -2995,6 +2995,8 @@ public class GameActionUtil
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
public static void executeExaltedEffects2(Card c, Combat combats)
|
public static void executeExaltedEffects2(Card c, Combat combats)
|
||||||
{
|
{
|
||||||
boolean exalted = false;
|
boolean exalted = false;
|
||||||
@@ -3101,7 +3103,8 @@ public class GameActionUtil
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
/*
|
||||||
public static void removeExaltedEffects() // at EOT
|
public static void removeExaltedEffects() // at EOT
|
||||||
{
|
{
|
||||||
PlayerZone playerZone = AllZone.getZone(Constant.Zone.Play,
|
PlayerZone playerZone = AllZone.getZone(Constant.Zone.Play,
|
||||||
@@ -3138,7 +3141,7 @@ public class GameActionUtil
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
public static boolean isRafiqInPlay(String player)
|
public static boolean isRafiqInPlay(String player)
|
||||||
{
|
{
|
||||||
PlayerZone playerZone = AllZone.getZone(Constant.Zone.Play, player);
|
PlayerZone playerZone = AllZone.getZone(Constant.Zone.Play, player);
|
||||||
@@ -16141,7 +16144,7 @@ public class GameActionUtil
|
|||||||
commands.put("Meddling_Mage", Meddling_Mage);
|
commands.put("Meddling_Mage", Meddling_Mage);
|
||||||
commands.put("Gaddock_Teeg", Gaddock_Teeg);
|
commands.put("Gaddock_Teeg", Gaddock_Teeg);
|
||||||
commands.put("Iona_Shield_of_Emeria", Iona_Shield_of_Emeria);
|
commands.put("Iona_Shield_of_Emeria", Iona_Shield_of_Emeria);
|
||||||
System.out.println("size of commands: " + commands.size());
|
//System.out.println("size of commands: " + commands.size());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -570,6 +570,11 @@ public class GuiDisplay3 extends JFrame implements Display, NewConstants, NewCon
|
|||||||
counterText.append(c.getCounters(Counters.SPORE));
|
counterText.append(c.getCounters(Counters.SPORE));
|
||||||
counterText.append("\r\n");
|
counterText.append("\r\n");
|
||||||
}
|
}
|
||||||
|
if(c.getCounters(Counters.TIME) != 0) {
|
||||||
|
counterText.append("Time counters: ");
|
||||||
|
counterText.append(c.getCounters(Counters.TIME));
|
||||||
|
counterText.append("\r\n");
|
||||||
|
}
|
||||||
|
|
||||||
String chosenTypeText = "";
|
String chosenTypeText = "";
|
||||||
if(c.getChosenType() != "") chosenTypeText = "(chosen type: " + c.getChosenType() + ")";
|
if(c.getChosenType() != "") chosenTypeText = "(chosen type: " + c.getChosenType() + ")";
|
||||||
@@ -1259,7 +1264,7 @@ public class GuiDisplay3 extends JFrame implements Display, NewConstants, NewCon
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
cardImagePanel.setScalingBlur(false); //use blured image if scaling down more than 50%
|
cardImagePanel.setScalingBlur(false); //use blured image if scaling down more than 50%
|
||||||
cardImagePanel.setScaleLarger(false); //upscale if needed true
|
//cardImagePanel.setScaleLarger(false); //upscale if needed true
|
||||||
cardImagePanel.setScalingType(ScalingType.bicubic); // type of scaling bicubic has good quality / speed ratio
|
cardImagePanel.setScalingType(ScalingType.bicubic); // type of scaling bicubic has good quality / speed ratio
|
||||||
cardImagePanel.setScalingMultiPassType(MultipassType.none);
|
cardImagePanel.setScalingMultiPassType(MultipassType.none);
|
||||||
|
|
||||||
|
|||||||
@@ -88,7 +88,23 @@ import java.util.*;
|
|||||||
{
|
{
|
||||||
CardList list = new CardList();
|
CardList list = new CardList();
|
||||||
list.addAll(AllZone.Combat.getAttackers());
|
list.addAll(AllZone.Combat.getAttackers());
|
||||||
//list.addAll(AllZone.pwCombat.getAttackers());
|
list.addAll(AllZone.pwCombat.getAttackers());
|
||||||
|
|
||||||
|
//check for exalted:
|
||||||
|
if (list.size() == 1)
|
||||||
|
{
|
||||||
|
String attackingPlayer = AllZone.Combat.getAttackingPlayer();
|
||||||
|
PlayerZone play = AllZone.getZone(Constant.Zone.Play, attackingPlayer);
|
||||||
|
CardList exalted = new CardList(play.getCards());
|
||||||
|
exalted = exalted.filter(new CardListFilter(){
|
||||||
|
public boolean addCard(Card c)
|
||||||
|
{
|
||||||
|
return c.getKeyword().contains("Exalted");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (exalted.size() > 0)
|
||||||
|
CombatUtil.executeExaltedAbility(list.get(0), exalted.size());
|
||||||
|
}
|
||||||
|
|
||||||
for (Card c : list)
|
for (Card c : list)
|
||||||
CombatUtil.checkPropagandaEffects(c);
|
CombatUtil.checkPropagandaEffects(c);
|
||||||
@@ -301,7 +317,23 @@ import java.util.*;
|
|||||||
{
|
{
|
||||||
CardList list = new CardList();
|
CardList list = new CardList();
|
||||||
list.addAll(AllZone.Combat.getAttackers());
|
list.addAll(AllZone.Combat.getAttackers());
|
||||||
//list.addAll(AllZone.pwCombat.getAttackers());
|
list.addAll(AllZone.pwCombat.getAttackers());
|
||||||
|
|
||||||
|
//check for exalted:
|
||||||
|
if (list.size() == 1)
|
||||||
|
{
|
||||||
|
String attackingPlayer = AllZone.Combat.getAttackingPlayer();
|
||||||
|
PlayerZone play = AllZone.getZone(Constant.Zone.Play, attackingPlayer);
|
||||||
|
CardList exalted = new CardList(play.getCards());
|
||||||
|
exalted = exalted.filter(new CardListFilter(){
|
||||||
|
public boolean addCard(Card c)
|
||||||
|
{
|
||||||
|
return c.getKeyword().contains("Exalted");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (exalted.size() > 0)
|
||||||
|
CombatUtil.executeExaltedAbility(list.get(0), exalted.size());
|
||||||
|
}
|
||||||
|
|
||||||
for (Card c : list)
|
for (Card c : list)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user