mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- Fixed a bug with the AI using Isochron Scepter.
- Added Fog, Respite, Holy Day, Darkness, Moment's Peace, Lull, Angelsong (all unusable by AI for now).
This commit is contained in:
@@ -1,3 +1,40 @@
|
||||
Angelsong
|
||||
1 W
|
||||
Instant
|
||||
Prevent all combat damage that would be dealt this turn.
|
||||
Cycling:2
|
||||
|
||||
Lull
|
||||
1 G
|
||||
Instant
|
||||
Prevent all combat damage that would be dealt this turn.
|
||||
Cycling:2
|
||||
|
||||
Holy Day
|
||||
W
|
||||
Instant
|
||||
Prevent all combat damage that would be dealt this turn.
|
||||
|
||||
Moment's Peace
|
||||
1 G
|
||||
Instant
|
||||
Prevent all combat damage that would be dealt this turn.
|
||||
|
||||
Darkness
|
||||
B
|
||||
Instant
|
||||
Prevent all combat damage that would be dealt this turn.
|
||||
|
||||
Respite
|
||||
1 G
|
||||
Instant
|
||||
Prevent all combat damage that would be dealt this turn. You gain 1 life for each attacking creature.
|
||||
|
||||
Fog
|
||||
G
|
||||
Instant
|
||||
Prevent all combat damage that would be dealt this turn.
|
||||
|
||||
Wall of Reverence
|
||||
3 W
|
||||
Creature Spirit Wall
|
||||
|
||||
@@ -16720,6 +16720,8 @@ public class CardFactory implements NewConstants {
|
||||
}
|
||||
public boolean canPlayAI()
|
||||
{
|
||||
if (getSourceCard().getAttachedCards().length == 0)
|
||||
return false;
|
||||
for(SpellAbility sa:getSourceCard().getAttachedCards()[0].getSpellAbility())
|
||||
if(sa.canPlayAI())
|
||||
return true;
|
||||
@@ -17236,26 +17238,58 @@ public class CardFactory implements NewConstants {
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -3413999403234892711L;
|
||||
|
||||
public void resolve()
|
||||
{
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
|
||||
CardList land = new CardList(play.getCards());
|
||||
land = land.getType("Forest");
|
||||
makeToken();
|
||||
for(int i = 1; i < land.size(); i++)
|
||||
makeToken();
|
||||
}//resolve()
|
||||
|
||||
public void makeToken()
|
||||
{
|
||||
CardFactoryUtil.makeToken("Wolf", "G 2 2 Wolf", card, "G", new String[]{"Creature", "Wolf"}, 2, 2, new String[] {""});
|
||||
}
|
||||
|
||||
public void resolve()
|
||||
{
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
|
||||
CardList land = new CardList(play.getCards());
|
||||
land = land.getType("Forest");
|
||||
makeToken();
|
||||
for(int i = 1; i < land.size(); i++)
|
||||
makeToken();
|
||||
}//resolve()
|
||||
|
||||
public void makeToken()
|
||||
{
|
||||
CardFactoryUtil.makeToken("Wolf", "G 2 2 Wolf", card, "G", new String[]{"Creature", "Wolf"}, 2, 2, new String[] {""});
|
||||
}
|
||||
};
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Fog") || cardName.equals("Angelsong") || cardName.equals("Darkness") ||
|
||||
cardName.equals("Holy Day") || cardName.equals("Lull") || cardName.equals("Moment's Peace") ||
|
||||
cardName.equals("Respite"))
|
||||
{
|
||||
SpellAbility spell = new Spell(card)
|
||||
{
|
||||
private static final long serialVersionUID = -493504450911948985L;
|
||||
|
||||
public void resolve()
|
||||
{
|
||||
AllZone.GameInfo.setPreventCombatDamageThisTurn(true);
|
||||
|
||||
if (cardName.equals("Respite"))
|
||||
{
|
||||
CardList attackers = new CardList();
|
||||
attackers.addAll(AllZone.Combat.getAttackers());
|
||||
attackers.addAll(AllZone.pwCombat.getAttackers());
|
||||
AllZone.GameAction.addLife(card.getController(), attackers.size());
|
||||
}
|
||||
}
|
||||
public boolean canPlayAI()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
if (cardName.equals("Moment's Peace"))
|
||||
card.addSpellAbility(CardFactoryUtil.ability_Flashback(card, "2 G", "0"));
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
// Cards with Cycling abilities
|
||||
// -1 means keyword "Cycling" not found
|
||||
|
||||
@@ -37,6 +37,7 @@ public class EndOfTurn implements java.io.Serializable
|
||||
|
||||
//GameActionUtil.removeExaltedEffects();
|
||||
GameActionUtil.removeAttackedBlockedThisTurn();
|
||||
AllZone.GameInfo.setPreventCombatDamageThisTurn(false);
|
||||
|
||||
AllZone.StaticEffects.rePopulateStateBasedList();
|
||||
|
||||
|
||||
@@ -825,6 +825,8 @@ public class GameAction {
|
||||
AllZone.GameInfo.setComputerCanPlayNumberOfLands(1);
|
||||
AllZone.GameInfo.setHumanCanPlayNumberOfLands(1);
|
||||
|
||||
AllZone.GameInfo.setPreventCombatDamageThisTurn(false);
|
||||
|
||||
AllZone.Human_PoisonCounter.setPoisonCounters(0);
|
||||
AllZone.Computer_PoisonCounter.setPoisonCounters(0);
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ public class Input_CombatDamage extends Input {
|
||||
|
||||
@Override
|
||||
public void selectButtonOK() {
|
||||
damageCreatureAndPlayer();
|
||||
if (!AllZone.GameInfo.isPreventCombatDamageThisTurn())
|
||||
damageCreatureAndPlayer();
|
||||
|
||||
AllZone.GameAction.checkStateEffects();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user