mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
Some minor changes.
This commit is contained in:
parent
99f206d536
commit
ffd0c24c9c
8 changed files with 56 additions and 52 deletions
|
|
@ -34,7 +34,6 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.MageSingleton;
|
||||
|
|
@ -165,6 +164,7 @@ public abstract class ContinuousEffectImpl extends EffectImpl implements Continu
|
|||
*/
|
||||
@Override
|
||||
public void discard() {
|
||||
this.used = true; // to prevent further usage before effect is removed
|
||||
this.discarded = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ public class ContinuousEffects implements Serializable {
|
|||
for (Ability ability : abilities) {
|
||||
// for replacment effects of static abilities do not use LKI to check if to apply
|
||||
if (ability.getAbilityType() != AbilityType.STATIC || ability.isInUseableZone(game, null, event)) {
|
||||
if (effect.getDuration() != Duration.OneUse || !effect.isUsed()) {
|
||||
if (!effect.isUsed()) {
|
||||
if (!game.getScopeRelevant()
|
||||
|| effect.hasSelfScope()
|
||||
|| !event.getTargetId().equals(ability.getSourceId())) {
|
||||
|
|
|
|||
|
|
@ -267,6 +267,7 @@ class FlashbackReplacementEffect extends ReplacementEffectImpl {
|
|||
if (controller != null) {
|
||||
Card card = game.getCard(event.getTargetId());
|
||||
if (card != null) {
|
||||
discard();
|
||||
return controller.moveCards(
|
||||
card, Zone.EXILED, source, game, false, false, false, event.getAppliedEffects());
|
||||
}
|
||||
|
|
@ -284,7 +285,7 @@ class FlashbackReplacementEffect extends ReplacementEffectImpl {
|
|||
if (event.getTargetId().equals(source.getSourceId())
|
||||
&& ((ZoneChangeEvent) event).getFromZone() == Zone.STACK
|
||||
&& ((ZoneChangeEvent) event).getToZone() != Zone.EXILED) {
|
||||
discard();
|
||||
|
||||
int zcc = game.getState().getZoneChangeCounter(source.getSourceId());
|
||||
if (((FixedTarget) getTargetPointer()).getZoneChangeCounter() == zcc) {
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue