mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
- Added Gelatinous Genesis and Lust for War. <ROE>
This commit is contained in:
parent
3a3d004e43
commit
ed654092f3
2 changed files with 187 additions and 0 deletions
105
Mage.Sets/src/mage/sets/riseoftheeldrazi/GelatinousGenesis.java
Normal file
105
Mage.Sets/src/mage/sets/riseoftheeldrazi/GelatinousGenesis.java
Normal file
|
@ -0,0 +1,105 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.riseoftheeldrazi;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class GelatinousGenesis extends CardImpl<GelatinousGenesis> {
|
||||
|
||||
public GelatinousGenesis(UUID ownerId) {
|
||||
super(ownerId, 183, "Gelatinous Genesis", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{X}{G}");
|
||||
this.expansionSetCode = "ROE";
|
||||
|
||||
this.color.setGreen(true);
|
||||
|
||||
// Put X X/X green Ooze creature tokens onto the battlefield.
|
||||
this.getSpellAbility().addEffect(new GelatinousGenesisEffect());
|
||||
}
|
||||
|
||||
public GelatinousGenesis(final GelatinousGenesis card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GelatinousGenesis copy() {
|
||||
return new GelatinousGenesis(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GelatinousGenesisEffect extends OneShotEffect<GelatinousGenesisEffect> {
|
||||
|
||||
public GelatinousGenesisEffect() {
|
||||
super(Constants.Outcome.PutCreatureInPlay);
|
||||
staticText = "Put X X/X green Ooze creature tokens onto the battlefield";
|
||||
}
|
||||
|
||||
public GelatinousGenesisEffect(GelatinousGenesisEffect ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int count = source.getManaCostsToPay().getX();
|
||||
|
||||
OozeToken oozeToken = new OozeToken();
|
||||
oozeToken.getPower().setValue(count);
|
||||
oozeToken.getToughness().setValue(count);
|
||||
oozeToken.putOntoBattlefield(count, game, source.getId(), source.getControllerId());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GelatinousGenesisEffect copy() {
|
||||
return new GelatinousGenesisEffect(this);
|
||||
}
|
||||
}
|
||||
|
||||
class OozeToken extends Token {
|
||||
|
||||
public OozeToken() {
|
||||
super("Ooze", "X/X green ooze creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
subtype.add("Ooze");
|
||||
power = new MageInt(0);
|
||||
toughness = new MageInt(0);
|
||||
}
|
||||
}
|
82
Mage.Sets/src/mage/sets/riseoftheeldrazi/LustForWar.java
Normal file
82
Mage.Sets/src/mage/sets/riseoftheeldrazi/LustForWar.java
Normal file
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.riseoftheeldrazi;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksEachTurnStaticAbility;
|
||||
import mage.abilities.common.BecomesTappedTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.DamageControllerEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class LustForWar extends CardImpl<LustForWar> {
|
||||
|
||||
public LustForWar(UUID ownerId) {
|
||||
super(ownerId, 157, "Lust for War", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}");
|
||||
this.expansionSetCode = "ROE";
|
||||
this.subtype.add("Aura");
|
||||
|
||||
this.color.setRed(true);
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Constants.Outcome.AddAbility));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever enchanted creature becomes tapped, Lust for War deals 3 damage to that creature's controller.
|
||||
Ability attachedAbility = new BecomesTappedTriggeredAbility(new DamageControllerEffect(3));
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityAttachedEffect(attachedAbility, Constants.AttachmentType.AURA)));
|
||||
|
||||
// Enchanted creature attacks each turn if able.
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new AttacksEachTurnStaticAbility(), Constants.AttachmentType.AURA)));
|
||||
}
|
||||
|
||||
public LustForWar(final LustForWar card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LustForWar copy() {
|
||||
return new LustForWar(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue