add annihilator & exalted icon and update toxic icon (#5426)

* add annihilator icon and update toxic icon

* add exalted icon
This commit is contained in:
kevlahnota
2024-06-14 20:58:36 +08:00
committed by GitHub
parent a46702c395
commit 14be75e711
9 changed files with 43 additions and 2 deletions

View File

@@ -1469,6 +1469,7 @@ public class CardView extends GameEntityView {
public String getKeywordKey() { return get(TrackableProperty.KeywordKey); }
public String getProtectionKey() { return get(TrackableProperty.ProtectionKey); }
public String getHexproofKey() { return get(TrackableProperty.HexproofKey); }
public boolean hasAnnihilator() { return get(TrackableProperty.HasAnnihilator); }
public boolean hasDeathtouch() { return get(TrackableProperty.HasDeathtouch); }
public boolean hasToxic() { return get(TrackableProperty.HasToxic); }
public boolean hasDevoid() { return get(TrackableProperty.HasDevoid); }
@@ -1476,6 +1477,7 @@ public class CardView extends GameEntityView {
public boolean hasDivideDamage() { return get(TrackableProperty.HasDivideDamage); }
public boolean hasDoubleStrike() { return get(TrackableProperty.HasDoubleStrike); }
public boolean hasDoubleTeam() { return get(TrackableProperty.HasDoubleTeam); }
public boolean hasExalted() { return get(TrackableProperty.HasExalted); }
public boolean hasFirstStrike() { return get(TrackableProperty.HasFirstStrike); }
public boolean hasFlying() { return get(TrackableProperty.HasFlying); }
public boolean hasFear() { return get(TrackableProperty.HasFear); }
@@ -1545,6 +1547,7 @@ public class CardView extends GameEntityView {
}
void updateKeywords(Card c, CardState state) {
c.updateKeywordsCache(state);
set(TrackableProperty.HasAnnihilator, c.hasKeyword(Keyword.ANNIHILATOR, state));
set(TrackableProperty.HasDeathtouch, c.hasKeyword(Keyword.DEATHTOUCH, state));
set(TrackableProperty.HasToxic, c.hasKeyword(Keyword.TOXIC, state));
set(TrackableProperty.HasDevoid, c.hasKeyword(Keyword.DEVOID, state));
@@ -1552,6 +1555,7 @@ public class CardView extends GameEntityView {
set(TrackableProperty.HasDivideDamage, c.hasKeyword("You may assign CARDNAME's combat damage divided as " +
"you choose among defending player and/or any number of creatures they control."));
set(TrackableProperty.HasDoubleStrike, c.hasKeyword(Keyword.DOUBLE_STRIKE, state));
set(TrackableProperty.HasExalted, c.hasKeyword(Keyword.EXALTED, state));
set(TrackableProperty.HasFirstStrike, c.hasKeyword(Keyword.FIRST_STRIKE, state));
set(TrackableProperty.HasFlying, c.hasKeyword(Keyword.FLYING, state));
set(TrackableProperty.HasFear, c.hasKeyword(Keyword.FEAR, state));

View File

@@ -143,6 +143,7 @@ public enum TrackableProperty {
CountBasicLandTypes(TrackableTypes.IntegerType),
KeywordKey(TrackableTypes.StringType),
HasAnnihilator(TrackableTypes.BooleanType),
HasDeathtouch(TrackableTypes.BooleanType),
HasToxic(TrackableTypes.BooleanType),
HasDevoid(TrackableTypes.BooleanType),
@@ -150,6 +151,7 @@ public enum TrackableProperty {
HasDivideDamage(TrackableTypes.BooleanType),
HasDoubleStrike(TrackableTypes.BooleanType),
HasDoubleTeam(TrackableTypes.BooleanType),
HasExalted(TrackableTypes.BooleanType),
HasFirstStrike(TrackableTypes.BooleanType),
HasFlying(TrackableTypes.BooleanType),
HasFear(TrackableTypes.BooleanType),

View File

@@ -94,10 +94,12 @@ public class CardFaceSymbols {
//ability icons
MANA_IMAGES.put("commander", FSkin.getImage(FSkinProp.IMG_ABILITY_COMMANDER));
MANA_IMAGES.put("ringbearer", FSkin.getImage(FSkinProp.IMG_ABILITY_RINGBEARER));
MANA_IMAGES.put("annihilator", FSkin.getImage(FSkinProp.IMG_ABILITY_ANNIHILATOR));
MANA_IMAGES.put("toxic", FSkin.getImage(FSkinProp.IMG_ABILITY_TOXIC));
MANA_IMAGES.put("deathtouch", FSkin.getImage(FSkinProp.IMG_ABILITY_DEATHTOUCH));
MANA_IMAGES.put("defender", FSkin.getImage(FSkinProp.IMG_ABILITY_DEFENDER));
MANA_IMAGES.put("doublestrike", FSkin.getImage(FSkinProp.IMG_ABILITY_DOUBLE_STRIKE));
MANA_IMAGES.put("exalted", FSkin.getImage(FSkinProp.IMG_ABILITY_EXALTED));
MANA_IMAGES.put("firststrike", FSkin.getImage(FSkinProp.IMG_ABILITY_FIRST_STRIKE));
MANA_IMAGES.put("fear", FSkin.getImage(FSkinProp.IMG_ABILITY_FEAR));
MANA_IMAGES.put("flash", FSkin.getImage(FSkinProp.IMG_ABILITY_FLASH));

View File

@@ -575,6 +575,14 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
CardFaceSymbols.drawAbilitySymbol("firststrike", g, abiX, abiY, abiScale, abiScale);
abiY += abiSpace;
}
if (card.getCurrentState().hasAnnihilator()) {
CardFaceSymbols.drawAbilitySymbol("annihilator", g, abiX, abiY, abiScale, abiScale);
abiY += abiSpace;
}
if (card.getCurrentState().hasExalted()) {
CardFaceSymbols.drawAbilitySymbol("exalted", g, abiX, abiY, abiScale, abiScale);
abiY += abiSpace;
}
if (card.getCurrentState().hasDeathtouch()) {
CardFaceSymbols.drawAbilitySymbol("deathtouch", g, abiX, abiY, abiScale, abiScale);
abiY += abiSpace;

View File

@@ -350,13 +350,15 @@ public enum FSkinImage implements FSkinImageInterface {
//COMMANDER
IMG_ABILITY_COMMANDER (FSkinProp.IMG_ABILITY_COMMANDER),
IMG_ABILITY_RINGBEARER (FSkinProp.IMG_ABILITY_RINGBEARER),
//ANNIHILATOR
IMG_ABILITY_ANNIHILATOR (FSkinProp.IMG_ABILITY_ANNIHILATOR),
//TOXIC
IMG_ABILITY_TOXIC (FSkinProp.IMG_ABILITY_TOXIC),
//ABILITY ICONS
IMG_ABILITY_DEATHTOUCH (FSkinProp.IMG_ABILITY_DEATHTOUCH),
IMG_ABILITY_DEFENDER (FSkinProp.IMG_ABILITY_DEFENDER),
IMG_ABILITY_DOUBLE_STRIKE (FSkinProp.IMG_ABILITY_DOUBLE_STRIKE),
IMG_ABILITY_EXALTED (FSkinProp.IMG_ABILITY_EXALTED),
IMG_ABILITY_FIRST_STRIKE (FSkinProp.IMG_ABILITY_FIRST_STRIKE),
IMG_ABILITY_FEAR (FSkinProp.IMG_ABILITY_FEAR),
IMG_ABILITY_FLASH (FSkinProp.IMG_ABILITY_FLASH),

View File

@@ -75,10 +75,12 @@ public class CardFaceSymbols {
Forge.getAssets().manaImages().put("commander", FSkinImage.IMG_ABILITY_COMMANDER);
Forge.getAssets().manaImages().put("ringbearer", FSkinImage.IMG_ABILITY_RINGBEARER);
Forge.getAssets().manaImages().put("annihilator", FSkinImage.IMG_ABILITY_ANNIHILATOR);
Forge.getAssets().manaImages().put("toxic", FSkinImage.IMG_ABILITY_TOXIC);
Forge.getAssets().manaImages().put("deathtouch", FSkinImage.IMG_ABILITY_DEATHTOUCH);
Forge.getAssets().manaImages().put("defender", FSkinImage.IMG_ABILITY_DEFENDER);
Forge.getAssets().manaImages().put("doublestrike", FSkinImage.IMG_ABILITY_DOUBLE_STRIKE);
Forge.getAssets().manaImages().put("exalted", FSkinImage.IMG_ABILITY_EXALTED);
Forge.getAssets().manaImages().put("firststrike", FSkinImage.IMG_ABILITY_FIRST_STRIKE);
Forge.getAssets().manaImages().put("fear", FSkinImage.IMG_ABILITY_FEAR);
Forge.getAssets().manaImages().put("flash", FSkinImage.IMG_ABILITY_FLASH);

View File

@@ -906,6 +906,24 @@ public class CardRenderer {
abiY += abiSpace;
abiCount += 1;
}
if (card.getCurrentState().hasAnnihilator()) {
if (abiCount > 5) {
abiY = cy + (abiSpace * (abiCount - 6));
abiX = cx + ((cw * 2) / 1.92f);
}
CardFaceSymbols.drawSymbol("annihilator", g, abiX, abiY, abiScale, abiScale);
abiY += abiSpace;
abiCount += 1;
}
if (card.getCurrentState().hasExalted()) {
if (abiCount > 5) {
abiY = cy + (abiSpace * (abiCount - 6));
abiX = cx + ((cw * 2) / 1.92f);
}
CardFaceSymbols.drawSymbol("exalted", g, abiX, abiY, abiScale, abiScale);
abiY += abiSpace;
abiCount += 1;
}
if (card.getCurrentState().hasDeathtouch()) {
if (abiCount > 5) {
abiY = cy + (abiSpace * (abiCount - 6));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 114 KiB

View File

@@ -504,12 +504,15 @@ public enum FSkinProp {
//COMMANDER
IMG_ABILITY_COMMANDER (new int[] {330, 576, 80, 80}, PropType.ABILITY),
IMG_ABILITY_RINGBEARER (new int[] {410, 822, 80, 80}, PropType.MANAICONS),
//ANNIHILATOR
IMG_ABILITY_ANNIHILATOR(new int[] {166, 658, 80, 80}, PropType.ABILITY),
//TOXIC
IMG_ABILITY_TOXIC (new int[] {630, 1536, 46, 46}, PropType.ICON),
IMG_ABILITY_TOXIC (new int[] {248, 658, 80, 80}, PropType.ABILITY),
//Ability Icons
IMG_ABILITY_DEATHTOUCH (new int[] {2, 2, 80, 80}, PropType.ABILITY),
IMG_ABILITY_DEFENDER (new int[] {84, 2, 80, 80}, PropType.ABILITY),
IMG_ABILITY_DOUBLE_STRIKE (new int[] {166, 2, 80, 80}, PropType.ABILITY),
IMG_ABILITY_EXALTED (new int[] {330, 658, 80, 80}, PropType.ABILITY),
IMG_ABILITY_FIRST_STRIKE (new int[] {248, 2, 80, 80}, PropType.ABILITY),
IMG_ABILITY_FEAR (new int[] {84, 412, 80, 80}, PropType.ABILITY),
IMG_ABILITY_FLASH (new int[] {166, 576, 80, 80}, PropType.ABILITY),