mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Nils, Discipline Enforcer
This commit is contained in:
@@ -20,6 +20,7 @@ package forge.game.staticability;
|
|||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
||||||
|
|
||||||
import forge.game.GameEntity;
|
import forge.game.GameEntity;
|
||||||
|
import forge.game.ability.AbilityUtils;
|
||||||
import forge.game.card.Card;
|
import forge.game.card.Card;
|
||||||
import forge.game.card.CardCollectionView;
|
import forge.game.card.CardCollectionView;
|
||||||
import forge.game.card.CardFactoryUtil;
|
import forge.game.card.CardFactoryUtil;
|
||||||
@@ -128,14 +129,14 @@ public class StaticAbilityCantAttackBlock {
|
|||||||
*
|
*
|
||||||
* @param stAb
|
* @param stAb
|
||||||
* a StaticAbility
|
* a StaticAbility
|
||||||
* @param card
|
* @param attacker
|
||||||
* the card
|
* the card
|
||||||
* @return a Cost
|
* @return a Cost
|
||||||
*/
|
*/
|
||||||
public static Cost getAttackCost(final StaticAbility stAb, final Card card, final GameEntity target) {
|
public static Cost getAttackCost(final StaticAbility stAb, final Card attacker, final GameEntity target) {
|
||||||
final Card hostCard = stAb.getHostCard();
|
final Card hostCard = stAb.getHostCard();
|
||||||
|
|
||||||
if (!stAb.matchesValidParam("ValidCard", card)) {
|
if (!stAb.matchesValidParam("ValidCard", attacker)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,7 +145,14 @@ public class StaticAbilityCantAttackBlock {
|
|||||||
}
|
}
|
||||||
String costString = stAb.getParam("Cost");
|
String costString = stAb.getParam("Cost");
|
||||||
if (stAb.hasSVar(costString)) {
|
if (stAb.hasSVar(costString)) {
|
||||||
costString = Integer.toString(CardFactoryUtil.xCount(hostCard, stAb.getSVar(costString)));
|
boolean remember = stAb.hasParam("RememberingAttacker");
|
||||||
|
if (remember) {
|
||||||
|
hostCard.addRemembered(attacker);
|
||||||
|
}
|
||||||
|
costString = Integer.toString(AbilityUtils.calculateAmount(hostCard, stAb.getSVar(costString), stAb));
|
||||||
|
if (remember) {
|
||||||
|
hostCard.removeRemembered(attacker);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Cost(costString, true);
|
return new Cost(costString, true);
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
Name:Nils, Discipline Enforcer
|
||||||
|
ManaCost:2 W
|
||||||
|
Types:Legendary Creature Human Cleric
|
||||||
|
PT:2/2
|
||||||
|
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ PutCounterOneEach | TriggerDescription$ At the beginning of your end step, for each player, put a +1/+1 counter on up to one target creature that player controls.
|
||||||
|
SVar:PutCounterOneEach:DB$ PutCounter | CounterType$ P1P1 | CounterNum$ 1 | ValidTgts$ Creature | TgtPrompt$ Select up to one target creature each player controls. | TargetMin$ 0 | TargetMax$ OneEach | TargetsWithDifferentControllers$ True
|
||||||
|
S:Mode$ CantAttackUnless | ValidCard$ Creature.HasCounters | Target$ You,Planeswalker.YouCtrl | Cost$ X | RememberingAttacker$ True | Description$ Each creature with one or more counters on it can't attack you or a planeswalker you control unless its controller pays {X}, where X is the number of counters on that creature.
|
||||||
|
SVar:OneEach:PlayerCountPlayers$Amount
|
||||||
|
SVar:X:Remembered$CardCounters.ALL
|
||||||
|
DeckHas:Ability$Counters
|
||||||
|
Oracle:At the beginning of your end step, for each player, put a +1/+1 counter on up to one target creature that player controls.\nEach creature with one or more counters on it can’t attack you or planeswalkers you control unless its controller pays {X}, where X is the number of counters on that creature.
|
||||||
Reference in New Issue
Block a user