mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Added Koth of the Hammer.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -2049,6 +2049,7 @@ res/cardsfolder/kor_line_slinger.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/kor_skyfisher.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/korlash_heir_to_blackblade.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/koskun_keep.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/koth_of_the_hammer.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/kozilek_butcher_of_truth.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/kozileks_predator.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/kraken_hatchling.txt -text svneol=native#text/plain
|
||||
|
||||
6
res/cardsfolder/koth_of_the_hammer.txt
Normal file
6
res/cardsfolder/koth_of_the_hammer.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
Name:Koth of the Hammer
|
||||
ManaCost:2 R R
|
||||
Types:Planeswalker - Koth
|
||||
Text:no text
|
||||
SVar:Rarity:Mythic
|
||||
End
|
||||
@@ -4605,6 +4605,9 @@ public class CardFactoryUtil {
|
||||
if (c.getKeyword().contains("Whenever you cast a spell, exile target permanent."))
|
||||
return "Venser_Emblem";
|
||||
|
||||
if (c.getKeyword().contains("Mountains you control have 'tap: This land deals 1 damage to target creature or player.'"))
|
||||
return "Koth_Emblem";
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,6 @@ class CardFactory_Planeswalkers {
|
||||
check = AllZone.Phase.getTurn();
|
||||
turn[0] = AllZone.Phase.getTurn();
|
||||
|
||||
|
||||
AllZone.Stack.push(ability2);
|
||||
}
|
||||
stop();
|
||||
@@ -3356,6 +3355,253 @@ class CardFactory_Planeswalkers {
|
||||
return card2;
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Koth of the Hammer")) {
|
||||
//computer only plays ability 1 and 3, put 1/1 Soldier in play and make everything indestructible
|
||||
final int turn[] = new int[1];
|
||||
turn[0] = -1;
|
||||
|
||||
final Card card2 = new Card() {
|
||||
@Override
|
||||
public void addDamage(int n, Card source) {
|
||||
subtractCounter(Counters.LOYALTY, n);
|
||||
AllZone.GameAction.checkStateEffects();
|
||||
}
|
||||
};
|
||||
card2.setOwner(owner);
|
||||
card2.setController(owner);
|
||||
|
||||
card2.setName(card.getName());
|
||||
card2.setType(card.getType());
|
||||
card2.setManaCost(card.getManaCost());
|
||||
card2.addSpellAbility(new Spell_Permanent(card2));
|
||||
card2.addComesIntoPlayCommand(CardFactoryUtil.entersBattleFieldWithCounters(card2, Counters.LOYALTY, 3));
|
||||
|
||||
//ability2: add R for each mountain
|
||||
final SpellAbility ability2 = new Ability(card2, "0") {
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
|
||||
card2.subtractCounter(Counters.LOYALTY, 2);
|
||||
|
||||
turn[0] = AllZone.Phase.getTurn();
|
||||
|
||||
Card mp = AllZone.ManaPool;//list.getCard(0);
|
||||
CardList list = AllZoneUtil.getPlayerCardsInPlay(Constant.Player.Human);
|
||||
list = list.filter(new CardListFilter()
|
||||
{
|
||||
public boolean addCard(Card crd)
|
||||
{
|
||||
return crd.getType().contains("Mountain");
|
||||
}
|
||||
});
|
||||
|
||||
for (int i=0;i<list.size();i++)
|
||||
mp.addExtrinsicKeyword("ManaPool:R");
|
||||
|
||||
}//resolve()
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
|
||||
return 0 < card2.getCounters(Counters.LOYALTY)
|
||||
&& AllZone.getZone(card2).is(Constant.Zone.Play)
|
||||
&& turn[0] != AllZone.Phase.getTurn()
|
||||
&& AllZone.Phase.getActivePlayer().equals(card2.getController())
|
||||
&& !AllZone.Phase.getPhase().equals("End of Turn")
|
||||
&& (AllZone.Phase.getPhase().equals("Main1") || AllZone.Phase.getPhase().equals(
|
||||
"Main2")) && AllZone.Stack.size() == 0;
|
||||
|
||||
}//canPlay()
|
||||
};//SpellAbility ability2
|
||||
|
||||
//ability3
|
||||
final SpellAbility ability3 = new Ability(card2, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
card2.subtractCounter(Counters.LOYALTY, 5);
|
||||
turn[0] = AllZone.Phase.getTurn();
|
||||
|
||||
Card emblem = new Card();
|
||||
|
||||
emblem.addIntrinsicKeyword("Indestructible");
|
||||
emblem.addIntrinsicKeyword("Shroud");
|
||||
emblem.addIntrinsicKeyword("Mountains you control have 'tap: This land deals 1 damage to target creature or player.'");
|
||||
emblem.setImmutable(true);
|
||||
emblem.addType("Emblem");
|
||||
emblem.setController(card2.getController());
|
||||
emblem.setOwner(card2.getOwner());
|
||||
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card2.getController());
|
||||
play.add(emblem);
|
||||
|
||||
//AllZone.GameAction.checkStateEffects();
|
||||
AllZone.StaticEffects.rePopulateStateBasedList();
|
||||
for(String effect:AllZone.StaticEffects.getStateBasedMap().keySet()) {
|
||||
Command com = GameActionUtil.commands.get(effect);
|
||||
com.execute();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
return 5 <= card2.getCounters(Counters.LOYALTY)
|
||||
&& AllZone.getZone(card2).is(Constant.Zone.Play)
|
||||
&& turn[0] != AllZone.Phase.getTurn()
|
||||
&& AllZone.Phase.getActivePlayer().equals(card2.getController())
|
||||
&& !AllZone.Phase.getPhase().equals("End of Turn")
|
||||
&& (AllZone.Phase.getPhase().equals("Main1") || AllZone.Phase.getPhase().equals(
|
||||
"Main2")) && AllZone.Stack.size() == 0;
|
||||
}//canPlay()
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
CardList list = AllZoneUtil.getPlayerCardsInPlay(Constant.Player.Computer);
|
||||
list = list.filter(new CardListFilter(){
|
||||
public boolean addCard(Card c)
|
||||
{
|
||||
return c.isEmblem() && c.getKeyword().contains("Mountains you control have 'tap: This land deals 1 damage to target creature or player.'");
|
||||
}
|
||||
});
|
||||
return list.size() == 0 && card2.getCounters(Counters.LOYALTY) > 5;
|
||||
}
|
||||
};
|
||||
ability3.setBeforePayMana(new Input() {
|
||||
private static final long serialVersionUID = -2054686425541429389L;
|
||||
|
||||
int check = -1;
|
||||
|
||||
@Override
|
||||
public void showMessage() {
|
||||
if(check != AllZone.Phase.getTurn()) {
|
||||
check = AllZone.Phase.getTurn();
|
||||
turn[0] = AllZone.Phase.getTurn();
|
||||
AllZone.Stack.push(ability3);
|
||||
}
|
||||
stop();
|
||||
}//showMessage()
|
||||
});
|
||||
|
||||
//ability 1: make 4/4 out of moutain
|
||||
final SpellAbility ability1 = new Ability(card2, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
card2.addCounterFromNonEffect(Counters.LOYALTY, 1);
|
||||
turn[0] = AllZone.Phase.getTurn();
|
||||
|
||||
final Card card[] = new Card[1];
|
||||
card[0] = getTargetCard();
|
||||
|
||||
final int[] oldAttack = new int[1];
|
||||
final int[] oldDefense = new int[1];
|
||||
|
||||
oldAttack[0] = card[0].getBaseAttack();
|
||||
oldDefense[0] = card[0].getBaseDefense();
|
||||
|
||||
if (card[0].getType().contains("Mountain"))
|
||||
{
|
||||
card[0].untap();
|
||||
|
||||
card[0].setBaseAttack(4);
|
||||
card[0].setBaseDefense(4);
|
||||
card[0].addType("Creature");
|
||||
card[0].addType("Elemental");
|
||||
|
||||
//EOT
|
||||
final Command untilEOT = new Command() {
|
||||
|
||||
private static final long serialVersionUID = 6426615528873039915L;
|
||||
|
||||
public void execute() {
|
||||
card[0].setBaseAttack(oldAttack[0]);
|
||||
card[0].setBaseDefense(oldDefense[0]);
|
||||
|
||||
card[0].removeType("Creature");
|
||||
card[0].removeType("Elemental");
|
||||
}
|
||||
};
|
||||
AllZone.EndOfTurn.addUntil(untilEOT);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
CardList list = AllZoneUtil.getPlayerCardsInPlay(Constant.Player.Computer);
|
||||
list = list.filter(new CardListFilter()
|
||||
{
|
||||
public boolean addCard(Card crd)
|
||||
{
|
||||
return crd.isEmblem() && crd.getKeyword().contains("Mountains you control have 'tap: This land deals 1 damage to target creature or player.'");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if(ability3.canPlay() && ability3.canPlayAI() && list.size() == 0) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
return 0 < card2.getCounters(Counters.LOYALTY)
|
||||
&& AllZone.getZone(card2).is(Constant.Zone.Play)
|
||||
&& turn[0] != AllZone.Phase.getTurn()
|
||||
&& AllZone.Phase.getActivePlayer().equals(card2.getController())
|
||||
&& !AllZone.Phase.getPhase().equals("End of Turn")
|
||||
&& (AllZone.Phase.getPhase().equals("Main1") || AllZone.Phase.getPhase().equals(
|
||||
"Main2")) && AllZone.Stack.size() == 0;
|
||||
}//canPlay()
|
||||
};//SpellAbility ability1
|
||||
|
||||
Input runtime = new Input() {
|
||||
private static final long serialVersionUID = -7823269301012427007L;
|
||||
|
||||
@Override
|
||||
public void showMessage() {
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card2.getController());
|
||||
|
||||
CardList lands = new CardList();
|
||||
lands.addAll(play.getCards());
|
||||
lands = lands.filter(new CardListFilter() {
|
||||
public boolean addCard(Card crd)
|
||||
{
|
||||
return crd.getType().contains("Mountain");
|
||||
}
|
||||
});
|
||||
|
||||
stopSetNext(CardFactoryUtil.input_targetSpecific(ability1, lands, "Select target Mountain",
|
||||
true, false));
|
||||
}//showMessage()
|
||||
};//Input
|
||||
|
||||
ability1.setBeforePayMana(runtime);
|
||||
|
||||
ability1.setDescription("+1: Untap target Mountain. It becomes a 4/4 red Elemental creature until end of turn. It's still a land.");
|
||||
//ability1.setStackDescription("");
|
||||
card2.addSpellAbility(ability1);
|
||||
|
||||
ability2.setDescription("-2: Add R to your mana pool for each Mountain you control.");
|
||||
ability2.setStackDescription("Koth of the Hammer - Add R to your mana pool for each Mountain you control.");
|
||||
card2.addSpellAbility(ability2);
|
||||
|
||||
ability3.setDescription("-5: You get an emblem with \"Mountains you control have 'tap: This land deals 1 damage to target creature or player.'\"");
|
||||
ability3.setStackDescription("Koth of the Hammer - You get an emblem with \"Mountains you control have <20>tap: This land deals 1 damage to target creature or player.'\"");
|
||||
card2.addSpellAbility(ability3);
|
||||
|
||||
card2.setSVars(card.getSVars());
|
||||
|
||||
return card2;
|
||||
}
|
||||
//*************** END ************ END **************************
|
||||
|
||||
return card;
|
||||
}
|
||||
|
||||
|
||||
@@ -10549,23 +10549,99 @@ public class GameActionUtil {
|
||||
}
|
||||
}
|
||||
}
|
||||
}// execute()
|
||||
};
|
||||
|
||||
/*PlayerZone[] zone = getZone("Elspeth, Knight-Errant");
|
||||
public static Command Koth_Emblem = new Command() {
|
||||
|
||||
for(int outer = 0; outer < zone.length; outer++) {
|
||||
CardList perms = new CardList(zone[outer].getCards());
|
||||
private static final long serialVersionUID = -3233715310427996429L;
|
||||
CardList gloriousAnthemList = new CardList();
|
||||
|
||||
public void execute()
|
||||
{
|
||||
CardList list = gloriousAnthemList;
|
||||
Card crd;
|
||||
// reset all cards in list - aka "old" cards
|
||||
for(int i = 0; i < list.size(); i++) {
|
||||
crd = list.get(i);
|
||||
SpellAbility[] sas = crd.getSpellAbility();
|
||||
for (int j=0;j<sas.length;j++)
|
||||
{
|
||||
if (sas[j].isKothThirdAbility())
|
||||
crd.removeSpellAbility(sas[j]);
|
||||
}
|
||||
}
|
||||
|
||||
CardList emblem = AllZoneUtil.getCardsInPlay();
|
||||
emblem = emblem.filter(new CardListFilter()
|
||||
{
|
||||
public boolean addCard(Card c)
|
||||
{
|
||||
return c.isEmblem() && c.getKeyword().contains("Mountains you control have 'tap: This land deals 1 damage to target creature or player.'");
|
||||
}
|
||||
});
|
||||
|
||||
for (int i = 0; i < emblem.size(); i++)
|
||||
{
|
||||
CardList mountains = AllZoneUtil.getPlayerCardsInPlay(emblem.get(i).getController());
|
||||
mountains = mountains.filter(new CardListFilter()
|
||||
{
|
||||
public boolean addCard(Card crd)
|
||||
{
|
||||
return crd.getType().contains("Mountain");
|
||||
}
|
||||
});
|
||||
|
||||
for(int j = 0; j < mountains.size(); j++) {
|
||||
final Card c = mountains.get(j);
|
||||
boolean hasAbility = false;
|
||||
SpellAbility[] sas = c.getSpellAbility();
|
||||
for (SpellAbility sa:sas)
|
||||
{
|
||||
if (sa.isKothThirdAbility())
|
||||
hasAbility = true;
|
||||
}
|
||||
|
||||
if(!hasAbility) {
|
||||
|
||||
final Ability_Tap ability = new Ability_Tap(c)
|
||||
{
|
||||
private static final long serialVersionUID = -7560349014757367722L;
|
||||
public void chooseTargetAI()
|
||||
{
|
||||
CardList list = CardFactoryUtil.AI_getHumanCreature(1, c, true);
|
||||
list.shuffle();
|
||||
|
||||
if(list.isEmpty() || AllZone.Human_Life.getLife() < 5)
|
||||
setTargetPlayer(Constant.Player.Human);
|
||||
else
|
||||
setTargetCard(list.get(0));
|
||||
}
|
||||
public void resolve()
|
||||
{
|
||||
if(getTargetCard() != null)
|
||||
{
|
||||
if(AllZone.GameAction.isCardInPlay(getTargetCard()) && CardFactoryUtil.canTarget(c, getTargetCard()) )
|
||||
AllZone.GameAction.addDamage(getTargetCard(), c, 1);
|
||||
//getTargetCard().addDamage(1);
|
||||
}
|
||||
else
|
||||
//AllZone.GameAction.getPlayerLife(getTargetPlayer()).subtractLife(1);
|
||||
AllZone.GameAction.addDamage(getTargetPlayer(), c, 1);
|
||||
}//resolve()
|
||||
};//SpellAbility
|
||||
ability.setKothThirdAbility(true);
|
||||
ability.setBeforePayMana(CardFactoryUtil.input_targetCreaturePlayer(ability, true, false));
|
||||
ability.setDescription("tap: This land deals 1 damage to target creature or player.");
|
||||
|
||||
c.addSpellAbility(ability);
|
||||
|
||||
for(int i = 0; i < perms.size(); i++) {
|
||||
c = perms.get(i);
|
||||
if(!c.getKeyword().contains(keyword)) {
|
||||
c.addExtrinsicKeyword(keyword);
|
||||
gloriousAnthemList.add(c);
|
||||
}
|
||||
}// for inner
|
||||
}// for outer
|
||||
*/
|
||||
}// execute()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
public static Command Akromas_Memorial = new Command() {
|
||||
@@ -20764,6 +20840,7 @@ public class GameActionUtil {
|
||||
|
||||
commands.put("Darksteel_Forge", Darksteel_Forge);
|
||||
commands.put("Elspeth_Emblem", Elspeth_Emblem);
|
||||
commands.put("Koth_Emblem", Koth_Emblem);
|
||||
commands.put("Akromas_Memorial", Akromas_Memorial);
|
||||
commands.put("Leyline_of_Singularity", Leyline_of_Singularity);
|
||||
commands.put("Goblin_Warchief", Goblin_Warchief);
|
||||
|
||||
@@ -34,6 +34,7 @@ public abstract class SpellAbility {
|
||||
private boolean xCost = false;
|
||||
private boolean kickerAbility = false;
|
||||
private boolean anyPlayer = false;
|
||||
private boolean kothThirdAbility = false;
|
||||
|
||||
private Input beforePayMana;
|
||||
private Input afterResolve;
|
||||
@@ -357,4 +358,12 @@ public abstract class SpellAbility {
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
|
||||
public void setKothThirdAbility(boolean kothThirdAbility) {
|
||||
this.kothThirdAbility = kothThirdAbility;
|
||||
}
|
||||
|
||||
public boolean isKothThirdAbility() {
|
||||
return kothThirdAbility;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user