mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
update Specialize ImageKey
- fix image not updating when specialized..
This commit is contained in:
@@ -5879,6 +5879,29 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
||||
public final void setImageKey(final String iFN) {
|
||||
getCardForUi().currentState.setImageKey(iFN);
|
||||
}
|
||||
public final void setImageKey(final IPaperCard ipc, final CardStateName stateName) {
|
||||
if (ipc == null)
|
||||
return;
|
||||
switch (stateName) {
|
||||
case SpecializeB:
|
||||
setImageKey(ipc.getCardBSpecImageKey());
|
||||
break;
|
||||
case SpecializeR:
|
||||
setImageKey(ipc.getCardRSpecImageKey());
|
||||
break;
|
||||
case SpecializeG:
|
||||
setImageKey(ipc.getCardGSpecImageKey());
|
||||
break;
|
||||
case SpecializeU:
|
||||
setImageKey(ipc.getCardUSpecImageKey());
|
||||
break;
|
||||
case SpecializeW:
|
||||
setImageKey(ipc.getCardWSpecImageKey());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public String getImageKey(CardStateName state) {
|
||||
CardState c = getCardForUi().states.get(state);
|
||||
@@ -6003,6 +6026,7 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
||||
}
|
||||
public final void setSpecialized(final boolean bool) {
|
||||
specialized = bool;
|
||||
setImageKey(getPaperCard(), getCurrentStateName());
|
||||
}
|
||||
public final boolean canSpecialize() {
|
||||
return getRules() != null && getRules().getSplitType() == CardSplitType.Specialize;
|
||||
|
||||
Reference in New Issue
Block a user