From f9ba8f077a0cc0632acc7b1a285b81dc72b79137 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 2 Feb 2021 22:24:59 -0500 Subject: [PATCH] v0.9.2: implemented the evasive armor talent --- core/src/main/assets/messages/actors/actors.properties | 2 ++ .../shatteredpixeldungeon/actors/buffs/Momentum.java | 5 +++-- .../shatteredpixeldungeon/actors/hero/Talent.java | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 591189a44..7dfcbfae2 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -384,6 +384,8 @@ actors.hero.talent.silent_steps.title=silent steps actors.hero.talent.silent_steps.desc=_+1:_ The Rogue will not wake sleeping enemies while he is _3 or more tiles away from them_.\n\n_+2:_ The Rogue will not wake sleeping enemies while he is _not adjacent to them_. actors.hero.talent.rogues_foresight.title=rogue's foresight actors.hero.talent.rogues_foresight.desc=_+1:_ When the Rogue is on a level with a secret room, he has a _50% chance to notice_ that the level contains a secret.\n\n_+2:_ When the Rogue is on a level with a secret room, he has a _75% chance to notice_ that the level contains a secret. +actors.hero.talent.evasive_armor.title=evasive armor +actors.hero.talent.evasive_armor.desc=_+1:_ While freerunning, the Freerunner gains an additional _+1 evasion_ per excess point of strength on his armor.\n\n_+2:_ While freerunning, the Freerunner gains an additional _+2 evasion_ per excess point of strength on his armor.\n\n_+3:_ While freerunning, the Freerunner gains an additional _+3 evasion_ per excess point of strength on his armor. actors.hero.talent.natures_bounty.title=nature's bounty actors.hero.talent.natures_bounty.desc=_+1:_ The Huntress can find _4 berries_ hidden in tall grass as she explores the earlier stages of the dungeon.\n\n_+2:_ The Huntress can find _6 berries_ hidden in tall grass as she explores the earlier stages of the dungeon. diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Momentum.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Momentum.java index 9658128c8..c80409034 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Momentum.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Momentum.java @@ -22,6 +22,8 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.ActionIndicator; @@ -84,8 +86,7 @@ public class Momentum extends Buff implements ActionIndicator.Action { public int evasionBonus( int heroLvl, int excessArmorStr ){ if (freerunTurns > 0) { - return heroLvl / 2; - //TODO also grant bonuses based on excess str with talent + return heroLvl/2 + excessArmorStr*Dungeon.hero.pointsInTalent(Talent.EVASIVE_ARMOR); } else { return 0; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java index 6e7d649c8..6d88e2d1f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java @@ -97,7 +97,7 @@ public enum Talent { //Assassin T3 ASSASSIN_T3_1(75, 3), ASSASSIN_T3_2(76, 3), ASSASSIN_T3_3(77, 3), //Freerunner T3 - FREERUNNER_T3_1(78, 3), FREERUNNER_T3_2(79, 3), FREERUNNER_T3_3(80, 3), + EVASIVE_ARMOR(78, 3), FREERUNNER_T3_2(79, 3), FREERUNNER_T3_3(80, 3), //Huntress T1 NATURES_BOUNTY(96), SURVIVALISTS_INTUITION(97), FOLLOWUP_STRIKE(98), NATURES_AID(99), @@ -471,7 +471,7 @@ public enum Talent { Collections.addAll(tierTalents, ASSASSIN_T3_1, ASSASSIN_T3_2, ASSASSIN_T3_3); break; case FREERUNNER: - Collections.addAll(tierTalents, FREERUNNER_T3_1, FREERUNNER_T3_2, FREERUNNER_T3_3); + Collections.addAll(tierTalents, EVASIVE_ARMOR, FREERUNNER_T3_2, FREERUNNER_T3_3); break; case SNIPER: Collections.addAll(tierTalents, FARSIGHT, SNIPER_T3_2, SNIPER_T3_3);