add Star Wars expansion sets to the Star Wars set

This commit is contained in:
ninthworld 2018-07-16 20:55:05 -07:00
parent 1592a9d173
commit f31bfa829e
72 changed files with 4574 additions and 1 deletions

View file

@ -1022,6 +1022,7 @@ public abstract class GameImpl implements Game, Serializable {
watchers.add(new CastSpellLastTurnWatcher());
watchers.add(new CastSpellYourLastTurnWatcher());
watchers.add(new PlayerLostLifeWatcher());
watchers.add(new PlayerLostLifeNonCombatWatcher());
watchers.add(new BlockedAttackerWatcher());
watchers.add(new DamageDoneWatcher());
watchers.add(new PlanarRollWatcher());

View file

@ -0,0 +1,61 @@
package mage.game.command.emblems;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.PreventionEffectImpl;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect;
import mage.abilities.effects.common.PreventAllDamageToPlayersEffect;
import mage.constants.*;
import mage.game.Game;
import mage.game.command.Emblem;
import mage.game.events.GameEvent;
import mage.game.permanent.token.CatToken2;
import mage.game.turn.Phase;
import mage.players.Player;
/**
*
* @author NinthWorld
*/
public class LukeSkywalkerEmblem extends Emblem {
// -6: You get an emblem with "Prevent all damage that would be dealt to you during combat." Exile Luke Skywalker, the Last Jedi.
public LukeSkywalkerEmblem() {
this.setName("Emblem Luke Skywalker");
this.setExpansionSetCodeForImage("SWS");
this.getAbilities().add(new SimpleStaticAbility(Zone.BATTLEFIELD, new LukeSkywalkerEmblemEffect()));
}
}
class LukeSkywalkerEmblemEffect extends PreventionEffectImpl {
public LukeSkywalkerEmblemEffect() {
super(Duration.Custom, Integer.MAX_VALUE, false);
staticText = "Prevent all damage that would be dealt to you during combat";
}
public LukeSkywalkerEmblemEffect(final LukeSkywalkerEmblemEffect effect) {
super(effect);
}
@Override
public LukeSkywalkerEmblemEffect copy() {
return new LukeSkywalkerEmblemEffect(this);
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (game.getPhase().getType() == TurnPhase.COMBAT
&& super.applies(event, source, game)
&& event.getType() == GameEvent.EventType.DAMAGE_PLAYER) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null && game.getState().getPlayersInRange(controller.getId(), game).contains(event.getTargetId())) {
return true;
}
}
return false;
}
}

View file

@ -0,0 +1,39 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.keyword.MonstrosityAbility;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Collections;
/**
*
* @author NinthWorld
*/
public final class PorgToken extends TokenImpl {
public PorgToken() {
super("Porg", "0/1 green Bird creature token named Porg with \"{G}: Monstrosity 1.\"");
availableImageSetCodes.addAll(Collections.singletonList("SWS"));
cardType.add(CardType.CREATURE);
subtype.add(SubType.BIRD);
color.setGreen(true);
power = new MageInt(0);
toughness = new MageInt(1);
this.addAbility(new MonstrosityAbility("{G}", 1));
}
public PorgToken(final PorgToken token) {
super(token);
}
public PorgToken copy() {
return new PorgToken(this);
}
}

View file

@ -0,0 +1,36 @@
package mage.game.permanent.token;
import java.util.Collections;
import mage.MageInt;
import mage.constants.CardType;
import mage.constants.SubType;
/**
*
* @author NinthWorld
*/
public final class TrooperToken2 extends TokenImpl {
public TrooperToken2() {
super("Trooper", "1/1 black Trooper creature token");
availableImageSetCodes.addAll(Collections.singletonList("SWS"));
this.setTokenType(2);
cardType.add(CardType.CREATURE);
subtype.add(SubType.TROOPER);
color.setBlack(true);
power = new MageInt(1);
toughness = new MageInt(1);
}
public TrooperToken2(final TrooperToken2 token) {
super(token);
}
public TrooperToken2 copy() {
return new TrooperToken2(this);
}
}