mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Merge branch 'bloodyCardTraits' into 'master'
CardTaits: make cardtraits inside LKI has the same id's as the in the original See merge request core-developers/forge!197
This commit is contained in:
@@ -2466,7 +2466,7 @@ public class ComputerUtilCombat {
|
||||
for (SpellAbility sa : original.getSpellAbilities()) {
|
||||
if (sa.getApi() == ApiType.SetState && ComputerUtilCost.canPayCost(sa, original.getController())) {
|
||||
Card transformed = CardUtil.getLKICopy(original);
|
||||
transformed.getCurrentState().copyFrom(original, original.getAlternateState());
|
||||
transformed.getCurrentState().copyFrom(original.getAlternateState(), true);
|
||||
transformed.updateStateForView();
|
||||
return transformed;
|
||||
}
|
||||
|
||||
@@ -88,9 +88,9 @@ public class ChooseCardNameAi extends SpellAbilityAi {
|
||||
Card copy = CardUtil.getLKICopy(card);
|
||||
// for calcing i need only one split side
|
||||
if (isOther) {
|
||||
copy.getCurrentState().copyFrom(card, card.getState(CardStateName.RightSplit));
|
||||
copy.getCurrentState().copyFrom(card.getState(CardStateName.RightSplit), true);
|
||||
} else {
|
||||
copy.getCurrentState().copyFrom(card, card.getState(CardStateName.LeftSplit));
|
||||
copy.getCurrentState().copyFrom(card.getState(CardStateName.LeftSplit), true);
|
||||
}
|
||||
copy.updateStateForView();
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ public class SetStateAi extends SpellAbilityAi {
|
||||
|
||||
// need a copy for evaluation
|
||||
Card transformed = CardUtil.getLKICopy(card);
|
||||
transformed.getCurrentState().copyFrom(card, card.getAlternateState());
|
||||
transformed.getCurrentState().copyFrom(card.getAlternateState(), true);
|
||||
transformed.updateStateForView();
|
||||
|
||||
// TODO: compareCards assumes that a creature will transform into a creature. Need to improve this
|
||||
|
||||
@@ -29,7 +29,6 @@ import forge.game.phase.PhaseHandler;
|
||||
import forge.game.phase.PhaseType;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.player.RegisteredPlayer;
|
||||
import forge.game.spellability.AbilityActivated;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
import forge.game.spellability.SpellAbilityRestriction;
|
||||
import forge.game.spellability.SpellAbilityStackInstance;
|
||||
@@ -263,15 +262,8 @@ public class GameCopier {
|
||||
newCard.addStaticAbility(stAb);
|
||||
}
|
||||
for (SpellAbility sa : c.getSpellAbilities()) {
|
||||
SpellAbility saCopy;
|
||||
|
||||
if (sa instanceof AbilityActivated) {
|
||||
saCopy = ((AbilityActivated)sa).getCopy();
|
||||
} else {
|
||||
saCopy = sa.copy();
|
||||
}
|
||||
SpellAbility saCopy = sa.copy(newCard, true);
|
||||
if (saCopy != null) {
|
||||
saCopy.setHostCard(newCard);
|
||||
newCard.addSpellAbility(saCopy);
|
||||
} else {
|
||||
System.err.println(sa.toString());
|
||||
|
||||
Reference in New Issue
Block a user