Add 1.25 UST cards

This commit is contained in:
spjspj 2017-12-16 18:04:26 +11:00
parent 667b2affdf
commit b17d35dff3
6 changed files with 187 additions and 4 deletions

View file

@ -0,0 +1,66 @@
/*
* 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.abilities.keyword;
import mage.constants.Zone;
import mage.abilities.MageSingleton;
import mage.abilities.StaticAbility;
import java.io.ObjectStreamException;
/**
*
* @author BetaSteward_at_googlemail.com (spjspj)
*/
public class SquirrellinkAbility extends StaticAbility implements MageSingleton {
private static final SquirrellinkAbility instance = new SquirrellinkAbility();
private Object readResolve() throws ObjectStreamException {
return instance;
}
public static SquirrellinkAbility getInstance() {
return instance;
}
private SquirrellinkAbility() {
super(Zone.ALL, null);
}
@Override
public String getRule() {
return "Squirrellink <i>(Damage dealt by this creature also causes you to create that many 1/1/ green Squirrel creature tokens.)</i>";
}
@Override
public SquirrellinkAbility copy() {
return instance;
}
}

View file

@ -178,7 +178,8 @@ public enum SubType {
KALEESH("Kaleesh", SubTypeSet.CreatureType, true), // Star Wars
KAVU("Kavu", SubTypeSet.CreatureType),
KELDOR("KelDor", SubTypeSet.CreatureType, true),
KIRIN("Kirin", SubTypeSet.CreatureType),
KILLBOT("Killbot", SubTypeSet.CreatureType, true), // Unstable
KIRIN("Kirin", SubTypeSet.CreatureType),
KITHKIN("Kithkin", SubTypeSet.CreatureType),
KNIGHT("Knight", SubTypeSet.CreatureType),
KOBOLD("Kobold", SubTypeSet.CreatureType),

View file

@ -52,6 +52,7 @@ import mage.game.combat.CombatGroup;
import mage.game.command.CommandObject;
import mage.game.events.*;
import mage.game.events.GameEvent.EventType;
import mage.game.permanent.token.SquirrelToken;
import mage.game.stack.Spell;
import mage.game.stack.StackObject;
import mage.players.Player;
@ -802,6 +803,11 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
if (dealtDamageByThisTurn == null) {
dealtDamageByThisTurn = new HashSet<>();
}
// Unstable ability - Earl of Squirrel
if (sourceAbilities.containsKey(SquirrellinkAbility.getInstance().getId())) {
Player player = game.getPlayer(sourceControllerId);
new SquirrelToken().putOntoBattlefield(damageDone, game, sourceId, player.getId());
}
dealtDamageByThisTurn.add(new MageObjectReference(source, game));
}
if (source == null) {

View file

@ -80,6 +80,7 @@ import mage.game.events.ZoneChangeEvent;
import mage.game.match.MatchPlayer;
import mage.game.permanent.Permanent;
import mage.game.permanent.PermanentCard;
import mage.game.permanent.token.SquirrelToken;
import mage.game.stack.Spell;
import mage.game.stack.StackAbility;
import mage.game.stack.StackObject;
@ -1841,6 +1842,11 @@ public abstract class PlayerImpl implements Player, Serializable {
Player player = game.getPlayer(sourceControllerId);
player.gainLife(actualDamage, game);
}
// Unstable ability - Earl of Squirrel
if (sourceAbilities.containsKey(SquirrellinkAbility.getInstance().getId())) {
Player player = game.getPlayer(sourceControllerId);
new SquirrelToken().putOntoBattlefield(actualDamage, game, sourceId, player.getId());
}
game.fireEvent(new DamagedPlayerEvent(playerId, sourceId, playerId, actualDamage, combatDamage));
return actualDamage;
}
@ -2312,7 +2318,7 @@ public abstract class PlayerImpl implements Player, Serializable {
public boolean flipCoin(Game game) {
return this.flipCoin(game, null);
}
/**
* @param game
* @param appliedEffects
@ -2331,7 +2337,7 @@ public abstract class PlayerImpl implements Player, Serializable {
}
return event.getFlag();
}
@Override
public int rollDice(Game game, int numSides) {
return this.rollDice(game, null, numSides);
@ -2344,7 +2350,7 @@ public abstract class PlayerImpl implements Player, Serializable {
*/
@Override
public int rollDice(Game game, ArrayList<UUID> appliedEffects, int numSides) {
int result = RandomUtil.nextInt(numSides) + 1;
int result = RandomUtil.nextInt(numSides) + 1;
if (!game.isSimulation()) {
game.informPlayers("[Roll a die] " + getLogName() + " rolled a " + result + " on a " + numSides + " sided dice");
}