mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
Merge origin/master
This commit is contained in:
commit
fbeedf7036
3 changed files with 18 additions and 7 deletions
|
|
@ -126,6 +126,15 @@ public final class CardImageUtils {
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String fixSetNameForWindows(String set) {
|
||||||
|
// windows can't create con folders
|
||||||
|
if (set.equals("CON") || set.equals("con")) {
|
||||||
|
return "COX";
|
||||||
|
} else {
|
||||||
|
return set;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static String buildImagePathToTokens() {
|
public static String buildImagePathToTokens() {
|
||||||
String imagesPath = getImagesDir() + File.separator;
|
String imagesPath = getImagesDir() + File.separator;
|
||||||
|
|
||||||
|
|
@ -159,14 +168,14 @@ public final class CardImageUtils {
|
||||||
String imagesPath = getImagesDir() + File.separator;
|
String imagesPath = getImagesDir() + File.separator;
|
||||||
|
|
||||||
if (PreferencesDialog.isSaveImagesToZip()) {
|
if (PreferencesDialog.isSaveImagesToZip()) {
|
||||||
return imagesPath + set + ".zip" + File.separator + set + File.separator;
|
return imagesPath + fixSetNameForWindows(set) + ".zip" + File.separator + fixSetNameForWindows(set) + File.separator;
|
||||||
} else {
|
} else {
|
||||||
return imagesPath + set + File.separator;
|
return imagesPath + fixSetNameForWindows(set) + File.separator;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String buildImagePathToSetAsToken(String set) {
|
private static String buildImagePathToSetAsToken(String set) {
|
||||||
return buildImagePathToTokens() + set + File.separator;
|
return buildImagePathToTokens() + fixSetNameForWindows(set) + File.separator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String buildImagePathToCard(CardDownloadData card) {
|
public static String buildImagePathToCard(CardDownloadData card) {
|
||||||
|
|
@ -217,7 +226,7 @@ public final class CardImageUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String generateFaceImagePath(String cardname, String set) {
|
public static String generateFaceImagePath(String cardname, String set) {
|
||||||
return getImagesDir() + File.separator + "FACE" + File.separator + set + File.separator + prepareCardNameForFile(cardname) + ".jpg";
|
return getImagesDir() + File.separator + "FACE" + File.separator + fixSetNameForWindows(set) + File.separator + prepareCardNameForFile(cardname) + ".jpg";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String generateTokenDescriptorImagePath(CardDownloadData card) {
|
public static String generateTokenDescriptorImagePath(CardDownloadData card) {
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ class CaptiveAudienceETBEffect extends OneShotEffect {
|
||||||
Duration.WhileOnBattlefield, true, player.getId()
|
Duration.WhileOnBattlefield, true, player.getId()
|
||||||
);
|
);
|
||||||
continuousEffect.setTargetPointer(
|
continuousEffect.setTargetPointer(
|
||||||
new FixedTarget(source.getSourceId(), source.getSourceObjectZoneChangeCounter() + 1)
|
new FixedTarget(source.getSourceId(), source.getSourceObjectZoneChangeCounter())
|
||||||
);
|
);
|
||||||
game.addEffect(continuousEffect, source);
|
game.addEffect(continuousEffect, source);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -63,8 +63,10 @@ class RakdosRoustaboutAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (sourceId.equals(event.getSourceId())) {
|
if (sourceId.equals(event.getTargetId())) {
|
||||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(game.getCombat().getDefenderId(event.getSourceId())));
|
this.getEffects().get(0).setTargetPointer(
|
||||||
|
new FixedTarget(game.getCombat().getDefenderId(event.getTargetId()), game)
|
||||||
|
);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue