mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-01-25 04:40:52 +01:00
First attempt at new skills "Attenuation" and "Enervation" (thanks to Nyktos for the ideas)
Fixed bug with missing icon for dead spiders. (thanks for sdevaney for spotting it) git-svn-id: https://andors-trail.googlecode.com/svn/trunk@235 08aca716-68be-ccc6-4d58-36f5abd142ac
This commit is contained in:
@@ -370,7 +370,7 @@
|
||||
<string name="itemlist_v0611_2">
|
||||
[id|iconID|name|category|displaytype|hasManualPrice|baseMarketCost|hasEquipEffect|equip_boostMaxHP|equip_boostMaxAP|equip_moveCostPenalty|equip_attackCost|equip_attackChance|equip_criticalChance|equip_criticalMultiplier|equip_attackDamage_Min|equip_attackDamage_Max|equip_blockChance|equip_damageResistance|equip_conditions[condition|magnitude|]|hasUseEffect|use_boostHP_Min|use_boostHP_Max|use_boostAP_Min|use_boostAP_Max|use_conditionsSource[condition|magnitude|duration|chance|]|hasHitEffect|hit_boostHP_Min|hit_boostHP_Max|hit_boostAP_Min|hit_boostAP_Max|hit_conditionsSource[condition|magnitude|duration|chance|]|hit_conditionsTarget[condition|magnitude|duration|chance|]|hasKillEffect|kill_boostHP_Min|kill_boostHP_Max|kill_boostAP_Min|kill_boostAP_Max|kill_conditionsSource[condition|magnitude|duration|chance|]|];
|
||||
{thorin_bone|items_misc:44|Os mâché|31|1|1|0|||||||||||||||||||||||||||||||||};
|
||||
{spider|items_misc:41|Araignée morte|31||1|1|||||||||||||||||||||||||||||||||};
|
||||
{spider|items_misc:40|Araignée morte|31||1|1|||||||||||||||||||||||||||||||||};
|
||||
{irdegh|items_misc:49|Glande à poison d\'Irdegh|31||1|5|||||||||||||||||||||||||||||||||};
|
||||
{arulir_skin|items_misc:39|Peau d\'Arulir|31||1|4|||||||||||||||||||||||||||||||||};
|
||||
{algangror_rat|items_misc:38|Queue de rat d\'allure étrange|31|1|1|0|||||||||||||||||||||||||||||||||};
|
||||
|
||||
@@ -371,7 +371,7 @@
|
||||
<string name="itemlist_v0611_2">
|
||||
[id|iconID|name|category|displaytype|hasManualPrice|baseMarketCost|hasEquipEffect|equip_boostMaxHP|equip_boostMaxAP|equip_moveCostPenalty|equip_attackCost|equip_attackChance|equip_criticalChance|equip_criticalMultiplier|equip_attackDamage_Min|equip_attackDamage_Max|equip_blockChance|equip_damageResistance|equip_conditions[condition|magnitude|]|hasUseEffect|use_boostHP_Min|use_boostHP_Max|use_boostAP_Min|use_boostAP_Max|use_conditionsSource[condition|magnitude|duration|chance|]|hasHitEffect|hit_boostHP_Min|hit_boostHP_Max|hit_boostAP_Min|hit_boostAP_Max|hit_conditionsSource[condition|magnitude|duration|chance|]|hit_conditionsTarget[condition|magnitude|duration|chance|]|hasKillEffect|kill_boostHP_Min|kill_boostHP_Max|kill_boostAP_Min|kill_boostAP_Max|kill_conditionsSource[condition|magnitude|duration|chance|]|];
|
||||
{thorin_bone|items_misc:44|Обгрызанная кость|31|1|1|0|||||||||||||||||||||||||||||||||};
|
||||
{spider|items_misc:41|Мертвый паук|31||1|1|||||||||||||||||||||||||||||||||};
|
||||
{spider|items_misc:40|Мертвый паук|31||1|1|||||||||||||||||||||||||||||||||};
|
||||
{irdegh|items_misc:49|Ядовитая железа Ирдега|31||1|5|||||||||||||||||||||||||||||||||};
|
||||
{arulir_skin|items_misc:39|Кожа Арулира|31||1|4|||||||||||||||||||||||||||||||||};
|
||||
{algangror_rat|items_misc:38|Странно выглядящий хвост крысы|31|1|1|0|||||||||||||||||||||||||||||||||};
|
||||
|
||||
@@ -44,6 +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|||};
|
||||
</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -371,7 +371,7 @@
|
||||
<string name="itemlist_v0611_2">
|
||||
[id|iconID|name|category|displaytype|hasManualPrice|baseMarketCost|hasEquipEffect|equip_boostMaxHP|equip_boostMaxAP|equip_moveCostPenalty|equip_attackCost|equip_attackChance|equip_criticalChance|equip_criticalMultiplier|equip_attackDamage_Min|equip_attackDamage_Max|equip_blockChance|equip_damageResistance|equip_conditions[condition|magnitude|]|hasUseEffect|use_boostHP_Min|use_boostHP_Max|use_boostAP_Min|use_boostAP_Max|use_conditionsSource[condition|magnitude|duration|chance|]|hasHitEffect|hit_boostHP_Min|hit_boostHP_Max|hit_boostAP_Min|hit_boostAP_Max|hit_conditionsSource[condition|magnitude|duration|chance|]|hit_conditionsTarget[condition|magnitude|duration|chance|]|hasKillEffect|kill_boostHP_Min|kill_boostHP_Max|kill_boostAP_Min|kill_boostAP_Max|kill_conditionsSource[condition|magnitude|duration|chance|]|];
|
||||
{thorin_bone|items_misc:44|Chewed bone|31|1|1|0|||||||||||||||||||||||||||||||||};
|
||||
{spider|items_misc:41|Dead spider|31||1|1|||||||||||||||||||||||||||||||||};
|
||||
{spider|items_misc:40|Dead spider|31||1|1|||||||||||||||||||||||||||||||||};
|
||||
{irdegh|items_misc:49|Irdegh poison gland|31||1|5|||||||||||||||||||||||||||||||||};
|
||||
{arulir_skin|items_misc:39|Arulir skin|31||1|4|||||||||||||||||||||||||||||||||};
|
||||
{algangror_rat|items_misc:38|Strange looking rat tail|31|1|1|0|||||||||||||||||||||||||||||||||};
|
||||
|
||||
@@ -488,5 +488,12 @@
|
||||
<string name="inventory_movebottom">Move to bottom</string>
|
||||
<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>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -132,6 +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;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
@@ -160,6 +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);
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -94,6 +94,7 @@ public class ActorStatsController {
|
||||
addNonStackableActorCondition(actor, e, duration);
|
||||
}
|
||||
}
|
||||
recalculateActorCombatTraits(actor);
|
||||
}
|
||||
|
||||
private static void addStackableActorCondition(Actor actor, ActorConditionEffect e, int duration) {
|
||||
@@ -267,7 +268,6 @@ public class ActorStatsController {
|
||||
|
||||
if (!Constants.rollResult(conditionEffect.chance, chanceRollBias)) return;
|
||||
applyActorCondition(actor, conditionEffect);
|
||||
recalculateActorCombatTraits(actor);
|
||||
}
|
||||
|
||||
private static class VisualEffect {
|
||||
|
||||
@@ -182,7 +182,7 @@ public final class CombatController implements VisualEffectCompletedCallback {
|
||||
final Monster target = model.uiSelections.selectedMonster;
|
||||
this.currentlyAttackedMonster = target;
|
||||
|
||||
final AttackResult attack = playerAttacks(model, target);
|
||||
final AttackResult attack = playerAttacks(world, target);
|
||||
this.lastAttackResult = attack;
|
||||
|
||||
Resources r = context.mainActivity.getResources();
|
||||
@@ -450,8 +450,10 @@ public final class CombatController implements VisualEffectCompletedCallback {
|
||||
return result;
|
||||
}
|
||||
|
||||
private AttackResult playerAttacks(ModelContainer model, Monster currentMonster) {
|
||||
return attack(model.player, currentMonster);
|
||||
private AttackResult playerAttacks(WorldContext world, Monster currentMonster) {
|
||||
AttackResult result = attack(world.model.player, currentMonster);
|
||||
if (result.isCriticalHit) SkillController.applyCriticalHitSkillEffectsToMonster(world, model.player, currentMonster);
|
||||
return result;
|
||||
}
|
||||
|
||||
private AttackResult monsterAttacks(ModelContainer model, Monster currentMonster) {
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.gpl.rpg.AndorsTrail.controller;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.context.WorldContext;
|
||||
import com.gpl.rpg.AndorsTrail.model.CombatTraits;
|
||||
import com.gpl.rpg.AndorsTrail.model.ability.ActorConditionEffect;
|
||||
import com.gpl.rpg.AndorsTrail.model.ability.ActorConditionType;
|
||||
import com.gpl.rpg.AndorsTrail.model.ability.SkillCollection;
|
||||
import com.gpl.rpg.AndorsTrail.model.ability.SkillInfo;
|
||||
import com.gpl.rpg.AndorsTrail.model.actor.Monster;
|
||||
import com.gpl.rpg.AndorsTrail.model.actor.Player;
|
||||
import com.gpl.rpg.AndorsTrail.model.item.ItemTypeCollection;
|
||||
import com.gpl.rpg.AndorsTrail.model.item.DropList.DropItem;
|
||||
@@ -107,4 +109,24 @@ public final class SkillController {
|
||||
// Note that the bias should be negative, making it less likely that the chance roll will succeed
|
||||
return getRollBias(effect.chance, player, skill, -chanceIncreasePerSkillLevel);
|
||||
}
|
||||
|
||||
public static void applyCriticalHitSkillEffectsToMonster(WorldContext world, Player player, Monster monster) {
|
||||
int skillLevel = player.getSkillLevel(SkillCollection.SKILL_ATTENUATION);
|
||||
if (skillLevel > 0) {
|
||||
if (Constants.roll100(SkillCollection.PER_SKILLPOINT_INCREASE_ATTENUATION * skillLevel)) {
|
||||
ActorConditionType conditionType = world.actorConditionsTypes.getActorConditionType("attenuation");
|
||||
ActorConditionEffect effect = new ActorConditionEffect(conditionType, 1, 5, null);
|
||||
ActorStatsController.applyActorCondition(monster, effect);
|
||||
}
|
||||
}
|
||||
|
||||
skillLevel = player.getSkillLevel(SkillCollection.SKILL_ENERVATION);
|
||||
if (skillLevel > 0) {
|
||||
if (Constants.roll100(SkillCollection.PER_SKILLPOINT_INCREASE_ENERVATION * skillLevel)) {
|
||||
ActorConditionType conditionType = world.actorConditionsTypes.getActorConditionType("enervation");
|
||||
ActorConditionEffect effect = new ActorConditionEffect(conditionType, 1, 5, null);
|
||||
ActorStatsController.applyActorCondition(monster, effect);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,8 +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)
|
||||
public static final int SKILL_RESISTANCE_BLOOD_DISORDER = 19; // lowers chance to get negative active conditions by monsters (Blood Disorder like Weak Poison)
|
||||
public static final int SKILL_SHADOW_BLESS = 20;
|
||||
public static final int SKILL_ENERVATION = 21; // lowers atk ability
|
||||
public static final int SKILL_ATTENUATION = 22; // lowers def ability
|
||||
|
||||
public static final int NUM_SKILLS = SKILL_SHADOW_BLESS + 1;
|
||||
public static final int NUM_SKILLS = SKILL_ATTENUATION + 1;
|
||||
|
||||
public static final int PER_SKILLPOINT_INCREASE_WEAPON_CHANCE = 12;
|
||||
public static final int PER_SKILLPOINT_INCREASE_WEAPON_DAMAGE_MAX = 1;
|
||||
@@ -57,6 +59,8 @@ public final class SkillCollection {
|
||||
public static final int PER_SKILLPOINT_INCREASE_EXPLOSS_PERCENT = 20;
|
||||
public static final int PER_SKILLPOINT_INCREASE_RESISTANCE_CHANCE_PERCENT = 10;
|
||||
public static final int PER_SKILLPOINT_INCREASE_RESISTANCE_SHADOW_BLESS = 5;
|
||||
public static final int PER_SKILLPOINT_INCREASE_ENERVATION = 50;
|
||||
public static final int PER_SKILLPOINT_INCREASE_ATTENUATION = 50;
|
||||
|
||||
public static final int MAX_LEVEL_BARTER = (int) Math.floor((float) Constants.MARKET_PRICEFACTOR_PERCENT / PER_SKILLPOINT_INCREASE_BARTER_PRICEFACTOR_PERCENTAGE);
|
||||
public static final int MAX_LEVEL_BARKSKIN = 5;
|
||||
@@ -111,6 +115,15 @@ public final class SkillCollection {
|
||||
initializeSkill(new SkillInfo(SKILL_RESISTANCE_PHYSICAL_CAPACITY, MAX_LEVEL_RESISTANCE, false, null));
|
||||
initializeSkill(new SkillInfo(SKILL_RESISTANCE_BLOOD_DISORDER, MAX_LEVEL_RESISTANCE, false, null));
|
||||
initializeSkill(new SkillInfo(SKILL_SHADOW_BLESS, 1, true, null));
|
||||
initializeSkill(new SkillInfo(SKILL_ENERVATION, 1, false, new SkillLevelRequirement[] {
|
||||
SkillLevelRequirement.requireOtherSkill(SKILL_MORE_CRITICALS, 3)
|
||||
,SkillLevelRequirement.requireOtherSkill(SKILL_BETTER_CRITICALS, 3)
|
||||
}));
|
||||
initializeSkill(new SkillInfo(SKILL_ATTENUATION, 1, false, new SkillLevelRequirement[] {
|
||||
SkillLevelRequirement.requireOtherSkill(SKILL_MORE_CRITICALS, 6)
|
||||
,SkillLevelRequirement.requireOtherSkill(SKILL_BETTER_CRITICALS, 6)
|
||||
,SkillLevelRequirement.requireOtherSkill(SKILL_ENERVATION, 1)
|
||||
}));
|
||||
}
|
||||
|
||||
public SkillInfo getSkill(int skillID) {
|
||||
|
||||
@@ -114,6 +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;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user