v0.9.2: implemented the enhanced lethality talent
This commit is contained in:
parent
563258ecb3
commit
4e95d6e238
|
@ -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.enhanced_lethality.title=enhanced lethality
|
||||
actors.hero.talent.enhanced_lethality.desc=_+1:_ The Assassin can assassinate enemies below _4/12/25/60% health_ per level of preparation, up from 3/10/20/40%.\n\n_+2:_ The Assassin can assassinate enemies below _5/14/30/80% health_ per level of preparation, up from 3/10/20/40%.\n\n_+3:_ The Assassin can assassinate enemies below _6/16/35/100% health_ per level of preparation, up from 3/10/20/40%.
|
||||
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.
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroAction;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NPC;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Effects;
|
||||
|
@ -54,27 +55,39 @@ public class Preparation extends Buff implements ActionIndicator.Action {
|
|||
}
|
||||
|
||||
public enum AttackLevel{
|
||||
LVL_1( 1, 0.15f, 0.05f, 1, 1),
|
||||
LVL_2( 3, 0.30f, 0.15f, 1, 3),
|
||||
LVL_3( 5, 0.45f, 0.30f, 2, 5),
|
||||
LVL_4( 9, 0.60f, 0.50f, 3, 7);
|
||||
LVL_1( 1, 0.15f, 1, 1),
|
||||
LVL_2( 3, 0.30f, 1, 3),
|
||||
LVL_3( 5, 0.45f, 2, 5),
|
||||
LVL_4( 9, 0.60f, 3, 7);
|
||||
|
||||
final int turnsReq;
|
||||
final float baseDmgBonus, KOThreshold;
|
||||
final float baseDmgBonus;
|
||||
final int damageRolls, blinkDistance;
|
||||
|
||||
AttackLevel( int turns, float base, float threshold, int rolls, int dist){
|
||||
AttackLevel( int turns, float base, int rolls, int dist){
|
||||
turnsReq = turns;
|
||||
baseDmgBonus = base; KOThreshold = threshold;
|
||||
baseDmgBonus = base;
|
||||
damageRolls = rolls; blinkDistance = dist;
|
||||
}
|
||||
|
||||
//1st index is prep level, 2nd is talent level
|
||||
private static final float[][] KOThresholds = new float[][]{
|
||||
{.03f, .04f, .05f, .06f},
|
||||
{.10f, .12f, .14f, .16f},
|
||||
{.20f, .25f, .30f, .35f},
|
||||
{.40f, .60f, .80f, 1.0f}
|
||||
};
|
||||
|
||||
public float KOThreshold(){
|
||||
return KOThresholds[ordinal()][Dungeon.hero.pointsInTalent(Talent.ENHANCED_LETHALITY)];
|
||||
}
|
||||
|
||||
public boolean canKO(Char defender){
|
||||
if (defender.properties().contains(Char.Property.MINIBOSS)
|
||||
|| defender.properties().contains(Char.Property.BOSS)){
|
||||
return (defender.HP/(float)defender.HT) < (KOThreshold/5f);
|
||||
return (defender.HP/(float)defender.HT) < (KOThreshold()/5f);
|
||||
} else {
|
||||
return (defender.HP/(float)defender.HT) < KOThreshold;
|
||||
return (defender.HP/(float)defender.HT) < KOThreshold();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -179,8 +192,8 @@ public class Preparation extends Buff implements ActionIndicator.Action {
|
|||
|
||||
desc += "\n\n" + Messages.get(this, "desc_dmg",
|
||||
(int)(lvl.baseDmgBonus*100),
|
||||
(int)(lvl.KOThreshold*100),
|
||||
(int)(lvl.KOThreshold*20));
|
||||
(int)(lvl.KOThreshold()*100),
|
||||
(int)(lvl.KOThreshold()*20));
|
||||
|
||||
if (lvl.damageRolls > 1){
|
||||
desc += " " + Messages.get(this, "desc_dmg_likely");
|
||||
|
|
|
@ -95,7 +95,7 @@ public enum Talent {
|
|||
//Rogue T3
|
||||
ROGUE_T3_1(73, 3), ROGUE_T3_2(74, 3),
|
||||
//Assassin T3
|
||||
ASSASSIN_T3_1(75, 3), ASSASSIN_T3_2(76, 3), ASSASSIN_T3_3(77, 3),
|
||||
ENHANCED_LETHALITY(75, 3), ASSASSIN_T3_2(76, 3), ASSASSIN_T3_3(77, 3),
|
||||
//Freerunner T3
|
||||
EVASIVE_ARMOR(78, 3), FREERUNNER_T3_2(79, 3), FREERUNNER_T3_3(80, 3),
|
||||
|
||||
|
@ -468,7 +468,7 @@ public enum Talent {
|
|||
Collections.addAll(tierTalents, SOUL_SIPHON, WARLOCK_T3_2, WARLOCK_T3_3);
|
||||
break;
|
||||
case ASSASSIN:
|
||||
Collections.addAll(tierTalents, ASSASSIN_T3_1, ASSASSIN_T3_2, ASSASSIN_T3_3);
|
||||
Collections.addAll(tierTalents, ENHANCED_LETHALITY, ASSASSIN_T3_2, ASSASSIN_T3_3);
|
||||
break;
|
||||
case FREERUNNER:
|
||||
Collections.addAll(tierTalents, EVASIVE_ARMOR, FREERUNNER_T3_2, FREERUNNER_T3_3);
|
||||
|
|
Loading…
Reference in New Issue
Block a user