mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Initial implementation of the new keyword ability Monstrousity and its related trigger
- Theros: Added Shipbreaker Kraken
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -9936,6 +9936,7 @@ res/cardsfolder/s/shinen_of_stars_light.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/shinewend.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/shinka_gatekeeper.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/shinka_the_bloodsoaked_keep.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/shipbreaker_kraken.txt -text
|
||||
res/cardsfolder/s/shirei_shizos_caretaker.txt -text
|
||||
res/cardsfolder/s/shisato_whispering_hunter.txt -text
|
||||
res/cardsfolder/s/shiv.txt -text
|
||||
@@ -14606,6 +14607,7 @@ src/main/java/forge/card/trigger/TriggerAttackerBlocked.java svneol=native#text/
|
||||
src/main/java/forge/card/trigger/TriggerAttackerUnblocked.java svneol=native#text/plain
|
||||
src/main/java/forge/card/trigger/TriggerAttackersDeclared.java svneol=native#text/plain
|
||||
src/main/java/forge/card/trigger/TriggerAttacks.java svneol=native#text/plain
|
||||
src/main/java/forge/card/trigger/TriggerBecomeMonstrous.java -text
|
||||
src/main/java/forge/card/trigger/TriggerBecomesTarget.java svneol=native#text/plain
|
||||
src/main/java/forge/card/trigger/TriggerBlockersDeclared.java -text
|
||||
src/main/java/forge/card/trigger/TriggerBlocks.java svneol=native#text/plain
|
||||
|
||||
9
res/cardsfolder/s/shipbreaker_kraken.txt
Normal file
9
res/cardsfolder/s/shipbreaker_kraken.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Name:Shipbreaker Kraken
|
||||
ManaCost:4 U U
|
||||
Types:Creature Kraken
|
||||
PT:6/6
|
||||
K:Monstrousity 4:6 U U
|
||||
T:Mode$ BecomeMonstrous | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigTap | TriggerDescription$ When CARDNAMEs becomes monstrous, tap up to four target creatures. Those creatures don't untap during their controllers' untap steps for as long as you control CARDNAME.
|
||||
SVar:TrigTap:AB$ Tap | Cost$ 0 | ValidTgts$ Creature | TargetMin$ 0 | TargetMax$ 4 | SubAbility$ DBPump
|
||||
SVar:DBPump:DB$ Pump | Defined$ Targeted | KW$ HIDDEN CARDNAME doesn't untap during your untap step. | UntilLoseControlOfHost$ True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/shipbreaker_kraken.jpg
|
||||
@@ -169,6 +169,8 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
|
||||
private boolean unearthed;
|
||||
|
||||
private boolean monstrous = false;
|
||||
|
||||
private boolean suspendCast = false;
|
||||
private boolean suspend = false;
|
||||
|
||||
@@ -6568,6 +6570,10 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
if (this.devouredCards.size() != 0) {
|
||||
return false;
|
||||
}
|
||||
} else if (property.equals("IsNotMonstrous")) {
|
||||
if (this.isMonstrous()) {
|
||||
return false;
|
||||
}
|
||||
} else if (property.startsWith("non")) {
|
||||
// ... Other Card types
|
||||
if (this.isType(property.substring(3))) {
|
||||
@@ -7721,6 +7727,29 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
return this.evoked;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Setter for the field <code>monstrous</code>.
|
||||
* </p>
|
||||
*
|
||||
* @param monstrous
|
||||
* a boolean.
|
||||
*/
|
||||
public final void setMonstrous(final boolean monstrous) {
|
||||
this.monstrous = monstrous;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* isMonstrous.
|
||||
* </p>
|
||||
*
|
||||
* @return a boolean.
|
||||
*/
|
||||
public final boolean isMonstrous() {
|
||||
return this.monstrous;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* TODO Write javadoc for this method.
|
||||
|
||||
@@ -3,7 +3,6 @@ package forge.card.ability.effects;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import forge.Card;
|
||||
import forge.CounterType;
|
||||
import forge.card.ability.AbilityUtils;
|
||||
@@ -110,6 +109,12 @@ public class CountersPutEffect extends SpellAbilityEffect {
|
||||
runParams.put("Card", tgtCard);
|
||||
tgtCard.getController().getGame().getTriggerHandler().runTrigger(TriggerType.Evolved, runParams, false);
|
||||
}
|
||||
if (sa.hasParam("Monstrousity")) {
|
||||
tgtCard.setMonstrous(true);
|
||||
final HashMap<String, Object> runParams = new HashMap<String, Object>();
|
||||
runParams.put("Card", tgtCard);
|
||||
tgtCard.getController().getGame().getTriggerHandler().runTrigger(TriggerType.BecomeMonstrous, runParams, false);
|
||||
}
|
||||
} else {
|
||||
// adding counters to something like re-suspend cards
|
||||
tgtCard.addCounter(counterType, counterAmount, false);
|
||||
|
||||
@@ -2066,6 +2066,21 @@ public class CardFactoryUtil {
|
||||
if (evokePos != -1) {
|
||||
card.addSpellAbility(makeEvokeSpell(card, card.getKeyword().get(evokePos)));
|
||||
}
|
||||
final int monstrousPos = hasKeyword(card, "Monstrousity");
|
||||
if (monstrousPos != -1) {
|
||||
final String parse = card.getKeyword().get(monstrousPos).toString();
|
||||
final String[] k = parse.split(":");
|
||||
final String magnitude = k[0].substring(13);
|
||||
final String manacost = k[1];
|
||||
card.removeIntrinsicKeyword(parse);
|
||||
|
||||
String effect = "AB$ PutCounter | Cost$ " + manacost + " | IsPresent$ " +
|
||||
"Card.Self+IsNotMonstrous | Monstrousity$ True | CounterNum$ " +
|
||||
magnitude + " | CounterType$ P1P1 | SpellDescription$ Monstrosity " +
|
||||
magnitude + " (If this creature isn't monstrous, put four +1/+1 " +
|
||||
"counters on it and it becomes monstrous.)";
|
||||
card.addSpellAbility(AbilityFactory.getAbility(effect, card));
|
||||
}
|
||||
|
||||
if (hasKeyword(card, "Cycling") != -1) {
|
||||
final int n = hasKeyword(card, "Cycling");
|
||||
|
||||
67
src/main/java/forge/card/trigger/TriggerBecomeMonstrous.java
Normal file
67
src/main/java/forge/card/trigger/TriggerBecomeMonstrous.java
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* 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.card.trigger;
|
||||
|
||||
import forge.Card;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Trigger_TurnFaceUp class.
|
||||
* </p>
|
||||
*
|
||||
* @author Forge
|
||||
* @version $Id: TriggerTurnFaceUp.java 21543 2013-05-19 21:35:20Z Max mtg $
|
||||
*/
|
||||
public class TriggerBecomeMonstrous extends Trigger {
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Constructor for Trigger_BecomeMonstrous.
|
||||
* </p>
|
||||
*
|
||||
* @param params
|
||||
* a {@link java.util.HashMap} object.
|
||||
* @param host
|
||||
* a {@link forge.Card} object.
|
||||
* @param intrinsic
|
||||
* the intrinsic
|
||||
*/
|
||||
public TriggerBecomeMonstrous(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) {
|
||||
if (this.mapParams.containsKey("ValidCard")) {
|
||||
if (!matchesValid(runParams2.get("Card"), this.mapParams.get("ValidCard").split(","),
|
||||
this.getHostCard())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public final void setTriggeringObjects(final SpellAbility sa) {
|
||||
sa.setTriggeringObject("Card", this.getRunParams().get("Card"));
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@ public enum TriggerType {
|
||||
AttackersDeclared(TriggerAttackersDeclared.class),
|
||||
AttackerUnblocked(TriggerAttackerUnblocked.class),
|
||||
Attacks(TriggerAttacks.class),
|
||||
BecomeMonstrous(TriggerBecomeMonstrous.class),
|
||||
BecomesTarget(TriggerBecomesTarget.class),
|
||||
BlockersDeclared(TriggerBlockersDeclared.class),
|
||||
Blocks(TriggerBlocks.class),
|
||||
|
||||
Reference in New Issue
Block a user