mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-02-23 15:38:29 +01:00
Compare commits
2 Commits
OMGeeky-pa
...
base
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6a1312733 | ||
|
|
71a8158c53 |
@@ -345,7 +345,7 @@ public final class MainActivity
|
||||
message(getString(R.string.combat_result_herohit, monsterName, attackResult.damage));
|
||||
}
|
||||
if (attackResult.targetDied) {
|
||||
message(getString(R.string.combat_result_herokillsmonster, monsterName, attackResult.damage));
|
||||
message(getString(R.string.combat_result_herokillsmonster, monsterName));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import android.widget.SimpleExpandableListAdapter;
|
||||
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
|
||||
import com.gpl.rpg.AndorsTrail.R;
|
||||
import com.gpl.rpg.AndorsTrail.context.WorldContext;
|
||||
import com.gpl.rpg.AndorsTrail.model.QuestFilters;
|
||||
import com.gpl.rpg.AndorsTrail.model.actor.Player;
|
||||
import com.gpl.rpg.AndorsTrail.model.quest.Quest;
|
||||
import com.gpl.rpg.AndorsTrail.model.quest.QuestLogEntry;
|
||||
@@ -75,7 +76,7 @@ public final class HeroinfoActivity_Quests extends Fragment {
|
||||
}
|
||||
};
|
||||
|
||||
ExpandableListView questlog_contents = (ExpandableListView) v.findViewById(R.id.questlog_contents);
|
||||
ExpandableListView questlog_contents = v.findViewById(R.id.questlog_contents);
|
||||
questlog_contents_adapter = new SimpleExpandableListAdapter(
|
||||
ctx
|
||||
, groupList
|
||||
@@ -123,12 +124,16 @@ public final class HeroinfoActivity_Quests extends Fragment {
|
||||
boolean isCompleted = q.isCompleted(player);
|
||||
|
||||
int v = world.model.uiSelections.selectedQuestFilter;
|
||||
if (v == 0) { // Active quests
|
||||
if (isCompleted) continue;
|
||||
} else if (v == 1) { // All quests
|
||||
// Always show.
|
||||
} else if (v == 2) { // Completed quests
|
||||
if (!isCompleted) continue;
|
||||
switch (v) {
|
||||
case QuestFilters.Active: // Active quests
|
||||
if (isCompleted) continue;
|
||||
break;
|
||||
case QuestFilters.All: // All quests
|
||||
// Always show.
|
||||
break;
|
||||
case QuestFilters.Completed: // Completed quests
|
||||
if (!isCompleted) continue;
|
||||
break;
|
||||
}
|
||||
|
||||
int statusResId;
|
||||
@@ -146,14 +151,15 @@ public final class HeroinfoActivity_Quests extends Fragment {
|
||||
List<Map<String, ?>> logItemList = new ArrayList<Map<String, ?>>();
|
||||
for(Integer progress : player.getQuestProgress(q.questID)) {
|
||||
for(QuestLogEntry e : q.stages) {
|
||||
if (e.progress == progress.intValue()) {
|
||||
if (e.logtext.length() > 0) {
|
||||
item = new HashMap<String, Object>();
|
||||
item.put(mn_logText, e.logtext);
|
||||
logItemList.add(item);
|
||||
}
|
||||
if (e.progress != progress)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (e.logtext.length() <= 0)
|
||||
continue;
|
||||
|
||||
item = new HashMap<String, Object>();
|
||||
item.put(mn_logText, e.logtext);
|
||||
logItemList.add(item);
|
||||
}
|
||||
}
|
||||
childList.add(logItemList);
|
||||
|
||||
@@ -44,7 +44,7 @@ public final class CombatController implements VisualEffectCompletedCallback {
|
||||
this.world = world;
|
||||
}
|
||||
|
||||
public static enum BeginTurnAs {
|
||||
public enum BeginTurnAs {
|
||||
player, monsters, continueLastTurn
|
||||
}
|
||||
|
||||
@@ -119,12 +119,10 @@ public final class CombatController implements VisualEffectCompletedCallback {
|
||||
if (!selectedMonster.isAgressive(world.model.player)) return;
|
||||
}
|
||||
Coord previousSelection = world.model.uiSelections.selectedPosition;
|
||||
if (previousSelection != null) {
|
||||
world.model.uiSelections.selectedPosition = null;
|
||||
if (selectedPosition == null || !selectedPosition.equals(previousSelection)) {
|
||||
} else {
|
||||
previousSelection = null;
|
||||
}
|
||||
if (previousSelection != null
|
||||
&& selectedPosition != null
|
||||
&& selectedPosition.equals(previousSelection)) {
|
||||
previousSelection = null;
|
||||
}
|
||||
world.model.uiSelections.selectedMonster = selectedMonster;
|
||||
if (selectedPosition != null) {
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.gpl.rpg.AndorsTrail.model;
|
||||
|
||||
public final class QuestFilters {
|
||||
public static final int Active=0;
|
||||
public static final int All=1;
|
||||
public static final int Completed=2;
|
||||
}
|
||||
Reference in New Issue
Block a user