Compare commits

..

3 Commits

Author SHA1 Message Date
Nut.andor
38d875c3d9 target 31 needed for Google Play + export 2023-01-30 21:34:28 +01:00
Nut.andor
8642aa701f hotfix 2023-01-29 22:37:52 +01:00
Nut.andor
b6116b8d2a compress 2023-01-29 18:56:28 +01:00
1234 changed files with 29161 additions and 80533 deletions

View File

@@ -1,3 +1,6 @@
# Android ignores
app/src/main/res
app/src/main/assets
gen/
bin/
target/

View File

@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 34
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.gpl.rpg.AndorsTrail"
minSdkVersion 14
targetSdkVersion 34
targetSdkVersion 31
}
buildTypes {
@@ -19,59 +19,34 @@ android {
debug {
manifestPlaceholders icon_name: 'icon_beta', fileproviderPath: 'AndorsTrail.beta2'
applicationIdSuffix 'beta2'
signingConfig signingConfigs.debug
}
}
namespace 'com.gpl.rpg.AndorsTrail'
sourceSets {
main {
res.srcDirs = ['build/gen-res', 'src/main/res']
assets.srcDirs = ['build/gen-assets', 'src/main/assets']
}
}
}
dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.android.support:support-v4:28.0.0'
}
task copyRes(type: Copy) {
description "Copies the res folder to the modules res folder (& renames .tmx to .xml)"
from "${rootDir}/res"
into "${projectDir}/build/gen-res"
into "${projectDir}/src/main/res"
rename "(.*)\\.tmx", "\$1.xml"
}
task copyResValuesIn(type: Copy) {
description "Exception Indonesian language code (Old IN was renamed to now ID)"
from "${rootDir}/res/values-id/"
into "${projectDir}/build/gen-res/values-in/"
}
task copyTranslation(type: Copy) {
description("Copies the translation files to the modules translations folder")
from "${rootDir}/assets/translation"
into "${projectDir}/build/gen-assets/translation"
into "${projectDir}/src/main/assets/translation"
}
task cleanup(type: Delete) {
description("Deletes the assets/translation and the res folder from the modules folder")
delete "${projectDir}/build/gen-res", "${projectDir}/build/gen-assets/translation"
delete "${projectDir}/src/main/res", "${projectDir}/src/main/assets/translation"
}
afterEvaluate {
project.tasks.copyRes.dependsOn project.tasks.copyResValuesIn
mergeDebugResources.dependsOn project.tasks.copyRes
extractDeepLinksDebug.dependsOn project.tasks.copyRes
mergeReleaseResources.dependsOn project.tasks.copyRes
extractDeepLinksRelease.dependsOn project.tasks.copyRes
mergeDebugAssets.dependsOn project.tasks.copyTranslation
mergeReleaseAssets.dependsOn project.tasks.copyTranslation
extractDeepLinksDebug.dependsOn project.tasks.copyTranslation
extractDeepLinksRelease.dependsOn project.tasks.copyTranslation
preBuild.dependsOn project.tasks.copyRes
preBuild.dependsOn project.tasks.copyTranslation
clean.dependsOn project.tasks.cleanup
}

View File

@@ -3,8 +3,8 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gpl.rpg.AndorsTrail"
android:versionCode="74"
android:versionName="0.8.8"
android:versionCode="68"
android:versionName="0.8.4"
android:installLocation="auto"
>
@@ -31,9 +31,9 @@
android:hasFragileUserData="true"
android:preserveLegacyExternalStorage="true"
>
<activity
android:exported="true"
<activity
android:name="com.gpl.rpg.AndorsTrail.activity.StartScreenActivity"
android:exported="true"
android:clearTaskOnLaunch="true"
>
<intent-filter>
@@ -63,7 +63,7 @@
<activity android:name="com.gpl.rpg.AndorsTrail.activity.DisplayWorldMapActivity" />
<provider
android:name="androidx.core.content.FileProvider"
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:grantUriPermissions="true"
android:exported="false">

View File

@@ -28,11 +28,11 @@ public final class AndorsTrailApplication extends Application {
public static final boolean DEVELOPMENT_FASTSPEED = false;
public static final boolean DEVELOPMENT_VALIDATEDATA = false;
public static final boolean DEVELOPMENT_DEBUGMESSAGES = false;
public static final String CURRENT_VERSION_DISPLAY = "0.8.8";
public static final String CURRENT_VERSION_DISPLAY = "0.8.4";
public static final boolean IS_RELEASE_VERSION = !CURRENT_VERSION_DISPLAY.matches(".*[a-d].*");
public static final boolean DEVELOPMENT_INCOMPATIBLE_SAVEGAMES = DEVELOPMENT_DEBUGRESOURCES || DEVELOPMENT_DEBUGBUTTONS || DEVELOPMENT_FASTSPEED || !IS_RELEASE_VERSION;
public static final int DEVELOPMENT_INCOMPATIBLE_SAVEGAME_VERSION = 999;
public static final int CURRENT_VERSION = DEVELOPMENT_INCOMPATIBLE_SAVEGAMES ? DEVELOPMENT_INCOMPATIBLE_SAVEGAME_VERSION : 74;
public static final int CURRENT_VERSION = DEVELOPMENT_INCOMPATIBLE_SAVEGAMES ? DEVELOPMENT_INCOMPATIBLE_SAVEGAME_VERSION : 68;
private final AndorsTrailPreferences preferences = new AndorsTrailPreferences();
private WorldContext world = new WorldContext();

View File

@@ -78,7 +78,7 @@ public final class AndorsTrailPreferences {
dest.dpadTransparency = Integer.parseInt(prefs.getString("dpadtransparency", Integer.toString(DPAD_TRANSPARENCY_50_PERCENT)));
dest.dpadMinimizeable = prefs.getBoolean("dpadMinimizeable", true);
dest.optimizedDrawing = prefs.getBoolean("optimized_drawing", false);
dest.highQualityFilters = prefs.getBoolean("high_quality_filters", false);
dest.highQualityFilters = prefs.getBoolean("high_quality_filters", true);
dest.enableUiAnimations = prefs.getBoolean("enableUiAnimations", true);
dest.displayOverwriteSavegame = Integer.parseInt(prefs.getString("display_overwrite_savegame", Integer.toString(CONFIRM_OVERWRITE_SAVEGAME_ALWAYS)));
dest.quickslotsPosition = Integer.parseInt(prefs.getString("quickslots_placement", Integer.toString(QUICKSLOTS_POSITION_HORIZONTAL_CENTER_BOTTOM)));

View File

@@ -15,7 +15,7 @@ import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.support.v4.app.Fragment;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;

View File

@@ -1,7 +1,7 @@
package com.gpl.rpg.AndorsTrail.activity;
import android.os.Bundle;
import androidx.fragment.app.FragmentActivity;
import android.support.v4.app.FragmentActivity;
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;

View File

@@ -277,27 +277,6 @@ public final class DebugInterface {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "sullengard2", "south", 0, 0);
}
})
,new DebugButton("gal", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "galmore_19", "south", 0, 0);
}
})
,new DebugButton("apl", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "sullengard_apple_farm_east", "house", 0, 0);
}
})
,new DebugButton("wch", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "lake_shore_road_0", "west", 0, 0);
}
})
}));
buttonList.addAll(tpButtons2);

View File

@@ -2,7 +2,7 @@ package com.gpl.rpg.AndorsTrail.activity;
import android.content.res.Resources;
import android.os.Bundle;
import androidx.fragment.app.FragmentTabHost;
import android.support.v4.app.FragmentTabHost;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.ImageView;

View File

@@ -20,8 +20,8 @@ import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import androidx.annotation.RequiresApi;
import androidx.documentfile.provider.DocumentFile;
import android.support.annotation.RequiresApi;
import android.support.v4.provider.DocumentFile;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;

View File

@@ -2,7 +2,7 @@ package com.gpl.rpg.AndorsTrail.activity;
import android.content.res.Resources;
import android.os.Bundle;
import androidx.fragment.app.FragmentTabHost;
import android.support.v4.app.FragmentTabHost;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.ImageView;

View File

@@ -21,8 +21,8 @@ import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager.OnBackStackChangedListener;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager.OnBackStackChangedListener;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewTreeObserver;

View File

@@ -5,7 +5,7 @@ import java.util.Arrays;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;

View File

@@ -8,7 +8,7 @@ import java.util.Map;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

View File

@@ -5,7 +5,7 @@ import java.util.ArrayList;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

View File

@@ -5,7 +5,7 @@ import java.util.ArrayList;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;

View File

@@ -4,7 +4,7 @@ import java.util.HashSet;
import android.content.res.Resources;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

View File

@@ -12,7 +12,7 @@ import android.content.SharedPreferences.Editor;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;

View File

@@ -3,7 +3,7 @@ package com.gpl.rpg.AndorsTrail.activity.fragment;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;

View File

@@ -579,13 +579,6 @@ public final class CombatController implements VisualEffectCompletedCallback {
private static final int n = 50;
private static final int F = 40;
private static final float two_divided_by_PI = (float) (2f / Math.PI);
/**
* @implNote
* formula: 50 * (1 + (2 / pi) * atan((attackChance - blockChance - n) / F))
* <br/>
* n = {@value n}; F = {@value F}
* @return [0..100] . 100 == always hit.
*/
private static int getAttackHitChance(final Actor attacker, final Actor target) {
final int c = attacker.getAttackChance() - target.getBlockChance();
// (2/pi)*atan(..) will vary from -1 to +1 .

View File

@@ -7,7 +7,7 @@ import com.gpl.rpg.AndorsTrail.util.ConstRange;
import com.gpl.rpg.AndorsTrail.util.Range;
public final class Constants {
public static final int PERCENT_EXP_LOST_WHEN_DIED = 20;
public static final int PERCENT_EXP_LOST_WHEN_DIED = 30;
public static final int LEVELUP_EFFECT_HEALTH = 5;
public static final int LEVELUP_EFFECT_ATK_CH = 5;
public static final int LEVELUP_EFFECT_ATK_DMG = 1;

View File

@@ -22,7 +22,6 @@ import com.gpl.rpg.AndorsTrail.model.conversation.Reply;
import com.gpl.rpg.AndorsTrail.model.item.ItemTypeCollection;
import com.gpl.rpg.AndorsTrail.model.item.Loot;
import com.gpl.rpg.AndorsTrail.model.map.LayeredTileMap;
import com.gpl.rpg.AndorsTrail.model.map.MapObject;
import com.gpl.rpg.AndorsTrail.model.map.MonsterSpawnArea;
import com.gpl.rpg.AndorsTrail.model.map.PredefinedMap;
import com.gpl.rpg.AndorsTrail.model.quest.QuestLogEntry;
@@ -125,9 +124,6 @@ public final class ConversationController {
case changeMapFilter:
changeMapFilter(res, effect.mapName, effect.effectID);
break;
case mapchange:
mapchange(effect.mapName, effect.effectID);
break;
}
}
@@ -176,13 +172,6 @@ public final class ConversationController {
}
}
private void mapchange(String mapName, String place) {
PredefinedMap map = findMapForScriptEffect(mapName);
// controllers.mapController.activateMapObjectGroup(map, mapObjectGroupID);
// controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, effect.mapName, effect.effectID, 0, 0); //cbcbcb check
controllers.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, mapName, place, 0, 0);
}
private void addAlignmentReward(Player player, String faction, int delta) {
player.addAlignment(faction, delta);
MovementController.refreshMonsterAggressiveness(world.model.currentMaps.map, world.model.player);
@@ -322,18 +311,6 @@ public final class ConversationController {
case factionScoreEquals:
result = player.getAlignment(requirement.requireID) == requirement.value;
break;
case date:
result = world.model.worldData.getDate(requirement.requireID) >= requirement.value;
break;
case dateEquals:
result = world.model.worldData.getDate(requirement.requireID) == requirement.value;
break;
case time:
result = world.model.worldData.getTime(requirement.requireID) >= requirement.value;
break;
case timeEquals:
result = world.model.worldData.getTime(requirement.requireID) == requirement.value;
break;
default:
result = true;
}

View File

@@ -1,6 +1,5 @@
package com.gpl.rpg.AndorsTrail.controller;
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
import com.gpl.rpg.AndorsTrail.context.ControllerContext;
import com.gpl.rpg.AndorsTrail.context.WorldContext;
import com.gpl.rpg.AndorsTrail.controller.listeners.CombatActionListeners;
@@ -18,7 +17,6 @@ import com.gpl.rpg.AndorsTrail.model.item.ItemCategory;
import com.gpl.rpg.AndorsTrail.model.item.ItemType;
import com.gpl.rpg.AndorsTrail.model.item.ItemTypeCollection;
import com.gpl.rpg.AndorsTrail.util.ConstRange;
import com.gpl.rpg.AndorsTrail.util.L;
public final class SkillController {
private final ControllerContext controllers;
@@ -60,9 +58,6 @@ public final class SkillController {
public static int getDropChanceRollBias(DropItem item, Player player) {
if (player == null) return 0;
if(item.itemType == null && AndorsTrailApplication.DEVELOPMENT_DEBUGMESSAGES){
L.log("Item type missing: " + item + " " + player.id);
}
if (ItemTypeCollection.isGoldItemType(item.itemType.id)) {
return getRollBias(item, player, SkillID.coinfinder, SkillCollection.PER_SKILLPOINT_INCREASE_COINFINDER_CHANCE_PERCENT);

View File

@@ -6,8 +6,6 @@ import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Calendar;
public final class WorldData {
private long worldTime = 0; // Measured in number of game rounds
private final HashMap<String, Long> timers = new HashMap<String, Long>();
@@ -38,62 +36,6 @@ public final class WorldData {
return v + duration <= worldTime;
}
public int getDate(String format) {
Calendar now = Calendar.getInstance();
int ret;
switch (format) {
case "YYYYMMDD":
ret = now.get(Calendar.YEAR)*10000 + (now.get(Calendar.MONTH) + 1)*100 + now.get(Calendar.DAY_OF_MONTH);
break;
case "YYYYMM":
ret = now.get(Calendar.YEAR)*100 + (now.get(Calendar.MONTH) + 1);
break;
case "YYYY":
ret = now.get(Calendar.YEAR);
break;
case "MMDD":
ret = (now.get(Calendar.MONTH) + 1)*100 + now.get(Calendar.DAY_OF_MONTH);
break;
case "MM":
ret = (now.get(Calendar.MONTH) + 1);
break;
case "DD":
ret = now.get(Calendar.DAY_OF_MONTH);
break;
default:
ret = 99999999; //never true
}
return ret;
}
public int getTime(String format) {
Calendar now = Calendar.getInstance();
int ret;
switch (format) {
case "HHMMSS":
ret = now.get(Calendar.HOUR_OF_DAY)*10000 + now.get(Calendar.MINUTE)*100 + now.get(Calendar.SECOND);
break;
case "HHMM":
ret = now.get(Calendar.HOUR_OF_DAY)*100 + now.get(Calendar.MINUTE);
break;
case "HH":
ret = now.get(Calendar.HOUR_OF_DAY);
break;
case "MMSS":
ret = now.get(Calendar.MINUTE)*100 + now.get(Calendar.SECOND);
break;
case "MM":
ret = now.get(Calendar.MINUTE);
break;
case "SS":
ret = now.get(Calendar.SECOND);
break;
default:
ret = 99999999; //never true
}
return ret;
}
// ====== PARCELABLE ===================================================================
public WorldData(DataInputStream src, int fileversion) throws IOException {

View File

@@ -111,7 +111,7 @@ public final class Player extends Actor {
baseTraits.criticalSkill = 0;
baseTraits.criticalMultiplier = 1;
baseTraits.damagePotential.set(1, 1);
baseTraits.blockChance = 9;
baseTraits.blockChance = 0;
baseTraits.damageResistance = 0;
baseTraits.useItemCost = 5;
baseTraits.reequipCost = 5;

View File

@@ -17,7 +17,7 @@ import com.gpl.rpg.AndorsTrail.util.Range;
public final class MonsterSpawnArea {
public final CoordRect area;
public final Range quantity;
private final Range respawnspeed;
private final Range spawnChance;
public final String areaID;
public final String[] monsterTypeIDs;
public final List<Monster> monsters = new CopyOnWriteArrayList<Monster>();
@@ -30,7 +30,7 @@ public final class MonsterSpawnArea {
public MonsterSpawnArea(
CoordRect area
, Range quantity
, Range respawnspeed
, Range spawnChance
, String areaID
, String[] monsterTypeIDs
, boolean isUnique
@@ -40,7 +40,7 @@ public final class MonsterSpawnArea {
) {
this.area = area;
this.quantity = quantity;
this.respawnspeed = respawnspeed;
this.spawnChance = spawnChance;
this.areaID = areaID;
this.monsterTypeIDs = monsterTypeIDs;
this.isUnique = isUnique;
@@ -101,7 +101,7 @@ public final class MonsterSpawnArea {
}
public boolean rollShouldSpawn() {
return Constants.rollResult(respawnspeed);
return Constants.rollResult(spawnChance);
}
public void removeAllMonsters() {

View File

@@ -115,7 +115,7 @@ public final class TMXMapTranslator {
boolean isActiveForNewGame = true;
boolean ignoreAreas = false;
int maxQuantity = 1;
int respawnspeed = 10;
int spawnChance = 10;
String spawnGroup = object.name;
for (TMXProperty p : object.properties) {
if (AndorsTrailApplication.DEVELOPMENT_VALIDATEDATA) {
@@ -126,8 +126,8 @@ public final class TMXMapTranslator {
}
if (p.name.equalsIgnoreCase("quantity")) {
maxQuantity = Integer.parseInt(p.value);
} else if (p.name.equalsIgnoreCase("respawnspeed")) {
respawnspeed = Integer.parseInt(p.value);
} else if (p.name.equalsIgnoreCase("spawnchance")) {
spawnChance = Integer.parseInt(p.value);
} else if (p.name.equalsIgnoreCase("active")) {
isActiveForNewGame = Boolean.parseBoolean(p.value);
} else if (p.name.equalsIgnoreCase("ignoreAreas")) {
@@ -155,7 +155,7 @@ public final class TMXMapTranslator {
MonsterSpawnArea area = new MonsterSpawnArea(
position
,new Range(maxQuantity, 0)
,new Range(1000, respawnspeed)
,new Range(1000, spawnChance)
,object.name
,monsterTypeIDs
,isUnique
@@ -405,11 +405,6 @@ public final class TMXMapTranslator {
int tileID = tileCache.getTileID(tile.tilesetName, tile.localId);
result.tiles[dx][dy] = tileID;
usedTileIDs.add(tileID);
if(AndorsTrailApplication.DEVELOPMENT_VALIDATEDATA){
if(tileID == 0){
L.log("Tileid 0 in "+ tile.tilesetName);
}
}
}
}
return result;

View File

@@ -21,10 +21,6 @@ public final class Requirement {
,random
,factionScoreEquals
,wearRemove
,date
,dateEquals
,time
,timeEquals
}
public final RequirementType requireType;
@@ -87,10 +83,6 @@ public final class Requirement {
case skillLevel:
return requireID != null && value >= 0;
case spentGold:
case date:
case dateEquals:
case time:
case timeEquals:
return value >= 0;
case random:
return chance != null;

View File

@@ -18,7 +18,6 @@ public final class ScriptEffect {
, deactivateMapObjectGroup
, removeQuestProgress
, changeMapFilter
, mapchange
}
public final ScriptEffectType type;

View File

@@ -137,8 +137,7 @@ public final class ResourceLoader {
final ItemTypeParser itemTypeParser = new ItemTypeParser(loader, world.actorConditionsTypes, world.itemCategories, translationLoader);
final TypedArray itemsToLoad = r.obtainTypedArray(itemsResourceId);
for (int i = 0; i < itemsToLoad.length(); ++i) {
String s = readStringFromRaw(r, itemsToLoad, i);
world.itemTypes.initialize(itemTypeParser, s);
world.itemTypes.initialize(itemTypeParser, readStringFromRaw(r, itemsToLoad, i));
}
itemsToLoad.recycle();
if (AndorsTrailApplication.DEVELOPMENT_DEBUGMESSAGES) timingCheckpoint("ItemTypeParser");
@@ -251,7 +250,6 @@ public final class ResourceLoader {
private static void prepareTilesets(DynamicTileLoader loader, int mTileSize) {
final Size sz1x1 = new Size(1, 1);
final Size sz1x2 = new Size(1, 2);
final Size sz2x1 = new Size(2, 1);
final Size sz2x2 = new Size(2, 2);
final Size sz2x3 = new Size(2, 3);
@@ -260,7 +258,6 @@ public final class ResourceLoader {
final Size sz6x1 = new Size(6, 1);
final Size sz7x1 = new Size(7, 1);
final Size sz8x3 = new Size(8, 3);
final Size sz16x8 = new Size(16, 8);
final Size sz20x12 = new Size(20, 12);
final Size mapTileSize = new Size(16, 8);
final Size sz8x8 = new Size(8, 8);
@@ -277,7 +274,6 @@ public final class ResourceLoader {
loader.prepareTileset(R.drawable.ui_icon_immunity, "ui_icon_immunity", sz1x1, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.map_dynamic_placeholders, "map_dynamic_placeholders", new Size(10, 2), sz1x1, mTileSize);
loader.prepareTileset(R.drawable.monsters_cyclops, "monsters_cyclops", sz1x1, sz2x3, mTileSize);
loader.prepareTileset(R.drawable.monsters_demon1, "monsters_demon1", sz1x1, sz2x2, mTileSize);
loader.prepareTileset(R.drawable.monsters_demon2, "monsters_demon2", sz1x1, sz2x2, mTileSize);
loader.prepareTileset(R.drawable.monsters_eye4, "monsters_eye4", sz1x1, sz1x1, mTileSize);
@@ -335,17 +331,11 @@ public final class ResourceLoader {
loader.prepareTileset(R.drawable.map_52, "map_52", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.map_53, "map_53", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.map_54, "map_54", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.map_55, "map_55", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.map_56, "map_56", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.map_57, "map_57", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.map_58, "map_58", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.map_59, "map_59", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.map_6, "map_6", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.map_60, "map_60", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.map_61, "map_61", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.map_7, "map_7", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.map_8, "map_8", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.map_9, "map_9", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.obj_0, "obj_0", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.obj_1, "obj_1", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.obj_10, "obj_10", sz8x8, sz1x1, mTileSize);
@@ -354,7 +344,6 @@ public final class ResourceLoader {
loader.prepareTileset(R.drawable.obj_13, "obj_13", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.obj_14, "obj_14", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.obj_15, "obj_15", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.obj_16, "obj_16", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.obj_2, "obj_2", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.obj_3, "obj_3", sz8x8, sz1x1, mTileSize);
loader.prepareTileset(R.drawable.obj_4, "obj_4", sz8x8, sz1x1, mTileSize);

View File

@@ -39,12 +39,6 @@ public final class DropListParser extends JsonCollectionParserFor<DropList> {
if (items == null) {
L.log("OPTIMIZE: Droplist \"" + droplistID + "\" has no dropped items.");
}
for (int i = 0; i < items.length; i++) {
DropItem item = items[i];
if (item.itemType == null) {
L.log("Item at index " + i + " in droplist " + droplistID + " was null");
}
}
}
return new Pair<String, DropList>(droplistID, new DropList(items));

View File

@@ -12,8 +12,6 @@ import android.graphics.Bitmap;
import android.util.SparseArray;
import android.util.SparseIntArray;
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
import com.gpl.rpg.AndorsTrail.util.L;
import com.gpl.rpg.AndorsTrail.util.LruCache;
public final class TileCache {
@@ -41,12 +39,7 @@ public final class TileCache {
tileIDsPerLocalID.put(localID, tileID);
}
public int getTileID(String tileSetName, int localID) {
SparseIntArray sparseIntArray = tileIDsPerTilesetAndLocalID.get(tileSetName);
if(AndorsTrailApplication.DEVELOPMENT_DEBUGMESSAGES && sparseIntArray == null){
L.log("Could not get tile " + tileSetName + " " + localID);
}
return sparseIntArray.get(localID);
return tileIDsPerTilesetAndLocalID.get(tileSetName).get(localID);
}
private static final class ResourceFileTile {
@@ -74,9 +67,6 @@ public final class TileCache {
HashMap<ResourceFileTileset, SparseArray<ResourceFileTile>> tilesToLoadPerSourceFile = new HashMap<ResourceFileTileset, SparseArray<ResourceFileTile>>();
for(int tileID : iconIDs) {
ResourceFileTile tile = resourceTiles[tileID];
if(tile == null && AndorsTrailApplication.DEVELOPMENT_DEBUGMESSAGES){
L.log("could not find resourceTiles for id: " + tileID);
}
SparseArray<ResourceFileTile> tiles = tilesToLoadPerSourceFile.get(tile.tileset);
if (tiles == null) {
tiles = new SparseArray<TileCache.ResourceFileTile>();

View File

@@ -18,7 +18,6 @@ import android.os.AsyncTask;
import android.widget.ImageView;
import android.widget.TextView;
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
import com.gpl.rpg.AndorsTrail.AndorsTrailPreferences;
import com.gpl.rpg.AndorsTrail.R;
import com.gpl.rpg.AndorsTrail.context.WorldContext;
@@ -34,7 +33,6 @@ import com.gpl.rpg.AndorsTrail.model.map.MapObject;
import com.gpl.rpg.AndorsTrail.model.map.MonsterSpawnArea;
import com.gpl.rpg.AndorsTrail.model.map.PredefinedMap;
import com.gpl.rpg.AndorsTrail.model.map.TMXMapTranslator;
import com.gpl.rpg.AndorsTrail.util.L;
import com.gpl.rpg.AndorsTrail.util.ThemeHelper;
public final class TileManager {
@@ -376,10 +374,6 @@ public final class TileManager {
cachedTileIDs = getTileIDsFor(adjacentMap, adjacentMapTiles, world);
tileIDsPerMap.put(mapName, cachedTileIDs);
}
if(AndorsTrailApplication.DEVELOPMENT_DEBUGMESSAGES){
L.log("TileIDsFor " + mapName + "\n" + cachedTileIDs);
}
dest.addAll(cachedTileIDs);
}
public void cacheAdjacentMaps(final Resources res, final WorldContext world, final PredefinedMap nextMap) {
@@ -397,9 +391,6 @@ public final class TileManager {
HashSet<Integer> tileIDs = new HashSet<Integer>();
for (String mapName : adjacentMapNames) {
if(AndorsTrailApplication.DEVELOPMENT_DEBUGMESSAGES){
L.log("addTileIDsFor " + mapName);
}
addTileIDsFor(tileIDs, mapName, res, world);
}

View File

@@ -6,9 +6,9 @@ import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import androidx.annotation.RequiresApi;
import androidx.core.content.FileProvider;
import androidx.documentfile.provider.DocumentFile;
import android.support.annotation.RequiresApi;
import android.support.v4.content.FileProvider;
import android.support.v4.provider.DocumentFile;
import android.os.Handler;
import android.os.Looper;

View File

@@ -61,9 +61,13 @@ public final class TraitsInfoView {
tv.setText(Integer.toString(attackCost));
row = (TableRow) group.findViewById(R.id.traitsinfo_attack_chance_row);
tv = (TextView) group.findViewById(R.id.traitsinfo_attack_chance);
tv.setText(Integer.toString(attackChance));
if (attackChance == 0) {
row.setVisibility(View.GONE);
} else {
row.setVisibility(View.VISIBLE);
tv = (TextView) group.findViewById(R.id.traitsinfo_attack_chance);
tv.setText(Integer.toString(attackChance));
}
row = (TableRow) group.findViewById(R.id.traitsinfo_attack_damage_row);
if (damagePotential != null && damagePotential.max != 0) {

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -5,7 +5,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.0'
classpath 'com.android.tools.build:gradle:7.2.1'
}
}

View File

@@ -1 +0,0 @@
android.useAndroidX=true

View File

@@ -1,6 +1,6 @@
#Mon Jan 30 18:12:43 CET 2023
#Sun Sep 25 12:50:59 CEST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

View File

@@ -21,46 +21,6 @@ Visit our forums on www.andorstrail.com for help, hints, tips and general discus
Changelog:
v0.8.5
New quest 'Ratdom' with 139 new maps and 2 sub quests
The loss of XP in case of death is now 20% instead of 30%
Having raw meat cooked
Translation updates and many minor bug fixes and enhancements
v0.8.4.1
Export/Import: The worldmap, which consists of many small png files, is handled now as a zip file.
Translation updates and many minor bug fixes and map enhancements
v0.8.3
New quest "The Dead are Walking" with 38 new maps
Export/Import function for savegames
v0.8.2
Fix of a lost traveler in certain conditions
Support of older mobiles again
v0.8.1
New city Sullengard
71 new maps and 6 new quests
Monster kill count
Controller support
Translations updated
Engine changes to support actual Android Studio
v0.7.17
Fix of unloadable savegames in certain conditions
v0.7.16
New quest 'Delivery'
Fix of Killed-by-Kamelio bug, postman bug and typos
Translations updated (Chinese 99%)
v0.7.15
Fix of a notification crash bug
Fix of missing scout and of a non disappearing Ortholion and Ehrenfest in certain conditions
Various small changes and bug fixes
Translations updated
v0.7.14
2 new quests:
"Climbing up is forbidden"

View File

@@ -1,229 +1,7 @@
I put both (release notes + forum announcement) into this source, so it will be easier to maintain them parallel:
APK 74 (0.8.8) Sutdover River
Release notes
=============
* Wanted Men
* A Wicked Witch
Forum announcement //2023-11-07
==================
Hello fellow adventurers,
we have the new version ready for you now 8-) (v0.8.8)
It consists of more than 111 added or changed source files, 41 of which are new maps.
(Funny that we had started to add Mt. Galmore to the game, but ended up with completely different things :D )
In any case, we had a lot of fun developing it and hope you have just as much fun playing it.
[list]"Wanted Men":
A continuation of both "Another Ruthless Crackshot" and "Recovering Stolen Property", we again meet Sullengard's most wanted thieves far to the south east. They need your "skills" and you must decide the best path for you.
[/list]
[list]"A Wicked Witch":
After a "Giant Snake" is completed, visit our favorite innkeeper, Bela in Fallhaven for another adventure.
[/list]
[list]Good news for those who screwed up the Prim/Blackwater mountain quests: Even if you help neither party you can now get access to the throne room and start the "Lights in the dark" quest.
[/list]
[list]There are new texts in Arulir Mountains and during the "Climbing is forbidden" quest.
[/list]
[list]And as always some fixes of minor bugs and updates of the translations.
[/list]
Here is is the link on our server: [url]https://andorstrail.com/static/AndorsTrail_v0.8.8.apk[/url]
Google Play, F-Droid and Itch will follow soon.
Have fun!
Forum announcement BETA //2023-11-11
==================
Hello fellow adventurers,
we have a new beta for you! (v0.8.8 Sutdover River)
It consists of more than 100 added or changed source files, 41 of which are new maps.
(Funny that we had started to add Mt. Galmore to the game but ended up with completely different things :D )
In any case, we had a lot of fun developing it and hope you have just as much fun playing it.
[list]"Wanted Men":
A continuation of both "Another Ruthless Crackshot" and "Recovering Stolen Property", we again meet Sullengard's most wanted thieves far to the east. They need your "skills" and you must decide the best path for you.
[/list]
[list]"A Wicked Witch":
After a "Giant Snake" is completed, visit our favorite innkeeper, Bela in Fallhaven for another adventure.
[/list]
[list]Good news for those who screwed up the Prim/Blackwater mountain quests: Even if you help neither party you can now get access to the throne room and start the "Lights in the dark" quest.
[/list]
[list]There are a few new texts in Arulir Mountains and for the "Climbing up is forbidden" quest.
[/list]
[list]And as always some fixes of minor bugs and updates of the translations.
[/list]
Here is is the link on our server: [url]https://andorstrail.com/static/AndorsTrail_v0.8.8_beta.apk[/url]
It will be installed as an independent app so it won't affect your existing savegames. (Except maybe permadeath saves on Android versions < 10)
Us usual please report any bugs or suggestions for improvements.
Have fun trying!
APK 73 (0.8.7) Technical changes + Indonesian
Release notes
=============
* Exchange of a deprecated java library
* Translation updates, Indonesian is complete
Forum announcement //2023-09-02
==================
Hello fellow adventurers,
here is a new release for you (v0.8.7) :)
[list] Exchange of a deprecated java library[/list]
[list]New translations, especially Indonesian is complete now - special thanks to Darren!
We added Indonesian to the list of languages to choose.[/list]
[list]And as always we've fixed some minor bugs and typos.[/list]
This time there is no new content, but some small important internal technical changes.
Here is is the link on our server: [url]https://andorstrail.com/static/AndorsTrail_v0.8.7.apk[/url]
Google Play, F-Droid and Itch will follow soon.
Forum announcement //2023-09-02 BETA
==================
Hello fellow adventurers,
here we have a new beta release for you (v0.8.7) :)
[list] Exchange of a deprecated java library (please check Import, export, all the different screens and just play a bit)[/list]
[list]New translations, especially Indonesian is complete now - special thanks to Darren!
We added Indonesian to the list of languages to choose.[/list]
[list]And as always we've fixed some minor bugs and typos.[/list]
This time there is no new content. Nevertheless please try out this beta and see if it works, because it contains some small but important internal technical changes.
Here is is the link: [url]https://andorstrail.com/static/AT_v87_beta.apk[/url]
It will be installed as a separate app, so you can try it independently from your game.
Just have in mind that saves of this beta can't be used elsewhere.
APK 72 (0.8.6.1) Another Ratdom bug fix
Release notes
=============
* Fixed: Not able to complete quest "More rats!"
* Translation updates
Forum announcement //2023-05-21
==================
Hello adventurers,
we had to create another bug fix version (v0.8.6.1)
[list]In certain cases the quest "More rats!" could not be completed.
[/list]
Here is is the link on our server: [url]https://andorstrail.com/static/AndorsTrail_v0.8.6.1.apk[/url]
Google Play, F-Droid and Itch will follow soon.
APK 71 (0.8.6) Ratdom bug fixes
Release notes
=============
* Missing chest content fixed
* Translation updates and other minor bug fixes
Forum announcement //2023-05-14
==================
Hello adventurers,
we have another new version for you (v0.8.6)
[list]The chests near Flora's fountain are filled now, the crash is fixed.
[/list]
[list]Clevred now offers his help with the four wells with endless patience.[/list]
[list]And some fixes of minor bugs and updates of the translations (Chinese is 100% again 8)).[/list]
Here is is the link on our server: [url]https://andorstrail.com/static/AndorsTrail_v0.8.6.apk[/url]
Google Play, F-Droid and Itch will follow soon.
APK 70 (0.8.5) Ratdom
Release notes
=============
* The new Ratdom area with 3 quests and 139 new maps
* Translation updates and many minor bug fixes and enhancements
Forum announcement //2023-01-29
==================
Hello adventurers,
we have another new version for you (v0.8.5 Ratdom)
[list]We have a huge new area with 139 new maps and 3 new quests:
A big quest in a rat world and two other small quests you will find on your way.
This section is more for high-level players: the quests Lodar, Charwood, Colonel Lutarc and the starter quests Prohibited Substance and Rat Infestation are mandatory.
Do you have these and also 9000 gold pieces with you, then you can dive into the new adventure.
Just go home and take a nap - it's not really going to be refreshing...
You will find many new maps arranged as a maze. This area looks and feels different than the rest of Andor's path. It will also be a challenge for the high-level players who just run through new areas with no effort.
(The scope took a long time to create, so don't expect to finish it in a few hours.)
A rat named Clevred will accompany you even though you don't see it. It's small enough to hide in your pocket or carry around. But he will talk to you, sometimes randomly, sometimes giving advice.
[/list]
[list]The loss of XP in case of death is now 20% instead of 30%[/list]
[list]It is now possible to have your raw meat cooked by Gison's son Gael and in Remgard.[/list]
[list]We added the new Polished ring of the Protector in Remgard, and flipped the places of sale of the Guardian and Protector rings.[/list]
[list]Several other adjustments, not worth to list them all here[/list]
[list]And as always, we've fixed some minor bugs and updated the translations.[/list]
Here is is the link on our server: [url]https://andorstrail.com/static/AndorsTrail_v0.8.5.apk[/url]
Google Play, F-Droid and Itch will follow soon.
Have fun!
PS
I might be too harsh, so we added an early exit to the quest so you can come out and complete the quest even if you didn't actually reach the end.
APK 69 (0.8.4.1) //Mostly harmless
APK 68 (0.8.4) Mostly harmless
Release notes
=============
@@ -235,7 +13,7 @@ Forum announcement //2023-01-29
==================
Hello fellow adventurers,
Here is the actual release v0.8.4.1 with bugfixes, translations and little enhancements:
Here is the actual release v0.8.4 with bugfixes, translations and little enhancements:
[list]The export/import is enhanced: The worldmap, which consists of many small png files, is handled now as a zip file. This is more convenient and much quicker.[/list]
@@ -245,7 +23,7 @@ Here is the actual release v0.8.4.1 with bugfixes, translations and little enhan
[list]And as always we actualized the translations[/list]
Here is is the link on our server: [url]https://andorstrail.com/static/AndorsTrail_v0.8.4.1.apk[/url]
Here is is the link on our server: [url]https://andorstrail.com/static/AndorsTrail_v0.8.4.apk[/url]
Google Play, F-Droid and Itch will follow soon.
Have fun!
@@ -253,9 +31,6 @@ Have fun!
APK 68 (0.8.4) //Mostly harmless (unneeded files - immediatly replaced by 69)
APK 67 (0.8.3) //Haunted Forest 2022-11-04
Release notes (Google/Itch)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 108 KiB

Some files were not shown because too many files have changed in this diff Show More