- Added Eager Construct

This commit is contained in:
Sol
2016-09-22 13:59:49 +00:00
parent c57d2d00d8
commit c9260215c3
6 changed files with 22 additions and 2 deletions

1
.gitattributes vendored
View File

@@ -16276,6 +16276,7 @@ forge-gui/res/cardsfolder/upcoming/dukhara_peafowl.txt -text
forge-gui/res/cardsfolder/upcoming/dukhara_scavenger.txt -text
forge-gui/res/cardsfolder/upcoming/durable_handicraft.txt -text
forge-gui/res/cardsfolder/upcoming/dynavolt_tower.txt -text
forge-gui/res/cardsfolder/upcoming/eager_construct.txt -text
forge-gui/res/cardsfolder/upcoming/eddytrail_hawk.txt -text
forge-gui/res/cardsfolder/upcoming/electrostatic_pummeler.txt -text
forge-gui/res/cardsfolder/upcoming/elegant_edgecrafters.txt -text

View File

@@ -2,6 +2,7 @@ package forge.ai.ability;
import forge.ai.SpellAbilityAi;
import forge.game.player.Player;
import forge.game.player.PlayerActionConfirmMode;
import forge.game.spellability.SpellAbility;
import forge.game.spellability.TargetRestrictions;
import forge.util.MyRandom;
@@ -53,4 +54,8 @@ public class ScryAi extends SpellAbilityAi {
return randomReturn;
}
@Override
public boolean confirmAction(Player player, SpellAbility sa, PlayerActionConfirmMode mode, String message) {
return true;
}
}

View File

@@ -34,11 +34,17 @@ public class ScryEffect extends SpellAbilityEffect {
num = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("ScryNum"), sa);
}
boolean isOptional = sa.hasParam("Optional");
final TargetRestrictions tgt = sa.getTargetRestrictions();
final List<Player> tgtPlayers = getTargetPlayers(sa);
for (final Player p : tgtPlayers) {
if ((tgt == null) || p.canBeTargetedBy(sa)) {
if (isOptional && !p.getController().confirmAction(sa, null, "Do you want to scry?")) {
continue;
}
p.scry(num);
}
}

View File

@@ -4,7 +4,7 @@ Types:Artifact Creature Construct
PT:4/5
K:Vigilance
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigCataclysm | TriggerDescription$ When CARDNAME enters the battlefield, each player chooses an artifact, a creature, an enchantment, and a planeswalker from among the nonland permanents he or she controls, then sacrifices the rest.
SVar:TrigCataclysm:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ ChooseArtf | SubAbility$ SacAllOthers | SpellDescription$ Each player chooses from among the permanents he or she controls an artifact, a creature, an enchantment, and a land, then sacrifices the rest.
SVar:TrigCataclysm:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ ChooseArtf | SubAbility$ SacAllOthers
SVar:ChooseArtf:DB$ ChooseCard | Defined$ Remembered | Amount$ 1 | Choices$ Artifact.nonLand+RememberedPlayerCtrl | ChoiceTitle$ Choose an artifact to keep | SubAbility$ ChooseCrtr | RememberChosen$ True | Mandatory$ True
SVar:ChooseCrtr:DB$ ChooseCard | Defined$ Remembered | Amount$ 1 | Choices$ Creature.nonLand+RememberedPlayerCtrl | ChoiceTitle$ Choose a creature to keep | SubAbility$ ChooseEnch | RememberChosen$ True | Mandatory$ True
SVar:ChooseEnch:DB$ ChooseCard | Defined$ Remembered | Amount$ 1 | Choices$ Enchantment.nonLand+RememberedPlayerCtrl | ChoiceTitle$ Choose an enchantment to keep | SubAbility$ ChoosePW | RememberChosen$ True | Mandatory$ True

View File

@@ -0,0 +1,8 @@
Name:Eager Construct
ManaCost:2
Types:Artifact Creature Construct
PT:2/2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ DBScry | TriggerDescription$ When CARDNAME enters the battlefield, each player may scry 1. (To scry 1, look at the top card of your library, then you may put that card on the bottom of your library.)
SVar:DBScry:DB$ Scry | ScryNum$ 1 | Defined$ Player | Optional$ True
SVar:Picture:http://www.wizards.com/global/images/magic/general/eager_construct.jpg
Oracle:When Eager Construct enters the battlefield, each player may scry 1. (To scry 1, look at the top card of your library, then you may put that card on the bottom of your library.)

View File

@@ -82,7 +82,7 @@ def initializeOracleText():
return oracleDict
def normalizeOracle(oracle):
return oracle.replace(u'\u2014', '-').replace(u'\u2018', "'").replace(u'\u201c', '"').replace(u'\u201d', '"').replace(u'\u2022', '-').replace(u'\xc6', 'AE').replace(u'\xf6', 'o')
return oracle.replace(u'\u2014', '-').replace(u'\u2212', '-').replace(u'\u2018', "'").replace(u'\u201c', '"').replace(u'\u201d', '"').replace(u'\u2022', '-').replace(u'\xc6', 'AE').replace(u'\xf6', 'o')
def initializeForgeCards():