mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Added the parameter "AtRandom" to AF ChangeZone Hidden.
- Added Ghoulraiser.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -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
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
Name:Curse of the Nightly Haunt
|
Name:Curse of the Nightly Haunt
|
||||||
ManaCost:2 R
|
ManaCost:2 R
|
||||||
Types:Enchantment Aura Curse
|
Types:Enchantment Aura Curse
|
||||||
Text:Enchant player
|
Text:Enchant player
|
||||||
A:SP$ Attach | Cost$ 2 R | ValidTgts$ Player | AILogic$ Curse
|
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.
|
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:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_the_nightly_haunt.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_the_nightly_haunt.jpg
|
||||||
End
|
End
|
||||||
11
res/cardsfolder/g/ghoulraiser.txt
Normal file
11
res/cardsfolder/g/ghoulraiser.txt
Normal 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
|
||||||
@@ -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());
|
||||||
@@ -789,10 +789,12 @@ public final class AbilityFactory_ChangeZone {
|
|||||||
if (fetchList.size() == 0 || destination == null) {
|
if (fetchList.size() == 0 || destination == null) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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);
|
||||||
|
|||||||
Reference in New Issue
Block a user