mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- DTK:Added Sidisi, Undead Vizier
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -672,6 +672,7 @@ forge-game/src/main/java/forge/game/trigger/TriggerDevoured.java -text
|
|||||||
forge-game/src/main/java/forge/game/trigger/TriggerDiscarded.java svneol=native#text/plain
|
forge-game/src/main/java/forge/game/trigger/TriggerDiscarded.java svneol=native#text/plain
|
||||||
forge-game/src/main/java/forge/game/trigger/TriggerDrawn.java svneol=native#text/plain
|
forge-game/src/main/java/forge/game/trigger/TriggerDrawn.java svneol=native#text/plain
|
||||||
forge-game/src/main/java/forge/game/trigger/TriggerEvolved.java -text
|
forge-game/src/main/java/forge/game/trigger/TriggerEvolved.java -text
|
||||||
|
forge-game/src/main/java/forge/game/trigger/TriggerExploited.java -text
|
||||||
forge-game/src/main/java/forge/game/trigger/TriggerFlippedCoin.java -text
|
forge-game/src/main/java/forge/game/trigger/TriggerFlippedCoin.java -text
|
||||||
forge-game/src/main/java/forge/game/trigger/TriggerHandler.java svneol=native#text/plain
|
forge-game/src/main/java/forge/game/trigger/TriggerHandler.java svneol=native#text/plain
|
||||||
forge-game/src/main/java/forge/game/trigger/TriggerLandPlayed.java svneol=native#text/plain
|
forge-game/src/main/java/forge/game/trigger/TriggerLandPlayed.java svneol=native#text/plain
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ public class SacrificeEffect extends SpellAbilityEffect {
|
|||||||
final int amount = AbilityUtils.calculateAmount(card, num, sa);
|
final int amount = AbilityUtils.calculateAmount(card, num, sa);
|
||||||
final List<Player> tgts = getTargetPlayers(sa);
|
final List<Player> tgts = getTargetPlayers(sa);
|
||||||
final boolean devour = sa.hasParam("Devour");
|
final boolean devour = sa.hasParam("Devour");
|
||||||
|
final boolean exploit = sa.hasParam("Exploit");
|
||||||
|
|
||||||
String valid = sa.getParam("SacValid");
|
String valid = sa.getParam("SacValid");
|
||||||
if (valid == null) {
|
if (valid == null) {
|
||||||
@@ -106,6 +107,12 @@ public class SacrificeEffect extends SpellAbilityEffect {
|
|||||||
runParams.put("Devoured", sac);
|
runParams.put("Devoured", sac);
|
||||||
game.getTriggerHandler().runTrigger(TriggerType.Devoured, runParams, false);
|
game.getTriggerHandler().runTrigger(TriggerType.Devoured, runParams, false);
|
||||||
}
|
}
|
||||||
|
if (exploit) {
|
||||||
|
final HashMap<String, Object> runParams = new HashMap<String, Object>();
|
||||||
|
runParams.put("Exploited", lKICopy);
|
||||||
|
runParams.put("Card", card);
|
||||||
|
game.getTriggerHandler().runTrigger(TriggerType.Exploited, runParams, false);
|
||||||
|
}
|
||||||
if (wasDestroyed || wasSacrificed) {
|
if (wasDestroyed || wasSacrificed) {
|
||||||
countSacrificed++;
|
countSacrificed++;
|
||||||
if (remSacrificed) {
|
if (remSacrificed) {
|
||||||
|
|||||||
@@ -3240,6 +3240,7 @@ public class CardFactoryUtil {
|
|||||||
}
|
}
|
||||||
} // Modular
|
} // Modular
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* WARNING: must keep this keyword processing before etbCounter keyword
|
* WARNING: must keep this keyword processing before etbCounter keyword
|
||||||
* processing.
|
* processing.
|
||||||
@@ -3402,6 +3403,18 @@ public class CardFactoryUtil {
|
|||||||
card.addTrigger(prowessTrigger);
|
card.addTrigger(prowessTrigger);
|
||||||
card.setSVar("BuffedBy", "Card.nonCreature+nonLand"); // for the AI
|
card.setSVar("BuffedBy", "Card.nonCreature+nonLand"); // for the AI
|
||||||
} // Prowess
|
} // Prowess
|
||||||
|
final int exploit = card.getAmountOfKeyword("Exploit");
|
||||||
|
card.removeIntrinsicKeyword("Exploit");
|
||||||
|
final StringBuilder trigExploit = new StringBuilder(
|
||||||
|
"Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield"
|
||||||
|
+ " | Execute$ ExploitSac | TriggerDescription$ Exploit (When this creature enters"
|
||||||
|
+ " the battlefield, you may sacrifice a creature.)");
|
||||||
|
final String abStringExploit = "DB$ Sacrifice | SacValid$ Creature | Exploit$ True | Optional$ True";
|
||||||
|
card.setSVar("ExploitSac", abStringExploit);
|
||||||
|
final Trigger exploitTrigger = TriggerHandler.parseTrigger(trigExploit.toString(), card, true);
|
||||||
|
for (int i = 0; i < exploit; i++) {
|
||||||
|
card.addTrigger(exploitTrigger);
|
||||||
|
} // Exploit
|
||||||
}
|
}
|
||||||
|
|
||||||
public final static void refreshTotemArmor(Card c) {
|
public final static void refreshTotemArmor(Card c) {
|
||||||
|
|||||||
@@ -0,0 +1,77 @@
|
|||||||
|
/*
|
||||||
|
* Forge: Play Magic: the Gathering.
|
||||||
|
* Copyright (C) 2011 Forge Team
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package forge.game.trigger;
|
||||||
|
|
||||||
|
import forge.game.card.Card;
|
||||||
|
import forge.game.spellability.SpellAbility;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Trigger_Championed class.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Forge
|
||||||
|
* @version $Id: TriggerChampioned.java 24762 2014-02-09 10:18:46Z swordshine $
|
||||||
|
* @since 1.0.15
|
||||||
|
*/
|
||||||
|
public class TriggerExploited extends Trigger {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Constructor for Trigger_Exploited.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* a {@link java.util.HashMap} object.
|
||||||
|
* @param host
|
||||||
|
* a {@link forge.game.card.Card} object.
|
||||||
|
* @param intrinsic
|
||||||
|
* the intrinsic
|
||||||
|
*/
|
||||||
|
public TriggerExploited(final java.util.Map<String, String> params, final Card host, final boolean intrinsic) {
|
||||||
|
super(params, host, intrinsic);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
|
@Override
|
||||||
|
public final boolean performTest(final java.util.Map<String, Object> runParams2) {
|
||||||
|
final Card exploited = (Card) runParams2.get("Exploited");
|
||||||
|
final Card source = (Card) runParams2.get("Card");
|
||||||
|
|
||||||
|
if (this.mapParams.containsKey("ValidCard")) {
|
||||||
|
if (!exploited.isValid(this.mapParams.get("ValidCard").split(","),
|
||||||
|
this.getHostCard().getController(), this.getHostCard())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.mapParams.containsKey("ValidSource")) {
|
||||||
|
if (!source.isValid(this.mapParams.get("ValidSource").split(","),
|
||||||
|
this.getHostCard().getController(), this.getHostCard())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
|
@Override
|
||||||
|
public final void setTriggeringObjects(final SpellAbility sa) {
|
||||||
|
sa.setTriggeringObject("Exploited", this.getRunParams().get("Exploited"));
|
||||||
|
sa.setTriggeringObject("Card", this.getRunParams().get("Card"));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -40,6 +40,7 @@ public enum TriggerType {
|
|||||||
Discarded(TriggerDiscarded.class),
|
Discarded(TriggerDiscarded.class),
|
||||||
Drawn(TriggerDrawn.class),
|
Drawn(TriggerDrawn.class),
|
||||||
Evolved(TriggerEvolved.class),
|
Evolved(TriggerEvolved.class),
|
||||||
|
Exploited(TriggerExploited.class),
|
||||||
FlippedCoin(TriggerFlippedCoin.class),
|
FlippedCoin(TriggerFlippedCoin.class),
|
||||||
LandPlayed(TriggerLandPlayed.class),
|
LandPlayed(TriggerLandPlayed.class),
|
||||||
LifeGained(TriggerLifeGained.class),
|
LifeGained(TriggerLifeGained.class),
|
||||||
|
|||||||
Reference in New Issue
Block a user