diff --git a/.gitattributes b/.gitattributes index d20e0340ec8..f2b0f580cb3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4353,6 +4353,7 @@ res/cardsfolder/orcish_artillery.txt -text svneol=native#text/plain res/cardsfolder/orcish_bloodpainter.txt -text svneol=native#text/plain res/cardsfolder/orcish_cannonade.txt -text svneol=native#text/plain res/cardsfolder/orcish_cannoneers.txt -text svneol=native#text/plain +res/cardsfolder/orcish_captain.txt -text svneol=native#text/plain res/cardsfolder/orcish_healer.txt -text svneol=native#text/plain res/cardsfolder/orcish_lumberjack.txt svneol=native#text/plain res/cardsfolder/orcish_mechanics.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/orcish_captain.txt b/res/cardsfolder/orcish_captain.txt new file mode 100644 index 00000000000..d15a203a80b --- /dev/null +++ b/res/cardsfolder/orcish_captain.txt @@ -0,0 +1,9 @@ +Name:Orcish Captain +ManaCost:R +Types:Creature Orc Warrior +Text:no text +PT:1/1 +SVar:RemAIDeck:True +SVar:Rarity:Uncommon +SVar:Picture:http://www.wizards.com/global/images/magic/general/orcish_captain.jpg +End \ No newline at end of file diff --git a/src/forge/CardFactory_Creatures.java b/src/forge/CardFactory_Creatures.java index eeaea11617d..47843b9be5f 100644 --- a/src/forge/CardFactory_Creatures.java +++ b/src/forge/CardFactory_Creatures.java @@ -6757,6 +6757,56 @@ public class CardFactory_Creatures { sb.append(cardName).append(" put a -1/-1 counter on target creature."); ability.setStackDescription(sb.toString()); }//*************** END ************ END ************************** + + + //*************** START *********** START ************************** + else if (cardName.equals("Orcish Captain")) { + Ability_Cost abCost = new Ability_Cost("1", cardName, true); + Target target = new Target(card, "Select target Orc creature", "Creature.Orc".split(",")); + final Ability_Activated ability = new Ability_Activated(card, abCost, target) { + private static final long serialVersionUID = 6724781940648179318L; + + @Override + public boolean canPlayAI() { + return false; + } + + @Override + public void resolve() { + final Card tgt = getTargetCard(); + final boolean[] win = new boolean[1]; + if (AllZone.GameAction.isCardInPlay(tgt) && CardFactoryUtil.canTarget(card, tgt)) { + if(GameActionUtil.flipACoin(card.getController(), card)) { + tgt.addTempAttackBoost(2); + win[0] = true; + } + else { + tgt.addTempDefenseBoost(-2); + win[0] = false; + } + + final Command EOT = new Command() { + private static final long serialVersionUID = -7905540871887278236L; + + public void execute() { + if (AllZone.GameAction.isCardInPlay(tgt)) { + if(win[0]) { + tgt.addTempAttackBoost(-2); + } + else { + tgt.addTempDefenseBoost(2); + } + } + } + }; + AllZone.EndOfTurn.addUntil(EOT); + + }//if (card is in play) + }//resolve() + };//SpellAbility + card.addSpellAbility(ability); + ability.setDescription(abCost+"Flip a coin. If you win the flip, target Orc creature gets +2/+0 until end of turn. If you lose the flip, it gets -0/-2 until end of turn."); + }//*************** END ************ END ************************** else if(cardName.equals("Awakener Druid")) {