1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-11 17:00:08 -09:00

[KLD] Some more fixes.

This commit is contained in:
LevelX2 2016-09-17 20:18:54 +02:00
parent bf73eb4042
commit a1e70e21f4
5 changed files with 57 additions and 21 deletions
Mage.Sets/src/mage/sets
Mage/src/main/java/mage/cards
Utils

View file

@ -31,21 +31,21 @@ import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.token.ServoToken;
import mage.game.permanent.token.Token;
import mage.players.Player;
/**
*
@ -67,7 +67,7 @@ public class OviyaPashiriSageLifecrafter extends CardImpl {
ability.addCost(new TapSourceCost());
this.addAbility(ability);
// {4}{G}, {T}: Create an X/X colorless Construct artifact creature token, where X is the number of creatures you control.
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new OviyaPashiriSageLifecrafterToken()), new ManaCostsImpl("{4}{G}"));
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new OviyaPashiriSageLifecrafterEffect(), new ManaCostsImpl("{4}{G}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}
@ -82,18 +82,43 @@ public class OviyaPashiriSageLifecrafter extends CardImpl {
}
}
class OviyaPashiriSageLifecrafterEffect extends OneShotEffect {
public OviyaPashiriSageLifecrafterEffect() {
super(Outcome.PutCreatureInPlay);
this.staticText = "Create an X/X colorless Construct artifact creature token, where X is the number of creatures you control";
}
public OviyaPashiriSageLifecrafterEffect(final OviyaPashiriSageLifecrafterEffect effect) {
super(effect);
}
@Override
public OviyaPashiriSageLifecrafterEffect copy() {
return new OviyaPashiriSageLifecrafterEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
int creatures = game.getBattlefield().countAll(new FilterCreaturePermanent(), source.getControllerId(), game);
return new CreateTokenEffect(new OviyaPashiriSageLifecrafterToken(creatures)).apply(game, source);
}
return false;
}
}
class OviyaPashiriSageLifecrafterToken extends Token {
final static FilterControlledCreaturePermanent filterCreature = new FilterControlledCreaturePermanent("creatures you control");
OviyaPashiriSageLifecrafterToken() {
OviyaPashiriSageLifecrafterToken(int number) {
super("Construct", "an X/X colorless Construct artifact creature token, where X is the number of creatures you control");
cardType.add(CardType.ARTIFACT);
cardType.add(CardType.CREATURE);
subtype.add("Construct");
power = new MageInt(0);
toughness = new MageInt(0);
DynamicValue controlledCreatures = new PermanentsOnBattlefieldCount(filterCreature);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(controlledCreatures, controlledCreatures, Duration.WhileOnBattlefield)));
power = new MageInt(number);
toughness = new MageInt(number);
}
}

View file

@ -27,15 +27,13 @@
*/
package mage.sets.magic2012;
import mage.sets.magic2011.AetherAdept;
import java.util.UUID;
/**
*
* @author nantuko
*/
public class AetherAdept extends AetherAdept {
public class AetherAdept extends mage.sets.magic2011.AetherAdept {
public AetherAdept(UUID ownerId) {
super(ownerId);

View file

@ -31,8 +31,8 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.EnumMap;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
import mage.cards.repository.CardCriteria;
import mage.cards.repository.CardInfo;
import mage.cards.repository.CardRepository;
@ -45,7 +45,6 @@ import mage.util.RandomUtil;
*/
public abstract class ExpansionSet implements Serializable {
protected String name;
protected String code;
protected Date releaseDate;
@ -330,10 +329,21 @@ public abstract class ExpansionSet implements Serializable {
if (numBoosterDoubleFaced > -1) {
criteria.doubleFaced(false);
}
if (maxCardNumberInBooster != Integer.MAX_VALUE) {
criteria.maxCardNumber(maxCardNumberInBooster);
}
// if (maxCardNumberInBooster != Integer.MAX_VALUE) {
// criteria.maxCardNumber(maxCardNumberInBooster);
// }
savedCardsInfos = CardRepository.instance.findCards(criteria);
// Workaround after card number is numeric
if (maxCardNumberInBooster != Integer.MAX_VALUE) {
Iterator<CardInfo> iterator = savedCardsInfos.iterator();
while (iterator.hasNext()) {
CardInfo next = iterator.next();
if (Integer.valueOf(next.getCardNumber()) > maxCardNumberInBooster) {
iterator.remove();
}
}
}
savedCards.put(rarity, savedCardsInfos);
}
// Return a copy of the saved cards information, as not to let modify the original.

View file

@ -14448,7 +14448,7 @@ Unquestioned Authority|Magic: The Gathering-Conspiracy|85|U|{2}{W}|Enchantment -
Valor Made Real|Magic: The Gathering-Conspiracy|86|C|{W}|Instant|||Target creature can block any number of creatures this turn.|
Vow of Duty|Magic: The Gathering-Conspiracy|87|U|{2}{W}|Enchantment - Aura|||Enchant creature$Enchanted creature gets +2/+2, has vigilance, and can't attack you or a planeswalker you control.|
Wakestone Gargoyle|Magic: The Gathering-Conspiracy|88|U|{3}{W}|Creature - Gargoyle|3|4|Defender, flying${1}{W}: Creatures you control with defender can attack this turn as though they didn't have defender.|
AEther Tradewinds|Magic: The Gathering-Conspiracy|89|C|{2}{U}|Instant|||Return target permanent you control and target permanent you don't control to their owners' hands.|
Aether Tradewinds|Magic: The Gathering-Conspiracy|89|C|{2}{U}|Instant|||Return target permanent you control and target permanent you don't control to their owners' hands.|
Air Servant|Magic: The Gathering-Conspiracy|90|U|{4}{U}|Creature - Elemental|4|3|Flying${2}{U}: Tap target creature with flying.|
Brainstorm|Magic: The Gathering-Conspiracy|91|C|{U}|Instant|||Draw three cards, then put two cards from your hand on top of your library in any order.|
Breakthrough|Magic: The Gathering-Conspiracy|92|U|{X}{U}|Sorcery|||Draw four cards, then choose X cards in your hand and discard the rest.|
@ -29933,7 +29933,7 @@ Combustible Gearhulk|Masterpiece Series|2|M|{4}{R}{R}|Artifact Creature - Constr
Noxious Gearhulk|Masterpiece Series|3|M|{4}{B}{B}|Artifact Creature - Construct|5|4|Menace$When Noxious Gearhulk enters the battlefield, you may destroy another target creature. If a creature is destroyed this way, you gain life equal to its toughness.|
Torrential Gearhulk|Masterpiece Series|4|M|{4}{U}{U}|Artifact Creature - Construct|5|6|Flash$When Torrential Gearhulk enters the battlefield, you may cast target instant card from your graveyard without paying its mana cost. If that card would be put into your graveyard this turn, exile it instead.|
Verdurous Gearhulk|Masterpiece Series|5|M|{3}{G}{G}|Artifact Creature - Construct|4|4|Trample$When Verdurous Gearhulk enters the battlefield, distribute four +1/+1 counters among any number of target creatures you control.|
AEther Vial|Masterpiece Series|6|M|{1}|Artifact|||At the beginning of your upkeep, you may put a charge counter on &AElig;ther Vial.${tap}: You may put a creature card with converted mana cost equal to the number of charge counters on &AElig;ther Vial from your hand onto the battlefield.|
Aether Vial|Masterpiece Series|6|M|{1}|Artifact|||At the beginning of your upkeep, you may put a charge counter on &AElig;ther Vial.${tap}: You may put a creature card with converted mana cost equal to the number of charge counters on &AElig;ther Vial from your hand onto the battlefield.|
Champion's Helm|Masterpiece Series|7|M|{3}|Artifact - Equipment|||Equipped creature gets +2/+2.$As long as equipped creature is legendary, it has hexproof. <i>(It can't be the target of spells or abilities your opponents control.)</i>$Equip {1}|
Chromatic Lantern|Masterpiece Series|8|M|{3}|Artifact|||Lands you control have "{tap}: Add one mana of any color to your mana pool."${tap}: Add one mana of any color to your mana pool.|
Chrome Mox|Masterpiece Series|9|M|{0}|Artifact|||Imprint - When Chrome Mox enters the battlefield, you may exile a nonartifact, nonland card from your hand.${tap}: Add one mana of any of the exiled card's colors to your mana pool.|

View file

@ -99,6 +99,9 @@ git log 7c2eaf9510b1b49fecc28f5c8e68d5377c7a7e3e..head --diff-filter=A --name-st
since 1.4.15v0
git log 79f8617cd3c997d89770094d7a44294b0a48731f..head --diff-filter=A --name-status | sed -ne "s/^A[^u]Mage.Sets\/src\/mage\/sets\///p" | sort > added_cards.txt
since 1.4.15v2
git log d9c804602ea116d80a74d53eaf07ee7a15cd7d81..head --diff-filter=A --name-status | sed -ne "s/^A[^u]Mage.Sets\/src\/mage\/sets\///p" | sort > added_cards.txt
3. Copy added_cards.txt to trunk\Utils folder
4. Run script:
> perl extract_in_wiki_format.perl