mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
Merge branch 'epicRework' into 'master'
Epic rework See merge request core-developers/forge!1018
This commit is contained in:
@@ -167,7 +167,20 @@ public class CopySpellAbilityEffect extends SpellAbilityEffect {
|
||||
"Select a spell to copy", ImmutableMap.of());
|
||||
chosenSA.setActivatingPlayer(controller);
|
||||
for (int i = 0; i < amount; i++) {
|
||||
copies.add(CardFactory.copySpellAbilityAndPossiblyHost(card, chosenSA.getHostCard(), chosenSA, true));
|
||||
SpellAbility copy = CardFactory.copySpellAbilityAndPossiblyHost(
|
||||
card, chosenSA.getHostCard(), chosenSA, true);
|
||||
|
||||
// extra case for Epic to remove the keyword and the last part of the SpellAbility
|
||||
if (sa.hasParam("Epic")) {
|
||||
copy.getHostCard().removeIntrinsicKeyword("Epic");
|
||||
SpellAbility sub = copy;
|
||||
while (sub.getSubAbility() != null) {
|
||||
sub = sub.getSubAbility();
|
||||
}
|
||||
sub.getParent().setSubAbility(null);
|
||||
}
|
||||
|
||||
copies.add(copy);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3746,14 +3746,14 @@ public class CardFactoryUtil {
|
||||
// Epic does modify existing SA, and does not add new one
|
||||
|
||||
// Add the Epic effect as a subAbility
|
||||
String dbStr = "DB$ Effect | Triggers$ EpicTrigger | SVars$ EpicCopy | StaticAbilities$ EpicCantBeCast | Duration$ Permanent | Unique$ True";
|
||||
String dbStr = "DB$ Effect | Triggers$ EpicTrigger | SVars$ EpicCopy | StaticAbilities$ EpicCantBeCast | Duration$ Permanent";
|
||||
|
||||
final AbilitySub newSA = (AbilitySub) AbilityFactory.getAbility(dbStr.toString(), card);
|
||||
|
||||
card.setSVar("EpicCantBeCast", "Mode$ CantBeCast | ValidCard$ Card | Caster$ You | EffectZone$ Command | Description$ For the rest of the game, you can't cast spells.");
|
||||
card.setSVar("EpicTrigger", "Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ EpicCopy | TriggerDescription$ "
|
||||
+ "At the beginning of each of your upkeeps, copy " + card.toString() + " except for its epic ability.");
|
||||
card.setSVar("EpicCopy", "DB$ CopySpellAbility | Defined$ EffectSource");
|
||||
card.setSVar("EpicCopy", "DB$ CopySpellAbility | Defined$ EffectSource | Epic$ True");
|
||||
|
||||
final SpellAbility origSA = card.getFirstSpellAbility();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user