diff --git a/AndorsTrail/.classpath b/AndorsTrail/.classpath
index 6c635c01d..6aed2ebfb 100644
--- a/AndorsTrail/.classpath
+++ b/AndorsTrail/.classpath
@@ -3,5 +3,6 @@
+
diff --git a/AndorsTrail/lint.xml b/AndorsTrail/lint.xml
index 8a7b1fac8..c9b98be42 100644
--- a/AndorsTrail/lint.xml
+++ b/AndorsTrail/lint.xml
@@ -1,4 +1,8 @@
-
+
+
+
+
+
\ No newline at end of file
diff --git a/AndorsTrail/res/drawable/effect_blood4.png b/AndorsTrail/res/drawable/effect_blood4.png
new file mode 100644
index 000000000..c20903958
Binary files /dev/null and b/AndorsTrail/res/drawable/effect_blood4.png differ
diff --git a/AndorsTrail/res/layout/actorconditioninfo.xml b/AndorsTrail/res/layout/actorconditioninfo.xml
index 4db03771b..e32c6b6fd 100644
--- a/AndorsTrail/res/layout/actorconditioninfo.xml
+++ b/AndorsTrail/res/layout/actorconditioninfo.xml
@@ -18,28 +18,14 @@
android:orientation="vertical"
android:padding="@dimen/dialog_margin"
>
-
-
-
-
+ android:text="@string/actorinfo_currentconditions"
+ style="@style/titleWithIcon"
+ android:drawableLeft="@drawable/equip_weapon"
+ />
-
-
-
-
+ android:text="@string/inventory_info"
+ style="@style/titleWithIcon"
+ android:drawableLeft="@drawable/equip_weapon"
+ />
@@ -75,6 +75,7 @@
android:layout_width="wrap_content"
android:layout_height="@dimen/smalltext_buttonheight"
android:layout_marginRight="5sp"
+ android:contentDescription="@string/dialog_monsterencounter_info"
/>
-
-
-
-
+ />
diff --git a/AndorsTrail/res/layout/heroinfo_skill_list.xml b/AndorsTrail/res/layout/heroinfo_skill_list.xml
index 2cf297655..0a6a08cbc 100644
--- a/AndorsTrail/res/layout/heroinfo_skill_list.xml
+++ b/AndorsTrail/res/layout/heroinfo_skill_list.xml
@@ -7,7 +7,7 @@
-
+
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+ android:text="@string/heroinfo_levelup" />
+
-
+
\ No newline at end of file
diff --git a/AndorsTrail/res/layout/heroinfo_statsicons.xml b/AndorsTrail/res/layout/heroinfo_statsicons.xml
index 5fa5f8b23..4279ae365 100644
--- a/AndorsTrail/res/layout/heroinfo_statsicons.xml
+++ b/AndorsTrail/res/layout/heroinfo_statsicons.xml
@@ -1,83 +1,35 @@
-
+
-
-
-
-
+
-
-
-
-
+
+
+
-
-
-
-
-
\ No newline at end of file
diff --git a/AndorsTrail/res/layout/iteminfo.xml b/AndorsTrail/res/layout/iteminfo.xml
index fb50ef935..cf5ff3982 100644
--- a/AndorsTrail/res/layout/iteminfo.xml
+++ b/AndorsTrail/res/layout/iteminfo.xml
@@ -17,28 +17,14 @@
android:orientation="vertical"
android:padding="@dimen/dialog_margin"
>
-
-
-
-
+ android:text="@string/inventory_info"
+ style="@style/titleWithIcon"
+ android:drawableLeft="@drawable/equip_weapon"
+ />
-
-
-
-
-
+ android:id="@+id/levelup_title"
+ android:text="@string/levelup_title"
+ style="@style/titleWithIcon"
+ android:drawableLeft="@drawable/char_hero"
+ />
+
-
-
-
-
-
+ android:text="@string/levelup_adds_new_skillpoint"
+ style="@style/textWithIcon"
+ android:drawableLeft="@drawable/ui_icon_skill"
+ />
diff --git a/AndorsTrail/res/layout/loadsave.xml b/AndorsTrail/res/layout/loadsave.xml
index e5bda8977..4477a3f7a 100644
--- a/AndorsTrail/res/layout/loadsave.xml
+++ b/AndorsTrail/res/layout/loadsave.xml
@@ -1,49 +1,30 @@
-
-
-
-
-
+ android:text="@string/loadsave_title_save"
+ style="@style/titleWithIcon"
+ />
-
+
diff --git a/AndorsTrail/res/layout/monsterencounter.xml b/AndorsTrail/res/layout/monsterencounter.xml
index 338ad7eb5..22430ded0 100644
--- a/AndorsTrail/res/layout/monsterencounter.xml
+++ b/AndorsTrail/res/layout/monsterencounter.xml
@@ -11,33 +11,21 @@
android:orientation="vertical"
android:padding="@dimen/dialog_margin"
>
-
-
-
-
+ android:text="@string/dialog_monsterencounter_title"
+ style="@style/titleWithIcon"
+ android:drawableLeft="@drawable/equip_weapon"
+ />
diff --git a/AndorsTrail/res/layout/monsterinfo.xml b/AndorsTrail/res/layout/monsterinfo.xml
index 5d02a4eb0..ef76a987c 100644
--- a/AndorsTrail/res/layout/monsterinfo.xml
+++ b/AndorsTrail/res/layout/monsterinfo.xml
@@ -17,39 +17,35 @@
android:orientation="vertical"
android:padding="@dimen/dialog_margin"
>
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
diff --git a/AndorsTrail/res/layout/rangebar.xml b/AndorsTrail/res/layout/rangebar.xml
index f29571c25..6bcbe58b2 100644
--- a/AndorsTrail/res/layout/rangebar.xml
+++ b/AndorsTrail/res/layout/rangebar.xml
@@ -9,7 +9,6 @@
android:layout_width="30sp"
android:layout_height="wrap_content"
android:textSize="@dimen/statusbar_text"
- android:text="Desc:"
android:layout_marginRight="3sp"
android:shadowDx="1"
android:shadowDy="1"
@@ -33,7 +32,6 @@
android:paddingLeft="35sp"
android:textSize="@dimen/statusbar_text"
android:layout_centerInParent="true"
- android:text="value"
android:textColor="#FFF"
android:shadowDx="1"
android:shadowDy="1"
diff --git a/AndorsTrail/res/layout/shop.xml b/AndorsTrail/res/layout/shop.xml
index 8ed0f10ed..d71db63f3 100644
--- a/AndorsTrail/res/layout/shop.xml
+++ b/AndorsTrail/res/layout/shop.xml
@@ -30,27 +30,15 @@
android:id="@+id/shop_tab1"
>
-
-
-
-
-
-
-
+ android:id="@+id/shop_buy_gc"
+ android:drawableLeft="@drawable/ui_icon_coins"
+ android:drawablePadding="@dimen/boxshape_margin"
+ android:layout_gravity="right"
+ android:gravity="center_vertical"
+ />
-
-
-
-
-
-
-
+ android:id="@+id/shop_sell_gc"
+ android:drawableLeft="@drawable/ui_icon_coins"
+ android:drawablePadding="@dimen/boxshape_margin"
+ android:layout_gravity="right"
+ android:gravity="center_vertical"
+ />
-
-
-
-
+ android:text="@string/heroinfo_skill"
+ style="@style/titleWithIcon"
+ android:drawableLeft="@drawable/ui_icon_skill"
+ />
@@ -30,7 +30,7 @@
android:layout_height="wrap_content"
android:layout_toRightOf="@id/skillentry_icon"
android:layout_below="@id/skillentry_title"
- android:text="Description"
+ android:text="@string/skill_shortdescription_weapon_chance"
/>
diff --git a/AndorsTrail/res/values-fr/content_conversationlist.xml b/AndorsTrail/res/values-fr/content_conversationlist.xml
index a247907c5..d9d5fcd48 100644
--- a/AndorsTrail/res/values-fr/content_conversationlist.xml
+++ b/AndorsTrail/res/values-fr/content_conversationlist.xml
@@ -3,7 +3,9 @@
[id|message|rewards[rewardType|rewardID|value|]|replies[text|nextPhraseID|requires_Progress|requires_itemID|requires_Quantity|requires_Type|]|];
-{mikhail_start_select|||{{|mikhail_visited|andor:1||||}{|mikhail_gamestart|||||}}|};
+{mikhail_start_select|||{{|mikhail_start_select2|mikhail_bread:100||||}{|mikhail_bread_continue|mikhail_bread:10||||}{|mikhail_start_select2|||||}}|};
+{mikhail_start_select2|||{{|mikhail_start_select_default|mikhail_rats:100||||}{|mikhail_rats_continue|mikhail_rats:10||||}{|mikhail_start_select_default|||||}}|};
+{mikhail_start_select_default|||{{|mikhail_visited|andor:1||||}{|mikhail_gamestart|||||}}|};
{mikhail_gamestart|Ah, parfait, tu es réveillé.||{{N|mikhail_visited|||||}}|};
{mikhail_visited|Je ne trouve nulle part ton frère Andor. Il n\'est pas rentré depuis son départ d\'hier.|{{0|andor|1|}}|{{N|mikhail3|||||}}|};
{mikhail3|Cela n\'est pas grave, il sera probablement bientôt de retour.||{{N|mikhail_default|||||}}|};
@@ -20,7 +22,7 @@
{mikhail_rats_start|J\'ai vu quelques rats dans le jardin tout à l\'heure. Pourrais-tu nous débarasser de tous ceux que tu trouves ?|{{0|mikhail_rats|10|}}|{{Je me suis déjà occupé des rats.|mikhail_rats_complete||tail_trainingrat|2|0|}{D\'accord, je vais aller voir au jardin.|mikhail_rats_start2|||||}}|};
{mikhail_rats_start2|Si les rats te blessent, reviens ici et repose toi dans le lit. Tu pourras ainsi recouvrer toutes tes forces.||{{N|mikhail_rats_start3|||||}}|};
{mikhail_rats_start3|Au fait n\'oublie pas de faire l\'inventaire de ton équipement. Tu as probablement toujours le vieil anneau que je t\'avais donné. N\'oublie pas de le porter.||{{Très bien, je comprends. Je peux me reposer ici si je suis blessé, et je dois vérifier mon inventaire pour tous les objets utiles que je peux avoir.|mikhail_default|||||}}|};
-{mikhail_rats_continue|As-tu tué les deux rats du jardin ?||{{Oui, je m\'en suis occupé.|mikhail_rats_complete||tail_trainingrat|2|0|}{Non, pas encore.|mikhail_default|||||}}|};
+{mikhail_rats_continue|As-tu tué les deux rats du jardin ?||{{Oui, je m\'en suis occupé.|mikhail_rats_complete||tail_trainingrat|2|0|}{Non, pas encore.|mikhail_rats_start2|||||}}|};
{mikhail_rats_complete|Ah tu l\'as fait ? Bravo, merci pour ton aide !\n\nSi tu es blessé, reviens à ton lit ici pour te reposer et reprendre des forces.|{{0|mikhail_rats|100|}}|{{N|mikhail_default|||||}}|};
{mikhail_rats_complete2|Merci de m\'avoir débarassé des rats tout à l\'heure.\n\nSi tu es blessé, reviens à ton lit ici pour te reposer et reprendre des forces.||{{N|mikhail_default|||||}}|};
diff --git a/AndorsTrail/res/values-it/content_conversationlist.xml b/AndorsTrail/res/values-it/content_conversationlist.xml
index 66aa7c97d..9868fe301 100644
--- a/AndorsTrail/res/values-it/content_conversationlist.xml
+++ b/AndorsTrail/res/values-it/content_conversationlist.xml
@@ -3,7 +3,9 @@
[id|message|rewards[rewardType|rewardID|value|]|replies[text|nextPhraseID|requires_Progress|requires_itemID|requires_Quantity|requires_Type|]|];
-{mikhail_start_select|||{{|mikhail_visited|andor:1||||}{|mikhail_gamestart|||||}}|};
+{mikhail_start_select|||{{|mikhail_start_select2|mikhail_bread:100||||}{|mikhail_bread_continue|mikhail_bread:10||||}{|mikhail_start_select2|||||}}|};
+{mikhail_start_select2|||{{|mikhail_start_select_default|mikhail_rats:100||||}{|mikhail_rats_continue|mikhail_rats:10||||}{|mikhail_start_select_default|||||}}|};
+{mikhail_start_select_default|||{{|mikhail_visited|andor:1||||}{|mikhail_gamestart|||||}}|};
{mikhail_gamestart|Oh, bene, Siete sveglio.||{{N|mikhail_visited|||||}}|};
{mikhail_visited|Non riesco a trovare tuo fratello da nessuna parte. Da quando ieri è uscito non è più tornato.|{{0|andor|1|}}|{{N|mikhail3|||||}}|};
{mikhail3|Non preoccuparti, sarà sicuramente di ritorno presto.||{{N|mikhail_default|||||}}|};
@@ -20,7 +22,7 @@
{mikhail_rats_start|Ho visto di nuovo dei topi fuori, nel giardino. Puoi andare in giardino a controllare? Se puoi uccidi tutti i topi che trovi.|{{0|mikhail_rats|10|}}|{{Fatto|mikhail_rats_complete||tail_trainingrat|2|0|}{Certo|mikhail_rats_start2|||||}}|};
{mikhail_rats_start2|Se con i topi ti facessi male, puoi tornare qua nel tuo letto. Questo ti fa recuperare le forze.||{{N|mikhail_rats_start3|||||}}|};
{mikhail_rats_start3|Non dimenticare di controllare nel tuo inventario. Sicuramente hai ancora quel\'anello che ti ho dato. Assicurati di indossarlo.||{{Ok|mikhail_default|||||}}|};
-{mikhail_rats_continue|Hai ucciso quei ratti nel nostro giardino?||{{Si|mikhail_rats_complete||tail_trainingrat|2|0|}{Non ancora|mikhail_default|||||}}|};
+{mikhail_rats_continue|Hai ucciso quei ratti nel nostro giardino?||{{Si|mikhail_rats_complete||tail_trainingrat|2|0|}{Non ancora|mikhail_rats_start2|||||}}|};
{mikhail_rats_complete|Oh, l\'hai fatto?! Se ti sei ferito, usa il tuo letto per riposare. Questo è un modo per recuperare le forze.|{{0|mikhail_rats|100|}}|{{N|mikhail_default|||||}}|};
{mikhail_rats_complete2|Grazie per il tuo aiuto con i topi. Se sei ferito, usa il letto per riposare. In questo modo potrai recuperare le forze.||{{N|mikhail_default|||||}}|};
diff --git a/AndorsTrail/res/values-it/strings.xml b/AndorsTrail/res/values-it/strings.xml
index df88d1014..c8613db46 100644
--- a/AndorsTrail/res/values-it/strings.xml
+++ b/AndorsTrail/res/values-it/strings.xml
@@ -123,8 +123,6 @@
Possibilità difesa:Resistenza ai danni:
- E\' richiesta una chiave specifica per passare.
-
Categoria: UsaIndossa
diff --git a/AndorsTrail/res/values-ru/content_conversationlist.xml b/AndorsTrail/res/values-ru/content_conversationlist.xml
index 9177940b5..c42c6fc23 100644
--- a/AndorsTrail/res/values-ru/content_conversationlist.xml
+++ b/AndorsTrail/res/values-ru/content_conversationlist.xml
@@ -3,7 +3,9 @@
[id|message|rewards[rewardType|rewardID|value|]|replies[text|nextPhraseID|requires_Progress|requires_itemID|requires_Quantity|requires_Type|]|];
-{mikhail_start_select|||{{|mikhail_visited|andor:1||||}{|mikhail_gamestart|||||}}|};
+{mikhail_start_select|||{{|mikhail_start_select2|mikhail_bread:100||||}{|mikhail_bread_continue|mikhail_bread:10||||}{|mikhail_start_select2|||||}}|};
+{mikhail_start_select2|||{{|mikhail_start_select_default|mikhail_rats:100||||}{|mikhail_rats_continue|mikhail_rats:10||||}{|mikhail_start_select_default|||||}}|};
+{mikhail_start_select_default|||{{|mikhail_visited|andor:1||||}{|mikhail_gamestart|||||}}|};
{mikhail_gamestart|Отлично, ты проснулся.||{{N|mikhail_visited|||||}}|};
{mikhail_visited|Я нигде не могу найти твоего брата. Он не вернулся, с тех пор как ушел вчера.|{{0|andor|1|}}|{{N|mikhail3|||||}}|};
{mikhail3|Неважно, он, наверное, скоро вернется.||{{N|mikhail_default|||||}}|};
@@ -20,7 +22,7 @@
{mikhail_rats_start|Я видел несколько крыс в огороде. Не мог бы ты поискать их? Пожалуйста, убей всех крыс, которых увидишь.|{{0|mikhail_rats|10|}}|{{Готово|mikhail_rats_complete||tail_trainingrat|2|0|}{Конечно|mikhail_rats_start2|||||}}|};
{mikhail_rats_start2|Если пострадаешь от крыс, то возвращайся и отдохни в кровати. Это поможет восстановить силы.||{{N|mikhail_rats_start3|||||}}|};
{mikhail_rats_start3|Так же не забудь проверить свой инвентарь. У тебя, наверное, еще сохранилось кольцо, которое я тебе подарил. Убедись что надел его.||{{Хорошо|mikhail_default|||||}}|};
-{mikhail_rats_continue|Ты убил крыс в огороде?||{{Да|mikhail_rats_complete||tail_trainingrat|2|0|}{Еще нет|mikhail_default|||||}}|};
+{mikhail_rats_continue|Ты убил крыс в огороде?||{{Да|mikhail_rats_complete||tail_trainingrat|2|0|}{Еще нет|mikhail_rats_start2|||||}}|};
{mikhail_rats_complete|Вау, Спасибо за твою помощь!\n\nЕсли устал, используй кровать для отдыха. Это поможет восстановить твои силы.|{{0|mikhail_rats|100|}}|{{N|mikhail_default|||||}}|};
{mikhail_rats_complete2|Спасибо, еще раз, за помощь с крысами.\n\nЕсли устал, используй кровать для отдыха. Это поможет восстановить твои силы.||{{N|mikhail_default|||||}}|};
diff --git a/AndorsTrail/res/values/content_conversationlist.xml b/AndorsTrail/res/values/content_conversationlist.xml
index e98a50005..e829ef163 100644
--- a/AndorsTrail/res/values/content_conversationlist.xml
+++ b/AndorsTrail/res/values/content_conversationlist.xml
@@ -3,7 +3,9 @@
[id|message|rewards[rewardType|rewardID|value|]|replies[text|nextPhraseID|requires_Progress|requires_itemID|requires_Quantity|requires_Type|]|];
-{mikhail_start_select|||{{|mikhail_visited|andor:1||||}{|mikhail_gamestart|||||}}|};
+{mikhail_start_select|||{{|mikhail_start_select2|mikhail_bread:100||||}{|mikhail_bread_continue|mikhail_bread:10||||}{|mikhail_start_select2|||||}}|};
+{mikhail_start_select2|||{{|mikhail_start_select_default|mikhail_rats:100||||}{|mikhail_rats_continue|mikhail_rats:10||||}{|mikhail_start_select_default|||||}}|};
+{mikhail_start_select_default|||{{|mikhail_visited|andor:1||||}{|mikhail_gamestart|||||}}|};
{mikhail_gamestart|Oh good, you are awake.||{{N|mikhail_visited|||||}}|};
{mikhail_visited|I can\'t seem to find your brother Andor anywhere. He hasn\'t been back since he left yesterday.|{{0|andor|1|}}|{{N|mikhail3|||||}}|};
{mikhail3|Never mind, he will probably be back soon.||{{N|mikhail_default|||||}}|};
@@ -20,7 +22,7 @@
{mikhail_rats_start|I saw some rats out back in our garden earlier. Could you please go kill any rats that you see out there.|{{0|mikhail_rats|10|}}|{{I have already dealt with the rats.|mikhail_rats_complete||tail_trainingrat|2|0|}{Ok, I\'ll go check out in our garden.|mikhail_rats_start2|||||}}|};
{mikhail_rats_start2|If you get hurt by the rats, come back here and rest in your bed. That way you can regain your strength.||{{N|mikhail_rats_start3|||||}}|};
{mikhail_rats_start3|Also, don\'t forget to check your inventory. You probably still have that old ring I gave you. Make sure you wear it.||{{Ok, I understand. I can rest here if I get hurt, and I should check my inventory for useful items.|mikhail_default|||||}}|};
-{mikhail_rats_continue|Did you kill those two rats in our garden?||{{Yes, I have dealt with the rats now.|mikhail_rats_complete||tail_trainingrat|2|0|}{No, not yet.|mikhail_default|||||}}|};
+{mikhail_rats_continue|Did you kill those two rats in our garden?||{{Yes, I have dealt with the rats now.|mikhail_rats_complete||tail_trainingrat|2|0|}{No, not yet.|mikhail_rats_start2|||||}}|};
{mikhail_rats_complete|Oh you did? Wow, thanks a lot for your help!\n\nIf you are hurt, use your bed over there to rest and regain your strength.|{{0|mikhail_rats|100|}}|{{N|mikhail_default|||||}}|};
{mikhail_rats_complete2|Thanks for your help with the rats earlier.\n\nIf you are hurt, use your bed over there to rest and regain your strength.||{{N|mikhail_default|||||}}|};
@@ -3329,7 +3331,7 @@
{Ok, I will leave you to your investigation.|X|||||}
{How about you allow me to enter town anyway, so that I can trade. I promise to be quick.|remgardb_7|||||}
}|};
-{remgardb_7|No. As I said, no one excepts us guards are allowed to enter or exit town until our investigation is completed. I suggest you leave now.|||};
+{remgardb_7|No. As I said, no one except us guards are allowed to enter or exit town until our investigation is completed. I suggest you leave now.|||};
{remgardb_help_1|Hm, yes, that might be a good idea actually. Considering you made it up here, you must have some knowledge of the surroundings.|{{0|remgard|15|}}|{{N|remgardb_help_2|||||}}|};
{remgardb_help_2|Tell you what. You might be able to help us.||{{N|remgardb_help_2b|||||}}|};
{remgardb_help_2b|There is an abandoned house some way to the east of here, on a peninsula on the northern shore of lake Laeroth.||{{N|remgardb_help_3|||||}}|};
@@ -3409,7 +3411,7 @@
{How come these creatures do not attack you?|ulirfendor_10|||||}
{What have you translated from the shrine so far?|ulirfendor_12|||||}
}|};
-{ulirfendor_10|I have placed a blessing of the Shadow upon this small island here, so that I may work uninterrupted. Strangely enough, it seems to be very effective on them. They seem to be undead wards of Ah, the Allaceph. I had not seen one for many years until I entered this cave. They are a remnant of the guardians of Kazaul.||{{N|ulirfendor_11|||||}}|};
+{ulirfendor_10|I have placed a blessing of the Shadow upon this small island here, so that I may work uninterrupted. Strangely enough, it seems to be very effective on them.||{{N|ulirfendor_11|||||}}|};
{ulirfendor_11|They seem to be very cautious about it. So far, not even one has dared to approach me. Even those pesky lizards are keeping their distance.||{
{What are these creatures?|ulirfendor_8|||||}
{What have you translated from the shrine so far?|ulirfendor_12|||||}
@@ -3824,7 +3826,7 @@
{I\'m interested in the Shadow guardian blessing|talion_bless_guard_1|||||}
{Never mind.|talion_0|||||}
}|};
-{talion_bless_str_1|The blessing of Shadow strength grants you more strength while attacking, thus increasing the amount of damage you do on each hit. I can give you the blessing for 250 gold.||{
+{talion_bless_str_1|The blessing of Shadow strength grants you more strength while attacking, thus increasing the amount of damage you do on each hit. I can give you the blessing for 300 gold.||{
{Ok, I\'ll take it for 300 gold.|talion_bless_str_2||gold|300|0|}
{Never mind, let\'s go back to those other blessings.|talion_bless_1|||||}
}|};
@@ -3880,7 +3882,7 @@
{Anything else?|ingus_t3|||||}
{Thank you, goodbye.|X|||||}
}|};
-{ingus_t3|Well, there\'s always the Elwille sisters, fighting as always.||{{N|ingus_t2|||||}}|};
+{ingus_t3|Well, there\'s always the Elwille sisters, fighting as always.||{{N|ingus_t4|||||}}|};
{ingus_t4|Last night, they must have kept the whole town awake, they way they were shouting at each other.||{{What are they fighting about?|ingus_t5|||||}}|};
{ingus_t5|Oh .. nothing .. everything. I don\'t know. No one really puts much weight in their squabbling.||{{N|ingus_t6|||||}}|};
{ingus_t6|They live in one of the cabins on the southern shore. *Ingus points to the southwest*.|{{0|sisterfight|10|}}|{
@@ -3888,11 +3890,11 @@
{Thank you. Goodbye.|X|||||}
{Thank you. I wanted to ask you, is there a shop in town?|ingus_s1|||||}
}|};
-{ingus_s1|Shop? Oh yes, of course. There\'s Rothses\' and Arnal\'s shops right there. *Ingus points to the two nearby houses to the west*||{{N|ingus_t6|||||}}|};
+{ingus_s1|Shop? Oh yes, of course. There\'s Rothses\' and Arnal\'s shops right there. *Ingus points to the two nearby houses to the west*||{{N|ingus_s2|||||}}|};
{ingus_s2|Also, if you have the coin, you can always spend it in the tavern down in town.||{
{Thank you. What is happening around town?|ingus_2|||||}
{Thank you, goodbye.|X|||||}
}|};
-
+
diff --git a/AndorsTrail/res/values/content_droplist.xml b/AndorsTrail/res/values/content_droplist.xml
index 554ad5d1c..c6c1753f3 100644
--- a/AndorsTrail/res/values/content_droplist.xml
+++ b/AndorsTrail/res/values/content_droplist.xml
@@ -622,6 +622,24 @@
{shop_thorin|{{pot_scaradon|30|30|100|}}|};
{thorin_bone|{{thorin_bone|1|1|100|}}|};
{lonelyhouse_sp|{{algangror_rat|1|1|100|}}|};
+{irdegh_spawn|{
+ {gold|1|4|70|}
+ {meat|1|1|1|}
+ {gland|1|1|1|}
+}|};
+{irdegh|{
+ {gold|1|4|70|}
+ {meat|1|1|5|}
+ {gland|1|1|1|}
+ {irdegh|1|1|5|}
+}|};
+{irdegh_b|{
+ {gold|1|20|70|}
+ {meat|1|1|5|}
+ {gland|1|1|1|}
+ {irdegh|1|1|5|}
+ {ring_crude_combat|1|1|1|}
+}|};
diff --git a/AndorsTrail/res/values/content_itemlist.xml b/AndorsTrail/res/values/content_itemlist.xml
index adb2c5f60..3797037ac 100644
--- a/AndorsTrail/res/values/content_itemlist.xml
+++ b/AndorsTrail/res/values/content_itemlist.xml
@@ -378,6 +378,7 @@
{oegyth|items_misc:35|Oegyth crystal|31|1|1|0|||||||||||||||||||||||||||||||||};
{toszylae_heart|items_misc:6|Demon heart|31|1|1|0|||||||||||||||||||||||||||||||||};
{potion_rotworm|items_consumables:63|Kazaul rotworm|31|1|1|0|||||||||||||||||||||||||||||||||};
+{lyson_marrow|items_consumables:63|Vial of Lyson marrow extract|31|1|1|0|||||||||||||||||||||||||||||||||};
diff --git a/AndorsTrail/res/values/content_questlist.xml b/AndorsTrail/res/values/content_questlist.xml
index a3f0b11c1..60c58d318 100644
--- a/AndorsTrail/res/values/content_questlist.xml
+++ b/AndorsTrail/res/values/content_questlist.xml
@@ -400,8 +400,21 @@
{50|Talion has cured me of the Kazaul rotworms. I managed to get one of the rotworms into an empty vial, and Talion told me that it would be very valuable. I cannot imagine for what.|3000||}
{51|Because of my former affliction, Talion has agreed to help me by placing blessings of the Shadow upon me whenever I wish, for a fee.||1|}
}|};
-{sisterfight|TODO|1|{
+{sisterfight|A difference in opinion|1|{
{10|I heard a story about two squabbling sisters in Remgard, Elwel and Elwyl. Apparently they have kept people awake at night with the way they are shouting at each other. I should go visit them in their house on the southern shore of the city of Remgard.|||}
+ {20|I have talked to Elwyl, one of the Elwille sisters in Remgard. She is furious at her sister for not agreeing on even the most simple of facts. Apparently, they have had their disagreements with each other for several years.|||}
+ {21|Elwel will not speak to me.|||}
+ {30|One matter that the sisters disagree on currently is the color of a certain potion that the town potion-maker Hjaldar used to make. Elwyl says that the potion of accuracy focus that Hjaldar used to make was a blue potion, but Elwel insists that the potion had a green substance.|||}
+ {31|Elwyl wants me to get a potion of accuracy focus from Hjaldar here in Remgard so that she can finally prove to Elwel that she is wrong.|||}
+ {40|I have talked to Hjaldar in Remgard. Hjaldar no longer makes potions since his supply of Lyson marrow extract has gone dry.|||}
+ {41|Apparently, Hjaldar\'s old friend Mazeg would surely have some Lyson marrow extract to sell. Unfortunately, he does not know where Mazeg currently lives. He only knows that Mazeg traveled far to the west last time they met.|||}
+ {45|I should find Mazeg and get some Lyson marrow extract so that Hjaldar can start making potions again.|||}
+ {50|I have talked to Mazeg in the Blackwater mountain settlement. He is willing to sell me Lyson marrow extract for 600 gold.|||}
+ {51|I have talked to Mazeg in the Blackwater mountain settlement. Since I helped the people of the Blackwater mountain before, he is willing to sell me a vial of Lyson marrow extract for only 400 gold.|||}
+ {55|I have bought some Lyson marrow extract from Mazeg. I should return to Remgard and give it to Hjaldar.|||}
+ {60|Hjaldar thanked me for bringing him the marrow extract.|1500||}
+ {61|Hjaldar can now create potions again, and is willing to trade with me. He even gave me some of the first potions that he made. I should go visit the Elwille sisters here in Remgard again, and show them a potion of accuracy focus.|||}
+ {70|I have shown Elwyl a potion of accuracy focus. Unfortunately, it did not cause their squabbling to diminish. On the contrary, they seem to be even more angry at each other now, since both of them had the color wrong.|900|1|}
}|};
diff --git a/AndorsTrail/res/values/loadresources_debug.xml b/AndorsTrail/res/values/loadresources_debug.xml
index 5eaba9b60..6a08ae7de 100644
--- a/AndorsTrail/res/values/loadresources_debug.xml
+++ b/AndorsTrail/res/values/loadresources_debug.xml
@@ -54,15 +54,15 @@
-[id|message|progressQuest|rewardDropListID|replies[text|nextPhraseID|requires_Progress|requires_itemID|requires_Quantity|]|];
-{debugshop|Welcome adventurer!|||{{Trade items very very long text|S||||}{Bye|X||||}{Fight|F||||}}|};
-{debugquest|Debug quest start\nTest.|debugquest:10||{{Iron sword*2|debugquest2||dagger0|1|}{Progress+=10|debugquest4||||}{Progress=100|debugquest1|debugquest:100|||}}|};
-{debugquest1|Yes, you have already completed this quest.||debuglist1|{{Next|debugquest3||||}}|};
-{debugquest2|Thank you for the items.|debugquest:100||{{Next|debugquest3||||}}|};
-{debugquest3|Quest is now completed.|||{{Bye|X||||}}|};
-{debugquest4|More info. Quest progress should now be updated to 20.|debugquest:20||{{Back|debugquest||||}}|};
-{debugsign|This should be a signpost.||||};
-{debugrequireskey|This tile requires a questprogress.||||};
+[id|message|rewards[rewardType|rewardID|value|]|replies[text|nextPhraseID|requires_Progress|requires_itemID|requires_Quantity|requires_Type|]|];
+{debugshop|Welcome adventurer!||{{Trade items very very long text|S|||||}{Bye|X|||||}{Fight|F|||||}}|};
+{debugquest|Debug quest start\nTest.|{{0|debugquest|10|}}|{{Iron sword*2|debugquest2||dagger0|1|0|}{Progress+=10|debugquest4|||||}{Progress=100|debugquest1|debugquest:100||||}}|};
+{debugquest1|Yes, you have already completed this quest.|{{1|debuglist1||}}|{{Next|debugquest3|||||}}|};
+{debugquest2|Thank you for the items.|{{0|debugquest|100|}}|{{Next|debugquest3|||||}}|};
+{debugquest3|Quest is now completed.||{{Bye|X|||||}}|};
+{debugquest4|More info. Quest progress should now be updated to 20.|{{0|debugquest|20|}}|{{Back|debugquest|||||}}|};
+{debugsign|This should be a signpost.|||};
+{debugrequireskey|This tile requires a questprogress.|||};
@@ -72,13 +72,13 @@
-[id|iconID|name|tags|size|maxHP|maxAP|moveCost|attackCost|attackChance|criticalChance|criticalMultiplier|attackDamage_Min|attackDamage_Max|blockChance|damageResistance|droplistID|phraseID|hasHitEffect|onHit_boostHP_Min|onHit_boostHP_Max|onHit_boostAP_Min|onHit_boostAP_Max|onHit_conditionsSource[condition|magnitude|duration|chance|]|onHit_conditionsTarget[condition|magnitude|duration|chance|]|];
-{traveller1|monsters_man1:0|Traveller1|debugNPC1||10|10|10|10|50|||1|2|||debugshop1|debugshop||||||||};
-{traveller2|monsters_man1:0|Traveller2|debugNPC2||10|10|10|10|50|||1|2|||debugshop1|debugquest||||||||};
-{black_ant|monsters_insects:0|Ant|insect||10|10|10|10|50|||1|2|||debuglist1|||||||||};
-{small_wasp|monsters_insects:1|Pitiful debug bug with long name|insect||10|10|10|10|50|||1|2|||debuglist1|||||||||};
-{winged_demon|monsters_demon1:0|Winged demon|demon|2x2|10|10|10|10|50|||10|20|||debuglist1|||||||||};
-{troll|monsters_misc:5|Troll|troll||10|10|10|2|50|||1|2|||debuglist1|||||||||};
+[id|iconID|name|tags|size|monsterClass|unique|faction|maxHP|maxAP|moveCost|attackCost|attackChance|criticalChance|criticalMultiplier|attackDamage_Min|attackDamage_Max|blockChance|damageResistance|droplistID|phraseID|hasHitEffect|onHit_boostHP_Min|onHit_boostHP_Max|onHit_boostAP_Min|onHit_boostAP_Max|onHit_conditionsSource[condition|magnitude|duration|chance|]|onHit_conditionsTarget[condition|magnitude|duration|chance|]|];
+{traveller1|monsters_man1:0|Traveller1|debugNPC1||0|1||10|10|10|10|50|||1|2|||debugshop1|debugshop||||||||};
+{traveller2|monsters_man1:0|Traveller2|debugNPC2||0|1||10|10|10|10|50|||1|2|||debugshop1|debugquest||||||||};
+{black_ant|monsters_insects:0|Ant|insect||1|||10|10|10|10|50|||1|2|||debuglist1|||||||||};
+{small_wasp|monsters_insects:1|Pitiful debug bug with long name|insect||1|||10|10|10|10|50|||1|2|||debuglist1|||||||||};
+{winged_demon|monsters_demon1:0|Winged demon|demon|2x2|2|||10|10|10|10|50|||10|20|||debuglist1|||||||||};
+{troll|monsters_misc:5|Troll|troll||5|||10|10|10|2|50|||1|2|||debuglist1|||||||||};
diff --git a/AndorsTrail/res/values/ui_theme.xml b/AndorsTrail/res/values/ui_theme.xml
index edf123488..dde13fef1 100644
--- a/AndorsTrail/res/values/ui_theme.xml
+++ b/AndorsTrail/res/values/ui_theme.xml
@@ -1,6 +1,25 @@
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/VisualEffectCollection.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/VisualEffectCollection.java
index c07e1488e..7874fb0d8 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/VisualEffectCollection.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/VisualEffectCollection.java
@@ -17,7 +17,7 @@ public final class VisualEffectCollection {
public final VisualEffect[] effects = new VisualEffect[NUM_EFFECTS];
public void initialize(DynamicTileLoader loader) {
- effects[EFFECT_BLOOD] = createEffect(loader, R.drawable.effect_blood3, new ConstRange(16, 0), 400, Color.RED);
+ effects[EFFECT_BLOOD] = createEffect(loader, R.drawable.effect_blood4, new ConstRange(14, 0), 400, Color.RED);
effects[EFFECT_RESTORE_HP] = createEffect(loader, R.drawable.effect_heal2, new ConstRange(16, 0), 400, Color.rgb(150, 150, 255));
effects[EFFECT_POISON] = createEffect(loader, R.drawable.effect_poison1, new ConstRange(16, 0), 400, Color.GREEN);
}
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ActorConditionInfoActivity.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ActorConditionInfoActivity.java
index 8534013e5..9309319dd 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ActorConditionInfoActivity.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ActorConditionInfoActivity.java
@@ -7,7 +7,6 @@ import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;
-import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -33,12 +32,11 @@ public class ActorConditionInfoActivity extends Activity {
setContentView(R.layout.actorconditioninfo);
- ImageView img = (ImageView) findViewById(R.id.actorconditioninfo_image);
- world.tileManager.setImageViewTile(img, conditionType);
TextView tv = (TextView) findViewById(R.id.actorconditioninfo_title);
tv.setText(conditionType.name);
-
+ world.tileManager.setImageViewTile(tv, conditionType);
+
Button b = (Button) findViewById(R.id.actorconditioninfo_close);
b.setOnClickListener(new OnClickListener() {
@Override
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/BulkSelectionInterface.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/BulkSelectionInterface.java
index d390f9258..a92156e9f 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/BulkSelectionInterface.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/BulkSelectionInterface.java
@@ -15,7 +15,6 @@ import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.Button;
import android.widget.EditText;
-import android.widget.ImageView;
import android.widget.SeekBar;
import android.widget.TextView;
@@ -103,11 +102,10 @@ public class BulkSelectionInterface extends Activity implements TextWatcher {
final Button selectAllButton = (Button)findViewById(R.id.bulkselection_select_all_button);
// change image and name of the item
- final ImageView itemImage = (ImageView)findViewById(R.id.bulkselection_itemimage);
- world.tileManager.setImageViewTileForSingleItemType(itemImage, itemType, getResources());
- final TextView itemName = (TextView)findViewById(R.id.bulkselection_itemname);
+ final TextView itemName = (TextView)findViewById(R.id.bulkselection_itemname);
itemName.setText(itemType.name);
-
+ world.tileManager.setImageViewTileForSingleItemType(itemName, itemType, getResources());
+
int actionTextResourceID = 0;
if (interfaceType == BULK_INTERFACE_BUY) {
pricePerUnit = ItemController.getBuyingPrice(world.model.player, itemType);
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ConversationActivity.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ConversationActivity.java
index 7a0d6b07b..5480797d9 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ConversationActivity.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ConversationActivity.java
@@ -398,18 +398,16 @@ public final class ConversationActivity extends Activity implements OnKeyListene
result = View.inflate(getContext(), R.layout.conversation_statement, null);
}
- final ImageView iv = (ImageView) result.findViewById(R.id.conversation_image);
final TextView tv = (TextView) result.findViewById(R.id.conversation_text);
if (statement.hasActor()) {
- if (statement.isPlayerActor) tileManager.setImageViewTileForPlayer(iv, statement.iconID);
- else tileManager.setImageViewTileForMonster(iv, statement.iconID);
- iv.setVisibility(View.VISIBLE);
+ if (statement.isPlayerActor) tileManager.setImageViewTileForPlayer(tv, statement.iconID);
+ else tileManager.setImageViewTileForMonster(tv, statement.iconID);
tv.setText(statement.actorName + ": " + statement.text, BufferType.SPANNABLE);
Spannable sp = (Spannable) tv.getText();
sp.setSpan(new ForegroundColorSpan(statement.color), 0, statement.actorName.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
} else {
- iv.setVisibility(View.GONE);
+ tv.setCompoundDrawables(null, null, null, null);
tv.setText(statement.text);
}
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/DebugInterface.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/DebugInterface.java
index bc831c202..03ff00baa 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/DebugInterface.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/DebugInterface.java
@@ -12,6 +12,7 @@ import com.gpl.rpg.AndorsTrail.R;
import com.gpl.rpg.AndorsTrail.context.ViewContext;
import com.gpl.rpg.AndorsTrail.context.WorldContext;
+@SuppressWarnings("unused")
public final class DebugInterface {
private final ViewContext viewContext;
private final MainActivity mainActivity;
@@ -175,7 +176,7 @@ public final class DebugInterface {
}
}
- private void addDebugButton(DebugButton button, int id, RelativeLayout layout) {
+ private void addDebugButton(DebugButton button, int id, RelativeLayout layout) {
if (!AndorsTrailApplication.DEVELOPMENT_DEBUGBUTTONS) return;
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, res.getDimensionPixelSize(R.dimen.smalltext_buttonheight));
@@ -193,7 +194,7 @@ public final class DebugInterface {
layout.addView(b);
}
- private void addDebugButtons(DebugButton[] buttons) {
+ private void addDebugButtons(DebugButton[] buttons) {
if (!AndorsTrailApplication.DEVELOPMENT_DEBUGBUTTONS) return;
if (buttons == null || buttons.length <= 0) return;
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/HeroinfoActivity_Stats.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/HeroinfoActivity_Stats.java
index 84634e2b2..72e6a9c11 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/HeroinfoActivity_Stats.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/HeroinfoActivity_Stats.java
@@ -22,7 +22,6 @@ import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
-import android.widget.ImageView;
import android.widget.TextView;
public final class HeroinfoActivity_Stats extends Activity {
@@ -53,10 +52,9 @@ public final class HeroinfoActivity_Stats extends Activity {
setContentView(R.layout.heroinfo_stats);
- ImageView iv = (ImageView) findViewById(R.id.heroinfo_image);
- world.tileManager.setImageViewTile(iv, player);
-
- ((TextView) findViewById(R.id.heroinfo_title)).setText(player.actorTraits.name);
+ TextView tv = (TextView) findViewById(R.id.heroinfo_title);
+ tv.setText(player.actorTraits.name);
+ world.tileManager.setImageViewTile(tv, player);
heroinfo_ap = (TextView) findViewById(R.id.heroinfo_ap);
heroinfo_movecost = (TextView) findViewById(R.id.heroinfo_movecost);
heroinfo_currenttraits = (TraitsInfoView) findViewById(R.id.heroinfo_currenttraits);
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ItemInfoActivity.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ItemInfoActivity.java
index c8b7696b1..96ab20168 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ItemInfoActivity.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ItemInfoActivity.java
@@ -9,7 +9,6 @@ import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
-import android.widget.ImageView;
import android.widget.TextView;
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
@@ -48,10 +47,9 @@ public final class ItemInfoActivity extends Activity {
setContentView(R.layout.iteminfo);
- ImageView img = (ImageView) findViewById(R.id.iteminfo_image);
- world.tileManager.setImageViewTileForSingleItemType(img, itemType, getResources());
TextView tv = (TextView) findViewById(R.id.iteminfo_title);
tv.setText(itemType.name);
+ world.tileManager.setImageViewTileForSingleItemType(tv, itemType, getResources());
tv = (TextView) findViewById(R.id.iteminfo_category);
tv.setText(getCategoryNameRes(itemType.category));
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/LevelUpActivity.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/LevelUpActivity.java
index 5f2093f56..c988a90c1 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/LevelUpActivity.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/LevelUpActivity.java
@@ -21,8 +21,8 @@ import com.gpl.rpg.AndorsTrail.model.actor.Player;
public final class LevelUpActivity extends Activity {
private WorldContext world;
private Player player;
- private ImageView levelup_image;
private TextView levelup_description;
+ private TextView levelup_title;
private View levelup_adds_new_skillpoint;
/** Called when the activity is first created. */
@@ -38,8 +38,8 @@ public final class LevelUpActivity extends Activity {
setContentView(R.layout.levelup);
- levelup_image = (ImageView) findViewById(R.id.levelup_image);
- levelup_description = (TextView) findViewById(R.id.levelup_description);
+ levelup_title = (TextView) findViewById(R.id.levelup_title);
+ levelup_description = (TextView) findViewById(R.id.levelup_description);
levelup_adds_new_skillpoint = findViewById(R.id.levelup_adds_new_skillpoint);
Button b;
@@ -91,7 +91,7 @@ public final class LevelUpActivity extends Activity {
return;
}
- world.tileManager.setImageViewTile(levelup_image, player);
+ world.tileManager.setImageViewTile(levelup_title, player);
levelup_description.setText(res.getString(R.string.levelup_description, player.level+1));
if (player.nextLevelAddsNewSkillpoint()) {
levelup_adds_new_skillpoint.setVisibility(View.VISIBLE);
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/LoadSaveActivity.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/LoadSaveActivity.java
index 2f8114f6a..f099185fb 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/LoadSaveActivity.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/LoadSaveActivity.java
@@ -13,7 +13,6 @@ import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.Button;
-import android.widget.ImageView;
import android.widget.TextView;
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
@@ -42,13 +41,12 @@ public final class LoadSaveActivity extends Activity implements OnClickListener
setContentView(R.layout.loadsave);
- ImageView img = (ImageView) findViewById(R.id.loadsave_image);
TextView tv = (TextView) findViewById(R.id.loadsave_title);
if (isLoading) {
- img.setImageResource(android.R.drawable.ic_menu_search);
+ tv.setCompoundDrawablesWithIntrinsicBounds(android.R.drawable.ic_menu_search, 0, 0, 0);
tv.setText(R.string.loadsave_title_load);
} else {
- img.setImageResource(android.R.drawable.ic_menu_save);
+ tv.setCompoundDrawablesWithIntrinsicBounds(android.R.drawable.ic_menu_save, 0, 0, 0);
tv.setText(R.string.loadsave_title_save);
}
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/MonsterEncounterActivity.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/MonsterEncounterActivity.java
index e033052b1..f97ec8c45 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/MonsterEncounterActivity.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/MonsterEncounterActivity.java
@@ -6,7 +6,6 @@ import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;
-import android.widget.ImageView;
import android.widget.TextView;
import com.gpl.rpg.AndorsTrail.Dialogs;
@@ -39,13 +38,11 @@ public final class MonsterEncounterActivity extends Activity {
TextView tv = (TextView) findViewById(R.id.monsterencounter_title);
tv.setText(monster.actorTraits.name);
+ world.tileManager.setImageViewTile(tv, monster);
tv = (TextView) findViewById(R.id.monsterencounter_description);
tv.setText(getString(R.string.dialog_monsterencounter_message, difficulty));
- ImageView iw = (ImageView) findViewById(R.id.monsterencounter_image);
- world.tileManager.setImageViewTile(iw, monster);
-
Button b = (Button) findViewById(R.id.monsterencounter_attack);
b.setOnClickListener(new OnClickListener() {
@Override
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/MonsterInfoActivity.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/MonsterInfoActivity.java
index c6030e2a9..18fac949c 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/MonsterInfoActivity.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/MonsterInfoActivity.java
@@ -24,7 +24,6 @@ import android.widget.TextView;
public final class MonsterInfoActivity extends Activity {
- private ImageView monsterinfo_image;
private TextView monsterinfo_title;
private TextView monsterinfo_difficulty;
private TraitsInfoView monsterinfo_currenttraits;
@@ -45,7 +44,6 @@ public final class MonsterInfoActivity extends Activity {
setContentView(R.layout.monsterinfo);
- monsterinfo_image = (ImageView) findViewById(R.id.monsterinfo_image);
monsterinfo_title = (TextView) findViewById(R.id.monsterinfo_title);
monsterinfo_difficulty = (TextView) findViewById(R.id.monsterinfo_difficulty);
monsterinfo_immune_criticals = (TextView) findViewById(R.id.monsterinfo_immune_criticals);
@@ -82,8 +80,8 @@ public final class MonsterInfoActivity extends Activity {
}
private void updateTitle(Monster monster) {
- world.tileManager.setImageViewTile(monsterinfo_image, monster);
- monsterinfo_title.setText(monster.actorTraits.name);
+ monsterinfo_title.setText(monster.actorTraits.name);
+ world.tileManager.setImageViewTile(monsterinfo_title, monster);
monsterinfo_difficulty.setText(getMonsterDifficultyResource(world, monster));
}
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/SkillInfoActivity.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/SkillInfoActivity.java
index 8f76812e0..ac40ac24a 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/SkillInfoActivity.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/SkillInfoActivity.java
@@ -20,7 +20,6 @@ import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.widget.Button;
-import android.widget.ImageView;
import android.widget.TextView;
public final class SkillInfoActivity extends Activity {
@@ -44,9 +43,6 @@ public final class SkillInfoActivity extends Activity {
final int skillID = intent.getExtras().getInt("skillID");
SkillInfo skill = world.skills.getSkill(skillID);
- ImageView skillinfo_image = (ImageView) findViewById(R.id.skillinfo_image);
- SkillController.setSkillIcon(skillinfo_image, skillID, res);
-
TextView skillinfo_title = (TextView) findViewById(R.id.skillinfo_title);
skillinfo_title.setText(getSkillTitleResourceID(skillID));
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/CombatController.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/CombatController.java
index ab12a0941..1c1e3468c 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/CombatController.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/CombatController.java
@@ -5,6 +5,7 @@ import java.util.HashSet;
import android.content.res.Resources;
import android.os.Handler;
import android.os.Message;
+import android.util.FloatMath;
import android.view.View;
import com.gpl.rpg.AndorsTrail.AndorsTrailPreferences;
@@ -436,7 +437,7 @@ public final class CombatController implements VisualEffectCompletedCallback {
float averageDamagePerTurn = getAverageDamagePerTurn(attacker, target);
if (averageDamagePerTurn <= 0) return 100;
- return (int) Math.ceil(target.actorTraits.maxHP / averageDamagePerTurn);
+ return (int) FloatMath.ceil(target.actorTraits.maxHP / averageDamagePerTurn);
}
public static int getMonsterDifficulty(WorldContext world, Monster monster) {
// returns [0..100) . 100 == easy.
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/SkillController.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/SkillController.java
index 04c9940b9..73f3b3392 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/SkillController.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/SkillController.java
@@ -1,9 +1,5 @@
package com.gpl.rpg.AndorsTrail.controller;
-import android.content.res.Resources;
-import android.widget.ImageView;
-
-import com.gpl.rpg.AndorsTrail.R;
import com.gpl.rpg.AndorsTrail.model.CombatTraits;
import com.gpl.rpg.AndorsTrail.model.ability.ActorConditionEffect;
import com.gpl.rpg.AndorsTrail.model.ability.ActorConditionType;
@@ -82,10 +78,6 @@ public final class SkillController {
return true;
}
- public static void setSkillIcon(ImageView iconImageView, int skillID, Resources res) {
- iconImageView.setImageResource(R.drawable.ui_icon_skill);
- }
-
public static int getActorConditionEffectChanceRollBias(ActorConditionEffect effect, Player player) {
if (effect.chance.isMax()) return 0;
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/CombatTraits.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/CombatTraits.java
index b7e2b7f1c..f384a28a1 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/CombatTraits.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/CombatTraits.java
@@ -4,6 +4,8 @@ import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
+import android.util.FloatMath;
+
import com.gpl.rpg.AndorsTrail.util.Range;
public class CombatTraits {
@@ -84,7 +86,7 @@ public class CombatTraits {
case STAT_COMBAT_ATTACK_COST: return attackCost;
case STAT_COMBAT_ATTACK_CHANCE: return attackChance;
case STAT_COMBAT_CRITICAL_CHANCE: return criticalChance;
- case STAT_COMBAT_CRITICAL_MULTIPLIER: return (int) Math.floor(criticalMultiplier);
+ case STAT_COMBAT_CRITICAL_MULTIPLIER: return (int) FloatMath.floor(criticalMultiplier);
case STAT_COMBAT_DAMAGE_POTENTIAL_MIN: return damagePotential.current;
case STAT_COMBAT_DAMAGE_POTENTIAL_MAX: return damagePotential.max;
case STAT_COMBAT_BLOCK_CHANCE: return blockChance;
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/ability/SkillCollection.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/ability/SkillCollection.java
index e81e06cce..2272ef75f 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/ability/SkillCollection.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/ability/SkillCollection.java
@@ -1,7 +1,9 @@
package com.gpl.rpg.AndorsTrail.model.ability;
+import java.util.ArrayList;
import java.util.Collection;
-import java.util.HashMap;
+
+import android.util.SparseArray;
import com.gpl.rpg.AndorsTrail.controller.Constants;
import com.gpl.rpg.AndorsTrail.model.CombatTraits;
@@ -66,7 +68,7 @@ public final class SkillCollection {
public static final int MAX_LEVEL_LOWER_EXPLOSS = 100 / PER_SKILLPOINT_INCREASE_EXPLOSS_PERCENT;
public static final int MAX_LEVEL_RESISTANCE = 70 / PER_SKILLPOINT_INCREASE_RESISTANCE_CHANCE_PERCENT;
- private final HashMap skills = new HashMap();
+ private final SparseArray skills = new SparseArray();
private void initializeSkill(SkillInfo skill) {
skills.put(skill.id, skill);
}
@@ -116,6 +118,8 @@ public final class SkillCollection {
}
public Collection getAllSkills() {
- return skills.values();
+ ArrayList result = new ArrayList(skills.size());
+ for(int i = 0; i < skills.size(); ++i) result.add(skills.valueAt(i));
+ return result;
}
}
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/actor/Player.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/actor/Player.java
index 71ac72866..7a8449344 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/actor/Player.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/actor/Player.java
@@ -7,6 +7,9 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Map.Entry;
+import android.util.FloatMath;
+import android.util.SparseIntArray;
+
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
import com.gpl.rpg.AndorsTrail.context.WorldContext;
import com.gpl.rpg.AndorsTrail.controller.ActorStatsController;
@@ -33,7 +36,7 @@ public final class Player extends Actor {
private final HashMap > questProgress = new HashMap >();
public int useItemCost;
public int reequipCost;
- private final HashMap skillLevels = new HashMap();
+ private final SparseIntArray skillLevels = new SparseIntArray();
public String spawnMap;
public String spawnPlace;
public int availableSkillIncreases = 0;
@@ -132,8 +135,7 @@ public final class Player extends Actor {
}
public int getSkillLevel(int skillID) {
- if (!skillLevels.containsKey(skillID)) return 0;
- else return skillLevels.get(skillID);
+ return skillLevels.get(skillID);
}
public boolean hasSkill(int skillID) {
return getSkillLevel(skillID) > 0;
@@ -143,8 +145,7 @@ public final class Player extends Actor {
if (!hasAvailableSkillpoints()) return;
--availableSkillIncreases;
}
- if (!skillLevels.containsKey(skillID)) skillLevels.put(skillID, 1);
- else skillLevels.put(skillID, skillLevels.get(skillID) + 1);
+ skillLevels.put(skillID, skillLevels.get(skillID) + 1);
ActorStatsController.recalculatePlayerCombatTraits(this);
}
public boolean nextLevelAddsNewSkillpoint() {
@@ -156,7 +157,7 @@ public final class Player extends Actor {
public static int getExpectedNumberOfSkillpointsForLevel(int level) {
level -= Constants.FIRST_SKILL_POINT_IS_GIVEN_AT_LEVEL;
if (level < 0) return 0;
- return 1 + (int) Math.floor((float) level / Constants.NEW_SKILL_POINT_EVERY_N_LEVELS);
+ return 1 + (int) FloatMath.floor((float) level / Constants.NEW_SKILL_POINT_EVERY_N_LEVELS);
}
public boolean hasAvailableSkillpoints() {
return availableSkillIncreases > 0;
@@ -266,7 +267,7 @@ public final class Player extends Actor {
if (fileversion <= 21) {
int assignedSkillpoints = 0;
- for (int v : skillLevels.values()) assignedSkillpoints += v;
+ for (int i = 0; i < skillLevels.size(); ++i) assignedSkillpoints += skillLevels.valueAt(i);
this.availableSkillIncreases = getExpectedNumberOfSkillpointsForLevel(this.level) - assignedSkillpoints;
} else {
this.availableSkillIncreases = src.readInt();
@@ -297,9 +298,9 @@ public final class Player extends Actor {
dest.writeInt(useItemCost);
dest.writeInt(reequipCost);
dest.writeInt(skillLevels.size());
- for (Entry skillLevel: skillLevels.entrySet()) {
- dest.writeInt(skillLevel.getKey());
- dest.writeInt(skillLevel.getValue());
+ for (int i = 0; i < skillLevels.size(); ++i) {
+ dest.writeInt(skillLevels.keyAt(i));
+ dest.writeInt(skillLevels.valueAt(i));
}
dest.writeUTF(spawnMap);
dest.writeUTF(spawnPlace);
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/map/PredefinedMap.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/map/PredefinedMap.java
index 6f8e3d61e..c5d72ec7f 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/map/PredefinedMap.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/map/PredefinedMap.java
@@ -152,23 +152,26 @@ public final class PredefinedMap {
return true;
}
- public void spawnAll(WorldContext context) {
+ public void spawnAll(WorldContext world) {
boolean respawnUniqueMonsters = false;
if (!visited) respawnUniqueMonsters = true;
for (MonsterSpawnArea a : spawnAreas) {
- while (a.isSpawnable(respawnUniqueMonsters)) {
- final boolean wasAbleToSpawn = spawnInArea(a, context, null);
- if (!wasAbleToSpawn) break;
- }
- a.healAllMonsters();
+ spawnAllInArea(world, a, respawnUniqueMonsters);
}
}
- public boolean maybeSpawn(WorldContext context) {
+ public void spawnAllInArea(WorldContext world, MonsterSpawnArea area, boolean respawnUniqueMonsters) {
+ while (area.isSpawnable(respawnUniqueMonsters)) {
+ final boolean wasAbleToSpawn = spawnInArea(area, world, null);
+ if (!wasAbleToSpawn) break;
+ }
+ area.healAllMonsters();
+ }
+ public boolean maybeSpawn(WorldContext world) {
boolean hasSpawned = false;
for (MonsterSpawnArea a : spawnAreas) {
if (!a.isSpawnable(false)) continue;
if (!a.rollShouldSpawn()) continue;
- if (spawnInArea(a, context, context.model.player.position)) hasSpawned = true;
+ if (spawnInArea(a, world, world.model.player.position)) hasSpawned = true;
}
return hasSpawned;
}
@@ -254,9 +257,11 @@ public final class PredefinedMap {
this.spawnAreas[i].readFromParcel(src, world, fileversion);
}
- if (fileversion <= 5) return;
+ if (fileversion < 26) spawnPreV0611UniqueMonsters(world);
groundBags.clear();
+ if (fileversion <= 5) return;
+
final int size2 = src.readInt();
for(int i = 0; i < size2; ++i) {
groundBags.add(new Loot(src, world, fileversion));
@@ -275,7 +280,7 @@ public final class PredefinedMap {
}
lastVisitTime = src.readLong();
}
-
+
public void writeToParcel(DataOutputStream dest, int flags) throws IOException {
dest.writeInt(spawnAreas.length);
for(MonsterSpawnArea a : spawnAreas) {
@@ -288,4 +293,51 @@ public final class PredefinedMap {
dest.writeBoolean(visited);
dest.writeLong(lastVisitTime);
}
+
+
+ private void spawnPreV0611UniqueMonsters(WorldContext world) {
+ // These monsters were not marked as unique in v0.6.10, and were therefore
+ // not persisted in the savegame files from older versions.
+ if (name.equals("crossglen")) {
+ spawnPreV0611UniqueMonster(world, "farmer");
+ spawnPreV0611UniqueMonster(world, "tired_farmer");
+ spawnPreV0611UniqueMonster(world, "odair");
+ spawnPreV0611UniqueMonster(world, "oromir");
+ } else if (name.equals("crossglen_hall")) {
+ spawnPreV0611UniqueMonster(world, "leonid");
+ spawnPreV0611UniqueMonster(world, "mara");
+ spawnPreV0611UniqueMonster(world, "drunk");
+ spawnPreV0611UniqueMonster(world, "arambold");
+ spawnPreV0611UniqueMonster(world, "tharal");
+ spawnPreV0611UniqueMonster(world, "gruil");
+ } else if (name.equals("wild3")) {
+ spawnPreV0611UniqueMonster(world, "jan");
+ } else if (name.equals("fallhaven_nw")) {
+ spawnPreV0611UniqueMonster(world, "bearded_citizen");
+ spawnPreV0611UniqueMonster(world, "old_citizen");
+ spawnPreV0611UniqueMonster(world, "tired_citizen");
+ spawnPreV0611UniqueMonster(world, "old_man");
+ spawnPreV0611UniqueMonster(world, "guard");
+ spawnPreV0611UniqueMonster(world, "drunkard");
+ spawnPreV0611UniqueMonster(world, "acolyte");
+ } else if (name.equals("fallhaven_sw")) {
+ spawnPreV0611UniqueMonster(world, "citizen");
+ spawnPreV0611UniqueMonster(world, "jakrar");
+ } else if (name.equals("foaming_flask")) {
+ spawnPreV0611UniqueMonster(world, "foaming_flask_cook");
+ spawnPreV0611UniqueMonster(world, "torilo");
+ spawnPreV0611UniqueMonster(world, "feygard_patrol");
+ spawnPreV0611UniqueMonster(world, "feygard_patrol_captain");
+ spawnPreV0611UniqueMonster(world, "ambelie");
+ } else if (name.equals("gapfiller4")) {
+ spawnPreV0611UniqueMonster(world, "guard");
+ }
+ }
+
+ private void spawnPreV0611UniqueMonster(WorldContext world, String monsterTypeID) {
+ for (MonsterSpawnArea a : spawnAreas) {
+ if (!a.monsterTypeIDs[0].equals(monsterTypeID)) continue;
+ spawnAllInArea(world, a, true);
+ }
+ }
}
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/quest/Quest.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/quest/Quest.java
index 02041cf21..d58bd6b70 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/quest/Quest.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/quest/Quest.java
@@ -29,6 +29,6 @@ public final class Quest implements Comparable {
@Override
public int compareTo(Quest q) {
- return (new Integer(sortOrder)).compareTo(q.sortOrder);
+ return sortOrder - q.sortOrder;
}
}
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/DynamicTileLoader.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/DynamicTileLoader.java
index f360cf586..984ee3bcd 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/DynamicTileLoader.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/DynamicTileLoader.java
@@ -1,7 +1,9 @@
package com.gpl.rpg.AndorsTrail.resource;
import java.util.HashMap;
-import java.util.Map.Entry;
+
+import android.util.SparseArray;
+import android.util.SparseIntArray;
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
import com.gpl.rpg.AndorsTrail.resource.tiles.ResourceFileTileset;
@@ -12,13 +14,13 @@ import com.gpl.rpg.AndorsTrail.util.Size;
public final class DynamicTileLoader {
private final TileCache tileCache;
- private final HashMap preparedTilesetsByResourceId = new HashMap();
+ private final SparseArray preparedTilesetsByResourceId = new SparseArray();
private final HashMap preparedTilesetsByResourceName = new HashMap();
private int currentTileStoreIndex;
private static final class ResourceFileTilesetLoadList {
public final ResourceFileTileset tileset;
- public final HashMap tileIDsToLoadPerLocalID = new HashMap();
+ public final SparseIntArray tileIDsToLoadPerLocalID = new SparseIntArray();
public ResourceFileTilesetLoadList(ResourceFileTileset tileset) {
this.tileset = tileset;
}
@@ -43,7 +45,7 @@ public final class DynamicTileLoader {
}
private ResourceFileTilesetLoadList getTilesetBitmap(int tilesetImageResourceID) {
if (AndorsTrailApplication.DEVELOPMENT_VALIDATEDATA) {
- if (!preparedTilesetsByResourceId.containsKey(tilesetImageResourceID)) {
+ if (preparedTilesetsByResourceId.get(tilesetImageResourceID) == null) {
L.log("WARNING: Cannot load tileset " + tilesetImageResourceID);
return null;
}
@@ -75,10 +77,8 @@ public final class DynamicTileLoader {
}
private int prepareTileID(ResourceFileTilesetLoadList tileset, int localID) {
- int tileID = 0;
- if (tileset.tileIDsToLoadPerLocalID.containsKey(localID)) {
- tileID = tileset.tileIDsToLoadPerLocalID.get(localID);
- } else {
+ int tileID = tileset.tileIDsToLoadPerLocalID.get(localID);
+ if (tileID == 0) {
++currentTileStoreIndex;
tileID = currentTileStoreIndex;
tileset.tileIDsToLoadPerLocalID.put(localID, tileID);
@@ -89,10 +89,12 @@ public final class DynamicTileLoader {
public void flush() {
tileCache.allocateMaxTileID(currentTileStoreIndex);
- for(Entry e : preparedTilesetsByResourceId.entrySet()) {
- ResourceFileTileset tileset = e.getValue().tileset;
- for(Entry tile : e.getValue().tileIDsToLoadPerLocalID.entrySet()) {
- tileCache.setTile(tile.getValue(), tileset, tile.getKey());
+ for (int i = 0; i < preparedTilesetsByResourceId.size(); ++i) {
+ ResourceFileTilesetLoadList e = preparedTilesetsByResourceId.valueAt(i);
+ ResourceFileTileset tileset = e.tileset;
+ SparseIntArray tileIDsToLoad = e.tileIDsToLoadPerLocalID;
+ for (int j = 0; j < tileIDsToLoad.size(); ++j) {
+ tileCache.setTile(tileIDsToLoad.valueAt(j), tileset, tileIDsToLoad.keyAt(j));
}
}
}
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/ResourceLoader.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/ResourceLoader.java
index db7a5bf10..b222f7563 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/ResourceLoader.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/ResourceLoader.java
@@ -245,7 +245,7 @@ public final class ResourceLoader {
loader.prepareTileset(R.drawable.map_tiles_2_7, "map_tiles_2_7.png", src_mapTileSize, defaultTileSize);
loader.prepareTileset(R.drawable.map_tiles_2_8, "map_tiles_2_8.png", src_mapTileSize7, defaultTileSize);
- loader.prepareTileset(R.drawable.effect_blood3, "effect_blood3", new Size(8, 2), defaultTileSize);
+ loader.prepareTileset(R.drawable.effect_blood4, "effect_blood4", new Size(7, 2), defaultTileSize);
loader.prepareTileset(R.drawable.effect_heal2, "effect_heal2", new Size(8, 2), defaultTileSize);
loader.prepareTileset(R.drawable.effect_poison1, "effect_poison1", new Size(8, 2), defaultTileSize);
}
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/parsers/MonsterTypeParser.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/parsers/MonsterTypeParser.java
index 50babbc89..f9b29cd83 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/parsers/MonsterTypeParser.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/parsers/MonsterTypeParser.java
@@ -1,5 +1,7 @@
package com.gpl.rpg.AndorsTrail.resource.parsers;
+import android.util.FloatMath;
+
import com.gpl.rpg.AndorsTrail.controller.Constants;
import com.gpl.rpg.AndorsTrail.model.CombatTraits;
import com.gpl.rpg.AndorsTrail.model.ability.ActorConditionTypeCollection;
@@ -64,6 +66,6 @@ public final class MonsterTypeParser extends ResourceParserFor {
if (hitEffect != null && hitEffect.addedConditions_target != null && hitEffect.addedConditions_target.length > 0) {
attackConditionBonus += 50;
}
- return (int) Math.ceil((avgAttackHP * 3 + avgDefenseHP) * Constants.EXP_FACTOR_SCALING) + attackConditionBonus;
+ return (int) FloatMath.ceil((avgAttackHP * 3 + avgDefenseHP) * Constants.EXP_FACTOR_SCALING) + attackConditionBonus;
}
}
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/tiles/TileCache.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/tiles/TileCache.java
index 09a8fd463..a7dd230e2 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/tiles/TileCache.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/tiles/TileCache.java
@@ -13,12 +13,14 @@ import com.gpl.rpg.AndorsTrail.util.LruCache;
import android.content.res.Resources;
import android.graphics.Bitmap;
+import android.util.SparseArray;
+import android.util.SparseIntArray;
public final class TileCache {
private final ReferenceQueue gcQueue = new ReferenceQueue();
private ResourceFileTile[] resourceTiles = new ResourceFileTile[1];
- private final HashMap> tileIDsPerTilesetAndLocalID = new HashMap>();
+ private final HashMap tileIDsPerTilesetAndLocalID = new HashMap();
private final LruCache cache = new LruCache(1000);
public int getMaxTileID() { return resourceTiles.length-1; }
@@ -31,9 +33,9 @@ public final class TileCache {
}
public void setTile(int tileID, ResourceFileTileset tileset, int localID) {
if (resourceTiles[tileID] == null) resourceTiles[tileID] = new ResourceFileTile(tileset, localID);
- HashMap tileIDsPerLocalID = tileIDsPerTilesetAndLocalID.get(tileset.tilesetName);
+ SparseIntArray tileIDsPerLocalID = tileIDsPerTilesetAndLocalID.get(tileset.tilesetName);
if (tileIDsPerLocalID == null) {
- tileIDsPerLocalID = new HashMap();
+ tileIDsPerLocalID = new SparseIntArray();
tileIDsPerTilesetAndLocalID.put(tileset.tilesetName, tileIDsPerLocalID);
}
tileIDsPerLocalID.put(localID, tileID);
@@ -65,12 +67,12 @@ public final class TileCache {
public TileCollection loadTilesFor(Collection iconIDs, Resources r, TileCollection result) {
if (AndorsTrailApplication.DEVELOPMENT_DEBUGMESSAGES) L.log("TileCache::loadTilesFor({" + iconIDs.size() + " items})");
int maxTileID = 0;
- HashMap> tilesToLoadPerSourceFile = new HashMap>();
+ HashMap> tilesToLoadPerSourceFile = new HashMap>();
for(int tileID : iconIDs) {
ResourceFileTile tile = resourceTiles[tileID];
- HashMap tiles = tilesToLoadPerSourceFile.get(tile.tileset);
+ SparseArray tiles = tilesToLoadPerSourceFile.get(tile.tileset);
if (tiles == null) {
- tiles = new HashMap();
+ tiles = new SparseArray();
tilesToLoadPerSourceFile.put(tile.tileset, tiles);
}
tiles.put(tileID, tile);
@@ -79,12 +81,13 @@ public final class TileCache {
boolean hasLoadedTiles = false;
if (result == null) result = new TileCollection(maxTileID);
- for(Entry> e : tilesToLoadPerSourceFile.entrySet()) {
+ for(Entry> e : tilesToLoadPerSourceFile.entrySet()) {
TileCutter cutter = null;
- for(Entry j : e.getValue().entrySet()) {
- int tileID = j.getKey();
- ResourceFileTile tile = j.getValue();
+ SparseArray tilesToLoad = e.getValue();
+ for (int i = 0; i < tilesToLoad.size(); ++i) {
+ int tileID = tilesToLoad.keyAt(i);
+ ResourceFileTile tile = tilesToLoad.valueAt(i);
Bitmap bitmap = cache.get(tileID);
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/tiles/TileManager.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/tiles/TileManager.java
index d0c984bd2..4d10a40b0 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/tiles/TileManager.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/tiles/TileManager.java
@@ -10,6 +10,7 @@ import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import android.os.AsyncTask;
import android.widget.ImageView;
+import android.widget.TextView;
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
import com.gpl.rpg.AndorsTrail.AndorsTrailPreferences;
@@ -123,6 +124,36 @@ public final class TileManager {
+ public void setImageViewTile(TextView textView, Monster monster) { setImageViewTileForMonster(textView, monster.actorTraits.iconID); }
+ public void setImageViewTile(TextView textView, Player player) { setImageViewTileForPlayer(textView, player.actorTraits.iconID); }
+ public void setImageViewTileForMonster(TextView textView, int iconID) { setImageViewTile(textView, currentMapTiles.getBitmap(iconID)); }
+ public void setImageViewTileForPlayer(TextView textView, int iconID) { setImageViewTile(textView, preloadedTiles.getBitmap(iconID)); }
+ public void setImageViewTile(TextView textView, ActorConditionType conditionType) { setImageViewTile(textView, preloadedTiles.getBitmap(conditionType.iconID)); }
+ public void setImageViewTileForUIIcon(TextView textView, int iconID) { setImageViewTile(textView, preloadedTiles.getBitmap(iconID)); }
+ private void setImageViewTile(TextView textView, Bitmap b) { textView.setCompoundDrawablesWithIntrinsicBounds(new BitmapDrawable(b), null, null, null); }
+
+ public void setImageViewTileForSingleItemType(TextView textView, ItemType itemType, Resources r) {
+ final Bitmap icon = tileCache.loadSingleTile(itemType.iconID, r);
+ setImageViewTile(textView, itemType, icon);
+ }
+ public void setImageViewTile(TextView textView, ItemType itemType, TileCollection itemTileCollection) {
+ final Bitmap icon = itemTileCollection.getBitmap(itemType.iconID);
+ setImageViewTile(textView, itemType, icon);
+ }
+ private void setImageViewTile(TextView textView, ItemType itemType, Bitmap icon) {
+ final int overlayIconID = itemType.getOverlayTileID();
+ if (overlayIconID != -1) {
+ textView.setCompoundDrawablesWithIntrinsicBounds(
+ new LayerDrawable(new Drawable[] {
+ new BitmapDrawable(preloadedTiles.getBitmap(overlayIconID))
+ ,new BitmapDrawable(icon)
+ }), null, null, null
+ );
+ } else {
+ setImageViewTile(textView, icon);
+ }
+ }
+
public void setImageViewTile(ImageView imageView, Monster monster) { setImageViewTileForMonster(imageView, monster.actorTraits.iconID); }
public void setImageViewTile(ImageView imageView, Player player) { setImageViewTileForPlayer(imageView, player.actorTraits.iconID); }
public void setImageViewTileForMonster(ImageView imageView, int iconID) { imageView.setImageBitmap(currentMapTiles.getBitmap(iconID)); }
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/util/ConstRange.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/util/ConstRange.java
index a2cb2761e..9440e1cb9 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/util/ConstRange.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/util/ConstRange.java
@@ -1,5 +1,7 @@
package com.gpl.rpg.AndorsTrail.util;
+import android.util.FloatMath;
+
public final class ConstRange {
public final int max;
public final int current;
@@ -34,6 +36,6 @@ public final class ConstRange {
return ((float) max + current) / 2f;
}
public String toPercentString() {
- return Integer.toString((int) Math.ceil((float)current * 100 / max)) + "%";
+ return Integer.toString((int) FloatMath.ceil((float)current * 100 / max)) + "%";
}
}
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/SkillListAdapter.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/SkillListAdapter.java
index 8f5179d69..2dffdee9f 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/SkillListAdapter.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/SkillListAdapter.java
@@ -65,7 +65,6 @@ public final class SkillListAdapter extends ArrayAdapter {
final TextView title = (TextView) result.findViewById(R.id.skillentry_title);
final TextView description = (TextView) result.findViewById(R.id.skillentry_description);
- SkillController.setSkillIcon(icon, skillID, r);
String skillTitle = r.getString(SkillInfoActivity.getSkillTitleResourceID(skillID));
final int skillLevel = player.getSkillLevel(skillID);
if (skillLevel > 0) {