foul-magics/Mage/src/main/java/mage/abilities/icon/CardIcon.java
Alexander Novotny fae63d9d4b
Add additional ability icons (#10549)
* Slightly revamped basic card icons

All icon classes which were just static text have been removed, and instead replaced with a static instance.

A new icon for reach has been added

Some icons have been reused for new abilities (hexproof for shroud and ward, infect for toxic)

When a card would have two icons of the same type, the icons are instead combines into one with a combined hover tooltip.

* Fixed missing capitalization on ward, hexproof
2023-07-04 01:22:07 +04:00

41 lines
No EOL
799 B
Java

package mage.abilities.icon;
import mage.util.Copyable;
/**
* @author JayDi85
*/
public interface CardIcon extends Copyable<CardIcon> {
CardIconType getIconType();
String getText();
/**
* Card hint on popup, support html and mana/restrict symbols
*
* @return
*/
String getHint();
/**
* Whether or not this icon can be combined with others with the same icon type
*/
default boolean canBeCombined() {
return getText().isEmpty();
}
/**
* Combined info (text + hint)
*
* @return
*/
default String getCombinedInfo() {
String res = getText();
if (!getHint().isEmpty()) {
res += res.isEmpty() ? "" : " - ";
res += getHint();
}
return res;
}
}