mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 12:49:39 -08:00
2 requested cards
This commit is contained in:
parent
7d68d6e67f
commit
709dc83ae6
7 changed files with 280 additions and 44 deletions
64
Mage.Sets/src/mage/sets/fifthdawn/ChannelTheSuns.java
Normal file
64
Mage.Sets/src/mage/sets/fifthdawn/ChannelTheSuns.java
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* 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.fifthdawn;
|
||||
|
||||
import mage.Mana;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AddManaToControllersManaPoolEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author magenoxx
|
||||
*/
|
||||
public class ChannelTheSuns extends CardImpl {
|
||||
|
||||
public ChannelTheSuns(UUID ownerId) {
|
||||
super(ownerId, 84, "Channel the Suns", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{G}");
|
||||
this.expansionSetCode = "5DN";
|
||||
|
||||
this.color.setGreen(true);
|
||||
|
||||
// Add {W}{U}{B}{R}{G} to your mana pool.
|
||||
Effect effect = new AddManaToControllersManaPoolEffect(new Mana(1, 1, 1, 1, 1, 0, 0));
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
}
|
||||
|
||||
public ChannelTheSuns(final ChannelTheSuns card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChannelTheSuns copy() {
|
||||
return new ChannelTheSuns(this);
|
||||
}
|
||||
}
|
||||
51
Mage.Sets/src/mage/sets/portal/CruelBargain.java
Normal file
51
Mage.Sets/src/mage/sets/portal/CruelBargain.java
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* 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.portal;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author magenoxx
|
||||
*/
|
||||
public class CruelBargain extends mage.sets.vintagemasters.CruelBargain {
|
||||
|
||||
public CruelBargain(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 8;
|
||||
this.expansionSetCode = "POR";
|
||||
}
|
||||
|
||||
public CruelBargain(final CruelBargain card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CruelBargain copy() {
|
||||
return new CruelBargain(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -27,16 +27,13 @@
|
|||
*/
|
||||
package mage.sets.seventhedition;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.LoseHalfLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -52,7 +49,7 @@ public class InfernalContract extends CardImpl {
|
|||
|
||||
// Draw four cards. You lose half your life, rounded up.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(4));
|
||||
this.getSpellAbility().addEffect(new InfernalContractLoseLifeEffect());
|
||||
this.getSpellAbility().addEffect(new LoseHalfLifeEffect());
|
||||
}
|
||||
|
||||
public InfernalContract(final InfernalContract card) {
|
||||
|
|
@ -65,32 +62,3 @@ public class InfernalContract extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class InfernalContractLoseLifeEffect extends OneShotEffect {
|
||||
|
||||
public InfernalContractLoseLifeEffect() {
|
||||
super(Outcome.LoseLife);
|
||||
staticText = "You lose half your life, rounded up";
|
||||
}
|
||||
|
||||
public InfernalContractLoseLifeEffect(final InfernalContractLoseLifeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InfernalContractLoseLifeEffect copy() {
|
||||
return new InfernalContractLoseLifeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
int amount = (player.getLife() + 1) / 2;
|
||||
if (amount > 0) {
|
||||
player.loseLife(amount, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
63
Mage.Sets/src/mage/sets/vintagemasters/CruelBargain.java
Normal file
63
Mage.Sets/src/mage/sets/vintagemasters/CruelBargain.java
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* 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.vintagemasters;
|
||||
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.LoseHalfLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author magenoxx
|
||||
*/
|
||||
public class CruelBargain extends CardImpl {
|
||||
|
||||
public CruelBargain(UUID ownerId) {
|
||||
super(ownerId, 111, "Cruel Bargain", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{B}{B}{B}");
|
||||
this.expansionSetCode = "VMA";
|
||||
|
||||
this.color.setBlack(true);
|
||||
|
||||
// Draw four cards. You lose half your life, rounded up.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(4));
|
||||
this.getSpellAbility().addEffect(new LoseHalfLifeEffect());
|
||||
}
|
||||
|
||||
public CruelBargain(final CruelBargain card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CruelBargain copy() {
|
||||
return new CruelBargain(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -27,23 +27,23 @@
|
|||
*/
|
||||
package mage.sets.weatherlight;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
|
|
@ -135,8 +135,9 @@ class DoomsdayEffect extends OneShotEffect {
|
|||
int amount = (player.getLife() + 1) / 2;
|
||||
if (amount > 0) {
|
||||
player.loseLife(amount, game);
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue