mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Card: update the host for static abilties if the state is changed
This commit is contained in:
@@ -382,6 +382,11 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
currentStateName = state;
|
currentStateName = state;
|
||||||
currentState = states.get(state);
|
currentState = states.get(state);
|
||||||
|
|
||||||
|
// update the host for static abilities
|
||||||
|
for (StaticAbility sa : currentState.getStaticAbilities()) {
|
||||||
|
sa.setHostCard(this);
|
||||||
|
}
|
||||||
|
|
||||||
if (updateView) {
|
if (updateView) {
|
||||||
view.updateState(this);
|
view.updateState(this);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user