diff --git a/.gitattributes b/.gitattributes index 952b869540f..8ff92f5d472 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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/ghoulcallers_bell.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/giant_badger.txt svneol=native#text/plain res/cardsfolder/g/giant_caterpillar.txt svneol=native#text/plain diff --git a/res/cardsfolder/c/curse_of_the_nightly_haunt.txt b/res/cardsfolder/c/curse_of_the_nightly_haunt.txt index b87c8a36580..cd7404d4465 100644 --- a/res/cardsfolder/c/curse_of_the_nightly_haunt.txt +++ b/res/cardsfolder/c/curse_of_the_nightly_haunt.txt @@ -1,9 +1,9 @@ -Name:Curse of the Nightly Haunt -ManaCost:2 R -Types:Enchantment Aura Curse -Text:Enchant player -A:SP$ Attach | Cost$ 2 R | ValidTgts$ Player | AILogic$ Curse -S:Mode$ Continuous | Affected$ Creature.EnchantedPlayerCtrl | AddHiddenKeyword$ HIDDEN CARDNAME attacks each turn if able. | Description$ Creatures enchanted player controls attack each turn if able. -SVar:Rarity:Uncommon -SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_the_nightly_haunt.jpg +Name:Curse of the Nightly Haunt +ManaCost:2 R +Types:Enchantment Aura Curse +Text:Enchant player +A:SP$ Attach | Cost$ 2 R | ValidTgts$ Player | AILogic$ Curse +S:Mode$ Continuous | Affected$ Creature.EnchantedPlayerCtrl | AddHiddenKeyword$ HIDDEN CARDNAME attacks each turn if able. | Description$ Creatures enchanted player controls attack each turn if able. +SVar:Rarity:Uncommon +SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_the_nightly_haunt.jpg End \ No newline at end of file diff --git a/res/cardsfolder/g/ghoulraiser.txt b/res/cardsfolder/g/ghoulraiser.txt new file mode 100644 index 00000000000..1ce07de060f --- /dev/null +++ b/res/cardsfolder/g/ghoulraiser.txt @@ -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 \ No newline at end of file diff --git a/src/main/java/forge/card/abilityFactory/AbilityFactory_ChangeZone.java b/src/main/java/forge/card/abilityFactory/AbilityFactory_ChangeZone.java index 9b66d978f3f..2a38b5ff30a 100644 --- a/src/main/java/forge/card/abilityFactory/AbilityFactory_ChangeZone.java +++ b/src/main/java/forge/card/abilityFactory/AbilityFactory_ChangeZone.java @@ -5,6 +5,7 @@ import forge.AllZoneUtil; import forge.Card; import forge.CardList; import forge.CardListUtil; +import forge.CardUtil; import forge.CombatUtil; import forge.ComputerUtil; import forge.Constant; @@ -322,9 +323,6 @@ public final class AbilityFactory_ChangeZone { Random r = MyRandom.random; // prevent run-away activations - first time will always return true - - - boolean chance = r.nextFloat() <= Math.pow(.6667, sa.getActivationsThisTurn()); ArrayList pDefined; @@ -682,7 +680,9 @@ public final class AbilityFactory_ChangeZone { } 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()); } else { o = GuiUtils.getChoiceOptional("Select a card", fetchList.toArray()); @@ -789,10 +789,12 @@ public final class AbilityFactory_ChangeZone { if (fetchList.size() == 0 || destination == null) { break; } - + // Improve the AI for fetching. Card c; - if (type.contains("Basic")) { + if(params.containsKey("AtRandom")) { + c = CardUtil.getRandom(fetchList.toArray()); + } else if (type.contains("Basic")) { c = basicManaFixing(fetchList); } else if (areAllBasics(type)) { c = basicManaFixing(fetchList, type);