mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Added Gatekeeper of Malakir.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
Gatekeeper of Malakir
|
||||
B B
|
||||
Creature Vampire Warrior
|
||||
When Gatekeeper of Malakir enters the battlefield, if it was kicked, target player sacrifices a creature.
|
||||
2/2
|
||||
|
||||
Guul Draz Vampire
|
||||
B
|
||||
Creature Vampire Rogue
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
program/mail=mtgerror@yahoo.com
|
||||
program/forum=http://www.slightlymagic.net/forum/viewforum.php?f=26
|
||||
program/version=Forge -- official beta: 10/01/17, SVN revision: 288
|
||||
program/version=Forge -- official beta: 10/01/17, SVN revision: 292
|
||||
|
||||
tokens--file=AllTokens.txt
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ enum Counters {
|
||||
AGE, BLAZE, CHARGE, DIVINITY, FADE, HOOFPRINT, ICE, LOYALTY, M1M1, MANA, P0M1, P1P1, QUEST, SPORE
|
||||
}
|
||||
|
||||
|
||||
public class Card extends MyObservable
|
||||
{
|
||||
private static int nextUniqueNumber;
|
||||
@@ -44,6 +43,7 @@ public class Card extends MyObservable
|
||||
private boolean exaltedBonus = false;
|
||||
private boolean faceDown = false;
|
||||
private boolean sacrificeAtEOT = false;
|
||||
private boolean kicked = false;
|
||||
|
||||
private boolean firstStrike = false;
|
||||
private boolean doubleStrike = false;
|
||||
@@ -985,4 +985,10 @@ public class Card extends MyObservable
|
||||
{
|
||||
flashback = b;
|
||||
}
|
||||
public void setKicked(boolean b) {
|
||||
kicked = b;
|
||||
}
|
||||
public boolean isKicked() {
|
||||
return kicked;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3421,8 +3421,6 @@ public class CardFactory_Creatures {
|
||||
final SpellAbility ability = new Ability(card, "0")
|
||||
{
|
||||
public void resolve(){
|
||||
@SuppressWarnings("unused") // opponent
|
||||
String opponent = card.getController();
|
||||
((PlayerZone_ComesIntoPlay)AllZone.Human_Play).setTriggers(false);
|
||||
((PlayerZone_ComesIntoPlay)AllZone.Computer_Play).setTriggers(false);
|
||||
|
||||
@@ -19465,6 +19463,73 @@ public class CardFactory_Creatures {
|
||||
|
||||
card.addDestroyCommand(destroy);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Gatekeeper of Malakir"))
|
||||
{
|
||||
final SpellAbility kicker = new Spell(card)
|
||||
{
|
||||
private static final long serialVersionUID = -1598664186463358630L;
|
||||
public void resolve()
|
||||
{
|
||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand ,card.getController());
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play ,card.getController());
|
||||
|
||||
card.setKicked(true);
|
||||
hand.remove(card);
|
||||
play.add(card);
|
||||
//card.comesIntoPlay(); //do i need this?
|
||||
}
|
||||
public boolean canPlay()
|
||||
{
|
||||
return AllZone.Phase.getActivePlayer().equals(card.getController()) &&
|
||||
!AllZone.Phase.getPhase().equals("End of Turn") && !AllZone.GameAction.isCardInPlay(card);
|
||||
}
|
||||
|
||||
public boolean canPlayAI()
|
||||
{
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, Constant.Player.Human);
|
||||
CardList cl = new CardList(play.getCards());
|
||||
cl = cl.getType("Creature");
|
||||
|
||||
return cl.size() > 0;
|
||||
}
|
||||
|
||||
};
|
||||
kicker.setManaCost("B B B");
|
||||
kicker.setDescription("Kicker B");
|
||||
kicker.setStackDescription(card.getName() + " - Creature 2/2 (Kicked)");
|
||||
card.addSpellAbility(kicker);
|
||||
|
||||
final Ability ability = new Ability(card, "0")
|
||||
{
|
||||
public void resolve()
|
||||
{
|
||||
AllZone.GameAction.sacrificeCreature(getTargetPlayer(), this);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Command commandComes = new Command()
|
||||
{
|
||||
private static final long serialVersionUID = -2622859088591798773L;
|
||||
|
||||
public void execute()
|
||||
{
|
||||
if (card.isKicked()) {
|
||||
if(card.getController().equals(Constant.Player.Human))
|
||||
AllZone.InputControl.setInput(CardFactoryUtil.input_targetPlayer(ability));
|
||||
else //computer
|
||||
{
|
||||
ability.setChooseTargetAI(CardFactoryUtil.AI_targetHuman());
|
||||
}//else
|
||||
}
|
||||
}//execute()
|
||||
};//CommandComes
|
||||
|
||||
card.addComesIntoPlayCommand(commandComes);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
// Cards with Cycling abilities
|
||||
// -1 means keyword "Cycling" not found
|
||||
if (shouldCycle(card) != -1)
|
||||
|
||||
@@ -4,12 +4,9 @@ import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
//import java.util.HashMap;
|
||||
//import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
public class ComputerUtil
|
||||
{
|
||||
@SuppressWarnings("unused") // random
|
||||
private static Random random = new Random();
|
||||
|
||||
//if return true, go to next phase
|
||||
static public boolean playCards()
|
||||
@@ -61,7 +58,6 @@ private static Random random = new Random();
|
||||
|
||||
AllZone.Stack.add(sa);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
final static public void playStackFree(SpellAbility sa)
|
||||
@@ -74,8 +70,6 @@ private static Random random = new Random();
|
||||
AllZone.GameAction.drawCard(sa.getSourceCard().getController());
|
||||
|
||||
AllZone.Stack.add(sa);
|
||||
|
||||
|
||||
}
|
||||
|
||||
final static public void playNoStack(SpellAbility sa)
|
||||
|
||||
@@ -180,7 +180,7 @@ public class GameActionUtil
|
||||
}//while
|
||||
AllZone.Display.getChoiceOptional("Revealed cards:", revealed.toArray());
|
||||
|
||||
if (cascadedCard != null) {
|
||||
if (cascadedCard != null && !cascadedCard.isUnCastable()) {
|
||||
revealed.remove(cascadedCard);
|
||||
|
||||
if (cascadedCard.getController().equals(Constant.Player.Human))
|
||||
@@ -208,7 +208,6 @@ public class GameActionUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
revealed.shuffle();
|
||||
for (Card bottom : revealed)
|
||||
@@ -251,8 +250,6 @@ public class GameActionUtil
|
||||
{
|
||||
card.addTempAttackBoost(-1);
|
||||
card.addTempDefenseBoost(-1);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user