GUI: improved rendering of Saga and Case cards (#11762)

Co-authored-by: Matthew Wilson <matthew_w@vaadin.com>
This commit is contained in:
Matthew Wilson 2024-02-06 10:33:11 +02:00 committed by GitHub
parent c4e0d64428
commit e1968a6b5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 41 additions and 2 deletions

View file

@ -527,6 +527,7 @@ public class CardView extends SimpleCardView {
// Determine what part of the art to slice out for spells on the stack which originate
// from a split, fuse, or aftermath split card.
// Modal double faces cards draws as normal cards
// Sagas and cases have completely different layouts
SpellAbilityType ty = spell.getSpellAbility().getSpellAbilityType();
if (ty == SpellAbilityType.SPLIT_RIGHT || ty == SpellAbilityType.SPLIT_LEFT || ty == SpellAbilityType.SPLIT_FUSED) {
// Needs a special art rect
@ -547,6 +548,10 @@ public class CardView extends SimpleCardView {
artRect = ArtRect.SPLIT_LEFT;
}
}
} else if (spell.getSubtype().contains(SubType.SAGA)) {
artRect = ArtRect.SAGA;
} else if (spell.getSubtype().contains(SubType.CASE)) {
artRect = ArtRect.CASE;
}
// show for modal spell, which mode was chosen