mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 09:48:02 +00:00
add UnearthEffect
for copied permanent spell
This commit is contained in:
@@ -11,6 +11,7 @@ import com.google.common.collect.Lists;
|
||||
|
||||
import forge.game.Game;
|
||||
import forge.game.GameEntity;
|
||||
import forge.game.ability.AbilityFactory;
|
||||
import forge.game.ability.AbilityKey;
|
||||
import forge.game.ability.AbilityUtils;
|
||||
import forge.game.ability.SpellAbilityEffect;
|
||||
@@ -197,6 +198,15 @@ public class CopySpellAbilityEffect extends SpellAbilityEffect {
|
||||
}
|
||||
}
|
||||
|
||||
if (sa.hasParam("UnearthEffect")) {
|
||||
if (copy.getCardState().getType().isPermanent()) {
|
||||
String unearthEffect = "DB$ Animate | Keywords$ Haste | Duration$ Permanent | AtEOT$ Sacrifice | Defined$ Self";
|
||||
AbilitySub effectSub = (AbilitySub) AbilityFactory.getAbility(unearthEffect, copy.getHostCard());
|
||||
effectSub.setActivatingPlayer(sa.getActivatingPlayer());
|
||||
copy.setSubAbility(effectSub);
|
||||
}
|
||||
}
|
||||
|
||||
copies.add(copy);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user