mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
TriggerEnlist: add Param for Goblin Morale Sergeant
This commit is contained in:
@@ -63,6 +63,7 @@ public enum AbilityKey {
|
|||||||
DividedShieldAmount("DividedShieldAmount"),
|
DividedShieldAmount("DividedShieldAmount"),
|
||||||
EchoPaid("EchoPaid"),
|
EchoPaid("EchoPaid"),
|
||||||
EffectOnly("EffectOnly"),
|
EffectOnly("EffectOnly"),
|
||||||
|
Enlisted("Enlisted"),
|
||||||
Exploited("Exploited"),
|
Exploited("Exploited"),
|
||||||
Explorer("Explorer"),
|
Explorer("Explorer"),
|
||||||
ExtraTurn("ExtraTurn"),
|
ExtraTurn("ExtraTurn"),
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ public class CostEnlist extends CostPartWithTrigger {
|
|||||||
payTrig.addRemembered(targetCard);
|
payTrig.addRemembered(targetCard);
|
||||||
|
|
||||||
final Map<AbilityKey, Object> runParams = AbilityKey.mapFromCard(payTrig.getHostCard());
|
final Map<AbilityKey, Object> runParams = AbilityKey.mapFromCard(payTrig.getHostCard());
|
||||||
|
runParams.put(AbilityKey.Enlisted, targetCard);
|
||||||
targetCard.getGame().getTriggerHandler().runTrigger(TriggerType.Enlisted, runParams, false);
|
targetCard.getGame().getTriggerHandler().runTrigger(TriggerType.Enlisted, runParams, false);
|
||||||
return targetCard;
|
return targetCard;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ import forge.game.trigger.TriggerHandler;
|
|||||||
import forge.game.trigger.TriggerType;
|
import forge.game.trigger.TriggerType;
|
||||||
|
|
||||||
public abstract class CostPartWithTrigger extends CostPartWithList {
|
public abstract class CostPartWithTrigger extends CostPartWithList {
|
||||||
|
/**
|
||||||
|
* Serializables need a version ID.
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public CostPartWithTrigger(final String amount, final String type, final String description) {
|
public CostPartWithTrigger(final String amount, final String type, final String description) {
|
||||||
super(amount, type, description);
|
super(amount, type, description);
|
||||||
|
|||||||
@@ -27,12 +27,15 @@ public class TriggerEnlisted extends Trigger {
|
|||||||
if (!matchesValidParam("ValidCard", runParams.get(AbilityKey.Card))) {
|
if (!matchesValidParam("ValidCard", runParams.get(AbilityKey.Card))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!matchesValidParam("ValidEnlisted", runParams.get(AbilityKey.Enlisted))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setTriggeringObjects(SpellAbility sa, Map<AbilityKey, Object> runParams) {
|
public void setTriggeringObjects(SpellAbility sa, Map<AbilityKey, Object> runParams) {
|
||||||
sa.setTriggeringObjectsFrom(runParams, AbilityKey.Card);
|
sa.setTriggeringObjectsFrom(runParams, AbilityKey.Card, AbilityKey.Enlisted);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
Name:Goblin Morale Sergeant
|
||||||
|
ManaCost:1 R
|
||||||
|
Types:Creature Goblin Soldier
|
||||||
|
PT:2/1
|
||||||
|
K:Haste
|
||||||
|
K:Enlist
|
||||||
|
T:Mode$ Enlisted | ValidCard$ Card.Self | ValidEnlisted$ Card.nonToken | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigConjure | TriggerDescription$ Whenever CARDNAME Sergeant enlists a nontoken creature, you may conjure a duplicate of that creature into the top five cards of your library at random. The duplicate perpetually gets +1/+0 and gains haste.
|
||||||
|
SVar:TrigConjure:DB$ MakeCard | Conjure$ True | DefinedName$ TriggeredEnlisted | Zone$ Library | RememberMade$ True | SubAbility$ DBReorder
|
||||||
|
SVar:DBReorder:DB$ ChangeZoneAll | ChangeType$ Card.IsRemembered | Origin$ Library | Destination$ Library | Defined$ Top5 | SubAbility$ DBEffect
|
||||||
|
SVar:DBEffect:DB$ Effect | Name$ Goblin Morale Sergeant's Perpetual Effect | RememberObjects$ Remembered | StaticAbilities$ PerpetualAbility | Duration$ Permanent | SubAbility$ DBCleanup
|
||||||
|
SVar:PerpetualAbility:Mode$ Continuous | AddPower$ 1 | AddKeyword$ Haste | Affected$ Card.IsRemembered | EffectZone$ Command | AffectedZone$ Battlefield,Hand,Graveyard,Exile,Stack,Library,Command | Description$ The duplicate perpetually gets +1/+0 and gains haste.
|
||||||
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||||
|
Oracle:Haste\nEnlist\nWhenever Goblin Morale Sergeant enlists a nontoken creature, you may conjure a duplicate of that creature into the top five cards of your library at random. The duplicate perpetually gets +1/+0 and gains haste.
|
||||||
Reference in New Issue
Block a user