- Added Natural Balance

This commit is contained in:
Sol
2013-03-09 03:41:30 +00:00
parent 8d8d30e066
commit ede42d710a
3 changed files with 24 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -7038,6 +7038,7 @@ res/cardsfolder/n/nath_of_the_gilt_leaf.txt svneol=native#text/plain
res/cardsfolder/n/naths_buffoon.txt svneol=native#text/plain res/cardsfolder/n/naths_buffoon.txt svneol=native#text/plain
res/cardsfolder/n/naths_elite.txt svneol=native#text/plain res/cardsfolder/n/naths_elite.txt svneol=native#text/plain
res/cardsfolder/n/natural_affinity.txt svneol=native#text/plain res/cardsfolder/n/natural_affinity.txt svneol=native#text/plain
res/cardsfolder/n/natural_balance.txt -text
res/cardsfolder/n/natural_emergence.txt -text svneol=unset#text/plain res/cardsfolder/n/natural_emergence.txt -text svneol=unset#text/plain
res/cardsfolder/n/natural_end.txt -text res/cardsfolder/n/natural_end.txt -text
res/cardsfolder/n/natural_order.txt svneol=native#text/plain res/cardsfolder/n/natural_order.txt svneol=native#text/plain

View File

@@ -0,0 +1,12 @@
Name:Natural Balance
ManaCost:2 G G
Types:Sorcery
A:SP$ RepeatEach | Cost$ 2 G G | RepeatPlayers$ Player | RepeatSubAbility$ BalanceLands | AILogic$ BalanceLands | SpellDescription$ Each player who controls six or more lands chooses five lands he or she controls and sacrifices the rest. Each player who controls four or fewer lands may search his or her library for up to X basic land cards and put them onto the battlefield, where X is five minus the number of lands he or she controls. Then each player who searched his or her library this way shuffles it.
SVar:BalanceLands:DB$ Sacrifice | SacValid$ Land | Amount$ SacX | Defined$ Remembered | ConditionCheckSVar$ SacX | ConditionSVarCompare$ GT0 | SubAbility$ FetchLands
SVar:FetchLands:DB$ ChangeZone | Origin$ Library | Destination$ Battlefield | ChangeType$ Land.Basic | ChangeNum$ FetchX | DefinedPlayer$ Remembered | ConditionCheckSVar$ FetchX | ConditionSVarCompare$ GT0
SVar:LandsControlled:Count$Valid Land.RememberedPlayerCtrl
SVar:SacX:SVar$LandsControlled/Minus.5
SVar:FetchX:Number$5/Minus.LandsControlled
SVar:Picture:http://www.wizards.com/global/images/magic/general/natural_balance.jpg
SetInfo:MIR Rare
Oracle:Each player who controls six or more lands chooses five lands he or she controls and sacrifices the rest. Each player who controls four or fewer lands may search his or her library for up to X basic land cards and put them onto the battlefield, where X is five minus the number of lands he or she controls. Then each player who searched his or her library this way shuffles it.

View File

@@ -86,6 +86,17 @@ public class RepeatEachAi extends SpellAbilityAi {
} }
tgt.addTarget(list.get(0)); tgt.addTarget(list.get(0));
} else if ("BalanceLands".equals(logic)) {
if (CardLists.filter(aiPlayer.getCardsIn(ZoneType.Battlefield), Presets.LANDS).size() >= 5) {
return false;
}
List<Player> opponents = aiPlayer.getOpponents();
for(Player opp : opponents) {
if (CardLists.filter(opp.getCardsIn(ZoneType.Battlefield), Presets.LANDS).size() < 4) {
return false;
}
}
} }
// TODO Add some normal AI variability here // TODO Add some normal AI variability here