mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Added Mindleech Mass.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -5516,6 +5516,7 @@ res/cardsfolder/m/mindblaze.txt -text svneol=unset#text/plain
|
|||||||
res/cardsfolder/m/mindcrank.txt svneol=native#text/plain
|
res/cardsfolder/m/mindcrank.txt svneol=native#text/plain
|
||||||
res/cardsfolder/m/mindculling.txt svneol=native#text/plain
|
res/cardsfolder/m/mindculling.txt svneol=native#text/plain
|
||||||
res/cardsfolder/m/mindlash_sliver.txt svneol=native#text/plain
|
res/cardsfolder/m/mindlash_sliver.txt svneol=native#text/plain
|
||||||
|
res/cardsfolder/m/mindleech_mass.txt -text
|
||||||
res/cardsfolder/m/mindless_automaton.txt svneol=native#text/plain
|
res/cardsfolder/m/mindless_automaton.txt svneol=native#text/plain
|
||||||
res/cardsfolder/m/mindless_null.txt -text
|
res/cardsfolder/m/mindless_null.txt -text
|
||||||
res/cardsfolder/m/mindmoil.txt -text
|
res/cardsfolder/m/mindmoil.txt -text
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Text:no text
|
|||||||
PT:5/5
|
PT:5/5
|
||||||
K:Flying
|
K:Flying
|
||||||
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigPlay | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, you may cast a nonland card from your hand without paying its mana cost.
|
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigPlay | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, you may cast a nonland card from your hand without paying its mana cost.
|
||||||
SVar:TrigPlay:DB$ Play | Valid$ Card.nonLand+YouCtrl | ValidZone$ Hand | WithoutManaCost$ True
|
SVar:TrigPlay:DB$ Play | Valid$ Card.nonLand+YouCtrl | ValidZone$ Hand | WithoutManaCost$ True | Optional$ True
|
||||||
SVar:Rarity:Mythic
|
SVar:Rarity:Mythic
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/maelstrom_archangel.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/maelstrom_archangel.jpg
|
||||||
SetInfo:CFX|Mythic|http://magiccards.info/scans/en/cfx/115.jpg
|
SetInfo:CFX|Mythic|http://magiccards.info/scans/en/cfx/115.jpg
|
||||||
|
|||||||
14
res/cardsfolder/m/mindleech_mass.txt
Normal file
14
res/cardsfolder/m/mindleech_mass.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Name:Mindleech Mass
|
||||||
|
ManaCost:5 U B B
|
||||||
|
Types:Creature Horror
|
||||||
|
Text:no text
|
||||||
|
PT:6/6
|
||||||
|
K:Trample
|
||||||
|
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigReveal | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, you may look at that player's hand. If you do, you may cast a nonland card in it without paying that card's mana cost.
|
||||||
|
SVar:TrigReveal:DB$ RevealHand | Defined$ TriggeredTarget | SubAbility$ TrigPlay
|
||||||
|
SVar:TrigPlay:DB$ Play | Valid$ Card.nonLand+YouDontCtrl | ValidZone$ Hand | WithoutManaCost$ True | Optional$ True
|
||||||
|
SVar:Rarity:Rare
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/mindleech_mass.jpg
|
||||||
|
SetInfo:RAV|Rare|http://magiccards.info/scans/en/rav/215.jpg
|
||||||
|
Oracle:Trample\nWhenever Mindleech Mass deals combat damage to a player, you may look at that player's hand. If you do, you may cast a nonland card in it without paying that card's mana cost.
|
||||||
|
End
|
||||||
@@ -26,6 +26,7 @@ import forge.AllZone;
|
|||||||
import forge.AllZoneUtil;
|
import forge.AllZoneUtil;
|
||||||
import forge.Card;
|
import forge.Card;
|
||||||
import forge.CardList;
|
import forge.CardList;
|
||||||
|
import forge.CardListFilter;
|
||||||
import forge.ComputerUtil;
|
import forge.ComputerUtil;
|
||||||
import forge.GameActionUtil;
|
import forge.GameActionUtil;
|
||||||
import forge.Player;
|
import forge.Player;
|
||||||
@@ -125,9 +126,6 @@ public final class AbilityFactoryPlay {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canPlayFromEffectAI(final boolean mandatory, final boolean withOutManaCost) {
|
public boolean canPlayFromEffectAI(final boolean mandatory, final boolean withOutManaCost) {
|
||||||
if (withOutManaCost) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return AbilityFactoryPlay.playTriggerAI(af, this, mandatory);
|
return AbilityFactoryPlay.playTriggerAI(af, this, mandatory);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -321,16 +319,17 @@ public final class AbilityFactoryPlay {
|
|||||||
private static void playResolve(final AbilityFactory af, final SpellAbility sa) {
|
private static void playResolve(final AbilityFactory af, final SpellAbility sa) {
|
||||||
final HashMap<String, String> params = af.getMapParams();
|
final HashMap<String, String> params = af.getMapParams();
|
||||||
final Card source = sa.getSourceCard();
|
final Card source = sa.getSourceCard();
|
||||||
Player controller = sa.getActivatingPlayer();
|
Player activator = sa.getActivatingPlayer();
|
||||||
int amount = 1;
|
int amount = 1;
|
||||||
if (params.containsKey("Amount")) {
|
if (params.containsKey("Amount")) {
|
||||||
amount = AbilityFactory.calculateAmount(source, params.get("Amount"), sa);
|
amount = AbilityFactory.calculateAmount(source, params.get("Amount"), sa);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.containsKey("Controller")) {
|
if (params.containsKey("Controller")) {
|
||||||
controller = AbilityFactory.getDefinedPlayers(source, params.get("Controller"), sa).get(0);
|
activator = AbilityFactory.getDefinedPlayers(source, params.get("Controller"), sa).get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Player controller = activator;
|
||||||
CardList tgtCards = new CardList();
|
CardList tgtCards = new CardList();
|
||||||
|
|
||||||
final Target tgt = sa.getTarget();
|
final Target tgt = sa.getTarget();
|
||||||
@@ -357,6 +356,27 @@ public final class AbilityFactoryPlay {
|
|||||||
if (controller.isHuman()) {
|
if (controller.isHuman()) {
|
||||||
tgtCard = (Card) GuiUtils.getChoice("Select a card to play", tgtCards.toArray());
|
tgtCard = (Card) GuiUtils.getChoice("Select a card to play", tgtCards.toArray());
|
||||||
} else {
|
} else {
|
||||||
|
// AI
|
||||||
|
tgtCards = tgtCards.filter(new CardListFilter() {
|
||||||
|
@Override
|
||||||
|
public boolean addCard(final Card c) {
|
||||||
|
ArrayList<SpellAbility> SpellAbilities = c.getBasicSpells();
|
||||||
|
ArrayList<SpellAbility> sas = new ArrayList<SpellAbility>();
|
||||||
|
for (SpellAbility s : SpellAbilities) {
|
||||||
|
Spell spell = (Spell) s;
|
||||||
|
s.setActivatingPlayer(controller);
|
||||||
|
SpellAbilityRestriction res = s.getRestrictions();
|
||||||
|
// timing restrictions still apply
|
||||||
|
if (res.checkTimingRestrictions(c, s) && spell.canPlayFromEffectAI(false, true)) {
|
||||||
|
sas.add(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (sas.isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
tgtCard = CardFactoryUtil.getBestAI(tgtCards);
|
tgtCard = CardFactoryUtil.getBestAI(tgtCards);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user