- Added Arena, Echo Chamber, and Magus of the Arena

This commit is contained in:
swordshine
2014-03-11 00:21:27 +00:00
parent 09f7632ad2
commit 54ba797151
6 changed files with 58 additions and 8 deletions

3
.gitattributes vendored
View File

@@ -1127,6 +1127,7 @@ forge-gui/res/cardsfolder/a/ardent_militia.txt svneol=native#text/plain
forge-gui/res/cardsfolder/a/ardent_plea.txt svneol=native#text/plain
forge-gui/res/cardsfolder/a/ardent_recruit.txt svneol=native#text/plain
forge-gui/res/cardsfolder/a/ardent_soldier.txt svneol=native#text/plain
forge-gui/res/cardsfolder/a/arena.txt -text
forge-gui/res/cardsfolder/a/arena_athlete.txt -text
forge-gui/res/cardsfolder/a/arena_of_the_ancients.txt svneol=native#text/plain
forge-gui/res/cardsfolder/a/arensons_aura.txt svneol=native#text/plain
@@ -3921,6 +3922,7 @@ forge-gui/res/cardsfolder/e/ebony_horse.txt svneol=native#text/plain
forge-gui/res/cardsfolder/e/ebony_owl_netsuke.txt svneol=native#text/plain
forge-gui/res/cardsfolder/e/ebony_rhino.txt svneol=native#text/plain
forge-gui/res/cardsfolder/e/ebony_treefolk.txt svneol=native#text/plain
forge-gui/res/cardsfolder/e/echo_chamber.txt -text
forge-gui/res/cardsfolder/e/echo_circlet.txt -text
forge-gui/res/cardsfolder/e/echo_mage.txt svneol=native#text/plain
forge-gui/res/cardsfolder/e/echo_tracer.txt svneol=native#text/plain
@@ -7493,6 +7495,7 @@ forge-gui/res/cardsfolder/m/magnigoth_treefolk.txt svneol=native#text/plain
forge-gui/res/cardsfolder/m/magnivore.txt svneol=native#text/plain
forge-gui/res/cardsfolder/m/magosi_the_waterveil.txt svneol=native#text/plain
forge-gui/res/cardsfolder/m/magus_of_the_abyss.txt svneol=native#text/plain
forge-gui/res/cardsfolder/m/magus_of_the_arena.txt -text
forge-gui/res/cardsfolder/m/magus_of_the_bazaar.txt svneol=native#text/plain
forge-gui/res/cardsfolder/m/magus_of_the_candelabra.txt svneol=native#text/plain
forge-gui/res/cardsfolder/m/magus_of_the_coffers.txt svneol=native#text/plain

View File

@@ -1,6 +1,8 @@
package forge.ai.ability;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import forge.ai.ComputerUtil;
import forge.ai.ComputerUtilCard;
import forge.ai.SpellAbilityAi;
@@ -15,6 +17,7 @@ import forge.game.spellability.SpellAbility;
import forge.game.spellability.TargetRestrictions;
import forge.game.zone.ZoneType;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
@@ -35,10 +38,17 @@ public class CopyPermanentAi extends SpellAbilityAi {
if (sa.hasParam("AtEOT") && !aiPlayer.getGame().getPhaseHandler().is(PhaseType.MAIN1)) {
return false;
} else {
if (sa.getTargetRestrictions() != null && sa.hasParam("TargetingPlayer")) {
sa.resetTargets();
Player targetingPlayer = AbilityUtils.getDefinedPlayers(sa.getHostCard(), sa.getParam("TargetingPlayer"), sa).get(0);
sa.setTargetingPlayer(targetingPlayer);
return targetingPlayer.getController().chooseTargetsFor(sa);
} else {
return this.doTriggerAINoCost(aiPlayer, sa, false);
}
}
}
@Override
protected boolean doTriggerAINoCost(final Player aiPlayer, SpellAbility sa, boolean mandatory) {
@@ -51,11 +61,6 @@ public class CopyPermanentAi extends SpellAbilityAi {
if (abTgt != null) {
sa.resetTargets();
if (sa.hasParam("TargetingPlayer")) {
Player targetingPlayer = AbilityUtils.getDefinedPlayers(source, sa.getParam("TargetingPlayer"), sa).get(0);
sa.setTargetingPlayer(targetingPlayer);
return targetingPlayer.getController().chooseTargetsFor(sa);
}
List<Card> list = aiPlayer.getGame().getCardsIn(ZoneType.Battlefield);
list = CardLists.getValidCards(list, abTgt.getValidTgts(), source.getController(), source);
list = CardLists.getTargetableCards(list, sa);
@@ -87,7 +92,11 @@ public class CopyPermanentAi extends SpellAbilityAi {
});
Card choice;
if (!CardLists.filter(list, Presets.CREATURES).isEmpty()) {
if (sa.hasParam("TargetingPlayer")) {
choice = ComputerUtilCard.getWorstCreatureAI(list);
} else {
choice = ComputerUtilCard.getBestCreatureAI(list);
}
} else {
choice = ComputerUtilCard.getMostExpensivePermanentAI(list, sa, true);
}
@@ -130,4 +139,14 @@ public class CopyPermanentAi extends SpellAbilityAi {
return ComputerUtilCard.getBestAI(options);
}
@Override
protected Player chooseSinglePlayer(Player ai, SpellAbility sa, Collection<Player> options) {
final List<Card> cards = new ArrayList<Card>();
for (Player p : options) {
cards.addAll(p.getCreaturesInPlay());
}
Card chosen = ComputerUtilCard.getBestCreatureAI(cards);
return chosen != null ? chosen.getController() : Iterables.getFirst(options, null);
}
}

View File

@@ -17,6 +17,7 @@ public class TapEffect extends SpellAbilityEffect {
public void resolve(SpellAbility sa) {
final Card card = sa.getHostCard();
final boolean remTapped = sa.hasParam("RememberTapped");
final boolean alwaysRem = sa.hasParam("AlwaysRemember");
if (remTapped) {
card.clearRemembered();
}
@@ -29,7 +30,7 @@ public class TapEffect extends SpellAbilityEffect {
continue;
}
if (tgtC.isInPlay()) {
if (tgtC.isUntapped() && remTapped) {
if (tgtC.isUntapped() && remTapped || alwaysRem) {
card.addRemembered(tgtC);
}
tgtC.tap();

View File

@@ -0,0 +1,10 @@
Name:Arena
ManaCost:no cost
Types:Land
A:AB$ Tap | Cost$ 3 T | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | SubAbility$ DBTap | AlwaysRemember$ True | SpellDescription$ Tap target creature you control and target creature of an opponent's choice he or she controls. Those creatures fight each other. (Each deals damage equal to its power to the other.)
SVar:DBTap:DB$ Tap | TargetingPlayer$ Player.Opponent | TargetingPlayerControls$ True | ValidTgts$ Creature | TgtPrompt$ Select target creature you control | SubAbility$ DBFight | AlwaysRemember$ True
SVar:DBFight:DB$ Fight | Defined$ Remembered | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/arena.jpg
Oracle:{3}, {T}: Tap target creature you control and target creature of an opponent's choice he or she controls. Those creatures fight each other. (Each deals damage equal to its power to the other.)

View File

@@ -0,0 +1,6 @@
Name:Echo Chamber
ManaCost:4
Types:Artifact
A:AB$ CopyPermanent | Cost$ 4 T | ValidTgts$ Creature | TargetingPlayer$ Player.Opponent | TargetingPlayerControls$ True | TgtPrompt$ Select target creature you control | Keywords$ Haste | AtEOT$ Exile | SorcerySpeed$ True | SpellDescription$ An opponent chooses target creature he or she controls. Put a token that's a copy of that creature onto the battlefield. That token gains haste until end of turn. Exile the token at the beginning of the next end step. Activate this ability only any time you could cast a sorcery.
SVar:Picture:http://www.wizards.com/global/images/magic/general/echo_chamber.jpg
Oracle:{4}, {T}: An opponent chooses target creature he or she controls. Put a token that's a copy of that creature onto the battlefield. That token gains haste until end of turn. Exile the token at the beginning of the next end step. Activate this ability only any time you could cast a sorcery.

View File

@@ -0,0 +1,11 @@
Name:Magus of the Arena
ManaCost:4 R R
Types:Creature Human Wizard
PT:5/5
A:AB$ Tap | Cost$ 3 T | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | SubAbility$ DBTap | AlwaysRemember$ True | SpellDescription$ Tap target creature you control and target creature of an opponent's choice he or she controls. Those creatures fight each other. (Each deals damage equal to its power to the other.)
SVar:DBTap:DB$ Tap | TargetingPlayer$ Player.Opponent | TargetingPlayerControls$ True | ValidTgts$ Creature | TgtPrompt$ Select target creature you control | SubAbility$ DBFight | AlwaysRemember$ True
SVar:DBFight:DB$ Fight | Defined$ Remembered | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/magus_of_the_arena.jpg
Oracle:{3}, {T}: Tap target creature you control and target creature of an opponent's choice he or she controls. Those creatures fight each other. (Each deals damage equal to its power to the other.)