Updated for v0.6.9b1.

Changed backgound of exp bar to darker shade of yellow.
Added scrollbar to monster info dialog,
Vertically centered hp and exp bars.
Item "Shadow of the slayer" now has a "on kill" effect insetad of a "on hit" effect.
Corrected walkable tiles on blackwater_mountain16.
Corrected conversation for Bjorgur.
Bug: fixed conditions that are removed when equipping items without conditions.
Bug: fixed items that raise max HP and AP.
Added fixed 50 exp reward for monsters that have attack effects.
Regeneration effect has slightly lighter shade of blue for the amount of healed HP.

git-svn-id: https://andors-trail.googlecode.com/svn/trunk@116 08aca716-68be-ccc6-4d58-36f5abd142ac
This commit is contained in:
oskar.wiksten
2011-06-25 16:15:59 +00:00
parent 6483fa7eda
commit 1513337329
15 changed files with 117 additions and 82 deletions

View File

@@ -4,7 +4,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gpl.rpg.AndorsTrail"
android:versionCode="20"
android:versionName="0.6.9a3"
android:versionName="0.6.9b1"
android:installLocation="auto"
>
<uses-sdk

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 B

After

Width:  |  Height:  |  Size: 251 B

View File

@@ -5,64 +5,71 @@
android:layout_height="fill_parent"
android:orientation="vertical"
>
<LinearLayout
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/dialog_margin"
android:layout_weight="1"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:orientation="vertical"
android:padding="@dimen/dialog_margin"
>
<ImageView
android:id="@+id/monsterinfo_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/char_hero"
android:paddingRight="@dimen/dialog_iconpadding_right"
android:paddingBottom="@dimen/dialog_iconpadding_bottom"
/>
<TextView
android:id="@+id/monsterinfo_title"
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
>
<ImageView
android:id="@+id/monsterinfo_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/char_hero"
android:paddingRight="@dimen/dialog_iconpadding_right"
android:paddingBottom="@dimen/dialog_iconpadding_bottom"
/>
<TextView
android:id="@+id/monsterinfo_title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Monster"
android:textSize="@dimen/titletext"
/>
</LinearLayout>
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/section_margin"
>
<TableRow>
<TextView android:text="@string/actorinfo_difficulty" android:layout_marginRight="10sp" />
<TextView android:id="@+id/monsterinfo_difficulty" />
</TableRow>
</TableLayout>
<com.gpl.rpg.AndorsTrail.view.RangeBar
android:id="@+id/monsterinfo_healthbar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/section_margin"
/>
<com.gpl.rpg.AndorsTrail.view.TraitsInfoView
android:id="@+id/monsterinfo_currenttraits"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<com.gpl.rpg.AndorsTrail.view.ItemEffectsView
android:id="@+id/monsterinfo_onhiteffects"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Monster"
android:textSize="@dimen/titletext"
/>
</LinearLayout>
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/section_margin"
>
<TableRow>
<TextView android:text="@string/actorinfo_difficulty" android:layout_marginRight="10sp" />
<TextView android:id="@+id/monsterinfo_difficulty" />
</TableRow>
</TableLayout>
<com.gpl.rpg.AndorsTrail.view.RangeBar
android:id="@+id/monsterinfo_healthbar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/section_margin"
/>
<com.gpl.rpg.AndorsTrail.view.TraitsInfoView
android:id="@+id/monsterinfo_currenttraits"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<com.gpl.rpg.AndorsTrail.view.ItemEffectsView
android:id="@+id/monsterinfo_onhiteffects"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="wrap_content"

View File

@@ -22,21 +22,24 @@
android:layout_centerVertical="true"
/>
<com.gpl.rpg.AndorsTrail.view.RangeBar
android:id="@+id/statusview_health"
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@id/status_image"
android:layout_toLeftOf="@id/quickitem_toggle"
android:layout_marginTop="3sp"
/>
<com.gpl.rpg.AndorsTrail.view.RangeBar
android:id="@+id/statusview_exp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/status_image"
android:layout_toLeftOf="@id/quickitem_toggle"
android:layout_below="@id/statusview_health"
/>
android:orientation="vertical"
>
<com.gpl.rpg.AndorsTrail.view.RangeBar
android:id="@+id/statusview_health"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<com.gpl.rpg.AndorsTrail.view.RangeBar
android:id="@+id/statusview_exp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
</merge>

View File

@@ -187,7 +187,7 @@
{dagger_barbed|items_tiles:87|Spitzdolch|0|0|1||||4|15|||0|0|5|||||||||1||||||{{bleeding_wound|1|5|50|}}|||||||};
{elytharan_redeemer|items_tiles:392|Elytharanischer Erlöser|0|0|1||2||5|25|||3|8|5||{{bless|1|}}|0|||||||||||||||||||};
{clouded_rage|items_tiles:393|Raserei der Schatten|0|0|1||||5|21|||3|6|5|||0|||||||||||||1|||||{{rage_minor|1|1|50|}}|};
{shadow_slayer|items_tiles:144|Schatten des Mörders|0|0|1||2||7|25|10|2|5|9||||||||||1|1|1|||||||||||};
{shadow_slayer|items_tiles:144|Schatten des Mörders|0|0|1||2||7|25|10|2|5|9|||||||||||||||||1|1|1||||};
{ring_shadow_embrace|items_tiles:266|Umarmung der Schatten|7|0|1|20||||10|||2|2|||||||||||||||||||||||};

View File

@@ -180,7 +180,7 @@
{dagger_barbed|items_tiles:87|Dague barbelée|0|0|1||||4|15|||0|0|5|||||||||1||||||{{bleeding_wound|1|5|50|}}|||||||};
{elytharan_redeemer|items_tiles:392|Rédempteur d\'Elytharan|0|0|1||2||5|25|||3|8|5||{{bless|1|}}|0|||||||||||||||||||};
{clouded_rage|items_tiles:393|Épée de la rage de l\'Ombre|0|0|1||||5|21|||3|6|5|||0|||||||||||||1|||||{{rage_minor|1|1|50|}}|};
{shadow_slayer|items_tiles:144|Ombre du tueur|0|0|1||2||7|25|10|2|5|9||||||||||1|1|1|||||||||||};
{shadow_slayer|items_tiles:144|Ombre du tueur|0|0|1||2||7|25|10|2|5|9|||||||||||||||||1|1|1||||};
{ring_shadow_embrace|items_tiles:266|Anneau de l\'étreinte de l\'Ombre|7|0|1|20||||10|||2|2|||||||||||||||||||||||};

View File

@@ -1251,7 +1251,7 @@
{I am here to give you a message from the Blackwater Mountain settlement.|guthbered_attacks|bwm_agent:70|||}
}|};
{guthbered_attacks|What message?|||{{Harlenn in the Blackwater Mountain settlement wants you to stop your attacks on their settlement.|guthbered_attacks_1||||}}|};
{guthbered_attacks_1|That completely insane. We!? Stop OUR attacks?! You tell him that we have nothing to do with what happens up there. They have brought their own misfortune upon themselves.|bwm_agent:80|||};
{guthbered_attacks_1|That\'s completely insane. We!? Stop OUR attacks?! You tell him that we have nothing to do with what happens up there. They have brought their own misfortune upon themselves.|bwm_agent:80|||};
{guthbered_return_1_1|Welcome back, traveller. Did you talk to Harlenn up in the Blackwater Mountain settlement?|||{
{Can you tell me the story about the monsters again?|guthbered_13||||}
{What was I supposed to do again?|guthbered_29||||}
@@ -1759,7 +1759,7 @@
{What was I supposed to do again?|bjorgur_3||||}
{Yes. I killed the intruder and restored the dagger to its original place.|bjorgur_complete_1|bjorgur_grave:40|||}
}|};
{bjorgur_1|Hello there. You wouldn\'t happen to know anything a grave to the southwest of Prim would you?|||{
{bjorgur_1|Hello there. You wouldn\'t happen to know anything about a grave to the southwest of Prim would you?|||{
{I have been there. I met someone on one of the lower levels.|bjorgur_2|bjorgur_grave:30|||}
{What about it?|bjorgur_3||||}
{No, sorry.|bjorgur_3||||}

View File

@@ -187,7 +187,7 @@
{dagger_barbed|items_tiles:87|Barbed dagger|0|0|1||||4|15|||0|0|5|||||||||1||||||{{bleeding_wound|1|5|50|}}|||||||};
{elytharan_redeemer|items_tiles:392|Elytharan redeemer|0|0|1||2||5|25|||3|8|5||{{bless|1|}}|0|||||||||||||||||||};
{clouded_rage|items_tiles:393|Sword of Shadow\'s rage|0|0|1||||5|21|||3|6|5|||0|||||||||||||1|||||{{rage_minor|1|1|50|}}|};
{shadow_slayer|items_tiles:144|Shadow of the slayer|0|0|1||2||7|25|10|2|5|9||||||||||1|1|1|||||||||||};
{shadow_slayer|items_tiles:144|Shadow of the slayer|0|0|1||2||7|25|10|2|5|9|||||||||||||||||1|1|1||||};
{ring_shadow_embrace|items_tiles:266|Ring of Shadow embrace|7|0|1|20||||10|||2|2|||||||||||||||||||||||};

View File

@@ -65,7 +65,7 @@
</layer>
<layer name="Walkable" width="15" height="30">
<data encoding="base64" compression="zlib">
eJzVlEkOACEIBPmC///s3ElDF3IwY2JihILGhRMR5+GMH7NuqDxqP69zDMrmGB1baZ3kdWy237DKt6qDsMpXnZ1jt3ndvW/Y7pzJ268G/RuUVT5Tlv5DopHwE2ab2/WfSa+6ZYlGpbmyu1gd695Op9/V+gGQbg/P
eJzVlEkOACEIBPmC///s3ElDF3IwY0JihIJ240TEeWjxY9YNVUet53nOQdmco2MrrZO6js3+G1bFVvsgrIpVZ+fYbV137xu2O2fy9qtB/wZlVcyUpf+QaCT8hNnWdv1n0qtuWaJRaa78Llenwb0dyir7AJ+SD/E=
</data>
</layer>
<objectgroup name="Mapevents" width="15" height="30">

View File

@@ -20,7 +20,7 @@ public final class AndorsTrailApplication extends Application {
public static final boolean DEVELOPMENT_VALIDATEDATA = false;
public static final boolean DEVELOPMENT_DEBUGMESSAGES = false;
public static final int CURRENT_VERSION = 20;
public static final String CURRENT_VERSION_DISPLAY = "0.6.9a3";
public static final String CURRENT_VERSION_DISPLAY = "0.6.9b1";
public final WorldContext world = new WorldContext();
public final WorldSetup setup = new WorldSetup(world, this);

View File

@@ -18,7 +18,7 @@ public final class VisualEffectCollection {
public void initialize(DynamicTileLoader loader) {
effects[EFFECT_BLOOD] = createEffect(loader, R.drawable.effect_blood3, new ConstRange(16, 0), 400, Color.RED);
effects[EFFECT_RESTORE_HP] = createEffect(loader, R.drawable.effect_heal2, new ConstRange(16, 0), 400, Color.BLUE);
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);
}

View File

@@ -131,9 +131,34 @@ public final class MainActivity extends Activity {
world.model.player.inventory.addItem(itemType);
itemType = world.itemTypes.getItemTypeByTag("ring_shadow0");
world.model.player.inventory.addItem(itemType);
itemType = world.itemTypes.getItemTypeByTag("shadow_slayer");
world.model.player.inventory.addItem(itemType);
updateStatus();
Toast.makeText(MainActivity.this, "DEBUG: added items", Toast.LENGTH_SHORT).show();
}
})
,new DebugButton("bwm", new OnClickListener() {
@Override
public void onClick(View arg0) {
Player player = world.model.player;
player.addQuestProgress(new QuestProgress("bwm_agent", 1));
player.addQuestProgress(new QuestProgress("bwm_agent", 5));
player.addQuestProgress(new QuestProgress("bwm_agent", 10));
player.addQuestProgress(new QuestProgress("bwm_agent", 20));
player.addQuestProgress(new QuestProgress("bwm_agent", 25));
player.addQuestProgress(new QuestProgress("bwm_agent", 30));
player.addQuestProgress(new QuestProgress("bwm_agent", 40));
player.addQuestProgress(new QuestProgress("bwm_agent", 50));
player.addQuestProgress(new QuestProgress("bwm_agent", 60));
view.movementController.placePlayerAt(MapObject.MAPEVENT_NEWMAP, "blackwater_mountain45", "south", 0, 0);
}
})
,new DebugButton("prim", new OnClickListener() {
@Override
public void onClick(View arg0) {
view.movementController.placePlayerAt(MapObject.MAPEVENT_NEWMAP, "blackwater_mountain29", "south", 0, 0);
}
})*/
,new DebugButton("hp=max", new OnClickListener() {
@Override

View File

@@ -55,9 +55,7 @@ public final class ItemController {
}
player.inventory.wear[slot] = type;
if (type.effects_equip != null && type.effects_equip.addedConditions != null) {
ActorStatsController.removeOrAddConditionsFromEquippedItems(player);
}
ActorStatsController.removeOrAddConditionsFromEquippedItems(player);
ActorStatsController.recalculatePlayerCombatTraits(player);
//message(androidContext, androidContext.getResources().getString(R.string.inventory_item_equipped, t.name));

View File

@@ -22,23 +22,21 @@ public class Actor {
public Actor(ActorTraits traits, boolean isPlayer) {
this.traits = traits;
this.ap = new Range();
this.health = new Range();
this.ap = new Range(traits.maxAP, traits.maxAP);
this.health = new Range(traits.maxHP, traits.maxHP);
this.position = new Coord();
this.rectPosition = new CoordRect(position, traits.tileSize);
this.isPlayer = isPlayer;
setMaxAP();
setMaxHP();
}
public boolean isDead() {
return health.current <= 0;
}
public void setMaxAP() {
ap.set(traits.maxAP, traits.maxAP);
ap.setMax();
}
public void setMaxHP() {
health.set(traits.maxHP, traits.maxHP);
health.setMax();
}
public boolean useAPs(int cost) {

View File

@@ -61,9 +61,9 @@ public final class MonsterTypeCollection {
final int maxHP = ResourceFileParser.parseInt(parts[5], 1);
final int maxAP = ResourceFileParser.parseInt(parts[6], 10);
final CombatTraits combatTraits = ResourceFileParser.parseCombatTraits(parts, 8);
final int exp = getExpectedMonsterExperience(combatTraits, maxHP, maxAP);
final ItemTraits_OnUse hitEffect = ResourceFileParser.parseItemTraits_OnUse(actorConditionTypes, parts, 18, true);
monsterTypes.put(monsterTypeId, new MonsterType(
final int exp = getExpectedMonsterExperience(combatTraits, hitEffect, maxHP, maxAP);
monsterTypes.put(monsterTypeId, new MonsterType(
monsterTypeId
, parts[2] // Name
, parts[3] // Tags
@@ -85,11 +85,15 @@ public final class MonsterTypeCollection {
private static float div100(int v) {
return (float) v / 100f;
}
private static int getExpectedMonsterExperience(final CombatTraits t, final int maxHP, final int maxAP) {
private static int getExpectedMonsterExperience(final CombatTraits t, ItemTraits_OnUse hitEffect, final int maxHP, final int maxAP) {
if (t == null) return 0;
final float avgAttackHP = t.getAttacksPerTurn(maxAP) * div100(t.attackChance) * t.damagePotential.averagef() * (1 + div100(t.criticalChance) * t.criticalMultiplier);
final float avgDefenseHP = maxHP * (1 + div100(t.blockChance)) + Constants.EXP_FACTOR_DAMAGERESISTANCE * t.damageResistance;
return (int) Math.ceil((avgAttackHP * 3 + avgDefenseHP) * Constants.EXP_FACTOR_SCALING);
int attackConditionBonus = 0;
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;
}
// Selftest method. Not part of the game logic.