mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
KHM: Codespell Cleric and support
This commit is contained in:
committed by
Hans Mackowiak
parent
0b6d0914a0
commit
1eec7475fe
@@ -17,16 +17,17 @@
|
||||
*/
|
||||
package forge.game.trigger;
|
||||
|
||||
import com.google.common.base.Predicates;
|
||||
import com.google.common.collect.Iterables;
|
||||
import forge.game.ability.AbilityKey;
|
||||
import forge.game.ability.AbilityUtils;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.card.CardFactoryUtil;
|
||||
import forge.game.card.CardUtil;
|
||||
import forge.game.card.*;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
import forge.game.zone.ZoneType;
|
||||
import forge.util.Expressions;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import forge.util.Localizer;
|
||||
@@ -171,6 +172,20 @@ public class TriggerChangesZone extends Trigger {
|
||||
}
|
||||
}
|
||||
|
||||
/* this trigger only activates for the nth spell you cast this turn */
|
||||
if (hasParam("ConditionYouCastThisTurn")) {
|
||||
final String compare = getParam("ConditionYouCastThisTurn");
|
||||
List<Card> thisTurnCast = CardUtil.getThisTurnCast("Card", getHostCard());
|
||||
thisTurnCast = CardLists.filterControlledByAsList(thisTurnCast, getHostCard().getController());
|
||||
|
||||
// checks which card this spell was the castSA
|
||||
int left = Iterables.indexOf(thisTurnCast, CardPredicates.castSA(Predicates.equalTo(getHostCard().getCastSA())));
|
||||
int right = Integer.parseInt(compare.substring(2));
|
||||
if (!Expressions.compare(left + 1, compare, right)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
9
forge-gui/res/cardsfolder/upcoming/codespell_cleric.txt
Normal file
9
forge-gui/res/cardsfolder/upcoming/codespell_cleric.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Name:Codespell Cleric
|
||||
ManaCost:W
|
||||
Types:Creature Human Cleric
|
||||
PT:1/1
|
||||
K:Vigilance
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | ConditionYouCastThisTurn$ EQ2 | Execute$ TrigPutCounter | TriggerDescription$ When CARDNAME enters the battlefield, if it was the second spell you cast this turn, put a +1/+1 counter on target creature.
|
||||
SVar:TrigPutCounter:DB$ PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ 1
|
||||
DeckHas:Ability$Counters
|
||||
Oracle:Vigilance\nWhen Codespell Cleric enters the battlefield, if it was the second spell you cast this turn, put a +1/+1 counter on target creature.
|
||||
Reference in New Issue
Block a user