mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00: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;
|
||||
}
|
||||
|
||||
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() {
|
||||
String imagesPath = getImagesDir() + File.separator;
|
||||
|
||||
|
@ -159,14 +168,14 @@ public final class CardImageUtils {
|
|||
String imagesPath = getImagesDir() + File.separator;
|
||||
|
||||
if (PreferencesDialog.isSaveImagesToZip()) {
|
||||
return imagesPath + set + ".zip" + File.separator + set + File.separator;
|
||||
return imagesPath + fixSetNameForWindows(set) + ".zip" + File.separator + fixSetNameForWindows(set) + File.separator;
|
||||
} else {
|
||||
return imagesPath + set + File.separator;
|
||||
return imagesPath + fixSetNameForWindows(set) + File.separator;
|
||||
}
|
||||
}
|
||||
|
||||
private static String buildImagePathToSetAsToken(String set) {
|
||||
return buildImagePathToTokens() + set + File.separator;
|
||||
return buildImagePathToTokens() + fixSetNameForWindows(set) + File.separator;
|
||||
}
|
||||
|
||||
public static String buildImagePathToCard(CardDownloadData card) {
|
||||
|
@ -217,7 +226,7 @@ public final class CardImageUtils {
|
|||
}
|
||||
|
||||
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) {
|
||||
|
|
|
@ -97,7 +97,7 @@ class CaptiveAudienceETBEffect extends OneShotEffect {
|
|||
Duration.WhileOnBattlefield, true, player.getId()
|
||||
);
|
||||
continuousEffect.setTargetPointer(
|
||||
new FixedTarget(source.getSourceId(), source.getSourceObjectZoneChangeCounter() + 1)
|
||||
new FixedTarget(source.getSourceId(), source.getSourceObjectZoneChangeCounter())
|
||||
);
|
||||
game.addEffect(continuousEffect, source);
|
||||
return true;
|
||||
|
|
|
@ -63,8 +63,10 @@ class RakdosRoustaboutAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (sourceId.equals(event.getSourceId())) {
|
||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(game.getCombat().getDefenderId(event.getSourceId())));
|
||||
if (sourceId.equals(event.getTargetId())) {
|
||||
this.getEffects().get(0).setTargetPointer(
|
||||
new FixedTarget(game.getCombat().getDefenderId(event.getTargetId()), game)
|
||||
);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue