mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
- Transformed objects must be reset to Original before they go through CardFactory.copyCard, or they end up in a mixed state, at least visually (since the transformed state is set on the copied object).
This commit is contained in:
@@ -213,14 +213,18 @@ public class GameAction {
|
||||
c.updateStateForView();
|
||||
}
|
||||
|
||||
if (fromBattlefield && c.getCurrentStateName() != CardStateName.Original) {
|
||||
// when a card leaves the battlefield, ensure it's in its original state
|
||||
// (we need to do this on the object before copying it, or it won't work correctly e.g.
|
||||
// on Transformed objects)
|
||||
c.setState(CardStateName.Original, false);
|
||||
}
|
||||
|
||||
copied = CardFactory.copyCard(c, false);
|
||||
|
||||
copied.setUnearthed(c.isUnearthed());
|
||||
copied.setTapped(false);
|
||||
if (fromBattlefield) {
|
||||
// when a card leaves the battlefield, ensure it's in its original state
|
||||
copied.setState(CardStateName.Original, false);
|
||||
}
|
||||
|
||||
for (final Trigger trigger : copied.getTriggers()) {
|
||||
trigger.setHostCard(copied);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user