diff --git a/AndorsTrail/res/layout-land/heroinfo_inventory.xml b/AndorsTrail/res/layout-land/heroinfo_inventory.xml
index ac78e2aec..8c5546064 100644
--- a/AndorsTrail/res/layout-land/heroinfo_inventory.xml
+++ b/AndorsTrail/res/layout-land/heroinfo_inventory.xml
@@ -51,7 +51,7 @@
diff --git a/AndorsTrail/res/layout-land/quickitemview.xml b/AndorsTrail/res/layout-land/quickitemview.xml
index d90ea1365..d1bc1f745 100644
--- a/AndorsTrail/res/layout-land/quickitemview.xml
+++ b/AndorsTrail/res/layout-land/quickitemview.xml
@@ -1,9 +1,11 @@
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:gravity="left"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AndorsTrail/res/layout/bulkselection.xml b/AndorsTrail/res/layout/bulkselection.xml
index 614ad23f8..468831194 100644
--- a/AndorsTrail/res/layout/bulkselection.xml
+++ b/AndorsTrail/res/layout/bulkselection.xml
@@ -14,7 +14,7 @@
>
+
+
diff --git a/AndorsTrail/res/layout/conversation.xml b/AndorsTrail/res/layout/conversation.xml
index 0c4c35c7c..678f47b01 100644
--- a/AndorsTrail/res/layout/conversation.xml
+++ b/AndorsTrail/res/layout/conversation.xml
@@ -4,7 +4,6 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
- android:background="@android:color/transparent"
>
\ No newline at end of file
diff --git a/AndorsTrail/res/layout/heroinfo_skill_list.xml b/AndorsTrail/res/layout/heroinfo_skill_list.xml
index d3af267fd..7a9731ebd 100644
--- a/AndorsTrail/res/layout/heroinfo_skill_list.xml
+++ b/AndorsTrail/res/layout/heroinfo_skill_list.xml
@@ -18,6 +18,6 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/heroinfo_listskills_list"
- >
-
+ />
+
diff --git a/AndorsTrail/res/layout/heroinfo_stats.xml b/AndorsTrail/res/layout/heroinfo_stats.xml
index 6d307f182..4b2bc1b8d 100644
--- a/AndorsTrail/res/layout/heroinfo_stats.xml
+++ b/AndorsTrail/res/layout/heroinfo_stats.xml
@@ -111,7 +111,17 @@
android:gravity="left"
/>
-
+
+
diff --git a/AndorsTrail/res/layout/main.xml b/AndorsTrail/res/layout/main.xml
index 414698a1e..277ac14c9 100644
--- a/AndorsTrail/res/layout/main.xml
+++ b/AndorsTrail/res/layout/main.xml
@@ -14,11 +14,10 @@
-
+
-
+
diff --git a/AndorsTrail/res/layout/shop.xml b/AndorsTrail/res/layout/shop.xml
index 2689bbc3f..bd81d2e89 100644
--- a/AndorsTrail/res/layout/shop.xml
+++ b/AndorsTrail/res/layout/shop.xml
@@ -55,7 +55,7 @@
@@ -96,7 +96,7 @@
diff --git a/AndorsTrail/res/values/strings.xml b/AndorsTrail/res/values/strings.xml
index 4e46c0eae..fb418b0a8 100644
--- a/AndorsTrail/res/values/strings.xml
+++ b/AndorsTrail/res/values/strings.xml
@@ -371,6 +371,7 @@
Every full round
Total cost: %1$d gold
Total cost: %1$d gold
+ All
Weapon Accuracy
Hard Hit
@@ -380,7 +381,7 @@
More Criticals
Better Criticals
Combat Speed
- Gold Digger
+ Treasure Hunter
Quick Learner
Cleave
Corpse Eater
@@ -431,12 +432,14 @@
Current level: %1$d / %2$d
To level up this skill, you need at least level %1$d of the %2$s skill.
To level up this skill, you need at least experience level %1$d.
- To level up this skill, you need at least %1$d %2$s.
+ To level up this skill, you need at least %1$d %2$s (unequipped stats).
You may select one skill to increase.
You may select %1$d skills to increase.
This level also gives you a new skill point to spend!
Create new savegame slot
+ Overwrite savegame?
+ This savegame contains a different player name (%1$s) than your current player name (%2$s). Are you sure you want to overwrite this savegame?
- Ordinary
@@ -452,6 +455,9 @@
- Mental
- Physical Capacity
- Blood Disorder
-
+
+
+ Max HP:
+ Max AP:
diff --git a/AndorsTrail/res/values/ui_theme.xml b/AndorsTrail/res/values/ui_theme.xml
index 3d1cfd125..edf123488 100644
--- a/AndorsTrail/res/values/ui_theme.xml
+++ b/AndorsTrail/res/values/ui_theme.xml
@@ -3,8 +3,4 @@
-
\ No newline at end of file
diff --git a/AndorsTrail/res/xml/crossroads.tmx b/AndorsTrail/res/xml/crossroads.tmx
index 15156540d..f1843b4f0 100644
--- a/AndorsTrail/res/xml/crossroads.tmx
+++ b/AndorsTrail/res/xml/crossroads.tmx
@@ -50,22 +50,22 @@
- eJytlMsNwjAQRK1EFBO5AKACOOYGR9pBqQDRFR3QCViJhTV4v/ZhFCmb7PPsx1MIYWIUN9VirwZxTIn9FtTKlXxT4viWPBLb0g8Ll2NHJlbrgZWLjHlYFcO/PLm13NuwqsbtyUav900zqCcXvSSfj003UE/PyF0KvwuI4552fvZxDOE8/vw+QRz30sBNStzsl5qr3n6TroVfC9PjF9n7L/sw6riZ6fHLzZnEzUyv3x7sVm6NXYu1zrPE1sbKmmPt8T319JyrrDXWHhmYy9qrkl3zR/nFPJ7ZzGxtLdGXZhepeGRiXE5tf727Sv2j7bv0nXRe655Ts0l9w53bWyfKd8+7Q1OnzGu5py3zj2fy7JDUR2nfy1p77inso2WuP0Uf1ro=
+ eJytlMsNwjAMhqNUDFN1AGACOPYGx66DmACxFRuwCa1EFNfyOzn8qlS3/vL7kTGlNAqa/qJinwZJTI39VdTK1XxzkviePBrb0w8PF7LnXDWlvSz98HILe8lVmBvpiZX7yFUctye75HvlqplQTy70Af0uhHp6hrmg3ychiXs5xNjnYe/3TUji3oLcTdeh+pXmqqffTfeVe1x1GvzMiF/cZ4/Xwoz49fJxX1v89mC3cik2FWudZ41tjcGa49rj99wzci5Ya1x7zMC5vL2CbMof5xfnicxmYVtriX1ZdpGLT0JMymntb3RXuX+sfde+087r3XNuNrlvpHNH68T57nl3WOpUeC33tGf+8ZkiO6T1Udt3WOvIPYX76JnrH8282XI=
- eJydVjtOw0AQdWIvVwktKEBafhGiInwiQRMkqCgRFNDlB1yAE5CaJtQ04QRwH2AG7yjj8cx6w5NWXq+9++a9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ZaJVnctBqPH+Zve/XoR/UGee8E67vPfwO4Dj1xWjPoBOeA+g99aZ+A7g+ql68B1ScsxcaPnEXOX2g+iepO3evcH6xuHY9Cm3dEjh3UbIm5y3h5ITzk7xLSyKpa060OTwBXEEw8Q==
- eJzFlFEKwDAIQ3uF3v+y+92kmrzaMkEG3fQlVTbHN+YrY0zxnkRWr3rf4ip29L7KHe58PdU3ShetjT12wuVSfc4eVHNQfGfOJDr37O6Ue+ZqI9yMmfm5zc2Y2XfVnlRcV1t1vupB/Lq75XBVLf3Hq512atVcnLujQX2ejA7X0b37jmgg55GtZq5y1dPRfCKj145nNUvy3+lwq/tX/TrcrEb1rPzSc+o324NKU9cv2XvnrhytZE9vs8e46+dU/sE+zXwAWeoaCQ==
+ eJzFlNkNwDAIQ7MC+y/b3xYFbHOoSKhSDh4OFDtfs5d7M7CvWHQfxd7iIrbXfvMK117fijbEZ2Le7k/pqpxjuVkdEL/KzfJhzmRc1FPsGpObyo2YUextbsS8nUN9knGj/Cr9rM42pSen7qr/QfefYeoS1bNjyuyetg6Xybu6p+SgrHs2qnl3Jqpsxb3WjmZUS2YmTnCz90fxOtzoDoqZ6VXXVb1RH2Q5dfUqfc+8FZOr0qfb7HN29Uz5H+xp5gNZ3hpe
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/Dialogs.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/Dialogs.java
index a51349a8e..d8b89077e 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/Dialogs.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/Dialogs.java
@@ -13,7 +13,6 @@ import android.content.DialogInterface.OnDismissListener;
import android.graphics.drawable.BitmapDrawable;
import android.net.Uri;
import android.view.View;
-import android.view.ViewGroup.LayoutParams;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.Toast;
@@ -152,7 +151,7 @@ public final class Dialogs {
}
final ListView itemList = new ListView(mainActivity);
- itemList.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
+ itemList.setLayoutParams(new ListView.LayoutParams(ListView.LayoutParams.FILL_PARENT, ListView.LayoutParams.WRAP_CONTENT));
itemList.setPadding(20, 0, 20, 20);
itemList.setOnItemClickListener(new OnItemClickListener() {
@Override
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/BulkSelectionInterface.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/BulkSelectionInterface.java
index 317d9c275..20ae3c43c 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/BulkSelectionInterface.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/BulkSelectionInterface.java
@@ -45,11 +45,11 @@ public class BulkSelectionInterface extends Activity implements TextWatcher {
private TextView bulkselection_amount_available;
private TextView bulkselection_summary_totalgold;
- private EditText bulkselection_amount_taken; // the amount we're going to take from the totalAmount
+ private EditText bulkselection_amount_taken; // the amount we're going to take from the totalAmount
private SeekBar bulkselection_slider;
private Button okButton;
- private final Handler timedEventHandler = new Handler(); // variables to count up or down on long presses on the buttons
+ private final Handler timedEventHandler = new Handler(); // variables to count up or down on long presses on the buttons
private int countValue, countTime;
private final Runnable countEvent = new Runnable() {
public void run() {
@@ -95,6 +95,7 @@ public class BulkSelectionInterface extends Activity implements TextWatcher {
Button cancelButton = (Button)findViewById(R.id.bulkselection_cancel_button);
final Button decrementButton = (Button)findViewById(R.id.bulkselection_decrement_button);
final Button incrementButton = (Button)findViewById(R.id.bulkselection_increment_button);
+ final Button selectAllButton = (Button)findViewById(R.id.bulkselection_select_all_button);
int actionTextResourceID = 0;
if (interfaceType == BULK_INTERFACE_BUY) {
@@ -185,6 +186,13 @@ public class BulkSelectionInterface extends Activity implements TextWatcher {
finish();
}
});
+
+ selectAllButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ updateControls(totalAvailableAmount);
+ }
+ });
}
private void incrementValueAndRepeat(int repeatAfterInterval) {
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ConversationActivity.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ConversationActivity.java
index 3d3b7f865..fadf09d5b 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ConversationActivity.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/ConversationActivity.java
@@ -93,6 +93,7 @@ public final class ConversationActivity extends Activity {
setContentView(R.layout.conversation);
replyGroup = new RadioGroup(this);
+ replyGroup.setLayoutParams(new ListView.LayoutParams(ListView.LayoutParams.WRAP_CONTENT, ListView.LayoutParams.WRAP_CONTENT));
statementList = (ListView) findViewById(R.id.conversation_statements);
statementList.addFooterView(replyGroup);
@@ -188,19 +189,20 @@ public final class ConversationActivity extends Activity {
for (Reply r : phrase.replies) {
addReply(phrase, r);
}
- replyGroup.setVisibility(View.VISIBLE);
- nextButton.setEnabled(false);
+ nextButton.setEnabled(false);
}
}
private void addReply(final Phrase p, final Reply r) {
if (!ConversationController.canSelectReply(player, r)) return;
+ RadioGroup.LayoutParams layoutParams = new RadioGroup.LayoutParams(RadioGroup.LayoutParams.WRAP_CONTENT, RadioGroup.LayoutParams.WRAP_CONTENT);
RadioButton rb = new RadioButton(this);
+ rb.setLayoutParams(layoutParams);
rb.setText(r.text);
rb.setOnClickListener(radioButtonListener);
rb.setTag(r);
- replyGroup.addView(rb);
+ replyGroup.addView(rb, layoutParams);
}
private static boolean isPhraseOnlyNextReply(Phrase p) {
@@ -222,8 +224,6 @@ public final class ConversationActivity extends Activity {
}
private void nextButtonClicked() {
- replyGroup.setVisibility(View.GONE);
-
Reply r;
if (isPhraseOnlyNextReply(phrase)) {
// If there is only a "Next" as reply, we don't need to add it to the conversation history.
@@ -252,6 +252,7 @@ public final class ConversationActivity extends Activity {
s.color = color;
conversationHistory.add(s);
listAdapter.notifyDataSetChanged();
+ statementList.requestLayout();
}
@Override
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/HeroinfoActivity_Inventory.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/HeroinfoActivity_Inventory.java
index d1a68bfef..e95a0b7e0 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/HeroinfoActivity_Inventory.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/HeroinfoActivity_Inventory.java
@@ -104,12 +104,11 @@ public final class HeroinfoActivity_Inventory extends Activity {
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
- ItemType itemType;
switch (requestCode) {
case MainActivity.INTENTREQUEST_ITEMINFO:
if (resultCode != RESULT_OK) break;
- itemType = world.itemTypes.getItemType(data.getExtras().getInt("itemTypeID"));
+ ItemType itemType = world.itemTypes.getItemType(data.getExtras().getInt("itemTypeID"));
int actionType = data.getExtras().getInt("actionType");
if (actionType == ItemInfoActivity.ITEMACTION_UNEQUIP) {
view.itemController.unequipSlot(itemType, data.getExtras().getInt("inventorySlot"));
@@ -124,12 +123,16 @@ public final class HeroinfoActivity_Inventory extends Activity {
int quantity = data.getExtras().getInt("selectedAmount");
int itemTypeID = data.getExtras().getInt("itemTypeID");
- itemType = world.itemTypes.getItemType(itemTypeID);
- view.itemController.dropItem(itemType, quantity);
+ dropItem(itemTypeID, quantity);
break;
}
}
+ private void dropItem(int itemTypeID, int quantity) {
+ ItemType itemType = world.itemTypes.getItemType(itemTypeID);
+ view.itemController.dropItem(itemType, quantity);
+ }
+
private void update() {
updateTraits();
updateWorn();
@@ -195,7 +198,12 @@ public final class HeroinfoActivity_Inventory extends Activity {
break;
case R.id.inv_menu_drop:
int itemTypeID = getSelectedItemType(info).id;
- Dialogs.showBulkDroppingInterface(this, itemTypeID, player.inventory.getItemQuantity(itemTypeID));
+ int quantity = player.inventory.getItemQuantity(itemTypeID);
+ if (quantity > 1) {
+ Dialogs.showBulkDroppingInterface(this, itemTypeID, quantity);
+ } else {
+ dropItem(itemTypeID, quantity);
+ }
break;
case R.id.inv_menu_equip:
view.itemController.equipItem(getSelectedItemType(info));
@@ -224,8 +232,8 @@ public final class HeroinfoActivity_Inventory extends Activity {
update();
return true;
}
-
- private void showEquippedItemInfo(ItemType itemType, int inventorySlot) {
+
+ private void showEquippedItemInfo(ItemType itemType, int inventorySlot) {
String text;
boolean enabled = true;
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 032a286c8..6e583ba75 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/HeroinfoActivity_Stats.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/HeroinfoActivity_Stats.java
@@ -14,6 +14,7 @@ import com.gpl.rpg.AndorsTrail.model.item.Inventory;
import com.gpl.rpg.AndorsTrail.model.item.ItemTraits_OnUse;
import com.gpl.rpg.AndorsTrail.model.item.ItemType;
import com.gpl.rpg.AndorsTrail.view.ActorConditionEffectList;
+import com.gpl.rpg.AndorsTrail.view.BaseTraitsInfoView;
import com.gpl.rpg.AndorsTrail.view.ItemEffectsView;
import com.gpl.rpg.AndorsTrail.view.RangeBar;
import com.gpl.rpg.AndorsTrail.view.TraitsInfoView;
@@ -49,6 +50,7 @@ public final class HeroinfoActivity_Stats extends Activity {
private TextView heroinfo_totalexperience;
private RangeBar rangebar_hp;
private RangeBar rangebar_exp;
+ private BaseTraitsInfoView heroinfo_basetraits;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -90,6 +92,8 @@ public final class HeroinfoActivity_Stats extends Activity {
levelUpButton.setEnabled(false);
}
});
+
+ heroinfo_basetraits = (BaseTraitsInfoView) findViewById(R.id.heroinfo_basetraits);
}
@Override
@@ -147,6 +151,7 @@ public final class HeroinfoActivity_Stats extends Activity {
if (effects_hit.isEmpty()) effects_hit = null;
if (effects_kill.isEmpty()) effects_kill = null;
heroinfo_itemeffects.update(null, null, effects_hit, effects_kill);
+ heroinfo_basetraits.update(player.traits);
}
private void updateConditions() {
@@ -172,7 +177,7 @@ public final class HeroinfoActivity_Stats extends Activity {
Dialogs.showActorConditionInfo(context, conditionType);
}
});
- heroinfo_currentconditions.addView(v);
+ heroinfo_currentconditions.addView(v, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT));
}
}
}
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/LoadSaveActivity.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/LoadSaveActivity.java
index f58a121f3..12a042fbe 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/LoadSaveActivity.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/LoadSaveActivity.java
@@ -104,10 +104,13 @@ public final class LoadSaveActivity extends Activity implements OnClickListener
if (slot == SLOT_NUMBER_CREATE_NEW_SLOT) return false; // if we're creating a new slot
final String currentPlayerName = model.player.traits.name;
- final String savedPlayerName = Savegames.quickload(this, slot).playerName;
- if (!currentPlayerName.equals(savedPlayerName)) return true; // if the names do not match
+ final FileHeader header = Savegames.quickload(this, slot);
+ if (header == null) return false;
- return false;
+ final String savedPlayerName = header.playerName;
+ if (currentPlayerName.equals(savedPlayerName)) return false; // if the names match
+
+ return true;
}
@Override
@@ -118,14 +121,15 @@ public final class LoadSaveActivity extends Activity implements OnClickListener
new AlertDialog.Builder(this)
.setIcon(android.R.drawable.ic_dialog_alert)
- .setMessage("Overwrite " + Savegames.quickload(this, slot).playerName + " with " + playerName + "?")
- .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
+ .setTitle(R.string.loadsave_save_overwrite_confirmation_title)
+ .setMessage(getString(R.string.loadsave_save_overwrite_confirmation, Savegames.quickload(this, slot).playerName, playerName))
+ .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
loadsave(slot);
}
})
- .setNegativeButton("Cancel", null)
+ .setNegativeButton(android.R.string.no, null)
.show();
} else {
loadsave(slot);
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/StartScreenActivity.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/StartScreenActivity.java
index 204b1b0b5..4259b9d86 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/StartScreenActivity.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/StartScreenActivity.java
@@ -96,8 +96,6 @@ public final class StartScreenActivity extends Activity {
Dialogs.showLoad(StartScreenActivity.this);
}
});
- boolean hasSavegames = !Savegames.getUsedSavegameSlots(this).isEmpty();
- b.setEnabled(hasSavegames);
TextView development_version = (TextView) findViewById(R.id.startscreen_dev_version);
if (AndorsTrailApplication.DEVELOPMENT_DEBUGRESOURCES) {
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/MovementController.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/MovementController.java
index 6ca719ffb..bc1b8661c 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/MovementController.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/MovementController.java
@@ -194,7 +194,11 @@ public final class MovementController implements TimedMessageTask.Callback {
if (handleEvents) {
MapObject o = currentMap.getEventObjectAt(newPosition);
- if (o != null) view.controller.handleMapEvent(o, newPosition);
+ if (o != null) {
+ if (!o.position.contains(player.lastPosition)) { // Do not trigger event if the player already was on the same MapObject before.
+ view.controller.handleMapEvent(o, newPosition);
+ }
+ }
Loot loot = currentMap.getBagAt(newPosition);
if (loot != null) view.itemController.handleLootBag(loot);
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/CombatTraits.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/CombatTraits.java
index 40931368e..ff78ae819 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/CombatTraits.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/CombatTraits.java
@@ -48,7 +48,7 @@ public class CombatTraits {
public boolean hasAttackDamageEffect() { return damagePotential.max != 0; }
public boolean hasBlockEffect() { return blockChance != 0; }
public boolean hasCriticalChanceEffect() { return criticalChance != 0; }
- public boolean hasCriticalMultiplierEffect() { return criticalMultiplier != 0; }
+ public boolean hasCriticalMultiplierEffect() { return criticalMultiplier != 0 && criticalMultiplier != 1; }
public int getAttacksPerTurn(final int maxAP) {
return (int) Math.floor(maxAP / attackCost);
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/ActorConditionEffectList.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/ActorConditionEffectList.java
index fa043f8b3..9aeaff840 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/ActorConditionEffectList.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/ActorConditionEffectList.java
@@ -31,6 +31,8 @@ public final class ActorConditionEffectList extends LinearLayout {
final Context context = getContext();
final Resources res = getResources();
+ LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
+
for (ActorConditionEffect e : effects) {
String msg;
final ActorConditionType conditionType = e.conditionType;
@@ -40,6 +42,7 @@ public final class ActorConditionEffectList extends LinearLayout {
msg = describeEffect(res, e);
}
TextView tv = new TextView(context);
+ tv.setLayoutParams(layoutParams);
SpannableString content = new SpannableString(msg);
content.setSpan(new UnderlineSpan(), 0, content.length(), 0);
@@ -50,7 +53,7 @@ public final class ActorConditionEffectList extends LinearLayout {
Dialogs.showActorConditionInfo(context, conditionType);
}
});
- this.addView(tv);
+ this.addView(tv, layoutParams);
}
}
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/BaseTraitsInfoView.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/BaseTraitsInfoView.java
new file mode 100644
index 000000000..0691bad81
--- /dev/null
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/BaseTraitsInfoView.java
@@ -0,0 +1,27 @@
+package com.gpl.rpg.AndorsTrail.view;
+
+import com.gpl.rpg.AndorsTrail.R;
+import com.gpl.rpg.AndorsTrail.model.actor.ActorTraits;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.TextView;
+
+public final class BaseTraitsInfoView extends TraitsInfoView {
+ private final TextView basetraitsinfo_max_hp;
+ private final TextView basetraitsinfo_max_ap;
+
+ public BaseTraitsInfoView(Context context, AttributeSet attr) {
+ super(context, attr, R.layout.basetraitsinfoview);
+
+ basetraitsinfo_max_hp = (TextView) findViewById(R.id.basetraitsinfo_max_hp);
+ basetraitsinfo_max_ap = (TextView) findViewById(R.id.basetraitsinfo_max_ap);
+ }
+
+ public void update(ActorTraits traits) {
+ super.update(traits.baseCombatTraits);
+
+ basetraitsinfo_max_hp.setText(Integer.toString(traits.maxHP));
+ basetraitsinfo_max_ap.setText(Integer.toString(traits.maxAP));
+ }
+}
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/ItemEffectsView_OnUse.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/ItemEffectsView_OnUse.java
index 70ad2c4b1..f60c3a09d 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/ItemEffectsView_OnUse.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/ItemEffectsView_OnUse.java
@@ -66,17 +66,19 @@ public final class ItemEffectsView_OnUse extends LinearLayout {
}
public static void describeStatsModifierTraits(StatsModifierTraits traits, Context context, Resources res, LinearLayout listView) {
+ LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
+
if (traits.currentAPBoost != null) {
final int label = traits.currentAPBoost.max > 0 ? R.string.iteminfo_effect_increase_current_ap : R.string.iteminfo_effect_decrease_current_ap;
final TextView tv = new TextView(context);
tv.setText(res.getString(label, traits.currentAPBoost.toMinMaxAbsString()));
- listView.addView(tv);
+ listView.addView(tv, layoutParams);
}
if (traits.currentHPBoost != null) {
final int label = traits.currentHPBoost.max > 0 ? R.string.iteminfo_effect_increase_current_hp : R.string.iteminfo_effect_decrease_current_hp;
final TextView tv = new TextView(context);
tv.setText(res.getString(label, traits.currentHPBoost.toMinMaxAbsString()));
- listView.addView(tv);
+ listView.addView(tv, layoutParams);
}
}
}
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/StatusView.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/StatusView.java
index eb68c1729..771eb0f94 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/StatusView.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/StatusView.java
@@ -120,6 +120,8 @@ public final class StatusView extends RelativeLayout {
private final Context context;
private int currentChildIndex = 0;
private final int previousChildCount;
+ private final LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
+
public GreedyImageViewAppender(Context context, LinearLayout container) {
this.container = container;
this.context = context;
@@ -137,7 +139,7 @@ public final class StatusView extends RelativeLayout {
// The player has never had this many conditions, create a new ImageView to hold the condition image.
ImageView iv = new ImageView(context);
iv.setImageBitmap(b);
- container.addView(iv);
+ container.addView(iv, layoutParams);
}
++currentChildIndex;
}
diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/TraitsInfoView.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/TraitsInfoView.java
index 7a84ee0cb..041c7d78e 100644
--- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/TraitsInfoView.java
+++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/TraitsInfoView.java
@@ -10,7 +10,7 @@ import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;
-public final class TraitsInfoView extends TableLayout {
+public class TraitsInfoView extends TableLayout {
private final TableRow traitsinfo_attack_row1;
private final TableRow traitsinfo_attack_row2;
private final TableRow traitsinfo_attack_row3;
@@ -27,9 +27,13 @@ public final class TraitsInfoView extends TableLayout {
private final TextView traitsinfo_defense_damageresist;
public TraitsInfoView(Context context, AttributeSet attr) {
+ this(context, attr, R.layout.traitsinfoview);
+ }
+
+ public TraitsInfoView(Context context, AttributeSet attr, int layoutResourceID) {
super(context, attr);
setFocusable(false);
- inflate(context, R.layout.traitsinfoview, this);
+ inflate(context, layoutResourceID, this);
traitsinfo_attack_row1 = (TableRow) findViewById(R.id.traitsinfo_attack_row1);
traitsinfo_attack_row2 = (TableRow) findViewById(R.id.traitsinfo_attack_row2);