v0.9.2: implement the strongman talent and cleaned up strength req code
This commit is contained in:
parent
44c11c4b50
commit
0d00952eb5
|
@ -334,6 +334,8 @@ actors.hero.talent.lethal_momentum.title=lethal momentum
|
|||
actors.hero.talent.lethal_momentum.desc=_+1:_ When the Warrior kills an enemy, the killing blow has a _67% chance_ to be instantaneous.\n\n_+2:_ When the Warrior kills an enemy, the killing blow has a _100% chance_ to be instantaneous.
|
||||
actors.hero.talent.improvised_projectiles.title=improvised projectiles
|
||||
actors.hero.talent.improvised_projectiles.desc=_+1:_ The Warrior can blind an enemy for _2 turns_ by throwing any item that isn’t a thrown weapon at them. This has a 30 turn cooldown.\n\n_+2:_ The Warrior can blind an enemy for _3 turns_ by throwing any item that isn’t a thrown weapon at them. This has a 30 turn cooldown.
|
||||
actors.hero.talent.strongman.title=strongman
|
||||
actors.hero.talent.strongman.desc=_+1:_ The Warrior needs _1 less strength_ to use armor.\n\n_+2:_ The Warrior needs _1 less strength_ to use armor and _1 less strength_ to use weapons.\n\n_+3:_ The Warrior needs _2 less strength_ to use armor and _1 less strength_ to use weapons.
|
||||
|
||||
actors.hero.talent.empowering_meal.title=empowering meal
|
||||
actors.hero.talent.empowering_meal.desc=_+1:_ Eating food grants the Mage _2 bonus damage_ on his next 3 wand zaps.\n\n_+2:_ Eating food grants the Mage _3 bonus damage_ on his next 3 wand zaps.
|
||||
|
|
|
@ -71,7 +71,7 @@ public enum Talent {
|
|||
//Warrior T2
|
||||
IRON_STOMACH(4), RESTORED_WILLPOWER(5), RUNIC_TRANSFERENCE(6), LETHAL_MOMENTUM(7), IMPROVISED_PROJECTILES(8),
|
||||
//Warrior T3
|
||||
WARRIOR_T3_1(9, 3), WARRIOR_T3_2(10, 3),
|
||||
STRONGMAN(9, 3), WARRIOR_T3_2(10, 3),
|
||||
//Berserker T3
|
||||
BERSERKER_T3_1(11, 3), BERSERKER_T3_2(12, 3), BERSERKER_T3_3(13, 3),
|
||||
//Gladiator T3
|
||||
|
@ -415,7 +415,7 @@ public enum Talent {
|
|||
//tier 3
|
||||
switch (cls){
|
||||
case WARRIOR: default:
|
||||
Collections.addAll(tierTalents, WARRIOR_T3_1, WARRIOR_T3_2);
|
||||
Collections.addAll(tierTalents, STRONGMAN, WARRIOR_T3_2);
|
||||
break;
|
||||
case MAGE:
|
||||
Collections.addAll(tierTalents, MAGE_T3_1, MAGE_T3_2);
|
||||
|
|
|
@ -528,10 +528,20 @@ public class Armor extends EquipableItem {
|
|||
}
|
||||
|
||||
public int STRReq(int lvl){
|
||||
return STRReq(tier, lvl);
|
||||
}
|
||||
|
||||
protected static int STRReq(int tier, int lvl){
|
||||
lvl = Math.max(0, lvl);
|
||||
|
||||
//strength req decreases at +1,+3,+6,+10,etc.
|
||||
return (8 + Math.round(tier * 2)) - (int)(Math.sqrt(8 * lvl + 1) - 1)/2;
|
||||
int req = (8 + Math.round(tier * 2)) - (int)(Math.sqrt(8 * lvl + 1) - 1)/2;
|
||||
|
||||
if (Dungeon.hero.hasTalent(Talent.STRONGMAN)){
|
||||
req -= (Dungeon.hero.pointsInTalent(Talent.STRONGMAN)+1)/2;
|
||||
}
|
||||
|
||||
return req;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -153,10 +153,7 @@ abstract public class ClassArmor extends Armor {
|
|||
|
||||
@Override
|
||||
public int STRReq(int lvl) {
|
||||
lvl = Math.max(0, lvl);
|
||||
|
||||
//strength req decreases at +1,+3,+6,+10,etc.
|
||||
return (8 + Math.round(armorTier * 2)) - (int)(Math.sqrt(8 * lvl + 1) - 1)/2;
|
||||
return STRReq(armorTier, lvl);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -78,7 +78,7 @@ public class Pickaxe extends Weapon {
|
|||
|
||||
@Override
|
||||
public int STRReq(int lvl) {
|
||||
return 14; //tier 3
|
||||
return STRReq(3, lvl); //tier 3
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -125,9 +125,7 @@ public class SpiritBow extends Weapon {
|
|||
|
||||
@Override
|
||||
public int STRReq(int lvl) {
|
||||
lvl = Math.max(0, lvl);
|
||||
//strength req decreases at +1,+3,+6,+10,etc.
|
||||
return 10 - (int)(Math.sqrt(8 * lvl + 1) - 1)/2;
|
||||
return STRReq(1, lvl); //tier 1
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -204,7 +204,18 @@ abstract public class Weapon extends KindOfWeapon {
|
|||
}
|
||||
|
||||
public abstract int STRReq(int lvl);
|
||||
|
||||
|
||||
protected static int STRReq(int tier, int lvl){
|
||||
lvl = Math.max(0, lvl);
|
||||
|
||||
//strength req decreases at +1,+3,+6,+10,etc.
|
||||
int req = (8 + tier * 2) - (int)(Math.sqrt(8 * lvl + 1) - 1)/2;
|
||||
|
||||
if (Dungeon.hero.pointsInTalent(Talent.STRONGMAN) >= 2) req--;
|
||||
|
||||
return req;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int level() {
|
||||
return super.level() + (curseInfusionBonus ? 1 : 0);
|
||||
|
|
|
@ -42,9 +42,7 @@ public class Greataxe extends MeleeWeapon {
|
|||
|
||||
@Override
|
||||
public int STRReq(int lvl) {
|
||||
lvl = Math.max(0, lvl);
|
||||
//20 base strength req, up from 18
|
||||
return (10 + tier * 2) - (int)(Math.sqrt(8 * lvl + 1) - 1)/2;
|
||||
return STRReq(tier+1, lvl); //20 base strength req, up from 18
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -45,9 +45,7 @@ public class MeleeWeapon extends Weapon {
|
|||
}
|
||||
|
||||
public int STRReq(int lvl){
|
||||
lvl = Math.max(0, lvl);
|
||||
//strength req decreases at +1,+3,+6,+10,etc.
|
||||
return (8 + tier * 2) - (int)(Math.sqrt(8 * lvl + 1) - 1)/2;
|
||||
return STRReq(tier, lvl);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -90,9 +90,7 @@ abstract public class MissileWeapon extends Weapon {
|
|||
}
|
||||
|
||||
public int STRReq(int lvl){
|
||||
lvl = Math.max(0, lvl);
|
||||
//strength req decreases at +1,+3,+6,+10,etc.
|
||||
return (7 + tier * 2) - (int)(Math.sqrt(8 * lvl + 1) - 1)/2;
|
||||
return STRReq(tier, lvl) - 1; //1 less str than normal for their tier
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user