mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 20:32:06 -08:00
* Fixed a bug that continuous effects created by copied cards (e.g. by Isochronic Scepter using Silence) were not applied correctly.
This commit is contained in:
parent
9d55dd45f5
commit
5a428f10ab
5 changed files with 117 additions and 6 deletions
|
|
@ -390,7 +390,16 @@ public class ContinuousEffects implements Serializable {
|
|||
}
|
||||
|
||||
private boolean checkAbilityStillExists(Ability ability, ContinuousEffect effect, GameEvent event, Game game) {
|
||||
if (effect.getDuration().equals(Duration.OneUse) || effect.getDuration().equals(Duration.Custom) || ability.getSourceId() == null) { // needed for some special replacment effects (e.g. Undying) or commander replacement effect
|
||||
switch(effect.getDuration()) { // effects with fixed duration don't need an object with the source ability (e.g. a silence cast with isochronic Scepter has no more a card object
|
||||
case EndOfCombat:
|
||||
case EndOfGame:
|
||||
case EndOfStep:
|
||||
case EndOfTurn:
|
||||
case OneUse:
|
||||
case Custom: // custom duration means the effect ends itself if needed
|
||||
return true;
|
||||
}
|
||||
if (ability.getSourceId() == null) { // commander replacement effect
|
||||
return true;
|
||||
}
|
||||
MageObject object;
|
||||
|
|
|
|||
|
|
@ -840,6 +840,7 @@ public class GameState implements Serializable, Copyable<GameState> {
|
|||
values.clear();
|
||||
zones.clear();
|
||||
simultaneousEvents.clear();
|
||||
copiedCards.clear();
|
||||
permanentOrderNumber = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue