mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 05:52:06 -08:00
XMage 1.4.4v4
This commit is contained in:
parent
513a574ae9
commit
cd2842d457
7 changed files with 28 additions and 28 deletions
|
|
@ -1,16 +1,16 @@
|
|||
/*
|
||||
* 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
|
||||
|
|
@ -20,12 +20,11 @@
|
|||
* 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.abilities.costs.common;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -49,10 +48,10 @@ public class TapTargetCost extends CostImpl {
|
|||
public TapTargetCost(TargetControlledPermanent target) {
|
||||
this.target = target;
|
||||
this.target.setNotTarget(true); // costs are never targeted
|
||||
this.text =
|
||||
new StringBuilder("Tap ")
|
||||
.append(target.getTargetName().startsWith("a ") || target.getTargetName().startsWith("an ") ? "":CardUtil.numberToText(target.getMaxNumberOfTargets()))
|
||||
.append(" ")
|
||||
this.text
|
||||
= new StringBuilder("Tap ")
|
||||
.append((target.getTargetName().startsWith("a ") || target.getTargetName().startsWith("an ") || target.getTargetName().startsWith("another"))
|
||||
? "" : CardUtil.numberToText(target.getMaxNumberOfTargets()) + " ")
|
||||
.append(target.getTargetName()).toString();
|
||||
}
|
||||
|
||||
|
|
@ -64,7 +63,7 @@ public class TapTargetCost extends CostImpl {
|
|||
@Override
|
||||
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
|
||||
if (target.choose(Outcome.Tap, controllerId, sourceId, game)) {
|
||||
for (UUID targetId: (List<UUID>)target.getTargets()) {
|
||||
for (UUID targetId : (List<UUID>) target.getTargets()) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
|
|
@ -85,5 +84,4 @@ public class TapTargetCost extends CostImpl {
|
|||
return new TapTargetCost(this);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@ public class DestroyAllEffect extends OneShotEffect {
|
|||
private FilterPermanent filter;
|
||||
private boolean noRegen;
|
||||
|
||||
public DestroyAllEffect(FilterPermanent filter) {
|
||||
this(filter, false);
|
||||
}
|
||||
|
||||
public DestroyAllEffect(FilterPermanent filter, boolean noRegen) {
|
||||
super(Outcome.DestroyPermanent);
|
||||
this.filter = filter;
|
||||
|
|
@ -53,10 +57,6 @@ public class DestroyAllEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
|
||||
public DestroyAllEffect(FilterPermanent filter) {
|
||||
this(filter, false);
|
||||
}
|
||||
|
||||
public DestroyAllEffect(final DestroyAllEffect effect) {
|
||||
super(effect);
|
||||
this.filter = effect.filter.copy();
|
||||
|
|
@ -70,7 +70,6 @@ public class DestroyAllEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||
permanent.destroy(source.getSourceId(), game, noRegen);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public enum CardRepository {
|
|||
// raise this if db structure was changed
|
||||
private static final long CARD_DB_VERSION = 41;
|
||||
// raise this if new cards were added to the server
|
||||
private static final long CARD_CONTENT_VERSION = 36;
|
||||
private static final long CARD_CONTENT_VERSION = 37;
|
||||
|
||||
private final Random random = new Random();
|
||||
private Dao<CardInfo, Object> cardDao;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue