mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Added Legerdemain and Gauntlets of Chaos
- Fixed isManaAbility
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -5025,6 +5025,7 @@ forge-gui/res/cardsfolder/g/gatherer_of_graces.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/g/gatstaf_shepherd_gatstaf_howler.txt -text
|
||||
forge-gui/res/cardsfolder/g/gauntlet_of_might.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/g/gauntlet_of_power.txt -text
|
||||
forge-gui/res/cardsfolder/g/gauntlets_of_chaos.txt -text
|
||||
forge-gui/res/cardsfolder/g/gavony.txt -text
|
||||
forge-gui/res/cardsfolder/g/gavony_ironwright.txt -text
|
||||
forge-gui/res/cardsfolder/g/gavony_township.txt -text
|
||||
@@ -7140,6 +7141,7 @@ forge-gui/res/cardsfolder/l/leering_gargoyle.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/l/leery_fogbeast.txt -text svneol=unset#text/plain
|
||||
forge-gui/res/cardsfolder/l/legacy_weapon.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/l/legacys_allure.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/l/legerdemain.txt -text
|
||||
forge-gui/res/cardsfolder/l/legion_loyalist.txt -text
|
||||
forge-gui/res/cardsfolder/l/legions_initiative.txt -text
|
||||
forge-gui/res/cardsfolder/l/legions_of_lim_dul.txt svneol=native#text/plain
|
||||
|
||||
@@ -70,6 +70,10 @@ public class ControlExchangeEffect extends SpellAbilityEffect {
|
||||
final long tStamp = sa.getActivatingPlayer().getGame().getNextTimestamp();
|
||||
object2.setController(object1.getController(), tStamp);
|
||||
object1.setController(player2, tStamp);
|
||||
if (sa.hasParam("RememberExchanged")) {
|
||||
sa.getHostCard().addRemembered(object1);
|
||||
sa.getHostCard().addRemembered(object2);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -497,7 +497,7 @@ public class CardFactoryUtil {
|
||||
}
|
||||
|
||||
// Make sure it's still targetable as well
|
||||
return target.canBeTargetedBy(ability);
|
||||
return ability.canTarget(target);
|
||||
}
|
||||
|
||||
// does "target" have protection from "card"?
|
||||
|
||||
@@ -33,6 +33,8 @@ import forge.game.cost.Cost;
|
||||
import forge.game.cost.CostPartMana;
|
||||
import forge.game.mana.Mana;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.trigger.TriggerType;
|
||||
import forge.game.trigger.WrappedAbility;
|
||||
import forge.util.TextUtil;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -138,6 +140,8 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
||||
if (this.usesTargeting()) return false;
|
||||
if (getRestrictions() != null && getRestrictions().getPlaneswalker())
|
||||
return false; //Loyalty ability, not a mana ability.
|
||||
if (this.isWrapper() && ((WrappedAbility) this).getTrigger().getMode() != TriggerType.TapsForMana)
|
||||
return false;
|
||||
|
||||
return getManaPartRecursive() != null;
|
||||
}
|
||||
@@ -1046,6 +1050,24 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
||||
}
|
||||
}
|
||||
}
|
||||
if (hasParam("TargetsWithSharedTypes") && entity instanceof Card) {
|
||||
final Card c = (Card) entity;
|
||||
final SpellAbility parent = this.getParentTargetingCard();
|
||||
final Card parentTargeted = parent != null ? parent.getTargetCard() : null;
|
||||
if (parentTargeted == null) {
|
||||
return false;
|
||||
}
|
||||
boolean flag = false;
|
||||
for (final String type : getParam("TargetsWithSharedTypes").split(",")) {
|
||||
if (c.isType(type) && parentTargeted.isType(type)) {
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!flag) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (hasParam("TargetsWithRelatedProperty") && entity instanceof Card) {
|
||||
final String related = getParam("TargetsWithRelatedProperty");
|
||||
final Card c = (Card) entity;
|
||||
|
||||
10
forge-gui/res/cardsfolder/g/gauntlets_of_chaos.txt
Normal file
10
forge-gui/res/cardsfolder/g/gauntlets_of_chaos.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
Name:Gauntlets of Chaos
|
||||
ManaCost:5
|
||||
Types:Artifact
|
||||
A:AB$ Pump | Cost$ 5 Sac<1/CARDNAME> | ValidTgts$ Artifact.YouCtrl,Creature.YouCtrl,Land.YouCtrl | TgtPrompt$ target artifact, creature, or land you control | StackDescription$ None | SubAbility$ DBExchange | SpellDescription$ Exchange control of target artifact, creature, or land you control and target permanent an opponent controls that shares one of those types with it. If those permanents are exchanged this way, destroy all Auras attached to them.
|
||||
SVar:DBExchange:DB$ ExchangeControl | Defined$ ParentTarget | ValidTgts$ Permanent.OppCtrl | TgtPrompt$ Select target permanent an opponent controls that shares one of those types | TargetsWithSharedTypes$ Artifact,Creature,Land | RememberExchanged$ True | SubAbility$ DBDestroyAll
|
||||
SVar:DBDestroyAll:DB$ DestroyAll | ValidCards$ Aura.AttachedTo Card.IsRemembered | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/gauntlets_of_chaos.jpg
|
||||
Oracle:{5}, Sacrifice Gauntlets of Chaos: Exchange control of target artifact, creature, or land you control and target permanent an opponent controls that shares one of those types with it. If those permanents are exchanged this way, destroy all Auras attached to them.
|
||||
8
forge-gui/res/cardsfolder/l/legerdemain.txt
Normal file
8
forge-gui/res/cardsfolder/l/legerdemain.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
Name:Legerdemain
|
||||
ManaCost:2 U U
|
||||
Types:Sorcery
|
||||
A:SP$ Pump | Cost$ 2 U U | ValidTgts$ Artifact,Creature | TgtPrompt$ target artifact or creature | StackDescription$ None | SubAbility$ DBExchange | SpellDescription$ Exchange control of target artifact or creature and another target permanent that shares one of those types with it. (This effect lasts indefinitely.)
|
||||
SVar:DBExchange:DB$ ExchangeControl | Defined$ ParentTarget | ValidTgts$ Permanent | TgtPrompt$ Select target permanent that shares one of those types | TargetsWithSharedTypes$ Artifact,Creature | TargetUnique$ True
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/legerdemain.jpg
|
||||
Oracle:Exchange control of target artifact or creature and another target permanent that shares one of those types with it. (This effect lasts indefinitely.)
|
||||
Reference in New Issue
Block a user