diff --git a/Mage.Sets/src/mage/cards/o/OathOfNissa.java b/Mage.Sets/src/mage/cards/o/OathOfNissa.java index aeed1d4951e..8777eff8af6 100644 --- a/Mage.Sets/src/mage/cards/o/OathOfNissa.java +++ b/Mage.Sets/src/mage/cards/o/OathOfNissa.java @@ -61,7 +61,7 @@ import mage.target.TargetCard; public class OathOfNissa extends CardImpl { public OathOfNissa(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); this.supertype.add("Legendary"); // When Oath of Nissa enters the battlefield, look at the top three cards of your library. You may reveal a creature, land, or planeswalker card from among them and put it into your hand. Put the rest on the bottom of your library in any order. @@ -143,7 +143,7 @@ class OathOfNissaEffect extends OneShotEffect { class OathOfNissaSpendAnyManaEffect extends AsThoughEffectImpl implements AsThoughManaEffect { public OathOfNissaSpendAnyManaEffect() { - super(AsThoughEffectType.SPEND_OTHER_MANA, Duration.Custom, Outcome.Benefit); + super(AsThoughEffectType.SPEND_OTHER_MANA, Duration.WhileOnBattlefield, Outcome.Benefit); staticText = "you may spend mana as though it were mana of any color to cast planeswalker spells"; } diff --git a/Mage.Sets/src/mage/cards/t/TanaTheBloodsower.java b/Mage.Sets/src/mage/cards/t/TanaTheBloodsower.java index 60de377bc7d..26f875a7ca3 100644 --- a/Mage.Sets/src/mage/cards/t/TanaTheBloodsower.java +++ b/Mage.Sets/src/mage/cards/t/TanaTheBloodsower.java @@ -45,13 +45,13 @@ import mage.players.Player; /** * - * @author LevelX2 + * @author spjspj */ public class TanaTheBloodsower extends CardImpl { public TanaTheBloodsower(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{G}"); - + this.supertype.add("Legendary"); this.subtype.add("Elf"); this.subtype.add("Druid"); @@ -61,7 +61,8 @@ public class TanaTheBloodsower extends CardImpl { // Trample this.addAbility(TrampleAbility.getInstance()); // Whenever Tana, the Bloodsower deals combat damage to a player, create that many 1/1 green Saproling creature tokens. - this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new TanaTheBloodsowerEffect(), false)); + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new TanaTheBloodsowerEffect(), false, true)); + // Partner this.addAbility(PartnerAbility.getInstance()); } @@ -77,29 +78,30 @@ public class TanaTheBloodsower extends CardImpl { } class TanaTheBloodsowerEffect extends OneShotEffect { - + public TanaTheBloodsowerEffect() { super(Outcome.PutCreatureInPlay); this.staticText = "create that many 1/1 green Saproling creature tokens"; } - + public TanaTheBloodsowerEffect(final TanaTheBloodsowerEffect effect) { super(effect); } - + @Override public TanaTheBloodsowerEffect copy() { return new TanaTheBloodsowerEffect(this); } - + @Override public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Integer damage = (Integer) getValue("damage"); - if (damage > 0) { - return new CreateTokenEffect(new SaprolingToken(), damage).apply(game, source); + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + if (player != null) { + int amount = (Integer)getValue("damage"); + if (amount > 0) { + return new CreateTokenEffect(new SaprolingToken(), amount).apply(game, source); } + return true; } return false; } diff --git a/Utils/gen-simple-cards-by-set.pl b/Utils/gen-simple-cards-by-set.pl index ef72241097c..f7dbd54e2e8 100755 --- a/Utils/gen-simple-cards-by-set.pl +++ b/Utils/gen-simple-cards-by-set.pl @@ -1,58 +1,60 @@ -#!/usr/bin/perl -w - -#author: North - -use strict; - - -my $dataFile = 'mtg-cards-data.txt'; -my $knownSetsFile = "known-sets.txt"; - -my %knownSets; -my @setCards; - -sub toCamelCase { - my $string = $_[0]; - $string =~ s/\b([\w']+)\b/ucfirst($1)/ge; - $string =~ s/[-,\s\']//g; - $string; -} - -print 'Enter a set name: '; -my $setName = ; -chomp $setName; - - -open (DATA, $dataFile) || die "can't open $dataFile"; -while(my $line = ) { - my @data = split('\\|', $line); - if ($data[1] eq $setName) { - push(@setCards, \@data); - } -} -close(DATA); - -open (DATA, $knownSetsFile) || die "can't open $knownSetsFile"; -while(my $line = ) { - my @data = split('\\|', $line); - $knownSets{$data[0]}= $data[1]; -} -close(DATA); - -if(!exists $knownSets{$setName}) { - die "You must add the set to known-sets.txt\n"; -} - -my $packageName = $knownSets{$setName}; - -$setName =~ s/"/\\"/g; -system("./gen-existing-cards-by-set.pl \"$setName\""); - -# Generate missing simple cards -print "Simple cards generated: \n"; -foreach my $cardName (@setCards) { - my $fileName = "../Mage.Sets/src/mage/sets/" . $packageName . "/" . toCamelCase(${$cardName}[0]) . ".java"; - if(!-e $fileName) { - system("./gen-card.pl \"${$cardName}[0]\" true"); - } +#!/usr/bin/perl -w + +#author: North + +use strict; + + +my $dataFile = 'mtg-cards-data.txt'; +my $knownSetsFile = "known-sets.txt"; + +my %knownSets; +my @setCards; + +sub toCamelCase { + my $string = $_[0]; + $string =~ s/\b([\w']+)\b/ucfirst($1)/ge; + $string =~ s/[-,\s\']//g; + $string; +} + +print 'Enter a set name: '; +my $setName = ; +chomp $setName; + + +open (DATA, $dataFile) || die "can't open $dataFile"; +while(my $line = ) { + my @data = split('\\|', $line); + if ($data[1] eq $setName) { + push(@setCards, \@data); + } +} +close(DATA); + +open (DATA, $knownSetsFile) || die "can't open $knownSetsFile"; +while(my $line = ) { + my @data = split('\\|', $line); + $knownSets{$data[0]}= $data[1]; +} +close(DATA); + +if(!exists $knownSets{$setName}) { + die "You must add the set to known-sets.txt\n"; +} + +my $packageName = $knownSets{$setName}; + +$setName =~ s/"/\\"/g; +system("gen-existing-cards-by-set.pl \"$setName\""); + +# Generate missing simple cards +print "Simple cards generated: \n"; +foreach my $cardName (@setCards) { + print "CardName: ".${$cardName}[0]." \n"; + my $fileName = "../Mage.Sets/src/mage/sets/" . $packageName . "/" . toCamelCase(${$cardName}[0]) . ".java"; + if(!-e $fileName) { + print "fileName: ".$fileName." \n"; + system("gen-card.pl \"${$cardName}[0]\" true"); + } } \ No newline at end of file