mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Bugfix AF_Bounce Null Pointer Error in Stack Description
- Added clearFirstSpellAbility and addFirstSpellAbility into Card when we want the default SpellPermanent/Spell to be cleared but keep other things added on the card - Changed enPump to use the above firstSpellAbility functions - Changed Targeting to remove previously targeted cards from it's choice list for use with Graveyard targeting. - Added Phyrexian Boon, Viscerid Armor, and Misinformation
This commit is contained in:
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -2918,6 +2918,7 @@ res/cardsfolder/miscalculation.txt -text svneol=native#text/plain
|
|||||||
res/cardsfolder/misfortunes_gain.txt -text svneol=native#text/plain
|
res/cardsfolder/misfortunes_gain.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/mishra_artificer_prodigy.txt -text svneol=native#text/plain
|
res/cardsfolder/mishra_artificer_prodigy.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/mishras_factory.txt -text svneol=native#text/plain
|
res/cardsfolder/mishras_factory.txt -text svneol=native#text/plain
|
||||||
|
res/cardsfolder/misinformation.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/misshapen_fiend.txt -text svneol=native#text/plain
|
res/cardsfolder/misshapen_fiend.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/mist_leopard.txt -text svneol=native#text/plain
|
res/cardsfolder/mist_leopard.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/mistform_ultimus.txt -text svneol=native#text/plain
|
res/cardsfolder/mistform_ultimus.txt -text svneol=native#text/plain
|
||||||
@@ -3324,6 +3325,7 @@ res/cardsfolder/phobian_phantasm.txt -text svneol=native#text/plain
|
|||||||
res/cardsfolder/phylactery_lich.txt -text svneol=native#text/plain
|
res/cardsfolder/phylactery_lich.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/phyrexian_arena.txt -text svneol=native#text/plain
|
res/cardsfolder/phyrexian_arena.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/phyrexian_battleflies.txt -text svneol=native#text/plain
|
res/cardsfolder/phyrexian_battleflies.txt -text svneol=native#text/plain
|
||||||
|
res/cardsfolder/phyrexian_boon.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/phyrexian_gargantua.txt -text svneol=native#text/plain
|
res/cardsfolder/phyrexian_gargantua.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/phyrexian_ghoul.txt -text svneol=native#text/plain
|
res/cardsfolder/phyrexian_ghoul.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/phyrexian_hulk.txt -text svneol=native#text/plain
|
res/cardsfolder/phyrexian_hulk.txt -text svneol=native#text/plain
|
||||||
@@ -4982,6 +4984,7 @@ res/cardsfolder/virtuous_charge.txt -text svneol=native#text/plain
|
|||||||
res/cardsfolder/virulent_sliver.txt -text svneol=native#text/plain
|
res/cardsfolder/virulent_sliver.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/visara_the_dreadful.txt -text svneol=native#text/plain
|
res/cardsfolder/visara_the_dreadful.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/viscera_dragger.txt -text svneol=native#text/plain
|
res/cardsfolder/viscera_dragger.txt -text svneol=native#text/plain
|
||||||
|
res/cardsfolder/viscerid_armor.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/viscerid_deepwalker.txt -text svneol=native#text/plain
|
res/cardsfolder/viscerid_deepwalker.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/viscid_lemures.txt -text svneol=native#text/plain
|
res/cardsfolder/viscid_lemures.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/vision_skeins.txt -text svneol=native#text/plain
|
res/cardsfolder/vision_skeins.txt -text svneol=native#text/plain
|
||||||
|
|||||||
9
res/cardsfolder/misinformation.txt
Normal file
9
res/cardsfolder/misinformation.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Name:Misinformation
|
||||||
|
ManaCost:B
|
||||||
|
Types:Instant
|
||||||
|
Text:no text
|
||||||
|
A:SP$Retrieve | Cost$ B | Destination$ Library | LibraryPosition$ 0 | TgtPrompt$ Choose target card in opponent's graveyard | ValidTgts$ Card.YouDontCtrl | TargetMin$0 | TargetMax$3 | SpellDescription$ Put up to three target cards from an opponent's graveyard on top of his or her library in any order.
|
||||||
|
SVar:RemAIDeck:True
|
||||||
|
SVar:Rarity:Common
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/misinformation.jpg
|
||||||
|
End
|
||||||
12
res/cardsfolder/phyrexian_boon.txt
Normal file
12
res/cardsfolder/phyrexian_boon.txt
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Name:Phyrexian Boon
|
||||||
|
ManaCost:2 B
|
||||||
|
Types:Enchantment Aura
|
||||||
|
Text:no text
|
||||||
|
K:Enchant creature
|
||||||
|
K:enPump:+0/+0
|
||||||
|
K:stPumpEnchanted:Creature.Black:2/1:No Condition:Enchanted creature gets +2/+1 as long as it's black.
|
||||||
|
K:stPumpEnchanted:Creature.nonBlack:-1/-2:No Condition:Otherwise, it gets -1/-2.
|
||||||
|
SVar:RemAIDeck:True
|
||||||
|
SVar:Rarity:Common
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/phyrexian_boon.jpg
|
||||||
|
End
|
||||||
11
res/cardsfolder/viscerid_armor.txt
Normal file
11
res/cardsfolder/viscerid_armor.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Name:Viscerid Armor
|
||||||
|
ManaCost:1 U
|
||||||
|
Types:Enchantment Aura
|
||||||
|
Text:no text
|
||||||
|
K:Enchant creature
|
||||||
|
K:enPump:+1/+1
|
||||||
|
A:AB$Bounce | Cost$ 1 U | Destination$Hand | SpellDescription$Return CARDNAME to its owner's hand.
|
||||||
|
SVar:RemAIDeck:True
|
||||||
|
SVar:Rarity:Common
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/viscerid_armor.jpg
|
||||||
|
End
|
||||||
@@ -84,9 +84,13 @@ public class AbilityFactory_Bounce {
|
|||||||
|
|
||||||
StringBuilder sbTargets = new StringBuilder();
|
StringBuilder sbTargets = new StringBuilder();
|
||||||
|
|
||||||
ArrayList<Card> tgts = af.getAbTgt().getTargetCards();
|
ArrayList<Card> tgts;
|
||||||
if (tgts.size() == 0)
|
if (af.getAbTgt() != null)
|
||||||
|
tgts = af.getAbTgt().getTargetCards();
|
||||||
|
else{
|
||||||
|
tgts = new ArrayList<Card>();
|
||||||
tgts.add(af.getHostCard());
|
tgts.add(af.getHostCard());
|
||||||
|
}
|
||||||
|
|
||||||
for(Card c : tgts) {
|
for(Card c : tgts) {
|
||||||
sbTargets.append(" ");
|
sbTargets.append(" ");
|
||||||
|
|||||||
@@ -939,6 +939,10 @@ public class Card extends MyObservable {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clearFirstSpellAbility(){
|
||||||
|
spellAbility.remove(0);
|
||||||
|
}
|
||||||
|
|
||||||
public void clearSpellAbility() {
|
public void clearSpellAbility() {
|
||||||
spellAbility.clear();
|
spellAbility.clear();
|
||||||
manaAbility.clear();
|
manaAbility.clear();
|
||||||
@@ -952,6 +956,13 @@ public class Card extends MyObservable {
|
|||||||
manaAbility.clear();
|
manaAbility.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void addFirstSpellAbility(SpellAbility a){
|
||||||
|
a.setSourceCard(this);
|
||||||
|
if(a instanceof Ability_Mana) manaAbility.add(0, (Ability_Mana) a);
|
||||||
|
else spellAbility.add(0, a);
|
||||||
|
}
|
||||||
|
|
||||||
public void addSpellAbility(SpellAbility a) {
|
public void addSpellAbility(SpellAbility a) {
|
||||||
a.setSourceCard(this);
|
a.setSourceCard(this);
|
||||||
if(a instanceof Ability_Mana) manaAbility.add((Ability_Mana) a);
|
if(a instanceof Ability_Mana) manaAbility.add((Ability_Mana) a);
|
||||||
|
|||||||
@@ -2073,13 +2073,13 @@ class CardFactory_Auras {
|
|||||||
if (k.length > 2) { spDesc[0] = k[2].trim(); } // Use the spell and stack descriptions included
|
if (k.length > 2) { spDesc[0] = k[2].trim(); } // Use the spell and stack descriptions included
|
||||||
if (k.length > 3) { stDesc[0] = k[3].trim(); } // with the keyword if they are present.
|
if (k.length > 3) { stDesc[0] = k[3].trim(); } // with the keyword if they are present.
|
||||||
|
|
||||||
card.clearSpellAbility();
|
card.clearFirstSpellAbility();
|
||||||
|
|
||||||
if (! curse[0]) {
|
if (! curse[0]) {
|
||||||
card.addSpellAbility(CardFactoryUtil.enPump_Enchant(card, Power, Tough, extrinsicKeywords, spDesc, stDesc));
|
card.addFirstSpellAbility(CardFactoryUtil.enPump_Enchant(card, Power, Tough, extrinsicKeywords, spDesc, stDesc));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
card.addSpellAbility(CardFactoryUtil.enPumpCurse_Enchant(card, Power, Tough, extrinsicKeywords, spDesc, stDesc));
|
card.addFirstSpellAbility(CardFactoryUtil.enPumpCurse_Enchant(card, Power, Tough, extrinsicKeywords, spDesc, stDesc));
|
||||||
}
|
}
|
||||||
card.addEnchantCommand(CardFactoryUtil.enPump_onEnchant(card, Power, Tough, extrinsicKeywords, spDesc, stDesc));
|
card.addEnchantCommand(CardFactoryUtil.enPump_onEnchant(card, Power, Tough, extrinsicKeywords, spDesc, stDesc));
|
||||||
card.addUnEnchantCommand(CardFactoryUtil.enPump_unEnchant(card, Power, Tough, extrinsicKeywords, spDesc, stDesc));
|
card.addUnEnchantCommand(CardFactoryUtil.enPump_unEnchant(card, Power, Tough, extrinsicKeywords, spDesc, stDesc));
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package forge;
|
package forge;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class Target_Selection {
|
public class Target_Selection {
|
||||||
private Target target = null;
|
private Target target = null;
|
||||||
private SpellAbility ability = null;
|
private SpellAbility ability = null;
|
||||||
@@ -65,9 +67,17 @@ public class Target_Selection {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showMessage() {
|
public void showMessage() {
|
||||||
String zone = select.getTgt().getZone();
|
Target tgt = select.getTgt();
|
||||||
|
String zone = tgt.getZone();
|
||||||
|
|
||||||
CardList choices = AllZoneUtil.getCardsInZone(zone).getValidCards(Tgts, sa.getActivatingPlayer() , sa.getSourceCard());
|
CardList choices = AllZoneUtil.getCardsInZone(zone).getValidCards(Tgts, sa.getActivatingPlayer(), sa.getSourceCard());
|
||||||
|
|
||||||
|
// Remove cards already targeted
|
||||||
|
ArrayList<Card> targeted = tgt.getTargetCards();
|
||||||
|
for(Card c : targeted){
|
||||||
|
if (choices.contains(c))
|
||||||
|
choices.remove(c);
|
||||||
|
}
|
||||||
|
|
||||||
if (zone.equals(Constant.Zone.Play)){
|
if (zone.equals(Constant.Zone.Play)){
|
||||||
boolean canTargetPlayer = false;
|
boolean canTargetPlayer = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user