- Added the parameter "AtRandom" to AF ChangeZone Hidden.

- Added Ghoulraiser.
This commit is contained in:
Sloth
2011-09-23 10:40:40 +00:00
parent 21af8ad1b5
commit 65d519c59b
4 changed files with 28 additions and 14 deletions

1
.gitattributes vendored
View File

@@ -3042,6 +3042,7 @@ res/cardsfolder/g/ghosts_of_the_damned.txt svneol=native#text/plain
res/cardsfolder/g/ghostway.txt svneol=native#text/plain res/cardsfolder/g/ghostway.txt svneol=native#text/plain
res/cardsfolder/g/ghoulcallers_bell.txt -text res/cardsfolder/g/ghoulcallers_bell.txt -text
res/cardsfolder/g/ghoulcallers_chant.txt -text res/cardsfolder/g/ghoulcallers_chant.txt -text
res/cardsfolder/g/ghoulraiser.txt -text
res/cardsfolder/g/ghouls_feast.txt svneol=native#text/plain res/cardsfolder/g/ghouls_feast.txt svneol=native#text/plain
res/cardsfolder/g/giant_badger.txt svneol=native#text/plain res/cardsfolder/g/giant_badger.txt svneol=native#text/plain
res/cardsfolder/g/giant_caterpillar.txt svneol=native#text/plain res/cardsfolder/g/giant_caterpillar.txt svneol=native#text/plain

View File

@@ -0,0 +1,11 @@
Name:Ghoulraiser
ManaCost:1 B B
Types:Creature Zombie
Text:no text
PT:2/2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME enters the battlefield, return a Zombie card at random from your graveyard to your hand.
SVar:TrigChangeZone:AB$ChangeZone | ChangeType$ Zombie.YouCtrl | Cost$ 0 | Origin$ Graveyard | Destination$ Hand | Hidden$ True | AtRandom$ True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/ghoulraiser.jpg
SetInfo:ISD|Common|http://magiccards.info/scans/en/isd/102.jpg
End

View File

@@ -5,6 +5,7 @@ import forge.AllZoneUtil;
import forge.Card; import forge.Card;
import forge.CardList; import forge.CardList;
import forge.CardListUtil; import forge.CardListUtil;
import forge.CardUtil;
import forge.CombatUtil; import forge.CombatUtil;
import forge.ComputerUtil; import forge.ComputerUtil;
import forge.Constant; import forge.Constant;
@@ -322,9 +323,6 @@ public final class AbilityFactory_ChangeZone {
Random r = MyRandom.random; Random r = MyRandom.random;
// prevent run-away activations - first time will always return true // prevent run-away activations - first time will always return true
boolean chance = r.nextFloat() <= Math.pow(.6667, sa.getActivationsThisTurn()); boolean chance = r.nextFloat() <= Math.pow(.6667, sa.getActivationsThisTurn());
ArrayList<Player> pDefined; ArrayList<Player> pDefined;
@@ -682,7 +680,9 @@ public final class AbilityFactory_ChangeZone {
} }
Object o; Object o;
if (params.containsKey("Mandatory")) { if(params.containsKey("AtRandom")) {
o = CardUtil.getRandom(fetchList.toArray());
} else if (params.containsKey("Mandatory")) {
o = GuiUtils.getChoice("Select a card", fetchList.toArray()); o = GuiUtils.getChoice("Select a card", fetchList.toArray());
} else { } else {
o = GuiUtils.getChoiceOptional("Select a card", fetchList.toArray()); o = GuiUtils.getChoiceOptional("Select a card", fetchList.toArray());
@@ -792,7 +792,9 @@ public final class AbilityFactory_ChangeZone {
// Improve the AI for fetching. // Improve the AI for fetching.
Card c; Card c;
if (type.contains("Basic")) { if(params.containsKey("AtRandom")) {
c = CardUtil.getRandom(fetchList.toArray());
} else if (type.contains("Basic")) {
c = basicManaFixing(fetchList); c = basicManaFixing(fetchList);
} else if (areAllBasics(type)) { } else if (areAllBasics(type)) {
c = basicManaFixing(fetchList, type); c = basicManaFixing(fetchList, type);