[Mobile] Add Landwalk and Commander Icons

This commit is contained in:
Anthony Calosa
2020-12-06 16:39:51 +08:00
parent 311be33896
commit 3ba79ea606
8 changed files with 31 additions and 3 deletions

View File

@@ -1145,6 +1145,9 @@ public class CardView extends GameEntityView {
public boolean hasStorm() {
return get(TrackableProperty.HasStorm);
}
public boolean hasLandwalk() {
return get(TrackableProperty.HasLandwalk);
}
public String getAbilityText() {
return get(TrackableProperty.AbilityText);
@@ -1175,6 +1178,7 @@ public class CardView extends GameEntityView {
set(TrackableProperty.HasHaste, c.hasKeyword(Keyword.HASTE, state));
set(TrackableProperty.HasInfect, c.hasKeyword(Keyword.INFECT, state));
set(TrackableProperty.HasStorm, c.hasKeyword(Keyword.STORM, state));
set(TrackableProperty.HasLandwalk, c.hasKeyword(Keyword.LANDWALK, state));
updateAbilityText(c, state);
//set protectionKey for Icons
set(TrackableProperty.ProtectionKey, c.getProtectionKey());

View File

@@ -114,6 +114,7 @@ public enum TrackableProperty {
HasShroud(TrackableTypes.BooleanType),
HasTrample(TrackableTypes.BooleanType),
HasVigilance(TrackableTypes.BooleanType),
HasLandwalk(TrackableTypes.BooleanType),
//protectionkey
ProtectionKey(TrackableTypes.StringType),
//hexproofkey

View File

@@ -351,6 +351,8 @@ public enum FSkinImage implements FImage {
FOIL_19 (FSkinProp.FOIL_19, SourceFile.OLD_FOILS),
FOIL_20 (FSkinProp.FOIL_20, SourceFile.OLD_FOILS),
//COMMANDER
IMG_ABILITY_COMMANDER (FSkinProp.IMG_ABILITY_COMMANDER, SourceFile.ABILITIES),
//ABILITY ICONS
IMG_ABILITY_DEATHTOUCH (FSkinProp.IMG_ABILITY_DEATHTOUCH, SourceFile.ABILITIES),
IMG_ABILITY_DEFENDER (FSkinProp.IMG_ABILITY_DEFENDER, SourceFile.ABILITIES),
@@ -364,6 +366,7 @@ public enum FSkinImage implements FImage {
IMG_ABILITY_HORSEMANSHIP (FSkinProp.IMG_ABILITY_HORSEMANSHIP, SourceFile.ABILITIES),
IMG_ABILITY_INDESTRUCTIBLE (FSkinProp.IMG_ABILITY_INDESTRUCTIBLE, SourceFile.ABILITIES),
IMG_ABILITY_INTIMIDATE (FSkinProp.IMG_ABILITY_INTIMIDATE, SourceFile.ABILITIES),
IMG_ABILITY_LANDWALK (FSkinProp.IMG_ABILITY_LANDWALK, SourceFile.ABILITIES),
IMG_ABILITY_LIFELINK (FSkinProp.IMG_ABILITY_LIFELINK, SourceFile.ABILITIES),
IMG_ABILITY_MENACE (FSkinProp.IMG_ABILITY_MENACE, SourceFile.ABILITIES),
IMG_ABILITY_REACH (FSkinProp.IMG_ABILITY_REACH, SourceFile.ABILITIES),

View File

@@ -102,6 +102,7 @@ public class CardFaceSymbols {
MANA_IMAGES.put("foil19", FSkinImage.FOIL_19);
MANA_IMAGES.put("foil20", FSkinImage.FOIL_20);
MANA_IMAGES.put("commander", FSkinImage.IMG_ABILITY_COMMANDER);
MANA_IMAGES.put("deathtouch", FSkinImage.IMG_ABILITY_DEATHTOUCH);
MANA_IMAGES.put("defender", FSkinImage.IMG_ABILITY_DEFENDER);
@@ -115,6 +116,7 @@ public class CardFaceSymbols {
MANA_IMAGES.put("horsemanship", FSkinImage.IMG_ABILITY_HORSEMANSHIP);
MANA_IMAGES.put("indestructible", FSkinImage.IMG_ABILITY_INDESTRUCTIBLE);
MANA_IMAGES.put("intimidate", FSkinImage.IMG_ABILITY_INTIMIDATE);
MANA_IMAGES.put("landwalk", FSkinImage.IMG_ABILITY_LANDWALK);
MANA_IMAGES.put("lifelink", FSkinImage.IMG_ABILITY_LIFELINK);
MANA_IMAGES.put("menace", FSkinImage.IMG_ABILITY_MENACE);
MANA_IMAGES.put("reach", FSkinImage.IMG_ABILITY_REACH);

View File

@@ -654,6 +654,11 @@ public class CardRenderer {
abiY += abiSpace;
abiCount += 1;
}
if (card.isCommander()) {
CardFaceSymbols.drawSymbol("commander", g, abiX, abiY, abiScale, abiScale);
abiY += abiSpace;
abiCount += 1;
}
if (card.getCurrentState().hasFlying()) {
CardFaceSymbols.drawSymbol("flying", g, abiX, abiY, abiScale, abiScale);
abiY += abiSpace;
@@ -716,6 +721,11 @@ public class CardRenderer {
abiY += abiSpace;
abiCount += 1;
}
if (card.getCurrentState().hasLandwalk()) {
CardFaceSymbols.drawSymbol("landwalk", g, abiX, abiY, abiScale, abiScale);
abiY += abiSpace;
abiCount += 1;
}
if (card.getCurrentState().hasHexproof()) {
if (abiCount > 5 ) { abiY = cy + (abiSpace * (abiCount - 6)); abiX = cx + ((cw*2)/1.92f); }
if (!card.getCurrentState().getHexproofKey().isEmpty()){

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 KiB

After

Width:  |  Height:  |  Size: 238 KiB

View File

@@ -391,7 +391,9 @@ public enum FSkinProp {
IMG_FAVNONE (new int[] {500, 0, 100, 100}, PropType.FAVICON),
IMG_QUEST_DRAFT_DECK (new int[] {0, 0, 680, 475}, PropType.IMAGE),
//COMMANDER
IMG_ABILITY_COMMANDER (new int[] {330, 576, 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),
@@ -404,6 +406,7 @@ public enum FSkinProp {
IMG_ABILITY_HORSEMANSHIP (new int[] {2, 576, 80, 80}, PropType.ABILITY),
IMG_ABILITY_INDESTRUCTIBLE (new int[] {2, 84, 80, 80}, PropType.ABILITY),
IMG_ABILITY_INTIMIDATE (new int[] {166, 412, 80, 80}, PropType.ABILITY),
IMG_ABILITY_LANDWALK (new int[] {248, 576, 80, 80}, PropType.ABILITY),
IMG_ABILITY_LIFELINK (new int[] {84, 84, 80, 80}, PropType.ABILITY),
IMG_ABILITY_MENACE (new int[] {166, 84, 80, 80}, PropType.ABILITY),
IMG_ABILITY_REACH (new int[] {248, 330, 80, 80}, PropType.ABILITY),

View File

@@ -58,8 +58,13 @@ public class QuestWinLoseController {
// After the first game, reset the card shop pool to be able to buy back anted cards
if (lastGame.getNumPlayedGamesInMatch() == 0) {
qc.getCards().clearShopList();
qc.getCards().getShopList();
try {
qc.getCards().clearShopList();
qc.getCards().getShopList();
} catch (Exception e) {
//investigate this..
System.err.println(e.getMessage());
}
}
final LobbyPlayer questLobbyPlayer = GamePlayerUtil.getQuestPlayer();