Face down images and cards rework (#11873)

Face down changes:
* GUI: added visible face down type and real card name for controller/owner (opponent can see it after game ends);
* GUI: added day/night button to view real card for controller/owner (opponent can see it after game ends);
* game: fixed that faced-down card can render symbols, abilities and other hidden data from a real card;
* images: added image support for normal faced-down cards;
* images: added image support for morph and megamorph faced-down cards;
* images: added image support for foretell faced-down cards;

Other changes:
* images: fixed missing tokens from DDD set;
* images: no more client restart to apply newly downloaded images or render settings;
* images: improved backface image quality (use main menu -> symbols to download it);
This commit is contained in:
Oleg Agafonov 2024-02-29 01:14:54 +04:00 committed by GitHub
parent 4901de12c1
commit e38a79f231
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
104 changed files with 2178 additions and 1495 deletions

View file

@ -22,10 +22,11 @@ public class PermanentToken extends PermanentImpl {
// non-modifyable container with token characteristics
// this PermanentToken resets to it on each game cycle
// TODO: see PermanentCard.card for usage research and fixes
protected Token token;
public PermanentToken(Token token, UUID controllerId, Game game) {
super(controllerId, controllerId, token.getName());
super(controllerId, controllerId, token.getName()); // random id
this.token = token.copy();
this.token.getAbilities().newOriginalId(); // neccessary if token has ability like DevourAbility()
this.token.getAbilities().setSourceId(objectId);
@ -76,11 +77,6 @@ public class PermanentToken extends PermanentImpl {
}
}
@Override
public String toString() {
return String.format("%s - %s", getExpansionSetCode(), getName());
}
private void copyFromToken(Token token, Game game, boolean reset) {
// modify all attributes permanently (without game usage)
this.name = token.getName();
@ -119,7 +115,7 @@ public class PermanentToken extends PermanentImpl {
}
@Override
public MageObject getBasicMageObject(Game game) {
public MageObject getBasicMageObject() {
return token;
}