mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Vanguard avatar selection will now remove cards with RemRandomDeck flag from the list when choosing Random. Useful for cards like Diamond Queen Avatar that are still great in the right deck.
- Updated some avatar flags
This commit is contained in:
@@ -4,6 +4,7 @@ Types:Vanguard
|
||||
Text:no text
|
||||
HandLifeModifier:+0/+6
|
||||
A:AB$ ChangeZone | ActivationZone$ Command | Cost$ Sac<1/Permanent> | ValidTgts$ Creature | TgtPrompt$ Select target Creature | Origin$ Battlefield | Destination$ Hand | SpellDescription$ Return target creature to its owner's hand.
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Special
|
||||
SVar:Picture:http://www.cardforge.org/fpics/vgd-lq/barrin.jpg
|
||||
SetInfo:VAN|Special|http://magiccards.info/extras/other/vanguard/barrin.jpg
|
||||
|
||||
@@ -5,6 +5,7 @@ Text:no text
|
||||
HandLifeModifier:+0/+5
|
||||
A:AB$ Pump | ActivationZone$ Command | Cost$ S | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | NumAtt$ 1 | NumDef$ 1 | SpellDescription$ Target creature you control gets +1/+1 until end of turn.
|
||||
SVar:Rarity:Special
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Picture:http://www.cardforge.org/fpics/vgd-lq/diamond_faerie_avatar.jpg
|
||||
SetInfo:VAN|Special|http://magiccards.info/extras/other/vanguard-mtgo/diamond-faerie.jpg
|
||||
Oracle:Hand +0, life +5\n{S}: Target creature you control gets +1/+1 until end of turn.
|
||||
|
||||
@@ -17,5 +17,6 @@ SVar:Y:ReplaceCount$DamageAmount
|
||||
SVar:Rarity:Special
|
||||
SVar:Picture:http://www.cardforge.org/fpics/vgd-lq/eladamri.jpg
|
||||
SetInfo:VAN|Special|http://magiccards.info/extras/other/vanguard/eladamri.jpg
|
||||
SVar:RemAIDeck:True
|
||||
Oracle:Hand -1, life +15\n{0}: The next 1 damage that would be dealt to target creature you control is dealt to you instead.
|
||||
End
|
||||
@@ -6,6 +6,8 @@ HandLifeModifier:-1/+2
|
||||
T:Mode$ Phase | Phase$ Main1 | ValidPlayer$ Player | TriggerZones$ Command | Execute$ TrigAddMana | TriggerDescription$ At the beginning of each player's precombat main phase, that player adds {G}{G} to his or her mana pool.
|
||||
SVar:TrigAddMana:AB$ Mana | Cost$ 0 | Produced$ G | Amount$ 2 | Defined$ TriggeredPlayer
|
||||
SVar:Rarity:Special
|
||||
SVar:RemAIDeck:True
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Picture:http://www.cardforge.org/fpics/vgd-lq/eladamri_lord_of_leaves_avatar.jpg
|
||||
SetInfo:VAN|Special|http://magiccards.info/extras/other/vanguard-mtgo-2/eladamri-lord-of-leaves.jpg
|
||||
Oracle:Hand -1, life +2\nAt the beginning of each player's precombat main phase, that player adds {G}{G} to his or her mana pool.
|
||||
|
||||
@@ -4,6 +4,7 @@ Types:Vanguard
|
||||
Text:no text
|
||||
HandLifeModifier:+1/-4
|
||||
S:Mode$ Continuous | EffectZone$ Command | Affected$ Card.YouCtrl | AddHiddenKeyword$ Alternative Cost W U B R G | AffectedZone$ Hand,Graveyard,Exile,Library | Description$ You may pay W U B R G rather than pay the mana cost for spells that you cast.
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Rarity:Special
|
||||
SVar:Picture:http://www.cardforge.org/fpics/vgd-lq/etched_oracle_avatar.jpg
|
||||
SetInfo:VAN|Special|http://magiccards.info/extras/other/vanguard-mtgo/etched-oracle.jpg
|
||||
|
||||
@@ -7,6 +7,7 @@ T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Command | Execu
|
||||
SVar:TrigLoseLife:AB$ LoseLife | Cost$ 0 | Defined$ You | LifeAmount$ Ouch
|
||||
SVar:Ouch:Count$Valid Permanent.YouCtrl
|
||||
SVar:RemAIDeck:True
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Rarity:Special
|
||||
SVar:Picture:http://www.cardforge.org/fpics/vgd-lq/morinfen_avatar.jpg
|
||||
SetInfo:VAN|Special|http://magiccards.info/extras/other/vanguard-mtgo-2/morinfen.jpg
|
||||
|
||||
@@ -5,6 +5,7 @@ Text:no text
|
||||
HandLifeModifier:-2/-3
|
||||
T:Mode$ TapsForMana | TriggerZones$ Command | ValidCard$ Land.YouCtrl | Execute$ TrigMana | Static$ True | TriggerDescription$ Whenever you tap a land for mana, add one mana to your mana pool of any type that land produced.
|
||||
SVar:TrigMana:AB$ ManaReflected | Cost$ 0 | ColorOrType$ Type | Valid$ Defined.Triggered | ReflectProperty$ Produced | Defined$ TriggeredPlayer
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Special
|
||||
SVar:Picture:http://www.cardforge.org/fpics/vgd-lq/sisay.jpg
|
||||
SetInfo:VAN|Special|http://magiccards.info/extras/other/vanguard/sisay.jpg
|
||||
|
||||
@@ -19,13 +19,11 @@ import forge.deck.Deck;
|
||||
import forge.game.GameType;
|
||||
import forge.game.MatchController;
|
||||
import forge.game.MatchStartHelper;
|
||||
import forge.game.PlayerStartConditions;
|
||||
import forge.game.player.LobbyPlayer;
|
||||
import forge.game.player.PlayerType;
|
||||
import forge.gui.SOverlayUtils;
|
||||
import forge.gui.framework.ICDoc;
|
||||
import forge.gui.toolbox.FDeckChooser;
|
||||
import forge.gui.toolbox.FList;
|
||||
import forge.item.CardPrinted;
|
||||
import forge.properties.ForgePreferences;
|
||||
import forge.properties.ForgePreferences.FPref;
|
||||
@@ -56,8 +54,7 @@ public enum CSubmenuVanguard implements ICDoc {
|
||||
@Override
|
||||
public void initialize() {
|
||||
final ForgePreferences prefs = Singletons.getModel().getPreferences();
|
||||
for(FDeckChooser fdc : view.getDeckChoosers())
|
||||
{
|
||||
for (FDeckChooser fdc : view.getDeckChoosers()) {
|
||||
fdc.initialize();
|
||||
}
|
||||
|
||||
@@ -103,7 +100,6 @@ public enum CSubmenuVanguard implements ICDoc {
|
||||
view.getCbRemoveSmall().setSelected(prefs.getPrefBoolean(FPref.DECKGEN_NOSMALL));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** @param lists0   {@link java.util.List}<{@link javax.swing.JList}> */
|
||||
private void startGame() {
|
||||
@@ -119,62 +115,51 @@ public enum CSubmenuVanguard implements ICDoc {
|
||||
@Override
|
||||
public Object doInBackground() {
|
||||
Random rnd = new Random();
|
||||
|
||||
|
||||
List<Deck> playerDecks = new ArrayList<Deck>();
|
||||
for(int i=0;i<view.getNumPlayers();i++)
|
||||
{
|
||||
for (int i = 0; i < view.getNumPlayers(); i++) {
|
||||
Deck d = view.getDeckChoosers().get(i).getDeck();
|
||||
|
||||
if(d == null)
|
||||
{
|
||||
|
||||
if (d == null) {
|
||||
//ERROR!
|
||||
GameActionUtil.showInfoDialg("No deck selected for player " + (i+1));
|
||||
GameActionUtil.showInfoDialg("No deck selected for player " + (i + 1));
|
||||
return null;
|
||||
}
|
||||
playerDecks.add(d);
|
||||
}
|
||||
|
||||
|
||||
List<CardPrinted> playerAvatars = new ArrayList<CardPrinted>();
|
||||
for(int i=0;i<view.getNumPlayers();i++)
|
||||
{
|
||||
for (int i = 0; i < view.getNumPlayers(); i++) {
|
||||
CardPrinted avatar = null;
|
||||
Object obj = view.getAvatarLists().get(i).getSelectedValue();
|
||||
if(obj instanceof String)
|
||||
{
|
||||
if (obj instanceof String) {
|
||||
//Random is the only string in the list so grab a random avatar.
|
||||
if(i == 0)
|
||||
{
|
||||
if (i == 0) {
|
||||
//HUMAN
|
||||
avatar = Iterables.get(view.getAllAvatars(),rnd.nextInt(Iterables.size(view.getAllAvatars())));
|
||||
}
|
||||
else
|
||||
{
|
||||
avatar = Iterables.get(view.getAllAvatars(), rnd.nextInt(Iterables.size(view.getNonRandomHumanAvatars())));
|
||||
} else {
|
||||
//AI
|
||||
avatar = Iterables.get(view.getAllAiAvatars(),rnd.nextInt(Iterables.size(view.getAllAiAvatars())));
|
||||
avatar = Iterables.get(view.getAllAiAvatars(), rnd.nextInt(Iterables.size(view.getNonRandomAiAvatars())));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
avatar = (CardPrinted) obj;
|
||||
}
|
||||
if(avatar == null)
|
||||
{
|
||||
if (avatar == null) {
|
||||
//ERROR!
|
||||
GameActionUtil.showInfoDialg("No avatar selected for player " + (i+1));
|
||||
GameActionUtil.showInfoDialg("No avatar selected for player " + (i + 1));
|
||||
return null;
|
||||
}
|
||||
playerAvatars.add(avatar);
|
||||
}
|
||||
|
||||
|
||||
Lobby lobby = Singletons.getControl().getLobby();
|
||||
MatchStartHelper helper = new MatchStartHelper();
|
||||
for(int i=0;i<view.getNumPlayers();i++)
|
||||
{
|
||||
for (int i = 0; i < view.getNumPlayers(); i++) {
|
||||
LobbyPlayer player = lobby.findLocalPlayer(i == 0 ? PlayerType.HUMAN : PlayerType.COMPUTER);
|
||||
|
||||
|
||||
helper.addVanguardPlayer(player, playerDecks.get(i), playerAvatars.get(i));
|
||||
}
|
||||
MatchController mc = Singletons.getModel().getMatch();
|
||||
MatchController mc = Singletons.getModel().getMatch();
|
||||
mc.initMatch(GameType.Vanguard, helper.getPlayerMap());
|
||||
mc.startRound();
|
||||
|
||||
|
||||
@@ -65,6 +65,8 @@ public enum VSubmenuVanguard implements IVSubmenu<CSubmenuVanguard> {
|
||||
|
||||
private final Iterable<CardPrinted> allAvatars = Iterables.filter(CardDb.instance().getAllNonTraditionalCards(), CardPrinted.Predicates.type("Vanguard"));
|
||||
private final List<CardPrinted> allAiAvatars = new ArrayList<CardPrinted>();
|
||||
private final List<CardPrinted> nonRandomHumanAvatars = new ArrayList<CardPrinted>();
|
||||
private final List<CardPrinted> nonRandomAiAvatars = new ArrayList<CardPrinted>();
|
||||
|
||||
//////////////////////////////
|
||||
|
||||
@@ -89,9 +91,15 @@ public enum VSubmenuVanguard implements IVSubmenu<CSubmenuVanguard> {
|
||||
aiListData.add("Random");
|
||||
for (CardPrinted cp : allAvatars) {
|
||||
humanListData.add(cp);
|
||||
if (!cp.getCard().getRemRandomDecks()) {
|
||||
nonRandomHumanAvatars.add(cp);
|
||||
}
|
||||
if (!cp.getCard().getRemAIDecks()) {
|
||||
aiListData.add(cp);
|
||||
allAiAvatars.add(cp);
|
||||
if (!cp.getCard().getRemRandomDecks()) {
|
||||
nonRandomAiAvatars.add(cp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,4 +337,18 @@ public enum VSubmenuVanguard implements IVSubmenu<CSubmenuVanguard> {
|
||||
public List<CardPrinted> getAllAiAvatars() {
|
||||
return allAiAvatars;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the non-random human Avatars
|
||||
*/
|
||||
public List<CardPrinted> getNonRandomHumanAvatars() {
|
||||
return nonRandomHumanAvatars;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the non-random AI Avatars
|
||||
*/
|
||||
public List<CardPrinted> getNonRandomAiAvatars() {
|
||||
return nonRandomAiAvatars;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user