mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Added Master of the Wild Hunt Avatar
- added AtRandom param to GenericChoice AF
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -6415,6 +6415,7 @@ res/cardsfolder/m/master_of_etherium.txt svneol=native#text/plain
|
|||||||
res/cardsfolder/m/master_of_the_pearl_trident.txt -text
|
res/cardsfolder/m/master_of_the_pearl_trident.txt -text
|
||||||
res/cardsfolder/m/master_of_the_veil.txt -text
|
res/cardsfolder/m/master_of_the_veil.txt -text
|
||||||
res/cardsfolder/m/master_of_the_wild_hunt.txt svneol=native#text/plain
|
res/cardsfolder/m/master_of_the_wild_hunt.txt svneol=native#text/plain
|
||||||
|
res/cardsfolder/m/master_of_the_wild_hunt_avatar.txt -text
|
||||||
res/cardsfolder/m/master_splicer.txt svneol=native#text/plain
|
res/cardsfolder/m/master_splicer.txt svneol=native#text/plain
|
||||||
res/cardsfolder/m/master_thief.txt svneol=native#text/plain
|
res/cardsfolder/m/master_thief.txt svneol=native#text/plain
|
||||||
res/cardsfolder/m/master_transmuter.txt svneol=native#text/plain
|
res/cardsfolder/m/master_transmuter.txt svneol=native#text/plain
|
||||||
|
|||||||
12
res/cardsfolder/m/master_of_the_wild_hunt_avatar.txt
Normal file
12
res/cardsfolder/m/master_of_the_wild_hunt_avatar.txt
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Name:Master of the Wild Hunt Avatar
|
||||||
|
ManaCost:no cost
|
||||||
|
Types:Vanguard
|
||||||
|
Text:no text
|
||||||
|
HandLifeModifier:+1/+3
|
||||||
|
A:AB$ GenericChoice | Cost$ 2 G | Choices$ Wolf,Antelope,Cat,Rhino | ActivationZone$ Command | AtRandom$ True | StackDescription$ SpellDescription | SpellDescription$ Put a green creature token onto the battlefield that's a 2/2 Wolf, a 2/3 Antelope with forestwalk, a 3/2 Cat with shroud, or a 4/4 Rhino with trample, chosen at random.
|
||||||
|
SVar:Wolf:DB$ Token | TokenAmount$ 1 | TokenName$ Wolf | TokenTypes$ Creature,Wolf | TokenOwner$ You | TokenColors$ Green | TokenPower$ 2 | TokenToughness$ 2 | ChoiceDescription$ Wolf
|
||||||
|
SVar:Antelope:DB$ Token | TokenAmount$ 1 | TokenName$ Antelope | TokenTypes$ Creature,Antelope | TokenOwner$ You | TokenColors$ Green | TokenPower$ 2 | TokenToughness$ 3 | TokenKeywords$ Forestwalk | ChoiceDescription$ Antelope
|
||||||
|
SVar:Cat:DB$ Token | TokenAmount$ 1 | TokenName$ Cat | TokenTypes$ Creature,Cat | TokenOwner$ You | TokenColors$ Green | TokenPower$ 3 | TokenToughness$ 2 | TokenKeywords$ Shroud | ChoiceDescription$ Cat
|
||||||
|
SVar:Rhino:DB$ Token | TokenAmount$ 1 | TokenName$ Rhino | TokenTypes$ Creature,Rhino | TokenOwner$ You | TokenColors$ Green | TokenPower$ 4 | TokenToughness$ 4 | TokenKeywords$ Trample | ChoiceDescription$ Rhino
|
||||||
|
SVar:Picture:http://www.cardforge.org/fpics/vgd-lq/master_of_the_wild_hunt_avatar.jpg
|
||||||
|
SetInfo:VAN|Special|http://magiccards.info/extras/other/vanguard-mtgo-2/master-of-the-wild-hunt.jpg
|
||||||
@@ -15,6 +15,7 @@ import forge.card.spellability.SpellAbility;
|
|||||||
import forge.card.spellability.Target;
|
import forge.card.spellability.Target;
|
||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.gui.GuiChoose;
|
import forge.gui.GuiChoose;
|
||||||
|
import forge.util.Aggregates;
|
||||||
|
|
||||||
public class ChooseGenericEffect extends SpellAbilityEffect {
|
public class ChooseGenericEffect extends SpellAbilityEffect {
|
||||||
|
|
||||||
@@ -48,12 +49,16 @@ public class ChooseGenericEffect extends SpellAbilityEffect {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
SpellAbility chosenSA = null;
|
SpellAbility chosenSA = null;
|
||||||
|
if (sa.hasParam("AtRandom")) {
|
||||||
|
chosenSA = AbilityFactory.getAbility(host.getSVar(Aggregates.random(choices.keySet())), host);
|
||||||
|
} else {
|
||||||
if (p.isHuman()) {
|
if (p.isHuman()) {
|
||||||
String choice = GuiChoose.one("Choose one", choices.values());
|
String choice = GuiChoose.one("Choose one", choices.values());
|
||||||
chosenSA = AbilityFactory.getAbility(host.getSVar(choices.inverse().get(choice)), host);
|
chosenSA = AbilityFactory.getAbility(host.getSVar(choices.inverse().get(choice)), host);
|
||||||
} else { //Computer AI
|
} else { //Computer AI
|
||||||
chosenSA = AbilityFactory.getAbility(host.getSVar(sa.getParam("Choices").split(",")[0]), host);
|
chosenSA = AbilityFactory.getAbility(host.getSVar(sa.getParam("Choices").split(",")[0]), host);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
chosenSA.setActivatingPlayer(sa.getSourceCard().getController());
|
chosenSA.setActivatingPlayer(sa.getSourceCard().getController());
|
||||||
((AbilitySub) chosenSA).setParent(sa);
|
((AbilitySub) chosenSA).setParent(sa);
|
||||||
AbilityUtils.resolve(chosenSA, false);
|
AbilityUtils.resolve(chosenSA, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user