]> www.infradead.org Git - users/mchehab/andors-trail.git/commitdiff
Renamed critical hit skills to "Internal bleeding" and "Fracture".
authoroskar.wiksten <oskar.wiksten@08aca716-68be-ccc6-4d58-36f5abd142ac>
Sun, 29 Apr 2012 21:38:58 +0000 (21:38 +0000)
committeroskar.wiksten <oskar.wiksten@08aca716-68be-ccc6-4d58-36f5abd142ac>
Sun, 29 Apr 2012 21:38:58 +0000 (21:38 +0000)
Fixed bug where the monster attacks would not change state to completed if you enter inventory while the monsters are attacking (this also fixes one long outstanding bug with double monster attacks if you enter inventory).
Updated list of authors.

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

AndorsTrail/res/values/authors.xml
AndorsTrail/res/values/content_actorconditions.xml
AndorsTrail/res/values/strings.xml
AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/MainActivity.java
AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/SkillInfoActivity.java
AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/CombatController.java
AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/SkillController.java
AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/ability/SkillCollection.java
AndorsTrail/src/com/gpl/rpg/AndorsTrail/view/SkillListAdapter.java

index f681ebc920d6ce254e304409e3fc482390d93e60..3699ac511c6281aa880fb133da3a0e3cde201377 100644 (file)
@@ -34,7 +34,8 @@
                Forum moderated by Tim Davis&lt;br /&gt;
                Forum moderated by Josh Kloos&lt;br /&gt;
                Forum moderated by Travis Miller&lt;br /&gt;
-               Forum moderated by Matthew B. White&lt;br /&gt;
+               Forum moderated by Matthew B. White (Nyktos)&lt;br /&gt;
+               Forum moderated by Pyrizzle&lt;br /&gt;
                &lt;br /&gt;
                &lt;a href="http://rltiles.sourceforge.net"&gt;Monster tileset graphics by rltiles.sourceforge.net&lt;/a&gt;&lt;br /&gt;
                Part of (or All) the graphic tiles used in this program is the public domain roguelike tileset "RLTiles".
index 26e11c6c594bca3a5cee76cd02d59569481b3757..4d701e80059d6c90bec6ee9f255f6445b289636c 100644 (file)
@@ -44,8 +44,8 @@
 {shadowbless_heal|Blessing of Shadow regeneration|actorconditions_1:35|0||1|1|1|1|||||||||||||||||||||};
 {shadowbless_acc|Blessing of Shadow accuracy|actorconditions_1:98|0||||||||||||||1|||||30|||||||};
 {shadowbless_guard|Shadow guardian blessing|actorconditions_1:91|0||||||||||||||1|30||||||||||1|};
-{attenuation|Attenuation|actorconditions_1:89|2|1|||||||||||||1||||||||||-50|-2|};
-{enervation|Enervation|actorconditions_1:89|2|1|||||||||||||1||||1|-50|||-3|-3|||};
+{crit1|Internal bleeding|actorconditions_1:89|2|1|||||||||||||1||||1|-50|||-3|-3|||};
+{crit2|Fracture|actorconditions_1:89|2|1|||||||||||||1||||||||||-50|-2|};
        </string>
 
 </resources>
index 5de4153f71c4bac81cf05bcc10e3ba3fe69b631f..2cb9752f7b8c5cf86e62a1ace2b79146dfd71002 100644 (file)
     <string name="actorinfo_immune_criticals">Immune to critical hits</string>
     <string name="traitsinfo_criticalhit_effectivechance">Effective critical chance:</string>
 
-       <string name="skill_title_enervation">Enervation</string>
-    <string name="skill_shortdescription_enervation">Chance of internal bleeding</string>
-    <string name="skill_longdescription_enervation">For every critical hit made, there is a %1$d %% chance that the hit will cause internal bleeding on the target, effectively causing the \'Enervation\' condition on the target. Enervation severely lowers offensive combat abilities, making the target less able to land successful attacks.</string>
-       <string name="skill_title_attenuation">Attenuation</string>
-    <string name="skill_shortdescription_attenuation">Chance of shattering bones</string>
-    <string name="skill_longdescription_attenuation">For every critical hit made, there is a %1$d %% chance that the hit will shatter some of the target\'s bones, effectively causing the \'Attenuation\' condition on the target. Attenuation severely lowers defensive combat abilities, making the target less able to defend itself in subsequent attacks.</string>
+       <string name="skill_title_crit1">Internal bleeding</string>
+    <string name="skill_shortdescription_crit1">Chance of internal bleeding</string>
+    <string name="skill_longdescription_crit1">For every critical hit made, there is a %1$d %% chance that the hit will cause internal bleeding on the target, effectively causing the \'Internal bleeding\' condition on the target. Internal bleeding severely lowers offensive combat abilities, making the target less able to land successful attacks.</string>
+       <string name="skill_title_crit2">Fracture</string>
+    <string name="skill_shortdescription_crit2">Chance of bone fracture</string>
+    <string name="skill_longdescription_crit2">For every critical hit made, there is a %1$d %% chance that the hit will fracture some of the target\'s bones, effectively causing the \'Fracture\' condition on the target. This will severely lower the target\'s defensive combat abilities, making the it less able to defend itself in subsequent attacks.</string>
     
 </resources>
index 6ac6eab3181cfb53483ac35141ad2fd7589ceb95..5e53ab7fd20c13685901244dc1268e759687a082 100644 (file)
@@ -177,11 +177,12 @@ public final class MainActivity extends Activity {
         L.log("onResume");
         if (!AndorsTrailApplication.getApplicationFromActivity(this).setup.isSceneReady) return;
 
+        view.gameRoundController.resume();
+        
                if (world.model.uiSelections.isInCombat) {
                        view.combatController.setCombatSelection(world.model.uiSelections.selectedMonster, world.model.uiSelections.selectedPosition);
                        view.combatController.enterCombat(CombatController.BEGIN_TURN_CONTINUE);
                }
-        view.gameRoundController.resume();
     }
 
        @Override
index 0b44449b0c5361dbc61db1034a80790d23be360c..fd737262b02d576bcf8b2b30683eac8c2de6c61a 100644 (file)
@@ -132,8 +132,8 @@ public final class SkillInfoActivity extends Activity {
                case SkillCollection.SKILL_RESISTANCE_PHYSICAL_CAPACITY: return R.string.skill_title_resistance_physical_capacity;
                case SkillCollection.SKILL_RESISTANCE_BLOOD_DISORDER: return R.string.skill_title_resistance_blood_disorder;
                case SkillCollection.SKILL_SHADOW_BLESS: return R.string.skill_title_shadow_bless;
-               case SkillCollection.SKILL_ENERVATION: return R.string.skill_title_enervation;
-               case SkillCollection.SKILL_ATTENUATION: return R.string.skill_title_attenuation;
+               case SkillCollection.SKILL_CRIT1: return R.string.skill_title_crit1;
+               case SkillCollection.SKILL_CRIT2: return R.string.skill_title_crit2;
                default:
                        return -1;
                }
@@ -162,8 +162,8 @@ public final class SkillInfoActivity extends Activity {
                case SkillCollection.SKILL_RESISTANCE_PHYSICAL_CAPACITY: return res.getString(R.string.skill_longdescription_resistance_physical_capacity, SkillCollection.PER_SKILLPOINT_INCREASE_RESISTANCE_CHANCE_PERCENT, SkillCollection.PER_SKILLPOINT_INCREASE_RESISTANCE_CHANCE_PERCENT * SkillCollection.MAX_LEVEL_RESISTANCE);
                case SkillCollection.SKILL_RESISTANCE_BLOOD_DISORDER: return res.getString(R.string.skill_longdescription_resistance_blood_disorder, SkillCollection.PER_SKILLPOINT_INCREASE_RESISTANCE_CHANCE_PERCENT, SkillCollection.PER_SKILLPOINT_INCREASE_RESISTANCE_CHANCE_PERCENT * SkillCollection.MAX_LEVEL_RESISTANCE);
                case SkillCollection.SKILL_SHADOW_BLESS: return res.getString(R.string.skill_longdescription_shadow_bless, SkillCollection.PER_SKILLPOINT_INCREASE_RESISTANCE_SHADOW_BLESS);
-               case SkillCollection.SKILL_ENERVATION: return res.getString(R.string.skill_longdescription_enervation, SkillCollection.PER_SKILLPOINT_INCREASE_ENERVATION);
-               case SkillCollection.SKILL_ATTENUATION: return res.getString(R.string.skill_longdescription_attenuation, SkillCollection.PER_SKILLPOINT_INCREASE_ATTENUATION);
+               case SkillCollection.SKILL_CRIT1: return res.getString(R.string.skill_longdescription_crit1, SkillCollection.PER_SKILLPOINT_INCREASE_CRIT1);
+               case SkillCollection.SKILL_CRIT2: return res.getString(R.string.skill_longdescription_crit2, SkillCollection.PER_SKILLPOINT_INCREASE_CRIT2);
                default:
                        return "";
                }
index 1559e068a2255d9c50b6c15e4e56bbcff9f4c052..864383eb09a16fb7d150a3e021a1f780e9c96752 100644 (file)
@@ -56,7 +56,7 @@ public final class CombatController implements VisualEffectCompletedCallback {
        context.mainActivity.clearMessages();
        if (beginTurnAs == BEGIN_TURN_PLAYER) newPlayerTurn();
        else if (beginTurnAs == BEGIN_TURN_MONSTERS) endPlayerTurn();
-       else maybeAutoEndTurn();
+       else continueTurn();
        updateTurnInfo();
     }
     public void exitCombat(boolean pickupLootBags) {
@@ -223,8 +223,7 @@ public final class CombatController implements VisualEffectCompletedCallback {
                        }
                }
                
-               context.mainActivity.updateStatus();
-               maybeAutoEndTurn();
+               playerActionCompleted();
        }
        
     public void playerKilledMonster(Monster killedMonster) {
@@ -257,12 +256,18 @@ public final class CombatController implements VisualEffectCompletedCallback {
                context.mainActivity.redrawAll(MainView.REDRAW_ALL_MONSTER_KILLED);
     }
 
-       private void maybeAutoEndTurn() {
-               if (model.player.ap.current < model.player.useItemCost
-                       && model.player.ap.current < model.player.combatTraits.attackCost
-                       && model.player.ap.current < model.player.actorTraits.moveCost) {
-                       endPlayerTurn();
-               }
+       private boolean playerHasApLeft() {
+               if (model.player.ap.current >= model.player.useItemCost) return true;
+               if (model.player.ap.current >= model.player.combatTraits.attackCost) return true;
+               if (model.player.ap.current >= model.player.actorTraits.moveCost) return true;
+               return false;
+       }
+       private void playerActionCompleted() {
+               context.mainActivity.updateStatus();
+               if (!playerHasApLeft()) endPlayerTurn();
+       }
+       private void continueTurn() {
+       if (!playerHasApLeft()) handleNextMonsterAction();
        }
 
        private void executeCombatMove(final Coord dest) {
@@ -281,8 +286,7 @@ public final class CombatController implements VisualEffectCompletedCallback {
                
                if (canExitCombat()) exitCombat(true);
                
-               context.mainActivity.updateStatus();
-               maybeAutoEndTurn();
+               playerActionCompleted();
        }
 
        private void fleeingFailed() {
@@ -290,7 +294,7 @@ public final class CombatController implements VisualEffectCompletedCallback {
                message(r.getString(R.string.combat_flee_failed));
                endPlayerTurn();
        }
-
+       
        private final Handler monsterTurnHandler = new Handler() {
         public void handleMessage(Message msg) {
                monsterTurnHandler.removeMessages(0);
@@ -315,7 +319,7 @@ public final class CombatController implements VisualEffectCompletedCallback {
                //monsterTurnHandler.removeMessages(0);
                //monsterTurnHandler.sendEmptyMessage(0);
        }
-
+       
        private Monster determineNextMonster(Monster previousMonster) {
                if (previousMonster != null) {
                        if (previousMonster.useAPs(previousMonster.combatTraits.attackCost)) return previousMonster;
index 4e1ff6633a6c8e68caa4c9491245547cf3a0912a..02aacf5e23a3c412497fe20fd30fc0c99183a3a3 100644 (file)
@@ -111,19 +111,19 @@ public final class SkillController {
        }
        
        public static void applyCriticalHitSkillEffectsToMonster(WorldContext world, Player player, Monster monster) {
-               int skillLevel = player.getSkillLevel(SkillCollection.SKILL_ATTENUATION);
+               int skillLevel = player.getSkillLevel(SkillCollection.SKILL_CRIT2);
                if (skillLevel > 0) {
-                       if (Constants.roll100(SkillCollection.PER_SKILLPOINT_INCREASE_ATTENUATION * skillLevel)) {
-                               ActorConditionType conditionType = world.actorConditionsTypes.getActorConditionType("attenuation");
+                       if (Constants.roll100(SkillCollection.PER_SKILLPOINT_INCREASE_CRIT2 * skillLevel)) {
+                               ActorConditionType conditionType = world.actorConditionsTypes.getActorConditionType("crit2");
                                ActorConditionEffect effect = new ActorConditionEffect(conditionType, 1, 5, null);
                                ActorStatsController.applyActorCondition(monster, effect);
                        }
                }
                
-               skillLevel = player.getSkillLevel(SkillCollection.SKILL_ENERVATION);
+               skillLevel = player.getSkillLevel(SkillCollection.SKILL_CRIT1);
                if (skillLevel > 0) {
-                       if (Constants.roll100(SkillCollection.PER_SKILLPOINT_INCREASE_ENERVATION * skillLevel)) {
-                               ActorConditionType conditionType = world.actorConditionsTypes.getActorConditionType("enervation");
+                       if (Constants.roll100(SkillCollection.PER_SKILLPOINT_INCREASE_CRIT1 * skillLevel)) {
+                               ActorConditionType conditionType = world.actorConditionsTypes.getActorConditionType("crit1");
                                ActorConditionEffect effect = new ActorConditionEffect(conditionType, 1, 5, null);
                                ActorStatsController.applyActorCondition(monster, effect);
                        }
index a834bf7b464ae64a00289be2d500415a2a8f138a..5a863f2555ebd39b5df4cc51371d256c6501264e 100644 (file)
@@ -32,10 +32,10 @@ public final class SkillCollection {
        public static final int SKILL_RESISTANCE_PHYSICAL_CAPACITY = 18; // lowers chance to get negative active conditions by monsters (Physical Capacity like Minor fatigue)\r
        public static final int SKILL_RESISTANCE_BLOOD_DISORDER = 19;    // lowers chance to get negative active conditions by monsters (Blood Disorder like Weak Poison)\r
        public static final int SKILL_SHADOW_BLESS = 20;\r
-       public static final int SKILL_ENERVATION = 21;          // lowers atk ability\r
-       public static final int SKILL_ATTENUATION = 22;         // lowers def ability\r
+       public static final int SKILL_CRIT1 = 21;                       // lowers atk ability\r
+       public static final int SKILL_CRIT2 = 22;                       // lowers def ability\r
        \r
-       public static final int NUM_SKILLS = SKILL_ATTENUATION + 1;\r
+       public static final int NUM_SKILLS = SKILL_CRIT2 + 1;\r
        \r
        public static final int PER_SKILLPOINT_INCREASE_WEAPON_CHANCE = 12;\r
        public static final int PER_SKILLPOINT_INCREASE_WEAPON_DAMAGE_MAX = 1;\r
@@ -59,8 +59,8 @@ public final class SkillCollection {
        public static final int PER_SKILLPOINT_INCREASE_EXPLOSS_PERCENT = 20;\r
        public static final int PER_SKILLPOINT_INCREASE_RESISTANCE_CHANCE_PERCENT = 10;\r
        public static final int PER_SKILLPOINT_INCREASE_RESISTANCE_SHADOW_BLESS = 5;\r
-       public static final int PER_SKILLPOINT_INCREASE_ENERVATION = 50;\r
-       public static final int PER_SKILLPOINT_INCREASE_ATTENUATION = 50; \r
+       public static final int PER_SKILLPOINT_INCREASE_CRIT1 = 50;\r
+       public static final int PER_SKILLPOINT_INCREASE_CRIT2 = 50; \r
 \r
        public static final int MAX_LEVEL_BARTER = (int) Math.floor((float) Constants.MARKET_PRICEFACTOR_PERCENT / PER_SKILLPOINT_INCREASE_BARTER_PRICEFACTOR_PERCENTAGE);\r
        public static final int MAX_LEVEL_BARKSKIN = 5;\r
@@ -115,14 +115,14 @@ public final class SkillCollection {
                initializeSkill(new SkillInfo(SKILL_RESISTANCE_PHYSICAL_CAPACITY, MAX_LEVEL_RESISTANCE, false, null));\r
                initializeSkill(new SkillInfo(SKILL_RESISTANCE_BLOOD_DISORDER, MAX_LEVEL_RESISTANCE, false, null));\r
                initializeSkill(new SkillInfo(SKILL_SHADOW_BLESS, 1, true, null));\r
-               initializeSkill(new SkillInfo(SKILL_ENERVATION, 1, false, new SkillLevelRequirement[] { \r
+               initializeSkill(new SkillInfo(SKILL_CRIT1, 1, false, new SkillLevelRequirement[] { \r
                        SkillLevelRequirement.requireOtherSkill(SKILL_MORE_CRITICALS, 3)\r
                        ,SkillLevelRequirement.requireOtherSkill(SKILL_BETTER_CRITICALS, 3)\r
                }));\r
-               initializeSkill(new SkillInfo(SKILL_ATTENUATION, 1, false, new SkillLevelRequirement[] { \r
+               initializeSkill(new SkillInfo(SKILL_CRIT2, 1, false, new SkillLevelRequirement[] { \r
                        SkillLevelRequirement.requireOtherSkill(SKILL_MORE_CRITICALS, 6)\r
                        ,SkillLevelRequirement.requireOtherSkill(SKILL_BETTER_CRITICALS, 6)\r
-                       ,SkillLevelRequirement.requireOtherSkill(SKILL_ENERVATION, 1)\r
+                       ,SkillLevelRequirement.requireOtherSkill(SKILL_CRIT1, 1)\r
                }));\r
        }\r
 \r
index 449e5c364c3f77f9ec24264ce908b33522c4ffea..fe592ffc42f53bb195622e25f01455bcffcc965e 100644 (file)
@@ -114,8 +114,8 @@ public final class SkillListAdapter extends ArrayAdapter<SkillInfo> {
                case SkillCollection.SKILL_RESISTANCE_PHYSICAL_CAPACITY: return R.string.skill_shortdescription_resistance_physical_capacity;
                case SkillCollection.SKILL_RESISTANCE_BLOOD_DISORDER: return R.string.skill_shortdescription_resistance_blood_disorder;
                case SkillCollection.SKILL_SHADOW_BLESS: return R.string.skill_shortdescription_shadow_bless;
-               case SkillCollection.SKILL_ENERVATION: return R.string.skill_shortdescription_enervation;
-               case SkillCollection.SKILL_ATTENUATION: return R.string.skill_shortdescription_attenuation;
+               case SkillCollection.SKILL_CRIT1: return R.string.skill_shortdescription_crit1;
+               case SkillCollection.SKILL_CRIT2: return R.string.skill_shortdescription_crit2;
                default:
                        return -1;
                }