mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- Added Blinding Powder
- Unattach cost can use OriginalHost (preferred method for pumped activated abilities that require unattaching the card granting the ability)
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1008,6 +1008,7 @@ res/cardsfolder/b/blinding_angel.txt -text
|
|||||||
res/cardsfolder/b/blinding_beam.txt -text
|
res/cardsfolder/b/blinding_beam.txt -text
|
||||||
res/cardsfolder/b/blinding_light.txt svneol=native#text/plain
|
res/cardsfolder/b/blinding_light.txt svneol=native#text/plain
|
||||||
res/cardsfolder/b/blinding_mage.txt svneol=native#text/plain
|
res/cardsfolder/b/blinding_mage.txt svneol=native#text/plain
|
||||||
|
res/cardsfolder/b/blinding_powder.txt -text
|
||||||
res/cardsfolder/b/blinding_souleater.txt svneol=native#text/plain
|
res/cardsfolder/b/blinding_souleater.txt svneol=native#text/plain
|
||||||
res/cardsfolder/b/blinking_spirit.txt svneol=native#text/plain
|
res/cardsfolder/b/blinking_spirit.txt svneol=native#text/plain
|
||||||
res/cardsfolder/b/blinkmoth_infusion.txt svneol=native#text/plain
|
res/cardsfolder/b/blinkmoth_infusion.txt svneol=native#text/plain
|
||||||
|
|||||||
11
res/cardsfolder/b/blinding_powder.txt
Normal file
11
res/cardsfolder/b/blinding_powder.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Name:Blinding Powder
|
||||||
|
ManaCost:1
|
||||||
|
Types:Artifact Equipment
|
||||||
|
Text:no text
|
||||||
|
S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddAbility$ BlindEnemies | Description$ Equipped creature has "Unattach CARDNAME: Prevent all combat damage that would be dealt to this creature this turn."
|
||||||
|
SVar:BlindEnemies:AB$ Pump | Cost$ Unattach<OriginalHost/Blinding Powder> | Defined$ Self | KW$ HIDDEN Prevent all combat damage that would be dealt to CARDNAME. | SpellDescription$ Prevent all combat damage that would be dealt to CARDNAME this turn.
|
||||||
|
K:Equip 2
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/blinding_powder.jpg
|
||||||
|
SetInfo:BOK|Uncommon|http://magiccards.info/scans/en/bok/153.jpg
|
||||||
|
Oracle:Equipped creature has "Unattach Blinding Powder: Prevent all combat damage that would be dealt to this creature this turn."\nEquip {2} ({2}: Attach to target creature you control. Equip only as a sorcery.)
|
||||||
|
End
|
||||||
@@ -3,8 +3,8 @@ ManaCost:4
|
|||||||
Types:Artifact Equipment
|
Types:Artifact Equipment
|
||||||
Text:no text
|
Text:no text
|
||||||
K:Equip 5
|
K:Equip 5
|
||||||
S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 2 | AddToughness$ 1 | AddAbility$ SeekerDestroy | Description$ Equipped creature gets +2/+1 and has "{T}, Unattach Heartseeker: Destroy target creature."
|
S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 2 | AddToughness$ 1 | AddAbility$ SeekerDestroy | Description$ Equipped creature gets +2/+1 and has "{T}, Unattach CARDNAME: Destroy target creature."
|
||||||
SVar:SeekerDestroy:AB$ Destroy | Cost$ T Unattach<Card.Attached+namedHeartseeker/equipped Heartseeker> | ValidTgts$ Creature | SpellDescription$ Destroy target creature.
|
SVar:SeekerDestroy:AB$ Destroy | Cost$ T Unattach<OriginalHost/Heartseeker> | ValidTgts$ Creature | SpellDescription$ Destroy target creature.
|
||||||
SVar:Rarity:Rare
|
SVar:Rarity:Rare
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/heartseeker.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/heartseeker.jpg
|
||||||
SetInfo:DST|Rare|http://magiccards.info/scans/en/ds/124.jpg
|
SetInfo:DST|Rare|http://magiccards.info/scans/en/ds/124.jpg
|
||||||
|
|||||||
@@ -44,11 +44,9 @@ public class CostUnattach extends CostPartWithList {
|
|||||||
@Override
|
@Override
|
||||||
public boolean isUndoable() { return false; }
|
public boolean isUndoable() { return false; }
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isReusable() { return false; }
|
public boolean isReusable() { return false; }
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
@@ -73,6 +71,11 @@ public class CostUnattach extends CostPartWithList {
|
|||||||
if (source.isEquipping()) {
|
if (source.isEquipping()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
} else if (type.equals("OriginalHost")) {
|
||||||
|
Card originalEquipment = ability.getOriginalHost();
|
||||||
|
if (originalEquipment.isEquipping()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
List<Card> equipped = source.getEquippedBy();
|
List<Card> equipped = source.getEquippedBy();
|
||||||
if (CardLists.getValidCards(equipped, type, activator, source).size() > 0) {
|
if (CardLists.getValidCards(equipped, type, activator, source).size() > 0) {
|
||||||
@@ -91,7 +94,7 @@ public class CostUnattach extends CostPartWithList {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public final void payAI(final AIPlayer ai, final SpellAbility ability, final Card source, final CostPayment payment, final GameState game) {
|
public final void payAI(final AIPlayer ai, final SpellAbility ability, final Card source, final CostPayment payment, final GameState game) {
|
||||||
Card cardToUnattach = findCardToUnattach(source, (Player)ai);
|
Card cardToUnattach = findCardToUnattach(source, (Player) ai, ability);
|
||||||
if (cardToUnattach == null) {
|
if (cardToUnattach == null) {
|
||||||
// We really shouldn't be able to get here if there's nothing to unattach
|
// We really shouldn't be able to get here if there's nothing to unattach
|
||||||
return;
|
return;
|
||||||
@@ -113,7 +116,7 @@ public class CostUnattach extends CostPartWithList {
|
|||||||
public final boolean payHuman(final SpellAbility ability, final Card source, final CostPayment payment, final GameState game) {
|
public final boolean payHuman(final SpellAbility ability, final Card source, final CostPayment payment, final GameState game) {
|
||||||
this.resetList();
|
this.resetList();
|
||||||
Player activator = ability.getActivatingPlayer();
|
Player activator = ability.getActivatingPlayer();
|
||||||
Card cardToUnattach = findCardToUnattach(source, activator);
|
Card cardToUnattach = findCardToUnattach(source, activator, ability);
|
||||||
if (cardToUnattach != null && GuiDialog.confirm(source, String.format("Unattach %s?", cardToUnattach.toString()))) {
|
if (cardToUnattach != null && GuiDialog.confirm(source, String.format("Unattach %s?", cardToUnattach.toString()))) {
|
||||||
Card equippingCard = cardToUnattach.getEquipping().get(0);
|
Card equippingCard = cardToUnattach.getEquipping().get(0);
|
||||||
cardToUnattach.unEquipCard(equippingCard);
|
cardToUnattach.unEquipCard(equippingCard);
|
||||||
@@ -128,11 +131,16 @@ public class CostUnattach extends CostPartWithList {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Card findCardToUnattach(final Card source, Player activator) {
|
private Card findCardToUnattach(final Card source, Player activator, SpellAbility ability) {
|
||||||
if (getType().equals("CARDNAME")) {
|
if (getType().equals("CARDNAME")) {
|
||||||
if (source.isEquipping()) {
|
if (source.isEquipping()) {
|
||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
|
} else if (getType().equals("OriginalHost")) {
|
||||||
|
Card originalEquipment = ability.getOriginalHost();
|
||||||
|
if (originalEquipment.isEquipping()) {
|
||||||
|
return originalEquipment;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
List<Card> attachees = CardLists.getValidCards(source.getEquippedBy(), this.getType(), activator, source);
|
List<Card> attachees = CardLists.getValidCards(source.getEquippedBy(), this.getType(), activator, source);
|
||||||
if (attachees.size() > 0) {
|
if (attachees.size() > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user