Merge pull request #152 from Northmoc/sncJinnieFay

SNC: Jinnie Fay, Jetmir's Second and support
This commit is contained in:
Agetian
2022-04-27 06:42:29 +03:00
committed by GitHub
4 changed files with 34 additions and 4 deletions

View File

@@ -26,14 +26,18 @@ public class ReplaceTokenEffect extends SpellAbilityEffect {
final Card card = sa.getHostCard();
final Player p = sa.getActivatingPlayer();
final Game game = card.getGame();
SpellAbility repSA = sa;
if (repSA.getReplacingObjects().isEmpty()) {
repSA = sa.getRootAbility();
}
// ReplaceToken Effect only applies to one Player
Player affected = (Player) sa.getReplacingObject(AbilityKey.Player);
TokenCreateTable table = (TokenCreateTable) sa.getReplacingObject(AbilityKey.Token);
Player affected = (Player) repSA.getReplacingObject(AbilityKey.Player);
TokenCreateTable table = (TokenCreateTable) repSA.getReplacingObject(AbilityKey.Token);
@SuppressWarnings("unchecked")
Map<AbilityKey, Object> originalParams = (Map<AbilityKey, Object>) sa
.getReplacingObject(AbilityKey.OriginalParams);
Map<AbilityKey, Object> originalParams =
(Map<AbilityKey, Object>) repSA.getReplacingObject(AbilityKey.OriginalParams);
// currently the only ones that changes the amount does double it
if ("Amount".equals(sa.getParam("Type"))) {

View File

@@ -0,0 +1,12 @@
Name:Jinnie Fay, Jetmir's Second
ManaCost:RG G GW
Types:Legendary Creature Elf Druid
PT:3/3
R:Event$ CreateToken | ActiveZones$ Battlefield | ValidToken$ Card.YouCtrl | ReplaceWith$ GenericChoice | Optional$ True | Description$ If you would create one or more tokens, you may instead create that many 2/2 green Cat creature tokens with haste or that many 3/1 green Dog creature tokens with vigilance.
SVar:GenericChoice:DB$ GenericChoice | Choices$ Cat,Dog
SVar:Cat:DB$ ReplaceToken | Type$ ReplaceToken | ValidCard$ Card.YouCtrl | TokenScript$ g_2_2_cat_haste | SpellDescription$ Create that many 2/2 green Cat creature tokens with haste
SVar:Dog:DB$ ReplaceToken | Type$ ReplaceToken | ValidCard$ Card.YouCtrl | TokenScript$ g_3_1_dog_vigilance | SpellDescription$ Create that many 3/1 green Dog creature tokens with vigilance
DeckNeeds:Ability$Token
DeckHas:Type$Cat|Dog
AI:RemoveDeck:Random
Oracle:If you would create one or more tokens, you may instead create that many 2/2 green Cat creature tokens with haste or that many 3/1 green Dog creature tokens with vigilance.

View File

@@ -0,0 +1,7 @@
Name:Cat Token
ManaCost:no cost
Colors:green
Types:Creature Cat
PT:2/2
K:Haste
Oracle:Haste

View File

@@ -0,0 +1,7 @@
Name:Dog Token
ManaCost:no cost
Colors:green
Types:Creature Dog
PT:3/1
K:Vigilance
Oracle:Vigilance