mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Convert Overwhelming Intellect to AF_Counter
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
Name:Overwhelming Intellect
|
||||
ManaCost:4 U U
|
||||
Types:Instant
|
||||
Text:Counter target creature spell. Draw cards equal to that spell's converted mana cost.
|
||||
Text:no text
|
||||
A:SP$ Counter | Cost$ 4 U U | TargetType$ Spell | TgtPrompt$ Select target Creature spell | ValidTgts$ Creature | SubAbility$ SVar=DBDraw | SpellDescription$ Counter target creature spell. Draw cards equal to that spell's converted mana cost.
|
||||
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ X
|
||||
SVar:X:Targeted$CardManaCost
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/overwhelming_intellect.jpg
|
||||
SetInfo:SOK|Uncommon|http://magiccards.info/scans/en/sok/51.jpg
|
||||
|
||||
@@ -878,8 +878,20 @@ public class AbilityFactory {
|
||||
}
|
||||
}
|
||||
else {
|
||||
//TODO - this may needs edits to handle SpellAbility defineds?
|
||||
list = new CardList(findParentsTargetedCard(ability).getTarget().getTargetCards().toArray());
|
||||
SpellAbility parent = findParentsTargetedCard(ability);
|
||||
|
||||
ArrayList<Object> all = parent.getTarget().getTargets();
|
||||
if(!all.isEmpty() && all.get(0) instanceof SpellAbility) {
|
||||
list = new CardList();
|
||||
ArrayList<SpellAbility> sas = parent.getTarget().getTargetSAs();
|
||||
for(SpellAbility sa : sas) {
|
||||
list.add(sa.getSourceCard());
|
||||
}
|
||||
}
|
||||
else {
|
||||
SpellAbility saTargeting = findParentsTargetedCard(ability);
|
||||
list = new CardList(saTargeting.getTarget().getTargetCards().toArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (calcX[0].startsWith("Triggered")) {
|
||||
|
||||
@@ -860,45 +860,6 @@ public class CardFactory_Instants {
|
||||
card.setSVar("PlayMain1", "TRUE");
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Overwhelming Intellect")) {
|
||||
SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = -8825219868732813877L;
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
SpellAbility sa = AllZone.Stack.pop();
|
||||
AllZone.GameAction.moveToGraveyard(sa.getSourceCard());
|
||||
|
||||
int convertedManaCost = CardUtil.getConvertedManaCost(sa.getSourceCard().getManaCost());
|
||||
for(int i = 0; i < convertedManaCost; i++) {
|
||||
card.getController().drawCard();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
if(AllZone.Stack.size() == 0) return false;
|
||||
|
||||
//see if spell is on stack and that opponent played it
|
||||
Player opponent = card.getController().getOpponent();
|
||||
SpellAbility sa = AllZone.Stack.peek();
|
||||
return sa.isSpell() && opponent.equals(sa.getSourceCard().getController())
|
||||
&& sa.getSourceCard().getType().contains("Creature")
|
||||
&& CardFactoryUtil.isCounterable(sa.getSourceCard());
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
// Do not remove SpellAbilities created by AbilityFactory or Keywords.
|
||||
card.clearFirstSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Banishing Knack")) {
|
||||
SpellAbility spell = new Spell(card) {
|
||||
|
||||
Reference in New Issue
Block a user