v2.2.0: reworked all of the T2 potion & scroll talents

This commit is contained in:
Evan Debenham
2023-08-24 15:43:57 -04:00
parent de86487aaa
commit 33b065e69c
22 changed files with 121 additions and 102 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@@ -625,12 +625,12 @@ actors.hero.talent.test_subject.desc=_+1:_ Whenever the Warrior identifies an it
actors.hero.talent.iron_will.title=iron will
actors.hero.talent.iron_will.desc=_+1:_ The max shield provided by the Warrior's seal is _increased by 1_.\n\n_+2:_ The max shield provided by the Warrior's seal is _increased by 2_.
actors.hero.talent.iron_will.meta_desc=_If this talent is gained by a different hero_ it will grant its shielding benefit without the broken seal.
actors.hero.talent.iron_stomach.title=iron stomach
actors.hero.talent.iron_stomach.desc=_+1:_ Eating food takes the Warrior 1 turn and grants him _75% damage resistance_ while eating.\n\n_+2:_ Eating food takes the Warrior 1 turn and grants him _100% damage resistance_ while eating.
actors.hero.talent.restored_willpower.title=restored willpower
actors.hero.talent.restored_willpower.desc=_+1:_ Drinking a potion of healing instantly recharges _67% of the shielding_ from the Warrior's broken seal.\n\n_+2:_ Drinking a potion of healing instantly recharges _100% of the shielding_ from the Warrior's broken seal.\n\nThis talent also triggers when drinking potions or elixirs based on potions of healing.
actors.hero.talent.restored_willpower.meta_desc=_If this talent is gained by a different hero_ it will instead grant shielding equal to 5% max hp at +1, or 7.5% max hp at +2.
actors.hero.talent.liquid_willpower.title=liquid willpower
actors.hero.talent.liquid_willpower.desc=_+1:_ The Warrior instantly regains _50% of the shielding_ from his broken seal when drinking or throwing a potion.\n\n_+2:_ The Warrior instantly regains _75% of the shielding_ from his broken seal when drinking or throwing a potion.\n\nThe shield regeneration effect is doubled when using potions of strength, experience, mastery, or divine inspiration.
actors.hero.talent.liquid_willpower.meta_desc=_If this talent is gained by a different hero_ it will instead grant shielding equal to 5% max hp at +1, or 7.5% max hp at +2.
actors.hero.talent.runic_transference.title=runic transference
actors.hero.talent.runic_transference.desc=_+1:_ The Warrior's broken seal can transfer _regular glyphs_ in the same way it transfers an upgrade.\n\n_+2:_ The Warrior's broken seal can transfer _regular, powerful, and curse glyphs_ in the same way it transfers an upgrade.
actors.hero.talent.runic_transference.meta_desc=_If this talent is gained by a different hero_ it will instead help glyphs on your armor resist being removed by scrolls of upgrade. Glyphs will begin to be lost when upgrading from level 6(up from 4) at +1, or level 7(up from 4) at +2. The level where glyphs are guaranteed to be lost is unchanged at +8.
@@ -692,9 +692,8 @@ actors.hero.talent.backup_barrier.meta_desc=_If this talent is gained by a diffe
actors.hero.talent.energizing_meal.title=energizing meal
actors.hero.talent.energizing_meal.desc=_+1:_ Eating food takes the Mage 1 turn and grants him _5 turns of wand recharging_.\n\n_+2:_ Eating food takes the Mage 1 turn and grants him _8 turns of wand recharging_.
actors.hero.talent.energizing_upgrade.title=energizing upgrade
actors.hero.talent.energizing_upgrade.desc=_+1:_ Using a scroll of upgrade instantly recharges the Mage's staff _for 4 charges_, this can put it above its current charge cap.\n\n_+2:_ Using a scroll of upgrade instantly recharges the Mage's staff _for 6 charges_, this can put it above its current charge cap.\n\nThis talent also triggers when using scrolls or spells based on scrolls of upgrade.
actors.hero.talent.energizing_upgrade.meta_desc=_If this talent is gained by a different hero_ it will instead grant 12 turns of wand recharging at +1, or 20 turns at +2.
actors.hero.talent.inscribed_power.title=inscribed power
actors.hero.talent.inscribed_power.desc=_+1:_ When the Mage reads a scroll, his next _next 2 wand zaps_ get +2 levels.\n\n_+2:_ When the Mage reads a scroll, his next _next 3 wand zaps_ get +2 levels.\n\nThe number of enhanced wand zaps is doubled when reading a scroll of upgrade, transmutation, enchantment, or metamorphosis.
actors.hero.talent.wand_preservation.title=wand preservation
actors.hero.talent.wand_preservation.desc=_+1:_ When the Mage imbues a new wand into his staff, the old wand has a _67% chance_ of being returned at +0, otherwise it will be returned as 1 arcane resin.\n\n_+2:_ When the Mage imbues a new wand into his staff, the old wand has a _100% chance_ of being returned at +0.\n\nThis talent can preserve wands a maximum of five times, afterward it will always grant 1 arcane resin.
actors.hero.talent.wand_preservation.meta_desc=_If this talent is gained by a different hero_ it will instead increase the amount of arcane resin gained when putting a wand into an alchemy pot by 1 at +1, or by 2 at +2.
@@ -755,9 +754,8 @@ actors.hero.talent.protective_shadows.desc=_+1:_ The Rogue gains one shielding _
actors.hero.talent.mystical_meal.title=mystical meal
actors.hero.talent.mystical_meal.desc=_+1:_ Eating food takes the Rogue 1 turn and grants him _3 turns of artifact recharging_.\n\n_+2:_ Eating food takes the Rogue 1 turn and grants him _5 turns of artifact recharging_.\n\nThis talent cannot be used to let the horn of plenty recharge itself.
actors.hero.talent.mystical_upgrade.title=mystical upgrade
actors.hero.talent.mystical_upgrade.desc=_+1:_ Using a scroll of upgrade instantly recharges the Rogue's cloak _for 2 charges_, this can put it above its current charge cap.\n\n_+2:_ Using a scroll of upgrade instantly recharges the Rogue's cloak _for 3 charges_, this can put it above its current charge cap.\n\nThis talent also triggers when using scrolls or spells based on scrolls of upgrade.
actors.hero.talent.mystical_upgrade.meta_desc=_If this talent is gained by a different hero_ it will instead grant 6 turns of artifact recharging at +1, or 10 turns at +2.
actors.hero.talent.inscribed_stealth.title=inscribed stealth
actors.hero.talent.inscribed_stealth.desc=_+1:_ The Rogue gains _3 turns_ of invisibility after reading a scroll.\n\n_+2:_ The Rogue gains _5 turns_ of invisibility after reading a scroll.\n\nThe invisibility duration is doubled when reading a scroll of upgrade, transmutation, enchantment, or metamorphosis.
actors.hero.talent.wide_search.title=wide search
actors.hero.talent.wide_search.desc=_+1:_ The Rogues search radius is increased from a 5x5 square to a _7x7 circle_.\n\n_+2:_ The Rogues search radius is increased from a 5x5 square to a _7x7 square_.
actors.hero.talent.wide_search.meta_desc=_If this talent is gained by a different hero_ it will instead increase their search radius from a 3x3 square to a 5x5 circle at +1, or a 5x5 square at +2.
@@ -819,8 +817,8 @@ actors.hero.talent.natures_aid.desc=_+1:_ The Huntress gains 0-2 armor of barksk
actors.hero.talent.invigorating_meal.title=invigorating meal
actors.hero.talent.invigorating_meal.desc=_+1:_ Eating food takes the Huntress 1 turn (berries are eaten instantly) and grants her _1 turn of haste_.\n\n_+2:_ Eating food takes the Huntress 1 turn (berries are eaten instantly) and grants her _2 turns of haste_.
actors.hero.talent.restored_nature.title=restored nature
actors.hero.talent.restored_nature.desc=_+1:_ Drinking a potion of healing spawns _up to 5 grass_ around the Huntress, and roots adjacent enemies for _2 turns_.\n\n_+2:_ Drinking a potion of healing spawns _up to 8 grass_ around the Huntress, and roots adjacent enemies for _3 turns_.\n\nThis talent also triggers when drinking potions or elixirs based on potions of healing.
actors.hero.talent.liquid_nature.title=liquid nature
actors.hero.talent.liquid_nature.desc=_+1:_ When the Huntress drinks or throws a potion, _up to 4 grass tiles_ sprout in the surrounding area, and adjacent enemies are rooted for _1 turn_.\n\n_+2:_ When the Huntress drinks or throws a potion, _up to 6 grass tiles_ sprout in the surrounding area, and adjacent enemies are rooted for _2 turns_.\n\nThe amount of grass and root duration are doubled when using potions of strength, experience, mastery, or divine inspiration.
actors.hero.talent.rejuvenating_steps.title=rejuvenating steps
actors.hero.talent.rejuvenating_steps.desc=_+1:_ When the Huntress steps on short grass or embers, they spring up into tall grass which the Huntress immediately furrows. This has a _10 turn cooldown_.\n\n_+2:_ When the Huntress steps on short grass or embers, they spring up into tall grass which the Huntress immediately furrows. This has a _5 turn cooldown_.\n\nThis talent will produce furrowed grass if passive regeneration effects are disabled or the hero has not gained exp in a long time.
actors.hero.talent.heightened_senses.title=heightened senses
@@ -883,8 +881,8 @@ actors.hero.talent.aggressive_barrier.meta_desc=_If this talent is gained by a d
actors.hero.talent.focused_meal.title=focused meal
actors.hero.talent.focused_meal.desc=_+1:_ Eating food takes the Duelist 1 turn and grants her _1 charge_ on her primary weapon.\n\n_+2:_ Eating food takes the Duelist 1 turn and grants her _1.5 charge_ on her primary weapon.
actors.hero.talent.focused_meal.meta_desc=_If this talent is gained by a different hero_ it will instead grant bonus damage to their next attack equal to their level/3 at +1, or level/2 at +2.
actors.hero.talent.restored_agility.title=restored agility
actors.hero.talent.restored_agility.desc=_+1:_ The Duelist has _4x evasion_ while drinking potions of healing.\n\n_+2:_ The Duelist has _infinite evasion_ while drinking potions of healing.\n\nThis talent also triggers when drinking potions or elixirs based on potions of healing.
actors.hero.talent.liquid_agility.title=liquid agility
actors.hero.talent.liquid_agility.desc=_+1:_ The Duelist has _4x evasion_ while drinking or throwing a potion.\n\n_+2:_ The Duelist has _infinite evasion_ while drinking or throwing a potion.\n\nThis evasion bonus lasts for 1 additional turn when using potions of strength, experience, mastery, or divine inspiration.
actors.hero.talent.weapon_recharging.title=weapon recharging
actors.hero.talent.weapon_recharging.desc=_+1:_ The Duelist gains one primary weapon charge every _10 turns_ when under the effect of wand or artifact recharging buffs.\n\n_+2:_ The Duelist gains one primary weapon charge every _6 turns_ when under the effect of wand or artifact recharging buffs.
actors.hero.talent.weapon_recharging.meta_desc=_If this talent is gained by a different hero_ it will instead cause them to deal +5% melee damage while recharging at +1, or +7.5% melee damage while recharging at +2.

View File

@@ -21,8 +21,6 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
@@ -37,8 +35,8 @@ public class ScrollEmpower extends Buff {
private int left;
public void reset(){
left = Dungeon.hero.pointsInTalent(Talent.EMPOWERING_SCROLLS);
public void reset(int left){
this.left = left;
Item.updateQuickslot();
}
@@ -77,7 +75,7 @@ public class ScrollEmpower extends Buff {
@Override
public String desc() {
return Messages.get(this, "desc", 3, left);
return Messages.get(this, "desc", 2, left);
}
private static final String LEFT = "left";

View File

@@ -508,9 +508,9 @@ public class Hero extends Char {
evasion *= RingOfEvasion.evasionMultiplier( this );
if (buff(Talent.RestoredAgilityTracker.class) != null){
if (pointsInTalent(Talent.RESTORED_AGILITY) == 1){
if (pointsInTalent(Talent.LIQUID_AGILITY) == 1){
evasion *= 4f;
} else if (pointsInTalent(Talent.RESTORED_AGILITY) == 2){
} else if (pointsInTalent(Talent.LIQUID_AGILITY) == 2){
return INFINITE_EVASION;
}
}

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.hero;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.GamesInProgress;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
@@ -33,11 +34,13 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.CounterBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.EnhancedRings;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Haste;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LostInventory;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.PhysicalEmpower;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.RevealedArea;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Roots;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ScrollEmpower;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.WandEmpower;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbility;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.Ratmogrify;
@@ -67,6 +70,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.watabou.noosa.Image;
import com.watabou.noosa.audio.Sample;
import com.watabou.noosa.particles.Emitter;
import com.watabou.utils.Bundle;
import com.watabou.utils.GameMath;
@@ -84,7 +88,7 @@ public enum Talent {
//Warrior T1
HEARTY_MEAL(0), VETERANS_INTUITION(1), TEST_SUBJECT(2), IRON_WILL(3),
//Warrior T2
IRON_STOMACH(4), RESTORED_WILLPOWER(5), RUNIC_TRANSFERENCE(6), LETHAL_MOMENTUM(7), IMPROVISED_PROJECTILES(8),
IRON_STOMACH(4), LIQUID_WILLPOWER(5), RUNIC_TRANSFERENCE(6), LETHAL_MOMENTUM(7), IMPROVISED_PROJECTILES(8),
//Warrior T3
HOLD_FAST(9, 3), STRONGMAN(10, 3),
//Berserker T3
@@ -101,8 +105,9 @@ public enum Talent {
//Mage T1
EMPOWERING_MEAL(32), SCHOLARS_INTUITION(33), TESTED_HYPOTHESIS(34), BACKUP_BARRIER(35),
//Mage T2
ENERGIZING_MEAL(36), ENERGIZING_UPGRADE(37), WAND_PRESERVATION(38), ARCANE_VISION(39), SHIELD_BATTERY(40),
ENERGIZING_MEAL(36), INSCRIBED_POWER(37), WAND_PRESERVATION(38), ARCANE_VISION(39), SHIELD_BATTERY(40),
//Mage T3
//TODO current empowering scrolls does nothing
EMPOWERING_SCROLLS(41, 3), ALLY_WARP(42, 3),
//Battlemage T3
EMPOWERED_STRIKE(43, 3), MYSTICAL_CHARGE(44, 3), EXCESS_CHARGE(45, 3),
@@ -118,7 +123,7 @@ public enum Talent {
//Rogue T1
CACHED_RATIONS(64), THIEFS_INTUITION(65), SUCKER_PUNCH(66), PROTECTIVE_SHADOWS(67),
//Rogue T2
MYSTICAL_MEAL(68), MYSTICAL_UPGRADE(69), WIDE_SEARCH(70), SILENT_STEPS(71), ROGUES_FORESIGHT(72),
MYSTICAL_MEAL(68), INSCRIBED_STEALTH(69), WIDE_SEARCH(70), SILENT_STEPS(71), ROGUES_FORESIGHT(72),
//Rogue T3
ENHANCED_RINGS(73, 3), LIGHT_CLOAK(74, 3),
//Assassin T3
@@ -135,7 +140,7 @@ public enum Talent {
//Huntress T1
NATURES_BOUNTY(96), SURVIVALISTS_INTUITION(97), FOLLOWUP_STRIKE(98), NATURES_AID(99),
//Huntress T2
INVIGORATING_MEAL(100), RESTORED_NATURE(101), REJUVENATING_STEPS(102), HEIGHTENED_SENSES(103), DURABLE_PROJECTILES(104),
INVIGORATING_MEAL(100), LIQUID_NATURE(101), REJUVENATING_STEPS(102), HEIGHTENED_SENSES(103), DURABLE_PROJECTILES(104),
//Huntress T3
POINT_BLANK(105, 3), SEER_SHOT(106, 3),
//Sniper T3
@@ -152,7 +157,7 @@ public enum Talent {
//Duelist T1
STRENGTHENING_MEAL(128), ADVENTURERS_INTUITION(129), PATIENT_STRIKE(130), AGGRESSIVE_BARRIER(131),
//Duelist T2
FOCUSED_MEAL(132), RESTORED_AGILITY(133), WEAPON_RECHARGING(134), LETHAL_HASTE(135), SWIFT_EQUIP(136),
FOCUSED_MEAL(132), LIQUID_AGILITY(133), WEAPON_RECHARGING(134), LETHAL_HASTE(135), SWIFT_EQUIP(136),
//Duelist T3
PRECISE_ASSAULT(137, 3), DEADLY_FOLLOWUP(138, 3),
//Champion T3
@@ -543,84 +548,85 @@ public enum Talent {
return factor;
}
public static void onHealingPotionUsed( Hero hero ){
if (hero.hasTalent(RESTORED_WILLPOWER)){
public static void onPotionUsed( Hero hero, int cell, float factor ){
if (hero.hasTalent(LIQUID_WILLPOWER)){
if (hero.heroClass == HeroClass.WARRIOR) {
BrokenSeal.WarriorShield shield = hero.buff(BrokenSeal.WarriorShield.class);
if (shield != null) {
int shieldToGive = Math.round(shield.maxShield() * 0.33f * (1 + hero.pointsInTalent(RESTORED_WILLPOWER)));
// 50/75% of total shield
int shieldToGive = Math.round(factor * shield.maxShield() * 0.25f * (1 + hero.pointsInTalent(LIQUID_WILLPOWER)));
shield.supercharge(shieldToGive);
}
} else {
int shieldToGive = Math.round( hero.HT * (0.025f * (1+hero.pointsInTalent(RESTORED_WILLPOWER))));
// 5/7.5% of max HP
int shieldToGive = Math.round( factor * hero.HT * (0.025f * (1+hero.pointsInTalent(LIQUID_WILLPOWER))));
Buff.affect(hero, Barrier.class).setShield(shieldToGive);
}
}
if (hero.hasTalent(RESTORED_NATURE)){
if (hero.hasTalent(LIQUID_NATURE)){
ArrayList<Integer> grassCells = new ArrayList<>();
for (int i : PathFinder.NEIGHBOURS8){
grassCells.add(hero.pos+i);
for (int i : PathFinder.NEIGHBOURS9){
grassCells.add(cell+i);
}
Random.shuffle(grassCells);
for (int cell : grassCells){
Char ch = Actor.findChar(cell);
for (int grassCell : grassCells){
Char ch = Actor.findChar(grassCell);
if (ch != null && ch.alignment == Char.Alignment.ENEMY){
Buff.affect(ch, Roots.class, 1f + hero.pointsInTalent(RESTORED_NATURE));
//1/2 turns of roots
Buff.affect(ch, Roots.class, factor * hero.pointsInTalent(LIQUID_NATURE));
}
if (Dungeon.level.map[cell] == Terrain.EMPTY ||
Dungeon.level.map[cell] == Terrain.EMBERS ||
Dungeon.level.map[cell] == Terrain.EMPTY_DECO){
Level.set(cell, Terrain.GRASS);
GameScene.updateMap(cell);
if (Dungeon.level.map[grassCell] == Terrain.EMPTY ||
Dungeon.level.map[grassCell] == Terrain.EMBERS ||
Dungeon.level.map[grassCell] == Terrain.EMPTY_DECO){
Level.set(grassCell, Terrain.GRASS);
GameScene.updateMap(grassCell);
}
CellEmitter.get(cell).burst(LeafParticle.LEVEL_SPECIFIC, 4);
CellEmitter.get(grassCell).burst(LeafParticle.LEVEL_SPECIFIC, 4);
}
if (hero.pointsInTalent(RESTORED_NATURE) == 1){
grassCells.remove(0);
grassCells.remove(0);
// 4/6 cells total
int totalGrassCells = (int) (factor * (2 + 2 * hero.pointsInTalent(LIQUID_NATURE)));
while (grassCells.size() > totalGrassCells){
grassCells.remove(0);
}
for (int cell : grassCells){
int t = Dungeon.level.map[cell];
for (int grassCell : grassCells){
int t = Dungeon.level.map[grassCell];
if ((t == Terrain.EMPTY || t == Terrain.EMPTY_DECO || t == Terrain.EMBERS
|| t == Terrain.GRASS || t == Terrain.FURROWED_GRASS)
&& Dungeon.level.plants.get(cell) == null){
Level.set(cell, Terrain.HIGH_GRASS);
GameScene.updateMap(cell);
&& Dungeon.level.plants.get(grassCell) == null){
Level.set(grassCell, Terrain.HIGH_GRASS);
GameScene.updateMap(grassCell);
}
}
Dungeon.observe();
}
if (hero.hasTalent(RESTORED_AGILITY)){
Buff.prolong(hero, RestoredAgilityTracker.class, hero.cooldown());
if (hero.hasTalent(LIQUID_AGILITY)){
Buff.prolong(hero, RestoredAgilityTracker.class, hero.cooldown() + Math.max(0, factor-1));
}
}
public static void onScrollUsed( Hero hero, int pos, float factor ){
if (hero.hasTalent(INSCRIBED_POWER)){
// 2/3 empowered wand zaps
Buff.affect(hero, ScrollEmpower.class).reset((int) (factor * (1 + hero.pointsInTalent(INSCRIBED_POWER))));
}
if (hero.hasTalent(INSCRIBED_STEALTH)){
// 3/5 turns of stealth
Buff.affect(hero, Invisibility.class, factor * (1 + 2*hero.pointsInTalent(INSCRIBED_STEALTH)));
Sample.INSTANCE.play( Assets.Sounds.MELD );
}
}
public static void onUpgradeScrollUsed( Hero hero ){
if (hero.hasTalent(ENERGIZING_UPGRADE)){
if (hero.hasTalent(INSCRIBED_POWER)){
if (hero.heroClass == HeroClass.MAGE) {
MagesStaff staff = hero.belongings.getItem(MagesStaff.class);
if (staff != null) {
staff.gainCharge(2 + 2 * hero.pointsInTalent(ENERGIZING_UPGRADE), true);
staff.gainCharge(2 + 2 * hero.pointsInTalent(INSCRIBED_POWER), true);
ScrollOfRecharging.charge(Dungeon.hero);
SpellSprite.show(hero, SpellSprite.CHARGE);
}
} else {
Buff.affect(hero, Recharging.class, 4 + 8 * hero.pointsInTalent(ENERGIZING_UPGRADE));
}
}
if (hero.hasTalent(MYSTICAL_UPGRADE)){
if (hero.heroClass == HeroClass.ROGUE) {
CloakOfShadows cloak = hero.belongings.getItem(CloakOfShadows.class);
if (cloak != null) {
cloak.overCharge(1 + hero.pointsInTalent(MYSTICAL_UPGRADE));
ScrollOfRecharging.charge(Dungeon.hero);
SpellSprite.show(hero, SpellSprite.CHARGE, 0, 1, 1);
}
} else {
Buff.affect(hero, ArtifactRecharge.class).set( 2 + 4*hero.pointsInTalent(MYSTICAL_UPGRADE) ).ignoreHornOfPlenty = false;
ScrollOfRecharging.charge(Dungeon.hero);
SpellSprite.show(hero, SpellSprite.CHARGE, 0, 1, 1);
Buff.affect(hero, Recharging.class, 4 + 8 * hero.pointsInTalent(INSCRIBED_POWER));
}
}
}
@@ -783,19 +789,19 @@ public enum Talent {
//tier 2
switch (cls){
case WARRIOR: default:
Collections.addAll(tierTalents, IRON_STOMACH, RESTORED_WILLPOWER, RUNIC_TRANSFERENCE, LETHAL_MOMENTUM, IMPROVISED_PROJECTILES);
Collections.addAll(tierTalents, IRON_STOMACH, LIQUID_WILLPOWER, RUNIC_TRANSFERENCE, LETHAL_MOMENTUM, IMPROVISED_PROJECTILES);
break;
case MAGE:
Collections.addAll(tierTalents, ENERGIZING_MEAL, ENERGIZING_UPGRADE, WAND_PRESERVATION, ARCANE_VISION, SHIELD_BATTERY);
Collections.addAll(tierTalents, ENERGIZING_MEAL, INSCRIBED_POWER, WAND_PRESERVATION, ARCANE_VISION, SHIELD_BATTERY);
break;
case ROGUE:
Collections.addAll(tierTalents, MYSTICAL_MEAL, MYSTICAL_UPGRADE, WIDE_SEARCH, SILENT_STEPS, ROGUES_FORESIGHT);
Collections.addAll(tierTalents, MYSTICAL_MEAL, INSCRIBED_STEALTH, WIDE_SEARCH, SILENT_STEPS, ROGUES_FORESIGHT);
break;
case HUNTRESS:
Collections.addAll(tierTalents, INVIGORATING_MEAL, RESTORED_NATURE, REJUVENATING_STEPS, HEIGHTENED_SENSES, DURABLE_PROJECTILES);
Collections.addAll(tierTalents, INVIGORATING_MEAL, LIQUID_NATURE, REJUVENATING_STEPS, HEIGHTENED_SENSES, DURABLE_PROJECTILES);
break;
case DUELIST:
Collections.addAll(tierTalents, FOCUSED_MEAL, RESTORED_AGILITY, WEAPON_RECHARGING, LETHAL_HASTE, SWIFT_EQUIP);
Collections.addAll(tierTalents, FOCUSED_MEAL, LIQUID_AGILITY, WEAPON_RECHARGING, LETHAL_HASTE, SWIFT_EQUIP);
break;
}
for (Talent talent : tierTalents){
@@ -938,12 +944,18 @@ public enum Talent {
private static final HashMap<String, String> renamedTalents = new HashMap<>();
static{
//v2.0.0
renamedTalents.put("ARMSMASTERS_INTUITION", "VETERANS_INTUITION");
//v2.2.0
renamedTalents.put("RESTORED_WILLPOWER", "LIQUID_WILLPOWER");
renamedTalents.put("ENERGIZING_UPGRADE", "INSCRIBED_POWER");
renamedTalents.put("MYSTICAL_UPGRADE", "INSCRIBED_STEALTH");
renamedTalents.put("RESTORED_NATURE", "LIQUID_NATURE");
renamedTalents.put("RESTORED_AGILITY", "LIQUID_AGILITY");
//v2.1.0
renamedTalents.put("LIGHTWEIGHT_CHARGE", "PRECISE_ASSAULT");
//v2.0.0 BETA
renamedTalents.put("LIGHTLY_ARMED", "UNENCUMBERED_SPIRIT");
//v2.1.0
renamedTalents.put("LIGHTWEIGHT_CHARGE", "PRECISE_ASSAULT");
//v2.0.0
renamedTalents.put("ARMSMASTERS_INTUITION", "VETERANS_INTUITION");
}
public static void restoreTalentsFromBundle( Bundle bundle, Hero hero ){

View File

@@ -30,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.effects.Splash;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
@@ -134,6 +135,9 @@ public class Potion extends Item {
protected static ItemStatusHandler<Potion> handler;
protected String color;
//affects how strongly on-potion talents trigger from this potion
protected float talentFactor = 1;
{
stackable = true;
@@ -282,6 +286,10 @@ public class Potion extends Item {
Sample.INSTANCE.play( Assets.Sounds.DRINK );
hero.sprite.operate( hero.pos );
if (!anonymous){
Talent.onPotionUsed(curUser, curUser.pos, talentFactor);
}
}
@Override
@@ -294,6 +302,10 @@ public class Potion extends Item {
Dungeon.level.pressCell( cell );
shatter( cell );
if (!anonymous){
Talent.onPotionUsed(curUser, cell, talentFactor);
}
}
}

View File

@@ -31,6 +31,8 @@ public class PotionOfExperience extends Potion {
icon = ItemSpriteSheet.Icons.POTION_EXP;
bones = true;
talentFactor = 2f;
}
@Override

View File

@@ -36,7 +36,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vulnerable;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
@@ -54,7 +53,6 @@ public class PotionOfHealing extends Potion {
identify();
cure( hero );
heal( hero );
Talent.onHealingPotionUsed( hero );
}
public static void heal( Char ch ){

View File

@@ -34,6 +34,8 @@ public class PotionOfStrength extends Potion {
icon = ItemSpriteSheet.Icons.POTION_STRENGTH;
unique = true;
talentFactor = 2f;
}
@Override

View File

@@ -25,7 +25,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Challenges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
import com.shatteredpixel.shatteredpixeldungeon.items.quest.GooBlob;
@@ -50,7 +49,6 @@ public class ElixirOfAquaticRejuvenation extends Elixir {
} else {
Buff.affect(hero, AquaHealing.class).set(Math.round(hero.HT * 1.5f));
}
Talent.onHealingPotionUsed( hero );
}
@Override

View File

@@ -45,7 +45,6 @@ public class ElixirOfHoneyedHealing extends Elixir {
public void apply(Hero hero) {
PotionOfHealing.cure(hero);
PotionOfHealing.heal(hero);
Talent.onHealingPotionUsed( hero );
Buff.affect(hero, Hunger.class).satisfy(Hunger.HUNGRY/2f);
Talent.onFoodEaten(hero, Hunger.HUNGRY/2f, this);
}

View File

@@ -42,6 +42,8 @@ public class PotionOfDivineInspiration extends ExoticPotion {
{
icon = ItemSpriteSheet.Icons.POTION_DIVINE;
talentFactor = 2f;
}
protected static boolean identifiedByUse = false;

View File

@@ -42,6 +42,8 @@ public class PotionOfMastery extends ExoticPotion {
icon = ItemSpriteSheet.Icons.POTION_MASTERY;
unique = true;
talentFactor = 2f;
}
protected static boolean identifiedByUse = false;

View File

@@ -26,7 +26,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
@@ -46,6 +45,5 @@ public class PotionOfShielding extends ExoticPotion {
//~75% of a potion of healing
Buff.affect(hero, Barrier.class).setShield((int) (0.6f * hero.HT + 10));
}
Talent.onHealingPotionUsed( hero );
}
}

View File

@@ -23,10 +23,8 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ScrollEmpower;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
@@ -88,6 +86,9 @@ public abstract class Scroll extends Item {
protected static ItemStatusHandler<Scroll> handler;
protected String rune;
//affects how strongly on-scroll talents trigger from this scroll
protected float talentFactor = 1;
{
stackable = true;
@@ -185,9 +186,8 @@ public abstract class Scroll extends Item {
curUser.busy();
((HeroSprite)curUser.sprite).read();
if (curUser.hasTalent(Talent.EMPOWERING_SCROLLS)){
Buff.affect(curUser, ScrollEmpower.class).reset();
updateQuickslot();
if (!anonymous) {
Talent.onScrollUsed(curUser, curUser.pos, talentFactor);
}
}

View File

@@ -59,6 +59,8 @@ public class ScrollOfTransmutation extends InventoryScroll {
icon = ItemSpriteSheet.Icons.SCROLL_TRANSMUTE;
bones = true;
talentFactor = 2f;
}
@Override

View File

@@ -27,7 +27,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Statistics;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Degrade;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Belongings;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
@@ -46,6 +45,8 @@ public class ScrollOfUpgrade extends InventoryScroll {
preferredBag = Belongings.Backpack.class;
unique = true;
talentFactor = 2f;
}
@Override
@@ -114,8 +115,6 @@ public class ScrollOfUpgrade extends InventoryScroll {
} else {
item.upgrade();
}
Talent.onUpgradeScrollUsed( Dungeon.hero );
Badges.validateItemLevelAquired( item );
Statistics.upgradesUsed++;

View File

@@ -22,9 +22,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Belongings;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.effects.Enchanting;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
@@ -51,6 +49,8 @@ public class ScrollOfEnchantment extends ExoticScroll {
icon = ItemSpriteSheet.Icons.SCROLL_ENCHANT;
unique = true;
talentFactor = 2f;
}
protected static boolean identifiedByUse = false;
@@ -185,7 +185,6 @@ public class ScrollOfEnchantment extends ExoticScroll {
Sample.INSTANCE.play( Assets.Sounds.READ );
Enchanting.show(curUser, wep);
Talent.onUpgradeScrollUsed( Dungeon.hero );
}
wep = null;
@@ -249,7 +248,6 @@ public class ScrollOfEnchantment extends ExoticScroll {
Sample.INSTANCE.play( Assets.Sounds.READ );
Enchanting.show(curUser, arm);
Talent.onUpgradeScrollUsed( Dungeon.hero );
}
arm = null;

View File

@@ -50,6 +50,8 @@ public class ScrollOfMetamorphosis extends ExoticScroll {
{
icon = ItemSpriteSheet.Icons.SCROLL_METAMORPH;
talentFactor = 2f;
}
protected static boolean identifiedByUse = false;

View File

@@ -22,10 +22,8 @@
package com.shatteredpixel.shatteredpixeldungeon.items.spells;
import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Degrade;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
@@ -68,7 +66,6 @@ public class MagicalInfusion extends InventorySpell {
}
GLog.p( Messages.get(this, "infuse") );
Talent.onUpgradeScrollUsed( Dungeon.hero );
Badges.validateItemLevelAquired(item);
Statistics.upgradesUsed++;

View File

@@ -353,7 +353,7 @@ public abstract class Wand extends Item {
}
if (charger.target.buff(ScrollEmpower.class) != null){
lvl += 3;
lvl += 2;
}
WandOfMagicMissile.MagicCharge buff = charger.target.buff(WandOfMagicMissile.MagicCharge.class);

View File

@@ -348,7 +348,7 @@ public class v0_9_X_Changes {
"_-_ Rather than having a 1/8 chance per enemy, the game now guarantees that every 8th enemy is a champion. This should make champion spawn rates much more consistent.\n" +
"_-_ Removed champion enemy caps, no longer needed now that spawning is more consistent."));
changes.addButton(new ChangeButton(new TalentIcon(Talent.ENERGIZING_UPGRADE), "On-Upgrade Talents",
changes.addButton(new ChangeButton(new TalentIcon(Talent.INSCRIBED_POWER), "On-Upgrade Talents",
"T2 talents are doing very well overall, but I'm handing out a buff to each on-upgrade talent as they're a bit weak and aren't picked often:\n\n" +
"_- Energizing Upgrade_ staff charges increased to 2/3 at +1/+2, up from 1/2 at +1/+2.\n" +
"_- Mystical Upgrade_ cloak of shadows charges increased to 2/3 at +1/+2, up from 1/2 at +1/+2."));