mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-02-23 15:38:29 +01:00
Merge branch 'master' into stoutford_tests
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
"id":"mikhail_start_select_default",
|
||||
"replies":[
|
||||
{
|
||||
"nextPhraseID":"mikhail_visited",
|
||||
"nextPhraseID":"mikhail_default",
|
||||
"requires":[
|
||||
{
|
||||
"requireType":"questProgress",
|
||||
@@ -114,9 +114,73 @@
|
||||
"id":"mikhail_default",
|
||||
"message":"Anything else I can help you with?",
|
||||
"replies":[
|
||||
{
|
||||
"text":"Do you have any more tasks for me?",
|
||||
"nextPhraseID":"mikhail_all_tasks_done",
|
||||
"requires":[
|
||||
{
|
||||
"requireType":"questProgress",
|
||||
"requireID":"mikhail_bread",
|
||||
"value":100
|
||||
},
|
||||
{
|
||||
"requireType":"questProgress",
|
||||
"requireID":"mikhail_rats",
|
||||
"value":100
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text":"Do you have any more tasks for me?",
|
||||
"nextPhraseID":"mikhail_bread_done",
|
||||
"requires":[
|
||||
{
|
||||
"requireType":"questProgress",
|
||||
"requireID":"mikhail_bread",
|
||||
"value":100
|
||||
},
|
||||
{
|
||||
"requireType":"questProgress",
|
||||
"requireID":"mikhail_rats",
|
||||
"value":100,
|
||||
"negate":true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text":"Do you have any more tasks for me?",
|
||||
"nextPhraseID":"mikhail_rats_done",
|
||||
"requires":[
|
||||
{
|
||||
"requireType":"questProgress",
|
||||
"requireID":"mikhail_bread",
|
||||
"value":100,
|
||||
"negate":true
|
||||
},
|
||||
{
|
||||
"requireType":"questProgress",
|
||||
"requireID":"mikhail_rats",
|
||||
"value":100
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text":"Do you have any tasks for me?",
|
||||
"nextPhraseID":"mikhail_tasks"
|
||||
"nextPhraseID":"mikhail_tasks",
|
||||
"requires":[
|
||||
{
|
||||
"requireType":"questProgress",
|
||||
"requireID":"mikhail_bread",
|
||||
"value":100,
|
||||
"negate":true
|
||||
},
|
||||
{
|
||||
"requireType":"questProgress",
|
||||
"requireID":"mikhail_rats",
|
||||
"value":100,
|
||||
"negate":true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text":"Is there anything else you can tell me about Andor?",
|
||||
@@ -142,6 +206,44 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id":"mikhail_bread_done",
|
||||
"message":"Thanks for getting me the bread. There are still the rats.",
|
||||
"replies":[
|
||||
{
|
||||
"text":"What about the rats?",
|
||||
"nextPhraseID":"mikhail_rats_select"
|
||||
},
|
||||
{
|
||||
"text":"Never mind, let's talk about the other things.",
|
||||
"nextPhraseID":"mikhail_default"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id":"mikhail_rats_done",
|
||||
"message":"Thanks for taking care of the rats. I'd still love some bread.",
|
||||
"replies":[
|
||||
{
|
||||
"text":"What about the bread?",
|
||||
"nextPhraseID":"mikhail_bread_select"
|
||||
},
|
||||
{
|
||||
"text":"Never mind, let's talk about the other things.",
|
||||
"nextPhraseID":"mikhail_default"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id":"mikhail_all_tasks_done",
|
||||
"message":"Not for now. Thanks for taking care of the bread and rats.",
|
||||
"replies":[
|
||||
{
|
||||
"text":"Never mind, let's talk about the other things.",
|
||||
"nextPhraseID":"mikhail_default"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id":"mikhail_andor1",
|
||||
"message":"As I said, Andor went out yesterday and hasn't been back since. I'm starting to worry about him. Please go look for your brother, he said he would only be out a short while.",
|
||||
|
||||
@@ -1,245 +1,274 @@
|
||||
<?xml version="1.0" ?><!DOCTYPE map SYSTEM 'http://mapeditor.org/dtd/1.0/map.dtd'><map height="30" orientation="orthogonal" tileheight="32" tilewidth="32" version="1.0" width="30">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map version="2017.05.26" orientation="orthogonal" renderorder="right-down" width="30" height="30" tilewidth="32" tileheight="32" nextobjectid="17">
|
||||
<properties>
|
||||
<property name="outdoors" value="1"/>
|
||||
</properties>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<tileset firstgid="1" name="map_bed_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_bed_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="129" name="map_border_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_border_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="257" name="map_bridge_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_bridge_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="385" name="map_bridge_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_bridge_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="513" name="map_broken_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_broken_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="641" name="map_cavewall_1" tileheight="32" tilewidth="32">
|
||||
<image height="192" source="../drawable/map_cavewall_1.png" width="576"/>
|
||||
</tileset><tileset firstgid="749" name="map_cavewall_2" tileheight="32" tilewidth="32">
|
||||
<image height="192" source="../drawable/map_cavewall_2.png" width="576"/>
|
||||
</tileset><tileset firstgid="857" name="map_cavewall_3" tileheight="32" tilewidth="32">
|
||||
<image height="192" source="../drawable/map_cavewall_3.png" width="576"/>
|
||||
</tileset><tileset firstgid="965" name="map_cavewall_4" tileheight="32" tilewidth="32">
|
||||
<image height="192" source="../drawable/map_cavewall_4.png" width="576"/>
|
||||
</tileset><tileset firstgid="1073" name="map_chair_table_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_chair_table_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="1201" name="map_chair_table_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_chair_table_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="1329" name="map_crate_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_crate_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="1457" name="map_cupboard_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_cupboard_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="1585" name="map_curtain_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_curtain_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="1713" name="map_entrance_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_entrance_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="1841" name="map_entrance_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_entrance_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="1969" name="map_fence_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_fence_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="2097" name="map_fence_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_fence_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="2225" name="map_fence_3" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_fence_3.png" width="512"/>
|
||||
</tileset><tileset firstgid="2353" name="map_fence_4" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_fence_4.png" width="512"/>
|
||||
</tileset><tileset firstgid="2481" name="map_ground_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_ground_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="2609" name="map_ground_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_ground_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="2737" name="map_ground_3" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_ground_3.png" width="512"/>
|
||||
</tileset><tileset firstgid="2865" name="map_ground_4" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_ground_4.png" width="512"/>
|
||||
</tileset><tileset firstgid="2993" name="map_ground_5" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_ground_5.png" width="512"/>
|
||||
</tileset><tileset firstgid="3121" name="map_ground_6" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_ground_6.png" width="512"/>
|
||||
</tileset><tileset firstgid="3249" name="map_ground_7" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_ground_7.png" width="512"/>
|
||||
</tileset><tileset firstgid="3377" name="map_ground_8" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_ground_8.png" width="512"/>
|
||||
</tileset><tileset firstgid="3505" name="map_house_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_house_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="3633" name="map_house_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_house_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="3761" name="map_indoor_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_indoor_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="3889" name="map_indoor_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_indoor_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="4017" name="map_kitchen_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_kitchen_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="4145" name="map_outdoor_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_outdoor_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="4273" name="map_pillar_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_pillar_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="4401" name="map_pillar_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_pillar_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="4529" name="map_plant_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_plant_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="4657" name="map_plant_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_plant_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="4785" name="map_rock_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_rock_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="4913" name="map_rock_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_rock_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="5041" name="map_roof_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_roof_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="5169" name="map_roof_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_roof_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="5297" name="map_roof_3" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_roof_3.png" width="512"/>
|
||||
</tileset><tileset firstgid="5425" name="map_shop_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_shop_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="5553" name="map_sign_ladder_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_sign_ladder_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="5681" name="map_table_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_table_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="5809" name="map_trail_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_trail_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="5937" name="map_transition_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_transition_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="6065" name="map_transition_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_transition_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="6193" name="map_transition_3" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_transition_3.png" width="512"/>
|
||||
</tileset><tileset firstgid="6321" name="map_transition_4" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_transition_4.png" width="512"/>
|
||||
</tileset><tileset firstgid="6449" name="map_transition_5" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_transition_5.png" width="512"/>
|
||||
</tileset><tileset firstgid="6577" name="map_tree_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_tree_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="6705" name="map_tree_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_tree_2.png" width="512"/>
|
||||
</tileset><tileset firstgid="6833" name="map_wall_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_wall_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="6961" name="map_wall_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_wall_2.png" width="480"/>
|
||||
</tileset><tileset firstgid="7081" name="map_wall_3" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_wall_3.png" width="480"/>
|
||||
</tileset><tileset firstgid="7201" name="map_wall_4" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_wall_4.png" width="480"/>
|
||||
</tileset><tileset firstgid="7321" name="map_window_1" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_window_1.png" width="512"/>
|
||||
</tileset><tileset firstgid="7449" name="map_window_2" tileheight="32" tilewidth="32">
|
||||
<image height="256" source="../drawable/map_window_2.png" width="512"/>
|
||||
</tileset><layer height="30" name="Ground" width="30">
|
||||
<data compression="zlib" encoding="base64">eJztl0EOgjAQRRtdGNmybPQGcmKvIMYTQK+gl0AvAO5sI4RhnGkb6cjGxQtYSl87ob+xXClVWozl6qHq+1Gc+z6nQJ/LdoRq44Dj1gAD5lYTRHlzgv5ZhTwDcDyuVibgNfkneNyY2oTA3kYrdQc8dBpPyNtaz3qjVKffPAW9uPa/IPZb/ntlvLvMj5R3b8cusukV3kt5sQv/TuXFNTxkflJ5yRpSWY1yk20PPIdeXEMqq3FeT9oJuPdK5IXrxVlN5jXjIOeCvG7NBeFt9ZjTQ2bjvIYOPEeHb73O++0304A6dAQNU6e558JwfnHnVsuca855WyArl3CSeyy0HxMSs08liNqnAsTs0z/zcLlxZJD2xv6XSskLbjmFEg==</data>
|
||||
<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>
|
||||
<tileset firstgid="129" name="map_border_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_border_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="257" name="map_bridge_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_bridge_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="385" name="map_bridge_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_bridge_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="513" name="map_broken_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_broken_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="641" name="map_cavewall_1" tilewidth="32" tileheight="32" tilecount="108" columns="18">
|
||||
<image source="../drawable/map_cavewall_1.png" width="576" height="192"/>
|
||||
</tileset>
|
||||
<tileset firstgid="749" name="map_cavewall_2" tilewidth="32" tileheight="32" tilecount="108" columns="18">
|
||||
<image source="../drawable/map_cavewall_2.png" width="576" height="192"/>
|
||||
</tileset>
|
||||
<tileset firstgid="857" name="map_cavewall_3" tilewidth="32" tileheight="32" tilecount="108" columns="18">
|
||||
<image source="../drawable/map_cavewall_3.png" width="576" height="192"/>
|
||||
</tileset>
|
||||
<tileset firstgid="965" name="map_cavewall_4" tilewidth="32" tileheight="32" tilecount="108" columns="18">
|
||||
<image source="../drawable/map_cavewall_4.png" width="576" height="192"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1073" name="map_chair_table_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_chair_table_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1201" name="map_chair_table_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_chair_table_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1329" name="map_crate_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_crate_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1457" name="map_cupboard_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_cupboard_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1585" name="map_curtain_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_curtain_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1713" name="map_entrance_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_entrance_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1841" name="map_entrance_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_entrance_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1969" name="map_fence_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_fence_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2097" name="map_fence_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_fence_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2225" name="map_fence_3" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_fence_3.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2353" name="map_fence_4" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_fence_4.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2481" name="map_ground_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_ground_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2609" name="map_ground_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_ground_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2737" name="map_ground_3" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_ground_3.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2865" name="map_ground_4" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_ground_4.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2993" name="map_ground_5" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_ground_5.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3121" name="map_ground_6" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_ground_6.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3249" name="map_ground_7" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_ground_7.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3377" name="map_ground_8" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_ground_8.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3505" name="map_house_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_house_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3633" name="map_house_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_house_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3761" name="map_indoor_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_indoor_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3889" name="map_indoor_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_indoor_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4017" name="map_kitchen_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_kitchen_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4145" name="map_outdoor_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_outdoor_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4273" name="map_pillar_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_pillar_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4401" name="map_pillar_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_pillar_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4529" name="map_plant_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_plant_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4657" name="map_plant_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_plant_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4785" name="map_rock_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_rock_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4913" name="map_rock_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_rock_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="5041" name="map_roof_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_roof_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="5169" name="map_roof_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_roof_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="5297" name="map_roof_3" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_roof_3.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="5425" name="map_shop_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_shop_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="5553" name="map_sign_ladder_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_sign_ladder_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="5681" name="map_table_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_table_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="5809" name="map_trail_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_trail_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="5937" name="map_transition_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_transition_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="6065" name="map_transition_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_transition_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="6193" name="map_transition_3" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_transition_3.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="6321" name="map_transition_4" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_transition_4.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="6449" 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="6577" name="map_tree_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_tree_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="6705" name="map_tree_2" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_tree_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="6833" name="map_wall_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_wall_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="6961" name="map_wall_2" tilewidth="32" tileheight="32" tilecount="120" columns="15">
|
||||
<image source="../drawable/map_wall_2.png" width="480" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="7081" name="map_wall_3" tilewidth="32" tileheight="32" tilecount="120" columns="15">
|
||||
<image source="../drawable/map_wall_3.png" width="480" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="7201" name="map_wall_4" tilewidth="32" tileheight="32" tilecount="120" columns="15">
|
||||
<image source="../drawable/map_wall_4.png" width="480" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="7321" name="map_window_1" tilewidth="32" tileheight="32" tilecount="128" columns="16">
|
||||
<image source="../drawable/map_window_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<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>
|
||||
<layer name="Ground" width="30" height="30">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJztlkEOgjAQRRtdGNmyJHoDObFXEOIJkCMgl0AvAO4ssQ3Dd6ZUpbpx8aIW6Wsn9A/ZQqlcU2vODirNQZMZToTS/KeAcUtmHMf1ADcmUYDHUpO1cWsuzD1Ob8xgrlXgsdD5pFrVE94yfgbn9anNFOhtEqUuhGsyj4fz0tq32rNcKdUlD26BvDlT+2/g+yz/vWG8m8hNKO9Wz51G40/6PZQXXfh7Li/WcBe5mcvL1pDLashNcXziOvViDbmsxrwejTNI92XgpfvFrGbzWnCwawFvv+eU8bbJkNM2szGvqQPX2OPab+9995lpSB06hkaoE/ajV7H9S+pbrdDXyh/1o1842TM2dR5nxOechsDrnAbA55z++Yw+N/YCob0SId+97knhh3c=
|
||||
</data>
|
||||
</layer>
|
||||
<layer height="30" name="Objects" width="30">
|
||||
<data compression="zlib" encoding="base64">eJytV89rE0EUXtJEakDJBBoJxD9B6KXVk+BB6cGrwZMHweLJkwqC+C940aPau0ELQttABSHttpsEFayJ9RAvomASETwXfK/zXufty2x2RT8YZnaz8773eyZB8H+wdyz9m3Y1CCIYQdm9a+TsHBk7hzR/pvl5brrMrxl4DzmJn9GE9a5J3+MD6hxWrG6nUvTTvCi3mSD7adHazzYjzw+h47nZIFgH3g69G4GcnzAGNOM+3DM2kzY0q+75N/jsFny3WbPPL4pxPR6K5z7IWiJejBvK+GIcJ88I1rUjdI7Iz+ynBzB3ifd6wX33DDhXYNwuuXfMi3b77JXciLbHrxinXyYe609i/RI4V4s23+4A992S471KvGi35B5X7fO46mxEcC5jDHH/AuxfpIGcOO8b9w5tXRTf1Ik3lP4zjkvmwtAEsTo6ynHYv5ZxvDru1p2K3f9+Sk0wBsQl7WubuC1J4xLZeFG8Ozsbl39g4ly+WB/5QPgpTNBd5vAScd0A3y+XbDwOeYSffXnG4NrYEVwzEIc8xaJnnEyE5O2LHJMYiXodefKL8V3ZlyfeGcGNeSztvZIhJnpwPLgn9zx+zZcn37G9G3+Rg3po9DPkI/Ouq/2R2JuUG2k4SNnn482CkcjnViXuY5k/K9QrsWe3YL1V+zdexEDlFeaMjvFqza0/wHoPxoWCn5f1upyL6ygx8tQv92HpY+xx9wq2byPOnLZxZN5ozvpC6nU/59aIN6TL+bzfXokFlfe6b9c99j4G/R6Js4v78jvS5VreX798p+mJfN9Q85rnt446E3ROhqKHIfj8bYi7SZqduv53EvJ+qLgY3CsbKfch9iWf94i25qLe0k25o8n+nFanzMvnve6l2h4ExzDy3Hf0eSTrdBvWIYzunOOV9cU9bb48aUfWmWOMdcp3q4+w7sFYLlhejtWEf4Pk+8y0MxDn12RzHThuFuK5zDmroXsLc/h6e8/4dWkJufp+hJA1GpNbdvdhiV2PDMRQ7Z2GJznH+y0l/2S++e4yjHm6a6YBed/SfymWx/7aN8nxGyTE9wTIOQnjD2MmYjM=</data>
|
||||
<layer name="Objects" width="30" height="30">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJylV89rE0EUXtJEakDJBBoJxD9B6KXVk+BB6cGroScPgsWTJxUE8V/woke1d4MWhLYBBSF2202CCq2J9RAvomASETwXfK/zXufty2x2pR8MM7vZed/7PZMgsNjNBcfC3on0b9rVIIhgBGX3rkG8kbFzSPNXml+k6PU9A+8hJ/EzmrDeMel7fECdw4rV7UwGv0lelNtMkP2saO1nm5Hnl9DxwmwQbABvh96NQM5vGAOacR/uGZtJG5pV9/wXfHYbvntTs88vi3E9HonnPshaIl6MG8r4ZhwnzwjWtSN0jsjP7KeHMHeJ90bBffccOFdh3Cm5d8yLdvvsldyItsevGKc/Jh7rL2L9CjjXijbf7gL3vZLjXSZetFtyj6v2eVx1NiI4lzGGuH8B9i/SQE6c9417h7Yuim/qxBtK/xnHJXNhaIJYHR3lOOxfzzhen3TrTsXu/zSlJhgD4pL2tU3clqRxhWy8LN6dn43LPzBxLl+sj3wg/BQm6C5zeIm4boLvV0o2Hoc8ws++PGNwbWwLrhmIQ55i0TNOJkLy9kWOSYxEvY48+cX4qezLE++M4MY8lvZeyxATPTge3JN7Hr/my5Pv2N7N/8hBPTT6GfKReTfU/kjsTcqNNByk7PPxZsFI5HOrEvexzJ9V6pXYs1uwfl87Hi9ioPIKc0bHeK3m1ruw3oNxqeDnZb2u5uI6Sow89ct9WPoYe9z9gu3biHNnbRyZN5qzvpB6Pci5NeId6XIx77dXYkHlve7bdY+9T0C/x+Ls4r78kXS5nvfXL99peiLfN9W87vmto84EnZOh6GEIPn8b4m6SZqeu/+2EvB8qLgb3ykbKfYh9yec9oq25qLd0U+5osj+n1Snz8nmve6m2B8ExjDz3HX0eyTrdgnUIozvneGV9cU+bL0/akXXmGGOd8t3qM6x7MFYKlpdjNeHfIPk+M+0MxPkt2VwHjluFeC5zzmro3sIcvt7eM35dWkKuvh8hZI3G5JbdfVhixyMDMVR7p+FpzvH+SMk/mW++uwxjnu6aaUDeD/RfiuWxv/ZNcvwGCfE9BXJOw/gHEIBjCA==
|
||||
</data>
|
||||
</layer>
|
||||
<layer height="30" name="Above" width="30">
|
||||
<data compression="zlib" encoding="base64">eJy9VktuAjEMTWdDVxUSiIqLcKN22RtxkEoVG05Au4VKcIP2AFVriWjM04vtpIS3mZl44hc7/qU04n2RumJ71v+6HNc+HE797395ce044f+fyLrlm/3fGQ/L8WntEd67e65nKKwzML8cDF8xH0RkDHuHW5/N0l3y6dM0pedp/DzM7t6xzCCxzO7lcUhpdb7blbpj/S7/1CLfQ+39tUDHeIbmFVs8G14G+9vi0uhtb6nm3MLPPXlrY8zj/Zy1n6WWV9fqH+DN9RrrOdZxJtc1m/HqWv0wv5Tlev0Fer/h25OvG++lhRdzyuu/GlJTd6R/Yd/y5IJrxLSnQ+RoL9tTqkOlfPF6C8rFx7fqRxjP18jRN2cG0z7OOYY5KmBzVQTaplJvyDGHOSqIzlU4x3l9SGDlTyTGLd2W3Jurdp3iDXl78SBqa2QEOK8zeQQbEpssXiPPKHLc6TO26NF7Bb9+MYAg</data>
|
||||
<layer name="Above" width="30" height="30">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJy9VktuwkAMdbNpVxUSiIqLcKN2yY04SCXUTU9A2UIluEF7AARWsXCfPLZnlORtkoxn/Mbxl+gPuznR15wGxedN//vivrYLOPXezH6PF9eOj/b+k7Hu/Zv99Y6Hxf3pnWHehydbT1dYt4D/hXEw1jRvi8zCPuDWd/N0l/7p64TobZK/D9o9RixbYF7LLy8d0fLm26XysX7nPbUQP9T6rwU6xgWal22JbFh1/rfHpTG0vZYPx+AtoS/e2hiLeL+n7Xep5dW1+gy8Uq+xnmMdt+S6Zlu8ulY/z/7LpF7/gN5f+I7k60a/tPBiTtX0U66pW6N/Yd+K5Iw+YjrSwXK01zpTqkOlfIl6C8rH7EcYz33k6MaZK4RTIDmGOcqw5qoMtE2l3iAxhznKyM5VOMdFfYjh5U8mxj3dnjyaq7YDxRvyDsWDqK2RGeC8bskz+DBi04rXzDMLiTt9xxY9+izjAqtAgts=
|
||||
</data>
|
||||
</layer>
|
||||
<layer height="30" name="Walkable" visible="0" width="30">
|
||||
<data compression="zlib" encoding="base64">eJzFlNERwCAIQ52i+6/ghv3teTUJCbbc+dMKDwI4rzHmzweZ4qsyVN8urloDur9qcZKLesDioZ6hGCoX8Zluqu1yZuxUf5a38s+t2TGnLlUzheXmzOKle1Lh7u5+UW/Xu4C4rlVnAb0RLMYpbtf8n+A6Gin5d+37s7a3b8k87+Kq9SLtTuySa6znipYJM425ap4wE+3dea+y05lms9nNXLWpGvPt7GNH/7tny62/sr/uuQFP8nz2</data>
|
||||
<layer name="Walkable" width="30" height="30" visible="0">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJzFlNERwCAIQ52i+6/ghv3teTUJCbbc+dMKDwI4rzHmzweZ4qsyVN8urloDur9qcZKLesDioZ6hGCoX8Zluqu1yZuxUf5a38s+t2TGnLlUzheXmzOKle1Lh7u5+UW/Xu4C4rlVnAb0RLMYpbtf8n+A6Gin5d+37s7a3b8k87+Kq9SLtTuySa6znipYJM425ap4wE+3dea+y05lms9nNXLWpGvPt7GNH/7tny62/sr/uuQFP8nz2
|
||||
</data>
|
||||
</layer>
|
||||
<objectgroup name="Mapevents">
|
||||
<object height="32" name="cave" type="mapchange" width="32" x="576" y="32">
|
||||
<objectgroup name="Mapevents" visible="0">
|
||||
<object id="1" name="cave" type="mapchange" x="576" y="32" width="32" height="32">
|
||||
<properties>
|
||||
<property name="map" value="crossglen_cave"/>
|
||||
<property name="place" value="entrance"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object height="32" name="hall" type="mapchange" width="32" x="544" y="608">
|
||||
<object id="2" name="hall" type="mapchange" x="544" y="608" width="32" height="32">
|
||||
<properties>
|
||||
<property name="map" value="crossglen_hall"/>
|
||||
<property name="place" value="entrance"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object height="32" name="farmhouse" type="mapchange" width="32" x="320" y="544">
|
||||
<object id="3" name="farmhouse" type="mapchange" x="320" y="544" width="32" height="32">
|
||||
<properties>
|
||||
<property name="map" value="crossglen_farmhouse"/>
|
||||
<property name="place" value="entrance"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object height="32" name="home" type="mapchange" width="32" x="160" y="160">
|
||||
<object id="4" name="home" type="mapchange" x="160" y="160" width="32" height="32">
|
||||
<properties>
|
||||
<property name="map" value="home"/>
|
||||
<property name="place" value="entrance"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object height="64" name="east" type="mapchange" width="32" x="928" y="416">
|
||||
<object id="5" name="east" type="mapchange" x="928" y="416" width="32" height="64">
|
||||
<properties>
|
||||
<property name="map" value="wild1"/>
|
||||
<property name="place" value="west"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object height="32" name="smith" type="mapchange" width="32" x="128" y="800">
|
||||
<object id="6" name="smith" type="mapchange" x="128" y="800" width="32" height="32">
|
||||
<properties>
|
||||
<property name="map" value="crossglen_smith"/>
|
||||
<property name="place" value="entrance"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object height="32" name="south" type="mapchange" width="32" x="256" y="928">
|
||||
<object id="7" name="south" type="mapchange" x="256" y="928" width="32" height="32">
|
||||
<properties>
|
||||
<property name="map" value="wild2"/>
|
||||
<property name="place" value="north"/>
|
||||
</properties>
|
||||
</object>
|
||||
</objectgroup>
|
||||
<objectgroup name="Spawn">
|
||||
<object height="160" name="crossglen_wasp" type="spawn" width="192" x="736" y="160">
|
||||
<objectgroup name="Spawn" visible="0">
|
||||
<object id="8" name="crossglen_wasp" type="spawn" x="736" y="160" width="192" height="160">
|
||||
<properties>
|
||||
<property name="quantity" value="3"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object height="128" name="trainingrat" type="spawn" width="192" x="352" y="96">
|
||||
<object id="9" name="trainingrat" type="spawn" x="352" y="96" width="192" height="128">
|
||||
<properties>
|
||||
<property name="quantity" value="2"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object height="128" name="crossglen_farmer1" type="spawn" width="256" x="192" y="320"/>
|
||||
<object height="192" name="crossglen_farmer2" type="spawn" width="96" x="64" y="416"/>
|
||||
<object height="224" name="crossglen_beetle" type="spawn" width="384" x="32" y="320"/>
|
||||
<object height="96" name="crossglen_ant" type="spawn" width="384" x="512" y="832">
|
||||
<object id="10" name="crossglen_farmer1" type="spawn" x="192" y="320" width="256" height="128"/>
|
||||
<object id="11" name="crossglen_farmer2" type="spawn" x="64" y="416" width="96" height="192"/>
|
||||
<object id="12" name="crossglen_beetle" type="spawn" x="32" y="320" width="384" height="224"/>
|
||||
<object id="13" name="crossglen_ant" type="spawn" x="512" y="832" width="384" height="96">
|
||||
<properties>
|
||||
<property name="quantity" value="3"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object height="32" name="odair" type="spawn" width="32" x="896" y="32"/>
|
||||
<object height="32" name="oromir" type="spawn" width="32" x="896" y="864"/>
|
||||
<object height="32" name="halvor" type="spawn" width="32" x="736" y="608"/>
|
||||
<object id="14" name="odair" type="spawn" x="896" y="32" width="32" height="32"/>
|
||||
<object id="15" name="oromir" type="spawn" x="896" y="864" width="32" height="32"/>
|
||||
<object id="16" name="halvor" type="spawn" x="736" y="608" width="32" height="32"/>
|
||||
</objectgroup>
|
||||
<objectgroup name="Keys"/>
|
||||
</map>
|
||||
</map>
|
||||
|
||||
@@ -223,8 +223,10 @@ public final class ConversationActivity
|
||||
} else {
|
||||
conversation.nameColor = oldNPCNameColor;
|
||||
}
|
||||
}else{
|
||||
} else if (conversation.isReward) {
|
||||
conversation.textColor = oldRewardColor;
|
||||
} else {
|
||||
conversation.textColor = oldPhraseColor;
|
||||
}
|
||||
numberOfNewMessage--;
|
||||
}
|
||||
@@ -240,12 +242,12 @@ public final class ConversationActivity
|
||||
} else {
|
||||
if (rb == null) return;
|
||||
Reply r = (Reply) rb.getTag();
|
||||
addConversationStatement(player, rb.getText().toString(), playerPhraseColor);
|
||||
addConversationStatement(player, rb.getText().toString(), playerPhraseColor, false);
|
||||
conversationState.playerSelectedReply(getResources(), r);
|
||||
}
|
||||
}
|
||||
|
||||
private void addConversationStatement(Actor actor, String text, int textColor) {
|
||||
private void addConversationStatement(Actor actor, String text, int textColor, boolean isReward) {
|
||||
ConversationStatement s = new ConversationStatement();
|
||||
if (actor != null) {
|
||||
s.iconID = actor.iconID;
|
||||
@@ -257,6 +259,7 @@ public final class ConversationActivity
|
||||
s.nameColor = actor == player ? playerNameColor : NPCNameColor;
|
||||
s.textColor = textColor;
|
||||
s.isPlayerActor = actor != null && actor == player;
|
||||
s.isReward = isReward;
|
||||
conversationHistory.add(s);
|
||||
numberOfNewMessage++;
|
||||
statementList.clearFocus();
|
||||
@@ -280,6 +283,7 @@ public final class ConversationActivity
|
||||
public int nameColor;
|
||||
public int textColor;
|
||||
public boolean isPlayerActor;
|
||||
public boolean isReward;
|
||||
|
||||
public boolean hasActor() {
|
||||
return iconID != NO_ICON;
|
||||
@@ -296,6 +300,7 @@ public final class ConversationActivity
|
||||
dest.writeInt(nameColor);
|
||||
dest.writeInt(textColor);
|
||||
dest.writeByte((byte) (isPlayerActor ? 1 : 0));
|
||||
dest.writeByte((byte) (isReward ? 1 : 0));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@@ -309,6 +314,7 @@ public final class ConversationActivity
|
||||
result.nameColor = in.readInt();
|
||||
result.textColor = in.readInt();
|
||||
result.isPlayerActor = in.readByte() == 1;
|
||||
result.isReward = in.readByte() == 1;
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -375,7 +381,7 @@ public final class ConversationActivity
|
||||
|
||||
@Override
|
||||
public void onTextPhraseReached(String message, Actor actor, String phraseID) {
|
||||
addConversationStatement(actor, message, NPCPhraseColor);
|
||||
addConversationStatement(actor, message, NPCPhraseColor, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -411,7 +417,7 @@ public final class ConversationActivity
|
||||
}
|
||||
|
||||
private void addRewardMessage(String text) {
|
||||
addConversationStatement(null, text, rewardColor);
|
||||
addConversationStatement(null, text, rewardColor, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,18 +7,23 @@ import android.view.View.OnClickListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
|
||||
import com.gpl.rpg.AndorsTrail.R;
|
||||
import com.gpl.rpg.AndorsTrail.context.ControllerContext;
|
||||
import com.gpl.rpg.AndorsTrail.context.WorldContext;
|
||||
import com.gpl.rpg.AndorsTrail.controller.Constants;
|
||||
import com.gpl.rpg.AndorsTrail.model.item.ItemType;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.PredefinedMap;
|
||||
import com.gpl.rpg.AndorsTrail.view.MainView;
|
||||
|
||||
public final class DebugInterface {
|
||||
private final ControllerContext controllerContext;
|
||||
private final MainActivity mainActivity;
|
||||
private final Resources res;
|
||||
private final WorldContext world;
|
||||
|
||||
private DebugButton[] buttons;
|
||||
|
||||
public DebugInterface(ControllerContext controllers, WorldContext world, MainActivity mainActivity) {
|
||||
this.controllerContext = controllers;
|
||||
@@ -30,8 +35,18 @@ public final class DebugInterface {
|
||||
public void addDebugButtons() {
|
||||
if (!AndorsTrailApplication.DEVELOPMENT_DEBUGBUTTONS) return;
|
||||
|
||||
addDebugButtons(new DebugButton[] {
|
||||
new DebugButton("dmg", new OnClickListener() {
|
||||
buttons = new DebugButton[] {
|
||||
new DebugButton("dbg", new OnClickListener() {
|
||||
boolean hidden = false;
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
hidden = !hidden;
|
||||
for (int i = 1; i < buttons.length; i++) {
|
||||
buttons[i].b.setVisibility(hidden ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
}
|
||||
})
|
||||
,new DebugButton("dmg", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
world.model.player.damagePotential.set(500, 500);
|
||||
@@ -47,7 +62,7 @@ public final class DebugInterface {
|
||||
showToast(mainActivity, "DEBUG: damagePotential=1", Toast.LENGTH_SHORT);
|
||||
}
|
||||
})*/
|
||||
,new DebugButton("items", new OnClickListener() {
|
||||
,new DebugButton("itm", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
for (ItemType item : world.itemTypes.UNITTEST_getAllItemTypes().values()) {
|
||||
@@ -57,20 +72,14 @@ public final class DebugInterface {
|
||||
showToast(mainActivity, "DEBUG: added items", Toast.LENGTH_SHORT);
|
||||
}
|
||||
})
|
||||
/*,new DebugButton("prim", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "blackwater_mountain29", "south", 0, 0);
|
||||
}
|
||||
})*/
|
||||
/*,new DebugButton("exp+=10000", new OnClickListener() {
|
||||
,new DebugButton("xp", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.actorStatsController.addExperience(10000);
|
||||
showToast(mainActivity, "DEBUG: given 10000 exp", Toast.LENGTH_SHORT);
|
||||
}
|
||||
})*/
|
||||
,new DebugButton("reset", new OnClickListener() {
|
||||
})
|
||||
,new DebugButton("rst", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
for(PredefinedMap map : world.maps.getAllMaps()) {
|
||||
@@ -89,13 +98,27 @@ public final class DebugInterface {
|
||||
showToast(mainActivity, "DEBUG: hp set to max", Toast.LENGTH_SHORT);
|
||||
}
|
||||
})
|
||||
,new DebugButton("skill", new OnClickListener() {
|
||||
,new DebugButton("skl", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
world.model.player.availableSkillIncreases += 10;
|
||||
showToast(mainActivity, "DEBUG: 10 skill points", Toast.LENGTH_SHORT);
|
||||
}
|
||||
})
|
||||
,new DebugButton("spd", new OnClickListener() {
|
||||
boolean fast = Constants.MINIMUM_INPUT_INTERVAL == Constants.MINIMUM_INPUT_INTERVAL_FAST;
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
fast = !fast;
|
||||
if (fast) {
|
||||
Constants.MINIMUM_INPUT_INTERVAL = Constants.MINIMUM_INPUT_INTERVAL_FAST;
|
||||
} else {
|
||||
Constants.MINIMUM_INPUT_INTERVAL = Constants.MINIMUM_INPUT_INTERVAL_STD;
|
||||
}
|
||||
MainView.SCROLL_DURATION = Constants.MINIMUM_INPUT_INTERVAL;
|
||||
AndorsTrailApplication.getApplicationFromActivity(mainActivity).getControllerContext().movementController.resetMovementHandler();
|
||||
}
|
||||
})
|
||||
/*
|
||||
,new DebugButton("cg", new OnClickListener() {
|
||||
@Override
|
||||
@@ -127,6 +150,12 @@ public final class DebugInterface {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "fallhaven_ne", "clothes", 0, 0);
|
||||
}
|
||||
})
|
||||
,new DebugButton("prim", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "blackwater_mountain29", "south", 0, 0);
|
||||
}
|
||||
})
|
||||
,new DebugButton("rc", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
@@ -134,7 +163,8 @@ public final class DebugInterface {
|
||||
}
|
||||
})
|
||||
*/
|
||||
});
|
||||
};
|
||||
addDebugButtons(buttons);
|
||||
}
|
||||
|
||||
private void showToast(Context context, String msg, int duration) {
|
||||
@@ -144,10 +174,18 @@ public final class DebugInterface {
|
||||
private static class DebugButton {
|
||||
public final String text;
|
||||
public final OnClickListener listener;
|
||||
public Button b = null;
|
||||
public DebugButton(String text, OnClickListener listener) {
|
||||
this.text = text;
|
||||
this.listener = listener;
|
||||
}
|
||||
public void makeButton(Context c, int id) {
|
||||
b = new Button(c);
|
||||
b.setText(text);
|
||||
b.setTextSize(10);//res.getDimension(R.dimen.actionbar_text));
|
||||
b.setId(id);
|
||||
b.setOnClickListener(listener);
|
||||
}
|
||||
}
|
||||
|
||||
private void addDebugButton(DebugButton button, int id, RelativeLayout layout) {
|
||||
@@ -159,13 +197,9 @@ public final class DebugInterface {
|
||||
else
|
||||
lp.addRule(RelativeLayout.RIGHT_OF, id - 1);
|
||||
lp.addRule(RelativeLayout.ABOVE, R.id.main_statusview);
|
||||
Button b = new Button(mainActivity);
|
||||
b.setText(button.text);
|
||||
b.setTextSize(10);//res.getDimension(R.dimen.actionbar_text));
|
||||
b.setId(id);
|
||||
b.setLayoutParams(lp);
|
||||
b.setOnClickListener(button.listener);
|
||||
layout.addView(b);
|
||||
button.makeButton(mainActivity, id);
|
||||
button.b.setLayoutParams(lp);
|
||||
layout.addView(button.b);
|
||||
}
|
||||
|
||||
private void addDebugButtons(DebugButton[] buttons) {
|
||||
|
||||
@@ -19,7 +19,10 @@ public final class Constants {
|
||||
public static final int EXP_FACTOR_DAMAGERESISTANCE = 9;
|
||||
public static final float EXP_FACTOR_SCALING = 0.7f;
|
||||
public static final int FLEE_FAIL_CHANCE_PERCENT = 20;
|
||||
public static final long MINIMUM_INPUT_INTERVAL = AndorsTrailApplication.DEVELOPMENT_FASTSPEED ? 50 : 200;
|
||||
public static final long MINIMUM_INPUT_INTERVAL_FAST = 50;
|
||||
public static final long MINIMUM_INPUT_INTERVAL_STD = 200;
|
||||
//TODO restore final modifier before release
|
||||
public static long MINIMUM_INPUT_INTERVAL = AndorsTrailApplication.DEVELOPMENT_FASTSPEED ? MINIMUM_INPUT_INTERVAL_FAST : MINIMUM_INPUT_INTERVAL_STD;
|
||||
public static final int MAX_MAP_WIDTH = 33;
|
||||
public static final int MAX_MAP_HEIGHT = 33;
|
||||
|
||||
@@ -31,6 +34,7 @@ public final class Constants {
|
||||
public static final int TICKS_PER_ROUND = ROUND_DURATION / TICK_DELAY;
|
||||
public static final int TICKS_PER_FULLROUND = FULLROUND_DURATION / TICK_DELAY;
|
||||
public static final int SPLATTER_DURATION_MS = 20000;
|
||||
public static final int STATUS_TEXT_AUTOHIDE_DELAY = ROUND_DURATION;
|
||||
|
||||
public static final ConstRange monsterWaitTurns = new ConstRange(5,1);
|
||||
public static final long MAP_UNVISITED_RESPAWN_DURATION_MS = 3 * 60 * 1000; // 3 min in milliseconds
|
||||
|
||||
@@ -205,7 +205,10 @@ public final class MapController {
|
||||
hasUpdated = true;
|
||||
}
|
||||
}
|
||||
map.lastSeenLayoutHash = tileMap.getCurrentLayoutHash();
|
||||
if (map.lastSeenLayoutHash != tileMap.getCurrentLayoutHash()) {
|
||||
map.lastSeenLayoutHash = tileMap.getCurrentLayoutHash();
|
||||
hasUpdated = true;
|
||||
}
|
||||
return hasUpdated;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,21 +52,23 @@ public final class MonsterMovementController implements EvaluateWalkable {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean monsterCanMoveTo(final Monster movingMonster, final PredefinedMap map, final LayeredTileMap tilemap, final CoordRect p) {
|
||||
public static boolean monsterCanMoveTo(final Monster movingMonster, final PredefinedMap map, final LayeredTileMap tilemap, final CoordRect p, boolean ignoreAreas) {
|
||||
if (tilemap != null) {
|
||||
if (!tilemap.isWalkable(p)) return false;
|
||||
}
|
||||
if (map.getMonsterAt(p, movingMonster) != null) return false;
|
||||
|
||||
for (MapObject mObj : map.eventObjects) {
|
||||
if (mObj == null) continue;
|
||||
if (!mObj.isActive) continue;
|
||||
if (!mObj.position.intersects(p)) continue;
|
||||
switch (mObj.type) {
|
||||
if (!ignoreAreas) {
|
||||
for (MapObject mObj : map.eventObjects) {
|
||||
if (mObj == null) continue;
|
||||
if (!mObj.isActive) continue;
|
||||
if (!mObj.position.intersects(p)) continue;
|
||||
switch (mObj.type) {
|
||||
case newmap:
|
||||
case keyarea:
|
||||
case rest:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -82,7 +84,7 @@ public final class MonsterMovementController implements EvaluateWalkable {
|
||||
} else {
|
||||
determineMonsterNextPosition(m, area, world.model.player.position);
|
||||
|
||||
if (!monsterCanMoveTo(m, map, tileMap, m.nextPosition)) {
|
||||
if (!monsterCanMoveTo(m, map, tileMap, m.nextPosition, area.ignoreAreas)) {
|
||||
cancelCurrentMonsterMovement(m);
|
||||
return;
|
||||
}
|
||||
@@ -152,12 +154,12 @@ public final class MonsterMovementController implements EvaluateWalkable {
|
||||
|
||||
private final PathFinder pathfinder = new PathFinder(Constants.MAX_MAP_WIDTH, Constants.MAX_MAP_HEIGHT, this);
|
||||
public boolean findPathFor(Monster m, Coord to) {
|
||||
return pathfinder.findPathBetween(m.rectPosition, to, m.nextPosition);
|
||||
return pathfinder.findPathBetween(m.rectPosition, to, m.nextPosition, m);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWalkable(CoordRect r) {
|
||||
return monsterCanMoveTo(null, world.model.currentMap, world.model.currentTileMap, r);
|
||||
public boolean isWalkable(CoordRect r, Monster m) {
|
||||
return monsterCanMoveTo(null, world.model.currentMap, world.model.currentTileMap, r, m.area.ignoreAreas);
|
||||
}
|
||||
|
||||
public void moveMonsterToNextPosition(final Monster m, final PredefinedMap map) {
|
||||
|
||||
@@ -51,20 +51,20 @@ public final class MonsterSpawningController {
|
||||
}
|
||||
public boolean TEST_spawnInArea(PredefinedMap map, LayeredTileMap tileMap, MonsterSpawnArea a, MonsterType type) { return spawnInArea(map, tileMap, a, type, null); }
|
||||
private boolean spawnInArea(PredefinedMap map, LayeredTileMap tileMap, MonsterSpawnArea a, MonsterType type, Coord playerPosition) {
|
||||
Coord p = getRandomFreePosition(map, tileMap, a.area, type.tileSize, playerPosition);
|
||||
Coord p = getRandomFreePosition(map, tileMap, a, type.tileSize, playerPosition);
|
||||
if (p == null) return false;
|
||||
Monster m = a.spawn(p, type);
|
||||
monsterSpawnListeners.onMonsterSpawned(map, m);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static Coord getRandomFreePosition(PredefinedMap map, LayeredTileMap tileMap, CoordRect area, Size requiredSize, Coord playerPosition) {
|
||||
public static Coord getRandomFreePosition(PredefinedMap map, LayeredTileMap tileMap, MonsterSpawnArea a, Size requiredSize, Coord playerPosition) {
|
||||
CoordRect p = new CoordRect(requiredSize);
|
||||
for(int i = 0; i < 100; ++i) {
|
||||
p.topLeft.set(
|
||||
area.topLeft.x + Constants.rnd.nextInt(area.size.width)
|
||||
,area.topLeft.y + Constants.rnd.nextInt(area.size.height));
|
||||
if (!MonsterMovementController.monsterCanMoveTo(null, map, tileMap, p)) continue;
|
||||
a.area.topLeft.x + Constants.rnd.nextInt(a.area.size.width)
|
||||
,a.area.topLeft.y + Constants.rnd.nextInt(a.area.size.height));
|
||||
if (!MonsterMovementController.monsterCanMoveTo(null, map, tileMap, p, a.ignoreAreas)) continue;
|
||||
if (playerPosition != null && p.contains(playerPosition)) continue;
|
||||
return p.topLeft;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,11 @@ import com.gpl.rpg.AndorsTrail.model.ModelContainer;
|
||||
import com.gpl.rpg.AndorsTrail.model.actor.Monster;
|
||||
import com.gpl.rpg.AndorsTrail.model.actor.Player;
|
||||
import com.gpl.rpg.AndorsTrail.model.item.Loot;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.*;
|
||||
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.map.TMXMapTranslator;
|
||||
import com.gpl.rpg.AndorsTrail.resource.tiles.TileCollection;
|
||||
import com.gpl.rpg.AndorsTrail.util.Coord;
|
||||
import com.gpl.rpg.AndorsTrail.util.L;
|
||||
@@ -19,7 +23,8 @@ import com.gpl.rpg.AndorsTrail.util.TimedMessageTask;
|
||||
public final class MovementController implements TimedMessageTask.Callback {
|
||||
private final ControllerContext controllers;
|
||||
private final WorldContext world;
|
||||
private final TimedMessageTask movementHandler;
|
||||
//TODO restore final modifier before release
|
||||
private TimedMessageTask movementHandler;
|
||||
public final PlayerMovementListeners playerMovementListeners = new PlayerMovementListeners();
|
||||
|
||||
public MovementController(ControllerContext controllers, WorldContext world) {
|
||||
@@ -27,6 +32,12 @@ public final class MovementController implements TimedMessageTask.Callback {
|
||||
this.world = world;
|
||||
this.movementHandler = new TimedMessageTask(this, Constants.MINIMUM_INPUT_INTERVAL, false);
|
||||
}
|
||||
|
||||
//TODO remove this method before release
|
||||
public void resetMovementHandler() {
|
||||
this.movementHandler.stop();
|
||||
this.movementHandler = new TimedMessageTask(this, Constants.MINIMUM_INPUT_INTERVAL, false);
|
||||
}
|
||||
|
||||
public void placePlayerAsyncAt(final MapObject.MapObjectType objectType, final String mapName, final String placeName, final int offset_x, final int offset_y) {
|
||||
|
||||
@@ -272,7 +283,7 @@ public final class MovementController implements TimedMessageTask.Callback {
|
||||
for (MonsterSpawnArea a : map.spawnAreas) {
|
||||
for (Monster m : a.monsters) {
|
||||
if (tileMap.isWalkable(m.rectPosition)) continue;
|
||||
Coord p = MonsterSpawningController.getRandomFreePosition(map, tileMap, a.area, m.tileSize, playerPosition);
|
||||
Coord p = MonsterSpawningController.getRandomFreePosition(map, tileMap, a, m.tileSize, playerPosition);
|
||||
if (p == null) continue;
|
||||
m.position.set(p);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.gpl.rpg.AndorsTrail.controller;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.model.actor.Monster;
|
||||
import com.gpl.rpg.AndorsTrail.util.Coord;
|
||||
import com.gpl.rpg.AndorsTrail.util.CoordRect;
|
||||
|
||||
@@ -21,10 +22,10 @@ public class PathFinder {
|
||||
}
|
||||
|
||||
public interface EvaluateWalkable {
|
||||
public boolean isWalkable(CoordRect r);
|
||||
public boolean isWalkable(CoordRect r, Monster m);
|
||||
}
|
||||
|
||||
public boolean findPathBetween(final CoordRect from, final Coord to, CoordRect nextStep) {
|
||||
public boolean findPathBetween(final CoordRect from, final Coord to, CoordRect nextStep, Monster m) {
|
||||
int iterations = 0;
|
||||
if (from.contains(to)) return false;
|
||||
|
||||
@@ -44,19 +45,19 @@ public class PathFinder {
|
||||
|
||||
if (from.isAdjacentTo(p)) return true;
|
||||
|
||||
p.x -= 1; visit(nextStep, measureDistanceTo);
|
||||
p.x += 2; visit(nextStep, measureDistanceTo);
|
||||
p.x -= 1; p.y -= 1; visit(nextStep, measureDistanceTo);
|
||||
p.y += 2; visit(nextStep, measureDistanceTo);
|
||||
p.x -= 1; visit(nextStep, measureDistanceTo);
|
||||
p.x += 2; visit(nextStep, measureDistanceTo);
|
||||
p.y -= 2; visit(nextStep, measureDistanceTo);
|
||||
p.x -= 2; visit(nextStep, measureDistanceTo);
|
||||
p.x -= 1; visit(nextStep, measureDistanceTo, m);
|
||||
p.x += 2; visit(nextStep, measureDistanceTo, m);
|
||||
p.x -= 1; p.y -= 1; visit(nextStep, measureDistanceTo, m);
|
||||
p.y += 2; visit(nextStep, measureDistanceTo, m);
|
||||
p.x -= 1; visit(nextStep, measureDistanceTo, m);
|
||||
p.x += 2; visit(nextStep, measureDistanceTo, m);
|
||||
p.y -= 2; visit(nextStep, measureDistanceTo, m);
|
||||
p.x -= 2; visit(nextStep, measureDistanceTo, m);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void visit(CoordRect r, Coord measureDistanceTo) {
|
||||
private void visit(CoordRect r, Coord measureDistanceTo, Monster m) {
|
||||
final int x = r.topLeft.x;
|
||||
final int y = r.topLeft.y;
|
||||
|
||||
@@ -68,7 +69,7 @@ public class PathFinder {
|
||||
final int i = (y * maxWidth) + x;
|
||||
if (visited[i]) return;
|
||||
visited[i] = true;
|
||||
if (!map.isWalkable(r)) return;
|
||||
if (!map.isWalkable(r, m)) return;
|
||||
|
||||
int dx = (measureDistanceTo.x - x);
|
||||
int dy = (measureDistanceTo.y - y);
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.gpl.rpg.AndorsTrail.model.ability.SkillCollection;
|
||||
import com.gpl.rpg.AndorsTrail.model.item.DropList;
|
||||
import com.gpl.rpg.AndorsTrail.model.item.ItemContainer;
|
||||
import com.gpl.rpg.AndorsTrail.model.item.Loot;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.MonsterSpawnArea;
|
||||
import com.gpl.rpg.AndorsTrail.savegames.LegacySavegameFormatReaderForMonster;
|
||||
import com.gpl.rpg.AndorsTrail.util.Coord;
|
||||
import com.gpl.rpg.AndorsTrail.util.CoordRect;
|
||||
@@ -25,10 +26,12 @@ public final class Monster extends Actor {
|
||||
private ItemContainer shopItems = null;
|
||||
|
||||
private final MonsterType monsterType;
|
||||
public final MonsterSpawnArea area;
|
||||
|
||||
public Monster(MonsterType monsterType) {
|
||||
public Monster(MonsterType monsterType, MonsterSpawnArea area) {
|
||||
super(monsterType.tileSize, false, monsterType.isImmuneToCriticalHits());
|
||||
this.monsterType = monsterType;
|
||||
this.area = area;
|
||||
this.iconID = monsterType.iconID;
|
||||
this.nextPosition = new CoordRect(new Coord(), monsterType.tileSize);
|
||||
resetStatsToBaseTraits();
|
||||
@@ -95,20 +98,20 @@ public final class Monster extends Actor {
|
||||
|
||||
// ====== PARCELABLE ===================================================================
|
||||
|
||||
public static Monster newFromParcel(DataInputStream src, WorldContext world, int fileversion) throws IOException {
|
||||
public static Monster newFromParcel(DataInputStream src, WorldContext world, int fileversion, MonsterSpawnArea area) throws IOException {
|
||||
String monsterTypeId = src.readUTF();
|
||||
if (fileversion < 20) {
|
||||
monsterTypeId = monsterTypeId.replace(' ', '_').replace("\\'", "").toLowerCase();
|
||||
}
|
||||
MonsterType monsterType = world.monsterTypes.getMonsterType(monsterTypeId);
|
||||
|
||||
if (fileversion < 25) return LegacySavegameFormatReaderForMonster.newFromParcel_pre_v25(src, fileversion, monsterType);
|
||||
if (fileversion < 25) return LegacySavegameFormatReaderForMonster.newFromParcel_pre_v25(src, fileversion, monsterType, area);
|
||||
|
||||
return new Monster(src, world, fileversion, monsterType);
|
||||
return new Monster(src, world, fileversion, monsterType, area);
|
||||
}
|
||||
|
||||
private Monster(DataInputStream src, WorldContext world, int fileversion, MonsterType monsterType) throws IOException {
|
||||
this(monsterType);
|
||||
private Monster(DataInputStream src, WorldContext world, int fileversion, MonsterType monsterType, MonsterSpawnArea area) throws IOException {
|
||||
this(monsterType, area);
|
||||
|
||||
boolean readCombatTraits = true;
|
||||
if (fileversion >= 25) readCombatTraits = src.readBoolean();
|
||||
|
||||
@@ -7,6 +7,7 @@ public final class MapSection {
|
||||
public final MapLayer layerGround;
|
||||
public final MapLayer layerObjects;
|
||||
public final MapLayer layerAbove;
|
||||
public final MapLayer layerTop;
|
||||
public final boolean[][] isWalkable;
|
||||
private final byte[] layoutHash;
|
||||
|
||||
@@ -14,12 +15,14 @@ public final class MapSection {
|
||||
MapLayer layerGround
|
||||
, MapLayer layerObjects
|
||||
, MapLayer layerAbove
|
||||
, MapLayer layerTop
|
||||
, boolean[][] isWalkable
|
||||
, byte[] layoutHash
|
||||
) {
|
||||
this.layerGround = layerGround;
|
||||
this.layerObjects = layerObjects;
|
||||
this.layerAbove = layerAbove;
|
||||
this.layerTop = layerTop;
|
||||
this.isWalkable = isWalkable;
|
||||
this.layoutHash = layoutHash;
|
||||
}
|
||||
@@ -28,6 +31,7 @@ public final class MapSection {
|
||||
replaceTileLayerSection(layerGround, replaceLayersWith.layerGround, replacementArea);
|
||||
replaceTileLayerSection(layerObjects, replaceLayersWith.layerObjects, replacementArea);
|
||||
replaceTileLayerSection(layerAbove, replaceLayersWith.layerAbove, replacementArea);
|
||||
replaceTileLayerSection(layerTop, replaceLayersWith.layerTop, replacementArea);
|
||||
if (replaceLayersWith.isWalkable != null) {
|
||||
final int dy = replacementArea.topLeft.y;
|
||||
final int height = replacementArea.size.height;
|
||||
|
||||
@@ -21,6 +21,7 @@ public final class MonsterSpawnArea {
|
||||
public final String[] monsterTypeIDs;
|
||||
public final ArrayList<Monster> monsters = new ArrayList<Monster>();
|
||||
public final boolean isUnique; // unique == non-respawnable
|
||||
public final boolean ignoreAreas; //Can spawn on other game objects area.
|
||||
private final String group;
|
||||
public boolean isSpawning;
|
||||
public final boolean isSpawningForNewGame;
|
||||
@@ -32,6 +33,7 @@ public final class MonsterSpawnArea {
|
||||
, String areaID
|
||||
, String[] monsterTypeIDs
|
||||
, boolean isUnique
|
||||
, boolean ignoreAreas
|
||||
, String group
|
||||
, boolean isSpawningForNewGame
|
||||
) {
|
||||
@@ -41,6 +43,7 @@ public final class MonsterSpawnArea {
|
||||
this.areaID = areaID;
|
||||
this.monsterTypeIDs = monsterTypeIDs;
|
||||
this.isUnique = isUnique;
|
||||
this.ignoreAreas = ignoreAreas;
|
||||
this.group = group;
|
||||
this.isSpawningForNewGame = isSpawningForNewGame;
|
||||
this.isSpawning = isSpawningForNewGame;
|
||||
@@ -79,7 +82,7 @@ public final class MonsterSpawnArea {
|
||||
spawn(p, context.monsterTypes.getMonsterType(monsterTypeID));
|
||||
}
|
||||
public Monster spawn(Coord p, MonsterType type) {
|
||||
Monster m = new Monster(type);
|
||||
Monster m = new Monster(type, this);
|
||||
m.position.set(p);
|
||||
monsters.add(m);
|
||||
quantity.current++;
|
||||
@@ -125,7 +128,7 @@ public final class MonsterSpawnArea {
|
||||
if (fileversion >= 41) isSpawning = src.readBoolean();
|
||||
quantity.current = src.readInt();
|
||||
for(int i = 0; i < quantity.current; ++i) {
|
||||
monsters.add(Monster.newFromParcel(src, world, fileversion));
|
||||
monsters.add(Monster.newFromParcel(src, world, fileversion, this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,6 +92,7 @@ public final class TMXMapTranslator {
|
||||
mapObjects.add(MapObject.createMapChangeArea(position, object.name, map, place, group.name));
|
||||
} else if (object.type.equalsIgnoreCase("spawn")) {
|
||||
boolean isActiveForNewGame = true;
|
||||
boolean ignoreAreas = false;
|
||||
int maxQuantity = 1;
|
||||
int spawnChance = 10;
|
||||
String spawnGroup = object.name;
|
||||
@@ -108,6 +109,8 @@ public final class TMXMapTranslator {
|
||||
spawnChance = Integer.parseInt(p.value);
|
||||
} else if (p.name.equalsIgnoreCase("active")) {
|
||||
isActiveForNewGame = Boolean.parseBoolean(p.value);
|
||||
} else if (p.name.equalsIgnoreCase("ignoreAreas")) {
|
||||
ignoreAreas = Boolean.parseBoolean(p.value);
|
||||
} else if (p.name.equalsIgnoreCase("spawngroup")) {
|
||||
spawnGroup = p.value;
|
||||
} else if (AndorsTrailApplication.DEVELOPMENT_VALIDATEDATA) {
|
||||
@@ -135,6 +138,7 @@ public final class TMXMapTranslator {
|
||||
,object.name
|
||||
,monsterTypeIDs
|
||||
,isUnique
|
||||
,ignoreAreas
|
||||
,group.name
|
||||
,isActiveForNewGame
|
||||
);
|
||||
@@ -239,9 +243,10 @@ public final class TMXMapTranslator {
|
||||
private static final String LAYERNAME_GROUND = "ground";
|
||||
private static final String LAYERNAME_OBJECTS = "objects";
|
||||
private static final String LAYERNAME_ABOVE = "above";
|
||||
private static final String LAYERNAME_TOP = "top";
|
||||
private static final String LAYERNAME_WALKABLE = "walkable";
|
||||
private static final String PROPNAME_FILTER = "colorfilter";
|
||||
private static final SetOfLayerNames defaultLayerNames = new SetOfLayerNames(LAYERNAME_GROUND, LAYERNAME_OBJECTS, LAYERNAME_ABOVE, LAYERNAME_WALKABLE);
|
||||
private static final SetOfLayerNames defaultLayerNames = new SetOfLayerNames(LAYERNAME_GROUND, LAYERNAME_OBJECTS, LAYERNAME_ABOVE, LAYERNAME_TOP, LAYERNAME_WALKABLE);
|
||||
|
||||
private static LayeredTileMap transformMap(TMXLayerMap map, TileCache tileCache) {
|
||||
final Size mapSize = new Size(map.width, map.height);
|
||||
@@ -286,6 +291,7 @@ public final class TMXMapTranslator {
|
||||
if (prop.name.equalsIgnoreCase(LAYERNAME_GROUND)) layerNames.groundLayerName = prop.value;
|
||||
else if (prop.name.equalsIgnoreCase(LAYERNAME_OBJECTS)) layerNames.objectsLayerName = prop.value;
|
||||
else if (prop.name.equalsIgnoreCase(LAYERNAME_ABOVE)) layerNames.aboveLayersName = prop.value;
|
||||
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))
|
||||
@@ -327,9 +333,10 @@ public final class TMXMapTranslator {
|
||||
final MapLayer layerGround = transformMapLayer(layersPerLayerName, layerNames.groundLayerName, srcMap, tileCache, area, usedTileIDs);
|
||||
final MapLayer layerObjects = transformMapLayer(layersPerLayerName, layerNames.objectsLayerName, srcMap, tileCache, area, usedTileIDs);
|
||||
final MapLayer layerAbove = transformMapLayer(layersPerLayerName, layerNames.aboveLayersName, srcMap, tileCache, area, usedTileIDs);
|
||||
final MapLayer layerTop = transformMapLayer(layersPerLayerName, layerNames.topLayersName, srcMap, tileCache, area, usedTileIDs);
|
||||
boolean[][] isWalkable = transformWalkableMapLayer(findLayer(layersPerLayerName, layerNames.walkableLayersName, srcMap.name), area);
|
||||
byte[] layoutHash = calculateLayoutHash(srcMap, layersPerLayerName, layerNames);
|
||||
return new MapSection(layerGround, layerObjects, layerAbove, isWalkable, layoutHash);
|
||||
return new MapSection(layerGround, layerObjects, layerAbove, layerTop, isWalkable, layoutHash);
|
||||
}
|
||||
|
||||
private static TMXLayer findLayer(HashMap<String, TMXLayer> layersPerLayerName, String layerName, String mapName) {
|
||||
@@ -430,17 +437,20 @@ public final class TMXMapTranslator {
|
||||
public String groundLayerName;
|
||||
public String objectsLayerName;
|
||||
public String aboveLayersName;
|
||||
public String topLayersName;
|
||||
public String walkableLayersName;
|
||||
public SetOfLayerNames() {
|
||||
this.groundLayerName = null;
|
||||
this.objectsLayerName = null;
|
||||
this.aboveLayersName = null;
|
||||
this.topLayersName = null;
|
||||
this.walkableLayersName = null;
|
||||
}
|
||||
public SetOfLayerNames(String groundLayerName, String objectsLayerName, String aboveLayersName, String walkableLayersName) {
|
||||
public SetOfLayerNames(String groundLayerName, String objectsLayerName, String aboveLayersName, String topLayersName, String walkableLayersName) {
|
||||
this.groundLayerName = groundLayerName;
|
||||
this.objectsLayerName = objectsLayerName;
|
||||
this.aboveLayersName = aboveLayersName;
|
||||
this.topLayersName = topLayersName;
|
||||
this.walkableLayersName = walkableLayersName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,14 +2,15 @@ package com.gpl.rpg.AndorsTrail.savegames;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.model.actor.Monster;
|
||||
import com.gpl.rpg.AndorsTrail.model.actor.MonsterType;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.MonsterSpawnArea;
|
||||
import com.gpl.rpg.AndorsTrail.util.Coord;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
public final class LegacySavegameFormatReaderForMonster {
|
||||
public static Monster newFromParcel_pre_v25(DataInputStream src, int fileversion, MonsterType monsterType) throws IOException {
|
||||
Monster m = new Monster(monsterType);
|
||||
public static Monster newFromParcel_pre_v25(DataInputStream src, int fileversion, MonsterType monsterType, MonsterSpawnArea area) throws IOException {
|
||||
Monster m = new Monster(monsterType, area);
|
||||
m.position.set(new Coord(src, fileversion));
|
||||
m.ap.current = src.readInt();
|
||||
m.health.current = src.readInt();
|
||||
|
||||
@@ -101,7 +101,8 @@ public final class MainView extends SurfaceView
|
||||
private boolean scrolling = false;
|
||||
private Coord scrollVector;
|
||||
private long scrollStartTime;
|
||||
private final static long SCROLL_DURATION = Constants.MINIMUM_INPUT_INTERVAL;
|
||||
//TODO restore private final modifiers before release
|
||||
public static long SCROLL_DURATION = Constants.MINIMUM_INPUT_INTERVAL;
|
||||
|
||||
|
||||
public MainView(Context context, AttributeSet attr) {
|
||||
@@ -481,9 +482,8 @@ public final class MainView extends SurfaceView
|
||||
}
|
||||
|
||||
private void doDrawRect_Above(Canvas canvas, CoordRect area) {
|
||||
if (!tryDrawMapBitmap(canvas, area, aboveBitmap)) {
|
||||
tryDrawMapLayer(canvas, area, currentTileMap.currentLayout.layerAbove);
|
||||
}
|
||||
tryDrawMapLayer(canvas, area, currentTileMap.currentLayout.layerAbove);
|
||||
tryDrawMapLayer(canvas, area, currentTileMap.currentLayout.layerTop);
|
||||
|
||||
if (model.uiSelections.selectedPosition != null) {
|
||||
if (model.uiSelections.selectedMonster != null) {
|
||||
|
||||
Reference in New Issue
Block a user