]> www.infradead.org Git - users/mchehab/andors-trail.git/commitdiff
Bumped version number to v0.6.11b1.
authoroskar.wiksten <oskar.wiksten@08aca716-68be-ccc6-4d58-36f5abd142ac>
Sun, 27 May 2012 21:27:18 +0000 (21:27 +0000)
committeroskar.wiksten <oskar.wiksten@08aca716-68be-ccc6-4d58-36f5abd142ac>
Sun, 27 May 2012 21:27:18 +0000 (21:27 +0000)
Fixed issue with actor conditions not being removed when re-equipping items.
Corrected conversations about Larni living in the northwest (he lives in the north) (thanks Sarumar!)

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

AndorsTrail/AndroidManifest.xml
AndorsTrail/res/values/content_conversationlist.xml
AndorsTrail/res/values/content_questlist.xml
AndorsTrail/src/com/gpl/rpg/AndorsTrail/AndorsTrailApplication.java
AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/ItemController.java
AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/actor/Player.java

index 375ac965a485308653d719ff0a5ddd6dfb73b823..86109baf2fe1001f1b0e61c02275df0de63595ba 100644 (file)
@@ -3,8 +3,8 @@
 <manifest 
        xmlns:android="http://schemas.android.com/apk/res/android" 
        package="com.gpl.rpg.AndorsTrail"
-       android:versionCode="27"
-       android:versionName="0.6.11a1"
+       android:versionCode="28"
+       android:versionName="0.6.11b1"
        android:installLocation="auto"
        >
        <uses-sdk 
index 533a697b93cfe291e9f339111c1c3570e10e0edb..eab5de39a8744f46095de24ecf018297c3d0b96c 100644 (file)
 {algangror_task2_9|You will place them by the beds of five particular persons, and you must hide it well so that the person does not find the idol itself.||{{N|algangror_task2_10|||||}}|};
 {algangror_task2_10|Remember, it is of utmost importance that you be as discreet as possible about this. The idols must not be found once you have placed them, and no one must notice that you place the idols.|{{0|fiveidols|30|}}|{{Go on.|algangror_task2_11|||||}}|};
 {algangror_task2_11|So, the first person that I want you to visit is Jhaeld. I hear that he spends most of his time in the Remgard tavern these days.|{{0|fiveidols|31|}}|{{N|algangror_task2_12|||||}}|};
-{algangror_task2_12|Secondly, I want you to visit one of the farmers named Larni. He lives in a cabin with his wife Caeda to the northwest in Remgard.|{{0|fiveidols|32|}}|{{N|algangror_task2_13|||||}}|};
+{algangror_task2_12|Secondly, I want you to visit one of the farmers named Larni. He lives with his wife Caeda here in Remgard in one of the northen cabins.|{{0|fiveidols|32|}}|{{N|algangror_task2_13|||||}}|};
 {algangror_task2_13|The third person is Arnal the weapon-smith, that lives in the northwest of Remgard.|{{0|fiveidols|33|}}|{{N|algangror_task2_14|||||}}|};
 {algangror_task2_14|Fourth is Emerei, that can probably be found in his house to the southeast of Remgard.|{{0|fiveidols|34|}}|{{N|algangror_task2_15|||||}}|};
 {algangror_task2_15|The fifth person is the farmer Carthe. Carthe lives on the eastern shore of Remgard, near the tavern.|{{0|fiveidols|35|}}|{{N|algangror_task2_16|||||}}|};
index f760aebfd59c0f6446715128f0e4aeea542fcc88..c49b413386c0524696ed04e1a70d7d7ce6b7b950 100644 (file)
        {20|I have agreed to help Algangror with her task.|||}
        {30|Algangror wants me to place five idols near five different people in Remgard. The idols should be placed near the beds of these five people, and must be hidden so that they are not found easily.|||}
        {31|The first person is Jhaeld, the village elder that can be found in the Remgard tavern.|||}
-       {32|Second, I should place an idol by the bed of Larni the farmer, that lives in a cabin to the northwest in Remgard.|||}
+       {32|Second, I should place an idol by the bed of Larni the farmer, that lives in one of the northern cabins in Remgard.|||}
        {33|The third person is Arnal the weapon-smith, that lives in the northwest of Remgard.|||}
        {34|Fourth is Emerei, that can be found to the southeast of Remgard.|||}
        {35|The fifth person is Carthe. Carthe lives on the eastern shore of Remgard, near the tavern.|||}
index 1da0b1bdfb6d9e8f655cc3fd4a59f8c37b72c792..86df198b3fc15afd812b94fee0534b7fb5fdc6a5 100644 (file)
@@ -20,8 +20,8 @@ public final class AndorsTrailApplication extends Application {
        public static final boolean DEVELOPMENT_VALIDATEDATA = false;\r
        public static final boolean DEVELOPMENT_DEBUGMESSAGES = false;\r
        public static final boolean DEVELOPMENT_INCOMPATIBLE_SAVEGAMES = DEVELOPMENT_DEBUGRESOURCES || false;\r
-       public static final int CURRENT_VERSION = DEVELOPMENT_INCOMPATIBLE_SAVEGAMES ? 999 : 27;\r
-       public static final String CURRENT_VERSION_DISPLAY = "0.6.11a1";\r
+       public static final int CURRENT_VERSION = DEVELOPMENT_INCOMPATIBLE_SAVEGAMES ? 999 : 28;\r
+       public static final String CURRENT_VERSION_DISPLAY = "0.6.11b1";\r
        \r
        public final WorldContext world = new WorldContext();\r
        public final WorldSetup setup = new WorldSetup(world, this);\r
index da00622d56ca68e9ec1de6cdab37a9500db25938..8e1cea16b25c54f7e64997515afe66e0c19d7e00 100644 (file)
@@ -9,6 +9,7 @@ import com.gpl.rpg.AndorsTrail.context.ViewContext;
 import com.gpl.rpg.AndorsTrail.context.WorldContext;
 import com.gpl.rpg.AndorsTrail.model.CombatTraits;
 import com.gpl.rpg.AndorsTrail.model.ModelContainer;
+import com.gpl.rpg.AndorsTrail.model.ability.ActorConditionEffect;
 import com.gpl.rpg.AndorsTrail.model.ability.SkillCollection;
 import com.gpl.rpg.AndorsTrail.model.actor.Player;
 import com.gpl.rpg.AndorsTrail.model.item.Inventory;
@@ -53,14 +54,15 @@ public final class ItemController {
                if (!player.inventory.removeItem(type.id, 1)) return;
                
                if (!player.inventory.isEmptySlot(slot)) {
-                       player.inventory.addItem(player.inventory.wear[slot]);
+                       ItemType removedItemType = player.inventory.wear[slot];
+                       player.inventory.addItem(removedItemType);
+                       player.inventory.wear[slot] = null;
+                       ActorStatsController.removeConditionsFromUnequippedItem(player, removedItemType);
                }
                player.inventory.wear[slot] = type;
                
                ActorStatsController.addConditionsFromEquippedItem(player, type);
                ActorStatsController.recalculatePlayerCombatTraits(player);
-               
-       //message(androidContext, androidContext.getResources().getString(R.string.inventory_item_equipped, t.name));
     }
 
        public void unequipSlot(ItemType type, int slot) {
@@ -77,8 +79,6 @@ public final class ItemController {
                
                ActorStatsController.removeConditionsFromUnequippedItem(player, type);
                ActorStatsController.recalculatePlayerCombatTraits(player);
-               
-       //message(androidContext, androidContext.getResources().getString(R.string.inventory_item_unequipped, t.name));
     }
     
     public void useItem(ItemType type) {
@@ -247,4 +247,22 @@ public final class ItemController {
                        view.mainActivity.statusview.updateQuickItemImage(true);
                }
        }
+
+       public static void correctActorConditionsFromItemsPre0611b1(Player player, String conditionTypeID, WorldContext world, String itemTypeIDWithCondition) {
+               if (!player.hasCondition(conditionTypeID)) return;
+               boolean hasItemWithCondition = false;
+               for (ItemType t : player.inventory.wear) {
+                       if (t == null) continue;
+                       if (t.effects_equip == null) continue;
+                       if (t.effects_equip.addedConditions == null) continue;
+                       for(ActorConditionEffect e : t.effects_equip.addedConditions) {
+                               if (!e.conditionType.conditionTypeID.equals(conditionTypeID)) continue;
+                               hasItemWithCondition = true;
+                               break;
+                       }
+               }
+               if (hasItemWithCondition) return;
+               
+               ActorStatsController.removeConditionsFromUnequippedItem(player, world.itemTypes.getItemType(itemTypeIDWithCondition));
+       }
 }
index 00d205038eb2f7ca23926e606244876e64819bba..7b97597dfb63cd7a87c40dc6c7b1081b725441bd 100644 (file)
@@ -14,6 +14,7 @@ import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
 import com.gpl.rpg.AndorsTrail.context.WorldContext;
 import com.gpl.rpg.AndorsTrail.controller.ActorStatsController;
 import com.gpl.rpg.AndorsTrail.controller.Constants;
+import com.gpl.rpg.AndorsTrail.controller.ItemController;
 import com.gpl.rpg.AndorsTrail.model.CombatTraits;
 import com.gpl.rpg.AndorsTrail.model.item.DropListCollection;
 import com.gpl.rpg.AndorsTrail.model.item.Inventory;
@@ -286,6 +287,12 @@ public final class Player extends Actor {
                        final int alignment = src.readInt();
                        alignments.put(faction, alignment);
                }
+               
+               if (fileversion <= 27) {
+                       ItemController.correctActorConditionsFromItemsPre0611b1(this, "bless", world, "elytharan_redeemer");
+                       ItemController.correctActorConditionsFromItemsPre0611b1(this, "blackwater_misery", world, "bwm_dagger");
+                       ItemController.correctActorConditionsFromItemsPre0611b1(this, "regen", world, "ring_shadow0");
+               }
        }
        
        public void writeToParcel(DataOutputStream dest, int flags) throws IOException {