mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
Merge branch 'master' of https://github.com/magefree/mage.git
This commit is contained in:
commit
105df2197f
8 changed files with 17 additions and 10 deletions
|
@ -97,7 +97,7 @@ public class BloodBaronOfVizkopa extends CardImpl<BloodBaronOfVizkopa> {
|
||||||
}
|
}
|
||||||
|
|
||||||
class BloodBaronOfVizkopaEffect extends ContinuousEffectImpl<BloodBaronOfVizkopaEffect> {
|
class BloodBaronOfVizkopaEffect extends ContinuousEffectImpl<BloodBaronOfVizkopaEffect> {
|
||||||
|
|
||||||
public BloodBaronOfVizkopaEffect() {
|
public BloodBaronOfVizkopaEffect() {
|
||||||
super(Duration.WhileOnBattlefield, Outcome.BoostCreature);
|
super(Duration.WhileOnBattlefield, Outcome.BoostCreature);
|
||||||
staticText = "As long as you have 30 or more life and an opponent has 10 or less life, {this} gets +6/+6 and has flying";
|
staticText = "As long as you have 30 or more life and an opponent has 10 or less life, {this} gets +6/+6 and has flying";
|
||||||
|
@ -129,6 +129,7 @@ class BloodBaronOfVizkopaEffect extends ContinuousEffectImpl<BloodBaronOfVizkopa
|
||||||
creature.addAbility(FlyingAbility.getInstance(), game);
|
creature.addAbility(FlyingAbility.getInstance(), game);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -157,6 +158,7 @@ class BloodBaronOfVizkopaEffect extends ContinuousEffectImpl<BloodBaronOfVizkopa
|
||||||
@Override
|
@Override
|
||||||
public boolean hasLayer(Layer layer) {
|
public boolean hasLayer(Layer layer) {
|
||||||
return (layer.equals(Layer.AbilityAddingRemovingEffects_6) || layer.equals(layer.PTChangingEffects_7));
|
return (layer.equals(Layer.AbilityAddingRemovingEffects_6) || layer.equals(layer.PTChangingEffects_7));
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ class DebtToTheDeathlessEffect extends OneShotEffect<DebtToTheDeathlessEffect> {
|
||||||
int damage = 0;
|
int damage = 0;
|
||||||
int xValue = source.getManaCostsToPay().getX();
|
int xValue = source.getManaCostsToPay().getX();
|
||||||
for (UUID opponentId: game.getOpponents(source.getControllerId())) {
|
for (UUID opponentId: game.getOpponents(source.getControllerId())) {
|
||||||
damage += game.getPlayer(opponentId).damage(xValue, source.getSourceId(), game, false, true);
|
damage += game.getPlayer(opponentId).damage(xValue * 2, source.getSourceId(), game, false, true);
|
||||||
}
|
}
|
||||||
game.getPlayer(source.getControllerId()).gainLife(damage, game);
|
game.getPlayer(source.getControllerId()).gainLife(damage, game);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -117,8 +117,8 @@ class MelekIzzetParagonTriggeredAbility extends TriggeredAbilityImpl<MelekIzzetP
|
||||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||||
if (spell != null
|
if (spell != null
|
||||||
&& spell.getControllerId().equals(super.getControllerId())
|
&& spell.getControllerId().equals(super.getControllerId())
|
||||||
&& spell.getCardType().contains(CardType.INSTANT)
|
&& (spell.getCardType().contains(CardType.INSTANT)
|
||||||
|| spell.getCardType().contains(CardType.SORCERY)) {
|
|| spell.getCardType().contains(CardType.SORCERY))) {
|
||||||
for (Effect effect : this.getEffects()) {
|
for (Effect effect : this.getEffects()) {
|
||||||
effect.setTargetPointer(new FixedTarget(event.getTargetId()));
|
effect.setTargetPointer(new FixedTarget(event.getTargetId()));
|
||||||
}
|
}
|
||||||
|
@ -132,4 +132,4 @@ class MelekIzzetParagonTriggeredAbility extends TriggeredAbilityImpl<MelekIzzetP
|
||||||
public String getRule() {
|
public String getRule() {
|
||||||
return "Whenever you cast an instant or sorcery from your library, copy it. You may choose new targets for the copy.";
|
return "Whenever you cast an instant or sorcery from your library, copy it. You may choose new targets for the copy.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,6 +95,7 @@ class ReturnToHandChooseEffect extends OneShotEffect<ReturnToHandChooseEffect> {
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent();
|
TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent();
|
||||||
|
target.setRequired(true);
|
||||||
if (player.choose(this.outcome, target, source.getSourceId(), game)) {
|
if (player.choose(this.outcome, target, source.getSourceId(), game)) {
|
||||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
|
|
|
@ -34,6 +34,7 @@ import mage.Constants.Duration;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
import mage.abilities.dynamicvalue.DynamicValue;
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
import mage.abilities.dynamicvalue.common.CardsInControllerHandCount;
|
import mage.abilities.dynamicvalue.common.CardsInControllerHandCount;
|
||||||
|
import mage.abilities.dynamicvalue.common.SignInversionDynamicValue;
|
||||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
@ -55,7 +56,7 @@ public class WarpedPhysique extends CardImpl<WarpedPhysique> {
|
||||||
|
|
||||||
// Target creature gets +X/-X until end of turn, where X is the number of cards in your hand.
|
// Target creature gets +X/-X until end of turn, where X is the number of cards in your hand.
|
||||||
DynamicValue xValue = new CardsInControllerHandCount();
|
DynamicValue xValue = new CardsInControllerHandCount();
|
||||||
this.getSpellAbility().addEffect(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn, true));
|
this.getSpellAbility().addEffect(new BoostTargetEffect(xValue, new SignInversionDynamicValue(xValue), Duration.EndOfTurn, true));
|
||||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ public class ZhurTaaDruid extends CardImpl<ZhurTaaDruid> {
|
||||||
class ZhurTaaDruidAbility extends TriggeredAbilityImpl<ZhurTaaDruidAbility> {
|
class ZhurTaaDruidAbility extends TriggeredAbilityImpl<ZhurTaaDruidAbility> {
|
||||||
|
|
||||||
public ZhurTaaDruidAbility() {
|
public ZhurTaaDruidAbility() {
|
||||||
super(Zone.BATTLEFIELD, new DamagePlayersEffect(2, TargetController.OPPONENT));
|
super(Zone.BATTLEFIELD, new DamagePlayersEffect(1, TargetController.OPPONENT));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ZhurTaaDruidAbility(final ZhurTaaDruidAbility ability) {
|
public ZhurTaaDruidAbility(final ZhurTaaDruidAbility ability) {
|
||||||
|
|
|
@ -32,6 +32,7 @@ import mage.Constants.CardType;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
|
@ -60,7 +61,7 @@ public class AugurOfBolas extends CardImpl<AugurOfBolas> {
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
// When Augur of Bolas enters the battlefield, look at the top three cards of your library. You may reveal an instant or sorcery card from among them and put it into your hand. Put the rest on the bottom of your library in any order.
|
// When Augur of Bolas enters the battlefield, look at the top three cards of your library. You may reveal an instant or sorcery card from among them and put it into your hand. Put the rest on the bottom of your library in any order.
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(3, 1, filter, false)));
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryAndPickControllerEffect(new StaticValue(3), false, new StaticValue(1), filter, false, true)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public AugurOfBolas(final AugurOfBolas card) {
|
public AugurOfBolas(final AugurOfBolas card) {
|
||||||
|
|
|
@ -32,6 +32,7 @@ import com.j256.ormlite.dao.DaoManager;
|
||||||
import com.j256.ormlite.jdbc.JdbcConnectionSource;
|
import com.j256.ormlite.jdbc.JdbcConnectionSource;
|
||||||
import com.j256.ormlite.stmt.QueryBuilder;
|
import com.j256.ormlite.stmt.QueryBuilder;
|
||||||
import com.j256.ormlite.stmt.SelectArg;
|
import com.j256.ormlite.stmt.SelectArg;
|
||||||
|
import com.j256.ormlite.stmt.Where;
|
||||||
import com.j256.ormlite.support.ConnectionSource;
|
import com.j256.ormlite.support.ConnectionSource;
|
||||||
import com.j256.ormlite.table.TableUtils;
|
import com.j256.ormlite.table.TableUtils;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -170,7 +171,8 @@ public enum CardRepository {
|
||||||
try {
|
try {
|
||||||
QueryBuilder<CardInfo, Object> qb = cardDao.queryBuilder();
|
QueryBuilder<CardInfo, Object> qb = cardDao.queryBuilder();
|
||||||
qb.distinct().selectColumns("name");
|
qb.distinct().selectColumns("name");
|
||||||
qb.where().not().in("types", CardType.LAND.name(), CardType.CREATURE.name());
|
Where where = qb.where();
|
||||||
|
where.and(where.not().like("types", '%' + CardType.CREATURE.name() +'%'),where.not().like("types", '%' + CardType.LAND.name() + '%'));
|
||||||
List<CardInfo> results = cardDao.query(qb.prepare());
|
List<CardInfo> results = cardDao.query(qb.prepare());
|
||||||
for (CardInfo card : results) {
|
for (CardInfo card : results) {
|
||||||
names.add(card.getName());
|
names.add(card.getName());
|
||||||
|
|
Loading…
Reference in a new issue