[BFZ] Added missing green cards (19 cards).

This commit is contained in:
LevelX2 2015-09-19 02:22:08 +02:00
parent fffeaf1e5c
commit 1708a49d37
23 changed files with 1480 additions and 33 deletions

View file

@ -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,28 +20,26 @@
* 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.effects.common.counter;
import mage.constants.Outcome;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.counters.Counter;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome;
import mage.counters.Counter;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.util.CardUtil;
/**
@ -54,7 +52,7 @@ public class AddCountersTargetEffect extends OneShotEffect {
private DynamicValue amount;
public AddCountersTargetEffect(Counter counter) {
this(counter, counter.getName().equals(CounterType.M1M1.getName()) ? Outcome.UnboostCreature: Outcome.Benefit);
this(counter, counter.getName().equals(CounterType.M1M1.getName()) ? Outcome.UnboostCreature : Outcome.Benefit);
}
public AddCountersTargetEffect(Counter counter, DynamicValue amount) {
@ -94,10 +92,10 @@ public class AddCountersTargetEffect extends OneShotEffect {
int before = permanent.getCounters().getCount(counter.getName());
permanent.addCounters(newCounter, game);
int numberAdded = permanent.getCounters().getCount(counter.getName()) - before;
affectedTargets ++;
affectedTargets++;
if (!game.isSimulation()) {
game.informPlayers(sourceObject.getLogName() +": "+ controller.getLogName()+ " puts " +
numberAdded + " " + counter.getName().toLowerCase() + " counter on " + permanent.getLogName());
game.informPlayers(sourceObject.getLogName() + ": " + controller.getLogName() + " puts "
+ numberAdded + " " + counter.getName().toLowerCase() + " counter on " + permanent.getLogName());
}
}
} else {
@ -106,14 +104,14 @@ public class AddCountersTargetEffect extends OneShotEffect {
Counter newCounter = counter.copy();
newCounter.add(amount.calculate(game, source, this));
player.addCounters(newCounter, game);
affectedTargets ++;
affectedTargets++;
if (!game.isSimulation()) {
game.informPlayers(sourceObject.getLogName() +": " + controller.getLogName() + " puts " +
counter.getCount() + " " + counter.getName().toLowerCase() + " counter on " + player.getLogName());
}
game.informPlayers(sourceObject.getLogName() + ": " + controller.getLogName() + " puts "
+ counter.getCount() + " " + counter.getName().toLowerCase() + " counter on " + player.getLogName());
}
}
}
}
}
return affectedTargets > 0;
}
return false;
@ -131,8 +129,11 @@ public class AddCountersTargetEffect extends OneShotEffect {
} else {
sb.append("a ");
}
sb.append(counter.getName().toLowerCase()).append(" counter on ");
sb.append(counter.getName().toLowerCase()).append(" counter");
if (counter.getCount() > 1) {
sb.append("s");
}
sb.append(" on ");
// TODO: add normal text infrastructure for target pointers
if (mode.getTargets().size() > 0) {
@ -155,5 +156,4 @@ public class AddCountersTargetEffect extends OneShotEffect {
return new AddCountersTargetEffect(this);
}
}

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.abilities.effects.common.replacement;
import mage.abilities.Ability;
@ -47,11 +46,10 @@ import mage.watchers.common.DamagedByWatcher;
*
* @author LevelX2
*/
public class DealtDamageToCreatureBySourceDies extends ReplacementEffectImpl {
public DealtDamageToCreatureBySourceDies(Card card, Duration duration) {
super(Duration.WhileOnBattlefield, Outcome.Exile);
super(duration, Outcome.Exile);
if (card.getCardType().contains(CardType.CREATURE)) {
staticText = "If a creature dealt damage by {this} this turn would die, exile it instead";
} else {
@ -75,7 +73,7 @@ public class DealtDamageToCreatureBySourceDies extends ReplacementEffectImpl {
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Permanent permanent = ((ZoneChangeEvent)event).getTarget();
Permanent permanent = ((ZoneChangeEvent) event).getTarget();
Player controller = game.getPlayer(source.getControllerId());
if (controller != null && permanent != null) {
return controller.moveCardToExileWithInfo(permanent, null, "", source.getSourceId(), game, Zone.BATTLEFIELD, true);
@ -90,7 +88,7 @@ public class DealtDamageToCreatureBySourceDies extends ReplacementEffectImpl {
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
ZoneChangeEvent zce = (ZoneChangeEvent) event;
ZoneChangeEvent zce = (ZoneChangeEvent) event;
if (zce.isDiesEvent()) {
DamagedByWatcher watcher = (DamagedByWatcher) game.getState().getWatchers().get("DamagedByWatcher", source.getSourceId());
if (watcher != null) {