mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Tokens leaving the battlefield will now also create LKI copies.
This commit is contained in:
@@ -111,9 +111,6 @@ public final class CardUtil {
|
|||||||
* @return a copy of C with LastKnownInfo stuff retained.
|
* @return a copy of C with LastKnownInfo stuff retained.
|
||||||
*/
|
*/
|
||||||
public static Card getLKICopy(final Card in) {
|
public static Card getLKICopy(final Card in) {
|
||||||
if (in.isToken()) {
|
|
||||||
return in;
|
|
||||||
}
|
|
||||||
|
|
||||||
final Card newCopy = new Card(in.getUniqueNumber());
|
final Card newCopy = new Card(in.getUniqueNumber());
|
||||||
newCopy.setCurSetCode(in.getCurSetCode());
|
newCopy.setCurSetCode(in.getCurSetCode());
|
||||||
|
|||||||
@@ -155,31 +155,36 @@ public class GameAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Don't copy Tokens, copy only cards leaving the battlefield
|
// Don't copy Tokens, copy only cards leaving the battlefield
|
||||||
if (c.isToken() || suppress || toBattlefield || !fromBattlefield) {
|
if (suppress || !fromBattlefield) {
|
||||||
lastKnownInfo = c;
|
lastKnownInfo = c;
|
||||||
copied = c;
|
copied = c;
|
||||||
} else {
|
} else {
|
||||||
lastKnownInfo = CardUtil.getLKICopy(c);
|
lastKnownInfo = CardUtil.getLKICopy(c);
|
||||||
|
|
||||||
if (c.isCloned()) {
|
if (!c.isToken()) {
|
||||||
c.switchStates(CardCharacteristicName.Cloner, CardCharacteristicName.Original);
|
if (c.isCloned()) {
|
||||||
c.setState(CardCharacteristicName.Original);
|
c.switchStates(CardCharacteristicName.Cloner, CardCharacteristicName.Original);
|
||||||
c.clearStates(CardCharacteristicName.Cloner);
|
c.setState(CardCharacteristicName.Original);
|
||||||
if (c.isFlipCard()) {
|
c.clearStates(CardCharacteristicName.Cloner);
|
||||||
c.clearStates(CardCharacteristicName.Flipped);
|
if (c.isFlipCard()) {
|
||||||
|
c.clearStates(CardCharacteristicName.Flipped);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
copied = CardFactory.copyCard(c, false);
|
copied = CardFactory.copyCard(c, false);
|
||||||
copied.setUnearthed(c.isUnearthed());
|
copied.setUnearthed(c.isUnearthed());
|
||||||
copied.setTapped(false);
|
copied.setTapped(false);
|
||||||
for (final Trigger trigger : copied.getTriggers()) {
|
for (final Trigger trigger : copied.getTriggers()) {
|
||||||
trigger.setHostCard(copied);
|
trigger.setHostCard(copied);
|
||||||
}
|
}
|
||||||
for (final TriggerReplacementBase repl : copied.getReplacementEffects()) {
|
for (final TriggerReplacementBase repl : copied.getReplacementEffects()) {
|
||||||
repl.setHostCard(copied);
|
repl.setHostCard(copied);
|
||||||
}
|
}
|
||||||
if (c.getName().equals("Skullbriar, the Walking Grave")) {
|
if (c.getName().equals("Skullbriar, the Walking Grave")) {
|
||||||
copied.setCounters(c.getCounters());
|
copied.setCounters(c.getCounters());
|
||||||
|
}
|
||||||
|
} else { //Token
|
||||||
|
copied = c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user