mirror of
https://github.com/correl/mage.git
synced 2025-03-13 01:09:53 -09:00
updated some more cards
This commit is contained in:
parent
33dff8199d
commit
587cb5ba8b
4 changed files with 44 additions and 42 deletions
Mage.Sets/src/mage/cards
|
@ -47,8 +47,8 @@ import mage.filter.predicate.permanent.AnotherPredicate;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetPlayerOrPlaneswalker;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -63,7 +63,7 @@ public class AvacynGuardianAngel extends CardImpl {
|
|||
}
|
||||
|
||||
public AvacynGuardianAngel(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}{W}");
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.ANGEL);
|
||||
|
||||
|
@ -85,7 +85,7 @@ public class AvacynGuardianAngel extends CardImpl {
|
|||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new AvacynGuardianAngelPreventToPlayerEffect(),
|
||||
new ManaCostsImpl<>("{5}{W}{W}"));
|
||||
ability.addTarget(new TargetPlayer());
|
||||
ability.addTarget(new TargetPlayerOrPlaneswalker());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ class AvacynGuardianAngelPreventToPlayerEffect extends OneShotEffect {
|
|||
|
||||
AvacynGuardianAngelPreventToPlayerEffect() {
|
||||
super(Outcome.PreventDamage);
|
||||
this.staticText = "Prevent all damage that would be dealt to target player this turn by sources of the color of your choice";
|
||||
this.staticText = "Prevent all damage that would be dealt to target player or planeswalker this turn by sources of the color of your choice";
|
||||
}
|
||||
|
||||
AvacynGuardianAngelPreventToPlayerEffect(final AvacynGuardianAngelPreventToPlayerEffect effect) {
|
||||
|
@ -220,7 +220,8 @@ class AvacynGuardianAngelPreventToPlayerPreventionEffect extends PreventionEffec
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (super.applies(event, source, game)) {
|
||||
if (event.getType() == GameEvent.EventType.DAMAGE_PLAYER
|
||||
if ((event.getType() == GameEvent.EventType.DAMAGE_PLAYER
|
||||
|| event.getType() == GameEvent.EventType.DAMAGED_PLANESWALKER)
|
||||
&& event.getTargetId().equals(getTargetPointer().getFirst(game, source))) {
|
||||
MageObject sourceObject = game.getObject(event.getSourceId());
|
||||
if (sourceObject != null && sourceObject.getColor(game).shares(this.color)) {
|
||||
|
|
|
@ -51,7 +51,7 @@ import mage.players.Player;
|
|||
import mage.target.Target;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetPlayerOrPlaneswalker;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
|
@ -68,7 +68,7 @@ public class ChandraPyromaster extends CardImpl {
|
|||
|
||||
// +1: Chandra, Pyromaster deals 1 damage to target player and 1 damage to up to one target creature that player controls. That creature can't block this turn.
|
||||
LoyaltyAbility ability1 = new LoyaltyAbility(new ChandraPyromasterEffect1(), 1);
|
||||
Target target1 = new TargetPlayer();
|
||||
Target target1 = new TargetPlayerOrPlaneswalker();
|
||||
ability1.addTarget(target1);
|
||||
ability1.addTarget(new ChandraPyromasterTarget());
|
||||
this.addAbility(ability1);
|
||||
|
@ -97,7 +97,7 @@ class ChandraPyromasterEffect1 extends OneShotEffect {
|
|||
|
||||
public ChandraPyromasterEffect1() {
|
||||
super(Outcome.Damage);
|
||||
staticText = "{this} deals 1 damage to target player and 1 damage to up to one target creature that player controls. That creature can't block this turn";
|
||||
staticText = "{this} deals 1 damage to target player or planeswalker and 1 damage to up to one target creature that player or that planeswalker’s controller controls. That creature can’t block this turn.";
|
||||
}
|
||||
|
||||
public ChandraPyromasterEffect1(final ChandraPyromasterEffect1 effect) {
|
||||
|
@ -111,10 +111,7 @@ class ChandraPyromasterEffect1 extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getTargets().get(0).getFirstTarget());
|
||||
if (player != null) {
|
||||
player.damage(1, source.getSourceId(), game, false, true);
|
||||
}
|
||||
game.damagePlayerOrPlaneswalker(source.getTargets().get(0).getFirstTarget(), 1, source.getSourceId(), game, false, true);
|
||||
Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
||||
if (creature != null) {
|
||||
creature.damage(1, source.getSourceId(), game, false, true);
|
||||
|
@ -129,7 +126,7 @@ class ChandraPyromasterEffect1 extends OneShotEffect {
|
|||
class ChandraPyromasterTarget extends TargetPermanent {
|
||||
|
||||
public ChandraPyromasterTarget() {
|
||||
super(0, 1, new FilterCreaturePermanent("creature that the targeted player controls"), false);
|
||||
super(0, 1, new FilterCreaturePermanent("creature that the targeted player or planeswalker's controller controls"), false);
|
||||
}
|
||||
|
||||
public ChandraPyromasterTarget(final ChandraPyromasterTarget target) {
|
||||
|
@ -138,7 +135,11 @@ class ChandraPyromasterTarget extends TargetPermanent {
|
|||
|
||||
@Override
|
||||
public boolean canTarget(UUID id, Ability source, Game game) {
|
||||
UUID firstTarget = source.getFirstTarget();
|
||||
Player player = game.getPlayerOrPlaneswalkerController(source.getFirstTarget());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
UUID firstTarget = player.getId();
|
||||
Permanent permanent = game.getPermanent(id);
|
||||
if (firstTarget != null && permanent != null && permanent.getControllerId().equals(firstTarget)) {
|
||||
return super.canTarget(id, source, game);
|
||||
|
@ -163,13 +164,16 @@ class ChandraPyromasterTarget extends TargetPermanent {
|
|||
|
||||
if (object instanceof StackObject) {
|
||||
UUID playerId = ((StackObject) object).getStackAbility().getFirstTarget();
|
||||
Player player = game.getPlayerOrPlaneswalkerController(playerId);
|
||||
if (player != null) {
|
||||
for (UUID targetId : availablePossibleTargets) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null && permanent.getControllerId().equals(playerId)) {
|
||||
if (permanent != null && permanent.getControllerId().equals(player.getId())) {
|
||||
possibleTargets.add(targetId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return possibleTargets;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,8 +44,8 @@ import mage.constants.SuperType;
|
|||
import mage.game.Game;
|
||||
import mage.game.command.emblems.ChandraRoaringFlameEmblem;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetPlayerOrPlaneswalker;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -66,7 +66,7 @@ public class ChandraRoaringFlame extends CardImpl {
|
|||
|
||||
// +1: Chandra, Roaring Flame deals 2 damage to target player.
|
||||
LoyaltyAbility loyaltyAbility = new LoyaltyAbility(new DamageTargetEffect(2), 1);
|
||||
loyaltyAbility.addTarget(new TargetPlayer());
|
||||
loyaltyAbility.addTarget(new TargetPlayerOrPlaneswalker());
|
||||
this.addAbility(loyaltyAbility);
|
||||
|
||||
//-2: Chandra, Roaring Flame deals 2 damage to target creature.
|
||||
|
|
|
@ -110,10 +110,7 @@ class SoulOfShandalarEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getTargets().get(0).getFirstTarget());
|
||||
if (player != null) {
|
||||
player.damage(3, source.getSourceId(), game, false, true);
|
||||
}
|
||||
game.damagePlayerOrPlaneswalker(source.getTargets().get(0).getFirstTarget(), 3, source.getSourceId(), game, false, true);
|
||||
Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
||||
if (creature != null) {
|
||||
creature.damage(3, source.getSourceId(), game, false, true);
|
||||
|
|
Loading…
Add table
Reference in a new issue