mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-01-23 03:39:10 +01:00
@@ -3,8 +3,8 @@
|
||||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.gpl.rpg.AndorsTrail"
|
||||
android:versionCode="46"
|
||||
android:versionName="0.7.5dev"
|
||||
android:versionCode="47"
|
||||
android:versionName="0.7.6dev"
|
||||
android:installLocation="auto"
|
||||
>
|
||||
<uses-sdk
|
||||
@@ -20,10 +20,10 @@
|
||||
android:anyDensity="true"
|
||||
/>
|
||||
|
||||
<uses-permission
|
||||
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
/>
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /><uses-permission android:name="android.permission.READ_LOGS"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
|
||||
<uses-permission android:name="android.permission.READ_LOGS"/>
|
||||
|
||||
|
||||
<application
|
||||
|
||||
@@ -1389,7 +1389,7 @@
|
||||
},
|
||||
{
|
||||
"id":"lodar_hira1",
|
||||
"message":"That's the effects of the Hira'zinn. Its desires is to consume the minds of all it finds.",
|
||||
"message":"That's the effect of the Hira'zinn. Its desire is to consume the minds of all it finds.",
|
||||
"replies":[
|
||||
{
|
||||
"text":"N",
|
||||
@@ -2130,4 +2130,4 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
@@ -1,185 +1,185 @@
|
||||
[
|
||||
{
|
||||
"id": "debugshop1",
|
||||
"items": [
|
||||
{
|
||||
"itemID": "club1",
|
||||
"quantity": {
|
||||
"min": 10,
|
||||
"max": 10
|
||||
},
|
||||
"chance": 100
|
||||
},
|
||||
{
|
||||
"itemID": "club3",
|
||||
"quantity": {
|
||||
"min": 5,
|
||||
"max": 5
|
||||
},
|
||||
"chance": 100
|
||||
},
|
||||
{
|
||||
"itemID": "hammer0",
|
||||
"quantity": {
|
||||
"min": 5,
|
||||
"max": 5
|
||||
},
|
||||
"chance": 100
|
||||
},
|
||||
{
|
||||
"itemID": "hammer1",
|
||||
"quantity": {
|
||||
"min": 5,
|
||||
"max": 5
|
||||
},
|
||||
"chance": 100
|
||||
},
|
||||
{
|
||||
"itemID": "shirt1",
|
||||
"quantity": {
|
||||
"min": 5,
|
||||
"max": 5
|
||||
},
|
||||
"chance": 100
|
||||
},
|
||||
{
|
||||
"itemID": "shirt2",
|
||||
"quantity": {
|
||||
"min": 5,
|
||||
"max": 5
|
||||
},
|
||||
"chance": 100
|
||||
},
|
||||
{
|
||||
"itemID": "dagger0",
|
||||
"quantity": {
|
||||
"min": 5,
|
||||
"max": 5
|
||||
},
|
||||
"chance": 100
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "debuglist1",
|
||||
"items": [
|
||||
{
|
||||
"itemID": "gold",
|
||||
"quantity": {
|
||||
"min": 3,
|
||||
"max": 3
|
||||
},
|
||||
"chance": 100
|
||||
},
|
||||
{
|
||||
"itemID": "dagger0",
|
||||
"quantity": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"chance": 100
|
||||
},
|
||||
{
|
||||
"itemID": "shirt1",
|
||||
"quantity": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"chance": 100
|
||||
},
|
||||
{
|
||||
"itemID": "club3",
|
||||
"quantity": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"chance": 100
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "debuglist2",
|
||||
"items": [{
|
||||
"itemID": "gold",
|
||||
"quantity": {
|
||||
"min": 3,
|
||||
"max": 3
|
||||
},
|
||||
"chance": 100
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id": "startitems",
|
||||
"items": [
|
||||
{
|
||||
"itemID": "gold",
|
||||
"quantity": {
|
||||
"min": 12,
|
||||
"max": 12
|
||||
},
|
||||
"chance": 100
|
||||
},
|
||||
{
|
||||
"itemID": "club1",
|
||||
"quantity": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"chance": 100
|
||||
},
|
||||
{
|
||||
"itemID": "shirt1",
|
||||
"quantity": {
|
||||
"min": 5,
|
||||
"max": 5
|
||||
},
|
||||
"chance": 100
|
||||
},
|
||||
{
|
||||
"itemID": "dagger0",
|
||||
"quantity": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"chance": 100
|
||||
},
|
||||
{
|
||||
"itemID": "debug_dagger1",
|
||||
"quantity": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"chance": 100
|
||||
},
|
||||
{
|
||||
"itemID": "debug_ring1",
|
||||
"quantity": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"chance": 100
|
||||
},
|
||||
{
|
||||
"itemID": "shadow_slayer",
|
||||
"quantity": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"chance": 100
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "debugrequires10gold_droplist",
|
||||
"items": [
|
||||
{
|
||||
"quantity": {
|
||||
"min": 10,
|
||||
"max": 10
|
||||
},
|
||||
"itemID": "gold",
|
||||
"chance": 100
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
[
|
||||
{
|
||||
"id": "debugshop1",
|
||||
"items": [
|
||||
{
|
||||
"itemID": "club1",
|
||||
"quantity": {
|
||||
"min": 10,
|
||||
"max": 10
|
||||
},
|
||||
"chance": "100"
|
||||
},
|
||||
{
|
||||
"itemID": "club3",
|
||||
"quantity": {
|
||||
"min": 5,
|
||||
"max": 5
|
||||
},
|
||||
"chance": "100"
|
||||
},
|
||||
{
|
||||
"itemID": "hammer0",
|
||||
"quantity": {
|
||||
"min": 5,
|
||||
"max": 5
|
||||
},
|
||||
"chance": "100"
|
||||
},
|
||||
{
|
||||
"itemID": "hammer1",
|
||||
"quantity": {
|
||||
"min": 5,
|
||||
"max": 5
|
||||
},
|
||||
"chance": "100"
|
||||
},
|
||||
{
|
||||
"itemID": "shirt1",
|
||||
"quantity": {
|
||||
"min": 5,
|
||||
"max": 5
|
||||
},
|
||||
"chance": "100"
|
||||
},
|
||||
{
|
||||
"itemID": "shirt2",
|
||||
"quantity": {
|
||||
"min": 5,
|
||||
"max": 5
|
||||
},
|
||||
"chance": "100"
|
||||
},
|
||||
{
|
||||
"itemID": "dagger0",
|
||||
"quantity": {
|
||||
"min": 5,
|
||||
"max": 5
|
||||
},
|
||||
"chance": "100"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "debuglist1",
|
||||
"items": [
|
||||
{
|
||||
"itemID": "gold",
|
||||
"quantity": {
|
||||
"min": 3,
|
||||
"max": 3
|
||||
},
|
||||
"chance": "100"
|
||||
},
|
||||
{
|
||||
"itemID": "dagger0",
|
||||
"quantity": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"chance": "100"
|
||||
},
|
||||
{
|
||||
"itemID": "shirt1",
|
||||
"quantity": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"chance": "100"
|
||||
},
|
||||
{
|
||||
"itemID": "club3",
|
||||
"quantity": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"chance": "100"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "debuglist2",
|
||||
"items": [{
|
||||
"itemID": "gold",
|
||||
"quantity": {
|
||||
"min": 3,
|
||||
"max": 3
|
||||
},
|
||||
"chance": "100"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id": "startitems",
|
||||
"items": [
|
||||
{
|
||||
"itemID": "gold",
|
||||
"quantity": {
|
||||
"min": 12,
|
||||
"max": 12
|
||||
},
|
||||
"chance": "100"
|
||||
},
|
||||
{
|
||||
"itemID": "club1",
|
||||
"quantity": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"chance": "100"
|
||||
},
|
||||
{
|
||||
"itemID": "shirt1",
|
||||
"quantity": {
|
||||
"min": 5,
|
||||
"max": 5
|
||||
},
|
||||
"chance": "100"
|
||||
},
|
||||
{
|
||||
"itemID": "dagger0",
|
||||
"quantity": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"chance": "100"
|
||||
},
|
||||
{
|
||||
"itemID": "debug_dagger1",
|
||||
"quantity": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"chance": "100"
|
||||
},
|
||||
{
|
||||
"itemID": "debug_ring1",
|
||||
"quantity": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"chance": "100"
|
||||
},
|
||||
{
|
||||
"itemID": "shadow_slayer",
|
||||
"quantity": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"chance": "100"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "debugrequires10gold_droplist",
|
||||
"items": [
|
||||
{
|
||||
"quantity": {
|
||||
"min": 10,
|
||||
"max": 10
|
||||
},
|
||||
"itemID": "gold",
|
||||
"chance": "100"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,288 +1,206 @@
|
||||
[
|
||||
{
|
||||
"id":"apple_green",
|
||||
"iconID":"items_consumables:2",
|
||||
"name":"Green apple",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":14,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":1,
|
||||
"duration":8,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"apple_red",
|
||||
"iconID":"items_consumables:3",
|
||||
"name":"Red apple",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":22,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":1,
|
||||
"duration":12,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"meat",
|
||||
"iconID":"items_consumables:25",
|
||||
"name":"Meat",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":29,
|
||||
"category":"animal_e",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":2,
|
||||
"duration":12,
|
||||
"chance":"100"
|
||||
},
|
||||
{
|
||||
"condition":"foodp",
|
||||
"magnitude":3,
|
||||
"duration":10,
|
||||
"chance":"10"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"meat_cooked",
|
||||
"iconID":"items_consumables:27",
|
||||
"name":"Cooked meat",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":78,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":3,
|
||||
"duration":11,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"strawberry",
|
||||
"iconID":"items_consumables:8",
|
||||
"name":"Strawberry",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":3,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":1,
|
||||
"duration":2,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"carrot",
|
||||
"iconID":"items_consumables:15",
|
||||
"name":"Carrot",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":14,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":1,
|
||||
"duration":8,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"bread",
|
||||
"iconID":"items_consumables:21",
|
||||
"name":"Bread",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":6,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":1,
|
||||
"duration":10,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"mushroom",
|
||||
"iconID":"items_consumables:19",
|
||||
"name":"Mushroom",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":3,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":1,
|
||||
"duration":2,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"pear",
|
||||
"iconID":"items_consumables:9",
|
||||
"name":"Pear",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":14,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":1,
|
||||
"duration":8,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"eggs",
|
||||
"iconID":"items_consumables:20",
|
||||
"name":"Eggs",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":10,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":1,
|
||||
"duration":6,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"radish",
|
||||
"iconID":"items_consumables:14",
|
||||
"name":"Radish",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":6,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":1,
|
||||
"duration":4,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "chaotic_penalty",
|
||||
"iconID": "items_weapons:61",
|
||||
"name": "Chaotic Penalty",
|
||||
"category": "lsword",
|
||||
"displaytype": "extraordinary",
|
||||
"hasManualPrice": 1,
|
||||
"baseMarketCost": 0,
|
||||
"equipEffect": {
|
||||
"increaseMaxAP": 2,
|
||||
"increaseAttackCost": 7,
|
||||
"increaseAttackChance": 25,
|
||||
"increaseCriticalSkill": 10,
|
||||
"setCriticalMultiplier": 2,
|
||||
"increaseAttackDamage": {
|
||||
"min": -10,
|
||||
"max": -10
|
||||
},
|
||||
"addedConditions":[
|
||||
{
|
||||
"condition":"courage",
|
||||
"magnitude": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
"killEffect": {
|
||||
"increaseCurrentHP": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
}
|
||||
},
|
||||
"hitEffect":{
|
||||
"conditionsTarget":[
|
||||
{
|
||||
"condition":"fear",
|
||||
"magnitude":5,
|
||||
"duration":2,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hitReceivedEffect" : {
|
||||
"increaseCurrentHP": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"increaseCurrentAP": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"increaseAttackerCurrentHP": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"increaseAttackerCurrentAP": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"crit_aware",
|
||||
"magnitude": 2,
|
||||
"duration": 5,
|
||||
"chance":"50"
|
||||
}
|
||||
],
|
||||
"conditionsTarget":[
|
||||
{
|
||||
"condition":"def",
|
||||
"magnitude": 2,
|
||||
"duration": 5,
|
||||
"chance":"80"
|
||||
},
|
||||
{
|
||||
"condition":"regen2",
|
||||
"magnitude":3,
|
||||
"duration":4,
|
||||
"chance":"50"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
[
|
||||
{
|
||||
"id":"apple_green",
|
||||
"iconID":"items_consumables:2",
|
||||
"name":"Green apple",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":14,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":1,
|
||||
"duration":8,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"apple_red",
|
||||
"iconID":"items_consumables:3",
|
||||
"name":"Red apple",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":22,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":1,
|
||||
"duration":12,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"meat",
|
||||
"iconID":"items_consumables:25",
|
||||
"name":"Meat",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":29,
|
||||
"category":"animal_e",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":2,
|
||||
"duration":12,
|
||||
"chance":"100"
|
||||
},
|
||||
{
|
||||
"condition":"foodp",
|
||||
"magnitude":3,
|
||||
"duration":10,
|
||||
"chance":"10"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"meat_cooked",
|
||||
"iconID":"items_consumables:27",
|
||||
"name":"Cooked meat",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":78,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":3,
|
||||
"duration":11,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"strawberry",
|
||||
"iconID":"items_consumables:8",
|
||||
"name":"Strawberry",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":3,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":1,
|
||||
"duration":2,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"carrot",
|
||||
"iconID":"items_consumables:15",
|
||||
"name":"Carrot",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":14,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":1,
|
||||
"duration":8,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"bread",
|
||||
"iconID":"items_consumables:21",
|
||||
"name":"Bread",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":6,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":1,
|
||||
"duration":10,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"mushroom",
|
||||
"iconID":"items_consumables:19",
|
||||
"name":"Mushroom",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":3,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":1,
|
||||
"duration":2,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"pear",
|
||||
"iconID":"items_consumables:9",
|
||||
"name":"Pear",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":14,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":1,
|
||||
"duration":8,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"eggs",
|
||||
"iconID":"items_consumables:20",
|
||||
"name":"Eggs",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":10,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":1,
|
||||
"duration":6,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"radish",
|
||||
"iconID":"items_consumables:14",
|
||||
"name":"Radish",
|
||||
"hasManualPrice":1,
|
||||
"baseMarketCost":6,
|
||||
"category":"food",
|
||||
"useEffect":{
|
||||
"conditionsSource":[
|
||||
{
|
||||
"condition":"food",
|
||||
"magnitude":1,
|
||||
"duration":4,
|
||||
"chance":"100"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -32,7 +32,7 @@
|
||||
Hungarian translation by <a href="https://urbalazs.hu">Balázs Úr</a><br />
|
||||
Hebrew translation by eitanbm<br />
|
||||
Portuguese(PT) translation by mira<br />
|
||||
Portuguese(BR) translation by Mauro Carvalho Chehab<br />
|
||||
Portuguese(BR) translation by Mauro Carvalho Chehab, Rafael Mendes (fifa1988)<br />
|
||||
Japanese translation by surgecurrent<br />
|
||||
Polish translation by tobik9090siemens, DanielS and Piotr Wieczorek<br />
|
||||
Forum moderated by Tim Davis<br />
|
||||
|
||||
@@ -778,7 +778,6 @@
|
||||
<item>@xml/guynmart_main_1</item>
|
||||
<item>@xml/guynmart_main_2</item>
|
||||
<item>@xml/guynmart_main_3</item>
|
||||
<item>@xml/guynmart_main_3</item>
|
||||
<item>@xml/guynmart_passage</item>
|
||||
<item>@xml/guynmart_tower_0</item>
|
||||
<item>@xml/guynmart_tower_1</item>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map version="1.0" tiledversion="1.1.5" orientation="orthogonal" renderorder="right-down" width="30" height="30" tilewidth="32" tileheight="32" infinite="0" nextobjectid="17">
|
||||
<map version="1.0" orientation="orthogonal" renderorder="right-down" width="30" height="30" tilewidth="32" tileheight="32" nextobjectid="17">
|
||||
<tileset firstgid="1" name="map_bed_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_bed_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
@@ -135,9 +135,6 @@
|
||||
<tileset firstgid="5557" name="map_transition_5" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_transition_5.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="5685" name="map_trail_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../../../../AndorsTrail/res/drawable/map_trail_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<layer name="Ground" width="30" height="30">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJztlkESwiAMRTssXLjyAL2CwRtYV+57Bg7rscQZmcH0Jw0UrAsXbzpNSX+B5FPvhiEInCP30yev+AyYQCyA/ISPzx4HzBXkSWNn4T01ujPQlcYHEEfrZdFF66SNb6WL1kkaf2k4X5S3ly7F2DEyvq+Jid2nWA65pe7olpDyvST0k4Y2fyte6fsSP6jRtda1Zb+t3Cp0cx8isP8WXcmfNHIf8gWemoP8aY3AdPn+W3RLNbkPofr4Rl3x/NE43626xLxiAuuOeqB1H0l12ltXqtPeutYcvj8WNL+vyfnTD+6vpWetdo6u5dXW7lr+Hrq/Pt/avpN0W/yTaEi+09snnlpanUE=
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map version="1.0" tiledversion="1.1.5" orientation="orthogonal" renderorder="right-down" width="3" height="7" tilewidth="32" tileheight="32" infinite="0" nextobjectid="15">
|
||||
<map version="1.0" orientation="orthogonal" renderorder="right-down" width="3" height="7" tilewidth="32" tileheight="32" nextobjectid="15">
|
||||
<properties>
|
||||
<property name="outdoors" value="1"/>
|
||||
</properties>
|
||||
@@ -183,9 +183,6 @@
|
||||
<tileset firstgid="7449" name="map_window_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_window_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="7577" name="map_plant_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../../../../../master/AndorsTrail/res/drawable/map_plant_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<layer name="Ground" width="3" height="7">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJxbz8TAsIWTgaEdSK+nEhsAYaMNwg==
|
||||
|
||||
@@ -25,11 +25,11 @@ public final class AndorsTrailApplication extends Application {
|
||||
public static final boolean DEVELOPMENT_FORCE_CONTINUEGAME = false;
|
||||
public static final boolean DEVELOPMENT_DEBUGBUTTONS = false;
|
||||
public static final boolean DEVELOPMENT_FASTSPEED = false;
|
||||
public static final boolean DEVELOPMENT_VALIDATEDATA = false;
|
||||
public static final boolean DEVELOPMENT_DEBUGMESSAGES = false;
|
||||
public static final boolean DEVELOPMENT_VALIDATEDATA = true;
|
||||
public static final boolean DEVELOPMENT_DEBUGMESSAGES = true;
|
||||
public static final boolean DEVELOPMENT_INCOMPATIBLE_SAVEGAMES = DEVELOPMENT_DEBUGRESOURCES || DEVELOPMENT_DEBUGBUTTONS || DEVELOPMENT_FASTSPEED;
|
||||
public static final int CURRENT_VERSION = DEVELOPMENT_INCOMPATIBLE_SAVEGAMES ? 999 : 46;
|
||||
public static final String CURRENT_VERSION_DISPLAY = "0.7.5dev";
|
||||
public static final int CURRENT_VERSION = DEVELOPMENT_INCOMPATIBLE_SAVEGAMES ? 999 : 47;
|
||||
public static final String CURRENT_VERSION_DISPLAY = "0.7.6dev";
|
||||
public static final boolean IS_RELEASE_VERSION = !CURRENT_VERSION_DISPLAY.matches(".*[a-d].*");
|
||||
|
||||
private final AndorsTrailPreferences preferences = new AndorsTrailPreferences();
|
||||
|
||||
@@ -3,9 +3,13 @@ package com.gpl.rpg.AndorsTrail.activity;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
@@ -13,6 +17,7 @@ import android.view.ViewGroup;
|
||||
import android.view.ViewGroup.LayoutParams;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
|
||||
import com.gpl.rpg.AndorsTrail.AndorsTrailPreferences;
|
||||
@@ -67,6 +72,8 @@ public final class LoadSaveActivity extends Activity implements OnClickListener
|
||||
|
||||
addSavegameSlotButtons(slotList, params, Savegames.getUsedSavegameSlots());
|
||||
|
||||
checkAndRequestPermissions();
|
||||
|
||||
if (!isLoading) {
|
||||
createNewSlot.setTag(SLOT_NUMBER_CREATE_NEW_SLOT);
|
||||
createNewSlot.setOnClickListener(this);
|
||||
@@ -76,6 +83,30 @@ public final class LoadSaveActivity extends Activity implements OnClickListener
|
||||
}
|
||||
}
|
||||
|
||||
private static final int READ_EXTERNAL_STORAGE_REQUEST=1;
|
||||
private static final int WRITE_EXTERNAL_STORAGE_REQUEST=2;
|
||||
|
||||
@TargetApi(23)
|
||||
private void checkAndRequestPermissions() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
if (getApplicationContext().checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
|
||||
this.requestPermissions(new String[] {Manifest.permission.READ_EXTERNAL_STORAGE}, READ_EXTERNAL_STORAGE_REQUEST);
|
||||
}
|
||||
if (getApplicationContext().checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
|
||||
this.requestPermissions(new String[] {Manifest.permission.WRITE_EXTERNAL_STORAGE}, WRITE_EXTERNAL_STORAGE_REQUEST);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
|
||||
if (grantResults.length > 0 && grantResults[0] != PackageManager.PERMISSION_GRANTED) {
|
||||
Toast.makeText(this, R.string.storage_permissions_mandatory, Toast.LENGTH_LONG).show();
|
||||
((AndorsTrailApplication)getApplication()).discardWorld();
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
private void addSavegameSlotButtons(ViewGroup parent, LayoutParams params, List<Integer> usedSavegameSlots) {
|
||||
for (int slot : usedSavegameSlots) {
|
||||
final FileHeader header = Savegames.quickload(this, slot);
|
||||
|
||||
@@ -308,7 +308,7 @@ public final class MainActivity
|
||||
|
||||
|
||||
@Override
|
||||
public void onPlayerMoved(Coord newPosition, Coord previousPosition) { }
|
||||
public void onPlayerMoved(PredefinedMap map, Coord newPosition, Coord previousPosition) { }
|
||||
|
||||
@Override
|
||||
public void onPlayerEnteredNewMap(PredefinedMap map, Coord p) { }
|
||||
|
||||
@@ -79,6 +79,9 @@ public final class HeroinfoActivity_Inventory extends Fragment implements Custom
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
final View v = inflater.inflate(R.layout.heroinfo_inventory, container, false);
|
||||
|
||||
AndorsTrailApplication app = AndorsTrailApplication.getApplicationFromActivity(this.getActivity());
|
||||
if (!app.isInitialized()) return v;
|
||||
|
||||
inventoryList = (ListView) v.findViewById(R.id.inventorylist_root);
|
||||
ImageView heroicon = (ImageView) v.findViewById(R.id.heroinfo_inventory_heroicon);
|
||||
heroinfo_stats_gold = (TextView) v.findViewById(R.id.heroinfo_stats_gold);
|
||||
|
||||
@@ -51,7 +51,10 @@ public final class HeroinfoActivity_Quests extends Fragment {
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View v = inflater.inflate(R.layout.questlog, container, false);
|
||||
|
||||
|
||||
AndorsTrailApplication app = AndorsTrailApplication.getApplicationFromActivity(this.getActivity());
|
||||
if (!app.isInitialized()) return v;
|
||||
|
||||
Context ctx = getActivity();
|
||||
|
||||
|
||||
|
||||
@@ -48,7 +48,10 @@ public final class HeroinfoActivity_Skills extends Fragment {
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View v = inflater.inflate(R.layout.heroinfo_skill_list, container, false);
|
||||
|
||||
|
||||
AndorsTrailApplication app = AndorsTrailApplication.getApplicationFromActivity(this.getActivity());
|
||||
if (!app.isInitialized()) return v;
|
||||
|
||||
final Activity ctx = getActivity();
|
||||
|
||||
new SpinnerEmulator(v,R.id.skillList_category_filters_button, R.array.skill_category_filters, R.string.heroinfo_skill_categories) {
|
||||
|
||||
@@ -67,10 +67,14 @@ public final class HeroinfoActivity_Stats extends Fragment {
|
||||
View v = inflater.inflate(R.layout.heroinfo_stats, container, false);
|
||||
view = v;
|
||||
|
||||
AndorsTrailApplication app = AndorsTrailApplication.getApplicationFromActivity(this.getActivity());
|
||||
if (!app.isInitialized()) return v;
|
||||
|
||||
TextView tv = (TextView) v.findViewById(R.id.heroinfo_title);
|
||||
tv.setText(player.getName());
|
||||
tv.setCompoundDrawablesWithIntrinsicBounds(HeroCollection.getHeroLargeSprite(player.iconID), 0, 0, 0);
|
||||
|
||||
if (tv != null) {
|
||||
tv.setText(player.getName());
|
||||
tv.setCompoundDrawablesWithIntrinsicBounds(HeroCollection.getHeroLargeSprite(player.iconID), 0, 0, 0);
|
||||
}
|
||||
heroinfo_container = (ViewGroup) v.findViewById(R.id.heroinfo_container);
|
||||
heroinfo_reequip_cost = (TextView) v.findViewById(R.id.heroinfo_reequip_cost);
|
||||
heroinfo_useitem_cost = (TextView) v.findViewById(R.id.heroinfo_useitem_cost);
|
||||
|
||||
@@ -176,12 +176,13 @@ public final class CombatController implements VisualEffectCompletedCallback {
|
||||
playerKilledMonster(target);
|
||||
}
|
||||
|
||||
controllers.skillController.applySkillEffectsFromPlayerAttack(attack, target);
|
||||
startAttackEffect(attack, attackPosition, this, CALLBACK_PLAYERATTACK);
|
||||
} else {
|
||||
combatActionListeners.onPlayerAttackMissed(target, attack);
|
||||
controllers.skillController.applySkillEffectsFromPlayerAttack(attack, target);
|
||||
startMissedEffect(attack, attackPosition, this, CALLBACK_PLAYERATTACK);
|
||||
}
|
||||
controllers.skillController.applySkillEffectsFromPlayerAttack(attack, target);
|
||||
|
||||
}
|
||||
|
||||
@@ -404,12 +405,13 @@ public final class CombatController implements VisualEffectCompletedCallback {
|
||||
|
||||
if (attack.isHit) {
|
||||
combatActionListeners.onMonsterAttackSuccess(currentActiveMonster, attack);
|
||||
controllers.skillController.applySkillEffectsFromMonsterAttack(attack, currentActiveMonster);
|
||||
startAttackEffect(attack, world.model.player.position, this, CALLBACK_MONSTERATTACK);
|
||||
} else {
|
||||
combatActionListeners.onMonsterAttackMissed(currentActiveMonster, attack);
|
||||
controllers.skillController.applySkillEffectsFromMonsterAttack(attack, currentActiveMonster);
|
||||
startMissedEffect(attack, world.model.player.position, this, CALLBACK_MONSTERATTACK);
|
||||
}
|
||||
controllers.skillController.applySkillEffectsFromMonsterAttack(attack, currentActiveMonster);
|
||||
}
|
||||
|
||||
private static final int CALLBACK_MONSTERATTACK = 0;
|
||||
|
||||
@@ -295,6 +295,9 @@ public final class ConversationController {
|
||||
case spentGold:
|
||||
result = stats.getSpentGold() >= requirement.value;
|
||||
break;
|
||||
case random:
|
||||
result = Constants.rollResult(requirement.chance);
|
||||
break;
|
||||
case consumedBonemeals:
|
||||
result = stats.getNumberOfUsedBonemealPotions() >= requirement.value;
|
||||
break;
|
||||
|
||||
@@ -246,7 +246,7 @@ public final class MovementController implements TimedMessageTask.Callback {
|
||||
@Override
|
||||
public void onVisualEffectCompleted(int callbackValue) {
|
||||
|
||||
playerMovementListeners.onPlayerMoved(newPosition, player.lastPosition);
|
||||
playerMovementListeners.onPlayerMoved(currentMap, newPosition, player.lastPosition);
|
||||
controllers.mapController.handleMapEventsAfterMovement(currentMap, newPosition, player.lastPosition);
|
||||
|
||||
if (!world.model.uiSelections.isInCombat) {
|
||||
|
||||
@@ -284,10 +284,10 @@ public final class SkillController {
|
||||
return SkillID.weaponProficiency1hsword;
|
||||
else if (itemCategoryID.equals("2hsword"))
|
||||
return SkillID.weaponProficiency2hsword;
|
||||
else if (itemCategoryID.equals("axe") || itemCategoryID.equals("axe2h"))
|
||||
else if (itemCategoryID.equals("axe") || itemCategoryID.equals("axe2h") || itemCategoryID.equals("scythe"))
|
||||
return SkillID.weaponProficiencyAxe;
|
||||
else if (itemCategoryID.equals("club") || itemCategoryID.equals("staff") || itemCategoryID.equals("mace")
|
||||
|| itemCategoryID.equals("scepter") || itemCategoryID.equals("hammer") || itemCategoryID.equals("hammer2h"))
|
||||
|| itemCategoryID.equals("scepter") || itemCategoryID.equals("hammer") || itemCategoryID.equals("hammer2h") || itemCategoryID.equals("whip"))
|
||||
return SkillID.weaponProficiencyBlunt;
|
||||
} else if (category.isShield()) {
|
||||
return SkillID.armorProficiencyShield;
|
||||
|
||||
@@ -4,6 +4,6 @@ import com.gpl.rpg.AndorsTrail.model.map.PredefinedMap;
|
||||
import com.gpl.rpg.AndorsTrail.util.Coord;
|
||||
|
||||
public interface PlayerMovementListener {
|
||||
void onPlayerMoved(Coord newPosition, Coord previousPosition);
|
||||
void onPlayerMoved(PredefinedMap map, Coord newPosition, Coord previousPosition);
|
||||
void onPlayerEnteredNewMap(PredefinedMap map, Coord p);
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import com.gpl.rpg.AndorsTrail.util.ListOfListeners;
|
||||
|
||||
public final class PlayerMovementListeners extends ListOfListeners<PlayerMovementListener> implements PlayerMovementListener {
|
||||
|
||||
private final Function2<PlayerMovementListener, Coord, Coord> onPlayerMoved = new Function2<PlayerMovementListener, Coord, Coord>() {
|
||||
@Override public void call(PlayerMovementListener listener, Coord newPosition, Coord previousPosition) { listener.onPlayerMoved(newPosition, previousPosition); }
|
||||
private final Function3<PlayerMovementListener, PredefinedMap, Coord, Coord> onPlayerMoved = new Function3<PlayerMovementListener, PredefinedMap, Coord, Coord>() {
|
||||
@Override public void call(PlayerMovementListener listener, PredefinedMap map, Coord newPosition, Coord previousPosition) { listener.onPlayerMoved(map, newPosition, previousPosition); }
|
||||
};
|
||||
|
||||
private final Function2<PlayerMovementListener, PredefinedMap, Coord> onPlayerEnteredNewMap = new Function2<PlayerMovementListener, PredefinedMap, Coord>() {
|
||||
@@ -15,8 +15,8 @@ public final class PlayerMovementListeners extends ListOfListeners<PlayerMovemen
|
||||
};
|
||||
|
||||
@Override
|
||||
public void onPlayerMoved(Coord newPosition, Coord previousPosition) {
|
||||
callAllListeners(this.onPlayerMoved, newPosition, previousPosition);
|
||||
public void onPlayerMoved(PredefinedMap map, Coord newPosition, Coord previousPosition) {
|
||||
callAllListeners(this.onPlayerMoved, map, newPosition, previousPosition);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -27,7 +27,9 @@ import com.gpl.rpg.AndorsTrail.model.map.TMXMapFileParser.TMXProperty;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.TMXMapFileParser.TMXTileSet;
|
||||
import com.gpl.rpg.AndorsTrail.model.quest.QuestProgress;
|
||||
import com.gpl.rpg.AndorsTrail.model.script.Requirement;
|
||||
import com.gpl.rpg.AndorsTrail.resource.parsers.ResourceParserUtils;
|
||||
import com.gpl.rpg.AndorsTrail.resource.tiles.TileCache;
|
||||
import com.gpl.rpg.AndorsTrail.util.ConstRange;
|
||||
import com.gpl.rpg.AndorsTrail.util.Coord;
|
||||
import com.gpl.rpg.AndorsTrail.util.CoordRect;
|
||||
import com.gpl.rpg.AndorsTrail.util.L;
|
||||
@@ -227,6 +229,7 @@ public final class TMXMapTranslator {
|
||||
String requireId = null;
|
||||
int requireValue = 0;
|
||||
boolean requireNegation = false;
|
||||
ConstRange requireChance = null;
|
||||
for (TMXProperty p : object.properties) {
|
||||
if (p.name.equalsIgnoreCase("requireType")) {
|
||||
try {
|
||||
@@ -246,7 +249,13 @@ public final class TMXMapTranslator {
|
||||
}
|
||||
}
|
||||
if (requireType == null) return null;
|
||||
return new Requirement(requireType, requireId, requireValue, requireNegation);
|
||||
if (requireType == Requirement.RequirementType.random)
|
||||
{
|
||||
requireChance = ResourceParserUtils.parseChance(requireId);
|
||||
requireId = null;
|
||||
}
|
||||
|
||||
return new Requirement(requireType, requireId, requireValue, requireNegation, requireChance);
|
||||
}
|
||||
|
||||
private static CoordRect getTMXObjectPosition(TMXObject object, TMXMap m) {
|
||||
@@ -313,7 +322,7 @@ public final class TMXMapTranslator {
|
||||
else if (prop.name.equalsIgnoreCase(LAYERNAME_TOP)) layerNames.topLayersName = prop.value;
|
||||
else if (prop.name.equalsIgnoreCase(LAYERNAME_WALKABLE)) layerNames.walkableLayersName = prop.value;
|
||||
else if (AndorsTrailApplication.DEVELOPMENT_VALIDATEDATA) {
|
||||
if (!requirementPropertiesNames.contains(prop.name))
|
||||
if (!requirementPropertiesNames.contains(prop.name.toLowerCase()))
|
||||
L.log("OPTIMIZE: Map " + map.name + " contains replace area with unknown property \"" + prop.name + "\".");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.gpl.rpg.AndorsTrail.model.script;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.model.quest.QuestProgress;
|
||||
import com.gpl.rpg.AndorsTrail.util.ConstRange;
|
||||
|
||||
public final class Requirement {
|
||||
public static enum RequirementType {
|
||||
@@ -17,30 +18,35 @@ public final class Requirement {
|
||||
,consumedBonemeals
|
||||
,hasActorCondition
|
||||
,factionScore
|
||||
,random
|
||||
}
|
||||
|
||||
public final RequirementType requireType;
|
||||
public final String requireID;
|
||||
public final int value;
|
||||
public final boolean negate;
|
||||
public final ConstRange chance;
|
||||
|
||||
public Requirement(
|
||||
RequirementType requireType
|
||||
, String requireID
|
||||
, int value
|
||||
, boolean negate
|
||||
, ConstRange chance
|
||||
) {
|
||||
this.requireType = requireType;
|
||||
this.requireID = requireID;
|
||||
this.value = value;
|
||||
this.negate = negate;
|
||||
this.chance = chance;
|
||||
}
|
||||
|
||||
|
||||
public Requirement(QuestProgress qp) {
|
||||
this.requireType = RequirementType.questProgress;
|
||||
this.requireID = qp.questID;
|
||||
this.value = qp.progress;
|
||||
this.negate = false;
|
||||
this.chance = null;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
@@ -52,32 +58,34 @@ public final class Requirement {
|
||||
buf.append(value);
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
|
||||
public boolean isValid() {
|
||||
switch (this.requireType) {
|
||||
case consumedBonemeals:
|
||||
return value >= 0;
|
||||
case hasActorCondition:
|
||||
return requireID != null;
|
||||
case inventoryKeep:
|
||||
case inventoryRemove:
|
||||
case usedItem:
|
||||
return requireID != null && value >= 0;
|
||||
case killedMonster:
|
||||
return requireID != null && value >= 0;
|
||||
case questLatestProgress:
|
||||
case questProgress:
|
||||
return requireID != null && value >= 0;
|
||||
case skillLevel:
|
||||
return requireID != null && value >= 0;
|
||||
case spentGold:
|
||||
return value >= 0;
|
||||
case timerElapsed:
|
||||
return requireID != null && value >= 0;
|
||||
case wear:
|
||||
return requireID != null;
|
||||
default:
|
||||
return false;
|
||||
case consumedBonemeals:
|
||||
return value >= 0;
|
||||
case hasActorCondition:
|
||||
return requireID != null;
|
||||
case inventoryKeep:
|
||||
case inventoryRemove:
|
||||
case usedItem:
|
||||
return requireID != null && value >= 0;
|
||||
case killedMonster:
|
||||
return requireID != null && value >= 0;
|
||||
case questLatestProgress:
|
||||
case questProgress:
|
||||
return requireID != null && value >= 0;
|
||||
case skillLevel:
|
||||
return requireID != null && value >= 0;
|
||||
case spentGold:
|
||||
return value >= 0;
|
||||
case random:
|
||||
return chance != null;
|
||||
case timerElapsed:
|
||||
return requireID != null && value >= 0;
|
||||
case wear:
|
||||
return requireID != null;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,11 +22,14 @@ public final class ConversationListParser extends JsonCollectionParserFor<Phrase
|
||||
private final JsonArrayParserFor<Requirement> requirementParser = new JsonArrayParserFor<Requirement>(Requirement.class) {
|
||||
@Override
|
||||
protected Requirement parseObject(JSONObject o) throws JSONException {
|
||||
Requirement.RequirementType type = Requirement.RequirementType.valueOf(o.getString(JsonFieldNames.ReplyRequires.requireType));
|
||||
String requireID = o.getString(JsonFieldNames.ReplyRequires.requireID);
|
||||
return new Requirement(
|
||||
Requirement.RequirementType.valueOf(o.getString(JsonFieldNames.ReplyRequires.requireType))
|
||||
,o.getString(JsonFieldNames.ReplyRequires.requireID)
|
||||
type
|
||||
,type == Requirement.RequirementType.random ? null : requireID
|
||||
,o.optInt(JsonFieldNames.ReplyRequires.value, 0)
|
||||
,o.optBoolean(JsonFieldNames.ReplyRequires.negate, false)
|
||||
,type == Requirement.RequirementType.random ? ResourceParserUtils.parseChance(requireID) : null
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -665,7 +665,8 @@ public final class MainView extends SurfaceView
|
||||
|
||||
|
||||
@Override
|
||||
public void onPlayerMoved(Coord newPosition, Coord previousPosition) {
|
||||
public void onPlayerMoved(PredefinedMap map, Coord newPosition, Coord previousPosition) {
|
||||
if (map != currentMap) return;
|
||||
recalculateMapTopLeft(newPosition, preferences.enableUiAnimations);
|
||||
redrawAll(RedrawAllDebugReason.PlayerMoved);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user