mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
Merge bb9cd7e84e into 520c3a36e5
This commit is contained in:
commit
793aac9737
5 changed files with 19 additions and 4 deletions
|
|
@ -99,7 +99,7 @@ public class SpellTransformedAbility extends SpellAbility {
|
||||||
class TransformedEffect extends ContinuousEffectImpl {
|
class TransformedEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
public TransformedEffect() {
|
public TransformedEffect() {
|
||||||
super(Duration.WhileOnStack, Layer.CopyEffects_1, SubLayer.CopyEffects_1a, Outcome.BecomeCreature);
|
super(Duration.WhileOnStack, Layer.TransformCharacteristics_0, SubLayer.NA, Outcome.BecomeCreature);
|
||||||
staticText = "";
|
staticText = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -193,6 +193,7 @@ public abstract class ContinuousEffectImpl extends EffectImpl implements Continu
|
||||||
if (AbilityType.STATIC != source.getAbilityType()) {
|
if (AbilityType.STATIC != source.getAbilityType()) {
|
||||||
if (layer != null) {
|
if (layer != null) {
|
||||||
switch (layer) {
|
switch (layer) {
|
||||||
|
case TransformCharacteristics_0:
|
||||||
case CopyEffects_1:
|
case CopyEffects_1:
|
||||||
case ControlChangingEffects_2:
|
case ControlChangingEffects_2:
|
||||||
case TextChangingEffects_3:
|
case TextChangingEffects_3:
|
||||||
|
|
@ -202,7 +203,8 @@ public abstract class ContinuousEffectImpl extends EffectImpl implements Continu
|
||||||
case PTChangingEffects_7:
|
case PTChangingEffects_7:
|
||||||
this.affectedObjectsSet = true;
|
this.affectedObjectsSet = true;
|
||||||
}
|
}
|
||||||
} else if (hasLayer(Layer.CopyEffects_1)
|
} else if (hasLayer(Layer.TransformCharacteristics_0)
|
||||||
|
|| hasLayer(Layer.CopyEffects_1)
|
||||||
|| hasLayer(Layer.ControlChangingEffects_2)
|
|| hasLayer(Layer.ControlChangingEffects_2)
|
||||||
|| hasLayer(Layer.TextChangingEffects_3)
|
|| hasLayer(Layer.TextChangingEffects_3)
|
||||||
|| hasLayer(Layer.TypeChangingEffects_4)
|
|| hasLayer(Layer.TypeChangingEffects_4)
|
||||||
|
|
|
||||||
|
|
@ -968,7 +968,19 @@ public class ContinuousEffects implements Serializable {
|
||||||
removeInactiveEffects(game);
|
removeInactiveEffects(game);
|
||||||
List<ContinuousEffect> activeLayerEffects = getLayeredEffects(game); // main call
|
List<ContinuousEffect> activeLayerEffects = getLayeredEffects(game); // main call
|
||||||
|
|
||||||
List<ContinuousEffect> layer = filterLayeredEffects(activeLayerEffects, Layer.CopyEffects_1);
|
List<ContinuousEffect> layer = filterLayeredEffects(activeLayerEffects, Layer.TransformCharacteristics_0);
|
||||||
|
for (ContinuousEffect effect : layer) {
|
||||||
|
Set<Ability> abilities = layeredEffects.getAbility(effect.getId());
|
||||||
|
for (Ability ability : abilities) {
|
||||||
|
effect.apply(Layer.TransformCharacteristics_0, SubLayer.NA, ability, game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Reload layerEffect if transform characteristics were applied
|
||||||
|
if (!layer.isEmpty()) {
|
||||||
|
activeLayerEffects = getLayeredEffects(game, "layer_0");
|
||||||
|
}
|
||||||
|
|
||||||
|
layer = filterLayeredEffects(activeLayerEffects, Layer.CopyEffects_1);
|
||||||
for (ContinuousEffect effect : layer) {
|
for (ContinuousEffect effect : layer) {
|
||||||
Set<Ability> abilities = layeredEffects.getAbility(effect.getId());
|
Set<Ability> abilities = layeredEffects.getAbility(effect.getId());
|
||||||
for (Ability ability : abilities) {
|
for (Ability ability : abilities) {
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ public class TransformAbility extends SimpleStaticAbility {
|
||||||
class TransformEffect extends ContinuousEffectImpl {
|
class TransformEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
TransformEffect() {
|
TransformEffect() {
|
||||||
super(Duration.WhileOnBattlefield, Layer.CopyEffects_1, SubLayer.CopyEffects_1a, Outcome.BecomeCreature);
|
super(Duration.WhileOnBattlefield, Layer.TransformCharacteristics_0, SubLayer.NA, Outcome.BecomeCreature);
|
||||||
staticText = "";
|
staticText = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ package mage.constants;
|
||||||
* @author North
|
* @author North
|
||||||
*/
|
*/
|
||||||
public enum Layer {
|
public enum Layer {
|
||||||
|
TransformCharacteristics_0,
|
||||||
CopyEffects_1,
|
CopyEffects_1,
|
||||||
ControlChangingEffects_2,
|
ControlChangingEffects_2,
|
||||||
TextChangingEffects_3,
|
TextChangingEffects_3,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue