mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Added Multani's Presence and Lullmage Mentor
This commit is contained in:
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -6206,6 +6206,7 @@ res/cardsfolder/l/lu_xun_scholar_general.txt svneol=native#text/plain
|
||||
res/cardsfolder/l/lucent_liminid.txt svneol=native#text/plain
|
||||
res/cardsfolder/l/ludevics_test_subject_ludevics_abomination.txt -text
|
||||
res/cardsfolder/l/lull.txt svneol=native#text/plain
|
||||
res/cardsfolder/l/lullmage_mentor.txt -text
|
||||
res/cardsfolder/l/lumbering_satyr.txt svneol=native#text/plain
|
||||
res/cardsfolder/l/lumberknot.txt -text
|
||||
res/cardsfolder/l/lumengrid_augur.txt -text
|
||||
@@ -6940,6 +6941,7 @@ res/cardsfolder/m/multani_maro_sorcerer.txt svneol=native#text/plain
|
||||
res/cardsfolder/m/multanis_acolyte.txt svneol=native#text/plain
|
||||
res/cardsfolder/m/multanis_decree.txt svneol=native#text/plain
|
||||
res/cardsfolder/m/multanis_harmony.txt -text svneol=unset#text/plain
|
||||
res/cardsfolder/m/multanis_presence.txt -text
|
||||
res/cardsfolder/m/mundungu.txt -text
|
||||
res/cardsfolder/m/mungha_wurm.txt svneol=native#text/plain
|
||||
res/cardsfolder/m/muraganda_petroglyphs.txt svneol=native#text/plain
|
||||
@@ -13789,6 +13791,7 @@ src/main/java/forge/card/trigger/TriggerChangesZone.java svneol=native#text/plai
|
||||
src/main/java/forge/card/trigger/TriggerClashed.java svneol=native#text/plain
|
||||
src/main/java/forge/card/trigger/TriggerCounterAdded.java svneol=native#text/plain
|
||||
src/main/java/forge/card/trigger/TriggerCounterRemoved.java -text
|
||||
src/main/java/forge/card/trigger/TriggerCountered.java -text
|
||||
src/main/java/forge/card/trigger/TriggerCycled.java svneol=native#text/plain
|
||||
src/main/java/forge/card/trigger/TriggerDamageDone.java svneol=native#text/plain
|
||||
src/main/java/forge/card/trigger/TriggerDiscarded.java svneol=native#text/plain
|
||||
|
||||
10
res/cardsfolder/l/lullmage_mentor.txt
Normal file
10
res/cardsfolder/l/lullmage_mentor.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
Name:Lullmage Mentor
|
||||
ManaCost:1 U U
|
||||
Types:Creature Merfolk Wizard
|
||||
PT:2/2
|
||||
T:Mode$ Countered | ValidCause$ Card.YouCtrl | ValidCard$ Card | OptionalDecider$ You | Execute$ TrigToken | TriggerDescription$ Whenever a spell or ability you control counters a spell, you may put a 1/1 blue Merfolk creature token onto the battlefield.
|
||||
SVar:TrigToken:AB$ Token | Cost$ 0 | TokenImage$ U 1 1 Merfolk | TokenAmount$ 1 | TokenName$ Merfolk | TokenTypes$ Creature,Merfolk | TokenOwner$ You | TokenColors$ Blue | TokenPower$ 1 | TokenToughness$ 1
|
||||
A:AB$ Counter | Cost$ tapXType<7/Merfolk> | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | SpellDescription$ Counter target spell.
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/lullmage_mentor.jpg
|
||||
Oracle:Whenever a spell or ability you control counters a spell, you may put a 1/1 blue Merfolk creature token onto the battlefield.\nTap seven untapped Merfolk you control: Counter target spell.
|
||||
SetInfo:ZEN Rare
|
||||
8
res/cardsfolder/m/multanis_presence.txt
Normal file
8
res/cardsfolder/m/multanis_presence.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
Name:Multani's Presence
|
||||
ManaCost:G
|
||||
Types:Enchantment
|
||||
T:Mode$ Countered | ValidCard$ Card | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ DBDraw | TriggerDescription$ Whenever a spell you've cast is countered, draw a card.
|
||||
SVar:DBDraw:AB$ Draw | Cost$ 0 | NumCards$ 1
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/multanis_presence.jpg
|
||||
Oracle:Whenever a spell you've cast is countered, draw a card.
|
||||
SetInfo:ULG Uncommon
|
||||
@@ -166,6 +166,7 @@ u_1_1_camarid.jpg http://www.cardforge.org/fpics/tokens/u_1
|
||||
u_1_1_cloud_sprite.jpg http://www.cardforge.org/fpics/tokens/u_1_1_cloud_sprite.jpg
|
||||
u_1_1_faerie.jpg http://www.cardforge.org/fpics/tokens/u_1_1_faerie.jpg
|
||||
u_1_1_illusion.jpg http://www.cardforge.org/fpics/tokens/u_1_1_illusion.jpg
|
||||
u_1_1_merfolk.jpg http://www.cardforge.org/fpics/tokens/u_1_1_merfolk.jpg
|
||||
u_1_1_merfolk_wizard.jpg http://www.cardforge.org/fpics/tokens/u_1_1_merfolk_wizard.jpg
|
||||
u_1_1_thopter.jpg http://www.cardforge.org/fpics/tokens/u_1_1_thopter.jpg
|
||||
u_1_1_spirit_avr.jpg http://www.cardforge.org/fpics/tokens/u_1_1_spirit_avr.jpg
|
||||
@@ -236,5 +237,4 @@ morph.jpg http://www.cardforge.org/fpics/effects/mo
|
||||
# //These tokens are not currently used by any cards in Forge, but links provided should they be scripted so the correct name is used:
|
||||
# //g_1_1_wolves_of_the_hunt.jpg http://www.cardforge.org/fpics/tokens/g_1_1_wolves_of_the_hunt.jpg [LEG] Master of the Hunt
|
||||
# //rg_1_1_goblin_warrior.jpg http://www.cardforge.org/fpics/tokens/rg_1_1_goblin_warrior.jpg [SHM] Wort, the Raidmother
|
||||
# //u_1_1_merfolk.jpg http://www.cardforge.org/fpics/tokens/u_1_1_merfolk.jpg [ZEN] Lullmage Mentor
|
||||
# //w_1_1_knight.jpg http://www.cardforge.org/fpics/tokens/w_1_1_knight.jpg [ALL] Errand of Duty
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package forge.card.ability.effects;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import forge.Card;
|
||||
@@ -10,6 +11,7 @@ import forge.card.cardfactory.CardFactoryUtil;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
import forge.card.spellability.SpellAbilityStackInstance;
|
||||
import forge.card.spellability.SpellPermanent;
|
||||
import forge.card.trigger.TriggerType;
|
||||
|
||||
public class CounterEffect extends SpellAbilityEffect {
|
||||
@Override
|
||||
@@ -164,6 +166,13 @@ public class CounterEffect extends SpellAbilityEffect {
|
||||
throw new IllegalArgumentException("AbilityFactory_CounterMagic: Invalid Destination argument for card "
|
||||
+ srcSA.getSourceCard().getName());
|
||||
}
|
||||
// Run triggers
|
||||
final HashMap<String, Object> runParams = new HashMap<String, Object>();
|
||||
runParams.put("Player", tgtSA.getActivatingPlayer());
|
||||
runParams.put("Card", tgtSA.getSourceCard());
|
||||
runParams.put("Cause", srcSA.getSourceCard());
|
||||
srcSA.getActivatingPlayer().getGame().getTriggerHandler().runTrigger(TriggerType.Countered, runParams, false);
|
||||
|
||||
|
||||
if (!tgtSA.isAbility()) {
|
||||
System.out.println("Send countered spell to " + destination);
|
||||
|
||||
97
src/main/java/forge/card/trigger/TriggerCountered.java
Normal file
97
src/main/java/forge/card/trigger/TriggerCountered.java
Normal file
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* 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_Countered class.
|
||||
* </p>
|
||||
*
|
||||
* @author Forge
|
||||
* @version $Id: TriggerCountered.java 17802 2012-10-31 08:05:14Z Max mtg $
|
||||
*/
|
||||
public class TriggerCountered extends Trigger {
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Constructor for Trigger_Countered.
|
||||
* </p>
|
||||
*
|
||||
* @param params
|
||||
* a {@link java.util.HashMap} object.
|
||||
* @param host
|
||||
* a {@link forge.Card} object.
|
||||
* @param intrinsic
|
||||
* the intrinsic
|
||||
*/
|
||||
public TriggerCountered(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.getMapParams().containsKey("ValidCard")) {
|
||||
if (!matchesValid(runParams2.get("Card"), this.getMapParams().get("ValidCard").split(","),
|
||||
this.getHostCard())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getMapParams().containsKey("ValidPlayer")) {
|
||||
if (!matchesValid(runParams2.get("Player"), this.getMapParams().get("ValidPlayer").split(","),
|
||||
this.getHostCard())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getMapParams().containsKey("ValidCause")) {
|
||||
if (runParams2.get("Cause") == null) {
|
||||
return false;
|
||||
}
|
||||
if (!matchesValid(runParams2.get("Cause"), this.getMapParams().get("ValidCause").split(","),
|
||||
this.getHostCard())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public final Trigger getCopy() {
|
||||
final Trigger copy = new TriggerCountered(this.getMapParams(), this.getHostCard(), this.isIntrinsic());
|
||||
if (this.getOverridingAbility() != null) {
|
||||
copy.setOverridingAbility(this.getOverridingAbility());
|
||||
}
|
||||
|
||||
copyFieldsTo(copy);
|
||||
return copy;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public final void setTriggeringObjects(final SpellAbility sa) {
|
||||
sa.setTriggeringObject("Card", this.getRunParams().get("Card"));
|
||||
sa.setTriggeringObject("Cause", this.getRunParams().get("Cause"));
|
||||
sa.setTriggeringObject("Player", this.getRunParams().get("Player"));
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@ public enum TriggerType {
|
||||
ChangesZone(TriggerChangesZone.class),
|
||||
|
||||
Clashed(TriggerClashed.class),
|
||||
Countered(TriggerCountered.class),
|
||||
TapsForMana(TriggerTapsForMana.class),
|
||||
CounterAdded(TriggerCounterAdded.class),
|
||||
CounterRemoved(TriggerCounterRemoved.class),
|
||||
|
||||
Reference in New Issue
Block a user