]> www.infradead.org Git - users/mchehab/andors-trail.git/commitdiff
Update monster HP before running the attack animation.
authoroskar.wiksten@gmail.com <oskar.wiksten@gmail.com@08aca716-68be-ccc6-4d58-36f5abd142ac>
Tue, 18 Oct 2011 18:02:21 +0000 (18:02 +0000)
committeroskar.wiksten@gmail.com <oskar.wiksten@gmail.com@08aca716-68be-ccc6-4d58-36f5abd142ac>
Tue, 18 Oct 2011 18:02:21 +0000 (18:02 +0000)
Spelling corrections to conversations.
Prevent FC when running maploader on maps that have exits that do not specify a destination map (such as south of Prim).
Reuse loaded graphics tiles in shopactivity.
Do not use android.util.Pair (since it's not available in Android v1.6)
Updated German translation (thanks Samuel)

git-svn-id: https://andors-trail.googlecode.com/svn/trunk@186 08aca716-68be-ccc6-4d58-36f5abd142ac

19 files changed:
AndorsTrail/res/values-de/content_actorconditions.xml [new file with mode: 0644]
AndorsTrail/res/values-de/content_itemlist.xml
AndorsTrail/res/values-de/strings.xml
AndorsTrail/res/values/content_conversationlist.xml
AndorsTrail/res/values/strings.xml
AndorsTrail/res/xml/crossroads.tmx
AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/DebugInterface.java
AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ShopActivity.java
AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/CombatController.java
AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/ResourceFileTokenizer.java
AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/parsers/ActorConditionsTypeParser.java
AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/parsers/ConversationListParser.java
AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/parsers/DropListParser.java
AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/parsers/ItemTypeParser.java
AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/parsers/MonsterTypeParser.java
AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/parsers/QuestParser.java
AndorsTrail/src/com/gpl/rpg/AndorsTrail/resource/tiles/TileManager.java
AndorsTrail/src/com/gpl/rpg/AndorsTrail/util/Pair.java [new file with mode: 0644]
AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/ShopItemContainerAdapter.java

diff --git a/AndorsTrail/res/values-de/content_actorconditions.xml b/AndorsTrail/res/values-de/content_actorconditions.xml
new file mode 100644 (file)
index 0000000..268e237
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<resources>
+       <string name="actorconditions_v069">
+[id|name|iconID|category|isStacking|hasRoundEffect|round_visualEffectID|round_boostHP_Min|round_boostHP_Max|round_boostAP_Min|round_boostAP_Max|hasFullRoundEffect|fullround_visualEffectID|fullround_boostHP_Min|fullround_boostHP_Max|fullround_boostAP_Min|fullround_boostAP_Max|hasAbilityEffect|boostMaxHP|boostMaxAP|moveCostPenalty|attackCost|attackChance|criticalChance|criticalMultiplier|attackDamage_Min|attackDamage_Max|blockChance|damageResistance|];
+{bless|Segen|actorconditions_1:41|0||||||||||||||1|||||5|||||||};
+{poison_weak|Schwaches Gift|actorconditions_1:60|3||1|2|-1|-1|||||||||||||||||||||};
+{str|Stärke|actorconditions_1:70|2||||||||||||||1||||||||2|2|||};
+{regen|Regeneration der Schatten|actorconditions_1:35|0||1|1|1|1|||||||||0||||||||||||};
+       </string>
+       
+       <string name="actorconditions_v069_bwm">
+[id|name|iconID|category|isStacking|hasRoundEffect|round_visualEffectID|round_boostHP_Min|round_boostHP_Max|round_boostAP_Min|round_boostAP_Max|hasFullRoundEffect|fullround_visualEffectID|fullround_boostHP_Min|fullround_boostHP_Max|fullround_boostAP_Min|fullround_boostAP_Max|hasAbilityEffect|boostMaxHP|boostMaxAP|moveCostPenalty|attackCost|attackChance|criticalChance|criticalMultiplier|attackDamage_Min|attackDamage_Max|blockChance|damageResistance|];
+{speed_minor|Geringe Geschwindigkeit|actorconditions_1:87|2||||||||||||||1||2||||||||||};
+{fatigue_minor|Geringe Ermüdung|actorconditions_1:14|2||0||||||0||||||1|||2|2||||-1|-1|||};
+{feebleness_minor|Geringe Schwächung der Waffen|actorconditions_1:74|1||||||||||||||1||||||||-9|-9|||};
+{bleeding_wound|Blutende Wunde|actorconditions_2:0|3|1|1|0|-1|-1|||||||||||||||||||||};
+{rage_minor|Geringe Berserkerwut|actorconditions_1:90|1||0|-1|||||||||||1|35||||60|||||-90|-1|};
+{blackwater_misery|Blackwater\'s Elend|actorconditions_1:58|3||||||||||||||1||||1|-50|-50||||||};
+{intoxicated|Betäubung|actorconditions_2:1|1||||||||||||||1|15|||1|-30|||4|4|||};
+{dazed|Benommenheit|actorconditions_1:65|1||||||||||||||1||||||||||-40||};
+       </string>
+       
+       <string name="actorconditions_v0610">
+[id|name|iconID|category|isStacking|hasRoundEffect|round_visualEffectID|round_boostHP_Min|round_boostHP_Max|round_boostAP_Min|round_boostAP_Max|hasFullRoundEffect|fullround_visualEffectID|fullround_boostHP_Min|fullround_boostHP_Max|fullround_boostAP_Min|fullround_boostAP_Max|hasAbilityEffect|boostMaxHP|boostMaxAP|moveCostPenalty|attackCost|attackChance|criticalChance|criticalMultiplier|attackDamage_Min|attackDamage_Max|blockChance|damageResistance|];
+{chaotic_grip|Chaotischer Griff|actorconditions_1:96|1||0||||||||||||1||||||||||-10|-1|};
+{chaotic_curse|Chaotischer Fluch|actorconditions_1:89|1||0||||||||||||1||-1||||||-1|-1|-10|-1|};
+       </string>
+
+</resources>
index 611f0fe972be374a1b55b9a9280394d74b79061e..4f4330240306fb337aafc0e909cdce20ec4898cd 100644 (file)
 {vial_empty2|items_consumables:57|Leere Ampulle|31||1|4|||||||||||||||||||||||||||||||||};
 {vial_empty3|items_consumables:59|Leeres Fläschchen|31||1|6|||||||||||||||||||||||||||||||||};
 {vial_empty4|items_consumables:58|Leere Flasche|31||1|11|||||||||||||||||||||||||||||||||};
-{health_minor|items_consumables:35|Kleiner Trank der Gesundheit|20||1|5||||||||||||||1|5|5|||||||||||||||||};
+{health_minor|items_consumables:35|Kleine Ampulle der Gesundheit|20||1|5||||||||||||||1|5|5|||||||||||||||||};
 {health_minor2|items_consumables:35|Kleiner Trank der Gesundheit|20|||18||||||||||||||1|5|5|||||||||||||||||};
 {health|items_consumables:49|Trank der Gesundheit|20|||40||||||||||||||1|10|10|||||||||||||||||};
-{health_major|items_consumables:28|Großer Trank der Gesundheit|20||1|210||||||||||||||1|40|40|||||||||||||||||};
+{health_major|items_consumables:28|Große Flasche der Gesundheit|20||1|210||||||||||||||1|40|40|||||||||||||||||};
 {health_major2|items_consumables:28|Großer Trank der Gesundheit|20|||280||||||||||||||1|40|40|||||||||||||||||};
 {mead|items_consumables:51|Met|20|||15||||||||||||||1|1|1|||||||||||||||||};
 {milk|items_consumables:55|Milch|20|||21||||||||||||||1|2|2|||||||||||||||||};
index f20d729d333a16222ada60535323d9e0f26e0f8d..71095f9093b3588e307cea673f4aa4663d267e76 100644 (file)
@@ -2,6 +2,7 @@
 
 <resources>
        <string name="app_name">Andor\'s Trail</string>
+       <string name="app_description">Questgetriebenes Fantasy-Rollenspiel</string>
        
        <string name="exit">Beenden</string>
        <string name="exit_to_menu">Zum Menü</string>
@@ -44,7 +45,7 @@
        <string name="heroinfo_char">Übersicht</string>
        <string name="heroinfo_inv">Inventar</string>
        <string name="heroinfo_wear">Angelegt</string>
-       <string name="heroinfo_skill">Fähigkeiten</string>
+       <string name="heroinfo_skill">Skills</string>
        <string name="heroinfo_spell">Zauber</string>
        <string name="heroinfo_levelup">Aufstieg</string>
        <string name="heroinfo_level">Level</string>
@@ -67,7 +68,7 @@
        <string name="combat_status_ap">AP: %1$d</string>
        <string name="combat_monsterhealth">LP:</string>
        <string name="combat_monsteraction">%1$s greift an.</string>
-       <!-- <string name="combat_cannotexitcombat">Du kannst den Kampf nicht verlassen, weil noch Gegner in der Nähe sind.Du musst dich zunächst auf ein Feld bewegen, wo dich die Gegner nicht mehr erreichen können.</string>  -->
+       <!-- <string name="combat_cannotexitcombat">Du kannst den Kampf nicht verlassen, weil noch Gegner in der Nähe sind. Du musst dich zunächst auf ein Feld bewegen, wo dich die Gegner nicht mehr erreichen können.</string>  -->
        <string name="combat_result_monstermiss">%1$s verfehlt!</string>
        <string name="combat_result_monsterhit">%1$s trifft dich und nimmt dir %2$d LP!</string>
        <string name="combat_result_monsterhitcritical">%1$s macht einen kritischen Treffer (%2$d LP)!</string>
@@ -89,6 +90,7 @@
 
        <string name="dialog_loot_pickall">Alles einsammeln</string>
        <string name="dialog_loot_foundgold">Du findest %1$d Gold. </string>
+       <string name="dialog_loot_pickedupitem">Du hebst einen Gegenstand auf.</string>
        <string name="dialog_loot_pickedupitems">Du hebst %1$d Gegenstände auf.</string>
        <string name="dialog_groundloot_title">Gegenstände</string>
        <string name="dialog_groundloot_message">Du hast ein paar Dinge gefunden. </string>
     <string name="actorinfo_criticalhit">Krit. Treffer:</string>
     <string name="actorinfo_defense">Abwehr:</string>
     <string name="actorinfo_movecost">Bewegungskosten (AP):</string>
-    <string name="actorinfo_basetraits">Kampfeigenschaften (ohne Ausrüstung)</string>
+    <string name="actorinfo_basetraits">Basiskampfeigenschaften (ohne Ausrüstung und Skills)</string>
     <string name="actorinfo_currenttraits">Kampfeigenschaften (aktuell)</string>
     
     <string name="traitsinfo_attack_cost">Angriffskosten (AP):</string>
     <string name="traitsinfo_criticalhit_chance">Kritische Treffer:</string>
     <string name="traitsinfo_criticalhit_multiplier">Faktor bei krit. Treffern:</string>
     <string name="traitsinfo_defense_chance">Abwehrchance:</string>
-    <string name="traitsinfo_defense_damageresist">Widerstand:</string>
+    <string name="traitsinfo_defense_damageresist">Schadensresistenz:</string>
     
        <!-- <string name="key_required">Hier kommt man nur mit einem bestimmten Schlüssel weiter.</string>  -->
 
                &lt;br /&gt;
                Wir sollten hier wirklich einmal ein paar Informationen anzeigen, wie man das Spiel spielt :)&lt;br /&gt;
        </string>
-       
+
        <string name="dialog_newversion_title">Willkommen</string>
        <string name="dialog_newversion_message">
         Vielen Dank, dass Du Andor\'s Trail heruntergeladen hast!\n\n
         Bedenke bitte, dass diese Version von Andor\'s Trail noch IN DER ENTWICKLUNG ist und somit noch nicht alle Karten komplett fertig sind.\n
-        Es steht dir frei, alle bestehenden Städte und Dungeons ausgiebig zu erforschen.\n
-        Diese Entwicklungsversion kann Fehler enthalten und das Spiel ist noch nicht gut ausbalanciert. Mit dieser Programmversion sollen Fehler aufgespürt werden, bevor weitere Inhalte hinzugefügt werden.\n
         Bitte besuche das Projekt-Forum für weitere Informationen oder wenn du mithelfen willst (siehe "Über").\n
         \n
         Danke für alle bisherigen Rückmeldungen!
        <string name="preferences_dialog_confirmrest_title">Bestätige Ausruhen</string>
        <string name="preferences_dialog_confirmrest">Fragt nach, ob man ausruhen will, wenn ein Bett berührt wird. Ansonsten ruht man automatisch aus.</string>
        <string name="preferences_dialog_confirmattack_title">Bestätige Angriff</string>
-       <string name="preferences_dialog_confirmattack">Aktiviert den \'Angreifen..?\' Dialog beim Berühren von Monstern.</string>
+       <string name="preferences_dialog_confirmattack">Aktiviert den \'Angreifen..?\' Dialog beim Angreifen von Gegnern.</string>
        <string name="preferences_dialog_monsterloot_title">Beute anzeigen</string>
        <string name="preferences_dialog_monsterloot">Auswahl wie das Ergebnis eines Kampfes angezeigt werden soll (Gold, Erfahrung, Gegenstände).</string>
        <string name="preferences_combat_category">Kampf</string>
        <string name="preferences_combat_speed_title">Kampfgeschwindigkeit</string>
-       <string name="preferences_combat_speed">Bestimmt, wie schnell Monster angreifen.</string>
+       <string name="preferences_combat_speed">Bestimmt, wie schnell Gegner angreifen.</string>
 
        <string-array name="preferences_display_loot">
                <item>Beute-Dialog anzeigen</item>
        <string name="inventory_assign_slot3">Quickslot 3</string>
        <string name="inventory_unassign">Quickslot aufheben</string>
        
+       <!-- =========================================== -->
+       <!-- Added in v0.6.10 -->
+       
+       <string name="preferences_movement_dpad_position_title">virtuelles D-Pad</string>
+       <string name="preferences_movement_dpad_position">Aktiviert ein virtuelles D-Pad auf dem Bildschirm zur Steuerung</string>
+       <string name="preferences_movement_dpad_minimizeable_title">Minimierbares D-Pad</string>
+       <string name="preferences_movement_dpad_minimizeable">Wenn das virtuelle D-Pad aktiviert ist, erlaubt diese Einstellung die Minimierung des D-Pads durch einen Klick auf die Mitte.</string>
+       
+       <string-array name="preferences_movement_dpad_positions">
+               <item>Deaktiviert</item>
+               <item>Untere rechte Ecke</item>
+               <item>Untere linke Ecke</item>
+               <item>Unten in der Mitte</item>
+               <item>Links in der Mitte</item>
+               <item>Rechts in der Mitte</item>
+               <item>Obere linke Ecke</item>
+               <item>Obere rechte Ecke</item>
+               <item>Oben in der Mitte</item>
+       </string-array>
+       <string-array name="preferences_movement_dpad_positions_values">
+               <item>0</item>
+               <item>1</item>
+               <item>2</item>
+               <item>3</item>
+               <item>4</item>
+               <item>5</item>
+               <item>6</item>
+               <item>7</item>
+               <item>8</item>
+       </string-array>
+       
+       <string name="actorconditioninfo_constant_effect">andauernder Effekt</string>
+       <string name="actorconditioninfo_effect_every_round">Jede Runde</string>
+       <string name="actorconditioninfo_effect_every_full_round">Jede volle Runde</string>
+       <string name="bulkselection_totalcost_buy">Gesamtkosten: %1$d Gold</string>
+       <string name="bulkselection_totalcost_sell">Gesamtkosten: %1$d Gold</string>
+       <string name="bulkselection_select_all">Alles</string>
+       <string name="bulkselection_sell_confirmation_title">Wirklich verkaufen?</string>
+       <string name="bulkselection_sell_confirmation">Soll %1$s wirklich verkauft werden? Dieser Gegenstand ist %2$s und du könntest ihn nicht zurückerlangen können.</string>
+       
+    <string name="skill_title_weapon_chance">Waffen Präzision</string>
+    <string name="skill_title_weapon_dmg">Kräftiger Schlag</string>
+    <string name="skill_title_barter">Kaufmann</string>
+    <string name="skill_title_dodge">Ausweichen</string>
+    <string name="skill_title_barkskin">Rindenhaut</string>
+    <string name="skill_title_more_criticals">Mehr kritischer Schaden</string>
+    <string name="skill_title_better_criticals">Besserer kritischer Schaden</string>
+    <string name="skill_title_speed">Kampfgeschwindigkeit</string>
+    <string name="skill_title_coinfinder">Schatzjäger</string>
+    <string name="skill_title_more_exp">Guter Lehrling</string>
+    <string name="skill_title_cleave">Cleave</string>
+    <string name="skill_title_eater">Leichenesser</string>
+    <string name="skill_title_fortitude">wachsende Standhaftigkeit</string>
+    <string name="skill_title_evasion">Umgehen</string>
+    <string name="skill_title_regeneration">Regeneration</string>
+    <string name="skill_title_lower_exploss">Fehlschläge meistern</string>
+    <string name="skill_title_magicfinder">Magischer Schatzsucher</string>
+    <string name="skill_title_resistance_mental">Starker Verstand</string>
+    <string name="skill_title_resistance_physical_capacity">Ausdauernder Körper</string>
+    <string name="skill_title_resistance_blood_disorder">Reines Blut</string>
+    
+    <string name="skill_shortdescription_weapon_chance">Erhöhte Angriffschance</string>
+    <string name="skill_shortdescription_weapon_dmg">Erhöhter Angriffsschaden</string>
+    <string name="skill_shortdescription_barter">Bessere Händlerpreise</string>
+    <string name="skill_shortdescription_dodge">Erhöhte Abwehrchance</string>
+    <string name="skill_shortdescription_barkskin">Schadensresistenz</string>
+    <string name="skill_shortdescription_more_criticals">Erhöhte kritische Chance</string>
+    <string name="skill_shortdescription_better_criticals">Erhöhter kritischer Schaden</string>
+    <string name="skill_shortdescription_speed">Erhöhte maximale Aktionspunkte</string>
+    <string name="skill_shortdescription_coinfinder">Größere Chance Gold zu finden</string>
+    <string name="skill_shortdescription_more_exp">Größere Erfahrung von Gegnern</string>
+    <string name="skill_shortdescription_cleave">Regeneriere Aktionspunkte von besiegten Gegnern</string>
+    <string name="skill_shortdescription_eater">Regeneriere Lebenspunkte von besiegten Gegnern</string>
+    <string name="skill_shortdescription_fortitude">Erlange Leben bei jedem Aufstieg</string>
+    <string name="skill_shortdescription_evasion">Erhöhte Chance zu Fliehen</string>
+    <string name="skill_shortdescription_regeneration">Regeneriere jede Runde Lebenspunkte</string>
+    <string name="skill_shortdescription_lower_exploss">Verringere den Verlust an Erfahrungspunkten beim Sterben</string>
+    <string name="skill_shortdescription_magicfinder">Größere Chance magische Gegenstände zu finden</string>
+    <string name="skill_shortdescription_resistance_mental">Widerstand gegen mentale Effekte</string>
+    <string name="skill_shortdescription_resistance_physical_capacity">Widerstand gegen physische Effekte</string>
+    <string name="skill_shortdescription_resistance_blood_disorder">Widerstand gegen Blutstörungen</string>
+    
+    <string name="skill_longdescription_weapon_chance">Erhöht die Angriffschance bei jeder Stufe um %1$d.</string>
+    <string name="skill_longdescription_weapon_dmg">Erhöht den minimalen und maximalen Schaden bei jeder Stufe um %1$d.</string>
+    <string name="skill_longdescription_barter">Verringert bei jeder Stufe den Auf- und Abschlag von An- und Verkäufen um %1$d Prozentpunkte.</string>
+    <string name="skill_longdescription_dodge">Erhöht die Abwehrchance bei jeder Stufe um %1$d.</string>
+    <string name="skill_longdescription_barkskin">Erhöht die Schadensresistenz bei jeder Stufe um %1$d.</string>
+    <string name="skill_longdescription_more_criticals">Erhöht bei jeder Stufe die durch die Ausrüstung bestehende kritische Chance um %1$d %% (prozentualer Anteil an der bestehenden kritischen Chance, es handelt sich nicht um zusätzliche Prozentpunkte).</string>
+    <string name="skill_longdescription_better_criticals">Erhöht bei jeder Stufe den durch die Ausrüstung bestehenden kritischen Faktor um %1$d %%.</string>
+    <string name="skill_longdescription_speed">Erhöht die maximalen Aktionspunkte (AP) bei jeder Stufe um %1$d.</string>
+    <string name="skill_longdescription_coinfinder">Erhöht bei jeder Stufe die Chance bei einem Gegner Gold zu finden um %1$d %%. Auch die Menge des gefundenen Goldes erhöht sich jeweils um %2$d %% (bis zu der für den Gegnertyp maximalen Menge).</string>
+    <string name="skill_longdescription_more_exp">Erhöht bei jeder Stufe die Menge der beim besiegen von Gegnern erhaltenen Erfahrung um %1$d %%.</string>
+    <string name="skill_longdescription_cleave">Für besiegte Gegner erhält man bei jeder Stufe +%1$d Aktionspunkte (AP).</string>
+    <string name="skill_longdescription_eater">Für besiegte Gegner erhält man bei jeder Stufe +%1$d Lebenspunkte (LP).</string>
+    <string name="skill_longdescription_fortitude">Für jeden nachfolgenden Level Aufstieg werden die maximalen Lebenspunkte (LP) um %1$d erhöht. Das wird nicht rückwirkend angewand, nur nachfolgende Level Aufstiege sind betroffen.</string>
+    <string name="skill_longdescription_evasion">Verringert bei jeder Stufe sowohl die Chance eines fehlgeschlagenen Fluchtversuches um %1$d %% als auch die Chance das ein benachbarter Gegner dich angreift um %2$d %%.</string>
+    <string name="skill_longdescription_regeneration">Bei jeder Stufe erhält man pro Runde +%1$d Lebenspunkte (LP).</string>
+    <string name="skill_longdescription_lower_exploss">Verringert bei jeder Stufe die Menge der durch den Tod verursachten verlohrenen Erfahrung um %1$d %% (prozentualer Anteil an dem bestehenden Erfahrungsverlust, es handelt sich nicht um Prozentpunkte). Durch %2$d Stufen werden alle Erfahrungsverluste, die durch den Tod verursacht werden, entfernt.</string>
+    <string name="skill_longdescription_magicfinder">Erhöht bei jeder Stufe die Chance ungewöhnliche Gegenstände zu finden um %1$d %%.</string>
+    <string name="skill_longdescription_resistance_mental">Verringert bei jeder Stufe die Chance von mentalen Effekten geplagt zu werden um %1$d %%, bis hin zu einem Maximum von %2$d %%. Das beinhaltet von Gegnern hinzugefügte Effekte wie Benommenheit oder Schwächung der Waffen.</string>
+    <string name="skill_longdescription_resistance_physical_capacity">Verringert bei jeder Stufe die Chance von physischen Effekten geplagt zu werden um %1$d %%, bis hin zu einem Maximum von %2$d %%. Das beinhaltet von Gegnern hinzugefügte Effekte wie Ermüdung.</string>
+    <string name="skill_longdescription_resistance_blood_disorder">Verringert bei jeder Stufe die Chance von Blutstörungen geplagt zu werden um %1$d %%, bis hin zu einem Maximum von %2$d %%. Das beinhaltet von Gegnern hinzugefügte Effekte wie Gift oder Blutende Wunden.</string>
+    
+    <string name="skillinfo_action_levelup">Erlernen</string>
+    <string name="skill_current_level">Aktuelle Stufe: %1$d</string>
+    <string name="skill_current_level_with_maximum">Aktuelle Stufe: %1$d / %2$d</string>
+    <string name="skill_prerequisite_other_skill">Um diesen Skill zu erlernen, wird mindestens die %1$d. Stufe des Skills %2$s benötigt.</string>
+    <string name="skill_prerequisite_level">Um diesen Skill zu erlernen, wird mindestens das Erfahrungslevel %1$d benötigt.</string>
+    <string name="skill_prerequisite_stat">Um diesen Skill zu erlernen, wird mindestens %1$d %2$s benötigt (Basiskampfeigenschaften).</string>
+    <string name="skill_number_of_increases_one">Du kannst einen Skillpunkt ausgeben.</string>
+    <string name="skill_number_of_increases_several">Du kannst %1$d Skillpunkte ausgeben.</string>
+    <string name="levelup_adds_new_skillpoint">In diesem Level erhälst du einen neuen Skillpunkt!</string>
+
+       <string name="loadsave_save_to_new_slot">Neuen Speicherplatz anlegen</string>
+       <string name="loadsave_save_overwrite_confirmation_title">Speicherplatz überschreiben?</string>
+       <string name="loadsave_save_overwrite_confirmation">Dieser Speicherplatz enthält einen anderen Spielernamen (%1$s) als den aktuellen Spielernamen (%2$s). Soll dieser Spielstand wirklich überschrieben werden?</string> 
+       
+       <string-array name="iteminfo_displaytypes">
+               <item>Gewöhnlich</item>
+               <item>Quest Gegenstand</item>
+               <item>Legendär</item>
+               <item>Außergewöhnlich</item>
+               <item>Selten</item>
+       </string-array>
+       
+       <string name="actorconditioninfo_category">Condition category: %1$s</string>
+       <string-array name="actorcondition_categories">
+               <item>Geistig</item>
+               <item>Mental</item>
+               <item>Physisch</item>
+               <item>Blutstörungen</item>
+       </string-array>
+       
+       <string name="traitsinfo_base_max_hp">Max LP:</string>
+       <string name="traitsinfo_base_max_ap">Max AP:</string>
+       <string name="menu_save_saving_not_allowed_in_combat">Das Spiel kann während des Kampfes nicht gespeichert werden.</string>
+       
+       <string name="preferences_optimized_drawing_title">Optimierter Bildschirmaufbau</string>
+       <string name="preferences_optimized_drawing">Deaktiviere diese Option wenn du Grafikfehler siehst. Wenn diese Einstellung aktiv ist, werden bei jedem Frame nur die geänderten Teile des Bildschirms neu gezeichnet.</string>
+       
 </resources>
index 59b729ebc126243f0436b128b09e9b2b8f519096..1c654414b2b3e5c926fc4e82e16bfb17993c7647 100644 (file)
 {ambelie_7|Don\'t you know of Nor City? I will take note that the savages here haven\'t even heard of the city.|||{{N|ambelie_8||||}}|};
 {ambelie_8|I am beginning to be even more certain that Nor City will never, even in my wildest dreams, be comparable to the great city of Feygard.|||{{Good luck on your excursion.|ambelie_10||||}}|};
 {ambelie_9|All the noblewomen in Feygard keep talking about the mysterious Shadow in Nor City. I just have to see it myself.|||{{Nor City, where is that?|ambelie_7||||}{Good luck on your excursion.|ambelie_10||||}}|};
-{ambelie_10|Thank you. Now please leave before someone sees me talking to a commoner like you.|||{{Commoner? Are you trying to insult me? Goodbye.|X||||}{Whatever, you probably wouldnt even survive a forest wasp.|X||||}}|};
+{ambelie_10|Thank you. Now please leave before someone sees me talking to a commoner like you.|||{{Commoner? Are you trying to insult me? Goodbye.|X||||}{Whatever, you probably wouldn\'t even survive a forest wasp.|X||||}}|};
        </string>
 
        <string name="conversationlist_foamingflask_guards">
        <string name="conversationlist_hadracor">
 [id|message|progressQuest|rewardDropListID|replies[text|nextPhraseID|requires_Progress|requires_itemID|requires_Quantity|]|];
 {woodcutter_0|Stupid wasps..||||};
-{woodcutter_2|Stay away from the road to the west, for it leads to Carn Tower. And you most certainly do not want to go there.|||{{N|woodcutter_1||||}}|};
+{woodcutter_2|Stay away from the road to the west, for it leads to Carn Tower. You most certainly do not want to go there.|||{{N|woodcutter_1||||}}|};
 {woodcutter_1|When travelling, keep to the roads. Veer off course and you might find yourself in danger.||||};
-{woodcutter_3|Maybe we shouldn\'t have cut down all the trees over there. Those wasps really seemed upset.||||};
+{woodcutter_3|Maybe we shouldn\'t have cut down all the trees over there. Those wasps really seem upset.||||};
 {woodcutter_4|I can still feel the sting from those wasps in my legs. Good thing we are done with all the trees now.||||};
 {woodcutter_5|Hello there, welcome to our encampment. You should talk to Hadracor over there.||||};
 
 {benbyr_story_3_4|Then I will surely disappoint you. Return to me once you are ready for my task.||||};
 {benbyr_story_3_3|The noble adventurer. He he, I like that. Yes, you will do fine.|||{{N|benbyr_story_4||||}}|};
 {benbyr_story_4|A while ago, I did some business with a certain man called Tinlyn, over here at this Crossroads guardhouse.|||{{N|benbyr_story_5||||}}|};
-{benbyr_story_5|As to the nature of our business, I can\'t really tell you. But let\'s just say that our business was of the kind that it was be beneficial for us both that the guards did not know about it.|||{{N|benbyr_story_6||||}}|};
+{benbyr_story_5|As to the nature of our business, I can\'t really tell you. Let\'s just say that our business was of the kind that it was be beneficial for us both that the guards did not know about it.|||{{N|benbyr_story_6||||}}|};
 {benbyr_story_6|We were ready to finish the big deal, me and Tinlyn. That\'s when he decided to turn on me.|||{{N|benbyr_story_7||||}}|};
 {benbyr_story_7|He reported me to the guards, and made me take the whole blame for our business.|||{{N|benbyr_story_8||||}}|};
 {benbyr_story_8|I was sent to Feygard prison, while he himself was set free for reporting me.|||{{N|benbyr_story_8_1||||}}|};
 {crossroads_guard_3|Go away, kid.||||};
 
 {cr_loneford_st_1|Didn\'t you hear? They have all gotten ill.|||{{N|cr_loneford_st_2||||}}|};
-{cr_loneford_st_2|It all started a few days ago. As the story goes, someone found one of the farmers passed out on one of the fields, completely white face and shivering.|||{{N|cr_loneford_st_3||||}}|};
+{cr_loneford_st_2|It all started a few days ago. As the story goes, someone found one of the farmers passed out in one of the fields, completely white faced and shivering.|||{{N|cr_loneford_st_3||||}}|};
 {cr_loneford_st_3|A few days later, the same symptoms started to show on a lot more people.|||{{N|cr_loneford_st_4||||}}|};
 {cr_loneford_st_4|Then, all people showed the symptoms in one way or another.|||{{N|cr_loneford_st_5||||}}|};
 {cr_loneford_st_5|Some old people even died.|||{{N|cr_loneford_st_6||||}}|};
 {minarra_first_6_1|See this wide road that goes outside this guardhouse? That\'s the Duleian road. It goes all the way from the glorious city of Feygard up in the northwest down to the wretched Nor City in the southeast.|||{
        {You mentioned some problems in Loneford, what problems are that?|cr_loneford_st_1||||}
        }|};
-{minarra_story_1|I saw a band of rough looking men on travelling up the Duleian road. Usually, a band of rough looking men is not something that\'s worth getting all excited about.|||{{N|minarra_story_2||||}}|};
+{minarra_story_1|I saw a band of rough looking men travelling up the Duleian road. Usually, a band of rough looking men is not something that\'s worth getting all excited about.|||{{N|minarra_story_2||||}}|};
 {minarra_story_2|But these men matched the description of some people that are wanted by the Feygard patrol.|||{{N|minarra_story_3||||}}|};
 {minarra_story_3|If I saw correctly, these men were the band of rogues led by a man called Rogorn, that we are looking to apprehend for several ruthless cases of murder and theft.|||{{N|minarra_story_4||||}}|};
 {minarra_story_4|Their leader, Rogorn, is a particularly savage man according to the reports from Feygard that I have read.|||{{N|minarra_story_5||||}}|};
        {What is this place?|gallain_cr_1||||}
        }|};
 {gallain_cr_1|As I said, this is the Crossroads guardhouse. The guards from Feygard are using this place as a place to rest and gear up.|||{{N|gallain_cr_2||||}}|};
-{gallain_cr_2|Because of this, it is also a safe haven for merchants travelling through here. And we get at lot of those.|||{{N|gallain_1||||}}|};
+{gallain_cr_2|Because of this, it is also a safe haven for merchants travelling through here. We get at lot of those.|||{{N|gallain_1||||}}|};
 {gallain_trade_1|Here, have a look.|||{{Trade|S||||}}|};
 {gallain_rest_1|The guards have set up some beds downstairs. Go check with them.|||{{N|gallain_1||||}}|};
 
 {buceth_gold_no|Hrmpf. Thanks for the gold, but I am not interested in talking to you. Now, please leave.||||};
 {buceth_gold_yes|You seem to realize the true value of the Shadow. Yes, this will do fine, thank you.|loneford:41||{{N|buceth_story_1||||}}|};
 {buceth_5|Let\'s assume you live in a village that, for the most part, keeps to itself. Your village is self-sustainable and the crops have been good for some years.|||{{N|buceth_6||||}}|};
-{buceth_6|With the few exceptions of a some fights here and there between villagers because of misunderstandings, on the whole, your village is a friendly peaceful village.|||{{N|buceth_7||||}}|};
+{buceth_6|With the few exceptions of some fights here and there between villagers because of misunderstandings, on the whole, your village is a friendly, peaceful village.|||{{N|buceth_7||||}}|};
 {buceth_7|You work in the same profession as your parents, which in turn worked in the same professions as their parents.|||{{N|buceth_8||||}}|};
 {buceth_8|Let\'s also assume that the way you conduct your business is the same way that the people in the village have been conducting their business for generations past.|||{{N|buceth_9||||}}|};
 {buceth_9|Everyone respects one another in the village, and your appointed leader does a good job at keeping everyone\'s interests satisfied, while at the same time being reasonably fair.|||{{N|buceth_10||||}}|};
        {Do you have anything to trade?|S||||}
        }|};
 {talion_1|The people of Loneford are very keen on following the will of Feygard, whatever it may be.|||{{N|talion_2||||}}|};
-{talion_2|Normally, this would not be a problem. But Lord Geomyr seems to have something against the Shadow. He will do almost anything to oppose all actions that in some way are extend the reach of the Shadow.|||{{N|talion_3||||}}|};
+{talion_2|Normally, this would not be a problem. But Lord Geomyr seems to have something against the Shadow. He will do almost anything to oppose all actions that in some way extend the reach of the Shadow.|||{{N|talion_3||||}}|};
 {talion_3|Because of this, the people of Loneford are now actively abolishing the thought of the Shadow guiding them through their lives.|||{{N|talion_4||||}}|};
 {talion_4|People around here would rather follow the law of Feygard than follow the old ways.|||{{N|talion_5||||}}|};
 {talion_5|My feeling is that this illness is caused by the Shadow, as punishment to all of us here in Loneford.|loneford:23||{{N|loneford_ill_c_1||||}}|};
        {I have some Izthiel claws to sell you.|gauward_sell_1|nondisplay:20|||}
        }|};
 {gauward_1|This place used to be a safe house for travellers between Loneford and Brimhaven, before they had finished the road between the villages.|||{{N|gauward_2||||}}|};
-{gauward_2|But nowadays, no one rarely comes here - because of those cursed creatures from the river.|||{{N|gauward_3||||}}|};
+{gauward_2|But nowadays, anyone rarely comes here - because of those cursed creatures from the river.|||{{N|gauward_3||||}}|};
 {gauward_3|Izthiel, they call them.|||{{N|gauward_4||||}}|};
 {gauward_4|Ack, if it wasn\'t for those things out there, I am sure a lot of people would come by here more often.|||{
        {Would you like me to kill the creatures for you?|gauward_5||||}
index 5100a1c0234785a779cc8519039403f8f65cf9ca..5a6219760a402a4c1b3dd80671e33fb059ef76fa 100644 (file)
@@ -89,7 +89,7 @@
        <string name="inventory_item_equipped">You equipped %1$s.</string>
 
        <string name="dialog_loot_pickall">Pick up all</string>
-       <string name="dialog_loot_foundgold">You found %1$d gold.</string>
+       <string name="dialog_loot_foundgold">You found %1$d gold. </string>
        <string name="dialog_loot_pickedupitem">You picked up an item. </string>
        <string name="dialog_loot_pickedupitems">You picked up %1$d items. </string>
        <string name="dialog_groundloot_title">Items</string>
index d586ae58eb37a655edfab07994a158aff0ae2790..f744459cf19450f9c16610df508ebf49c5aa3aa7 100644 (file)
@@ -65,7 +65,7 @@
  </layer>
  <layer name="Walkable" width="30" height="30">
   <data encoding="base64" compression="zlib">
-   eJzFlNkNwDAIQ7MC+y/b3xYFbHOoSKhSDh4OFDtfs5d7M7CvWHQfxd7iIrbXfvMK117fijbEZ2Le7k/pqpxjuVkdEL/KzfJhzmRc1FPsGpObyo2YUextbsS8nUN9knGj/Cr9rM42pSen7qr/QfefYeoS1bNjyuyetg6Xybu6p+SgrHs2qnl3Jqpsxb3WjmZUS2YmTnCz90fxOtzoDoqZ6VXXVb1RH2Q5dfUqfc+8FZOr0qfb7HN29Uz5H+xp5gNZ3hpe
+   eJzFlF0KwDAIg3uF3v+ye91KYxJ/mCADW/10Wvf6yj5UPXMF+bPYU1zGPmu/aYa7X99MbYyvxGS9Zr6K3bmncqM+MH6WG+Wj3GFvSnl/zKbk5nIRE8We5iLm7R6bk4iL8svMs7vbnJns8nXfQfXNKH1B/ayIs7u7pcJV8s6eOTk49pPNel7diS7b0bPWSs2sl8pO7OBG/5/Fq3CRD4sZ1eva3XrRHEQ5Vet15l75V0quzpxOs9earadL/2B3Mx9HIRpv
   </data>
  </layer>
  <objectgroup name="Mapevents" width="30" height="30">
@@ -87,7 +87,7 @@
     <property name="place" value="north"/>
    </properties>
   </object>
-  <object name="north" type="mapchange" x="224" y="0" width="96" height="32">
+  <object name="north" type="mapchange" x="256" y="0" width="96" height="32">
    <properties>
     <property name="map" value="fields0"/>
     <property name="place" value="south"/>
index f5da0ab78fd6047184f3de8227a0a9f7d14c890a..a2497868d115a4f646be8085cee24503959f2e1f 100644 (file)
@@ -11,7 +11,6 @@ import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
 import com.gpl.rpg.AndorsTrail.R;
 import com.gpl.rpg.AndorsTrail.context.ViewContext;
 import com.gpl.rpg.AndorsTrail.context.WorldContext;
-import com.gpl.rpg.AndorsTrail.model.map.MapObject;
 
 public final class DebugInterface {
        private final ViewContext viewContext;
@@ -48,7 +47,7 @@ public final class DebugInterface {
                                mainActivity.showToast("DEBUG: damagePotential=1", Toast.LENGTH_SHORT);
                                }
                        })*/
-                       ,new DebugButton("items", new OnClickListener() {
+                       /*,new DebugButton("items", new OnClickListener() {
                        @Override
                                public void onClick(View arg0) {
                                world.model.player.inventory.addItem(world.itemTypes.getItemType("elytharan_redeemer"));
@@ -67,7 +66,7 @@ public final class DebugInterface {
                                mainActivity.updateStatus();
                                mainActivity.showToast("DEBUG: added items", Toast.LENGTH_SHORT);
                                }
-                       })
+                       })*/
                        /*new DebugButton("skills++", new OnClickListener() {
                        @Override
                                public void onClick(View arg0) {
@@ -133,6 +132,7 @@ public final class DebugInterface {
                                mainActivity.showToast("DEBUG: added 10k exp", Toast.LENGTH_SHORT);
                                }
                        })
+                       /*
                        ,new DebugButton("cg", new OnClickListener() {
                        @Override
                                public void onClick(View arg0) {
@@ -169,6 +169,8 @@ public final class DebugInterface {
                                viewContext.movementController.placePlayerAt(MapObject.MAPEVENT_NEWMAP, "roadtocarntower1", "left3", 0, 0);
                                }
                        })
+                       */
+                       
        });
        }
 
index b796d3ba860907d66e75723bfa476d5d77ffab48..66faaed0472008945e4a382d5b3f4d1e9339a1d4 100644 (file)
@@ -1,5 +1,7 @@
 package com.gpl.rpg.AndorsTrail.activity;
 
+import java.util.HashSet;
+
 import android.app.Activity;
 import android.app.TabActivity;
 import android.content.Intent;
@@ -20,6 +22,7 @@ import com.gpl.rpg.AndorsTrail.model.actor.Player;
 import com.gpl.rpg.AndorsTrail.model.item.ItemContainer;
 import com.gpl.rpg.AndorsTrail.model.item.ItemType;
 import com.gpl.rpg.AndorsTrail.model.item.Loot;
+import com.gpl.rpg.AndorsTrail.resource.tiles.TileCollection;
 import com.gpl.rpg.AndorsTrail.view.ShopItemContainerAdapter;
 import com.gpl.rpg.AndorsTrail.view.ShopItemContainerAdapter.OnContainerItemClickedListener;
 
@@ -70,8 +73,11 @@ public final class ShopActivity extends TabActivity implements OnContainerItemCl
         npc.dropList.createRandomLoot(merchantLoot, player);
         container_buy = merchantLoot.items;
         
-        buyListAdapter = new ShopItemContainerAdapter(this, world.tileManager, player, container_buy, this, false);
-        sellListAdapter = new ShopItemContainerAdapter(this, world.tileManager, player, player.inventory, this, true);
+        HashSet<Integer> iconIDs = world.tileManager.getTileIDsFor(container_buy);
+        iconIDs.addAll(world.tileManager.getTileIDsFor(player.inventory));
+        TileCollection tiles = world.tileManager.tileCache.loadTilesFor(iconIDs, res);
+        buyListAdapter = new ShopItemContainerAdapter(this, tiles, world.tileManager, player, container_buy, this, false);
+        sellListAdapter = new ShopItemContainerAdapter(this, tiles, world.tileManager, player, player.inventory, this, true);
                shoplist_buy.setAdapter(buyListAdapter);
         shoplist_sell.setAdapter(sellListAdapter);
         
index c57e08bb440a5365bda63a69770b5f2ba0b3e552..6a76c8b1a1c466635fff8cd5a2b33af978514506 100644 (file)
@@ -195,6 +195,11 @@ public final class CombatController implements VisualEffectCompletedCallback {
                        }
                        message(msg);
                        
+                       if (lastAttackResult.targetDied) {
+                               playerKilledMonster(currentlyAttackedMonster);
+                       }
+                       context.mainActivity.updateStatus();
+                       
                        startAttackEffect(attack, model.uiSelections.selectedPosition, this, CALLBACK_PLAYERATTACK);
                } else {
                        message(r.getString(R.string.combat_result_heromiss));
@@ -204,7 +209,6 @@ public final class CombatController implements VisualEffectCompletedCallback {
        
        private void playerAttackCompleted() {
                if (lastAttackResult.targetDied) {
-                       playerKilledMonster(currentlyAttackedMonster);
                        Monster nextMonster = getAdjacentMonster();
                        if (nextMonster == null) {
                                exitCombat(true);
@@ -225,7 +229,6 @@ public final class CombatController implements VisualEffectCompletedCallback {
                killedMonster.createLoot(loot, player);
                
                model.currentMap.remove(killedMonster);
-               context.mainActivity.redrawAll(MainView.REDRAW_ALL_MONSTER_KILLED);
                
                player.ap.add(player.getSkillLevel(SkillCollection.SKILL_CLEAVE) * SkillCollection.PER_SKILLPOINT_INCREASE_CLEAVE_AP, false);
                player.health.add(player.getSkillLevel(SkillCollection.SKILL_EATER) * SkillCollection.PER_SKILLPOINT_INCREASE_EATER_HEALTH, false);
@@ -244,6 +247,8 @@ public final class CombatController implements VisualEffectCompletedCallback {
                        ItemController.updateLootVisibility(context, loot);
                        if (model.uiSelections.isInCombat) killedMonsterBags.add(loot);
                }
+               
+               context.mainActivity.redrawAll(MainView.REDRAW_ALL_MONSTER_KILLED);
     }
 
        private void maybeAutoEndTurn() {
index e26f9c18925bf7b6c7c5d684e7dcbf6d43f259b0..0ad46bae42b88280d7784065774383d6aa60eeba 100644 (file)
@@ -7,10 +7,9 @@ import java.util.HashSet;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import android.util.Pair;
-
 import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
 import com.gpl.rpg.AndorsTrail.util.L;
+import com.gpl.rpg.AndorsTrail.util.Pair;
 
 public class ResourceFileTokenizer {
        private static final Pattern rowPattern = Pattern.compile("\\{(.+?)\\};", Pattern.MULTILINE | Pattern.DOTALL);
index 4989bd1382f1b4280840e9ecae0ceb4645ef699f..f6180510916fe4fb4848c85ae26520a00f9afcf5 100644 (file)
@@ -1,10 +1,9 @@
 package com.gpl.rpg.AndorsTrail.resource.parsers;
 
-import android.util.Pair;
-
 import com.gpl.rpg.AndorsTrail.model.ability.ActorConditionType;
 import com.gpl.rpg.AndorsTrail.resource.DynamicTileLoader;
 import com.gpl.rpg.AndorsTrail.resource.ResourceFileTokenizer.ResourceParserFor;
+import com.gpl.rpg.AndorsTrail.util.Pair;
 
 public final class ActorConditionsTypeParser extends ResourceParserFor<ActorConditionType> {
        
index 5c98f9ce6afa3bdc7384895c3f3ecf852e33545e..ef6245f3d2ca83ecc5ae77159a84ff15cd34fa42 100644 (file)
@@ -2,13 +2,12 @@ package com.gpl.rpg.AndorsTrail.resource.parsers;
 
 import java.util.ArrayList;
 
-import android.util.Pair;
-
 import com.gpl.rpg.AndorsTrail.conversation.Phrase;
 import com.gpl.rpg.AndorsTrail.conversation.Phrase.Reply;
 import com.gpl.rpg.AndorsTrail.model.quest.QuestProgress;
 import com.gpl.rpg.AndorsTrail.resource.ResourceFileTokenizer;
 import com.gpl.rpg.AndorsTrail.resource.ResourceFileTokenizer.ResourceParserFor;
+import com.gpl.rpg.AndorsTrail.util.Pair;
 
 public final class ConversationListParser extends ResourceParserFor<Phrase> {
        
index 56a0ae810a85aaf3055d5d047a0e3f59833f108d..f1747f9f847d6aae7e213fa3c0c90607b6364bca 100644 (file)
@@ -2,8 +2,6 @@ package com.gpl.rpg.AndorsTrail.resource.parsers;
 
 import java.util.ArrayList;
 
-import android.util.Pair;
-
 import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
 import com.gpl.rpg.AndorsTrail.model.item.DropList;
 import com.gpl.rpg.AndorsTrail.model.item.ItemTypeCollection;
@@ -11,6 +9,7 @@ import com.gpl.rpg.AndorsTrail.model.item.DropList.DropItem;
 import com.gpl.rpg.AndorsTrail.resource.ResourceFileTokenizer;
 import com.gpl.rpg.AndorsTrail.resource.ResourceFileTokenizer.ResourceParserFor;
 import com.gpl.rpg.AndorsTrail.util.L;
+import com.gpl.rpg.AndorsTrail.util.Pair;
 
 public final class DropListParser extends ResourceParserFor<DropList> {
 
index b834bc0de1395d1fe1e3c0368e7e281e899de15f..06e09da368b49b107b27f8d6a5026a51f2838f8e 100644 (file)
@@ -1,13 +1,12 @@
 package com.gpl.rpg.AndorsTrail.resource.parsers;
 
-import android.util.Pair;
-
 import com.gpl.rpg.AndorsTrail.model.ability.ActorConditionTypeCollection;
 import com.gpl.rpg.AndorsTrail.model.item.ItemTraits_OnEquip;
 import com.gpl.rpg.AndorsTrail.model.item.ItemTraits_OnUse;
 import com.gpl.rpg.AndorsTrail.model.item.ItemType;
 import com.gpl.rpg.AndorsTrail.resource.DynamicTileLoader;
 import com.gpl.rpg.AndorsTrail.resource.ResourceFileTokenizer.ResourceParserFor;
+import com.gpl.rpg.AndorsTrail.util.Pair;
 
 public final class ItemTypeParser extends ResourceParserFor<ItemType> {
 
index e77ee3a8530639a15e032ffb9fe79cae9726138b..ddf8f9526771d5297115810c64301a0792607c6e 100644 (file)
@@ -1,7 +1,5 @@
 package com.gpl.rpg.AndorsTrail.resource.parsers;
 
-import android.util.Pair;
-
 import com.gpl.rpg.AndorsTrail.controller.Constants;
 import com.gpl.rpg.AndorsTrail.model.CombatTraits;
 import com.gpl.rpg.AndorsTrail.model.ability.ActorConditionTypeCollection;
@@ -10,6 +8,7 @@ import com.gpl.rpg.AndorsTrail.model.item.DropListCollection;
 import com.gpl.rpg.AndorsTrail.model.item.ItemTraits_OnUse;
 import com.gpl.rpg.AndorsTrail.resource.DynamicTileLoader;
 import com.gpl.rpg.AndorsTrail.resource.ResourceFileTokenizer.ResourceParserFor;
+import com.gpl.rpg.AndorsTrail.util.Pair;
 import com.gpl.rpg.AndorsTrail.util.Size;
 
 public final class MonsterTypeParser extends ResourceParserFor<MonsterType> {
index 16acea7edb414c6b2dd6488e829127e061ba8ea7..bc92956c11ec6ff117f7282046c04d6981b285a5 100644 (file)
@@ -4,12 +4,11 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
 
-import android.util.Pair;
-
 import com.gpl.rpg.AndorsTrail.model.quest.Quest;
 import com.gpl.rpg.AndorsTrail.model.quest.QuestLogEntry;
 import com.gpl.rpg.AndorsTrail.resource.ResourceFileTokenizer;
 import com.gpl.rpg.AndorsTrail.resource.ResourceFileTokenizer.ResourceParserFor;
+import com.gpl.rpg.AndorsTrail.util.Pair;
 
 public final class QuestParser extends ResourceParserFor<Quest> {
        private int sortOrder = 0;
index 8b60fa301ecebcc4bcd0508920394cfda0d7d51f..1abd823710b0914ce76c3d77383308d8fcb610d7 100644 (file)
@@ -54,18 +54,19 @@ public final class TileManager {
        
        
        public TileCollection loadTilesFor(ItemContainer container, Resources r) {
+               return tileCache.loadTilesFor(getTileIDsFor(container), r);
+       }
+       
+       public HashSet<Integer> getTileIDsFor(ItemContainer container) {
                HashSet<Integer> iconIDs = new HashSet<Integer>();
                for(ItemEntry i : container.items) {
                        iconIDs.add(i.itemType.iconID);
                }
-               return tileCache.loadTilesFor(iconIDs, r);
+               return iconIDs;
        }
        
        public TileCollection loadTilesFor(Inventory inventory, Resources r) {
-               HashSet<Integer> iconIDs = new HashSet<Integer>();
-               for(ItemEntry i : inventory.items) {
-                       iconIDs.add(i.itemType.iconID);
-               }
+               HashSet<Integer> iconIDs = getTileIDsFor(inventory);
                for(ItemType t : inventory.wear) {
                        if (t != null) iconIDs.add(t.iconID);
                }
@@ -150,12 +151,14 @@ public final class TileManager {
                                HashSet<String> adjacentMapNames = new HashSet<String>();
                                for (MapObject o : nextMap.eventObjects) {
                                        if (o.type != MapObject.MAPEVENT_NEWMAP) continue;
+                                       if (o.map == null) continue;
                                        adjacentMapNames.add(o.map);
                                }
                                
                                HashSet<Integer> tileIDs = new HashSet<Integer>();
                                for (String mapName : adjacentMapNames) {
                                        PredefinedMap adjacentMap = world.maps.findPredefinedMap(mapName);
+                                       if (adjacentMap == null) continue;
                                        LayeredTileMap adjacentMapTiles = TMXMapTranslator.readLayeredTileMap(res, tileCache, adjacentMap);
                                        tileIDs.addAll(getTileIDsFor(adjacentMap, adjacentMapTiles, world));
                                }
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/util/Pair.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/util/Pair.java
new file mode 100644 (file)
index 0000000..663dc10
--- /dev/null
@@ -0,0 +1,11 @@
+package com.gpl.rpg.AndorsTrail.util;
+
+// Should really use android.util.Pair<> instead, but it is not available for API level 4 (Android 1.6).
+public final class Pair<T1, T2> {
+       public final T1 first;
+       public final T2 second;
+       public Pair(T1 a, T2 b) {
+               this.first = a;
+               this.second = b;
+       }
+}
index 8a073c2b041466c1c3ad382ae72298a1ef6b3b7e..d1fb9de9bdcf41f859ded3acedd8ffb55e64b5de 100644 (file)
@@ -27,10 +27,10 @@ public final class ShopItemContainerAdapter extends ArrayAdapter<ItemEntry> {
        private final Resources r;
        private final Player player;
        
-       public ShopItemContainerAdapter(Context context, TileManager tileManager, Player player, ItemContainer items, OnContainerItemClickedListener clickListener, boolean isSelling) {
+       public ShopItemContainerAdapter(Context context, TileCollection tileCollection, TileManager tileManager, Player player, ItemContainer items, OnContainerItemClickedListener clickListener, boolean isSelling) {
                super(context, 0, items.items);
                this.tileManager = tileManager;
-               this.tileCollection = tileManager.loadTilesFor(items, context.getResources());
+               this.tileCollection = tileCollection;
                this.player = player;
                this.clickListener = clickListener;
                this.isSelling = isSelling;
@@ -39,7 +39,6 @@ public final class ShopItemContainerAdapter extends ArrayAdapter<ItemEntry> {
 
        @Override
        public View getView(final int position, View convertView, ViewGroup parent) {
-               //return new InventoryItemView(getContext(), getItem(position));
                final ItemEntry item = getItem(position);
                final ItemType itemType = item.itemType;