mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 11:49:56 -08:00
Merge origin/master
This commit is contained in:
commit
cda11b280c
14 changed files with 384 additions and 105 deletions
68
Mage.Sets/src/mage/sets/apocalypse/UrborgElf.java
Normal file
68
Mage.Sets/src/mage/sets/apocalypse/UrborgElf.java
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* 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.apocalypse;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.mana.BlackManaAbility;
|
||||
import mage.abilities.mana.BlueManaAbility;
|
||||
import mage.abilities.mana.GreenManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author EvilGeek
|
||||
*/
|
||||
public class UrborgElf extends CardImpl {
|
||||
|
||||
public UrborgElf(UUID ownerId) {
|
||||
super(ownerId, 90, "Urborg Elf", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
this.expansionSetCode = "APC";
|
||||
this.subtype.add("Elf");
|
||||
this.subtype.add("Druid");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {tap}: Add {G}, {U}, or {B} to your mana pool.
|
||||
this.addAbility(new GreenManaAbility());
|
||||
this.addAbility(new BlueManaAbility());
|
||||
this.addAbility(new BlackManaAbility());
|
||||
}
|
||||
|
||||
public UrborgElf(final UrborgElf card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UrborgElf copy() {
|
||||
return new UrborgElf(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -28,22 +28,17 @@
|
|||
package mage.sets.judgment;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.costs.common.DiscardTargetCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.game.stack.StackObject;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -55,7 +50,6 @@ public class Browbeat extends CardImpl {
|
|||
super(ownerId, 82, "Browbeat", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{R}");
|
||||
this.expansionSetCode = "JUD";
|
||||
|
||||
|
||||
// Any player may have Browbeat deal 5 damage to him or her. If no one does, target player draws three cards.
|
||||
this.getSpellAbility().addEffect(new BrowbeatDrawEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
|
|
@ -75,6 +69,7 @@ class BrowbeatDrawEffect extends OneShotEffect {
|
|||
|
||||
public BrowbeatDrawEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
staticText = "Any player may have {source} deal 5 damage to him or her. If no one does, target player draws three cards.";
|
||||
}
|
||||
|
||||
public BrowbeatDrawEffect(final BrowbeatDrawEffect effect) {
|
||||
|
|
@ -88,6 +83,10 @@ class BrowbeatDrawEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
StackObject spell = null;
|
||||
for(StackObject object : game.getStack()){
|
||||
if(object instanceof Spell && object.getSourceId().equals(source.getSourceId())){
|
||||
|
|
@ -96,12 +95,12 @@ class BrowbeatDrawEffect extends OneShotEffect {
|
|||
}
|
||||
if(spell != null){
|
||||
boolean drawCards = true;
|
||||
for(UUID uuid : game.getPlayerList()){
|
||||
Player player = game.getPlayer(uuid);
|
||||
if(player != null && player.chooseUse(Outcome.Detriment, "Have " + spell.getName() + " deal 5 damage to you?", game)){
|
||||
for(UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)){
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null && player.chooseUse(Outcome.Detriment, "Have " + spell.getLogName() + " deal 5 damage to you?", game)){
|
||||
drawCards = false;
|
||||
player.damage(5, source.getSourceId(), game, false, true);
|
||||
game.informPlayers(player.getLogName() + " has " + spell.getName() + " deal 5 to him or her");
|
||||
game.informPlayers(player.getLogName() + " has " + spell.getLogName() + " deal 5 to him or her");
|
||||
}
|
||||
}
|
||||
if (drawCards) {
|
||||
|
|
@ -116,11 +115,4 @@ class BrowbeatDrawEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
if (staticText != null && !staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
return "Any player may have {source} deal 5 damage to him or her. If no one does, target player draws three cards.";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
85
Mage.Sets/src/mage/sets/magicorigins/DwynenGiltLeafDaen.java
Normal file
85
Mage.Sets/src/mage/sets/magicorigins/DwynenGiltLeafDaen.java
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* 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.magicorigins;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AttackingPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public class DwynenGiltLeafDaen extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Elf", "attacking Elf you control");
|
||||
static {
|
||||
filter.add(new AttackingPredicate());
|
||||
}
|
||||
|
||||
public DwynenGiltLeafDaen(UUID ownerId) {
|
||||
super(ownerId, 172, "Dwynen, Gilt-Leaf Daen", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
|
||||
this.expansionSetCode = "ORI";
|
||||
this.supertype.add("Legendary");
|
||||
this.subtype.add("Elf");
|
||||
this.subtype.add("Warrior");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Reach
|
||||
this.addAbility(ReachAbility.getInstance());
|
||||
|
||||
// Other Elf creatures you control get +1/+1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, new FilterCreaturePermanent("Elf", "Elf creatures"), true)));
|
||||
|
||||
// Whenever Dwynen, Gilt-Leaf Daen attacks, you gain 1 life for each attacking Elf you control.
|
||||
this.addAbility(new AttacksTriggeredAbility(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter)), false));
|
||||
}
|
||||
|
||||
public DwynenGiltLeafDaen(final DwynenGiltLeafDaen card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DwynenGiltLeafDaen copy() {
|
||||
return new DwynenGiltLeafDaen(this);
|
||||
}
|
||||
}
|
||||
68
Mage.Sets/src/mage/sets/magicorigins/ElementalBond.java
Normal file
68
Mage.Sets/src/mage/sets/magicorigins/ElementalBond.java
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* 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.magicorigins;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.Filter.ComparisonType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public class ElementalBond extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("creature with power 3 or greater");
|
||||
static {
|
||||
filter.add(new PowerPredicate(ComparisonType.GreaterThan, 2));
|
||||
}
|
||||
|
||||
public ElementalBond(UUID ownerId) {
|
||||
super(ownerId, 174, "Elemental Bond", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
|
||||
this.expansionSetCode = "ORI";
|
||||
|
||||
// Whenever a creature with power 3 or greater enters the battlefield under your control, draw a card.
|
||||
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new DrawCardSourceControllerEffect(1), filter));
|
||||
}
|
||||
|
||||
public ElementalBond(final ElementalBond card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ElementalBond copy() {
|
||||
return new ElementalBond(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue