- Added Trade Secrets

This commit is contained in:
swordshine
2014-03-08 01:19:05 +00:00
parent 00698b1351
commit c33a0295cc
4 changed files with 25 additions and 1 deletions

1
.gitattributes vendored
View File

@@ -12846,6 +12846,7 @@ forge-gui/res/cardsfolder/t/tracker.txt svneol=native#text/plain
forge-gui/res/cardsfolder/t/trackers_instincts.txt -text forge-gui/res/cardsfolder/t/trackers_instincts.txt -text
forge-gui/res/cardsfolder/t/trade_caravan.txt svneol=native#text/plain forge-gui/res/cardsfolder/t/trade_caravan.txt svneol=native#text/plain
forge-gui/res/cardsfolder/t/trade_routes.txt svneol=native#text/plain forge-gui/res/cardsfolder/t/trade_routes.txt svneol=native#text/plain
forge-gui/res/cardsfolder/t/trade_secrets.txt -text
forge-gui/res/cardsfolder/t/tradewind_rider.txt svneol=native#text/plain forge-gui/res/cardsfolder/t/tradewind_rider.txt svneol=native#text/plain
forge-gui/res/cardsfolder/t/tradewind_rider_avatar.txt -text forge-gui/res/cardsfolder/t/tradewind_rider_avatar.txt -text
forge-gui/res/cardsfolder/t/trading_post.txt -text forge-gui/res/cardsfolder/t/trading_post.txt -text

View File

@@ -1298,6 +1298,17 @@ public class AiController {
int cardsInPlay = player.getCardsIn(ZoneType.Battlefield).size(); int cardsInPlay = player.getCardsIn(ZoneType.Battlefield).size();
return Math.min(chosenMax, cardsInPlay); return Math.min(chosenMax, cardsInPlay);
} }
else if ("OptionalDraw".equals(logic)) {
int cardsInHand = player.getCardsIn(ZoneType.Hand).size();
int maxDraw = Math.min(player.getMaxHandSize() + 2 - cardsInHand, max);
int maxCheckLib = Math.min(maxDraw, player.getCardsIn(ZoneType.Library).size());
return Math.max(min, maxCheckLib);
}
else if ("RepeatDraw".equals(logic)) {
int remaining = player.getMaxHandSize() - player.getCardsIn(ZoneType.Hand).size()
+ MyRandom.getRandom().nextInt(3);
return Math.max(remaining, min) / 2;
}
return max; return max;
} }

View File

@@ -53,7 +53,7 @@ public class DrawEffect extends SpellAbilityEffect {
int actualNum = numCards; int actualNum = numCards;
if (upto) { if (upto) {
actualNum = p.getController().chooseNumber(sa, "Choose a number", 0, numCards); actualNum = p.getController().chooseNumber(sa, "How may cards do you want to draw?", 0, numCards);
} }
final List<Card> drawn = p.drawCards(actualNum); final List<Card> drawn = p.drawCards(actualNum);

View File

@@ -0,0 +1,12 @@
Name:Trade Secrets
ManaCost:1 U U
Types:Sorcery
A:SP$ Draw | Cost$ 1 U U | ValidTgts$ Opponent | NumCards$ 2 | SubAbility$ DBDraw | StackDescription$ SpellDescription | SpellDescription$ Target opponent draws two cards, then you draw up to four cards. That opponent may repeat this process as many times as he or she chooses.
SVar:DBDraw:DB$ Draw | NumCards$ 4 | Upto$ True | Defined$ You | AILogic$ OptionalDraw | SubAbility$ DBChooseNumber | StackDescription$ None
SVar:DBChooseNumber:DB$ ChooseNumber | Defined$ Targeted | ListTitle$ How many times do you want repeat this process? | AILogic$ RepeatDraw | SubAbility$ DBRepeat | StackDescription$ None
SVar:DBRepeat:DB$ Repeat | MaxRepeat$ X | References$ X | RepeatSubAbility$ DBRepeatDraw | StackDescription$ None
SVar:DBRepeatDraw:DB$ Draw | Defined$ Targeted | NumCards$ 2 | SubAbility$ DBSubDraw
SVar:DBSubDraw:DB$ Draw | Defined$ You | NumCards$ 4 | Upto$ True | AILogic$ OptionalDraw
SVar:X:Count$ChosenNumber
SVar:Picture:http://www.wizards.com/global/images/magic/general/trade_secrets.jpg
Oracle:Target opponent draws two cards, then you draw up to four cards. That opponent may repeat this process as many times as he or she chooses.