mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Added the keyword "May be played by your Opponent".
- Added Fiend of the Shadows.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -2920,6 +2920,7 @@ res/cardsfolder/f/field_of_souls.txt svneol=native#text/plain
|
||||
res/cardsfolder/f/field_surgeon.txt svneol=native#text/plain
|
||||
res/cardsfolder/f/fieldmist_borderpost.txt svneol=native#text/plain
|
||||
res/cardsfolder/f/fiend_hunter.txt -text
|
||||
res/cardsfolder/f/fiend_of_the_shadows.txt -text
|
||||
res/cardsfolder/f/fierce_empath.txt svneol=native#text/plain
|
||||
res/cardsfolder/f/fiery_conclusion.txt svneol=native#text/plain
|
||||
res/cardsfolder/f/fiery_fall.txt svneol=native#text/plain
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Cone of Flame
|
||||
ManaCost:3 R R
|
||||
Types:Sorcery
|
||||
Text:no text
|
||||
A:SP$ DealDamage | Cost$ 3 R | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SubAbility$ DBDamageTwo | SpellDescription$ CARDNAME deals 1 damage to target creature or player, 2 damage to another target creature or player, and 3 damage to a third target creature or player.
|
||||
A:SP$ DealDamage | Cost$ 3 R R | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SubAbility$ DBDamageTwo | SpellDescription$ CARDNAME deals 1 damage to target creature or player, 2 damage to another target creature or player, and 3 damage to a third target creature or player.
|
||||
SVar:DBDamageTwo:DB$ DealDamage | Cost$ 0 | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select another target creature or player | NumDmg$ 2 | TargetUnique$ True | SubAbility$ DBDamageThree
|
||||
SVar:DBDamageThree:DB$ DealDamage | Cost$ 0 | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select another target creature or player | NumDmg$ 3 |TargetUnique$ True
|
||||
SVar:Rarity:Uncommon
|
||||
|
||||
17
res/cardsfolder/f/fiend_of_the_shadows.txt
Normal file
17
res/cardsfolder/f/fiend_of_the_shadows.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
Name:Fiend of the Shadows
|
||||
ManaCost:3 B B
|
||||
Types:Creature Vampire Wizard
|
||||
Text:no text
|
||||
PT:3/3
|
||||
K:Flying
|
||||
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigChangeZone | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, that player exiles a card from his or her hand. You may play that card for as long as it remains exiled.
|
||||
SVar:TrigChangeZone:AB$ ChangeZone | Cost$ 0 | Origin$ Hand | Destination$ Exile | DefinedPlayer$ TriggeredTarget | Chooser$ Opponent | ChangeType$ Card | ChangeNum$ 1 | RememberChanged$ True | SubAbility$ DBPump
|
||||
SVar:DBPump:DB$ Pump | Defined$ Remembered | KW$ May be played by your Opponent | PumpZone$ Exile | Permanent$ True | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
A:AB$ Regenerate | Cost$ Sac<1/Human> | SpellDescription$ Regenerate CARDNAME.
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/fiend_of_the_shadows.jpg
|
||||
SetInfo:DKA|Rare|http://magiccards.info/scans/en/dka/62.jpg
|
||||
Oracle:Flying\nWhenever Fiend of the Shadows deals combat damage to a player, that player exiles a card from his or her hand. You may play that card for as long as it remains exiled.\nSacrifice a Human: Regenerate Fiend of the Shadows.
|
||||
End
|
||||
@@ -225,6 +225,11 @@ public class GameAction {
|
||||
}
|
||||
|
||||
copied.setTimestamp(AllZone.getNextTimestamp());
|
||||
for (String s : copied.getKeyword()) {
|
||||
if (s.startsWith("May be played")) {
|
||||
copied.removeAllExtrinsicKeyword(s);
|
||||
}
|
||||
}
|
||||
|
||||
return copied;
|
||||
}
|
||||
@@ -1876,7 +1881,6 @@ public class GameAction {
|
||||
// for uncastables like lotus bloom, check if manaCost is blank
|
||||
sa.setActivatingPlayer(human);
|
||||
if (sa.canPlay() && (!sa.isSpell() || !sa.getManaCost().equals(""))) {
|
||||
|
||||
boolean flashb = false;
|
||||
|
||||
// check for flashback keywords
|
||||
@@ -1913,7 +1917,7 @@ public class GameAction {
|
||||
choices.add(newSA.toString());
|
||||
map.put(newSA.toString(), newSA);
|
||||
}
|
||||
if (!flashb || c.hasKeyword("May be played")) {
|
||||
if (!flashb || c.hasKeyword("May be played") || c.hasKeyword("May be played by your Opponent")) {
|
||||
choices.add(sa.toString());
|
||||
map.put(sa.toString(), sa);
|
||||
}
|
||||
|
||||
@@ -1780,7 +1780,8 @@ public abstract class Player extends GameEntity {
|
||||
*/
|
||||
public final void playLand(final Card land) {
|
||||
if (this.canPlayLand()) {
|
||||
AllZone.getGameAction().moveToPlay(land);
|
||||
land.addController(this);
|
||||
AllZone.getGameAction().moveTo(this.getZone(Constant.Zone.Battlefield), land);
|
||||
CardFactoryUtil.playLandEffects(land);
|
||||
this.numLandsPlayed++;
|
||||
|
||||
|
||||
@@ -2412,17 +2412,19 @@ public class CardFactoryUtil {
|
||||
* getExternalZoneActivationCards.
|
||||
* </p>
|
||||
*
|
||||
* @param player
|
||||
* @param activator
|
||||
* a {@link forge.Player} object.
|
||||
* @return a {@link forge.CardList} object.
|
||||
*/
|
||||
public static CardList getExternalZoneActivationCards(final Player player) {
|
||||
public static CardList getExternalZoneActivationCards(final Player activator) {
|
||||
CardList cl = new CardList();
|
||||
Player opponent = activator.getOpponent();
|
||||
|
||||
cl.addAll(getActivateablesFromZone(player.getZone(Constant.Zone.Graveyard), player));
|
||||
cl.addAll(getActivateablesFromZone(player.getZone(Constant.Zone.Exile), player));
|
||||
cl.addAll(getActivateablesFromZone(player.getZone(Constant.Zone.Library), player));
|
||||
cl.addAll(getActivateablesFromZone(player.getZone(Constant.Zone.Command), player));
|
||||
cl.addAll(getActivateablesFromZone(activator.getZone(Constant.Zone.Graveyard), activator));
|
||||
cl.addAll(getActivateablesFromZone(activator.getZone(Constant.Zone.Exile), activator));
|
||||
cl.addAll(getActivateablesFromZone(activator.getZone(Constant.Zone.Library), activator));
|
||||
cl.addAll(getActivateablesFromZone(activator.getZone(Constant.Zone.Command), activator));
|
||||
cl.addAll(getActivateablesFromZone(opponent.getZone(Constant.Zone.Exile), activator));
|
||||
|
||||
return cl;
|
||||
}
|
||||
@@ -2434,42 +2436,56 @@ public class CardFactoryUtil {
|
||||
*
|
||||
* @param zone
|
||||
* a PlayerZone object.
|
||||
* @param player
|
||||
* @param activator
|
||||
* a {@link forge.Player} object.
|
||||
* @return a boolean.
|
||||
*/
|
||||
public static CardList getActivateablesFromZone(final PlayerZone zone, final Player player) {
|
||||
public static CardList getActivateablesFromZone(final PlayerZone zone, final Player activator) {
|
||||
|
||||
CardList cl = new CardList(zone.getCards());
|
||||
|
||||
cl = cl.filter(new CardListFilter() {
|
||||
@Override
|
||||
public boolean addCard(final Card c) {
|
||||
if (zone.is(Constant.Zone.Graveyard)) {
|
||||
if (c.hasUnearth()) {
|
||||
return true;
|
||||
if (activator.isPlayer(zone.getPlayer())) {
|
||||
cl = cl.filter(new CardListFilter() {
|
||||
@Override
|
||||
public boolean addCard(final Card c) {
|
||||
if (zone.is(Constant.Zone.Graveyard)) {
|
||||
if (c.hasUnearth()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (c.isLand() && c.hasKeyword("May be played")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (final SpellAbility sa : c.getSpellAbility()) {
|
||||
final Zone restrictZone = sa.getRestrictions().getZone();
|
||||
if (zone.is(restrictZone)) {
|
||||
if (c.isLand() && c.hasKeyword("May be played")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (sa.isSpell()
|
||||
&& (c.hasKeyword("May be played") || (c.hasStartOfKeyword("Flashback") && zone
|
||||
.is(Zone.Graveyard))) && restrictZone.equals(Zone.Hand)) {
|
||||
for (final SpellAbility sa : c.getSpellAbility()) {
|
||||
final Zone restrictZone = sa.getRestrictions().getZone();
|
||||
if (zone.is(restrictZone)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (sa.isSpell()
|
||||
&& (c.hasKeyword("May be played") || (c.hasStartOfKeyword("Flashback") && zone
|
||||
.is(Zone.Graveyard))) && restrictZone.equals(Zone.Hand)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// the activator is not the owner of the card
|
||||
cl = cl.filter(new CardListFilter() {
|
||||
@Override
|
||||
public boolean addCard(final Card c) {
|
||||
|
||||
if (c.hasKeyword("May be played by your Opponent")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
return cl;
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ public abstract class Spell extends SpellAbility implements java.io.Serializable
|
||||
return false;
|
||||
}
|
||||
|
||||
return (card.isInstant() || card.hasKeyword("Flash") || PhaseHandler.canCastSorcery(card.getController()));
|
||||
return (card.isInstant() || card.hasKeyword("Flash") || PhaseHandler.canCastSorcery(activator));
|
||||
} // canPlay()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
|
||||
@@ -228,7 +228,8 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.isAnyPlayer() && !activator.equals(c.getController())) {
|
||||
if (!this.isAnyPlayer() && !activator.equals(c.getController())
|
||||
&& !c.hasKeyword("May be played by your Opponent")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -412,6 +412,7 @@ public class SpellPermanent extends Spell {
|
||||
@Override
|
||||
public void resolve() {
|
||||
final Card c = this.getSourceCard();
|
||||
AllZone.getGameAction().moveToPlay(c);
|
||||
c.addController(this.getActivatingPlayer());
|
||||
AllZone.getGameAction().moveTo(this.getActivatingPlayer().getZone(Constant.Zone.Battlefield), c);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user