mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Taps Trigger now flag for being used as Attacker
This commit is contained in:
@@ -3226,11 +3226,15 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
}
|
||||
|
||||
public final void tap() {
|
||||
tap(false);
|
||||
}
|
||||
public final void tap(boolean attacker) {
|
||||
if (tapped) { return; }
|
||||
|
||||
// Run triggers
|
||||
final Map<String, Object> runParams = Maps.newTreeMap();
|
||||
runParams.put("Card", this);
|
||||
runParams.put("Attacker", attacker);
|
||||
getGame().getTriggerHandler().runTrigger(TriggerType.Taps, runParams, false);
|
||||
|
||||
setTapped(true);
|
||||
|
||||
@@ -526,7 +526,7 @@ public class PhaseHandler implements java.io.Serializable {
|
||||
|
||||
if (canAttack) {
|
||||
if (shouldTapForAttack) {
|
||||
attacker.tap();
|
||||
attacker.tap(true);
|
||||
}
|
||||
} else {
|
||||
combat.removeFromCombat(attacker);
|
||||
|
||||
@@ -28,7 +28,6 @@ import java.util.Map;
|
||||
* </p>
|
||||
*
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public class TriggerTaps extends Trigger {
|
||||
|
||||
@@ -50,15 +49,26 @@ public class TriggerTaps extends Trigger {
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public final boolean performTest(final java.util.Map<String, Object> runParams2) {
|
||||
public final boolean performTest(final Map<String, Object> runParams2) {
|
||||
final Card tapper = (Card) runParams2.get("Card");
|
||||
|
||||
if (this.mapParams.containsKey("ValidCard")) {
|
||||
if (!tapper.isValid(this.mapParams.get("ValidCard").split(","), this.getHostCard().getController(),
|
||||
this.getHostCard(), null)) {
|
||||
if (hasParam("ValidCard")) {
|
||||
if (!tapper.isValid(getParam("ValidCard").split(","), getHostCard().getController(),
|
||||
getHostCard(), null)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (hasParam("Attacker")) {
|
||||
if ("True".equalsIgnoreCase(getParam("Attacker"))) {
|
||||
if (!(Boolean)runParams2.get("Attacker")) {
|
||||
return false;
|
||||
}
|
||||
} else if ("False".equalsIgnoreCase(getParam("Attacker"))) {
|
||||
if ((Boolean)runParams2.get("Attacker")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -67,7 +77,7 @@ public class TriggerTaps extends Trigger {
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public final void setTriggeringObjects(final SpellAbility sa) {
|
||||
sa.setTriggeringObject("Card", this.getRunParams().get("Card"));
|
||||
sa.setTriggeringObject("Card", getRunParams().get("Card"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -80,7 +80,6 @@ public enum TriggerType {
|
||||
SpellAbilityCast(TriggerSpellAbilityCast.class),
|
||||
SpellCast(TriggerSpellAbilityCast.class),
|
||||
Surveil(TriggerSurveil.class),
|
||||
Tapped(TriggerTaps.class),
|
||||
Taps(TriggerTaps.class),
|
||||
TapsForMana(TriggerTapsForMana.class),
|
||||
Transformed(TriggerTransformed.class),
|
||||
|
||||
7
forge-gui/res/cardsfolder/upcoming/verity_circle.txt
Normal file
7
forge-gui/res/cardsfolder/upcoming/verity_circle.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
Name:Verity Circle
|
||||
ManaCost:2 U
|
||||
Types:Enchantment
|
||||
T:Mode$ Taps | ValidCard$ Creature.OppCtrl | Attacker$ False | OptionalDecider$ You | TriggerZones$ Battlefield | Execute$ TrigDraw | TriggerDescription$ Whenever a creature an opponent controls becomes tapped, if it isn't being declared as an attacker, you may draw a card.
|
||||
SVar:TrigDraw:DB$Draw | Defined$ You | NumCards$ 1
|
||||
A:AB$ Tap | Cost$ 4 U | ValidTgts$ Creature.withoutFlying | TgtPrompt$ Select target creature without flying | SpellDescription$ Tap target creature without flying.
|
||||
Oracle:Whenever a creature an opponent controls becomes tapped, if it isn't being declared as an attacker, you may draw a card.\n{4}{U}: Tap target creature without flying.
|
||||
Reference in New Issue
Block a user