mirror of
https://github.com/correl/mage.git
synced 2025-01-12 03:00:13 +00:00
fixes
This commit is contained in:
parent
9c4fb8ed90
commit
fe3e76b64e
8 changed files with 34 additions and 15 deletions
|
@ -44,6 +44,7 @@ import mage.game.Game;
|
|||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.target.common.TargetCreatureOrPlayerAmount;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -83,6 +84,7 @@ class InfernoTitanAbility extends TriggeredAbilityImpl<InfernoTitanAbility> {
|
|||
|
||||
public InfernoTitanAbility() {
|
||||
super(Zone.BATTLEFIELD, new DamageMultiEffect(3), false);
|
||||
this.addTarget(new TargetCreatureOrPlayerAmount(3));
|
||||
}
|
||||
|
||||
public InfernoTitanAbility(final InfernoTitanAbility ability) {
|
||||
|
|
|
@ -51,9 +51,7 @@ public class JacesErasure extends CardImpl<JacesErasure> {
|
|||
super(ownerId, 59, "Jace's Erasure", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
|
||||
this.expansionSetCode = "M11";
|
||||
this.color.setBlue(true);
|
||||
Ability ability = new JacesErasureAbility();
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new JacesErasureAbility());
|
||||
}
|
||||
|
||||
public JacesErasure(final JacesErasure card) {
|
||||
|
@ -75,7 +73,8 @@ public class JacesErasure extends CardImpl<JacesErasure> {
|
|||
class JacesErasureAbility extends TriggeredAbilityImpl<JacesErasureAbility> {
|
||||
|
||||
public JacesErasureAbility() {
|
||||
super(Zone.GRAVEYARD, new PutLibraryIntoGraveTargetEffect(1), true);
|
||||
super(Zone.BATTLEFIELD, new PutLibraryIntoGraveTargetEffect(1), true);
|
||||
this.addTarget(new TargetPlayer());
|
||||
}
|
||||
|
||||
public JacesErasureAbility(final JacesErasureAbility ability) {
|
||||
|
|
|
@ -82,7 +82,7 @@ class JuggernautAbility extends EvasionAbilityImpl<JuggernautAbility> {
|
|||
|
||||
@Override
|
||||
public boolean canBlock(Permanent blocker, Game game) {
|
||||
return !blocker.getAbilities().containsKey(DefenderAbility.getInstance().getId());
|
||||
return !blocker.getSubtype().contains("Wall");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -148,6 +148,6 @@ class SearingBlazeEffect extends OneShotEffect<SearingBlazeEffect> {
|
|||
|
||||
@Override
|
||||
public String getText(Ability source) {
|
||||
return "{this} deals 1 damage to target player and 1 damage to target creature that player controls. \nLandfall — If you had a land enter the battlefield under your control this turn, {this} deals 3 damage to that player and 3 damage to that creature instead.";
|
||||
return "{this} deals 1 damage to target player and 1 damage to target creature that player controls. \nLandfall - If you had a land enter the battlefield under your control this turn, {this} deals 3 damage to that player and 3 damage to that creature instead.";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -154,7 +154,7 @@ public abstract class ActivatedAbilityImpl<T extends ActivatedAbilityImpl<T>> ex
|
|||
return true;
|
||||
else {
|
||||
Card card = (Card)game.getObject(this.sourceId);
|
||||
if (card != null)
|
||||
if (card != null && card.getZone() != Zone.BATTLEFIELD)
|
||||
return card.getOwnerId().equals(playerId);
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -44,6 +44,7 @@ public interface ContinuousEffect<T extends ContinuousEffect<T>> extends Effect<
|
|||
public boolean isUsed();
|
||||
public Duration getDuration();
|
||||
public Date getTimestamp();
|
||||
public void setTimestamp();
|
||||
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game);
|
||||
public boolean hasLayer(Layer layer);
|
||||
public void init(Ability source, Game game);
|
||||
|
|
|
@ -87,6 +87,11 @@ public abstract class ContinuousEffectImpl<T extends ContinuousEffectImpl<T>> ex
|
|||
return timestamp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTimestamp() {
|
||||
this.timestamp = new Date();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasLayer(Layer layer) {
|
||||
return this.layer == layer;
|
||||
|
|
|
@ -261,14 +261,26 @@ public class ContinuousEffects implements Serializable {
|
|||
}
|
||||
|
||||
public void addEffect(ContinuousEffect effect, Ability source) {
|
||||
if (effect instanceof ReplacementEffect)
|
||||
replacementEffects.put((ReplacementEffect)effect, source);
|
||||
else if (effect instanceof PreventionEffect)
|
||||
preventionEffects.put((PreventionEffect)effect, source);
|
||||
else if (effect instanceof AsThoughEffect)
|
||||
asThoughEffects.put((AsThoughEffect) effect,source);
|
||||
else
|
||||
layeredEffects.put(effect, source);
|
||||
if (effect instanceof ReplacementEffect) {
|
||||
ReplacementEffect newEffect = (ReplacementEffect)effect.copy();
|
||||
newEffect.setTimestamp();
|
||||
replacementEffects.put(newEffect, source);
|
||||
}
|
||||
else if (effect instanceof PreventionEffect) {
|
||||
PreventionEffect newEffect = (PreventionEffect)effect.copy();
|
||||
newEffect.setTimestamp();
|
||||
preventionEffects.put(newEffect, source);
|
||||
}
|
||||
else if (effect instanceof AsThoughEffect) {
|
||||
AsThoughEffect newEffect = (AsThoughEffect)effect.copy();
|
||||
newEffect.setTimestamp();
|
||||
asThoughEffects.put(newEffect,source);
|
||||
}
|
||||
else {
|
||||
ContinuousEffect newEffect = (ContinuousEffect)effect.copy();
|
||||
newEffect.setTimestamp();
|
||||
layeredEffects.put(newEffect, source);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue