add Ward and Wither keyword icon

-closes #5361
This commit is contained in:
Anthony Calosa
2024-06-03 21:52:03 +08:00
parent eec970eee6
commit 6df802ce32
10 changed files with 41 additions and 1 deletions

View File

@@ -1468,6 +1468,8 @@ public class CardView extends GameEntityView {
public boolean hasFear() { return get(TrackableProperty.HasFear); }
public boolean hasHexproof() { return get(TrackableProperty.HasHexproof); }
public boolean hasHorsemanship() { return get(TrackableProperty.HasHorsemanship); }
public boolean hasWard() { return get(TrackableProperty.HasWard); }
public boolean hasWither() { return get(TrackableProperty.HasWither); }
public boolean hasIndestructible() { return get(TrackableProperty.HasIndestructible); }
public boolean hasIntimidate() { return get(TrackableProperty.HasIntimidate); }
public boolean hasLifelink() { return get(TrackableProperty.HasLifelink); }
@@ -1542,6 +1544,8 @@ public class CardView extends GameEntityView {
set(TrackableProperty.HasFear, c.hasKeyword(Keyword.FEAR, state));
set(TrackableProperty.HasHexproof, c.hasKeyword(Keyword.HEXPROOF, state));
set(TrackableProperty.HasHorsemanship, c.hasKeyword(Keyword.HORSEMANSHIP, state));
set(TrackableProperty.HasWard, c.hasKeyword(Keyword.WARD, state));
set(TrackableProperty.HasWither, c.hasKeyword(Keyword.WITHER, state));
set(TrackableProperty.HasIndestructible, c.hasKeyword(Keyword.INDESTRUCTIBLE, state));
set(TrackableProperty.HasIntimidate, c.hasKeyword(Keyword.INTIMIDATE, state));
set(TrackableProperty.HasLifelink, c.hasKeyword(Keyword.LIFELINK, state));

View File

@@ -172,6 +172,8 @@ public enum TrackableProperty {
HasHaste(TrackableTypes.BooleanType),
HasInfect(TrackableTypes.BooleanType),
HasStorm(TrackableTypes.BooleanType),
HasWard(TrackableTypes.BooleanType),
HasWither(TrackableTypes.BooleanType),
YouMayLook(TrackableTypes.BooleanType),
OpponentMayLook(TrackableTypes.BooleanType),
BlockAdditional(TrackableTypes.IntegerType),

View File

@@ -113,6 +113,8 @@ public class CardFaceSymbols {
MANA_IMAGES.put("shadow", FSkin.getImage(FSkinProp.IMG_ABILITY_SHADOW));
MANA_IMAGES.put("shroud", FSkin.getImage(FSkinProp.IMG_ABILITY_SHROUD));
MANA_IMAGES.put("trample", FSkin.getImage(FSkinProp.IMG_ABILITY_TRAMPLE));
MANA_IMAGES.put("ward", FSkin.getImage(FSkinProp.IMG_ABILITY_WARD));
MANA_IMAGES.put("wither", FSkin.getImage(FSkinProp.IMG_ABILITY_WITHER));
MANA_IMAGES.put("vigilance", FSkin.getImage(FSkinProp.IMG_ABILITY_VIGILANCE));
//hexproof from
MANA_IMAGES.put("hexproofR", FSkin.getImage(FSkinProp.IMG_ABILITY_HEXPROOF_R));

View File

@@ -664,6 +664,14 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
CardFaceSymbols.drawAbilitySymbol("lifelink", g, abiX, abiY, abiScale, abiScale);
abiY += abiSpace;
}
if (card.getCurrentState().hasWard()) {
CardFaceSymbols.drawAbilitySymbol("ward", g, abiX, abiY, abiScale, abiScale);
abiY += abiSpace;
}
if (card.getCurrentState().hasWither()) {
CardFaceSymbols.drawAbilitySymbol("wither", g, abiX, abiY, abiScale, abiScale);
abiY += abiSpace;
}
if (card.getCurrentState().hasDefender()) {
CardFaceSymbols.drawAbilitySymbol("defender", g, abiX, abiY, abiScale, abiScale);
abiY += abiSpace;

View File

@@ -373,6 +373,8 @@ public enum FSkinImage implements FSkinImageInterface {
IMG_ABILITY_SHADOW (FSkinProp.IMG_ABILITY_SHADOW),
IMG_ABILITY_SHROUD (FSkinProp.IMG_ABILITY_SHROUD),
IMG_ABILITY_TRAMPLE (FSkinProp.IMG_ABILITY_TRAMPLE),
IMG_ABILITY_WARD (FSkinProp.IMG_ABILITY_WARD),
IMG_ABILITY_WITHER (FSkinProp.IMG_ABILITY_WITHER),
IMG_ABILITY_VIGILANCE (FSkinProp.IMG_ABILITY_VIGILANCE),
//HEXPROOF FROM
IMG_ABILITY_HEXPROOF_R (FSkinProp.IMG_ABILITY_HEXPROOF_R),

View File

@@ -47,7 +47,7 @@ public class FSkinImageImpl implements FSkinImageInterface {
}
}
if (texture != null) {
if (!(type == FSkinProp.PropType.IMAGE || type == FSkinProp.PropType.ICON || type == FSkinProp.PropType.MANAICONS)) { //just return region for preferred file if not icons file
if (!(type == FSkinProp.PropType.ABILITY || type == FSkinProp.PropType.IMAGE || type == FSkinProp.PropType.ICON || type == FSkinProp.PropType.MANAICONS)) { //just return region for preferred file if not icons file
textureRegion = new TextureRegion(texture, x, y, w, h);
return;
}

View File

@@ -95,6 +95,8 @@ public class CardFaceSymbols {
Forge.getAssets().manaImages().put("shadow", FSkinImage.IMG_ABILITY_SHADOW);
Forge.getAssets().manaImages().put("shroud", FSkinImage.IMG_ABILITY_SHROUD);
Forge.getAssets().manaImages().put("trample", FSkinImage.IMG_ABILITY_TRAMPLE);
Forge.getAssets().manaImages().put("ward", FSkinImage.IMG_ABILITY_WARD);
Forge.getAssets().manaImages().put("wither", FSkinImage.IMG_ABILITY_WITHER);
Forge.getAssets().manaImages().put("vigilance", FSkinImage.IMG_ABILITY_VIGILANCE);
//hexproof from
Forge.getAssets().manaImages().put("hexproofR", FSkinImage.IMG_ABILITY_HEXPROOF_R);

View File

@@ -1076,6 +1076,24 @@ public class CardRenderer {
abiY += abiSpace;
abiCount += 1;
}
if (card.getCurrentState().hasWard()) {
if (abiCount > 5) {
abiY = cy + (abiSpace * (abiCount - 6));
abiX = cx + ((cw * 2) / 1.92f);
}
CardFaceSymbols.drawSymbol("ward", g, abiX, abiY, abiScale, abiScale);
abiY += abiSpace;
abiCount += 1;
}
if (card.getCurrentState().hasWither()) {
if (abiCount > 5) {
abiY = cy + (abiSpace * (abiCount - 6));
abiX = cx + ((cw * 2) / 1.92f);
}
CardFaceSymbols.drawSymbol("wither", g, abiX, abiY, abiScale, abiScale);
abiY += abiSpace;
abiCount += 1;
}
if (card.getCurrentState().hasDefender()) {
if (abiCount > 5) {
abiY = cy + (abiSpace * (abiCount - 6));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 98 KiB

View File

@@ -526,6 +526,8 @@ public enum FSkinProp {
IMG_ABILITY_SHADOW (new int[] {84, 576, 80, 80}, PropType.ABILITY),
IMG_ABILITY_SHROUD (new int[] {330, 330, 80, 80}, PropType.ABILITY),
IMG_ABILITY_TRAMPLE (new int[] {412, 330, 80, 80}, PropType.ABILITY),
IMG_ABILITY_WARD (new int[] {84, 658, 80, 80}, PropType.ABILITY),
IMG_ABILITY_WITHER (new int[] {2, 658, 80, 80}, PropType.ABILITY),
IMG_ABILITY_VIGILANCE (new int[] {2, 412, 80, 80}, PropType.ABILITY),
//Hexproof From
IMG_ABILITY_HEXPROOF_R (new int[] {2, 494, 80, 80}, PropType.ABILITY),