mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
Added small icon for tokens on token permanents. Token copied from permanents (Giant Adephage) show now the image of the permanent.
This commit is contained in:
parent
5216eddb71
commit
95a12028e6
8 changed files with 69 additions and 3 deletions
|
|
@ -153,11 +153,20 @@ public class CardView extends SimpleCardView {
|
|||
|
||||
|
||||
if (card instanceof PermanentToken) {
|
||||
this.isToken = true;
|
||||
this.rarity = Rarity.COMMON;
|
||||
this.expansionSetCode = ((PermanentToken) card).getExpansionSetCode();
|
||||
if (((PermanentToken) card).getToken().getOriginalCardNumber() > 0) {
|
||||
// a token copied from permanent
|
||||
this.expansionSetCode = ((PermanentToken) card).getToken().getOriginalExpansionSetCode();
|
||||
this.cardNumber = ((PermanentToken) card).getToken().getOriginalCardNumber();
|
||||
} else {
|
||||
// a created token
|
||||
this.expansionSetCode = ((PermanentToken) card).getExpansionSetCode();
|
||||
}
|
||||
//
|
||||
// set code und card number for token copies to get the image
|
||||
this.rules = ((PermanentToken) card).getRules();
|
||||
this.type = ((PermanentToken)card).getToken().getTokenType();
|
||||
this.isToken = true;
|
||||
} else {
|
||||
this.rarity = card.getRarity();
|
||||
this.isToken = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue