mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
- Added some ROE cards.
This commit is contained in:
parent
108dfac426
commit
f0c5cb3eef
4 changed files with 442 additions and 0 deletions
135
Mage.Sets/src/mage/sets/riseoftheeldrazi/AngelheartVial.java
Normal file
135
Mage.Sets/src/mage/sets/riseoftheeldrazi/AngelheartVial.java
Normal file
|
@ -0,0 +1,135 @@
|
|||
/*
|
||||
* 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.Outcome;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class AngelheartVial extends CardImpl<AngelheartVial> {
|
||||
|
||||
public AngelheartVial(UUID ownerId) {
|
||||
super(ownerId, 215, "Angelheart Vial", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{5}");
|
||||
this.expansionSetCode = "ROE";
|
||||
|
||||
// Whenever you're dealt damage, you may put that many charge counters on Angelheart Vial.
|
||||
this.addAbility(new AngelheartVialTriggeredAbility());
|
||||
|
||||
// {2}, {tap}, Remove four charge counters from Angelheart Vial: You gain 2 life and draw a card.
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new GainLifeEffect(2), new GenericManaCost(2));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new RemoveCountersSourceCost(new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(4))));
|
||||
ability.addEffect(new DrawCardControllerEffect(1));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public AngelheartVial(final AngelheartVial card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AngelheartVial copy() {
|
||||
return new AngelheartVial(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AngelheartVialTriggeredAbility extends TriggeredAbilityImpl<AngelheartVialTriggeredAbility> {
|
||||
|
||||
public AngelheartVialTriggeredAbility() {
|
||||
super(Constants.Zone.BATTLEFIELD, new AngelheartVialAddCounterEffect(), true);
|
||||
}
|
||||
|
||||
public AngelheartVialTriggeredAbility(final AngelheartVialTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AngelheartVialTriggeredAbility copy() {
|
||||
return new AngelheartVialTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if ((event.getType() == GameEvent.EventType.DAMAGED_PLAYER && event.getTargetId().equals(this.getControllerId()))) {
|
||||
this.getEffects().get(0).setValue("damageAmount", event.getAmount());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you are dealt damage, you may put that many charge counters on {this}";
|
||||
}
|
||||
}
|
||||
|
||||
class AngelheartVialAddCounterEffect extends OneShotEffect<AngelheartVialAddCounterEffect> {
|
||||
|
||||
public AngelheartVialAddCounterEffect() {
|
||||
super(Outcome.Benefit);
|
||||
}
|
||||
|
||||
public AngelheartVialAddCounterEffect(final AngelheartVialAddCounterEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AngelheartVialAddCounterEffect copy() {
|
||||
return new AngelheartVialAddCounterEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
permanent.addCounters(CounterType.CHARGE.createInstance((Integer) this.getValue("damageAmount")), game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
147
Mage.Sets/src/mage/sets/riseoftheeldrazi/ArrogantBloodlord.java
Normal file
147
Mage.Sets/src/mage/sets/riseoftheeldrazi/ArrogantBloodlord.java
Normal file
|
@ -0,0 +1,147 @@
|
|||
/*
|
||||
* 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.Outcome;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class ArrogantBloodlord extends CardImpl<ArrogantBloodlord> {
|
||||
|
||||
public ArrogantBloodlord(UUID ownerId) {
|
||||
super(ownerId, 94, "Arrogant Bloodlord", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
|
||||
this.expansionSetCode = "ROE";
|
||||
this.subtype.add("Vampire");
|
||||
this.subtype.add("Knight");
|
||||
|
||||
this.color.setBlack(true);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Whenever Arrogant Bloodlord blocks or becomes blocked by a creature with power 1 or less, destroy Arrogant Bloodlord at end of combat.
|
||||
this.addAbility(new ArrogantBloodlordTriggeredAbility());
|
||||
}
|
||||
|
||||
public ArrogantBloodlord(final ArrogantBloodlord card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrogantBloodlord copy() {
|
||||
return new ArrogantBloodlord(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ArrogantBloodlordTriggeredAbility extends TriggeredAbilityImpl<ArrogantBloodlordTriggeredAbility> {
|
||||
|
||||
ArrogantBloodlordTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new ArrogantBloodlordEffect());
|
||||
}
|
||||
|
||||
ArrogantBloodlordTriggeredAbility(final ArrogantBloodlordTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrogantBloodlordTriggeredAbility copy() {
|
||||
return new ArrogantBloodlordTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.BLOCKER_DECLARED) {
|
||||
Permanent blocker = game.getPermanent(event.getTargetId());
|
||||
if (blocker != null && blocker.getPower().getValue() < 2) {
|
||||
return true;
|
||||
}
|
||||
if (blocker == game.getPermanent(event.getSourceId())) {
|
||||
if (blocker != null && game.getPermanent(event.getTargetId()).getPower().getValue() < 2) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever Arrogant Bloodlord blocks or becomes blocked by a creature with power 1 or less, destroy Arrogant Bloodlord at end of combat.";
|
||||
}
|
||||
}
|
||||
|
||||
class ArrogantBloodlordEffect extends OneShotEffect<ArrogantBloodlordEffect> {
|
||||
|
||||
ArrogantBloodlordEffect() {
|
||||
super(Outcome.Detriment);
|
||||
staticText = "Destroy Arrogant Bloodlord at the end of combat";
|
||||
}
|
||||
|
||||
ArrogantBloodlordEffect(final ArrogantBloodlordEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
AtTheEndOfCombatDelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect());
|
||||
delayedAbility.setSourceId(source.getSourceId());
|
||||
delayedAbility.setControllerId(source.getControllerId());
|
||||
delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(source.getSourceId()));
|
||||
game.addDelayedTriggeredAbility(delayedAbility);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrogantBloodlordEffect copy() {
|
||||
return new ArrogantBloodlordEffect(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
142
Mage.Sets/src/mage/sets/riseoftheeldrazi/BanefulOmen.java
Normal file
142
Mage.Sets/src/mage/sets/riseoftheeldrazi/BanefulOmen.java
Normal file
|
@ -0,0 +1,142 @@
|
|||
/*
|
||||
* 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.Zone;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.abilities.Ability;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.players.Player;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class BanefulOmen extends CardImpl<BanefulOmen> {
|
||||
|
||||
public BanefulOmen(UUID ownerId) {
|
||||
super(ownerId, 96, "Baneful Omen", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{4}{B}{B}{B}");
|
||||
this.expansionSetCode = "ROE";
|
||||
|
||||
this.color.setBlack(true);
|
||||
|
||||
// At the beginning of your end step, you may reveal the top card of your library. If you do, each opponent loses life equal to that card's converted mana cost.
|
||||
this.addAbility(new BanefulOmenTriggeredAbility());
|
||||
}
|
||||
|
||||
public BanefulOmen(final BanefulOmen card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BanefulOmen copy() {
|
||||
return new BanefulOmen(this);
|
||||
}
|
||||
|
||||
class BanefulOmenTriggeredAbility extends TriggeredAbilityImpl<BanefulOmenTriggeredAbility> {
|
||||
|
||||
public BanefulOmenTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new BanefulOmenEffect(), true);
|
||||
}
|
||||
|
||||
public BanefulOmenTriggeredAbility(BanefulOmenTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BanefulOmenTriggeredAbility copy() {
|
||||
return new BanefulOmenTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.END_PHASE_PRE && event.getPlayerId().equals(this.controllerId)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "At the beginning of your end step, you may reveal the top card of your library. If you do, each opponent loses life equal to that card's converted mana cost.";
|
||||
}
|
||||
}
|
||||
|
||||
class BanefulOmenEffect extends OneShotEffect<BanefulOmenEffect> {
|
||||
|
||||
public BanefulOmenEffect() {
|
||||
super(Outcome.Benefit);
|
||||
}
|
||||
|
||||
public BanefulOmenEffect(final BanefulOmenEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
if (player.getLibrary().size() > 0) {
|
||||
Card card = player.getLibrary().getFromTop(game);
|
||||
Cards cards = new CardsImpl();
|
||||
cards.add(card);
|
||||
player.revealCards("Baneful Omen", cards, game);
|
||||
|
||||
if (card != null) {
|
||||
int loseLife = card.getManaCost().convertedManaCost();
|
||||
Set<UUID> opponents = game.getOpponents(source.getControllerId());
|
||||
for (UUID opponentUuid : opponents) {
|
||||
Player opponent = game.getPlayer(opponentUuid);
|
||||
if (opponent != null) {
|
||||
opponent.loseLife(loseLife, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BanefulOmenEffect copy() {
|
||||
return new BanefulOmenEffect(this);
|
||||
}
|
||||
}
|
||||
}
|
18
nb-configuration.xml
Normal file
18
nb-configuration.xml
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project-shared-configuration>
|
||||
<!--
|
||||
This file contains additional configuration written by modules in the NetBeans IDE.
|
||||
The configuration is intended to be shared among all the users of project and
|
||||
therefore it is assumed to be part of version control checkout.
|
||||
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
|
||||
-->
|
||||
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
|
||||
<!--
|
||||
Properties that influence various parts of the IDE, especially code formatting and the like.
|
||||
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
|
||||
That way multiple projects can share the same settings (useful for formatting rules for example).
|
||||
Any value defined here will override the pom.xml file value but is only applicable to the current project.
|
||||
-->
|
||||
<netbeans.compile.on.save>all</netbeans.compile.on.save>
|
||||
</properties>
|
||||
</project-shared-configuration>
|
Loading…
Reference in a new issue